From 164067832916c8e59219e1b0f30d7d04618a536e Mon Sep 17 00:00:00 2001 From: root Date: Sun, 22 Jan 2012 23:15:13 +0000 Subject: Sun Jan 22 23:15:13 UTC 2012 --- community/bird/PKGBUILD | 6 ++-- community/calibre/PKGBUILD | 6 ++-- community/dos2unix/PKGBUILD | 27 +++++++++++++++ community/freemat/PKGBUILD | 51 ++++++++++++---------------- community/freemat/build-fix.patch | 11 ++++++ community/freemat/freemat.install | 4 +-- community/haveged/PKGBUILD | 31 +++++++++++++++++ community/haveged/haveged | 44 ++++++++++++++++++++++++ community/i7z/PKGBUILD | 32 +++++++++++++++++ community/libbsd/LICENSE | 28 +++++++++++++++ community/libbsd/PKGBUILD | 30 ++++++++++++++++ community/libircclient/PKGBUILD | 45 +++++++++++++++++------- community/nodejs/PKGBUILD | 10 ++++-- community/opensc/PKGBUILD | 42 +++++++++++++++++++++++ community/par2cmdline/PKGBUILD | 34 +++++++++++++++++++ community/pidgin-gfire/PKGBUILD | 27 +++++++++++++++ community/pidgin-gfire/gfire-libnotify.patch | 21 ++++++++++++ community/python-memcached/PKGBUILD | 12 +++---- community/python-mpi4py/PKGBUILD | 8 ++--- community/roxterm/PKGBUILD | 8 ++--- community/snort/PKGBUILD | 8 ++--- 21 files changed, 414 insertions(+), 71 deletions(-) create mode 100644 community/dos2unix/PKGBUILD create mode 100644 community/freemat/build-fix.patch create mode 100644 community/haveged/PKGBUILD create mode 100644 community/haveged/haveged create mode 100644 community/i7z/PKGBUILD create mode 100644 community/libbsd/LICENSE create mode 100644 community/libbsd/PKGBUILD create mode 100644 community/opensc/PKGBUILD create mode 100644 community/par2cmdline/PKGBUILD create mode 100644 community/pidgin-gfire/PKGBUILD create mode 100644 community/pidgin-gfire/gfire-libnotify.patch (limited to 'community') diff --git a/community/bird/PKGBUILD b/community/bird/PKGBUILD index 618c18f3b..8bab0f4d1 100644 --- a/community/bird/PKGBUILD +++ b/community/bird/PKGBUILD @@ -1,9 +1,9 @@ # $Id$ -# Maintainer: Sebastien Luttringer +# Maintainer: Sébastien Luttringer pkgbase=bird pkgname=('bird' 'bird6') -pkgver=1.3.5 +pkgver=1.3.6 pkgrel=1 arch=('i686' 'x86_64') url='http://bird.network.cz/' @@ -14,7 +14,7 @@ source=("ftp://bird.network.cz/pub/bird/${pkgname}-${pkgver}.tar.gz" 'bird.conf' 'bird.service' 'bird6.service') -md5sums=('9efc2b1c05fa6298a8df60f5147ad5c1' +md5sums=('fa5621a41dcd86b6cb8cbe4fbd74af7e' '1a4b98756d64f52333a83eff2e95d233' '25241a4d7ef639506e0080431b2c1690' 'e82a0519dca0b289685fda44787f5911' diff --git a/community/calibre/PKGBUILD b/community/calibre/PKGBUILD index 53ce5607c..af9fd6d17 100644 --- a/community/calibre/PKGBUILD +++ b/community/calibre/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 61987 2012-01-13 12:17:48Z giovanni $ +# $Id: PKGBUILD 62518 2012-01-20 10:19:50Z giovanni $ # Maintainer: Giovanni Scafora # Contributor: Petrov Roman # Contributor: Andrea Fagiani pkgname=calibre -pkgver=0.8.35 +pkgver=0.8.36 pkgrel=1 pkgdesc="Ebook management application" arch=('i686' 'x86_64') @@ -21,7 +21,7 @@ install=calibre.install source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz" 'desktop_integration.patch' 'calibre-mount-helper') -md5sums=('0a1170534492c6ca5b9f849cbfaa7acc' +md5sums=('cc009c02fa0db088d074fef8b983e78a' '253ce4fe5d01f8ff76b63cd3825755ea' '675cd87d41342119827ef706055491e7') diff --git a/community/dos2unix/PKGBUILD b/community/dos2unix/PKGBUILD new file mode 100644 index 000000000..5c7dd4848 --- /dev/null +++ b/community/dos2unix/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Bartłomiej Piotrowski +# Contributor: Renato Garcia +# Contributor: Gerson E. Ruotolo + +pkgname=dos2unix +pkgver=5.3.1 +pkgrel=3 +pkgdesc='Text file format converter' +arch=('i686' 'x86_64') +url='http://waterlan.home.xs4all.nl/dos2unix.html' +license=('BSD') +depends=('glibc') +makedepends=('perl') +conflicts=('hd2u') +source=("http://waterlan.home.xs4all.nl/${pkgname}/${pkgname}-${pkgver}.tar.gz") +md5sums=('438c48ebd6891b80b58de14c022ca69e') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m644 COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/community/freemat/PKGBUILD b/community/freemat/PKGBUILD index 0dc55bb14..2609674ba 100644 --- a/community/freemat/PKGBUILD +++ b/community/freemat/PKGBUILD @@ -1,45 +1,38 @@ -# $Id: PKGBUILD 58815 2011-11-18 15:51:12Z spupykin $ +# $Id: PKGBUILD 62525 2012-01-20 17:49:51Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: William Rea pkgname=freemat -pkgver=4.0 -pkgrel=5 +pkgver=4.1 +pkgrel=1 pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing" arch=('i686' 'x86_64') url="http://freemat.sourceforge.net" license=('GPL') -depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio') -makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake') +depends=('qt' 'ffcall' 'fftw' 'mesa' 'portaudio' 'libffi') +makedepends=('arpack' 'lapack' 'umfpack' 'blas' 'libmatio' 'cmake' 'python2') install=freemat.install source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz - freemat-gcc-4.3.0.patch - freemat-gcc-4.5.0.patch - freemat-qt46.patch - input-fix.patch) -md5sums=('adb58b9f2c508d9ae5b6041da2f75baf' - '3dc3848949183de2664c2cf67663c892' - 'a3edb7b51057a90a752aff5053f8eed6' - 'a8d2ffa9319eccaedb28a10f9c7617f4' - 'a78941563453feaca5c7463eaeea1a70') + build-fix.patch) +md5sums=('929d31e2310feaff5d380fc2f7b4d1a2' + '2d11a28aa2a7df89c4618ed1c4be5973') build() { - cd $srcdir/FreeMat-$pkgver.1-Source + cd $srcdir/FreeMat-$pkgver-Source - if [ $NOEXTRACT -ne 1 ]; then - patch -p1 <$srcdir/freemat-gcc-4.5.0.patch - patch -p1 <$srcdir/input-fix.patch - patch -p1 <$srcdir/freemat-qt46.patch - patch -p1 CMakeCache.txt < #CMAKE_CACHEFILE_DIR:INTERNAL=/home/basu/dev/branches/FreeMat4 -> USE_LLVM:BOOL=OFF -> CMAKE_INSTALL_PREFIX:PATH=/usr -EOF - cmake `pwd` - fi + rm -f CMakeCache.txt + find . -type f -name '*.moc.cpp' -exec rm -f {} \; + find . -type f -name 'add.so' -exec rm -f {} \; + patch -p1 <$srcdir/build-fix.patch + echo >libs/libMatC/CJitFuncClang.hpp + echo >libs/libMatC/CJitFuncClang.cpp + + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_LLVM=OFF \ + -DFFI_INCLUDE_DIR=/usr/lib/libffi-`pacman -Q libffi | cut -f2 -d\ |cut -f1 -d-`/include/ \ + -DPYTHON_EXECUTABLE=/usr/bin/python2 \ + . make make DESTDIR=$pkgdir install sed -i "s|/FreeMat-.*/|/FreeMat-$pkgver/|g" $startdir/freemat.install diff --git a/community/freemat/build-fix.patch b/community/freemat/build-fix.patch new file mode 100644 index 000000000..c1ea63088 --- /dev/null +++ b/community/freemat/build-fix.patch @@ -0,0 +1,11 @@ +diff -wbBur FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp +--- FreeMat-4.1-Source/libs/libGraphics/GLRenderEngine.cpp 2011-11-27 04:27:43.000000000 +0400 ++++ FreeMat-4.1-Source.my/libs/libGraphics/GLRenderEngine.cpp 2012-01-20 19:07:48.000000000 +0400 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + #include "IEEEFP.hpp" + diff --git a/community/freemat/freemat.install b/community/freemat/freemat.install index e319f1a24..051cca866 100644 --- a/community/freemat/freemat.install +++ b/community/freemat/freemat.install @@ -1,7 +1,7 @@ post_install() { - echo "-- Use FreeMat -i /usr/share/FreeMat-4.0/ to adjust docs location" + echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location" } post_upgrade() { - echo "-- Use FreeMat -i /usr/share/FreeMat-4.0/ to adjust docs location" + echo "-- Use FreeMat -i /usr/share/FreeMat-4.1/ to adjust docs location" } diff --git a/community/haveged/PKGBUILD b/community/haveged/PKGBUILD new file mode 100644 index 000000000..e3a60bdb9 --- /dev/null +++ b/community/haveged/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: Bartłomiej Piotrowski +# Contributor: kfgz +# Contributor: pootzko + +pkgname=haveged +pkgver=1.3a +pkgrel=1 +pkgdesc="A simple entropy daemon." +arch=('i686' 'x86_64') +url="http://www.issihosts.com/haveged" +license=('GPL') +depends=('bash') +source=(${url}/${pkgname}-${pkgver}.tar.gz + haveged) +md5sums=('dad8b95c6eafcec7eb42eb8454e60a0d' + '264b725be5271288b40f363d7cfc6b68') + +build() { + cd "${srcdir}"/${pkgname}-${pkgver/a/} + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}"/${pkgname}-${pkgver/a/} + make DESTDIR="${pkgdir}" install + rm -rf "${pkgdir}"/etc/init.d + + cd "${srcdir}" + install -D -m755 haveged "${pkgdir}"/etc/rc.d/haveged +} diff --git a/community/haveged/haveged b/community/haveged/haveged new file mode 100644 index 000000000..c0e13b40d --- /dev/null +++ b/community/haveged/haveged @@ -0,0 +1,44 @@ +#!/bin/bash +## +# chkconfig: 2345 75 25 +# description: havege entropy daemon +# +# source function library +. /etc/rc.conf +. /etc/rc.d/functions + +RETVAL=0 +prog="haveged" + +case "$1" in +start) + stat_busy $"Starting $prog" + /usr/sbin/$prog -w 1024 -v 1 + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon $prog + stat_done + fi + ;; + +stop) + stat_busy $"Stopping $prog" + kill `cat /var/run/$prog.pid` + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon $prog + stat_done + rm -f /var/lock/$prog + fi + ;; + +restart) + $0 stop + $0 start + ;; + +*) + echo "usage: $prog [start|stop|restart]" +esac diff --git a/community/i7z/PKGBUILD b/community/i7z/PKGBUILD new file mode 100644 index 000000000..f573fc123 --- /dev/null +++ b/community/i7z/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Nathan O + +pkgname=i7z +pkgver=0.27.1 +pkgrel=1 +pkgdesc="A better i7 (and now i3, i5) reporting tool for Linux" +arch=('i686' 'x86_64') +license=('GPL2') +depends=('ncurses') +makedepends=('qt') +optdepends=('qt: for i7z-gui') +url="http://code.google.com/p/i7z/" +source=("http://i7z.googlecode.com/files/${pkgname}-${pkgver}.tar.gz") +md5sums=('4408e0e39b195b8fe6383cadc971a862') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + make + + cd GUI + qmake + make clean + make +} +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + install -Dm 755 i7z ${pkgdir}/usr/bin/i7z + install -Dm 755 GUI/i7z_GUI ${pkgdir}/usr/bin/i7z-gui +} diff --git a/community/libbsd/LICENSE b/community/libbsd/LICENSE new file mode 100644 index 000000000..7dcbfc2ba --- /dev/null +++ b/community/libbsd/LICENSE @@ -0,0 +1,28 @@ +/*- + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ diff --git a/community/libbsd/PKGBUILD b/community/libbsd/PKGBUILD new file mode 100644 index 000000000..23bb96d5a --- /dev/null +++ b/community/libbsd/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Gerardo Exequiel Pozzi + +pkgname=libbsd +pkgver=0.3.0 +pkgrel=1 +pkgdesc="Provides useful functions commonly found on BSD systems like strlcpy()" +arch=('i686' 'x86_64') +url="http://libbsd.freedesktop.org" +license=('custom') +depends=('glibc') +source=(http://libbsd.freedesktop.org/releases/$pkgname-$pkgver.tar.gz + LICENSE) +md5sums=('833e58531b4bd84b119b53d834d8e0d8' + '5bd59ff83a7df4873b034478ffae62a6') + +build() { + cd $srcdir/$pkgname-$pkgver + + make exec_prefix=/usr includedir=/usr/include/libbsd +} + +package() { + cd $srcdir/$pkgname-$pkgver + + make exec_prefix=/usr includedir=/usr/include/libbsd DESTDIR=$pkgdir install + install -D -m644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE +} + +# vim:set ts=2 sw=2 et: diff --git a/community/libircclient/PKGBUILD b/community/libircclient/PKGBUILD index 50e1c02a8..4608c5424 100644 --- a/community/libircclient/PKGBUILD +++ b/community/libircclient/PKGBUILD @@ -1,20 +1,18 @@ # Maintainer: Bartłomiej Piotrowski -# Contributor: SpepS +# Maintainer: SpepS # Contributor: Marcel Wysocki # Contributor: coolkehon pkgname=libircclient -pkgver=1.3 -pkgrel=5 +pkgver=1.5 +pkgrel=1 pkgdesc="A small but powerful library, which implements client-server IRC protocol." arch=('i686' 'x86_64') -url="http://libircclient.sf.net" +url="http://www.ulduzsoft.com/libircclient/" depends=('glibc') -license=("GPL2") -source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz" - "shared.patch") -md5sums=('b0e80d1d6b0c1cc61660fb9d2350b32d' - 'f2c350d140bd522990c15162645c72f0') +license=('GPL') +source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz") +md5sums=('fd1f33181c50823f105df6400eb7746d') build() { cd "$srcdir/$pkgname-$pkgver" @@ -22,15 +20,36 @@ build() { # add fPIC flag for x86_64 [ "$CARCH" = x86_64 ] && export CFLAGS="$CFLAGS -fPIC" - # shared and path patch - patch -p1 -i ../shared.patch + ## Makefile.in fixes: + # invalid `lib` requisite for `install` target + # install shared lib instead of static + # headers in /usr/include/$pkgname + sed -e "/install/s/lib/all/" \ + -e "/DESTDIR/s/\.a/\.so/g" \ + -e "s/@\/include/&\/$pkgname/" \ + -i src/Makefile.in - ./configure --prefix=/usr - cd src && make CFLAGS="$CFLAGS" + ./configure --prefix=/usr \ + --enable-shared + + cd src && make CFLAGS="$CFLAGS" } package() { cd "$srcdir/$pkgname-$pkgver/src" make DESTDIR="$pkgdir/" install + + # doc + install -d "$pkgdir/usr/share/doc/$pkgname" + cp -a ../doc/{html,rfc1459.txt} \ + "$pkgdir/usr/share/doc/$pkgname" + + # man + cp -a ../doc/man "$pkgdir/usr/share" + + # examples (optional) + install -d "$pkgdir/usr/share/$pkgname/examples" + install -Dm644 ../examples/* \ + "$pkgdir/usr/share/$pkgname/examples" } diff --git a/community/nodejs/PKGBUILD b/community/nodejs/PKGBUILD index bae6527de..8ec1be501 100644 --- a/community/nodejs/PKGBUILD +++ b/community/nodejs/PKGBUILD @@ -6,7 +6,7 @@ # Contributor: TIanyi Cui pkgname=nodejs -pkgver=0.6.7 +pkgver=0.6.8 pkgrel=1 pkgdesc='Evented I/O for V8 javascript' arch=('i686' 'x86_64') @@ -17,16 +17,20 @@ checkdepends=('curl') # curl used for check() optdepends=('openssl: TLS support') options=('!emptydirs') source=("http://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.gz") -md5sums=('e7b238356ea7fb230b956010931ca468') +md5sums=('9fd7baa2d27b848c3134e6ae35bb87b2') build() { cd node-v${pkgver} msg 'fixing for python2 name' - find -type f -exec sed -e 's_^#!/usr/bin/env python$_&2_' -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' -e 's_^#!/usr/bin/python$_&2_' -i {} \; + find -type f -exec sed -e 's_^#!/usr/bin/env python$_&2_' -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' -e 's_^#!/usr/bin/python$_&2_' -e "s_'python'_'python2'_" -i {} \; + find test -type f -exec sed -e "s|python |python2 |" -i {} \; sed -i "s|cmd_R = 'python |cmd_R = 'python2 |" wscript sed -i "s|python |python2 |" Makefile find test -type f -exec sed -e 's/python/&2/' -i {} \; + sed -i "s/python/&2/" configure + + export PYTHON=python2 ./configure \ --prefix=/usr diff --git a/community/opensc/PKGBUILD b/community/opensc/PKGBUILD new file mode 100644 index 000000000..1da03752e --- /dev/null +++ b/community/opensc/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 62576 2012-01-21 15:54:56Z seblu $ +# Maintainer: Sébastien Luttringer +# Contributor: kevku + +pkgname=opensc +pkgver=0.12.2 +pkgrel=3 +pkgdesc='Access smart cards that support cryptographic operations' +arch=('x86_64' 'i686') +url='http://www.opensc-project.org/opensc/' +license=('LGPL') +backup=('etc/opensc.conf') +makedepends=('docbook-xsl') +depends=('openssl' 'pcsclite' 'libltdl') +options=('!libtool' '!emptydirs') +source=("http://www.opensc-project.org/files/$pkgname/$pkgname-$pkgver.tar.gz") +md5sums=('5116adea5f2f9f22fb9896965789144b') + +build() { + cd $pkgname-$pkgver + export LIBS=-lltdl + _sheetdir=(/usr/share/xml/docbook/xsl-stylesheets-*) + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-man \ + --enable-doc \ + --enable-readline \ + --enable-openssl \ + --enable-pcsc \ + --enable-zlib \ + --with-xsl-stylesheetsdir="$_sheetdir" + make +} + +package(){ + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install + install -D -m644 etc/opensc.conf "$pkgdir/etc/opensc.conf" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/par2cmdline/PKGBUILD b/community/par2cmdline/PKGBUILD new file mode 100644 index 000000000..9b37571a5 --- /dev/null +++ b/community/par2cmdline/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 62520 2012-01-20 16:52:42Z seblu $ +# Maintainer: Sébastien Luttringer + +pkgname=par2cmdline +pkgver=0.5.3 +pkgrel=1 +pkgdesc='A PAR 2.0 compatible file verification and repair tool' +url='https://github.com/BlackIkeEagle/par2cmdline' +license=('GPL2') +arch=('i686' 'x86_64') +source=("https://github.com/downloads/BlackIkeEagle/$pkgname/$pkgname-$pkgver.tar.xz") +md5sums=('708db095eac3d83f21ce27b8be123c54') + +build() { + cd ${pkgname}-${pkgver} + aclocal + automake --add-missing + autoconf + ./configure --prefix=/usr + make +} + +check() { + cd ${pkgname}-${pkgver} + make check +} + +package() { + cd ${pkgname}-${pkgver} + make DESTDIR="$pkgdir" install +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/community/pidgin-gfire/PKGBUILD b/community/pidgin-gfire/PKGBUILD new file mode 100644 index 000000000..9abfa1f83 --- /dev/null +++ b/community/pidgin-gfire/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Sven-Hendrik Haase +# Contributor: Slash +# Contributor: LookTJ + +pkgname=pidgin-gfire +pkgver=0.9.4 +pkgrel=3 +pkgdesc="Gfire is an Plugin for the Pidgin IM client which allows you to connect the Xfire network." +arch=('i686' 'x86_64') +url="http://gfireproject.org/" +license=('GPL') +depends=('glib2' 'libpurple' 'libnotify' 'gtk2') +makedepends=('pkgconfig' 'intltool' 'libtool') +source=("http://downloads.sourceforge.net/gfire/pidgin-gfire-$pkgver.tar.bz2" "gfire-libnotify.patch") +md5sums=('7167828fd77200603a318afdd4d9ebd2' + '5d6fc2b98837fbebba6bef2648699d5e') +options=(!libtool) + +build() { + cd "$srcdir/pidgin-gfire-$pkgver" + + patch -p0 -i ../gfire-libnotify.patch + ./autogen.sh + ./configure --prefix=/usr --enable-libnotify + make + make DESTDIR="$pkgdir" install +} diff --git a/community/pidgin-gfire/gfire-libnotify.patch b/community/pidgin-gfire/gfire-libnotify.patch new file mode 100644 index 000000000..51e744cd9 --- /dev/null +++ b/community/pidgin-gfire/gfire-libnotify.patch @@ -0,0 +1,21 @@ +--- src/gf_util.c 2011-03-14 21:19:46.987545000 +0100 ++++ src/gf_util.c 2011-04-18 03:36:24.970676551 +0200 +@@ -612,7 +612,7 @@ + if(!gfire_notify_init() || !p_title) + return; + +- NotifyNotification *notification = notify_notification_new(p_title, p_msg, NULL, NULL); ++ NotifyNotification *notification = notify_notification_new(p_title, p_msg, NULL); + notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL); + notify_notification_set_timeout(notification, NOTIFY_EXPIRES_DEFAULT); + g_signal_connect(notification, "closed", G_CALLBACK(gfire_notify_closed_cb), NULL); +@@ -637,7 +637,7 @@ + return; + } + +- notification = notify_notification_new(p_title, p_msg, NULL, NULL); ++ notification = notify_notification_new(p_title, p_msg, NULL); + + // Get Buddy Icon + PurpleBuddyIcon *icon = purple_buddy_get_icon(p_buddy); + diff --git a/community/python-memcached/PKGBUILD b/community/python-memcached/PKGBUILD index cd1a154f9..f9d01cbfe 100644 --- a/community/python-memcached/PKGBUILD +++ b/community/python-memcached/PKGBUILD @@ -2,16 +2,16 @@ # Contributor: Geoffroy Carrier # Contributor: Nathan Jones pkgname=python-memcached -pkgver=1.47 +pkgver=1.48 pkgrel=1 pkgdesc="A Python interface to memcached" -depends=('python2') -makedepends=('setuptools') -source=(ftp://ftp.tummy.com/pub/$pkgname/$pkgname-$pkgver.tar.gz LICENSE) url="ftp://ftp.tummy.com/pub/python-memcached/" -license=('Python') arch=('i686' 'x86_64') -md5sums=('e4e9d65e5721a1bb01f8d657ddf3f03e' +license=('Python') +source=(ftp://ftp.tummy.com/pub/$pkgname/$pkgname-$pkgver.tar.gz LICENSE) +makedepends=('setuptools') +depends=('python2') +md5sums=('58f8c328304df6aca1f8b60170e98932' '5286ea4c34766a357085694e0984f116') build() { diff --git a/community/python-mpi4py/PKGBUILD b/community/python-mpi4py/PKGBUILD index 670baf0dc..83574c743 100644 --- a/community/python-mpi4py/PKGBUILD +++ b/community/python-mpi4py/PKGBUILD @@ -1,17 +1,17 @@ -# $Id: PKGBUILD 60172 2011-12-06 14:17:13Z stephane $ +# $Id: PKGBUILD 62551 2012-01-21 03:26:53Z stephane $ # Maintainer : Stéphane Gaudreault # Contributor: Sebastien Binet pkgbase=python-mpi4py pkgname=('python-mpi4py' 'python2-mpi4py') -pkgver=1.2.2 -pkgrel=5 +pkgver=1.3 +pkgrel=1 arch=('i686' 'x86_64') url="http://mpi4py.scipy.org" license=('BSD') makedepends=('python' 'python2' 'python-distribute' 'python2-distribute' 'openmpi') source=(http://mpi4py.googlecode.com/files/mpi4py-${pkgver}.tar.gz) -sha1sums=('e08d09257794a85d010a22ad9bda9d1c89a6258f') +sha1sums=('282c1b9e35b242c9bd86126ebc5af6c70d8c2833') build() { cd "${srcdir}" diff --git a/community/roxterm/PKGBUILD b/community/roxterm/PKGBUILD index 7123e83fa..1630b5894 100644 --- a/community/roxterm/PKGBUILD +++ b/community/roxterm/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 62226 2012-01-18 16:36:56Z ttopper $ +# $Id: PKGBUILD 62568 2012-01-21 14:00:13Z ttopper $ # Maintainer: Thorsten Töpper # Contributor: Alexander Fehr pkgname=roxterm pkgver=2.4.2 -pkgrel=1 +pkgrel=2 pkgdesc="Tabbed, VTE-based terminal emulator" arch=('i686' 'x86_64') url="http://roxterm.sourceforge.net/" @@ -20,13 +20,13 @@ md5sums=('7c3bb1471f814a8bfdfcf169ad18e425') build() { cd "${srcdir}/roxterm-${pkgver}" - python2 mscript.py configure + python2 mscript.py configure --prefix="/usr" python2 mscript.py build } package() { cd "${srcdir}/roxterm-${pkgver}" - python2 mscript.py install --destdir=${pkgdir} --prefix="usr" + python2 mscript.py install --destdir="${pkgdir}" } # vim:set ts=2 sw=2 et: diff --git a/community/snort/PKGBUILD b/community/snort/PKGBUILD index 394ee7835..9a9a03107 100644 --- a/community/snort/PKGBUILD +++ b/community/snort/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 60676 2011-12-16 19:35:40Z lfleischer $ +# $Id: PKGBUILD 62466 2012-01-20 07:55:34Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: Hugo Doria # Contributor: Kessia 'even' Pinheiro @@ -6,7 +6,7 @@ # Contributor: Gregor Ibic pkgname=snort -pkgver=2.9.2 +pkgver=2.9.2.1 pkgrel=1 pkgdesc='A lightweight network intrusion detection system.' arch=('i686' 'x86_64') @@ -21,10 +21,10 @@ backup=('etc/conf.d/snort' 'etc/snort/classification.config') options=('!makeflags' '!libtool') install='snort.install' -source=('http://www.snort.org/downloads/1347' +source=('http://www.snort.org/downloads/1419' 'snort' 'snort.conf.d') -md5sums=('22fa07ba915535b151329056439ae194' +md5sums=('2f3e2b6ee72adbdfac73cb1c6c14bd61' '361b8b9e40b9af0164f6b3e3da2e8277' 'b4fb8a68490589cd34df93de7609bfac') -- cgit v1.2.3-54-g00ecf From c6c657b8bcf062b5d19eff6298b7754c11838080 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Jan 2012 23:15:06 +0000 Subject: Mon Jan 23 23:15:06 UTC 2012 --- community-staging/armagetronad/PKGBUILD | 42 + .../armagetronad/armagetronad.desktop | 11 + community-staging/armagetronad/gcc43.patch | 210 ++ community-staging/calibre/PKGBUILD | 73 + community-staging/calibre/calibre-mount-helper | 28 + community-staging/calibre/calibre.install | 12 + .../calibre/desktop_integration.patch | 68 + community-staging/critter/PKGBUILD | 42 + .../critter/criticalmass-1.0.2-libpng15.patch | 31 + community-staging/critter/critter-gcc43.patch | 69 + community-staging/critter/critter.desktop | 9 + community-staging/devil/PKGBUILD | 33 + community-staging/devil/devil.install | 11 + community-staging/devil/libpng14.patch | 33 + community-staging/metapixel/PKGBUILD | 32 + .../metapixel/metapixel-1.0.2-libpng-1.5.patch | 174 ++ community-staging/openttd/PKGBUILD | 38 + community-staging/openttd/openttd.install | 17 + community-staging/warzone2100/PKGBUILD | 29 + community/chromaprint/PKGBUILD | 26 + community/duplicity/PKGBUILD | 13 +- .../duplicity/duplicity-0.6.17-fix-memleak.patch | 29 + community/libfaketime/PKGBUILD | 16 +- .../libfaketime-0.9.1-fix-README-NEWS.patch | 29 + .../libfaketime-0.9.1-fix-as-needed.patch | 39 + community/libvisual-projectm/PKGBUILD | 38 +- .../libvisual-projectm-gcc-4.6.patch | 11 + community/picard/PKGBUILD | 7 +- core/mdadm/PKGBUILD | 18 +- core/udev/PKGBUILD | 16 +- .../PKGBUILD | 4 +- .../PKGBUILD | 2 +- .../PKGBUILD | 8 +- cross/mips64el-unknown-linux-gnu-binutils/PKGBUILD | 53 + cross/mips64el-unknown-linux-gnu-gcc/PKGBUILD | 292 ++ .../mips64el-unknown-linux-gnu-gcc/gcc-ada.install | 20 + .../gcc-fortran.install | 16 + .../mips64el-unknown-linux-gnu-gcc/gcc-go.install | 20 + .../gcc-hash-style-both.patch | 122 + .../gcc-libs.install | 16 + cross/mips64el-unknown-linux-gnu-gcc/gcc.install | 20 + .../gcc_mips64el_lib.patch | 25 + .../gcc_pure64.patch | 26 + cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD | 24 +- extra/gstreamer0.10-ffmpeg/PKGBUILD | 6 +- extra/gstreamer0.10-python/PKGBUILD | 6 +- extra/kdeplasma-applets-networkmanagement/PKGBUILD | 8 +- extra/libgee/PKGBUILD | 6 +- extra/poppler/PKGBUILD | 8 +- extra/sg3_utils/PKGBUILD | 6 +- extra/xterm/PKGBUILD | 6 +- multilib/lib32-kmod/PKGBUILD | 41 + multilib/lib32-udev/PKGBUILD | 11 +- staging/at-spi/PKGBUILD | 37 + staging/at-spi/at-spi.install | 17 + staging/cairomm/PKGBUILD | 27 + staging/gstreamer0.10-good/PKGBUILD | 54 + .../gstreamer0.10-good-plugins.install | 19 + staging/poppler/PKGBUILD | 8 +- staging/vlc/PKGBUILD | 74 + staging/vlc/vlc.install | 18 + ~mtjm/cups-usblp/PKGBUILD | 134 + ~mtjm/cups-usblp/cups | 68 + ~mtjm/cups-usblp/cups-avahi.patch | 3156 ++++++++++++++++++++ ~mtjm/cups-usblp/cups-no-export-ssllibs.patch | 12 + ~mtjm/cups-usblp/cups-no-gcrypt.patch | 38 + ~mtjm/cups-usblp/cups.install | 26 + ~mtjm/cups-usblp/cups.logrotate | 8 + ~mtjm/cups-usblp/cups.pam | 3 + 69 files changed, 5564 insertions(+), 85 deletions(-) create mode 100644 community-staging/armagetronad/PKGBUILD create mode 100644 community-staging/armagetronad/armagetronad.desktop create mode 100644 community-staging/armagetronad/gcc43.patch create mode 100644 community-staging/calibre/PKGBUILD create mode 100644 community-staging/calibre/calibre-mount-helper create mode 100644 community-staging/calibre/calibre.install create mode 100644 community-staging/calibre/desktop_integration.patch create mode 100644 community-staging/critter/PKGBUILD create mode 100644 community-staging/critter/criticalmass-1.0.2-libpng15.patch create mode 100644 community-staging/critter/critter-gcc43.patch create mode 100644 community-staging/critter/critter.desktop create mode 100644 community-staging/devil/PKGBUILD create mode 100644 community-staging/devil/devil.install create mode 100644 community-staging/devil/libpng14.patch create mode 100644 community-staging/metapixel/PKGBUILD create mode 100644 community-staging/metapixel/metapixel-1.0.2-libpng-1.5.patch create mode 100644 community-staging/openttd/PKGBUILD create mode 100644 community-staging/openttd/openttd.install create mode 100644 community-staging/warzone2100/PKGBUILD create mode 100644 community/chromaprint/PKGBUILD create mode 100644 community/duplicity/duplicity-0.6.17-fix-memleak.patch create mode 100644 community/libfaketime/libfaketime-0.9.1-fix-README-NEWS.patch create mode 100644 community/libfaketime/libfaketime-0.9.1-fix-as-needed.patch create mode 100644 community/libvisual-projectm/libvisual-projectm-gcc-4.6.patch create mode 100644 cross/mips64el-unknown-linux-gnu-binutils/PKGBUILD create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/PKGBUILD create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc-ada.install create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc-fortran.install create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc-go.install create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc-hash-style-both.patch create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc-libs.install create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc.install create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc_mips64el_lib.patch create mode 100644 cross/mips64el-unknown-linux-gnu-gcc/gcc_pure64.patch create mode 100644 multilib/lib32-kmod/PKGBUILD create mode 100644 staging/at-spi/PKGBUILD create mode 100644 staging/at-spi/at-spi.install create mode 100644 staging/cairomm/PKGBUILD create mode 100644 staging/gstreamer0.10-good/PKGBUILD create mode 100644 staging/gstreamer0.10-good/gstreamer0.10-good-plugins.install create mode 100644 staging/vlc/PKGBUILD create mode 100644 staging/vlc/vlc.install create mode 100644 ~mtjm/cups-usblp/PKGBUILD create mode 100644 ~mtjm/cups-usblp/cups create mode 100644 ~mtjm/cups-usblp/cups-avahi.patch create mode 100644 ~mtjm/cups-usblp/cups-no-export-ssllibs.patch create mode 100644 ~mtjm/cups-usblp/cups-no-gcrypt.patch create mode 100644 ~mtjm/cups-usblp/cups.install create mode 100644 ~mtjm/cups-usblp/cups.logrotate create mode 100644 ~mtjm/cups-usblp/cups.pam (limited to 'community') diff --git a/community-staging/armagetronad/PKGBUILD b/community-staging/armagetronad/PKGBUILD new file mode 100644 index 000000000..94dfc61af --- /dev/null +++ b/community-staging/armagetronad/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 62638 2012-01-23 01:56:45Z svenstaro $ +# Maintainer: Mateusz Herych +# Contributor: Filippo 'JoeyrS' Civiletti + +pkgname=armagetronad +pkgver=0.2.8.3.1 +pkgrel=3 +pkgdesc='A Tron Clone in 3D.' +arch=('i686' 'x86_64') +url='http://armagetronad.net/' +license=('GPL') +depends=('sdl_image' 'libxml2' 'sdl_mixer' 'mesa' 'ftgl') +source=(http://downloads.sourceforge.net/sourceforge/armagetronad/armagetronad-$pkgver.src.tar.gz + armagetronad.desktop + gcc43.patch) +md5sums=('ed8dbdec493de5cd4535a787f35eed1b' + '29d1b1231acadff12cf3014a3867ba5c' + '9045d99559ef33fc18136630e8de916c') + +build() { + cd armagetronad-$pkgver + + # python2 fix + sed -i 's_#!/usr/bin/python_#!/usr/bin/python2_' language/update.py + + sed -i 's|FTGL.h|ftgl.h|g' configure + sed -i 's|png_check_sig|png_sig_cmp|g' configure + patch -p1 < ../gcc43.patch + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --disable-games \ + --enable-automakedefaults + make + make DESTDIR=$pkgdir install + install -D -m 644 $srcdir/armagetronad.desktop $pkgdir/usr/share/applications/armagetronad.desktop + rm -rf $pkgdir/usr/share/applnk + rm $pkgdir/usr/bin/armagetronad-uninstall + mv $pkgdir/usr/bin/armagetronad $pkgdir/usr/bin/armagetronad_bin + printf "#!/bin/bash\n/usr/bin/armagetronad_bin --configdir /etc/armagetronad --datadir /usr/share/armagetronad" > $pkgdir/usr/bin/armagetronad + chmod +x $pkgdir/usr/bin/armagetronad +} diff --git a/community-staging/armagetronad/armagetronad.desktop b/community-staging/armagetronad/armagetronad.desktop new file mode 100644 index 000000000..125b4261d --- /dev/null +++ b/community-staging/armagetronad/armagetronad.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Armagetronad +GenericName=3D Tron clone +GenericName[pl]=Klon gry Tron w 3D +Exec=armagetronad +Icon=/usr/share/armagetronad/desktop/icons/small/armagetronad.png +Categories=Game; +Terminal=false +Type=Application +Encoding=UTF-8 +StartupNotify=false diff --git a/community-staging/armagetronad/gcc43.patch b/community-staging/armagetronad/gcc43.patch new file mode 100644 index 000000000..358f48221 --- /dev/null +++ b/community-staging/armagetronad/gcc43.patch @@ -0,0 +1,210 @@ +diff -ur a/src/network/md5.cpp b/src/network/md5.cpp +--- a/src/network/md5.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/network/md5.cpp 2009-08-24 20:21:51.000000000 +0200 +@@ -75,7 +75,7 @@ + */ + + #include "md5.h" +- ++#include + #include + #include + +Tylko w b/src/network: md5.cpp~ +diff -ur a/src/network/nNetwork.cpp b/src/network/nNetwork.cpp +--- a/src/network/nNetwork.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/network/nNetwork.cpp 2009-08-24 20:20:40.000000000 +0200 +@@ -24,7 +24,7 @@ + *************************************************************************** + + */ +- ++#include + #include "tMemManager.h" + #include "tInitExit.h" + #include "nSimulatePing.h" +Tylko w b/src/network: nNetwork.cpp~ +diff -ur a/src/network/nNetwork.h b/src/network/nNetwork.h +--- a/src/network/nNetwork.h 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/network/nNetwork.h 2009-08-24 20:21:18.000000000 +0200 +@@ -27,7 +27,7 @@ + + #ifndef ArmageTron_NET_H + #define ArmageTron_NET_H +- ++#include + #include "tError.h" + #include "tString.h" + #include "tHeap.h" +Tylko w b/src/network: nNetwork.h~ +diff -ur a/src/network/nSocket.h b/src/network/nSocket.h +--- a/src/network/nSocket.h 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/network/nSocket.h 2009-08-24 20:22:09.000000000 +0200 +@@ -33,7 +33,7 @@ + + #ifndef NET_SOCKET_H + #define NET_SOCKET_H +- ++#include + #include + #include "tConsole.h" + #include "tException.h" +Tylko w b/src/network: nSocket.h~ +diff -ur a/src/render/rModel.h b/src/render/rModel.h +--- a/src/render/rModel.h 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/render/rModel.h 2009-08-24 20:20:57.000000000 +0200 +@@ -27,7 +27,7 @@ + + #ifndef ArmageTron_MODEL_H + #define ArmageTron_MODEL_H +- ++#include + #include "defs.h" + #include "tArray.h" + #include "tLinkedList.h" +Tylko w b/src/render: rModel.h~ +diff -ur a/src/tools/tArray.cpp b/src/tools/tArray.cpp +--- a/src/tools/tArray.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tArray.cpp 2009-08-24 20:22:25.000000000 +0200 +@@ -27,7 +27,7 @@ + */ + + #define NO_MALLOC_REPLACEMENT +- ++#include + #include "tMemManager.h" + #include + #include +Tylko w b/src/tools: tArray.cpp~ +diff -ur a/src/tools/tCommandLine.cpp b/src/tools/tCommandLine.cpp +--- a/src/tools/tCommandLine.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tCommandLine.cpp 2009-08-24 20:24:19.000000000 +0200 +@@ -30,7 +30,7 @@ + #ifndef TCOMMANDLINE_H_INCLUDED + #include "tCommandLine.h" + #endif +- ++#include + #include "tLocale.h" + #include "tConfiguration.h" + #include "tException.h" +Tylko w b/src/tools: tCommandLine.cpp~ +diff -ur a/src/tools/tConfiguration.cpp b/src/tools/tConfiguration.cpp +--- a/src/tools/tConfiguration.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tConfiguration.cpp 2009-08-24 20:22:42.000000000 +0200 +@@ -24,7 +24,7 @@ + *************************************************************************** + + */ +- ++#include + #include "config.h" + #include + #include +Tylko w b/src/tools: tConfiguration.cpp~ +diff -ur a/src/tools/tCrypt.cpp b/src/tools/tCrypt.cpp +--- a/src/tools/tCrypt.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tCrypt.cpp 2009-08-24 20:22:54.000000000 +0200 +@@ -24,7 +24,7 @@ + *************************************************************************** + + */ +- ++#include + #include "tCrypt.h" + #include "tMemManager.h" + +Tylko w b/src/tools: tCrypt.cpp~ +diff -ur a/src/tools/tDirectories.cpp b/src/tools/tDirectories.cpp +--- a/src/tools/tDirectories.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tDirectories.cpp 2009-08-24 20:23:06.000000000 +0200 +@@ -27,7 +27,7 @@ + */ + + #include "config.h" +- ++#include + #include + #include + #include +Tylko w b/src/tools: tDirectories.cpp~ +diff -ur a/src/tools/tError.cpp b/src/tools/tError.cpp +--- a/src/tools/tError.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tError.cpp 2009-08-24 20:28:01.000000000 +0200 +@@ -24,8 +24,9 @@ + *************************************************************************** + + */ +- ++#include + #include "config.h" ++#include + #include + #if HAVE_UNISTD_H + #include +Tylko w b/src/tools: tError.cpp~ +diff -ur a/src/tools/tLocale.cpp b/src/tools/tLocale.cpp +--- a/src/tools/tLocale.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tLocale.cpp 2009-08-24 20:23:49.000000000 +0200 +@@ -30,7 +30,7 @@ + #include "tConsole.h" + #include "tDirectories.h" + #include "tSafePTR.h" +- ++#include + #include + #include + #include +Tylko w b/src/tools: tLocale.cpp~ +diff -ur a/src/tools/tMemManager.cpp b/src/tools/tMemManager.cpp +--- a/src/tools/tMemManager.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tMemManager.cpp 2009-08-24 20:24:42.000000000 +0200 +@@ -29,7 +29,7 @@ + #define NO_MALLOC_REPLACEMENT + + #include "defs.h" +- ++#include + #include + #include + #include // need basic C IO since STL IO does memory management +Tylko w b/src/tools: tMemManager.cpp~ +diff -ur a/src/tools/tRandom.cpp b/src/tools/tRandom.cpp +--- a/src/tools/tRandom.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tRandom.cpp 2009-08-24 20:24:31.000000000 +0200 +@@ -29,7 +29,7 @@ + #ifndef TRANDOM_H_INCLUDED + #include "tRandom.h" + #endif +- ++#include + #ifdef HAVE_STDLIB + #include + #endif +Tylko w b/src/tools: tRandom.cpp~ +diff -ur a/src/tools/tString.cpp b/src/tools/tString.cpp +--- a/src/tools/tString.cpp 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tools/tString.cpp 2009-08-24 20:24:03.000000000 +0200 +@@ -24,7 +24,7 @@ + *************************************************************************** + + */ +- ++#include + #include "tMemManager.h" + #include "tString.h" + #include "tLocale.h" +Tylko w b/src/tools: tString.cpp~ +diff -ur a/src/tron/gAIBase.h b/src/tron/gAIBase.h +--- a/src/tron/gAIBase.h 2009-08-24 20:08:14.000000000 +0200 ++++ b/src/tron/gAIBase.h 2009-08-24 20:21:33.000000000 +0200 +@@ -29,7 +29,7 @@ + #define ArmageTron_AIBASE_H + + #include "rSDL.h" +- ++#include + #include "eTimer.h" + #include "ePath.h" + #include "ePlayer.h" +Tylko w b/src/tron: gAIBase.h~ diff --git a/community-staging/calibre/PKGBUILD b/community-staging/calibre/PKGBUILD new file mode 100644 index 000000000..5f43241ff --- /dev/null +++ b/community-staging/calibre/PKGBUILD @@ -0,0 +1,73 @@ +# $Id: PKGBUILD 62598 2012-01-22 12:14:47Z giovanni $ +# Maintainer: Giovanni Scafora +# Contributor: Petrov Roman +# Contributor: Andrea Fagiani + +pkgname=calibre +pkgver=0.8.36 +pkgrel=3 +pkgdesc="Ebook management application" +arch=('i686' 'x86_64') +url="http://calibre-ebook.com/" +license=('GPL3') +depends=('python2-dateutil' 'python2-cssutils' 'python2-cherrypy' + 'python-mechanize' 'podofo' 'libwmf' 'python-beautifulsoup' + 'imagemagick' 'poppler-qt' 'chmlib' 'python-lxml' 'libusb' + 'python-imaging' 'desktop-file-utils' 'shared-mime-info' + 'python-dnspython' 'unrar' 'python2-pyqt' 'icu') +makedepends=('python2-pycountry') +optdepends=('ipython: to use calibre-debug') +install=calibre.install +source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz" + 'desktop_integration.patch' + 'calibre-mount-helper') +md5sums=('cc009c02fa0db088d074fef8b983e78a' + '253ce4fe5d01f8ff76b63cd3825755ea' + '675cd87d41342119827ef706055491e7') + +build() { + cd "${srcdir}/${pkgname}" + + #rm -rf src/{cherrypy,pyPdf} + rm -rf src/cherrypy + sed -i -e "s/ldflags = shlex.split(ldflags)/ldflags = shlex.split(ldflags) + ['-fPIC']/" setup/extensions.py + sed -i -e 's:\(#!/usr/bin/env[ ]\+python$\|#!/usr/bin/python$\):\12:g' \ + $(find . -regex ".*.py\|.*.recipe") + + python2 setup.py build +# python2 setup.py resources + python2 setup.py translations +} + +package() { + cd "${srcdir}/${pkgname}" + + patch -Np1 -i "${srcdir}/desktop_integration.patch" + + # More on desktop integration (e.g. enforce arch defaults) + sed -i -e "/self.create_uninstaller()/,/os.rmdir(config_dir)/d" \ + -e "s|self.opts.staging_sharedir, 'man/man1'|self.opts.staging_root, 'usr/share/man/man1'|" \ + -e "s|manpath, prog+'.1'+__appname__+'.bz2'|manpath, prog+'.1'+'.bz2'|" \ + -e "s|old_udev = '/etc|old_udev = '${pkgdir}/etc|" \ + -e "s/^Name=calibre/Name=Calibre/g" src/calibre/linux.py + + # Fix the environment module location + sed -i -e "s|(prefix=.*)|(prefix='$pkgdir/usr')|g" setup/install.py + + install -d "${pkgdir}/usr/lib/python2.7/site-packages" + python2 setup.py install --root="${pkgdir}" --prefix=/usr \ + --staging-bindir="${pkgdir}/usr/bin" \ + --staging-libdir="${pkgdir}/usr/lib" \ + --staging-sharedir="${pkgdir}/usr/share" + + find "${pkgdir}" -type d -empty -delete + + # Decompress the man pages so makepkg will do it for us. + for decom in "${pkgdir}"/usr/share/man/man1/*.bz2; do + bzip2 -d "${decom}" + done + + # See http://lwn.net/SubscriberLink/465311/7c299471a5399167/ + rm -rf ${pkgdir}/usr/bin/calibre-mount-helper + install -m 755 ${srcdir}/calibre-mount-helper "${pkgdir}/usr/bin" +} diff --git a/community-staging/calibre/calibre-mount-helper b/community-staging/calibre/calibre-mount-helper new file mode 100644 index 000000000..00cac4270 --- /dev/null +++ b/community-staging/calibre/calibre-mount-helper @@ -0,0 +1,28 @@ +#!/bin/sh -e +# Replacement for upstream mount helper using udisks/eject +# (C) 2010 Martin Pitt + +ACTION="$1" +DEV="$2" + +case "$ACTION" in + mount) + udisks --mount "$DEV" + + # check if mount worked. If not, fail + # udisks does return 0 even if mount failed + mount | grep -q "$DEV" || exit 0 + ;; + + eject) + eject "$DEV" + ;; + + cleanup) + ;; + + *) + echo "unknown action" >&2 + exit 1 +esac + diff --git a/community-staging/calibre/calibre.install b/community-staging/calibre/calibre.install new file mode 100644 index 000000000..6210bd0ab --- /dev/null +++ b/community-staging/calibre/calibre.install @@ -0,0 +1,12 @@ +post_install() { + update-desktop-database -q + update-mime-database usr/share/mime &> /dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community-staging/calibre/desktop_integration.patch b/community-staging/calibre/desktop_integration.patch new file mode 100644 index 000000000..4dbf53757 --- /dev/null +++ b/community-staging/calibre/desktop_integration.patch @@ -0,0 +1,68 @@ +--- a/src/calibre/linux.py 2011-06-17 19:56:05.000000000 +0200 ++++ b/src/calibre/linux.py 2011-06-18 00:07:46.000000000 +0200 +@@ -339,51 +339,39 @@ + + with TemporaryDirectory() as tdir: + with CurrentDir(tdir): +- render_img('mimetypes/lrf.png', 'calibre-lrf.png') +- check_call('xdg-icon-resource install --noupdate --context mimetypes --size 128 calibre-lrf.png application-lrf', shell=True) +- self.icon_resources.append(('mimetypes', 'application-lrf', '128')) +- check_call('xdg-icon-resource install --noupdate --context mimetypes --size 128 calibre-lrf.png text-lrs', shell=True) +- self.icon_resources.append(('mimetypes', 'application-lrs', +- '128')) +- render_img('lt.png', 'calibre-gui.png') +- check_call('xdg-icon-resource install --noupdate --size 128 calibre-gui.png calibre-gui', shell=True) +- self.icon_resources.append(('apps', 'calibre-gui', '128')) +- render_img('viewer.png', 'calibre-viewer.png') +- check_call('xdg-icon-resource install --size 128 calibre-viewer.png calibre-viewer', shell=True) +- self.icon_resources.append(('apps', 'calibre-viewer', '128')) ++ dir = os.path.join(self.opts.staging_sharedir,'../pixmaps') ++ os.mkdir(dir) ++ render_img('mimetypes/lrf.png', os.path.join(dir,'calibre-lrf.png')) ++ render_img('lt.png', os.path.join(dir, 'calibre-gui.png')) ++ render_img('viewer.png', os.path.join(dir, 'calibre-viewer.png')) + + mimetypes = set([]) + for x in all_input_formats(): + mt = guess_type('dummy.'+x)[0] +- if mt and 'chemical' not in mt and 'ctc-posml' not in mt: ++ if mt and 'chemical' not in mt and 'text' not in mt and 'pdf' not in mt and 'xhtml' not in mt: + mimetypes.add(mt) + + def write_mimetypes(f): + f.write('MimeType=%s;\n'%';'.join(mimetypes)) + +- f = open('calibre-lrfviewer.desktop', 'wb') ++ dir = os.path.join(self.opts.staging_sharedir,'../applications') ++ os.mkdir(dir) ++ f = open(os.path.join(dir, 'calibre-lrfviewer.desktop'), 'wb') + f.write(VIEWER) + f.close() +- f = open('calibre-ebook-viewer.desktop', 'wb') ++ f = open(os.path.join(dir, 'calibre-ebook-viewer.desktop'), 'wb') + f.write(EVIEWER) + write_mimetypes(f) + f.close() +- f = open('calibre-gui.desktop', 'wb') ++ f = open(os.path.join(dir, 'calibre-gui.desktop'), 'wb') + f.write(GUI) + write_mimetypes(f) + f.close() +- des = ('calibre-gui.desktop', 'calibre-lrfviewer.desktop', +- 'calibre-ebook-viewer.desktop') +- for x in des: +- cmd = ['xdg-desktop-menu', 'install', '--noupdate', './'+x] +- check_call(' '.join(cmd), shell=True) +- self.menu_resources.append(x) +- check_call(['xdg-desktop-menu', 'forceupdate']) +- f = open('calibre-mimetypes', 'wb') ++ dir = os.path.join(self.opts.staging_sharedir,'../mime/packages/') ++ os.makedirs(dir) ++ f = open(os.path.join(dir, 'calibre.xml'), 'wb') + f.write(MIME) + f.close() +- self.mime_resources.append('calibre-mimetypes') +- check_call('xdg-mime install ./calibre-mimetypes', shell=True) + except Exception: + if self.opts.fatal_errors: + raise diff --git a/community-staging/critter/PKGBUILD b/community-staging/critter/PKGBUILD new file mode 100644 index 000000000..429ab1ebf --- /dev/null +++ b/community-staging/critter/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 62631 2012-01-22 22:37:03Z lcarlier $ +# Contributor: Allan McRae +# Maintainer: Daniel J Griffiths + +pkgname=critter +_origname=CriticalMass +pkgver=1.0.2 +pkgrel=6 +pkgdesc="Critical Mass (aka Critter) is an SDL/OpenGL space shoot'em up game" +arch=('i686' 'x86_64') +url="http://sourceforge.net/projects/criticalmass" +license=('GPL') +depends=('sdl_image' 'sdl_mixer' 'mesa') +source=(http://downloads.sourceforge.net/sourceforge/criticalmass/$_origname-${pkgver}.tar.bz2 + critter-gcc43.patch + criticalmass-1.0.2-libpng15.patch + critter.desktop) +md5sums=('e2aff114bffa717fb79c82e1dc473ebe' + 'e936920acce56bfa3b0123ca8b1193a6' + '76448ba5b7a42aec8fd2a5d1bc31b8e2' + '98c17809aed964c445adad09827035df') + +build() { + cd ${srcdir}/$_origname-${pkgver} + + patch -Np1 -i ../critter-gcc43.patch + patch -Np0 -i ../criticalmass-1.0.2-libpng15.patch + sed -i 's|-lpng12|-lpng15|g' configure + + ./configure --prefix=/usr --mandir=/usr/share/man + make +} + +package() { + cd ${srcdir}/$_origname-${pkgver} + + make DESTDIR=${pkgdir} install + + install -Dm644 critter.png ${pkgdir}/usr/share/pixmaps/critter.png + install -Dm644 ../critter.desktop \ + ${pkgdir}/usr/share/applications/critter.desktop +} diff --git a/community-staging/critter/criticalmass-1.0.2-libpng15.patch b/community-staging/critter/criticalmass-1.0.2-libpng15.patch new file mode 100644 index 000000000..ac1b8c0c6 --- /dev/null +++ b/community-staging/critter/criticalmass-1.0.2-libpng15.patch @@ -0,0 +1,31 @@ +--- game/main.cpp ++++ game/main.cpp +@@ -28,6 +28,8 @@ + #include + #include + ++#include ++ + void migrateConfig( void) + { + //if onlineCheck is not set, default it to true +--- utilssdl/PNG.cpp ++++ utilssdl/PNG.cpp +@@ -45,7 +45,7 @@ + { + png_size_t check; + +- check = fwrite( data, 1, length, (FILE *)(png->io_ptr)); ++ check = fwrite( data, 1, length, (FILE *)(png_get_io_ptr(png))); + if( check != length) + { + png_error( png, "Write Error"); +@@ -72,7 +72,7 @@ + return false; + } + +- if( setjmp(_png->jmpbuf)) ++ if( setjmp(png_jmpbuf(_png))) + { + fclose( fp); + png_destroy_write_struct(&_png, (png_infopp)NULL); diff --git a/community-staging/critter/critter-gcc43.patch b/community-staging/critter/critter-gcc43.patch new file mode 100644 index 000000000..ade42d8e4 --- /dev/null +++ b/community-staging/critter/critter-gcc43.patch @@ -0,0 +1,69 @@ +diff -Naur CriticalMass-1.0.2-old/tinyxml/tinyxml.cpp CriticalMass-1.0.2/tinyxml/tinyxml.cpp +--- CriticalMass-1.0.2-old/tinyxml/tinyxml.cpp 2003-03-03 12:34:58.000000000 +1000 ++++ CriticalMass-1.0.2/tinyxml/tinyxml.cpp 2008-04-01 22:26:47.000000000 +1000 +@@ -22,7 +22,8 @@ + */ + + #include "tinyxml.h" +- ++#include ++#include + + TiXmlNode::TiXmlNode( NodeType _type ) + { +diff -Naur CriticalMass-1.0.2-old/tinyxml/tinyxmlparser.cpp CriticalMass-1.0.2/tinyxml/tinyxmlparser.cpp +--- CriticalMass-1.0.2-old/tinyxml/tinyxmlparser.cpp 2003-03-03 12:34:58.000000000 +1000 ++++ CriticalMass-1.0.2/tinyxml/tinyxmlparser.cpp 2008-04-01 22:27:02.000000000 +1000 +@@ -24,7 +24,7 @@ + + #include "tinyxml.h" + #include +- ++#include + const char* TiXmlBase::SkipWhiteSpace( const char* p ) + { + while ( p && *p && +diff -Naur CriticalMass-1.0.2-old/utils/ResourceManager.cpp CriticalMass-1.0.2/utils/ResourceManager.cpp +--- CriticalMass-1.0.2-old/utils/ResourceManager.cpp 2005-01-02 12:59:29.000000000 +1000 ++++ CriticalMass-1.0.2/utils/ResourceManager.cpp 2008-04-01 22:27:19.000000000 +1000 +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + #include + #include +diff -Naur CriticalMass-1.0.2-old/utils/Value.hpp CriticalMass-1.0.2/utils/Value.hpp +--- CriticalMass-1.0.2-old/utils/Value.hpp 2004-12-18 12:41:24.000000000 +1000 ++++ CriticalMass-1.0.2/utils/Value.hpp 2008-04-01 22:27:39.000000000 +1000 +@@ -17,6 +17,7 @@ + + #include + #include ++#include + + #include + +diff -Naur CriticalMass-1.0.2-old/utils/zStream.cpp CriticalMass-1.0.2/utils/zStream.cpp +--- CriticalMass-1.0.2-old/utils/zStream.cpp 2005-08-01 06:06:14.000000000 +1000 ++++ CriticalMass-1.0.2/utils/zStream.cpp 2008-04-01 22:28:03.000000000 +1000 +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + ofstream &operator<<( ofstream &outfile, Uint32 i) + { +diff -Naur CriticalMass-1.0.2-old/utils/zStreamBufferImplZLib.cpp CriticalMass-1.0.2/utils/zStreamBufferImplZLib.cpp +--- CriticalMass-1.0.2-old/utils/zStreamBufferImplZLib.cpp 2005-08-01 06:06:14.000000000 +1000 ++++ CriticalMass-1.0.2/utils/zStreamBufferImplZLib.cpp 2008-04-01 22:28:23.000000000 +1000 +@@ -14,6 +14,7 @@ + // + #include + #include ++#include + + bool ziStreamBufferImplZLib::init( void) + { diff --git a/community-staging/critter/critter.desktop b/community-staging/critter/critter.desktop new file mode 100644 index 000000000..ded5a9fbf --- /dev/null +++ b/community-staging/critter/critter.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Critical Mass +Comment=SDL/OpenGL space shoot'em up game +Exec=critter +Icon=critter +Terminal=false +Type=Application +StartupNotify=true +Categories=Game; diff --git a/community-staging/devil/PKGBUILD b/community-staging/devil/PKGBUILD new file mode 100644 index 000000000..11ed311ba --- /dev/null +++ b/community-staging/devil/PKGBUILD @@ -0,0 +1,33 @@ +# $Id: PKGBUILD 62634 2012-01-22 22:50:07Z lcarlier $ +# Maintainer: Laurent Carlier +# Contributor: damir +# Contributor: TheHoff + +pkgname=devil +pkgver=1.7.8 +pkgrel=10 +pkgdesc="Library for reading several different image formats" +arch=('i686' 'x86_64') +url="http://openil.sourceforge.net/" +depends=('libpng' 'libmng' 'jasper' 'lcms' 'openexr') +install=devil.install +options=('!libtool' '!docs' '!emptydirs') +license=('GPL') +source=(http://downloads.sourceforge.net/openil/DevIL-$pkgver.tar.gz libpng14.patch) +md5sums=('7918f215524589435e5ec2e8736d5e1d' + '0f839ccefd43b0ee8b4b3f99806147fc') + +build() { + cd ${srcdir}/devil-$pkgver + + patch -Np1 -i ${srcdir}/libpng14.patch + + ./configure --prefix=/usr --enable-ILU + make +} + +package() { + cd ${srcdir}/devil-$pkgver + + make prefix=${pkgdir}/usr install +} diff --git a/community-staging/devil/devil.install b/community-staging/devil/devil.install new file mode 100644 index 000000000..8336ac3d1 --- /dev/null +++ b/community-staging/devil/devil.install @@ -0,0 +1,11 @@ +infodir=usr/share/info + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/DevIL_manual.info.gz $infodir/dir 2> /dev/null +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/DevIL_manual.info.gz $infodir/dir 2> /dev/null +} diff --git a/community-staging/devil/libpng14.patch b/community-staging/devil/libpng14.patch new file mode 100644 index 000000000..b8434692b --- /dev/null +++ b/community-staging/devil/libpng14.patch @@ -0,0 +1,33 @@ +diff -Nur devil-1.7.8.orig/src-IL/src/il_icon.c devil-1.7.8/src-IL/src/il_icon.c +--- devil-1.7.8.orig/src-IL/src/il_icon.c 2009-03-08 09:10:09.000000000 +0200 ++++ devil-1.7.8/src-IL/src/il_icon.c 2010-01-17 00:54:09.000000000 +0200 +@@ -525,7 +525,7 @@ + + // Expand low-bit-depth grayscale images to 8 bits + if (ico_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { +- png_set_gray_1_2_4_to_8(ico_png_ptr); ++ png_set_expand_gray_1_2_4_to_8(ico_png_ptr); + } + + // Expand RGB images with transparency to full alpha channels +diff -Nur devil-1.7.8.orig/src-IL/src/il_png.c devil-1.7.8/src-IL/src/il_png.c +--- devil-1.7.8.orig/src-IL/src/il_png.c 2009-03-08 09:10:09.000000000 +0200 ++++ devil-1.7.8/src-IL/src/il_png.c 2010-01-17 00:55:26.000000000 +0200 +@@ -105,7 +105,7 @@ + Read = iread(Signature, 1, 8); + iseek(-Read, IL_SEEK_CUR); + +- return png_check_sig(Signature, 8); ++ return png_sig_cmp(Signature, 0, 8) == 0; + } + + +@@ -278,7 +278,7 @@ + + // Expand low-bit-depth grayscale images to 8 bits + if (png_color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8) { +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + } + + // Expand RGB images with transparency to full alpha channels diff --git a/community-staging/metapixel/PKGBUILD b/community-staging/metapixel/PKGBUILD new file mode 100644 index 000000000..7767059ee --- /dev/null +++ b/community-staging/metapixel/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 62646 2012-01-23 04:17:52Z lfleischer $ +# Maintainer: Lukas Fleischer +# Contributor: Daniel Isenmann + +pkgname=metapixel +pkgver=1.0.2 +pkgrel=3 +pkgdesc='A program for generating photomosaics.' +arch=('i686' 'x86_64') +url='http://www.complang.tuwien.ac.at/schani/metapixel/' +license=('GPL') +depends=('giflib' 'libjpeg' 'libpng' 'perl') +source=("http://www.complang.tuwien.ac.at/schani/metapixel/files/${pkgname}-${pkgver}.tar.gz" + 'metapixel-1.0.2-libpng-1.5.patch') +md5sums=('af5d77d38826756af213a08e3ada9941' + '1832a79790b07402735bfeb9f71f36e9') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p1 -i ../metapixel-1.0.2-libpng-1.5.patch + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + install -dm0755 "${pkgdir}/usr/share/man/man1" + + make PREFIX="${pkgdir}/usr" install +} diff --git a/community-staging/metapixel/metapixel-1.0.2-libpng-1.5.patch b/community-staging/metapixel/metapixel-1.0.2-libpng-1.5.patch new file mode 100644 index 000000000..ed787452f --- /dev/null +++ b/community-staging/metapixel/metapixel-1.0.2-libpng-1.5.patch @@ -0,0 +1,174 @@ +--- metapixel-1.0.2.orig/rwimg/rwpng.c ++++ metapixel-1.0.2/rwimg/rwpng.c +@@ -57,19 +57,39 @@ + data->end_info = png_create_info_struct(data->png_ptr); + assert(data->end_info != 0); + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + +- png_init_io(data->png_ptr, data->file); +- ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ png_init_io(data->png_ptr, data->file); ++ png_read_info(data->png_ptr, data->info_ptr); ++#else ++ png_init_io(data->png_ptr, data->file); + png_read_info(data->png_ptr, data->info_ptr); ++#endif + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ *width = png_get_image_width(data->png_ptr, data->info_ptr); ++ *height = png_get_image_height(data->png_ptr, data->info_ptr); ++ { ++ png_byte value = png_get_bit_depth(data->png_ptr, data->info_ptr); ++ assert(value == 8 || value == 16); ++ value = png_get_color_type(data->png_ptr, data->info_ptr); ++ assert(value == PNG_COLOR_TYPE_RGB || value == PNG_COLOR_TYPE_RGB_ALPHA); ++ value = png_get_interlace_type(data->png_ptr, data->info_ptr); ++ assert(value == PNG_INTERLACE_NONE); ++ } ++#else + *width = data->info_ptr->width; + *height = data->info_ptr->height; +- + assert(data->info_ptr->bit_depth == 8 || data->info_ptr->bit_depth == 16); + assert(data->info_ptr->color_type == PNG_COLOR_TYPE_RGB || data->info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA); + assert(data->info_ptr->interlace_type == PNG_INTERLACE_NONE); ++#endif + + data->have_read = 0; + +@@ -81,32 +101,51 @@ + { + png_data_t *data = (png_data_t*)_data; + int i; +- int bps, spp; ++ int bps, spp, width; + unsigned char *row; + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if(png_get_color_type(data->png_ptr, data->info_ptr) == PNG_COLOR_TYPE_RGB) ++#else + if (data->info_ptr->color_type == PNG_COLOR_TYPE_RGB) ++#endif + spp = 3; + else + spp = 4; + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if(png_get_bit_depth(data->png_ptr, data->info_ptr) == 16) ++#else + if (data->info_ptr->bit_depth == 16) ++#endif + bps = 2; + else + bps = 1; + +- row = (unsigned char*)malloc(data->info_ptr->width * spp * bps); ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ width = png_get_image_width(data->png_ptr, data->info_ptr); ++#else ++ width = data->info_ptr->width: ++#endif ++ ++ row = (unsigned char*)malloc(width * spp * bps); + + for (i = 0; i < num_lines; ++i) + { + int j, channel; + + png_read_row(data->png_ptr, (png_bytep)row, 0); +- for (j = 0; j < data->info_ptr->width; ++j) ++ for (j = 0; j < width; ++j) + for (channel = 0; channel < 3; ++channel) +- lines[i * data->info_ptr->width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps]; ++ lines[i * width * 3 + j * 3 + channel] = row[j * spp * bps + channel * bps]; + } + + free(row); +@@ -119,7 +158,11 @@ + { + png_data_t *data = (png_data_t*)_data; + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + + if (data->have_read) +@@ -148,7 +191,11 @@ + data->info_ptr = png_create_info_struct(data->png_ptr); + assert(data->info_ptr != 0); + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + + if (pixel_stride == 4) +@@ -156,6 +203,16 @@ + + png_init_io(data->png_ptr, data->file); + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ png_set_IHDR(data->png_ptr, data->info_ptr, ++ width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, ++ PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); ++ ++ /* Maybe does not need following. */ ++ png_set_tRNS(data->png_ptr, data->info_ptr, NULL, 0, NULL); ++ png_set_PLTE(data->png_ptr, data->info_ptr, NULL, 0); ++ png_set_invalid(data->png_ptr, data->info_ptr, 0); ++#else + data->info_ptr->width = width; + data->info_ptr->height = height; + data->info_ptr->valid = 0; +@@ -168,6 +225,7 @@ + data->info_ptr->compression_type = PNG_COMPRESSION_TYPE_DEFAULT; + data->info_ptr->filter_type = PNG_FILTER_TYPE_DEFAULT; + data->info_ptr->interlace_type = PNG_INTERLACE_NONE; ++#endif + + png_write_info(data->png_ptr, data->info_ptr); + +@@ -182,7 +240,11 @@ + png_data_t *data = (png_data_t*)_data; + int i; + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + + for (i = 0; i < num_lines; ++i) +@@ -194,7 +256,11 @@ + { + png_data_t *data = (png_data_t*)_data; + ++#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 ++ if (setjmp(png_jmpbuf((data->png_ptr)))) ++#else + if (setjmp(data->png_ptr->jmpbuf)) ++#endif + assert(0); + + png_write_end(data->png_ptr, data->info_ptr); diff --git a/community-staging/openttd/PKGBUILD b/community-staging/openttd/PKGBUILD new file mode 100644 index 000000000..ee2ec74e6 --- /dev/null +++ b/community-staging/openttd/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 62632 2012-01-22 22:37:56Z lcarlier $ +# Maintainer: Vesa Kaihlavirta + +pkgname=openttd +pkgver=1.1.5 +pkgrel=1 +pkgdesc='An engine for running Transport Tycoon Deluxe.' +arch=('i686' 'x86_64') +url='http://www.openttd.org' +license=('GPL') +depends=('libpng' 'sdl' 'icu' 'fontconfig' 'lzo2' 'hicolor-icon-theme' 'desktop-file-utils') +install=openttd.install +optdepends=('openttd-opengfx: free graphics' + 'openttd-opensfx: free soundset') +source=("http://binaries.openttd.org/releases/${pkgver}/${pkgname}-${pkgver}-source.tar.xz") +md5sums=('aea731c9f87c53955269446d580ee19e') + +build() { + cd ${pkgname}-${pkgver} + + ./configure \ + --prefix-dir=/usr \ + --binary-name=${pkgname} \ + --binary-dir=bin \ + --data-dir=share/${pkgname} \ + --install-dir=${pkgdir} \ + --doc-dir=share/doc/${pkgname} \ + --menu-name="OpenTTD" \ + --personal-dir=.${pkgname} + + make +} + +package() { + cd ${pkgname}-${pkgver} + + make install +} diff --git a/community-staging/openttd/openttd.install b/community-staging/openttd/openttd.install new file mode 100644 index 000000000..85b22a1c5 --- /dev/null +++ b/community-staging/openttd/openttd.install @@ -0,0 +1,17 @@ +post_install() { + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor > /dev/null 2>&1 + update-desktop-database > /dev/null 2>&1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + update-desktop-database > /dev/null 2>&1 +} + +post_remove() { + gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor > /dev/null 2>&1 + update-desktop-database > /dev/null 2>&1 +} diff --git a/community-staging/warzone2100/PKGBUILD b/community-staging/warzone2100/PKGBUILD new file mode 100644 index 000000000..0fe2c8341 --- /dev/null +++ b/community-staging/warzone2100/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 62625 2012-01-22 20:35:31Z lcarlier $ +# Maintainer: Vesa Kaihlavirta +# Contributor: Angelo Theodorou + +pkgname=warzone2100 +pkgver=2.3.9 +pkgrel=2 +pkgdesc="3D realtime strategy game on a future Earth" +url="http://wz2100.net/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('sdl_net' 'libgl' 'openal' 'libjpeg' 'libpng' 'libvorbis' 'libtheora' 'libmad' 'mesa' 'physfs' 'quesoglc' 'popt' 'ttf-dejavu') +makedepends=('gawk' 'bison' 'flex' 'zip' 'unzip') +source=("http://downloads.sourceforge.net/project/warzone2100/releases/${pkgver}/${pkgname}-${pkgver}.tar.gz") +md5sums=('7185090a089c9c0e0eca7535a8f25dca') + +build() { + cd ${pkgname}-${pkgver} + + ./configure --prefix=/usr --with-distributor="Arch linux" + + make +} + +package() { + cd ${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install +} diff --git a/community/chromaprint/PKGBUILD b/community/chromaprint/PKGBUILD new file mode 100644 index 000000000..ea7e1ef90 --- /dev/null +++ b/community/chromaprint/PKGBUILD @@ -0,0 +1,26 @@ +# $Id: PKGBUILD 62590 2012-01-22 09:25:04Z bisson $ +# Contributor: Wieland Hoffmann +# Maintainer: Gaetan Bisson + +pkgname=chromaprint +pkgver=0.6 +pkgrel=2 +pkgdesc='Library that implements a custom algorithm for extracting fingerprints from any audio source' +url='http://acoustid.org/chromaprint/' +arch=('i686' 'x86_64') +license=('LGPL') +depends=('ffmpeg') +makedepends=('cmake') +source=("https://github.com/downloads/lalinsky/${pkgname}/${pkgname}-${pkgver}.tar.gz") +sha1sums=('e8bcc1d0d8dfec86aa648b87ba3f69b6d589eae0') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_EXAMPLES=ON . + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/community/duplicity/PKGBUILD b/community/duplicity/PKGBUILD index adcaa6edb..955bd64db 100644 --- a/community/duplicity/PKGBUILD +++ b/community/duplicity/PKGBUILD @@ -1,19 +1,21 @@ -# $Id: PKGBUILD 60285 2011-12-08 22:52:59Z lfleischer $ +# $Id: PKGBUILD 62636 2012-01-23 00:53:34Z lfleischer $ # Maintainer: Kaiting Chen # Contributor: Aaron Schaefer pkgname=duplicity pkgver=0.6.17 -pkgrel=3 +pkgrel=4 pkgdesc='A utility for encrypted, bandwidth-efficient backups using the rsync algorithm' arch=('i686' 'x86_64') url='http://www.nongnu.org/duplicity/' license=('GPL') depends=('librsync' 'ncftp' 'python2' 'python-boto' 'python-gnupginterface') source=("http://savannah.nongnu.org/download/$pkgname/$pkgname-$pkgver.tar.gz" - 'botobackend.patch') + 'botobackend.patch' + 'duplicity-0.6.17-fix-memleak.patch') md5sums=('36423ab4e3b9aa90c5c44d9fa93fba0f' - '49bbdc327230fe5985d18eaae37eec0c') + '49bbdc327230fe5985d18eaae37eec0c' + 'b77e98d006842414fdda9662c8081d3b') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -27,6 +29,9 @@ build() { # add hotfix issued by upstream (FS#27390) patch -p0 -i ../botobackend.patch + # fix a memory leak (upstream bug #908228) + patch -p0 -i ../duplicity-0.6.17-fix-memleak.patch + python2 setup.py install --root="$pkgdir" --optimize=1 # fix broken documentation permissions until upstream does (FS#27301) diff --git a/community/duplicity/duplicity-0.6.17-fix-memleak.patch b/community/duplicity/duplicity-0.6.17-fix-memleak.patch new file mode 100644 index 000000000..1c4c8daff --- /dev/null +++ b/community/duplicity/duplicity-0.6.17-fix-memleak.patch @@ -0,0 +1,29 @@ +=== modified file 'duplicity/util.py' +--- duplicity/util.py 2011-08-23 18:14:17 +0000 ++++ duplicity/util.py 2012-01-20 21:50:01 +0000 +@@ -71,6 +71,10 @@ + else: + raise + ++class BlackHoleList(list): ++ def append(self, x): ++ pass ++ + class FakeTarFile: + debug = 0 + def __iter__(self): +@@ -83,7 +87,12 @@ + # yet. So we want to ignore ReadError exceptions, which are used to signal + # this. + try: +- return tarfile.TarFile("arbitrary", mode, fp) ++ tf = tarfile.TarFile("arbitrary", mode, fp) ++ # Now we cause TarFile to not cache TarInfo objects. It would end up ++ # consuming a lot of memory over the lifetime of our long-lasting ++ # signature files otherwise. ++ tf.members = BlackHoleList() ++ return tf + except tarfile.ReadError: + return FakeTarFile() + + diff --git a/community/libfaketime/PKGBUILD b/community/libfaketime/PKGBUILD index a95ab380d..447f4b364 100644 --- a/community/libfaketime/PKGBUILD +++ b/community/libfaketime/PKGBUILD @@ -1,20 +1,28 @@ -# $Id: PKGBUILD 47438 2011-05-23 06:26:34Z lfleischer $ +# $Id: PKGBUILD 62627 2012-01-22 21:34:26Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: Dan Serban # Contributor: Ross Melin pkgname=libfaketime -pkgver=0.8.1 +pkgver=0.9.1 pkgrel=1 pkgdesc='Report fake dates and times to programs without having to change the system-wide time.' arch=('i686' 'x86_64') url='http://www.code-wizards.com/projects/libfaketime/' license=('GPL2') -source=("http://www.code-wizards.com/projects/${pkgname}/${pkgname}-${pkgver}.tar.gz") -md5sums=('113d75d73e39f0f5022dc7385628d57c') +source=("http://www.code-wizards.com/projects/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'libfaketime-0.9.1-fix-as-needed.patch' + 'libfaketime-0.9.1-fix-README-NEWS.patch') +md5sums=('ce3f996dfd5826b4ac62f1a7cc36ea27' + '90873e4df35283463ef54b159c318686' + 'b1b641a8e2298aa1646982e3bde96117') build() { cd "${pkgname}-${pkgver}" + + patch -p1 -i ../libfaketime-0.9.1-fix-as-needed.patch + patch -p1 -i ../libfaketime-0.9.1-fix-README-NEWS.patch + make } diff --git a/community/libfaketime/libfaketime-0.9.1-fix-README-NEWS.patch b/community/libfaketime/libfaketime-0.9.1-fix-README-NEWS.patch new file mode 100644 index 000000000..3d47c5404 --- /dev/null +++ b/community/libfaketime/libfaketime-0.9.1-fix-README-NEWS.patch @@ -0,0 +1,29 @@ +From c0c19a71c5481f3082afee2ac7962bd7abfcf134 Mon Sep 17 00:00:00 2001 +From: Lukas Fleischer +Date: Sun, 22 Jan 2012 22:19:50 +0100 +Subject: [PATCH] Makefile: Fix installation of "README" and "NEWS" + +Initialize "INSTALL" in the top-level Makefile in order to avoid broken +install(1) invocations such as: + + dm0755 "/build/pkg/usr/share/doc/faketime/" + /bin/sh: dm0755: command not found + +Signed-off-by: Lukas Fleischer +--- + Makefile | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index f90e18e..d0225ba 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,3 +1,5 @@ ++INSTALL = install ++ + all: + $(MAKE) -C src all + $(MAKE) -C test all +-- +1.7.8.4 + diff --git a/community/libfaketime/libfaketime-0.9.1-fix-as-needed.patch b/community/libfaketime/libfaketime-0.9.1-fix-as-needed.patch new file mode 100644 index 000000000..870349145 --- /dev/null +++ b/community/libfaketime/libfaketime-0.9.1-fix-as-needed.patch @@ -0,0 +1,39 @@ +From f0ee2ee1e0a2fa5f11614a55ab8543380faa9695 Mon Sep 17 00:00:00 2001 +From: Lukas Fleischer +Date: Sun, 22 Jan 2012 21:47:52 +0100 +Subject: [PATCH] Fix linking with "-Wl,--as-needed" + +Reorder linker flags in order to ensure proper linking when using +"--Wl,--as-needed". Read http://www.gentoo.org/proj/en/qa/asneeded.xml, +especially "Importance of linking order" for details: + + Basically, what the linker does is look for the symbols missing in a + given file (either an object file, a static archive or a library) + only in the files coming after it. When using the normal linking, + without --as-needed, this is not a problem, although there might be + some internal drawbacks on the linking stage, the files are linked + together without considering ordering. But with the flag, the + libraries that aren't used for resolving symbols are discarded and + thus not linked. + +Signed-off-by: Lukas Fleischer +--- + src/Makefile | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 9118815..d4a04b5 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -69,7 +69,7 @@ ${OBJ}: faketime.c + ${CC} -o $@ -c ${CFLAGS} ${EXTRA_FLAGS} $< + + lib%.so.${SONAME}: %.o +- ${CC} -o $@ -Wl,-soname,$@ ${LDFLAGS} $< ++ ${CC} -o $@ -Wl,-soname,$@ $< ${LDFLAGS} + + clean: + @rm -f ${OBJ} ${LIBS} +-- +1.7.8.4 + diff --git a/community/libvisual-projectm/PKGBUILD b/community/libvisual-projectm/PKGBUILD index ea201188d..76635d757 100644 --- a/community/libvisual-projectm/PKGBUILD +++ b/community/libvisual-projectm/PKGBUILD @@ -1,26 +1,36 @@ -# $Id: PKGBUILD 61634 2009-12-20 18:27:47Z andrea $ +# $Id: PKGBUILD 62640 2012-01-23 02:32:15Z lfleischer $ +# Maintainer: Lukas Fleischer # Contributor: Alexander Baldeck pkgname=libvisual-projectm pkgver=2.0.1 -pkgrel=1 -pkgdesc="ProjectM XMMS plugin" +pkgrel=3 +pkgdesc='ProjectM XMMS plugin.' arch=('i686' 'x86_64') -url="http://projectm.sourceforge.net/" +url='http://projectm.sourceforge.net/' license=('GPL') depends=('projectm>=2.0.1' 'libvisual' 'sdl') makedepends=('pkgconfig' 'cmake' 'libxext') options=('!libtool') -source=(http://downloads.sourceforge.net/projectm/projectM_libvisual-${pkgver}-Source.tar.gz) -md5sums=('35e09b09210d48b437e3574bd00b15a8') +source=("http://downloads.sourceforge.net/projectm/projectM_libvisual-${pkgver}-Source.tar.gz" + 'libvisual-projectm-gcc-4.6.patch') +md5sums=('35e09b09210d48b437e3574bd00b15a8' + 'a1fa2fd4fc85b1f27e32d400e17a3196') build() { - cd ${srcdir} - mkdir build - cd build - cmake ../projectM_libvisual-${pkgver}-Source \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release || return 1 - make || return - make DESTDIR=${pkgdir} install || return + cd "${srcdir}" + + # fix build failure with GCC 4.6 (taken from SVN, revision 1355) + (cd "projectM_libvisual-${pkgver}-Source" && patch -p3 -i ../libvisual-projectm-gcc-4.6.patch) + + mkdir build && cd build + + cmake "../projectM_libvisual-${pkgver}-Source" \ + -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release + make +} + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}" install } diff --git a/community/libvisual-projectm/libvisual-projectm-gcc-4.6.patch b/community/libvisual-projectm/libvisual-projectm-gcc-4.6.patch new file mode 100644 index 000000000..0e1234f83 --- /dev/null +++ b/community/libvisual-projectm/libvisual-projectm-gcc-4.6.patch @@ -0,0 +1,11 @@ +--- trunk/src/projectM-libvisual/actor_projectM.cpp 2009/02/20 19:07:44 1210 ++++ trunk/src/projectM-libvisual/actor_projectM.cpp 2011/05/06 12:04:58 1355 +@@ -209,7 +209,7 @@ + * we aren't with projectm, so just ignore :) */ + extern "C" VisPalette *lv_projectm_palette (VisPluginData *plugin) + { +- return NULL; ++ return (VisPalette *) NULL; + } + + /* This is where the real rendering happens! This function is what we call, many times diff --git a/community/picard/PKGBUILD b/community/picard/PKGBUILD index 9937c04db..a93739555 100644 --- a/community/picard/PKGBUILD +++ b/community/picard/PKGBUILD @@ -1,17 +1,18 @@ -# $Id: PKGBUILD 58419 2011-11-12 17:18:36Z ibiru $ +# $Id: PKGBUILD 62594 2012-01-22 09:34:17Z bisson $ # Maintainer: Gaetan Bisson # Maintainer: Mateusz Herych # Contributor: sysrq pkgname=picard pkgver=0.16 -pkgrel=3 +pkgrel=4 pkgdesc='Official MusicBrainz tagger' url='http://musicbrainz.org/doc/MusicBrainz_Picard' license=('GPL') arch=('i686' 'x86_64') depends=('python2-pyqt' 'mutagen' 'libofa' 'ffmpeg') -optdepends=('libdiscid: CD-Lookup feature') +optdepends=('libdiscid: CD lookup' + 'chromaprint: fingerprinting') source=("http://ftp.musicbrainz.org/pub/musicbrainz/${pkgname}/${pkgname}-${pkgver}.tar.gz") sha1sums=('274071410550ee29051bb0137d72602921a015f9') diff --git a/core/mdadm/PKGBUILD b/core/mdadm/PKGBUILD index 790e9f4d0..5c7819708 100644 --- a/core/mdadm/PKGBUILD +++ b/core/mdadm/PKGBUILD @@ -1,13 +1,13 @@ -# $Id: PKGBUILD 138138 2011-09-17 10:36:09Z tpowa $ +# $Id: PKGBUILD 147125 2012-01-22 11:01:03Z tpowa $ # Maintainer: Tobias Powalowski # Contributor: Judd Vinet pkgname=mdadm -pkgver=3.2.2 -pkgrel=4 +pkgver=3.2.3 +pkgrel=1 pkgdesc="A tool for managing/monitoring Linux md device arrays, also known as Software RAID" arch=(i686 x86_64) license=('GPL') -url="http://www.cse.unsw.edu.au/~neilb/source/mdadm/" +url="http://neil.brown.name/blog/mdadm" groups=('base') conflicts=('mkinitcpio<0.7') depends=('glibc') @@ -18,23 +18,21 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/raid/mdadm/mdadm-$pkgver.tar.bz2 mdadm_install mdadm_hook mdadm_udev_install - disable-werror.patch - linux-3.0.patch) + disable-werror.patch) + install=mdadm.install replaces=('raidtools') -md5sums=('12ee2fbf3beddb60601fb7a4c4905651' +md5sums=('d789d6ecb9c1d5ebcc64f0fc52bca92f' '6df172c8f77b280018cf87eb3d313f29' '00cbed931db4f15b6ce49e3e7d433966' '9b01e96b6c3c218fb61628c9281fe688' 'c8c0713f5c7da51822ee6f3911473a1c' 'cd258e1bf430c02a25f40b4329df9f57' - '4ad87b74a4bc9a34621280abe0e0c3e4' - 'c499b3edbf2c400c8a1984e18c7ce7fa') + '4ad87b74a4bc9a34621280abe0e0c3e4') build() { cd $srcdir/$pkgname-$pkgver patch -Np0 -i ../disable-werror.patch - patch -Np1 -i ../linux-3.0.patch make CXFLAGS="$CFLAGS" # build static mdassemble for Arch's initramfs make MDASSEMBLE_AUTO=1 mdassemble diff --git a/core/udev/PKGBUILD b/core/udev/PKGBUILD index be706f13f..47ef4f793 100644 --- a/core/udev/PKGBUILD +++ b/core/udev/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 147038 2012-01-21 00:32:06Z dreisner $ +# $Id: PKGBUILD 147123 2012-01-22 11:00:58Z tpowa $ # Maintainer: Tom Gundersen # Contributor: Aaron Griffin # Contributor: Tobias Powalowski @@ -6,23 +6,20 @@ pkgbase="udev" pkgname=('udev' 'udev-compat') -pkgver=177 -pkgrel=3 +pkgver=178 +pkgrel=1 arch=(i686 x86_64) url="http://git.kernel.org/?p=linux/hotplug/udev.git;a=summary" license=('GPL') groups=('base') options=(!makeflags !libtool) makedepends=('gobject-introspection' 'gperf' 'libxslt' 'usbutils' 'kmod') -source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz - 0001-udevd-kill-hanging-event-processes-after-30-seconds.patch) +source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.tar.xz) +md5sums=('173cc6061e3a82dd6e9a1a5cf767a858') build() { cd $srcdir/$pkgbase-$pkgver - # deal with broken drivers waiting for firmware to be loaded - patch -p1 -i ../0001-udevd-kill-hanging-event-processes-after-30-seconds.patch - ./configure --prefix=/usr \ --with-rootprefix= \ --sysconfdir=/etc \ @@ -103,5 +100,4 @@ package_udev-compat() { mknod cpu/microcode c 10 184 } -md5sums=('b4e00faf8153fd7202a7ef609284b0c3' - '3e40dca1c4f8194b4633e3befb4da4d4') +md5sums=('173cc6061e3a82dd6e9a1a5cf767a858') diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD index 3c61dbfca..ca0ca775e 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core-shared/PKGBUILD @@ -16,7 +16,7 @@ pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (share url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') -depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl') +depends=('libmpc' 'sh' "${_target}-binutils" 'cloog' 'ppl') makedepends=("cross-${_target}-glibc-headers" "cross-${_target}-gcc-core") options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') @@ -28,7 +28,7 @@ build() { mkdir gcc-build && cd gcc-build mkdir ${_target} - Copy headers for libgcc2 +# Copy headers for libgcc2 cp -av /usr/${_target}/usr/include ${_target}/include CC_FOR_BUILD=${CHOST}-gcc \ diff --git a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD index da49a903f..831236d42 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-gcc-core/PKGBUILD @@ -16,7 +16,7 @@ pkgdesc="The GNU Compiler Collection for the MIPS/Loongson2f architecture (stati url="http://www.gnu.org/software/binutils/" arch=('i686' 'x86_64') license=('GPL') -depends=('libmpc' 'sh' "cross-${_target}-binutils" 'cloog' 'ppl') +depends=('libmpc' 'sh' "${_target}-binutils" 'cloog' 'ppl') options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') source=("ftp://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/${_pkgname}-${pkgver}.tar.bz2") md5sums=('028115c4fbfb6cfd75d6369f4a90d87e') diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD index a83a1238a..7fed7839a 100644 --- a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD +++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/PKGBUILD @@ -21,7 +21,7 @@ url="http://www.gnu.org/software/libc" license=('GPL' 'LGPL') groups=("${_target}-devel") depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata') -makedepends=("cross-${_target}-binutils" +makedepends=("${_target}-binutils" "cross-${_target}-gcc-core") options=('!strip') install=glibc.install @@ -187,8 +187,12 @@ package() { # This will help gcc-shared to find headers for libgcc2 msg2 "Symlinking headers" - rm -r ${pkgdir}${_sysroot}/include +# rm -r ${pkgdir}${_sysroot}/include ln -s ${_sysroot}/usr/include ${pkgdir}${_sysroot}/include + ln -s ${_sysroot}/usr/lib/crt1.o ${pkgdir}${_sysroot}/lib/ + ln -s ${_sysroot}/usr/lib/crti.o ${pkgdir}${_sysroot}/lib/ + ln -s ${_sysroot}/usr/lib/crtn.o ${pkgdir}${_sysroot}/lib/ + ln -s ${_sysroot}/usr/lib/libc.so ${pkgdir}${_sysroot}/lib/ } md5sums=('6ffdf5832192b92f98bdd125317c0dfc' diff --git a/cross/mips64el-unknown-linux-gnu-binutils/PKGBUILD b/cross/mips64el-unknown-linux-gnu-binutils/PKGBUILD new file mode 100644 index 000000000..0349036ec --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-binutils/PKGBUILD @@ -0,0 +1,53 @@ +# Contributor: Vojtech Horky + +_pkgname=binutils +_target="mips64el-unknown-linux-gnu" +_sysroot="/usr/${_target}" + +unset CFLAGS CXXFLAGS LDFLAGS + +pkgname=${_target}-binutils +pkgver=2.22 +pkgrel=1 +pkgdesc="A set of programs to assemble and manipulate binary and object files for the MIPS architecture" +url="http://www.gnu.org/software/binutils/" +arch=('i686' 'x86_64') +license=('GPL') +depends=('zlib') +provices=("cross-${pkgname}") +source=("ftp://ftp.gnu.org/gnu/binutils/${_pkgname}-${pkgver}.tar.bz2") +md5sums=('ee0f10756c84979622b992a4a61ea3f5') + +build() { + cd ${srcdir}/${_pkgname}-${pkgver} + + CFLAGS=" -pipe "\ + CXXFLAGS=" -pipe "\ + ./configure --build=${CHOST} \ + --host=${CHOST} \ + --target=${_target} \ + --prefix=/usr \ + --disable-nls \ + --disable-multilib \ + --disable-werror \ + --enable-ld=yes \ + --enable-gold=no \ + --with-sysroot=${_sysroot} + + make +} + +package() { + + cd ${srcdir}/${_pkgname}-${pkgver} +# Compat symlinks + ln -s ${_sysroot}/usr/lib ${pkgdir}${_sysroot}/lib + ln -s ${_sysroot}/lib ${pkgdir}${_sysroot}/lib32 + + make DESTDIR=${pkgdir} install + + rm -r ${pkgdir}/usr/{lib,share} + +# Create include dir so gcc-core doesn't complain + mkdir -p ${pkgdir}${_sysroot}/usr/include +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/PKGBUILD b/cross/mips64el-unknown-linux-gnu-gcc/PKGBUILD new file mode 100644 index 000000000..975db9f9d --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/PKGBUILD @@ -0,0 +1,292 @@ +# $Id: PKGBUILD 145914 2012-01-04 01:24:56Z allan $ +# Maintainer: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: libtool requires rebuilt with each new gcc version +_pkgname=gcc +_target="mips64el-unknown-linux-gnu" +_sysroot="/usr/${_target}" +_ARCH=mips + +unset LDFLAGS CFLAGS CXXFLAGS + +# Split package names must be changed manually +pkgname=("${_target}-gcc" "${_target}-gcc-libs" "${_target}-gcc-fortran" "${_target}-gcc-objc") # "gcc-ada" "gcc-go") +pkgver=4.6.2 +pkgrel=5 +_snapshot=4.6-20111223 +_libstdcppmanver=20111215 # Note: check source directory name when updating this +pkgdesc="The GNU Compiler Collection for MIPS/Loongson2f processors" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL' 'custom') +url="http://gcc.gnu.org" +makedepends=("${_target}-binutils>=2.22" "libmpc" "cloog" "ppl" + "cross-${_target}-gcc-core-shared" + "${_target}-glibc") +checkdepends=('dejagnu') +options=('!libtool' '!emptydirs' '!strip') +source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2 + gcc_pure64.patch + gcc_mips64el_lib.patch + gcc-hash-style-both.patch) + +if [ -n "${_snapshot}" ]; then + _basedir="${srcdir}/gcc-${_snapshot}" +else + _basedir="${srcdir}/gcc-${pkgver}" +fi + +build() { + if [ ${NOEXTRACT} -eq 0 ]; then + cd ${_basedir} + + # Do not install libiberty + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + if [ "${CARCH}" = "x86_64" ]; then + patch -Np1 -i ${srcdir}/gcc_pure64.patch + fi + patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch + patch -Np0 -i ${srcdir}/gcc_mips64el_lib.patch + + echo ${pkgver} > gcc/BASE-VER + + mkdir ${srcdir}/gcc-build + fi + + cd ${srcdir}/gcc-build + + CC_FOR_BUILD=${CHOST}-gcc \ + CFLAGS=" -pipe " \ + LDFLAGS= \ + CFLAGS_FOR_TARGET=" -EL -march=loongson2f -mabi=n32 " \ + CXXFLAGS_FOR_TARGET=" -EL -march=loongson2f -mabi=n32 " \ + LDFLAGS_FOR_TARGET=" -EL " \ + ${_basedir}/configure --prefix=/usr \ + --build=${CHOST} \ + --host=${CHOST} \ + --target=${_target} \ + --libexecdir=/usr/lib \ + --with-sysroot=${_sysroot} \ + --with-arch=loongson2f \ + --with-abi=n32 \ + --with-bugurl=https://bugs.parabolagnulinux.org/ \ + --enable-languages=c,c++,fortran,lto,objc,obj-c++ \ + --enable-shared \ + --enable-threads=posix \ + --with-system-zlib \ + --enable-__cxa_atexit \ + --disable-libunwind-exceptions \ + --enable-clocale=gnu \ + --enable-gnu-unique-object \ + --enable-linker-build-id \ + --with-ppl \ + --enable-cloog-backend=isl \ + --enable-lto \ + --enable-gold \ + --enable-ld=default \ + --enable-plugin \ + --with-plugin-ld=ld.gold \ + --disable-multilib \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --enable-checking=release + + make +} + +check() { + cd gcc-build + + # increase stack size to prevent test failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 + ulimit -s 32768 + + # do not abort on error as some are "expected" + make -k check || true + ${_basedir}/contrib/test_summary +} + + +package_mips64el-unknown-linux-gnu-gcc-libs() +{ + pkgdesc="Runtime libraries shipped by GCC" + groups=("${_target}-devel") + depends=("${_target}-glibc>=2.14") + install=gcc-libs.install + + cd gcc-build + make -j1 -C ${_target}/libgcc DESTDIR=${pkgdir} install-shared + for lib in libmudflap libgomp libstdc++-v3/src; do + make -j1 -C $_target/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES + done + make -j1 -C $_target/libstdc++-v3/po DESTDIR=${pkgdir} install + make -j1 -C $_target/libgomp DESTDIR=${pkgdir} install-info + + make -j1 DESTDIR=${pkgdir} install-target-libquadmath + make -j1 DESTDIR=${pkgdir} install-target-libgfortran + make -j1 DESTDIR=${pkgdir} install-target-libobjc + + # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc} + rm -rf ${pkgdir}${_sysroot}/usr/lib{,32}/{gcc/,libgfortran.spec} + + rm -rf ${pkgdir}/usr/share + + # remove static libraries + find ${pkgdir} -name *.a -delete + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/${_target}-gcc-libs/RUNTIME.LIBRARY.EXCEPTION +} + +package_mips64el-unknown-linux-gnu-gcc() +{ + pkgdesc="The GNU Compiler Collection - C and C++ frontends" + depends=("${_target}-gcc-libs=$pkgver-$pkgrel" "${_target}-binutils>=2.22" 'libmpc' 'cloog' 'ppl') + groups=("${_target}-devel") + replaces=("cross-${_target}-gcc-core" + "cross-${_target}-gcc-core-shared") + install=gcc.install + + cd gcc-build + + # unfortunately it is much, much easier to install the lot and clean-up the mess... + make -j1 DESTDIR=${pkgdir} install + + rm -rf ${pkgdir}/usr/share + + rm -f $pkgdir/usr/bin/{{$_target-,}gfortran,{$_target-,}gccgo,gnat*} + rm -f $pkgdir${_sysroot}/lib{,32}/*.so* + rm -f $pkgdir${_sysroot}/lib{,32}/lib{ffi,gfortran,go{,begin},objc,quadmath}.a + rm -f $pkgdir${_sysroot}/lib{,32}/libgfortran.spec + rm -rf $pkgdir/usr/lib{,32}/gcc/$_target/${pkgver}/{ada{include,lib},finclude,include/objc} + rm -f $pkgdir/usr/lib{,32}/gcc/$_target/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h} + rm -f $pkgdir/usr/lib{,32}/gcc/$_target/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a} + rm -rf $pkgdir/usr/lib{,32}/go + + # many packages require these symlinks + install -dm755 ${pkgdir}/lib + + ln -sf /usr/bin/cpp ${pkgdir}/lib/${_target}-cpp + ln -sf ${_target}-gcc ${pkgdir}/usr/bin/${_target}-cc + ln -sf ${_target}-g++ ${pkgdir}/usr/bin/${_target}-c++ + + # install gengtype for plugin support + install -m755 gcc/build/gengtype $pkgdir/usr/lib/gcc/$_target/${pkgver}/ + install -m644 gcc/gtype.state $pkgdir/usr/lib/gcc/$_target/${pkgver}/ + + # POSIX conformance launcher scripts for c89 and c99 + cat > $pkgdir/usr/bin/${_target}-c89 <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec mips64el-unknown-linux-gnu-gcc $fl ${1+"$@"} +EOF + + cat > $pkgdir/usr/bin/${_target}-c99 <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec mips64el-unknown-linux-gnu-gcc $fl ${1+"$@"} +EOF + + chmod 755 $pkgdir/usr/bin/${_target}-c{8,9}9 + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/${_target}-gcc/RUNTIME.LIBRARY.EXCEPTION +} + +package_mips64el-unknown-linux-gnu-gcc-fortran() +{ + pkgdesc="Fortran front-end for GCC" + depends=("${_target}-gcc=$pkgver-$pkgrel") + install=gcc-fortran.install + + cd gcc-build + make -j1 DESTDIR=${pkgdir} install-target-libquadmath + make -j1 DESTDIR=$pkgdir install-target-libgfortran + make -j1 -C $_target/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS + make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info} + install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$_target/$pkgver/f951 + + # remove libraries included in gcc-libs + rm -f ${pkgdir}${_sysroot}/lib{,32}/lib{gfortran,quadmath}.so* + rm -fr ${pkgdir}/usr/share + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/${_target}-gcc-fortran/RUNTIME.LIBRARY.EXCEPTION +} + +package_mips64el-unknown-linux-gnu-gcc-objc() +{ + pkgdesc="Objective-C front-end for GCC" + depends=("${_target}-gcc=$pkgver-$pkgrel") + + cd gcc-build + make -j1 DESTDIR=$pkgdir install-target-libobjc + install -dm755 $pkgdir/usr/lib/gcc/$_target/$pkgver/ + install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$_target/$pkgver/ + + # remove libraries included in gcc-libs + rm -f ${pkgdir}${_sysroot}/lib{,32}/libobjc.so* + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/${_target}-gcc-objc/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-ada() +{ + pkgdesc="Ada front-end for GCC (GNAT)" + depends=("${_target}-gcc=$pkgver-$pkgrel") + install=gcc-ada.install + + cd gcc-build/gcc + make -j1 DESTDIR=$pkgdir ada.install-{common,info} + install -m755 gnat1 $pkgdir/usr/lib/gcc/$_target/$pkgver + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-ada/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-go() +{ + pkgdesc="Go front-end for GCC" + depends=("${_target}-gcc=$pkgver-$pkgrel") + install=gcc-go.install + + cd gcc-build + make -j1 DESTDIR=$pkgdir install-target-libgo + make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info} + install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$_target/$pkgver/go1 + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-go/RUNTIME.LIBRARY.EXCEPTION +} +md5sums=('4755b9f6ac0abecbaa2097ed9738406a' + '450772ce32daed97d7383199f8797f33' + '4030ee1c08dd1e843c0225b772360e76' + '67e337993d821d72fccacbed52d48c34' + '4df25b623799b148a0703eaeec8fdf3f') diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc-ada.install b/cross/mips64el-unknown-linux-gnu-gcc/gcc-ada.install new file mode 100644 index 000000000..df0553a4f --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc-ada.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gnat-style.info gnat_rm.info gnat_ugn.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc-fortran.install b/cross/mips64el-unknown-linux-gnu-gcc/gcc-fortran.install new file mode 100644 index 000000000..b15d89a97 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc-fortran.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file="gfortran.info" + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc-go.install b/cross/mips64el-unknown-linux-gnu-gcc/gcc-go.install new file mode 100644 index 000000000..7dc50dee5 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc-go.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gccgo.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc-hash-style-both.patch b/cross/mips64el-unknown-linux-gnu-gcc/gcc-hash-style-both.patch new file mode 100644 index 000000000..8b59f4535 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc-hash-style-both.patch @@ -0,0 +1,122 @@ +--- gcc/config/alpha/linux-elf.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/alpha/linux-elf.h 2011-03-11 10:01:47.770000457 +1000 +@@ -41,7 +41,7 @@ + + #define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +--- gcc/config/i386/linux64.h.orig 2011-03-03 08:35:36.000000000 +1000 ++++ gcc/config/i386/linux64.h 2011-03-11 10:01:47.770000457 +1000 +@@ -78,7 +78,7 @@ + %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + + #undef LINK_SPEC +-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ ++#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- gcc/config/i386/linux.h.orig 2011-01-15 04:45:06.000000000 +1000 ++++ gcc/config/i386/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -104,7 +104,7 @@ + { "dynamic_linker", LINUX_DYNAMIC_LINKER } + + #undef LINK_SPEC +-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ ++#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- gcc/config/ia64/linux.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/ia64/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -64,7 +64,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "\ ++#define LINK_SPEC "--hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- gcc/config/rs6000/linux64.h.orig 2011-02-11 03:30:10.000000000 +1000 ++++ gcc/config/rs6000/linux64.h 2011-03-11 10:03:34.280000457 +1000 +@@ -389,11 +389,11 @@ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) + + +-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}" + +-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}" + +--- gcc/config/rs6000/sysv4.h.orig 2011-01-28 04:36:03.000000000 +1000 ++++ gcc/config/rs6000/sysv4.h 2011-03-11 10:01:47.773333792 +1000 +@@ -830,7 +830,7 @@ + #define LINUX_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "}}" + +--- gcc/config/s390/linux.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/s390/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -77,7 +77,7 @@ + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +--- gcc/config/sparc/linux64.h.orig 2011-02-17 23:57:21.000000000 +1000 ++++ gcc/config/sparc/linux64.h 2011-03-11 10:01:47.770000457 +1000 +@@ -113,7 +113,7 @@ + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + +-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ ++#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,%R/usr/lib %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -121,7 +121,7 @@ + %{static:-static}} \ + " + +-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ ++#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -193,7 +193,7 @@ + #else /* !SPARC_BI_ARCH */ + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ ++#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- gcc/config/sparc/linux.h.orig 2011-01-27 06:30:12.000000000 +1000 ++++ gcc/config/sparc/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -74,7 +74,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc-libs.install b/cross/mips64el-unknown-linux-gnu-gcc/gcc-libs.install new file mode 100644 index 000000000..23553b8f0 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc-libs.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +filelist=(libgomp.info libquadmath.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc.install b/cross/mips64el-unknown-linux-gnu-gcc/gcc.install new file mode 100644 index 000000000..3407a5e1f --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc_mips64el_lib.patch b/cross/mips64el-unknown-linux-gnu-gcc/gcc_mips64el_lib.patch new file mode 100644 index 000000000..425758e88 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc_mips64el_lib.patch @@ -0,0 +1,25 @@ +--- gcc/config/mips/t-linux64.orig 2011-04-09 20:28:51.729723495 -0300 ++++ gcc/config/mips/t-linux64 2011-04-09 20:29:06.913724013 -0300 +@@ -18,7 +18,7 @@ + + MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64 + MULTILIB_DIRNAMES = n32 32 64 +-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64 ++MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64 + + EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o + +--- gcc/config/mips/linux64.h.orig 2011-04-09 20:27:06.909723735 -0300 ++++ gcc/config/mips/linux64.h 2011-04-09 20:28:16.033723803 -0300 +@@ -35,9 +35,9 @@ + %{!shared: \ + %{profile:-lc_p} %{!profile:-lc}}" + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1" ++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1" +-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1" ++#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0" + #define LINUX_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32) diff --git a/cross/mips64el-unknown-linux-gnu-gcc/gcc_pure64.patch b/cross/mips64el-unknown-linux-gnu-gcc/gcc_pure64.patch new file mode 100644 index 000000000..8c0baf8e2 --- /dev/null +++ b/cross/mips64el-unknown-linux-gnu-gcc/gcc_pure64.patch @@ -0,0 +1,26 @@ +diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h +--- gcc-4.2.0.orig/gcc/config/i386/linux64.h 2007-05-16 19:21:19.000000000 -0400 ++++ gcc-4.2.0/gcc/config/i386/linux64.h 2007-05-18 17:04:05.000000000 -0400 +@@ -49,8 +49,8 @@ + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ +diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64 +--- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400 ++++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400 +@@ -6,7 +6,7 @@ + + MULTILIB_OPTIONS = m64/m32 + MULTILIB_DIRNAMES = 64 32 +-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) ++MULTILIB_OSDIRNAMES = ../lib ../lib32 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib diff --git a/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD index e5e37beee..18de66776 100644 --- a/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD +++ b/cross/mips64el-unknown-linux-gnu-glibc/PKGBUILD @@ -4,11 +4,21 @@ # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc # NOTE: valgrind requires rebuilt with each major glibc version +# NOTE: I had to run this after installing target-glibc to build target-gcc: +# for lib in /usr/${_target}/usr/lib/*; do +# ln -s ${lib} /usr/${_target}/lib/$(basename ${lib} +# done +# gcc build should probably add a -B flag to usr/lib instead + _pkgname=glibc _target="mips64el-unknown-linux-gnu" _sysroot="/usr/${_target}" _ARCH=mips +# Disable this after building final gcc +# Otherwise you'll get ld: missing libc.so errors +BOOTSTRAPING=true + unset CFLAGS CXXFLAGS LDFLAGS pkgname=${_target}-glibc @@ -21,7 +31,7 @@ url="http://www.gnu.org/software/libc" license=('GPL' 'LGPL') groups=("${_target}-devel") depends=("${_target}-linux-api-headers>=3.1.6" 'tzdata') -makedepends=("cross-${_target}-binutils" +makedepends=("${_target}-binutils" "cross-${_target}-gcc-core-shared" "cross-${_target}-glibc-headers") backup=(etc/gai.conf @@ -174,7 +184,7 @@ build() { # --libdir=${_sysroot}/usr/lib \ # --libexecdir=${_sysroot}/usr/lib \ - + # build libraries with hardening disabled echo "build-programs=no" >> configparms make @@ -202,6 +212,16 @@ package() { rm -f ${pkgdir}${_sysroot}/etc/ld.so.{cache,conf} +# Compat symlinks + ln -s ${_sysroot}/usr/lib ${pkgdir}${_sysroot}/lib + ln -s ${_sysroot}/lib ${pkgdir}${_sysroot}/lib32 + +# Fix libc.so to find correct libraries + if ${BOOTSTRAPING}; then + sed -i "s|/lib|${_sysroot}&|g" ${pkgdir}${_sysroot}/usr/lib/libc.so + sed -i "s|/lib|${_sysroot}&|g" ${pkgdir}${_sysroot}/usr/lib/libpthreads.so + fi + install -dm755 ${pkgdir}${_sysroot}/etc/rc.d install -dm755 ${pkgdir}${_sysroot}/usr/sbin install -dm755 ${pkgdir}${_sysroot}/usr/lib/locale diff --git a/extra/gstreamer0.10-ffmpeg/PKGBUILD b/extra/gstreamer0.10-ffmpeg/PKGBUILD index eed8e4f3d..0e4dade8f 100644 --- a/extra/gstreamer0.10-ffmpeg/PKGBUILD +++ b/extra/gstreamer0.10-ffmpeg/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 138452 2011-09-23 18:40:52Z ibiru $ +# $Id: PKGBUILD 147131 2012-01-22 11:26:07Z andyrtr $ # Maintainer: Jan de Groot pkgname=gstreamer0.10-ffmpeg -pkgver=0.10.12 +pkgver=0.10.13 pkgrel=1 pkgdesc="Gstreamer FFMpeg Plugin" arch=('i686' 'x86_64') @@ -13,7 +13,7 @@ url="http://www.gstreamer.net" groups=('gstreamer0.10-plugins') options=('!libtool') source=(http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-${pkgver}.tar.bz2) -sha256sums=('b17707102b4bfa5e0d5095be3608ee2d4388268eab822c9a0ce7a18011bdd73b') +sha256sums=('76fca05b08e00134e3cb92fa347507f42cbd48ddb08ed3343a912def187fbb62') build() { cd "${srcdir}/gst-ffmpeg-${pkgver}" diff --git a/extra/gstreamer0.10-python/PKGBUILD b/extra/gstreamer0.10-python/PKGBUILD index a4e6c86ec..2af9448a8 100644 --- a/extra/gstreamer0.10-python/PKGBUILD +++ b/extra/gstreamer0.10-python/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 109061 2011-02-05 16:24:50Z andyrtr $ +# $Id: PKGBUILD 147133 2012-01-22 11:30:42Z andyrtr $ # Maintainer: Jan de Groot pkgname=gstreamer0.10-python -pkgver=0.10.21 +pkgver=0.10.22 pkgrel=1 pkgdesc="Python bindings for GStreamer 0.10" arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ depends=('pygobject>=2.20.0' 'gstreamer0.10-base>=0.10.32') makedepends=('pkgconfig') options=('!libtool') source=(http://gstreamer.freedesktop.org/src/gst-python/gst-python-${pkgver}.tar.bz2) -md5sums=('31340ae3e877797a10d088a226d74b16') +md5sums=('937152fe896241f827689f4b53e79b22') build() { cd "${srcdir}/gst-python-${pkgver}" diff --git a/extra/kdeplasma-applets-networkmanagement/PKGBUILD b/extra/kdeplasma-applets-networkmanagement/PKGBUILD index 8dd7c0a3a..4b83ae0f5 100644 --- a/extra/kdeplasma-applets-networkmanagement/PKGBUILD +++ b/extra/kdeplasma-applets-networkmanagement/PKGBUILD @@ -4,12 +4,12 @@ pkgname=kdeplasma-applets-networkmanagement epoch=1 -pkgver=0.9.0rc3 -_pkgver=0.8.98 +pkgver=0.9.0rc4 +_pkgver=0.8.99 pkgrel=1 pkgdesc="KDE control panel and widget network connections" arch=('i686' 'x86_64') -url="http://www.kde.org/" +url='https://projects.kde.org/projects/extragear/base/networkmanagement' license=('GPL') depends=('kdebase-workspace' 'networkmanager') makedepends=('cmake' 'python2' 'automoc4' 'mobile-broadband-provider-info' @@ -18,7 +18,7 @@ optdepends=('mobile-broadband-provider-info: Database of mobile broadband servic 'openconnect: Cisco AnyConnect compatible VPN client') install=${pkgname}.install source=("http://download.kde.org/unstable/networkmanagement/${_pkgver}/src/networkmanagement-${_pkgver}.tar.bz2") -sha1sums=('f46274c4cca722f37eef7418144c0c04bfe21e24') +sha1sums=('18d625a25b90f9591a5cfdabcf77269eb3ba33e0') build() { cd "${srcdir}" diff --git a/extra/libgee/PKGBUILD b/extra/libgee/PKGBUILD index 8dc909b3d..6e974845c 100644 --- a/extra/libgee/PKGBUILD +++ b/extra/libgee/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 142433 2011-11-09 18:26:23Z ibiru $ +# $Id: PKGBUILD 147137 2012-01-22 20:17:23Z ibiru $ # Maintainer : Ionut Biru # Contributor: Sergej Pupykin pkgname=libgee -pkgver=0.6.3 +pkgver=0.6.4 pkgrel=1 pkgdesc="GObject collection library" url="http://live.gnome.org/Libgee" @@ -13,7 +13,7 @@ depends=('glib2') makedepends=('gobject-introspection') options=('!libtool') source=(http://ftp.gnome.org/pub/GNOME/sources/libgee/0.6/$pkgname-$pkgver.tar.xz) -sha256sums=('6b1ef59e26dd10feed279fdd7cc49c3391e124d31c46ac56c410ba0ce3bd1716') +sha256sums=('55f39f3b28e676f6cbd9377d83edd031084436a4da41280a9503c94faffb1665') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/extra/poppler/PKGBUILD b/extra/poppler/PKGBUILD index bb1327fdd..bda699447 100644 --- a/extra/poppler/PKGBUILD +++ b/extra/poppler/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 145182 2011-12-19 11:45:17Z jgc $ +# $Id: PKGBUILD 147127 2012-01-22 11:06:04Z andyrtr $ # Maintainer: Jan de Groot pkgbase=poppler pkgname=('poppler' 'poppler-glib' 'poppler-qt') -pkgver=0.18.2 +pkgver=0.18.3 pkgrel=1 arch=(i686 x86_64) license=('GPL') @@ -14,14 +14,14 @@ _testtag=0d2bfd4af4c76a3bac27ccaff793d9129df7b57a source=(http://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.gz http://cgit.freedesktop.org/poppler/test/snapshot/test-${_testtag}.tar.bz2 git-fixes.patch) -md5sums=('38616927823ef01937aab26872e957e4' +md5sums=('d70d2d63d8acd29c97185f7e5f09c9b4' '9dc64c254a31e570507bdd4ad4ba629a' 'af56b7b1b24a08f7498a0c7f5e862b93') build() { cd "${srcdir}/${pkgbase}-${pkgver}" sed -i -e '/AC_PATH_XTRA/d' configure.ac - patch -Np1 -i "${srcdir}/git-fixes.patch" + #patch -Np1 -i "${srcdir}/git-fixes.patch" autoreconf -fi diff --git a/extra/sg3_utils/PKGBUILD b/extra/sg3_utils/PKGBUILD index eca1068a5..7392bd2d6 100644 --- a/extra/sg3_utils/PKGBUILD +++ b/extra/sg3_utils/PKGBUILD @@ -1,8 +1,8 @@ -#$Id: PKGBUILD 109019 2011-02-05 11:24:51Z andyrtr $ +#$Id: PKGBUILD 147121 2012-01-22 10:55:51Z andyrtr $ # Maintainer: Daniel Isenmann pkgname=sg3_utils -pkgver=1.30 +pkgver=1.33 pkgrel=1 pkgdesc="Generic SCSI utilities" arch=(i686 x86_64) @@ -11,7 +11,7 @@ license=('GPL' 'custom:BSD') depends=('glibc') options=('!libtool') source=(http://sg.danny.cz/sg/p/${pkgname}-${pkgver}.tgz) -md5sums=('8acb9328abe17d012db8c5f95f1d7d75') +md5sums=('261e39f7161337330ba6bd57999be801') build() { cd "${srcdir}/${pkgname}-${pkgver}" diff --git a/extra/xterm/PKGBUILD b/extra/xterm/PKGBUILD index 77c59507d..d9a74afbd 100644 --- a/extra/xterm/PKGBUILD +++ b/extra/xterm/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 145186 2011-12-19 11:53:19Z jgc $ +# $Id: PKGBUILD 147119 2012-01-22 10:53:02Z andyrtr $ # Maintainer: Jan de Groot # Contributor: Alexander Baldeck pkgname=xterm -pkgver=276 +pkgver=278 pkgrel=1 pkgdesc="X Terminal Emulator" arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ license=('custom') depends=('libxft' 'libxaw' 'ncurses' 'xorg-luit' 'xbitmaps') source=(ftp://invisible-island.net/${pkgname}/${pkgname}-${pkgver}.tgz LICENSE) -md5sums=('50ca8ee40e8a0992019f8f35042c9abb' +md5sums=('3eeddfe35cb0a2db1924cfe0c20be443' '10ecc3f8ee91e3189863a172f68282d2') build() { diff --git a/multilib/lib32-kmod/PKGBUILD b/multilib/lib32-kmod/PKGBUILD new file mode 100644 index 000000000..5f860b7b3 --- /dev/null +++ b/multilib/lib32-kmod/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 146696 2012-01-16 19:19:14Z dreisner $ +# Maintainer: Dave Reisner + +pkgname=lib32-kmod +_pkgbasename=kmod +pkgver=4 +pkgrel=1 +pkgdesc="Linux kernel module handling" +arch=('x86_64') +url="http://git.profusion.mobi/cgit.cgi/kmod.git" +license=('GPL2') +depends=('lib32-glibc' 'lib32-zlib' "$_pkgbasename") +makedepends=('gcc-multilib') +options=('!libtool') +source=("http://packages.profusion.mobi/$_pkgbasename/$_pkgbasename-$pkgver.tar.xz") +md5sums=('e14450a066a48accd0af1995b3c0232d') + +build() { + cd "$_pkgbasename-$pkgver" + + export CC="gcc -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + + ./configure \ + --libdir=/usr/lib32 \ + --sysconfdir=/etc \ + --disable-tools \ + --with-rootprefix= \ + --with-zlib + + make +} + +package() { + make -C "$_pkgbasename-$pkgver" DESTDIR="$pkgdir" install + + # nuke manpages and headers + rm -rf "$pkgdir"/usr/{share,include,bin} +} + +# vim: ft=sh syn=sh et diff --git a/multilib/lib32-udev/PKGBUILD b/multilib/lib32-udev/PKGBUILD index 36240f6c1..a99efb154 100644 --- a/multilib/lib32-udev/PKGBUILD +++ b/multilib/lib32-udev/PKGBUILD @@ -1,21 +1,20 @@ -# $Id: PKGBUILD 60965 2011-12-19 19:41:38Z lcarlier $ +# $Id: PKGBUILD 62609 2012-01-22 19:02:33Z lcarlier $ # Maintainer: Aaron Griffin # Maintainer: Tobias Powalowski # Maintainer: Thomas Bächler pkgname=('lib32-udev') -pkgver=175 +pkgver=178 pkgrel=1 arch=('x86_64') pkgdesc="The userspace dev tools (udev) (32-bit)" url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" license=('GPL') options=(!makeflags !libtool) -depends=('lib32-glibc' 'lib32-glib2' 'lib32-acl' 'lib32-libusb-compat' 'udev') +depends=('lib32-glibc' 'lib32-glib2' 'lib32-acl' 'lib32-libusb-compat' 'lib32-kmod' 'lib32-util-linux' 'udev') makedepends=('gcc-multilib' 'gperf') -#source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev-$pkgver.tar.bz2) -source=(http://people.freedesktop.org/~kay/udev/udev-$pkgver.tar.bz2) -md5sums=('2fc9c1efcbde98e3d73ffee7a77aea47') +source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/udev-$pkgver.tar.xz) +md5sums=('173cc6061e3a82dd6e9a1a5cf767a858') build() { export CC="gcc -m32" diff --git a/staging/at-spi/PKGBUILD b/staging/at-spi/PKGBUILD new file mode 100644 index 000000000..8cb6c20e9 --- /dev/null +++ b/staging/at-spi/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 147108 2012-01-22 10:16:03Z andyrtr $ +# Maintainer: Jan de Groot + +pkgname=at-spi +pkgver=1.32.0 +pkgrel=5 +pkgdesc="Assistive Technology Service Provider Interface" +arch=('i686' 'x86_64') +license=('GPL') +depends=('libbonobo' 'libxtst' 'gtk2' 'gconf') +makedepends=('pkgconfig' 'python2' 'intltool' 'libice' 'libsm') +options=('!libtool' '!emptydirs') +url="http://www.gnome.org" +install=at-spi.install +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/1.32/${pkgname}-${pkgver}.tar.bz2) +sha256sums=('cc841dea746413eebadf0710dabec741450b37a06821c34526f505fe9d027039') + +# !! make sure you 'pacman -Rsc python' from your chroot before building the package or it would use python3 instead of the wanted python2 !! + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static \ + --libexecdir=/usr/lib/at-spi \ + --enable-relocate + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain at-spi "${pkgdir}"/etc/gconf/schemas/*.schemas + rm -f "${pkgdir}"/etc/gconf/schemas/*.schemas +} diff --git a/staging/at-spi/at-spi.install b/staging/at-spi/at-spi.install new file mode 100644 index 000000000..b4c75b51c --- /dev/null +++ b/staging/at-spi/at-spi.install @@ -0,0 +1,17 @@ +pkgname=at-spi + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} +} + +pre_upgrade() { + pre_remove $1 +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} diff --git a/staging/cairomm/PKGBUILD b/staging/cairomm/PKGBUILD new file mode 100644 index 000000000..d8c952616 --- /dev/null +++ b/staging/cairomm/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 147110 2012-01-22 10:23:49Z andyrtr $ +# Maintainer: Kevin +# Contributor: criminy + +pkgname=cairomm +pkgver=1.10.0 +pkgrel=2 +pkgdesc="C++ bindings to Cairo vector graphics library" +arch=('i686' 'x86_64') +url="http://www.cairographics.org" +license=('LGPL' 'MPL') +depends=('cairo' 'libsigc++') +makedepends=('pkgconfig') +source=(http://www.cairographics.org/releases/${pkgname}-${pkgver}.tar.gz) +options=('!libtool' '!emptydirs') +sha1sums=('f08bf8a331067f0d1e876523f07238fba6b26b99') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/gstreamer0.10-good/PKGBUILD b/staging/gstreamer0.10-good/PKGBUILD new file mode 100644 index 000000000..66e079f98 --- /dev/null +++ b/staging/gstreamer0.10-good/PKGBUILD @@ -0,0 +1,54 @@ +# $Id: PKGBUILD 147113 2012-01-22 10:40:14Z andyrtr $ +# Maintainer: Jan de Groot + +pkgbase=gstreamer0.10-good +pkgname=('gstreamer0.10-good' 'gstreamer0.10-good-plugins') +pkgver=0.10.30 +pkgrel=2 +arch=('i686' 'x86_64') +license=('LGPL') +makedepends=('intltool' 'pkgconfig' 'gstreamer0.10-base>=0.10.34' 'libavc1394' 'libiec61883' 'aalib' 'libshout' 'libdv' 'flac' 'gconf' 'wavpack' 'taglib' 'libsoup-gnome' 'v4l-utils' 'libcaca' 'bzip2' 'gdk-pixbuf2' 'libpulse' 'jack' 'udev') +url="http://gstreamer.freedesktop.org/" +options=(!libtool !emptydirs) +source=(${url}/src/gst-plugins-good/gst-plugins-good-${pkgver}.tar.bz2) +sha256sums=('b12cba90b27d8423cd0a808939098d19db3996cfb9bf528507c6321782e095f6') + +build() { + cd "${srcdir}/gst-plugins-good-${pkgver}" + sed -i '/AC_PATH_XTRA/d' configure.ac + autoreconf + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --disable-schemas-install \ + --disable-hal \ + --disable-esd \ + --with-package-name="GStreamer Good Plugins (Archlinux)" \ + --with-package-origin="http://www.archlinux.org/" + + make + sed -e 's/gst sys ext/gst/' -i Makefile +} + +package_gstreamer0.10-good() { + depends=('gstreamer0.10-base>=0.10.34' 'bzip2') + pkgdesc="GStreamer Multimedia Framework Good plugin libraries" + + cd "${srcdir}/gst-plugins-good-${pkgver}" + make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + rm -rf "${pkgdir}/etc/gconf" +} + +package_gstreamer0.10-good-plugins() { + depends=("gstreamer0.10-good=${pkgver}" 'libavc1394' 'libiec61883' 'aalib' 'libshout' 'libdv' 'flac' 'gconf' 'wavpack' 'taglib' 'libsoup-gnome' 'v4l-utils' 'libcaca' 'libpng' 'libjpeg' 'jack' 'libpulse' 'udev') + pkgdesc="GStreamer Multimedia Framework Good Plugins (gst-plugins-good)" + groups=('gstreamer0.10-plugins') + replaces=('gstreamer0.10-aalib' 'gstreamer0.10-wavpack' 'gstreamer0.10-shout2' 'gstreamer0.10-taglib' 'gstreamer0.10-libcaca' 'gstreamer0.10-libpng' 'gstreamer0.10-jpeg' 'gstreamer0.10-cairo' 'gstreamer0.10-flac' 'gstreamer0.10-speex' 'gstreamer0.10-gdkpixbuf' 'gstreamer0.10-dv1394' 'gstreamer0.10-annodex' 'gstreamer0.10-gconf' 'gstreamer0.10-esd' 'gstreamer0.10-cdio' 'gstreamer0.10-dv' 'gstreamer0.10-soup' 'gstreamer0.10-pulse') + conflicts=('gstreamer0.10-aalib' 'gstreamer0.10-wavpack' 'gstreamer0.10-shout2' 'gstreamer0.10-taglib' 'gstreamer0.10-libcaca' 'gstreamer0.10-libpng' 'gstreamer0.10-jpeg' 'gstreamer0.10-cairo' 'gstreamer0.10-flac' 'gstreamer0.10-speex' 'gstreamer0.10-gdkpixbuf' 'gstreamer0.10-dv1394' 'gstreamer0.10-annodex' 'gstreamer0.10-gconf' 'gstreamer0.10-esd' 'gstreamer0.10-cdio' 'gstreamer0.10-dv' 'gstreamer0.10-bad-plugins<0.10.7' 'gstreamer0.10-soup' 'gstreamer0.10-pulse') + install=gstreamer0.10-good-plugins.install + + cd "${srcdir}/gst-plugins-good-${pkgver}" + make -C sys DESTDIR="${pkgdir}" install + make -C ext GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/gconf/schemas" + install -m644 gconf/gstreamer-0.10.schemas "${pkgdir}/usr/share/gconf/schemas/gstreamer0.10-good-plugins.schemas" +} diff --git a/staging/gstreamer0.10-good/gstreamer0.10-good-plugins.install b/staging/gstreamer0.10-good/gstreamer0.10-good-plugins.install new file mode 100644 index 000000000..e343beea5 --- /dev/null +++ b/staging/gstreamer0.10-good/gstreamer0.10-good-plugins.install @@ -0,0 +1,19 @@ +pkgname=gstreamer0.10-good-plugins + +post_install() { + usr/sbin/gconfpkg --install ${pkgname} +} + +pre_upgrade() { + if [ -f usr/share/gconf/schemas/${pkgname}.schemas ]; then + pre_remove + fi +} + +post_upgrade() { + post_install +} + +pre_remove() { + usr/sbin/gconfpkg --uninstall ${pkgname} +} diff --git a/staging/poppler/PKGBUILD b/staging/poppler/PKGBUILD index a34a01a83..d05f4945e 100644 --- a/staging/poppler/PKGBUILD +++ b/staging/poppler/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 147049 2012-01-21 04:25:49Z eric $ +# $Id: PKGBUILD 147129 2012-01-22 11:12:11Z andyrtr $ # Maintainer: Jan de Groot pkgbase=poppler pkgname=('poppler' 'poppler-glib' 'poppler-qt') -pkgver=0.18.2 +pkgver=0.18.3 pkgrel=2 arch=(i686 x86_64) license=('GPL') @@ -14,14 +14,14 @@ _testtag=0d2bfd4af4c76a3bac27ccaff793d9129df7b57a source=(http://poppler.freedesktop.org/${pkgbase}-${pkgver}.tar.gz http://cgit.freedesktop.org/poppler/test/snapshot/test-${_testtag}.tar.bz2 git-fixes.patch) -md5sums=('38616927823ef01937aab26872e957e4' +md5sums=('d70d2d63d8acd29c97185f7e5f09c9b4' '9dc64c254a31e570507bdd4ad4ba629a' 'af56b7b1b24a08f7498a0c7f5e862b93') build() { cd "${srcdir}/${pkgbase}-${pkgver}" sed -i -e '/AC_PATH_XTRA/d' configure.ac - patch -Np1 -i "${srcdir}/git-fixes.patch" + #patch -Np1 -i "${srcdir}/git-fixes.patch" autoreconf -fi diff --git a/staging/vlc/PKGBUILD b/staging/vlc/PKGBUILD new file mode 100644 index 000000000..52303eec2 --- /dev/null +++ b/staging/vlc/PKGBUILD @@ -0,0 +1,74 @@ +# $Id: PKGBUILD 147135 2012-01-22 12:28:59Z giovanni $ +# Maintainer: Giovanni Scafora +# Contributor: Sarah Hay +# Contributor: Martin Sandsmark + +pkgname=vlc +pkgver=1.1.13 +pkgrel=2 +pkgdesc="A multi-platform MPEG, VCD/DVD, and DivX player" +arch=('i686' 'x86_64') +url="http://www.videolan.org/vlc/" +license=('GPL') +depends=('a52dec' 'fluidsynth' 'libmtp' 'libdvbpsi' 'libxpm' 'libcdio' + 'libdca' 'qt' 'libproxy' 'sdl_image' 'libdvdnav' 'mesa' + 'lua' 'v4l-utils' 'libcddb' 'smbclient' 'libmatroska' 'zvbi' + 'taglib' 'sysfsutils' 'libmpcdec' 'ffmpeg' 'faad2' 'libupnp' + 'libshout' 'libmad' 'fribidi' 'libmpeg2' 'libmodplug' 'xcb-util-keysyms' + 'ttf-freefont' 'libxv' 'libass' 'xdg-utils' 'desktop-file-utils') +makedepends=('avahi' 'pkgconfig' 'live-media' 'libnotify' + 'flac' 'libtheora' 'alsa-lib' 'jack' 'kdelibs' 'udev' + 'libraw1394' 'libdc1394' 'libavc1394' 'libva' 'libpulse' + 'lirc-utils' 'gnutls' 'libcaca') +optdepends=('avahi: for service discovery using bonjour protocol' + 'libnotify: for notification plugin' + 'ncurses: for ncurses interface support' + 'libdvdcss: for decoding encrypted DVDs' + 'lirc-utils: for lirc plugin' + 'libavc1394: for devices using the 1394ta AV/C' + 'libdc1394: for IEEE 1394 plugin' + 'kdelibs: KDE Solid hardware integration' + 'libpulse: PulseAudio support' + 'vdpau-video: vdpau back-end for nvidia' + 'libva-driver-intel: back-end for intel cards') +conflicts=('vlc-plugin') +replaces=('vlc-plugin') +backup=('usr/share/vlc/http/.hosts' + 'usr/share/vlc/http/dialogs/.hosts' + 'usr/share/vlc/lua/http/.hosts' + 'usr/share/vlc/lua/http/dialogs/.hosts') +options=('!libtool') +install=vlc.install +source=("http://download.videolan.org/pub/videolan/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2") +md5sums=('9678fb7a04808b6e0de63746d35e4bb1') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sed -i -e 's:truetype/freefont:TTF:g' modules/misc/freetype.c + + ./configure --prefix=/usr \ + --disable-rpath \ + --enable-faad \ + --enable-v4l \ + --enable-snapshot \ + --enable-dbus-control \ + --enable-nls \ + --enable-lirc \ + --enable-pvr \ + --enable-ncurses \ + --with-live555-tree=/usr/lib/live \ + --enable-upnp \ + --enable-realrtsp + make +} +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}/" install + + for res in 16 32 48 128; do + install -D -m644 "${srcdir}/vlc-${pkgver}/share/icons/${res}x${res}/vlc.png" \ + "${pkgdir}/usr/share/icons/hicolor/${res}x${res}/apps/vlc.png" + done +} diff --git a/staging/vlc/vlc.install b/staging/vlc/vlc.install new file mode 100644 index 000000000..dc4961cae --- /dev/null +++ b/staging/vlc/vlc.install @@ -0,0 +1,18 @@ +post_install() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +pre_remove() { + rm -f usr/lib/vlc/plugins/plugins-*.dat +} + +post_remove() { + xdg-icon-resource forceupdate --theme hicolor &> /dev/null + update-desktop-database -q +} diff --git a/~mtjm/cups-usblp/PKGBUILD b/~mtjm/cups-usblp/PKGBUILD new file mode 100644 index 000000000..43687b104 --- /dev/null +++ b/~mtjm/cups-usblp/PKGBUILD @@ -0,0 +1,134 @@ +# $Id: PKGBUILD 135897 2011-08-20 06:24:46Z andyrtr $ +# Maintainer: Andreas Radke + +_pkgname="cups" +pkgname="cups-usblp" +pkgver=1.5.0 +pkgrel=1.1 +pkgdesc="The CUPS Printing System - daemon package, with usblp backend" +arch=('i686' 'x86_64' 'mips64el') +license=('GPL') +url="http://www.cups.org/" +depends=('acl' 'openslp' 'pam' "libcups>=${pkgver}" 'poppler>=0.12.3' 'dbus-core' 'hicolor-icon-theme') +makedepends=('libtiff>=3.9.2-2' 'libpng>=1.4.0' 'acl' 'openslp' 'pam' 'xdg-utils' 'krb5' 'gnutls>=2.8.3' 'poppler>=0.12.3' + 'xinetd' 'gzip' 'autoconf' 'php' 'dbus-core' 'avahi' 'hicolor-icon-theme') +optdepends=('php: for included phpcups.so module' + 'ghostscript: for non-PostScript printers to print with CUPS to convert PostScript to raster images' + 'foomatic-db: drivers use Ghostscript to convert PostScript to a printable form directly' + 'foomatic-db-engine: drivers use Ghostscript to convert PostScript to a printable form directly' + 'xdg-utils: xdg .desktop file support') +provides=("${_pkgname}=${pkgver}") +conflicts=("${_pkgname}") +backup=(etc/cups/cupsd.conf + etc/cups/mime.convs + etc/cups/mime.types + etc/cups/snmp.conf + etc/cups/printers.conf + etc/cups/classes.conf + etc/cups/client.conf + etc/cups/subscriptions.conf + etc/dbus-1/system.d/cups.conf + etc/logrotate.d/cups + etc/pam.d/cups + etc/xinetd.d/cups-lpd) +install=cups.install +source=(ftp://ftp.easysw.com/pub/cups/${pkgver}/cups-${pkgver}-source.tar.bz2 + cups-avahi.patch + cups-no-export-ssllibs.patch + cups-no-gcrypt.patch + cups cups.logrotate cups.pam) +#options=('!emptydirs') +md5sums=('e54ed09ede2340fc3014913333520fe4' + 'e0843e8d8c345792ac73a185260e69fe' + '9b8467a1e51d360096b70e2c3c081e6c' + '3733c23e77eb503bd94cc368e02830dc' + '9657daa21760bb0b5fa3d8b51d5e01a1' + 'f861b18f4446c43918c8643dcbbd7f6d' + '96f82c38f3f540b53f3e5144900acf17') + +# move client.conf man page for next update to the client pkg. + +build() { + cd ${srcdir}/${_pkgname}-${pkgver} + # Avahi support in the dnssd backend. patch from Debian based on the Fedora work but brings it in a single file http://patch-tracker.debian.org/package/cups + patch -Np1 -i ${srcdir}/cups-avahi.patch + + # Do not export SSL libs in cups-config + patch -Np1 -i "${srcdir}/cups-no-export-ssllibs.patch" + + patch -Np1 -i "${srcdir}/cups-no-gcrypt.patch" + + # Rebuild configure script for --enable-avahi. + aclocal -I config-scripts + autoconf -I config-scripts + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --libdir=/usr/lib \ + --with-logdir=/var/log/cups \ + --with-docdir=/usr/share/cups/doc \ + --with-cups-user=daemon \ + --with-cups-group=lp \ + --enable-pam=yes \ + --disable-ldap \ + --enable-raw-printing \ + --enable-dbus --with-dbusdir=/etc/dbus-1 \ + --enable-ssl=yes --enable-gnutls \ + --enable-threads \ + --enable-avahi\ + --with-php=/usr/bin/php-cgi \ + --with-pdftops=pdftops \ + --with-optim="$CFLAGS" \ + --disable-libusb + make +} + +check() { + cd "$srcdir/$_pkgname-$pkgver" + #httpAddrGetList(workstation64): FAIL + #1 TESTS FAILED! + #make[1]: *** [testhttp] Error 1 + make -k check || /bin/true +} + +package() { + cd ${srcdir}/${_pkgname}-${pkgver} + make BUILDROOT=${pkgdir} install-data install-exec + + # this one we ship in the libcups pkg + rm -f ${pkgdir}/usr/bin/cups-config + + # kill the sysv stuff + rm -rf ${pkgdir}/etc/rc*.d + rm -rf ${pkgdir}/etc/init.d + install -D -m755 ../cups ${pkgdir}/etc/rc.d/cupsd + install -D -m644 ../cups.logrotate ${pkgdir}/etc/logrotate.d/cups + install -D -m644 ../cups.pam ${pkgdir}/etc/pam.d/cups + + # fix perms on /var/spool and /etc + chmod 755 ${pkgdir}/var/spool + chmod 755 ${pkgdir}/etc + + # serial backend needs to run as root (http://bugs.archlinux.org/task/20396) + chmod 700 ${pkgdir}/usr/lib/cups/backend/serial + + # install ssl directory where to store the certs, solves some samba issues + install -dm700 -g lp ${pkgdir}/etc/cups/ssl + # remove directory from package, we create it in cups rc.d file + rm -rf ${pkgdir}/var/run +# install -dm511 -g lp ${pkgdir}/var/run/cups/certs + + # install some more configuration files that will get filled by cupsd + touch ${pkgdir}/etc/cups/printers.conf + touch ${pkgdir}/etc/cups/classes.conf + touch ${pkgdir}/etc/cups/client.conf + echo "# see 'man client.conf'" >> ${pkgdir}/etc/cups/client.conf + echo "ServerName /var/run/cups/cups.sock # alternative: ServerName hostname-or-ip-address[:port] of a remote server" >> ${pkgdir}/etc/cups/client.conf + touch ${pkgdir}/etc/cups/subscriptions.conf + chgrp lp ${pkgdir}/etc/cups/{printers.conf,classes.conf,client.conf,subscriptions.conf} + + # fix .desktop file + sed -i 's|^Exec=htmlview http://localhost:631/|Exec=xdg-open http://localhost:631/|g' ${pkgdir}/usr/share/applications/cups.desktop + + # compress some driver files, adopted from Fedora + find ${pkgdir}/usr/share/cups/model -name "*.ppd" | xargs gzip -n9f +} diff --git a/~mtjm/cups-usblp/cups b/~mtjm/cups-usblp/cups new file mode 100644 index 000000000..744c8e663 --- /dev/null +++ b/~mtjm/cups-usblp/cups @@ -0,0 +1,68 @@ +#!/bin/bash + +daemon_name=cupsd + +. /etc/rc.conf +. /etc/rc.d/functions +#. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + # KILL + [ ! -z "$PID" ] && kill $PID &> /dev/null + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 diff --git a/~mtjm/cups-usblp/cups-avahi.patch b/~mtjm/cups-usblp/cups-avahi.patch new file mode 100644 index 000000000..7e9c8ecea --- /dev/null +++ b/~mtjm/cups-usblp/cups-avahi.patch @@ -0,0 +1,3156 @@ +Description: Avahi support +Bug: http://www.cups.org/str.php?L3066 +Author: Tim Waugh +Origin: git clone http://twaugh.fedorapeople.org/cups-avahi.git (Aug 11, 2011) + +--- a/backend/dnssd.c ++++ b/backend/dnssd.c +@@ -15,14 +15,21 @@ + * + * Contents: + * ++ * next_txt_record() - Get next TXT record from a cups_txt_records_t. ++ * parse_txt_record_pair() - Read key/value pair in cups_txt_records_t. + * main() - Browse for printers. + * browse_callback() - Browse devices. + * browse_local_callback() - Browse local devices. + * compare_devices() - Compare two devices. + * exec_backend() - Execute the backend that corresponds to the + * resolved service name. ++ * device_type() - Get DNS-SD type enumeration from string. + * get_device() - Create or update a device. + * query_callback() - Process query data. ++ * avahi_client_callback() - Avahi client callback function. ++ * avahi_query_callback() - Avahi query callback function. ++ * avahi_browse_callback() - Avahi browse callback function. ++ * find_device() - Find a device from its name and domain. + * sigterm_handler() - Handle termination signals... + * unquote() - Unquote a name string. + */ +@@ -33,7 +40,18 @@ + + #include "backend-private.h" + #include +-#include ++#ifdef HAVE_DNSSD ++# include ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++# include ++# include ++# include ++# include ++# include ++# include ++#define kDNSServiceMaxDomainName AVAHI_DOMAIN_NAME_MAX ++#endif /* HAVE_AVAHI */ + + + /* +@@ -53,7 +71,12 @@ + + typedef struct + { ++#ifdef HAVE_DNSSD + DNSServiceRef ref; /* Service reference for resolve */ ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ int resolved; /* Did we resolve the device? */ ++#endif /* HAVE_AVAHI */ + char *name, /* Service name */ + *domain, /* Domain name */ + *fullName, /* Full name */ +@@ -65,6 +88,20 @@ + sent; /* Did we list the device? */ + } cups_device_t; + ++typedef struct ++{ ++ char key[256]; ++ char value[256]; ++ ++#ifdef HAVE_DNSSD ++ const uint8_t *data; ++ const uint8_t *datanext; ++ const uint8_t *dataend; ++#else /* HAVE_AVAHI */ ++ AvahiStringList *txt; ++#endif /* HAVE_DNSSD */ ++} cups_txt_records_t; ++ + + /* + * Local globals... +@@ -78,6 +115,7 @@ + * Local functions... + */ + ++#ifdef HAVE_DNSSD + static void browse_callback(DNSServiceRef sdRef, + DNSServiceFlags flags, + uint32_t interfaceIndex, +@@ -93,12 +131,6 @@ + const char *regtype, + const char *replyDomain, + void *context); +-static int compare_devices(cups_device_t *a, cups_device_t *b); +-static void exec_backend(char **argv); +-static cups_device_t *get_device(cups_array_t *devices, +- const char *serviceName, +- const char *regtype, +- const char *replyDomain); + static void query_callback(DNSServiceRef sdRef, + DNSServiceFlags flags, + uint32_t interfaceIndex, +@@ -107,9 +139,118 @@ + uint16_t rrclass, uint16_t rdlen, + const void *rdata, uint32_t ttl, + void *context); ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++static void avahi_client_callback (AvahiClient *client, ++ AvahiClientState state, ++ void *context); ++static void avahi_browse_callback (AvahiServiceBrowser *browser, ++ AvahiIfIndex interface, ++ AvahiProtocol protocol, ++ AvahiBrowserEvent event, ++ const char *serviceName, ++ const char *regtype, ++ const char *replyDomain, ++ AvahiLookupResultFlags flags, ++ void *context); ++#endif /* HAVE_AVAHI */ ++ ++static cups_device_t * find_device (cups_array_t *devices, ++ cups_txt_records_t *txt, ++ cups_device_t *dkey); ++static int compare_devices(cups_device_t *a, cups_device_t *b); ++static void exec_backend(char **argv); ++static cups_device_t *get_device(cups_array_t *devices, ++ const char *serviceName, ++ const char *regtype, ++ const char *replyDomain); + static void sigterm_handler(int sig); + static void unquote(char *dst, const char *src, size_t dstsize); + ++#ifdef HAVE_AVAHI ++static AvahiSimplePoll *simple_poll = NULL; ++static int avahi_got_callback; ++#endif /* HAVE_AVAHI */ ++ ++ ++/* ++ * 'next_txt_record()' - Get next TXT record from a cups_txt_records_t. ++ */ ++ ++static cups_txt_records_t * ++next_txt_record (cups_txt_records_t *txt) ++{ ++#ifdef HAVE_DNSSD ++ txt->data = txt->datanext; ++#else /* HAVE_AVAHI */ ++ txt->txt = avahi_string_list_get_next (txt->txt); ++ if (txt->txt == NULL) ++ return NULL; ++#endif /* HAVE_DNSSD */ ++ ++ return txt; ++} ++ ++ ++/* ++ * 'parse_txt_record_pair()' - Read key/value pair in cups_txt_records_t. ++ */ ++ ++static int ++parse_txt_record_pair (cups_txt_records_t *txt) ++{ ++#ifdef HAVE_DNSSD ++ uint8_t datalen; ++ uint8_t *data = txt->data; ++ char *ptr; ++ ++ /* ++ * Read a key/value pair starting with an 8-bit length. Since the ++ * length is 8 bits and the size of the key/value buffers is 256, we ++ * don't need to check for overflow... ++ */ ++ ++ datalen = *data++; ++ if (!datalen || (data + datalen) >= txt->dataend) ++ return NULL; ++ txt->datanext = data + datalen; ++ ++ for (ptr = txt->key; data < txt->datanext && *data != '='; data ++) ++ *ptr++ = *data; ++ *ptr = '\0'; ++ ++ if (data < txt->datanext && *data == '=') ++ { ++ data++; ++ ++ if (data < datanext) ++ memcpy (txt->value, data, txt->datanext - data); ++ value[txt->datanext - data] = '\0'; ++ } ++ else ++ return 1; ++#else /* HAVE_AVAHI */ ++ char *key, *value; ++ size_t len; ++ avahi_string_list_get_pair (txt->txt, &key, &value, &len); ++ if (len > sizeof (txt->value) - 1) ++ len = sizeof (txt->value) - 1; ++ ++ memcpy (txt->value, value, len); ++ txt->value[len] = '\0'; ++ len = strlen (key); ++ if (len > sizeof (txt->key) - 1) ++ len = sizeof (txt->key) - 1; ++ ++ memcpy (txt->key, key, len); ++ txt->key[len] = '\0'; ++ avahi_free (key); ++ avahi_free (value); ++#endif /* HAVE_AVAHI */ ++ ++ return 0; ++} ++ + + /* + * 'main()' - Browse for printers. +@@ -120,6 +261,13 @@ + char *argv[]) /* I - Command-line arguments */ + { + const char *name; /* Backend name */ ++ cups_array_t *devices; /* Device array */ ++ cups_device_t *device; /* Current device */ ++ char uriName[1024]; /* Unquoted fullName for URI */ ++#ifdef HAVE_DNSSD ++ int fd; /* Main file descriptor */ ++ fd_set input; /* Input set for select() */ ++ struct timeval timeout; /* Timeout for select() */ + DNSServiceRef main_ref, /* Main service reference */ + fax_ipp_ref, /* IPP fax service reference */ + ipp_ref, /* IPP service reference */ +@@ -133,12 +281,11 @@ + pdl_datastream_ref, /* AppSocket service reference */ + printer_ref, /* LPD service reference */ + riousbprint_ref; /* Remote IO service reference */ +- int fd; /* Main file descriptor */ +- fd_set input; /* Input set for select() */ +- struct timeval timeout; /* Timeout for select() */ +- cups_array_t *devices; /* Device array */ +- cups_device_t *device; /* Current device */ +- char uriName[1024]; /* Unquoted fullName for URI */ ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ AvahiClient *client; ++ int error; ++#endif /* HAVE_AVAHI */ + #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) + struct sigaction action; /* Actions for POSIX signals */ + #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ +@@ -198,6 +345,49 @@ + * Browse for different kinds of printers... + */ + ++#ifdef HAVE_AVAHI ++ if ((simple_poll = avahi_simple_poll_new ()) == NULL) ++ { ++ perror ("ERROR: Unable to create avahi simple poll object"); ++ return (1); ++ } ++ ++ client = avahi_client_new (avahi_simple_poll_get (simple_poll), ++ 0, avahi_client_callback, NULL, &error); ++ if (!client) ++ { ++ perror ("DEBUG: Unable to create avahi client"); ++ return (0); ++ } ++ ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_fax-ipp._tcp", NULL, 0, ++ avahi_browse_callback, devices); ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_ipp._tcp", NULL, 0, ++ avahi_browse_callback, devices); ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_ipp-tls._tcp", NULL, 0, ++ avahi_browse_callback, devices); ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_pdl-datastream._tcp", ++ NULL, 0, ++ avahi_browse_callback, ++ devices); ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_printer._tcp", NULL, 0, ++ avahi_browse_callback, devices); ++ avahi_service_browser_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ "_riousbprint._tcp", NULL, 0, ++ avahi_browse_callback, devices); ++#endif /* HAVE_AVAHI */ ++#ifdef HAVE_DNSSD + if (DNSServiceCreateConnection(&main_ref) != kDNSServiceErr_NoError) + { + perror("ERROR: Unable to create service connection"); +@@ -258,6 +448,7 @@ + riousbprint_ref = main_ref; + DNSServiceBrowse(&riousbprint_ref, kDNSServiceFlagsShareConnection, 0, + "_riousbprint._tcp", NULL, browse_callback, devices); ++#endif /* HAVE_DNSSD */ + + /* + * Loop until we are killed... +@@ -265,6 +456,9 @@ + + while (!job_canceled) + { ++ int announce = 0; ++ ++#ifdef HAVE_DNSSD + FD_ZERO(&input); + FD_SET(fd, &input); + +@@ -284,11 +478,35 @@ + } + else + { ++ announce = 1; ++ } ++#else /* HAVE_AVAHI */ ++ int r; ++ avahi_got_callback = 0; ++ r = avahi_simple_poll_iterate (simple_poll, 1); ++ if (r != 0 && r != EINTR) ++ { ++ /* ++ * We've been told to exit the loop. Perhaps the connection to ++ * avahi failed. ++ */ ++ ++ break; ++ } ++ ++ if (avahi_got_callback) ++ announce = 1; ++#endif /* HAVE_DNSSD */ ++ ++ if (announce) ++ { + /* + * Announce any devices we've found... + */ + ++#ifdef HAVE_DNSSD + DNSServiceErrorType status; /* DNS query status */ ++#endif /* HAVE_DNSSD */ + cups_device_t *best; /* Best matching device */ + char device_uri[1024]; /* Device URI */ + int count; /* Number of queries */ +@@ -302,6 +520,7 @@ + if (device->sent) + sent ++; + ++#ifdef HAVE_DNSSD + if (device->ref) + count ++; + +@@ -333,14 +552,23 @@ + count ++; + } + } +- else if (!device->sent) ++ else ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ if (!device->resolved) ++ continue; ++ else ++#endif /* HAVE_AVAHI */ ++ if (!device->sent) + { ++#ifdef HAVE_DNSSD + /* + * Got the TXT records, now report the device... + */ + + DNSServiceRefDeallocate(device->ref); + device->ref = 0; ++#endif /* HAVE_DNSSD */ + + if (!best) + best = device; +@@ -401,6 +629,7 @@ + } + + ++#ifdef HAVE_DNSSD + /* + * 'browse_callback()' - Browse devices. + */ +@@ -489,6 +718,7 @@ + device->fullName); + device->sent = 1; + } ++#endif /* HAVE_DNSSD */ + + + /* +@@ -569,6 +799,41 @@ + + + /* ++ * 'device_type()' - Get DNS-SD type enumeration from string. ++ */ ++ ++static int ++device_type (const char *regtype) ++{ ++#ifdef HAVE_AVAHI ++ if (!strcmp(regtype, "_ipp._tcp")) ++ return (CUPS_DEVICE_IPP); ++ else if (!strcmp(regtype, "_ipps._tcp") || ++ !strcmp(regtype, "_ipp-tls._tcp")) ++ return (CUPS_DEVICE_IPPS); ++ else if (!strcmp(regtype, "_fax-ipp._tcp")) ++ return (CUPS_DEVICE_FAX_IPP); ++ else if (!strcmp(regtype, "_printer._tcp")) ++ return (CUPS_DEVICE_PDL_DATASTREAM); ++#else ++ if (!strcmp(regtype, "_ipp._tcp.")) ++ return (CUPS_DEVICE_IPP); ++ else if (!strcmp(regtype, "_ipps._tcp.") || ++ !strcmp(regtype, "_ipp-tls._tcp.")) ++ return (CUPS_DEVICE_IPPS); ++ else if (!strcmp(regtype, "_fax-ipp._tcp.")) ++ return (CUPS_DEVICE_FAX_IPP); ++ else if (!strcmp(regtype, "_printer._tcp.")) ++ return (CUPS_DEVICE_PRINTER); ++ else if (!strcmp(regtype, "_pdl-datastream._tcp.")) ++ return (CUPS_DEVICE_PDL_DATASTREAM); ++#endif /* HAVE_AVAHI */ ++ ++ return (CUPS_DEVICE_RIOUSBPRINT); ++} ++ ++ ++/* + * 'get_device()' - Create or update a device. + */ + +@@ -589,20 +854,7 @@ + */ + + key.name = (char *)serviceName; +- +- if (!strcmp(regtype, "_ipp._tcp.")) +- key.type = CUPS_DEVICE_IPP; +- else if (!strcmp(regtype, "_ipps._tcp.") || +- !strcmp(regtype, "_ipp-tls._tcp.")) +- key.type = CUPS_DEVICE_IPPS; +- else if (!strcmp(regtype, "_fax-ipp._tcp.")) +- key.type = CUPS_DEVICE_FAX_IPP; +- else if (!strcmp(regtype, "_printer._tcp.")) +- key.type = CUPS_DEVICE_PRINTER; +- else if (!strcmp(regtype, "_pdl-datastream._tcp.")) +- key.type = CUPS_DEVICE_PDL_DATASTREAM; +- else +- key.type = CUPS_DEVICE_RIOUSBPRINT; ++ key.type = device_type (regtype); + + for (device = cupsArrayFind(devices, &key); + device; +@@ -622,8 +874,14 @@ + free(device->domain); + device->domain = strdup(replyDomain); + ++#ifdef HAVE_DNSSD + DNSServiceConstructFullName(fullName, device->name, regtype, + replyDomain); ++#else /* HAVE_AVAHI */ ++ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, ++ serviceName, regtype, replyDomain); ++#endif /* HAVE_DNSSD */ ++ + free(device->fullName); + device->fullName = strdup(fullName); + } +@@ -643,6 +901,9 @@ + device->domain = strdup(replyDomain); + device->type = key.type; + device->priority = 50; ++#ifdef HAVE_AVAHI ++ device->resolved = 0; ++#endif /* HAVE_AVAHI */ + + cupsArrayAdd(devices, device); + +@@ -650,13 +911,20 @@ + * Set the "full name" of this service, which is used for queries... + */ + ++#ifdef HAVE_DNSSD + DNSServiceConstructFullName(fullName, serviceName, regtype, replyDomain); ++#else /* HAVE_AVAHI */ ++ avahi_service_name_join (fullName, kDNSServiceMaxDomainName, ++ serviceName, regtype, replyDomain); ++#endif /* HAVE_DNSSD */ ++ + device->fullName = strdup(fullName); + + return (device); + } + + ++#ifdef HAVE_DNSSD + /* + * 'query_callback()' - Process query data. + */ +@@ -680,7 +948,7 @@ + *ptr; /* Pointer into string */ + cups_device_t dkey, /* Search key */ + *device; /* Device */ +- ++ cups_txt_records_t txt; + + fprintf(stderr, "DEBUG2: query_callback(sdRef=%p, flags=%x, " + "interfaceIndex=%d, errorCode=%d, fullName=\"%s\", " +@@ -714,94 +982,233 @@ + if ((ptr = strstr(name, "._")) != NULL) + *ptr = '\0'; + +- if (strstr(fullName, "_ipp._tcp.")) +- dkey.type = CUPS_DEVICE_IPP; +- else if (strstr(fullName, "_ipps._tcp.") || +- strstr(fullName, "_ipp-tls._tcp.")) +- dkey.type = CUPS_DEVICE_IPPS; +- else if (strstr(fullName, "_fax-ipp._tcp.")) +- dkey.type = CUPS_DEVICE_FAX_IPP; +- else if (strstr(fullName, "_printer._tcp.")) +- dkey.type = CUPS_DEVICE_PRINTER; +- else if (strstr(fullName, "_pdl-datastream._tcp.")) +- dkey.type = CUPS_DEVICE_PDL_DATASTREAM; ++ dkey.type = device_type (fullName); ++ ++ txt.data = rdata; ++ txt.dataend = rdata + rdlen; ++ device = find_device ((cups_array_t *) context, &txt, &dkey); ++ if (!device) ++ fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); ++} ++#endif /* HAVE_DNSSD */ ++ ++ ++#ifdef HAVE_AVAHI ++/* ++ * 'avahi_client_callback()' - Avahi client callback function. ++ */ ++ ++static void ++avahi_client_callback(AvahiClient *client, ++ AvahiClientState state, ++ void *context) ++{ ++ /* ++ * If the connection drops, quit. ++ */ ++ ++ if (state == AVAHI_CLIENT_FAILURE) ++ { ++ fprintf (stderr, "ERROR: Avahi connection failed\n"); ++ avahi_simple_poll_quit (simple_poll); ++ } ++} ++ ++ ++/* ++ * 'avahi_query_callback()' - Avahi query callback function. ++ */ ++ ++static void ++avahi_query_callback(AvahiServiceResolver *resolver, ++ AvahiIfIndex interface, ++ AvahiProtocol protocol, ++ AvahiResolverEvent event, ++ const char *name, ++ const char *type, ++ const char *domain, ++ const char *host_name, ++ const AvahiAddress *address, ++ uint16_t port, ++ AvahiStringList *txt, ++ AvahiLookupResultFlags flags, ++ void *context) ++{ ++ AvahiClient *client; ++ cups_device_t key, ++ *device; ++ char uqname[1024], ++ *ptr; ++ cups_txt_records_t txtr; ++ ++ client = avahi_service_resolver_get_client (resolver); ++ if (event != AVAHI_RESOLVER_FOUND) ++ { ++ if (event == AVAHI_RESOLVER_FAILURE) ++ { ++ fprintf (stderr, "ERROR: %s\n", ++ avahi_strerror (avahi_client_errno (client))); ++ } ++ ++ avahi_service_resolver_free (resolver); ++ return; ++ } ++ ++ /* ++ * Set search key for device. ++ */ ++ ++ key.name = uqname; ++ unquote (uqname, name, sizeof (uqname)); ++ if ((ptr = strstr(name, "._")) != NULL) ++ *ptr = '\0'; ++ ++ key.domain = (char *) domain; ++ key.type = device_type (type); ++ ++ /* ++ * Find the device and the the TXT information. ++ */ ++ ++ txtr.txt = txt; ++ device = find_device ((cups_array_t *) context, &txtr, &key); ++ if (device) ++ { ++ /* ++ * Let the main loop know to announce the device. ++ */ ++ ++ device->resolved = 1; ++ avahi_got_callback = 1; ++ } + else +- dkey.type = CUPS_DEVICE_RIOUSBPRINT; ++ fprintf (stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", name); ++ ++ avahi_service_resolver_free (resolver); ++} ++ ++ ++/* ++ * 'avahi_browse_callback()' - Avahi browse callback function. ++ */ ++ ++static void ++avahi_browse_callback(AvahiServiceBrowser *browser, ++ AvahiIfIndex interface, ++ AvahiProtocol protocol, ++ AvahiBrowserEvent event, ++ const char *name, ++ const char *type, ++ const char *domain, ++ AvahiLookupResultFlags flags, ++ void *context) ++{ ++ AvahiClient *client = avahi_service_browser_get_client (browser); ++ ++ switch (event) ++ { ++ case AVAHI_BROWSER_FAILURE: ++ fprintf (stderr, "ERROR: %s\n", ++ avahi_strerror (avahi_client_errno (client))); ++ avahi_simple_poll_quit (simple_poll); ++ return; ++ ++ case AVAHI_BROWSER_NEW: ++ /* ++ * This object is new on the network. ++ */ ++ ++ if (flags & AVAHI_LOOKUP_RESULT_LOCAL) ++ { ++ /* ++ * This comes from the local machine so ignore it. ++ */ ++ ++ fprintf (stderr, "DEBUG: ignoring local service %s\n", name); ++ } ++ else ++ { ++ /* ++ * Create a device entry for it if it doesn't yet exist. ++ */ ++ ++ get_device ((cups_array_t *)context, name, type, domain); ++ ++ /* ++ * Now look for a TXT entry. ++ */ ++ ++ if (avahi_service_resolver_new (client, interface, protocol, ++ name, type, domain, ++ AVAHI_PROTO_UNSPEC, 0, ++ avahi_query_callback, context) == NULL) ++ { ++ fprintf (stderr, "ERROR: failed to resolve service %s: %s\n", ++ name, avahi_strerror (avahi_client_errno (client))); ++ } ++ } ++ ++ break; ++ ++ case AVAHI_BROWSER_REMOVE: ++ case AVAHI_BROWSER_ALL_FOR_NOW: ++ case AVAHI_BROWSER_CACHE_EXHAUSTED: ++ break; ++ } ++} ++#endif /* HAVE_AVAHI */ ++ + +- for (device = cupsArrayFind(devices, &dkey); ++/* ++ * 'find_device()' - Find a device from its name and domain. ++ */ ++ ++static cups_device_t * ++find_device (cups_array_t *devices, ++ cups_txt_records_t *txt, ++ cups_device_t *dkey) ++{ ++ cups_device_t *device; ++ char *ptr; ++ ++ for (device = cupsArrayFind(devices, dkey); + device; + device = cupsArrayNext(devices)) + { +- if (_cups_strcasecmp(device->name, dkey.name) || +- _cups_strcasecmp(device->domain, dkey.domain)) ++ if (_cups_strcasecmp(device->name, dkey->name) || ++ _cups_strcasecmp(device->domain, dkey->domain)) + { + device = NULL; + break; + } +- else if (device->type == dkey.type) ++ else if (device->type == dkey->type) + { + /* + * Found it, pull out the priority and make and model from the TXT + * record and save it... + */ + +- const uint8_t *data, /* Pointer into data */ +- *datanext, /* Next key/value pair */ +- *dataend; /* End of entire TXT record */ +- uint8_t datalen; /* Length of current key/value pair */ +- char key[256], /* Key string */ +- value[256], /* Value string */ +- make_and_model[512], ++ char make_and_model[512], + /* Manufacturer and model */ + model[256], /* Model */ +- device_id[2048];/* 1284 device ID */ +- ++ device_id[2048]; /* 1284 device ID */ + + device_id[0] = '\0'; + make_and_model[0] = '\0'; + + strcpy(model, "Unknown"); + +- for (data = rdata, dataend = data + rdlen; +- data < dataend; +- data = datanext) ++ for (;;) + { +- /* +- * Read a key/value pair starting with an 8-bit length. Since the +- * length is 8 bits and the size of the key/value buffers is 256, we +- * don't need to check for overflow... +- */ +- +- datalen = *data++; +- +- if (!datalen || (data + datalen) >= dataend) +- break; +- +- datanext = data + datalen; +- +- for (ptr = key; data < datanext && *data != '='; data ++) +- *ptr++ = *data; +- *ptr = '\0'; ++ char *key; ++ char *value; + +- if (data < datanext && *data == '=') +- { +- data ++; +- +- if (data < datanext) +- memcpy(value, data, datanext - data); +- value[datanext - data] = '\0'; ++ if (parse_txt_record_pair (txt)) ++ goto next; + +- fprintf(stderr, "DEBUG2: query_callback: \"%s=%s\".\n", +- key, value); +- } +- else +- { +- fprintf(stderr, "DEBUG2: query_callback: \"%s\" with no value.\n", +- key); +- continue; +- } +- +- if (!_cups_strncasecmp(key, "usb_", 4)) ++ key = txt->key; ++ value = txt->value; ++ if (!strncasecmp(key, "usb_", 4)) + { + /* + * Add USB device ID information... +@@ -856,6 +1263,10 @@ + if (device->type == CUPS_DEVICE_PRINTER) + device->sent = 1; + } ++ ++ next: ++ if (next_txt_record (txt) == NULL) ++ break; + } + + if (device->device_id) +@@ -905,11 +1316,9 @@ + } + } + +- if (!device) +- fprintf(stderr, "DEBUG: Ignoring TXT record for \"%s\"...\n", fullName); ++ return device; + } + +- + /* + * 'sigterm_handler()' - Handle termination signals... + */ +--- a/config-scripts/cups-dnssd.m4 ++++ b/config-scripts/cups-dnssd.m4 +@@ -23,6 +23,21 @@ + DNSSDLIBS="" + DNSSD_BACKEND="" + ++AC_ARG_ENABLE(avahi, [ --enable-avahi turn on DNS Service Discovery support, default=no], ++ [if test x$enable_avahi = xyes; then ++ AC_MSG_CHECKING(for Avahi) ++ if $PKGCONFIG --exists avahi-client; then ++ AC_MSG_RESULT(yes) ++ CFLAGS="$CFLAGS `$PKGCONFIG --cflags avahi-client`" ++ DNSSDLIBS="`$PKGCONFIG --libs avahi-client`" ++ DNSSD_BACKEND="dnssd" ++ AC_DEFINE(HAVE_AVAHI) ++ enable_dnssd=no ++ else ++ AC_MSG_RESULT(no) ++ fi ++ fi]) ++ + if test x$enable_dnssd != xno; then + AC_CHECK_HEADER(dns_sd.h, [ + case "$uname" in +--- a/config.h.in ++++ b/config.h.in +@@ -390,6 +390,13 @@ + + + /* ++ * Do we have Avahi for DNS Service Discovery? ++ */ ++ ++#undef HAVE_AVAHI ++ ++ ++/* + * Do we have ? + */ + +--- a/cups/http-support.c ++++ b/cups/http-support.c +@@ -43,6 +43,10 @@ + * http_copy_decode() - Copy and decode a URI. + * http_copy_encode() - Copy and encode a URI. + * http_resolve_cb() - Build a device URI for the given service name. ++ * avahi_resolve_uri_client_cb() ++ * - Avahi client callback for resolving URI. ++ * avahi_resolve_uri_resolver_cb() ++ * - Avahi resolver callback for resolving URI. + */ + + /* +@@ -60,6 +64,11 @@ + # include + # endif /* WIN32 */ + #endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++# include ++# include ++# include ++#endif /* HAVE_AVAHI */ + + + /* +@@ -127,6 +136,24 @@ + void *context); + #endif /* HAVE_DNSSD */ + ++#ifdef HAVE_AVAHI ++static void avahi_resolve_uri_client_cb(AvahiClient *client, ++ AvahiClientState state, ++ void *simple_poll); ++static void avahi_resolve_uri_resolver_cb(AvahiServiceResolver *resolver, ++ AvahiIfIndex interface, ++ AvahiProtocol protocol, ++ AvahiResolverEvent event, ++ const char *name, ++ const char *type, ++ const char *domain, ++ const char *host_name, ++ const AvahiAddress *address, ++ uint16_t port, ++ AvahiStringList *txt, ++ AvahiLookupResultFlags flags, ++ void *context); ++#endif /* HAVE_AVAHI */ + + /* + * 'httpAssembleURI()' - Assemble a uniform resource identifier from its +@@ -1431,6 +1458,9 @@ + + if (strstr(hostname, "._tcp")) + { ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ char *regtype, /* Pointer to type in hostname */ ++ *domain; /* Pointer to domain in hostname */ + #ifdef HAVE_DNSSD + # ifdef WIN32 + # pragma comment(lib, "dnssd.lib") +@@ -1449,6 +1479,17 @@ + fd_set input_set; /* Input set for select() */ + struct timeval stimeout; /* Timeout value for select() */ + #endif /* HAVE_POLL */ ++#else /* HAVE_AVAHI */ ++ AvahiSimplePoll *simple_poll; ++ AvahiClient *client; ++ int error; ++ struct ++ { ++ AvahiSimplePoll *poll; ++ _http_uribuf_t uribuf; ++ } user_data; ++#endif /* HAVE_DNSSD */ ++ + + if (options & _HTTP_RESOLVE_STDERR) + fprintf(stderr, "DEBUG: Resolving \"%s\"...\n", hostname); +@@ -1485,9 +1526,16 @@ + if (domain) + *domain++ = '\0'; + ++#ifdef HAVE_DNSSD + uribuf.buffer = resolved_uri; + uribuf.bufsize = resolved_size; + uribuf.options = options; ++#else ++ user_data.uribuf.buffer = resolved_uri; ++ user_data.uribuf.bufsize = resolved_size; ++ user_data.uribuf.options = options; ++#endif ++ + resolved_uri[0] = '\0'; + + DEBUG_printf(("6_httpResolveURI: Resolving hostname=\"%s\", regtype=\"%s\", " +@@ -1501,6 +1549,7 @@ + + uri = NULL; + ++#ifdef HAVE_DNSSD + if (DNSServiceCreateConnection(&ref) == kDNSServiceErr_NoError) + { + localref = ref; +@@ -1608,6 +1657,36 @@ + + DNSServiceRefDeallocate(ref); + } ++#else /* HAVE_AVAHI */ ++ if ((simple_poll = avahi_simple_poll_new ()) != NULL) ++ { ++ if ((client = avahi_client_new (avahi_simple_poll_get (simple_poll), ++ 0, avahi_resolve_uri_client_cb, ++ &simple_poll, &error)) != NULL) ++ { ++ user_data.poll = simple_poll; ++ if (avahi_service_resolver_new (client, AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, hostname, ++ regtype, domain, AVAHI_PROTO_UNSPEC, 0, ++ avahi_resolve_uri_resolver_cb, ++ &user_data) != NULL) ++ { ++ avahi_simple_poll_loop (simple_poll); ++ ++ /* ++ * Collect the result. ++ */ ++ ++ if (resolved_uri[0]) ++ uri = resolved_uri; ++ } ++ ++ avahi_client_free (client); ++ } ++ ++ avahi_simple_poll_free (simple_poll); ++ } ++#endif /* HAVE_DNSSD */ + + if (options & _HTTP_RESOLVE_STDERR) + { +@@ -1619,13 +1698,13 @@ + fputs("STATE: -connecting-to-device,offline-report\n", stderr); + } + +-#else ++#else /* HAVE_DNSSD || HAVE_AVAHI */ + /* + * No DNS-SD support... + */ + + uri = NULL; +-#endif /* HAVE_DNSSD */ ++#endif /* HAVE_DNSSD || HAVE_AVAHI */ + + if ((options & _HTTP_RESOLVE_STDERR) && !uri) + _cupsLangPrintFilter(stderr, "ERROR", _("Unable to find printer.")); +@@ -1895,6 +1974,116 @@ + #endif /* HAVE_DNSSD */ + + ++#ifdef HAVE_AVAHI ++/* ++ * 'avahi_resolve_uri_client_cb()' - Avahi client callback for resolving URI. ++ */ ++ ++static void ++avahi_resolve_uri_client_cb (AvahiClient *client, ++ AvahiClientState state, ++ void *simple_poll) ++{ ++ DEBUG_printf(("avahi_resolve_uri_client_callback(client=%p, state=%d, " ++ "simple_poll=%p)\n", client, state, simple_poll)); ++ ++ /* ++ * If the connection drops, quit. ++ */ ++ ++ if (state == AVAHI_CLIENT_FAILURE) ++ avahi_simple_poll_quit (simple_poll); ++} ++ ++ ++/* ++ * 'avahi_resolve_uri_resolver_cb()' - Avahi resolver callback for resolving ++ * URI. ++ */ ++ ++static void ++avahi_resolve_uri_resolver_cb (AvahiServiceResolver *resolver, ++ AvahiIfIndex interface, ++ AvahiProtocol protocol, ++ AvahiResolverEvent event, ++ const char *name, ++ const char *type, ++ const char *domain, ++ const char *host_name, ++ const AvahiAddress *address, ++ uint16_t port, ++ AvahiStringList *txt, ++ AvahiLookupResultFlags flags, ++ void *context) ++{ ++ const char *scheme; /* URI scheme */ ++ char rp[256]; /* Remote printer */ ++ AvahiStringList *pair; ++ char *value; ++ size_t valueLen = 0; ++ char addr[AVAHI_ADDRESS_STR_MAX]; ++ struct ++ { ++ AvahiSimplePoll *poll; ++ _http_uribuf_t uribuf; ++ } *poll_uribuf = context; ++ ++ DEBUG_printf(("avahi_resolve_uri_resolver_callback(resolver=%p, " ++ "interface=%d, protocol=%d, event=%d, name=\"%s\", " ++ "type=\"%s\", domain=\"%s\", host_name=\"%s\", address=%p, " ++ "port=%d, txt=%p, flags=%d, context=%p)\n", ++ resolver, interface, protocol, event, name, type, domain, ++ host_name, address, port, txt, flags, context)); ++ ++ if (event != AVAHI_RESOLVER_FOUND) ++ { ++ avahi_service_resolver_free (resolver); ++ avahi_simple_poll_quit (poll_uribuf->poll); ++ return; ++ } ++ ++ /* ++ * Figure out the scheme from the full name... ++ */ ++ ++ if (strstr(type, "_ipp.")) ++ scheme = "ipp"; ++ else if (strstr(type, "_printer.")) ++ scheme = "lpd"; ++ else if (strstr(type, "_pdl-datastream.")) ++ scheme = "socket"; ++ else ++ scheme = "riousbprint"; ++ ++ /* ++ * Extract the "remote printer key from the TXT record... ++ */ ++ ++ if ((pair = avahi_string_list_find (txt, "rp")) != NULL) ++ { ++ avahi_string_list_get_pair (pair, NULL, &value, &valueLen); ++ rp[0] = '/'; ++ memcpy (rp + 1, value, valueLen); ++ rp[valueLen + 1] = '\0'; ++ } ++ else ++ rp[0] = '\0'; ++ ++ /* ++ * Assemble the final device URI... ++ */ ++ ++ avahi_address_snprint (addr, AVAHI_ADDRESS_STR_MAX, address); ++ httpAssembleURI(HTTP_URI_CODING_ALL, poll_uribuf->uribuf.buffer, ++ poll_uribuf->uribuf.bufsize, scheme, NULL, ++ addr, port, rp); ++ DEBUG_printf(("avahi_resolve_uri_resolver_callback: Resolved URI is \"%s\"\n", ++ poll_uribuf->uribuf.buffer)); ++ avahi_simple_poll_quit (poll_uribuf->poll); ++} ++#endif /* HAVE_AVAHI */ ++ ++ + /* + * End of "$Id: http-support.c 9820 2011-06-10 22:06:26Z mike $". + */ +--- a/scheduler/Makefile ++++ b/scheduler/Makefile +@@ -17,6 +17,7 @@ + + CUPSDOBJS = \ + auth.o \ ++ avahi.o \ + banners.o \ + cert.o \ + classes.o \ +@@ -39,7 +40,8 @@ + server.o \ + statbuf.o \ + subscriptions.o \ +- sysman.o ++ sysman.o \ ++ timeout.o + LIBOBJS = \ + filter.o \ + mime.o \ +--- /dev/null ++++ b/scheduler/avahi.c +@@ -0,0 +1,445 @@ ++/* ++ * "$Id$" ++ * ++ * Avahi poll implementation for the CUPS scheduler. ++ * ++ * Copyright (C) 2010 Red Hat, Inc. ++ * Authors: ++ * Tim Waugh ++ * ++ * Distribution and use rights are outlined in the file "LICENSE.txt" ++ * "LICENSE" which should have been included with this file. If this ++ * file is missing or damaged, see the license at "http://www.cups.org/". ++ * ++ * Contents: ++ * ++ * watch_read_cb - Read callback for file descriptor ++ * watch_write_cb - Write callback for file descriptor ++ * watched_fd_add_select() - Call cupsdAddSelect() as needed ++ * watch_new() - Create a new file descriptor watch ++ * watch_free() - Free a file descriptor watch ++ * watch_update() - Update watched events for a file descriptor ++ * watch_get_events() - Get events that happened for a file descriptor ++ * timeout_cb() - Run a timed Avahi callback ++ * timeout_new() - Set a wakeup time ++ * timeout_update() - Update the expiration time for a timeout ++ * timeout_free() - Free a timeout ++ * compare_watched_fds() - Compare watched file descriptors for array sorting ++ * compare_timeouts() - Compare timeouts for array sorting ++ * avahi_cups_poll_new() - Create a new Avahi main loop object for CUPS ++ * avahi_cups_poll_free() - Free an Avahi main loop object for CUPS ++ * avahi_cups_poll_get() - Get the abstract poll API structure ++ */ ++ ++#include ++ ++#ifdef HAVE_AVAHI /* Applies to entire file... */ ++ ++/* ++ * Include necessary headers... ++ */ ++ ++#include "cupsd.h" ++ ++#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) ++# include ++#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ ++ ++#ifdef HAVE_AVAHI ++# include ++#endif /* HAVE_AVAHI */ ++ ++ ++typedef struct ++{ ++ AvahiCupsPoll *cups_poll; ++ ++ int fd; ++ AvahiWatchEvent occurred; ++ cups_array_t *watches; ++} cupsd_watched_fd_t; ++ ++struct AvahiWatch ++{ ++ cupsd_watched_fd_t *watched_fd; ++ ++ AvahiWatchEvent events; ++ AvahiWatchCallback callback; ++ void *userdata; ++}; ++ ++struct AvahiTimeout ++{ ++ AvahiCupsPoll *cups_poll; ++ AvahiTimeoutCallback callback; ++ void *userdata; ++ cupsd_timeout_t *cupsd_timeout; ++}; ++ ++/* ++ * Local functions... ++ */ ++ ++static AvahiWatch * watch_new(const AvahiPoll *api, ++ int fd, ++ AvahiWatchEvent events, ++ AvahiWatchCallback callback, ++ void *userdata); ++static void watch_free(AvahiWatch *watch); ++static void watch_update(AvahiWatch *watch, ++ AvahiWatchEvent events); ++static AvahiWatchEvent watch_get_events(AvahiWatch *watch); ++static int compare_watches(AvahiWatch *p0, ++ AvahiWatch *p1); ++ ++ ++/* ++ * 'watch_read_cb' - Read callback for file descriptor ++ */ ++ ++static void ++watch_read_cb (void *userdata) ++{ ++ AvahiWatch *watch; ++ cupsd_watched_fd_t *watched_fd = userdata; ++ watched_fd->occurred |= AVAHI_WATCH_IN; ++ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); ++ watch; ++ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) { ++ if (watch->events & watched_fd->occurred) { ++ (watch->callback) (watch, watched_fd->fd, ++ AVAHI_WATCH_IN, watch->userdata); ++ watched_fd->occurred &= ~AVAHI_WATCH_IN; ++ break; ++ } ++ } ++} ++ ++ ++/* ++ * 'watch_write_cb' - Write callback for file descriptor ++ */ ++ ++static void ++watch_write_cb (void *userdata) ++{ ++ AvahiWatch *watch; ++ cupsd_watched_fd_t *watched_fd = userdata; ++ watched_fd->occurred |= AVAHI_WATCH_OUT; ++ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); ++ watch; ++ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) { ++ if (watch->events & watched_fd->occurred) { ++ (watch->callback) (watch, watched_fd->fd, ++ AVAHI_WATCH_OUT, watch->userdata); ++ watched_fd->occurred &= ~AVAHI_WATCH_OUT; ++ break; ++ } ++ } ++} ++ ++ ++/* ++ * 'watched_fd_add_select' - Call cupsdAddSelect() as needed ++ */ ++ ++static int /* O - Watches? */ ++watched_fd_add_select (cupsd_watched_fd_t *watched_fd) ++{ ++ AvahiWatch *watch; ++ cupsd_selfunc_t read_cb = NULL, write_cb = NULL; ++ ++ for (watch = (AvahiWatch *)cupsArrayFirst(watched_fd->watches); ++ watch; ++ watch = (AvahiWatch *)cupsArrayNext(watched_fd->watches)) { ++ if (watch->events & (AVAHI_WATCH_IN | ++ AVAHI_WATCH_ERR | ++ AVAHI_WATCH_HUP)) { ++ read_cb = (cupsd_selfunc_t)watch_read_cb; ++ if (write_cb != NULL) ++ break; ++ } ++ ++ if (watch->events & AVAHI_WATCH_OUT) { ++ write_cb = (cupsd_selfunc_t)watch_write_cb; ++ if (read_cb != NULL) ++ break; ++ } ++ } ++ ++ if (read_cb || write_cb) ++ cupsdAddSelect (watched_fd->fd, read_cb, write_cb, watched_fd); ++ else ++ cupsdRemoveSelect (watched_fd->fd); ++ ++ return (read_cb || write_cb); ++} ++ ++/* ++ * 'watch_new' - Create a new file descriptor watch ++ */ ++ ++static AvahiWatch * ++watch_new (const AvahiPoll *api, ++ int fd, ++ AvahiWatchEvent events, ++ AvahiWatchCallback callback, ++ void *userdata) ++{ ++ cupsd_watched_fd_t key, *watched_fd; ++ AvahiCupsPoll *cups_poll = api->userdata; ++ AvahiWatch *watch = malloc(sizeof(AvahiWatch)); ++ if (watch == NULL) ++ return (NULL); ++ ++ watch->events = events; ++ watch->callback = callback; ++ watch->userdata = userdata; ++ ++ key.fd = fd; ++ watched_fd = cupsArrayFind (cups_poll->watched_fds, &key); ++ if (watched_fd == NULL) { ++ watched_fd = malloc(sizeof(cupsd_watched_fd_t)); ++ if (watched_fd == NULL) { ++ free (watch); ++ return (NULL); ++ } ++ ++ watched_fd->fd = fd; ++ watched_fd->occurred = 0; ++ watched_fd->cups_poll = cups_poll; ++ watched_fd->watches = cupsArrayNew ((cups_array_func_t)compare_watches, ++ NULL); ++ } ++ ++ watch->watched_fd = watched_fd; ++ cupsArrayAdd(watched_fd->watches, watch); ++ watched_fd_add_select (watched_fd); ++ return (watch); ++} ++ ++ ++/* ++ * 'watch_free' - Free a file descriptor watch ++ */ ++ ++static void ++watch_free (AvahiWatch *watch) ++{ ++ cupsd_watched_fd_t *watched_fd = watch->watched_fd; ++ AvahiCupsPoll *cups_poll = watched_fd->cups_poll; ++ ++ cupsArrayRemove (watched_fd->watches, watch); ++ free (watch); ++ ++ if (!watched_fd_add_select (watched_fd)) { ++ /* No more watches */ ++ cupsArrayRemove (cups_poll->watched_fds, watched_fd); ++ free (watched_fd); ++ } ++} ++ ++ ++/* ++ * 'watch_update' - Update watched events for a file descriptor ++ */ ++ ++static void ++watch_update (AvahiWatch *watch, ++ AvahiWatchEvent events) ++{ ++ watch->events = events; ++ watched_fd_add_select (watch->watched_fd); ++} ++ ++ ++/* ++ * 'watch_get_events' - Get events that happened for a file descriptor ++ */ ++ ++static AvahiWatchEvent ++watch_get_events (AvahiWatch *watch) ++{ ++ return (watch->watched_fd->occurred); ++} ++ ++ ++/* ++ * 'compare_watches' - Compare watches for array sorting ++ */ ++ ++static int ++compare_watches (AvahiWatch *p0, ++ AvahiWatch *p1) ++{ ++ if (p0->watched_fd->fd < p1->watched_fd->fd) ++ return (-1); ++ ++ return ((p0->watched_fd->fd == p1->watched_fd->fd) ? 0 : 1); ++} ++ ++ ++/* ++ * 'timeout_cb()' - Run a timed Avahi callback ++ */ ++ ++static void ++timeout_cb (cupsd_timeout_t *cupsd_timeout, void *userdata) ++{ ++ AvahiTimeout *timeout = userdata; ++ (timeout->callback) (timeout, timeout->userdata); ++} ++ ++ ++/* ++ * 'timeout_new' - Set a wakeup time ++ */ ++ ++static AvahiTimeout * ++timeout_new (const AvahiPoll *api, ++ const struct timeval *tv, ++ AvahiTimeoutCallback callback, ++ void *userdata) ++{ ++ AvahiTimeout *timeout; ++ AvahiCupsPoll *cups_poll = api->userdata; ++ ++ timeout = malloc(sizeof(AvahiTimeout)); ++ if (timeout == NULL) ++ return (NULL); ++ ++ timeout->cups_poll = cups_poll; ++ timeout->callback = callback; ++ timeout->userdata = userdata; ++ timeout->cupsd_timeout = cupsdAddTimeout (tv, ++ (cupsd_timeoutfunc_t)timeout_cb, ++ timeout); ++ cupsArrayAdd (cups_poll->timeouts, timeout); ++ return (timeout); ++} ++ ++ ++/* ++ * 'timeout_update' - Update the expiration time for a timeout ++ */ ++ ++static void ++timeout_update (AvahiTimeout *timeout, ++ const struct timeval *tv) ++{ ++ cupsdUpdateTimeout (timeout->cupsd_timeout, tv); ++} ++ ++ ++/* ++ * ' timeout_free' - Free a timeout ++ */ ++ ++static void ++timeout_free (AvahiTimeout *timeout) ++{ ++ cupsArrayRemove (timeout->cups_poll->timeouts, timeout); ++ cupsdRemoveTimeout (timeout->cupsd_timeout); ++ free (timeout); ++} ++ ++ ++/* ++ * 'compare_watched_fds' - Compare watched file descriptors for array sorting ++ */ ++static int ++compare_watched_fds(cupsd_watched_fd_t *p0, ++ cupsd_watched_fd_t *p1) ++{ ++ if (p0->fd != p1->fd) ++ return (p0->fd < p1->fd ? -1 : 1); ++ ++ if (p0 == p1) ++ return (0); ++ ++ return (p0 < p1 ? -1 : 1); ++} ++ ++ ++/* ++ * 'compare_timeouts' - Compare timeouts for array sorting ++ */ ++static int ++compare_timeouts(AvahiTimeout *p0, ++ AvahiTimeout *p1) ++{ ++ /* ++ * Just compare pointers to make it a stable sort. ++ */ ++ ++ if (p0->cupsd_timeout < p1->cupsd_timeout) ++ return (-1); ++ return ((p0->cupsd_timeout == p1->cupsd_timeout) ? 0 : 1); ++} ++ ++ ++/* ++ * 'avahi_cups_poll_new' - Create a new Avahi main loop object for CUPS ++ */ ++ ++AvahiCupsPoll * ++avahi_cups_poll_new (void) ++{ ++ AvahiCupsPoll *cups_poll = malloc(sizeof(AvahiCupsPoll)); ++ if (cups_poll == NULL) ++ return (NULL); ++ ++ cups_poll->watched_fds = cupsArrayNew ((cups_array_func_t)compare_watched_fds, ++ NULL); ++ cups_poll->timeouts = cupsArrayNew ((cups_array_func_t)compare_timeouts, ++ NULL); ++ ++ cups_poll->api.userdata = cups_poll; ++ cups_poll->api.watch_new = watch_new; ++ cups_poll->api.watch_free = watch_free; ++ cups_poll->api.watch_update = watch_update; ++ cups_poll->api.watch_get_events = watch_get_events; ++ ++ cups_poll->api.timeout_new = timeout_new; ++ cups_poll->api.timeout_update = timeout_update; ++ cups_poll->api.timeout_free = timeout_free; ++ ++ return (cups_poll); ++} ++ ++ ++/* ++ * 'avahi_cups_poll_free' - Free an Avahi main loop object for CUPS ++ */ ++void ++avahi_cups_poll_free (AvahiCupsPoll *cups_poll) ++{ ++ cupsd_watched_fd_t *watched_fd; ++ ++ for (watched_fd = (cupsd_watched_fd_t*)cupsArrayFirst(cups_poll->watched_fds); ++ watched_fd; ++ watched_fd = (cupsd_watched_fd_t*)cupsArrayNext(cups_poll->watched_fds)){ ++ cupsArrayClear (watched_fd->watches); ++ } ++ ++ cupsArrayClear (cups_poll->watched_fds); ++ cupsArrayClear (cups_poll->timeouts); ++} ++ ++ ++/* ++ * 'avahi_cups_poll_get' - Get the abstract poll API structure ++ */ ++ ++const AvahiPoll * ++avahi_cups_poll_get (AvahiCupsPoll *cups_poll) ++{ ++ return (&cups_poll->api); ++} ++ ++ ++#endif /* HAVE_AVAHI ... from top of file */ ++ ++/* ++ * End of "$Id$". ++ */ +--- /dev/null ++++ b/scheduler/avahi.h +@@ -0,0 +1,49 @@ ++/* ++ * "$Id$" ++ * ++ * Avahi poll implementation for the CUPS scheduler. ++ * ++ * Copyright (C) 2010 Red Hat, Inc. ++ * Authors: ++ * Tim Waugh ++ * ++ * Distribution and use rights are outlined in the file "LICENSE.txt" ++ * which should have been included with this file. If this file is ++ * file is missing or damaged, see the license at "http://www.cups.org/". ++ */ ++ ++#include ++ ++#ifdef HAVE_AVAHI ++# include ++# include ++#endif /* HAVE_AVAHI */ ++ ++#ifdef HAVE_AUTHORIZATION_H ++# include ++#endif /* HAVE_AUTHORIZATION_H */ ++ ++ ++#ifdef HAVE_AVAHI ++typedef struct ++{ ++ AvahiPoll api; ++ cups_array_t *watched_fds; ++ cups_array_t *timeouts; ++} AvahiCupsPoll; ++#endif /* HAVE_AVAHI */ ++ ++/* ++ * Prototypes... ++ */ ++ ++#ifdef HAVE_AVAHI ++extern AvahiCupsPoll * avahi_cups_poll_new(void); ++extern void avahi_cups_poll_free(AvahiCupsPoll *cups_poll); ++extern const AvahiPoll *avahi_cups_poll_get(AvahiCupsPoll *cups_poll); ++#endif /* HAVE_AVAHI */ ++ ++ ++/* ++ * End of "$Id$". ++ */ +--- a/scheduler/cupsd.h ++++ b/scheduler/cupsd.h +@@ -140,6 +140,15 @@ + + typedef void (*cupsd_selfunc_t)(void *data); + ++#ifdef HAVE_AVAHI ++/* ++ * Timeout callback function type... ++ */ ++ ++typedef struct _cupsd_timeout_s cupsd_timeout_t; ++typedef void (*cupsd_timeoutfunc_t)(cupsd_timeout_t *timeout, void *data); ++#endif /* HAVE_AVAHI */ ++ + + /* + * Globals... +@@ -173,6 +182,11 @@ + /* Running from launchd */ + #endif /* HAVE_LAUNCH_H */ + ++#ifdef HAVE_AVAHI ++VAR cups_array_t *Timeouts; /* Timed callbacks for main loop */ ++#endif /* HAVE_AVAHI */ ++ ++ + + /* + * Prototypes... +@@ -242,6 +256,20 @@ + extern void cupsdStartServer(void); + extern void cupsdStopServer(void); + ++#ifdef HAVE_AVAHI ++extern void cupsdInitTimeouts(void); ++extern cupsd_timeout_t *cupsdAddTimeout (const struct timeval *tv, ++ cupsd_timeoutfunc_t cb, ++ void *data); ++extern cupsd_timeout_t *cupsdNextTimeout (long *delay); ++extern void cupsdRunTimeout (cupsd_timeout_t *timeout); ++extern void cupsdUpdateTimeout (cupsd_timeout_t *timeout, ++ const struct timeval *tv); ++extern void cupsdRemoveTimeout (cupsd_timeout_t *timeout); ++#endif /* HAVE_AVAHI */ ++ ++extern int cupsdRemoveFile(const char *filename); ++ + + /* + * End of "$Id: cupsd.h 9766 2011-05-11 22:17:34Z mike $". +--- a/scheduler/main.c ++++ b/scheduler/main.c +@@ -122,6 +122,10 @@ + cupsd_listener_t *lis; /* Current listener */ + time_t current_time, /* Current time */ + activity, /* Client activity timer */ ++#ifdef HAVE_AVAHI ++ avahi_client_time, /* Time for next Avahi client ++ check */ ++#endif /* HAVE_AVAHI */ + browse_time, /* Next browse send time */ + senddoc_time, /* Send-Document time */ + expire_time, /* Subscription expire time */ +@@ -148,6 +152,10 @@ + int launchd_idle_exit; + /* Idle exit on select timeout? */ + #endif /* HAVE_LAUNCHD */ ++#ifdef HAVE_AVAHI ++ cupsd_timeout_t *tmo; /* Next scheduled timed callback */ ++ long tmo_delay; /* Time before it must be called */ ++#endif /* HAVE_AVAHI */ + + + #ifdef HAVE_GETEUID +@@ -527,6 +535,14 @@ + + httpInitialize(); + ++#ifdef HAVE_AVAHI ++ /* ++ * Initialize timed callback structures. ++ */ ++ ++ cupsdInitTimeouts(); ++#endif /* HAVE_AVAHI */ ++ + cupsdStartServer(); + + /* +@@ -657,6 +673,9 @@ + */ + + current_time = time(NULL); ++#ifdef HAVE_AVAHI ++ avahi_client_time = current_time; ++#endif /* HAVE_AVAHI */ + browse_time = current_time; + event_time = current_time; + expire_time = current_time; +@@ -871,6 +890,26 @@ + } + #endif /* __APPLE__ */ + ++#ifdef HAVE_AVAHI ++ /* ++ * If a timed callback is due, run it. ++ */ ++ ++ tmo = cupsdNextTimeout (&tmo_delay); ++ if (tmo && tmo_delay == 0) ++ cupsdRunTimeout (tmo); ++ ++ /* ++ * Try to restart the Avahi client every 10 seconds if needed... ++ */ ++ ++ if ((current_time - avahi_client_time) >= 10) ++ { ++ avahi_client_time = current_time; ++ cupsdStartAvahiClient(); ++ } ++#endif /* HAVE_AVAHI */ ++ + #ifndef __APPLE__ + /* + * Update the network interfaces once a minute... +@@ -1815,6 +1854,10 @@ + cupsd_job_t *job; /* Job information */ + cupsd_subscription_t *sub; /* Subscription information */ + const char *why; /* Debugging aid */ ++#ifdef HAVE_AVAHI ++ cupsd_timeout_t *tmo; /* Timed callback */ ++ long tmo_delay; /* Seconds before calling it */ ++#endif /* HAVE_AVAHI */ + + + /* +@@ -1857,6 +1900,19 @@ + } + #endif /* __APPLE__ */ + ++#ifdef HAVE_AVAHI ++ /* ++ * See if there are any scheduled timed callbacks to run. ++ */ ++ ++ tmo = cupsdNextTimeout (&tmo_delay); ++ if (tmo) ++ { ++ timeout = tmo_delay; ++ why = "run a timed callback"; ++ } ++#endif /* HAVE_AVAHI */ ++ + /* + * Check whether we are accepting new connections... + */ +--- /dev/null ++++ b/scheduler/timeout.c +@@ -0,0 +1,195 @@ ++/* ++ * "$Id$" ++ * ++ * Timeout functions for the Common UNIX Printing System (CUPS). ++ * ++ * Copyright (C) 2010 Red Hat, Inc. ++ * Authors: ++ * Tim Waugh ++ * ++ * Distribution and use rights are outlined in the file "LICENSE.txt" ++ * which should have been included with this file. If this file is ++ * file is missing or damaged, see the license at "http://www.cups.org/". ++ * ++ * Contents: ++ * ++ * cupsdInitTimeouts() - Initialise timeout structure. ++ * cupsdAddTimeout() - Add a timed callback. ++ * cupsdNextTimeout() - Find the next enabled timed callback. ++ * cupsdUpdateTimeout() - Adjust the time of a timed callback or disable it. ++ * cupsdRemoveTimeout() - Discard a timed callback. ++ * compare_timeouts() - Compare timed callbacks for array sorting. ++ */ ++ ++#include ++ ++#ifdef HAVE_AVAHI /* Applies to entire file... */ ++ ++/* ++ * Include necessary headers... ++ */ ++ ++#include "cupsd.h" ++ ++#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) ++# include ++#endif /* HAVE_MALLOC_H && HAVE_MALLINFO */ ++ ++#ifdef HAVE_AVAHI ++# include ++#endif /* HAVE_AVAHI */ ++ ++ ++struct _cupsd_timeout_s ++{ ++ struct timeval when; ++ int enabled; ++ cupsd_timeoutfunc_t callback; ++ void *data; ++}; ++ ++/* ++ * Local functions... ++ */ ++ ++/* ++ * 'compare_timeouts()' - Compare timed callbacks for array sorting. ++ */ ++ ++static int ++compare_timeouts (cupsd_timeout_t *p0, cupsd_timeout_t *p1) ++{ ++ if (!p0->enabled || !p1->enabled) ++ { ++ if (!p0->enabled && !p1->enabled) ++ return (0); ++ ++ return (p0->enabled ? -1 : 1); ++ } ++ ++ return (avahi_timeval_compare (&p0->when, &p1->when)); ++} ++ ++ ++/* ++ * 'cupsdInitTimeouts()' - Initialise timeout structures. ++ */ ++ ++void ++cupsdInitTimeouts(void) ++{ ++ Timeouts = cupsArrayNew ((cups_array_func_t)compare_timeouts, NULL); ++} ++ ++ ++/* ++ * 'cupsdAddTimeout()' - Add a timed callback. ++ */ ++ ++cupsd_timeout_t * /* O - Timeout handle */ ++cupsdAddTimeout(const struct timeval *tv, /* I - Absolute time */ ++ cupsd_timeoutfunc_t cb, /* I - Callback function */ ++ void *data) /* I - User data */ ++{ ++ cupsd_timeout_t *timeout; ++ ++ timeout = malloc (sizeof(cupsd_timeout_t)); ++ if (timeout != NULL) ++ { ++ timeout->enabled = (tv != NULL); ++ if (tv) ++ { ++ timeout->when.tv_sec = tv->tv_sec; ++ timeout->when.tv_usec = tv->tv_usec; ++ } ++ ++ timeout->callback = cb; ++ timeout->data = data; ++ cupsArrayAdd (Timeouts, timeout); ++ } ++ ++ return timeout; ++} ++ ++ ++/* ++ * 'cupsdNextTimeout()' - Find the next enabled timed callback. ++ */ ++ ++cupsd_timeout_t * /* O - Next enabled timeout or NULL */ ++cupsdNextTimeout(long *delay) /* O - Seconds before scheduled */ ++{ ++ cupsd_timeout_t *first = cupsArrayFirst (Timeouts); ++ struct timeval curtime; ++ ++ if (first && !first->enabled) ++ first = NULL; ++ ++ if (first && delay) ++ { ++ gettimeofday (&curtime, NULL); ++ if (avahi_timeval_compare (&curtime, &first->when) > 0) ++ { ++ *delay = 0; ++ } else { ++ *delay = 1 + first->when.tv_sec - curtime.tv_sec; ++ if (first->when.tv_usec < curtime.tv_usec) ++ (*delay)--; ++ } ++ } ++ ++ return (first); ++} ++ ++ ++/* ++ * 'cupsdRunTimeout()' - Run a timed callback. ++ */ ++ ++void ++cupsdRunTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ ++{ ++ if (!timeout) ++ return; ++ timeout->enabled = 0; ++ if (!timeout->callback) ++ return; ++ timeout->callback (timeout, timeout->data); ++} ++ ++/* ++ * 'cupsdUpdateTimeout()' - Adjust the time of a timed callback or disable it. ++ */ ++ ++void ++cupsdUpdateTimeout(cupsd_timeout_t *timeout, /* I - Timeout */ ++ const struct timeval *tv) /* I - Absolute time or NULL */ ++{ ++ cupsArrayRemove (Timeouts, timeout); ++ timeout->enabled = (tv != NULL); ++ if (tv) ++ { ++ timeout->when.tv_sec = tv->tv_sec; ++ timeout->when.tv_usec = tv->tv_usec; ++ } ++ cupsArrayAdd (Timeouts, timeout); ++} ++ ++ ++/* ++ * 'cupsdRemoveTimeout()' - Discard a timed callback. ++ */ ++ ++void ++cupsdRemoveTimeout(cupsd_timeout_t *timeout) /* I - Timeout */ ++{ ++ cupsArrayRemove (Timeouts, timeout); ++ free (timeout); ++} ++ ++ ++#endif /* HAVE_AVAHI ... from top of file */ ++ ++/* ++ * End of "$Id$". ++ */ +--- a/cgi-bin/admin.c ++++ b/cgi-bin/admin.c +@@ -1643,7 +1643,7 @@ + else + local_protocols[0] = '\0'; + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + if (cgiGetVariable("BROWSE_LOCAL_DNSSD")) + { + if (local_protocols[0]) +@@ -1651,7 +1651,7 @@ + else + strcat(local_protocols, "dnssd"); + } +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + #ifdef HAVE_LDAP + if (cgiGetVariable("BROWSE_LOCAL_LDAP")) +@@ -2718,9 +2718,9 @@ + #endif /* HAVE_GSSAPI */ + cgiSetVariable("KERBEROS", ""); + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + cgiSetVariable("HAVE_DNSSD", "1"); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + #ifdef HAVE_LDAP + cgiSetVariable("HAVE_LDAP", "1"); +--- a/scheduler/client.c ++++ b/scheduler/client.c +@@ -4987,7 +4987,7 @@ + !strncmp(host, "[::1]:", 6)); + } + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + /* + * Check if the hostname is something.local (Bonjour); if so, allow it. + */ +@@ -4996,7 +4996,7 @@ + (!_cups_strcasecmp(end, ".local") || !_cups_strncasecmp(end, ".local:", 7) || + !_cups_strcasecmp(end, ".local.") || !_cups_strncasecmp(end, ".local.:", 8))) + return (1); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + /* + * Check if the hostname is an IP address... +--- a/scheduler/dirsvc.c ++++ b/scheduler/dirsvc.c +@@ -27,6 +27,7 @@ + * ldap_connect() - Start new LDAP connection + * ldap_reconnect() - Reconnect to LDAP Server + * ldap_disconnect() - Disconnect from LDAP Server ++ * cupsdStartAvahiClient() - Start an Avahi client if needed + * cupsdStartBrowsing() - Start sending and receiving broadcast + * information. + * cupsdStartPolling() - Start polling servers as needed. +@@ -45,6 +46,8 @@ + * printer. + * dnssdPackTxtRecord() - Pack an array of key/value pairs into the TXT + * record format. ++ * avahiPackTxtRecord() - Pack an array of key/value pairs into an ++ * AvahiStringList. + * dnssdRegisterCallback() - DNSServiceRegister callback. + * dnssdRegisterPrinter() - Start sending broadcast information for a + * printer or update the broadcast contents. +@@ -83,6 +86,7 @@ + */ + + #include "cupsd.h" ++#include + #include + + #ifdef HAVE_DNSSD +@@ -97,6 +101,17 @@ + # endif /* HAVE_SYSTEMCONFIGURATION */ + # endif /* __APPLE__ */ + #endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++# include ++#endif /* HAVE_AVAHI */ ++ ++ ++#ifdef HAVE_DNSSD ++typedef char *cupsd_txt_record_t; ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++typedef AvahiStringList *cupsd_txt_record_t; ++#endif /* HAVE_AVAHI */ + + + /* +@@ -159,27 +174,39 @@ + static void update_smb(int onoff); + + ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++static cupsd_txt_record_t dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, ++ int for_lpd); ++static int dnssdComparePrinters(cupsd_printer_t *a, cupsd_printer_t *b); ++static void dnssdDeregisterPrinter(cupsd_printer_t *p); ++static void dnssdRegisterPrinter(cupsd_printer_t *p); ++static void dnssdStop(void); ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ ++ + #ifdef HAVE_DNSSD + # ifdef HAVE_COREFOUNDATION + static void dnssdAddAlias(const void *key, const void *value, + void *context); + # endif /* HAVE_COREFOUNDATION */ +-static char *dnssdBuildTxtRecord(int *txt_len, cupsd_printer_t *p, +- int for_lpd); +-static int dnssdComparePrinters(cupsd_printer_t *a, cupsd_printer_t *b); +-static void dnssdDeregisterPrinter(cupsd_printer_t *p); +-static char *dnssdPackTxtRecord(int *txt_len, char *keyvalue[][2], +- int count); + static void dnssdRegisterCallback(DNSServiceRef sdRef, + DNSServiceFlags flags, + DNSServiceErrorType errorCode, + const char *name, const char *regtype, + const char *domain, void *context); +-static void dnssdRegisterPrinter(cupsd_printer_t *p); +-static void dnssdStop(void); + static void dnssdUpdate(void); + #endif /* HAVE_DNSSD */ + ++#ifdef HAVE_AVAHI ++static AvahiStringList *avahiPackTxtRecord(char *keyvalue[][2], ++ int count); ++static void avahi_entry_group_cb (AvahiEntryGroup *group, ++ AvahiEntryGroupState state, ++ void *userdata); ++static void avahi_client_cb (AvahiClient *client, ++ AvahiClientState state, ++ void *userdata); ++#endif /* HAVE_AVAHI */ ++ + #ifdef HAVE_LDAP + static const char * const ldap_attrs[] =/* CUPS LDAP attributes */ + { +@@ -283,10 +310,10 @@ + ldap_dereg_printer(p); + #endif /* HAVE_LDAP */ + +-#ifdef HAVE_DNSSD +- if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ if (removeit && (BrowseLocalProtocols & BROWSE_DNSSD)) + dnssdDeregisterPrinter(p); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + } + + +@@ -702,10 +729,10 @@ + slpRegisterPrinter(p); */ + #endif /* HAVE_LIBSLP */ + +-#ifdef HAVE_DNSSD +- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ if ((BrowseLocalProtocols & BROWSE_DNSSD)) + dnssdRegisterPrinter(p); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + } + + +@@ -1419,6 +1446,27 @@ + #endif /* HAVE_LDAP */ + + ++#ifdef HAVE_AVAHI ++/* ++ * 'cupsdStartAvahiClient()' - Start an Avahi client if needed ++ */ ++ ++void ++cupsdStartAvahiClient(void) ++{ ++ if (!AvahiCupsClient && !AvahiCupsClientConnecting) ++ { ++ if (!AvahiCupsPollHandle) ++ AvahiCupsPollHandle = avahi_cups_poll_new (); ++ ++ if (AvahiCupsPollHandle) ++ avahi_client_new (avahi_cups_poll_get (AvahiCupsPollHandle), ++ AVAHI_CLIENT_NO_FAIL, avahi_client_cb, NULL, NULL); ++ } ++} ++#endif /* HAVE_AVAHI */ ++ ++ + /* + * 'cupsdStartBrowsing()' - Start sending and receiving broadcast information. + */ +@@ -1542,13 +1590,16 @@ + else + BrowseSocket = -1; + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_DNSSD) + { ++#ifdef HAVE_DNSSD + DNSServiceErrorType error; /* Error from service creation */ ++#endif /* HAVE_DNSSD */ + cupsd_listener_t *lis; /* Current listening socket */ + + ++#ifdef HAVE_DNSSD + /* + * First create a "master" connection for all registrations... + */ +@@ -1573,6 +1624,7 @@ + fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC); + + cupsdAddSelect(fd, (cupsd_selfunc_t)dnssdUpdate, NULL, NULL); ++#endif /* HAVE_DNSSD */ + + /* + * Then get the port we use for registrations. If we are not listening +@@ -1606,9 +1658,16 @@ + */ + + cupsdUpdateDNSSDName(); ++ ++#ifdef HAVE_AVAHI ++ cupsdStartAvahiClient (); ++#endif /* HAVE_AVAHI */ ++ ++#ifdef HAVE_DNSSD + } +- } + #endif /* HAVE_DNSSD */ ++ } ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + #ifdef HAVE_LIBSLP + if ((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) +@@ -1834,10 +1893,10 @@ + BrowseSocket = -1; + } + +-#ifdef HAVE_DNSSD +- if ((BrowseLocalProtocols & BROWSE_DNSSD) && DNSSDRef) ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) ++ if ((BrowseLocalProtocols & BROWSE_DNSSD)) + dnssdStop(); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + #ifdef HAVE_LIBSLP + if (((BrowseLocalProtocols | BrowseRemoteProtocols) & BROWSE_SLP) && +@@ -1902,7 +1961,7 @@ + } + + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + /* + * 'cupsdUpdateDNSSDName()' - Update the computer name we use for browsing... + */ +@@ -1910,8 +1969,14 @@ + void + cupsdUpdateDNSSDName(void) + { ++#ifdef HAVE_DNSSD + DNSServiceErrorType error; /* Error from service creation */ + char webif[1024]; /* Web interface share name */ ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ int ret; /* Error from service creation */ ++ char webif[AVAHI_LABEL_MAX]; /* Web interface share name */ ++#endif /* HAVE_AVAHI */ + # ifdef HAVE_SYSTEMCONFIGURATION + SCDynamicStoreRef sc; /* Context for dynamic store */ + CFDictionaryRef btmm; /* Back-to-My-Mac domains */ +@@ -2042,6 +2107,7 @@ + else + strlcpy(webif, "CUPS Web Interface", sizeof(webif)); + ++#ifdef HAVE_DNSSD + if (WebIFRef) + DNSServiceRefDeallocate(WebIFRef); + +@@ -2054,9 +2120,45 @@ + NULL)) != kDNSServiceErr_NoError) + cupsdLogMessage(CUPSD_LOG_ERROR, + "DNS-SD web interface registration failed: %d", error); ++#endif /* HAVE_DNSSD */ ++ ++#ifdef HAVE_AVAHI ++ if (!AvahiCupsClient) ++ /* ++ * Client not yet running. ++ */ ++ return; ++ ++ if (AvahiWebIFGroup) ++ avahi_entry_group_reset (AvahiWebIFGroup); ++ else ++ AvahiWebIFGroup = avahi_entry_group_new (AvahiCupsClient, ++ avahi_entry_group_cb, ++ NULL); ++ ++ if (AvahiWebIFGroup) ++ { ++ ret = avahi_entry_group_add_service (AvahiWebIFGroup, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, /* flags */ ++ webif, /* name */ ++ "_http._tcp", /* type */ ++ NULL, /* domain */ ++ NULL, /* host */ ++ DNSSDPort, /* port */ ++ "path=/", NULL); ++ if (ret == 0) ++ ret = avahi_entry_group_commit (AvahiWebIFGroup); ++ ++ if (ret != 0) ++ cupsdLogMessage (CUPSD_LOG_ERROR, ++ "Avahi web interface registration failed: %d", ret); ++ } ++#endif /* HAVE_AVAHI */ + } + } +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + + #ifdef HAVE_LDAP +@@ -2334,13 +2436,15 @@ + "Bad Back to My Mac domain in dynamic store!"); + } + # endif /* HAVE_COREFOUNDATION */ ++#endif /* HAVE_DNSSD */ + + ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + /* + * 'dnssdBuildTxtRecord()' - Build a TXT record from printer info. + */ + +-static char * /* O - TXT record */ ++static cupsd_txt_record_t /* O - TXT record */ + dnssdBuildTxtRecord( + int *txt_len, /* O - TXT record length */ + cupsd_printer_t *p, /* I - Printer information */ +@@ -2379,7 +2483,12 @@ + keyvalue[i ][0] = "ty"; + keyvalue[i++][1] = p->make_model ? p->make_model : "Unknown"; + +- snprintf(admin_hostname, sizeof(admin_hostname), "%s.local.", DNSSDHostName); ++ snprintf(admin_hostname, sizeof(admin_hostname), ++ "%s.local" ++#ifdef HAVE_DNSSD ++ "." /* terminating dot no good for Avahi */ ++#endif /* HAVE_DNSSD */ ++ , DNSSDHostName); + httpAssembleURIf(HTTP_URI_CODING_ALL, adminurl_str, sizeof(adminurl_str), + "http", NULL, admin_hostname, DNSSDPort, "/%s/%s", + (p->type & CUPS_PRINTER_CLASS) ? "classes" : "printers", +@@ -2462,7 +2571,12 @@ + * Then pack them into a proper txt record... + */ + ++#ifdef HAVE_DNSSD + return (dnssdPackTxtRecord(txt_len, keyvalue, i)); ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ return (avahiPackTxtRecord(keyvalue, i)); ++#endif /* HAVE_AVAHI */ + } + + +@@ -2474,7 +2588,16 @@ + dnssdComparePrinters(cupsd_printer_t *a,/* I - First printer */ + cupsd_printer_t *b)/* I - Second printer */ + { +- return (_cups_strcasecmp(a->reg_name, b->reg_name)); ++ if (!a->reg_name) ++ if (!b->reg_name) ++ return 0; ++ else ++ return -1; ++ else ++ if (!b->reg_name) ++ return 1; ++ else ++ return (_cups_strcasecmp(a->reg_name, b->reg_name)); + } + + +@@ -2489,6 +2612,10 @@ + { + cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdDeregisterPrinter(%s)", p->name); + ++#ifdef HAVE_DNSSD ++ if (!DNSSDRef) ++ return; ++ + /* + * Closing the socket deregisters the service + */ +@@ -2524,6 +2651,24 @@ + free(p->printer_txt); + p->printer_txt = NULL; + } ++#endif /* HAVE_DNSSD */ ++ ++#ifdef HAVE_AVAHI ++ if (p->avahi_group) ++ { ++ avahi_entry_group_reset (p->avahi_group); ++ avahi_entry_group_free (p->avahi_group); ++ p->avahi_group = NULL; ++ ++ if (p->ipp_txt) ++ avahi_string_list_free (p->ipp_txt); ++ ++ if (p->printer_txt) ++ avahi_string_list_free (p->printer_txt); ++ ++ p->ipp_txt = p->printer_txt = NULL; ++ } ++#endif /* HAVE_AVAHI */ + + /* + * Remove the printer from the array of DNS-SD printers, then clear the +@@ -2533,8 +2678,10 @@ + cupsArrayRemove(DNSSDPrinters, p); + cupsdClearString(&p->reg_name); + } ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + ++#ifdef HAVE_DNSSD + /* + * 'dnssdPackTxtRecord()' - Pack an array of key/value pairs into the + * TXT record format. +@@ -2644,8 +2791,10 @@ + LastEvent |= CUPSD_EVENT_PRINTER_MODIFIED; + } + } ++#endif /* HAVE_DNSSD */ + + ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + /* + * 'dnssdRegisterPrinter()' - Start sending broadcast information for a printer + * or update the broadcast contents. +@@ -2654,20 +2803,40 @@ + static void + dnssdRegisterPrinter(cupsd_printer_t *p)/* I - Printer */ + { ++#ifdef HAVE_DNSSD + DNSServiceErrorType se; /* dnssd errors */ + char *ipp_txt, /* IPP TXT record buffer */ + *printer_txt, /* LPD TXT record buffer */ +- name[1024], /* Service name */ +- *nameptr; /* Pointer into name */ ++ name[1024]; /* Service name */ + int ipp_len, /* IPP TXT record length */ + printer_len, /* LPD TXT record length */ + printer_port; /* LPD port number */ ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ int ret; /* Error code */ ++ AvahiStringList *ipp_txt, /* IPP TXT record */ ++ *printer_txt; /* LPD TXT record */ ++ char name[AVAHI_LABEL_MAX], /* Service name */ ++ fullsubtype[AVAHI_LABEL_MAX]; /* Full subtype */ ++ char *regtype_copy, /* Writeable copy of reg type */ ++ *subtype, /* Current service sub type */ ++ *nextsubtype; /* Next service sub type */ ++#endif /* HAVE_AVAHI */ ++ char *nameptr; /* Pointer into name */ + const char *regtype; /* Registration type */ + + ++#ifdef HAVE_DNSSD ++ if (!DNSSDRef) ++ return; ++ + cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, + !p->ipp_ref ? "new" : "update"); +- ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ cupsdLogMessage(CUPSD_LOG_DEBUG2, "dnssdRegisterPrinter(%s) %s", p->name, ++ !p->avahi_group ? "new" : "update"); ++#endif /* HAVE_AVAHI */ + /* + * If per-printer sharing was just disabled make sure we're not + * registered before returning. +@@ -2686,12 +2855,36 @@ + if (p->info && strlen(p->info) > 0) + { + if (DNSSDComputerName) +- snprintf(name, sizeof(name), "%s @ %s", p->info, DNSSDComputerName); ++ { ++ /* ++ * Make sure there is room for at least 15 characters of ++ * DNSSDComputerName. ++ */ ++ ++ assert(sizeof(name) >= 15 + 4); ++ nameptr = name + strlcpy(name, p->info, ++ sizeof(name) - 4 - ++ strnlen(DNSSDComputerName, 15)); ++ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); ++ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); ++ } + else + strlcpy(name, p->info, sizeof(name)); + } + else if (DNSSDComputerName) +- snprintf(name, sizeof(name), "%s @ %s", p->name, DNSSDComputerName); ++ { ++ /* ++ * Make sure there is room for at least 15 characters of ++ * DNSSDComputerName. ++ */ ++ ++ assert(sizeof(name) >= 15 + 4); ++ nameptr = name + strlcpy(name, p->info, ++ sizeof(name) - 4 - ++ strnlen(DNSSDComputerName, 15)); ++ nameptr += strlcpy(nameptr, " @ ", sizeof(name) - (nameptr - name)); ++ strlcpy(nameptr, DNSSDComputerName, sizeof(name) - (nameptr - name)); ++ } + else + strlcpy(name, p->name, sizeof(name)); + +@@ -2712,6 +2905,7 @@ + * Register IPP and (optionally) LPD... + */ + ++#ifdef HAVE_DNSSD + ipp_len = 0; /* anti-compiler-warning-code */ + ipp_txt = dnssdBuildTxtRecord(&ipp_len, p, 0); + +@@ -2884,6 +3078,209 @@ + + if (printer_txt) + free(printer_txt); ++#endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ if (!AvahiCupsClient) ++ /* ++ * Client not running yet. The client callback will call us again later. ++ */ ++ return; ++ ++ ipp_txt = dnssdBuildTxtRecord(NULL, p, 0); ++ printer_txt = dnssdBuildTxtRecord(NULL, p, 1); ++ regtype = (p->type & CUPS_PRINTER_FAX) ? "_fax-ipp._tcp" : DNSSDRegType; ++ ++ if (p->avahi_group && p->ipp_txt && ipp_txt && ++ !avahi_string_list_equal (p->ipp_txt, ipp_txt)) ++ { ++ /* ++ * Update the existing registration... ++ */ ++ ++ avahi_string_list_free (p->ipp_txt); ++ ++ if (p->printer_txt) ++ avahi_string_list_free (p->printer_txt); ++ ++ /* ++ * Update the service group entry. ++ */ ++ ++ regtype_copy = strdup (regtype); ++ subtype = strchr (regtype_copy, ','); ++ if (subtype) ++ *subtype = '\0'; ++ ++ cupsdLogMessage (CUPSD_LOG_DEBUG, ++ "Updating TXT record for %s (%s)", name, regtype_copy); ++ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, name, ++ regtype_copy, ++ NULL, ipp_txt); ++ free (regtype_copy); ++ ++ if (ret < 0) ++ goto update_failed; ++ ++ p->ipp_txt = ipp_txt; ++ ipp_txt = NULL; ++ ++ if (BrowseLocalProtocols & BROWSE_LPD) ++ { ++ ret = avahi_entry_group_update_service_txt_strlst (p->avahi_group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, name, ++ "_printer._tcp", NULL, ++ printer_txt); ++ if (ret < 0) ++ goto update_failed; ++ ++ p->printer_txt = printer_txt; ++ printer_txt = NULL; ++ } ++ ++ ret = avahi_entry_group_commit (p->avahi_group); ++ if (ret < 0) ++ { ++ update_failed: ++ cupsdLogMessage (CUPSD_LOG_ERROR, ++ "Failed to update TXT record for %s: %d", ++ name, ret); ++ avahi_entry_group_reset (p->avahi_group); ++ avahi_entry_group_free (p->avahi_group); ++ p->avahi_group = NULL; ++ ipp_txt = p->ipp_txt; ++ p->ipp_txt = NULL; ++ } ++ } ++ ++ if (!p->avahi_group) ++ { ++ /* ++ * Initial registration. Use the _fax subtype for fax queues... ++ */ ++ ++ p->avahi_group = avahi_entry_group_new (AvahiCupsClient, ++ avahi_entry_group_cb, ++ p); ++ ++ cupsdLogMessage(CUPSD_LOG_DEBUG, ++ "Registering Avahi printer %s with name \"%s\" and " ++ "type \"%s\"", p->name, name, regtype); ++ ++ if (!p->avahi_group) ++ { ++ ret = 0; ++ goto add_failed; ++ } ++ ++ /* ++ * Add each service type (DNSSDRegType may contain several, ++ * separated by commas). ++ */ ++ ++ subtype = regtype_copy = strdup (regtype); ++ while (subtype && *subtype) ++ { ++ nextsubtype = strchr (subtype, ','); ++ if (nextsubtype) ++ *nextsubtype++ = '\0'; ++ ++ if (subtype == regtype_copy) ++ { ++ /* ++ * Main type entry. ++ */ ++ ++ cupsdLogMessage (CUPSD_LOG_DEBUG, ++ "Adding TXT record for %s (%s)", name, regtype_copy); ++ ret = avahi_entry_group_add_service_strlst (p->avahi_group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, name, regtype_copy, ++ NULL, NULL, ++ DNSSDPort, ++ ipp_txt); ++ } ++ else ++ { ++ /* ++ * Sub-type entry. ++ */ ++ ++ snprintf (fullsubtype, sizeof(fullsubtype), ++ "%s._sub.%s", subtype, regtype_copy); ++ cupsdLogMessage (CUPSD_LOG_DEBUG, ++ "Adding TXT record for %s (%s)", name, fullsubtype); ++ ret = avahi_entry_group_add_service_subtype (p->avahi_group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, name, ++ regtype_copy, ++ NULL, fullsubtype); ++ } ++ ++ if (ret < 0) ++ { ++ free (regtype_copy); ++ goto add_failed; ++ } ++ ++ subtype = nextsubtype; ++ } ++ ++ free (regtype_copy); ++ p->ipp_txt = ipp_txt; ++ ipp_txt = NULL; ++ ++ if (BrowseLocalProtocols & BROWSE_LPD) ++ { ++ cupsdLogMessage(CUPSD_LOG_DEBUG, ++ "Registering Avahi printer %s with name \"%s\" and " ++ "type \"_printer._tcp\"", p->name, name); ++ ++ ret = avahi_entry_group_add_service_strlst (p->avahi_group, ++ AVAHI_IF_UNSPEC, ++ AVAHI_PROTO_UNSPEC, ++ 0, name, ++ "_printer._tcp", NULL, NULL, ++ 515, ++ printer_txt); ++ if (ret < 0) ++ goto add_failed; ++ ++ p->printer_txt = printer_txt; ++ printer_txt = NULL; ++ } ++ ++ ret = avahi_entry_group_commit (p->avahi_group); ++ ++ if (ret < 0) ++ { ++ add_failed: ++ cupsdLogMessage (CUPSD_LOG_ERROR, ++ "Failed to add Avahi entry for %s: %d", ++ name, ret); ++ if (p->avahi_group) ++ { ++ avahi_entry_group_reset (p->avahi_group); ++ avahi_entry_group_free (p->avahi_group); ++ p->avahi_group = NULL; ++ } ++ ipp_txt = p->ipp_txt; ++ p->ipp_txt = NULL; ++ } ++ } ++ ++ if (ipp_txt) ++ avahi_string_list_free (ipp_txt); ++ ++ if (printer_txt) ++ avahi_string_list_free (printer_txt); ++#endif /* HAVE_AVAHI */ + } + + +@@ -2896,6 +3293,10 @@ + { + cupsd_printer_t *p; /* Current printer */ + ++#ifdef HAVE_DNSSD ++ if (!DNSSDRef) ++ return; ++#endif /* HAVE_DNSSD */ + + /* + * De-register the individual printers +@@ -2906,6 +3307,7 @@ + p = (cupsd_printer_t *)cupsArrayNext(Printers)) + dnssdDeregisterPrinter(p); + ++#ifdef HAVE_DNSSD + /* + * Shutdown the rest of the service refs... + */ +@@ -2926,14 +3328,17 @@ + + DNSServiceRefDeallocate(DNSSDRef); + DNSSDRef = NULL; ++#endif /* HAVE_DNSSD */ + + cupsArrayDelete(DNSSDPrinters); + DNSSDPrinters = NULL; + + DNSSDPort = 0; + } ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + ++#ifdef HAVE_DNSSD + /* + * 'dnssdUpdate()' - Handle DNS-SD queries. + */ +@@ -2955,6 +3360,147 @@ + #endif /* HAVE_DNSSD */ + + ++#ifdef HAVE_AVAHI ++/* ++ * 'avahiPackTxtRecord()' - Pack an array of key/value pairs into an ++ * AvahiStringList. ++ */ ++ ++static AvahiStringList * /* O - new string list */ ++avahiPackTxtRecord(char *keyvalue[][2], /* I - Table of key value pairs */ ++ int count) /* I - Number of items in table */ ++{ ++ AvahiStringList *strlst = NULL; ++ char **elements; ++ size_t len; ++ int i = 0; ++ ++ elements = malloc ((1 + count) * sizeof (char *)); ++ if (!elements) ++ goto cleanup; ++ ++ for (i = 0; i < count; i++) ++ { ++ len = (1 + strlen (keyvalue[i][0]) + ++ (keyvalue[i][1] ? 1 + strlen (keyvalue[i][1]) : 1)); ++ elements[i] = malloc (len * sizeof (char)); ++ if (!elements[i]) ++ goto cleanup; ++ ++ snprintf (elements[i], len, "%s=%s", keyvalue[i][0], keyvalue[i][1]); ++ } ++ ++ strlst = avahi_string_list_new_from_array ((const char **) elements, count); ++ ++cleanup: ++ while (--i >= 0) ++ free (elements[i]); ++ ++ free (elements); ++ return (strlst); ++} ++ ++ ++/* ++ * 'avahi_entry_group_cb()' - Avahi entry group callback function. ++ */ ++static void ++avahi_entry_group_cb (AvahiEntryGroup *group, ++ AvahiEntryGroupState state, ++ void *userdata) ++{ ++ char *name; ++ ++ if (userdata) ++ name = ((cupsd_printer_t *) userdata)->reg_name; ++ else ++ name = "CUPS web interface"; ++ ++ switch (state) ++ { ++ case AVAHI_ENTRY_GROUP_UNCOMMITED: ++ case AVAHI_ENTRY_GROUP_REGISTERING: ++ break; ++ ++ case AVAHI_ENTRY_GROUP_ESTABLISHED: ++ cupsdLogMessage (CUPSD_LOG_DEBUG, ++ "Avahi entry group established for %s", name); ++ break; ++ ++ default: ++ cupsdLogMessage (CUPSD_LOG_DEBUG, ++ "Avahi entry group %s has state %d", ++ name, state); ++ break; ++ } ++} ++ ++ ++/* ++ * 'avahi_client_cb()' - Avahi client callback function. ++ */ ++static void ++avahi_client_cb (AvahiClient *client, ++ AvahiClientState state, ++ void *userdata) ++{ ++ cupsd_printer_t *printer; ++ switch (state) ++ { ++ case AVAHI_CLIENT_S_RUNNING: ++ /* ++ * Avahi client started successfully. ++ */ ++ AvahiCupsClient = client; ++ AvahiCupsClientConnecting = 0; ++ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client started"); ++ ++ cupsdUpdateDNSSDName (); ++ ++ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); ++ printer; ++ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) ++ if (Browsing && (BrowseLocalProtocols & BROWSE_DNSSD) && ++ (!(printer->type & (CUPS_PRINTER_REMOTE | CUPS_PRINTER_IMPLICIT | ++ CUPS_PRINTER_SCANNER))) && printer->shared) ++ dnssdRegisterPrinter (printer); ++ ++ break; ++ ++ case AVAHI_CLIENT_CONNECTING: ++ /* ++ * No Avahi daemon, client is waiting. ++ */ ++ AvahiCupsClientConnecting = 1; ++ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client connecting"); ++ break; ++ ++ case AVAHI_CLIENT_FAILURE: ++ /* ++ * Avahi client failed, close it to allow a clean restart. ++ */ ++ cupsdLogMessage (CUPSD_LOG_ERROR, ++ "Avahi client failed, " ++ "closing client to allow a clean restart"); ++ ++ for (printer = (cupsd_printer_t *)cupsArrayFirst(Printers); ++ printer; ++ printer = (cupsd_printer_t *)cupsArrayNext(Printers)) ++ dnssdDeregisterPrinter (printer); ++ ++ avahi_client_free(client); ++ AvahiCupsClientConnecting = 0; ++ AvahiCupsClient = NULL; ++ ++ break; ++ ++ default: ++ cupsdLogMessage (CUPSD_LOG_DEBUG, "Avahi client state: %d", state); ++ } ++} ++#endif /* HAVE_AVAHI */ ++ ++ + /* + * 'get_auth_info_required()' - Get the auth-info-required value to advertise. + */ +--- a/scheduler/dirsvc.h ++++ b/scheduler/dirsvc.h +@@ -31,6 +31,10 @@ + # endif /* HAVE_LDAP_SSL_H */ + #endif /* HAVE_LDAP */ + ++#ifdef HAVE_AVAHI ++# include ++#endif /* HAVE_AVAHI */ ++ + /* + * Browse protocols... + */ +@@ -131,19 +135,22 @@ + VAR cupsd_statbuf_t *PollStatusBuffer VALUE(NULL); + /* Status buffer for pollers */ + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + VAR char *DNSSDComputerName VALUE(NULL), + /* Computer/server name */ + *DNSSDHostName VALUE(NULL), + /* Hostname */ + *DNSSDRegType VALUE(NULL); + /* Bonjour registration type */ +-VAR cups_array_t *DNSSDAlias VALUE(NULL); +- /* List of dynamic ServerAlias's */ + VAR int DNSSDPort VALUE(0); + /* Port number to register */ + VAR cups_array_t *DNSSDPrinters VALUE(NULL); + /* Printers we have registered */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ ++ ++#ifdef HAVE_DNSSD ++VAR cups_array_t *DNSSDAlias VALUE(NULL); ++ /* List of dynamic ServerAlias's */ + VAR DNSServiceRef DNSSDRef VALUE(NULL), + /* Master DNS-SD service reference */ + WebIFRef VALUE(NULL), +@@ -152,6 +159,17 @@ + /* Remote printer browse reference */ + #endif /* HAVE_DNSSD */ + ++#ifdef HAVE_AVAHI ++VAR AvahiCupsPoll *AvahiCupsPollHandle VALUE(NULL); ++ /* AvahiCupsPoll object */ ++VAR AvahiClient *AvahiCupsClient VALUE(NULL); ++ /* AvahiClient object */ ++VAR int AvahiCupsClientConnecting VALUE(0); ++ /* Is AvahiClient object connecting? */ ++VAR AvahiEntryGroup *AvahiWebIFGroup VALUE(NULL); ++ /* Web interface entry group */ ++#endif /* HAVE_AVAHI */ ++ + #ifdef HAVE_LIBSLP + VAR SLPHandle BrowseSLPHandle VALUE(NULL); + /* SLP API handle */ +@@ -195,13 +213,14 @@ + extern void cupsdRestartPolling(void); + extern void cupsdSaveRemoteCache(void); + extern void cupsdSendBrowseList(void); ++extern void cupsdStartAvahiClient(void); + extern void cupsdStartBrowsing(void); + extern void cupsdStartPolling(void); + extern void cupsdStopBrowsing(void); + extern void cupsdStopPolling(void); +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + extern void cupsdUpdateDNSSDName(void); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + #ifdef HAVE_LDAP + extern void cupsdUpdateLDAPBrowse(void); + #endif /* HAVE_LDAP */ +--- a/scheduler/ipp.c ++++ b/scheduler/ipp.c +@@ -6087,7 +6087,7 @@ + ippAddDate(con->response, IPP_TAG_PRINTER, "printer-current-time", + ippTimeToDate(curtime)); + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + if (!ra || cupsArrayFind(ra, "printer-dns-sd-name")) + { + if (printer->reg_name) +@@ -6097,7 +6097,7 @@ + ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_NOVALUE, + "printer-dns-sd-name", 0); + } +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + if (!ra || cupsArrayFind(ra, "printer-error-policy")) + ippAddString(con->response, IPP_TAG_PRINTER, IPP_TAG_NAME, +--- a/scheduler/printers.c ++++ b/scheduler/printers.c +@@ -883,9 +883,9 @@ + cupsdClearString(&p->alert); + cupsdClearString(&p->alert_description); + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + cupsdClearString(&p->pdl); +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + + cupsArrayDelete(p->filetypes); + +@@ -3765,7 +3765,7 @@ + attr->values[i].string.text = _cupsStrAlloc(mimetype); + } + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + { + char pdl[1024]; /* Buffer to build pdl list */ + mime_filter_t *filter; /* MIME filter looping var */ +@@ -3821,7 +3821,7 @@ + + cupsdSetString(&p->pdl, pdl); + } +-#endif /* HAVE_DNSSD */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ + } + + +--- a/scheduler/printers.h ++++ b/scheduler/printers.h +@@ -16,6 +16,9 @@ + #ifdef HAVE_DNSSD + # include + #endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++# include "avahi.h" ++#endif /* HAVE_AVAHI */ + #include + + +@@ -95,16 +98,23 @@ + time_t marker_time; /* Last time marker attributes were updated */ + _ppd_cache_t *pc; /* PPD cache and mapping data */ + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + char *reg_name, /* Name used for service registration */ +- *pdl, /* pdl value for TXT record */ +- *ipp_txt, /* IPP TXT record contents */ ++ *pdl; /* pdl value for TXT record */ ++#endif /* defined(HAVE_DNSSD) || defined(HAVE_AVAHI) */ ++#ifdef HAVE_DNSSD ++ char *ipp_txt, /* IPP TXT record contents */ + *printer_txt; /* LPD TXT record contents */ + int ipp_len, /* IPP TXT record length */ + printer_len; /* LPD TXT record length */ + DNSServiceRef ipp_ref, /* Reference for _ipp._tcp,_cups */ + printer_ref; /* Reference for _printer._tcp */ + #endif /* HAVE_DNSSD */ ++#ifdef HAVE_AVAHI ++ AvahiStringList *ipp_txt, /* IPP TXT record */ ++ *printer_txt; /* LPD TXT record */ ++ AvahiEntryGroup *avahi_group; /* Avahi entry group */ ++#endif /* HAVE_AVAHI */ + }; + + +--- a/scheduler/conf.c ++++ b/scheduler/conf.c +@@ -650,7 +650,7 @@ + Browsing = CUPS_DEFAULT_BROWSING; + DefaultShared = CUPS_DEFAULT_DEFAULT_SHARED; + +-#ifdef HAVE_DNSSD ++#if defined(HAVE_DNSSD) || defined(HAVE_AVAHI) + cupsdSetString(&DNSSDRegType, "_ipp._tcp,_cups"); + #endif /* HAVE_DNSSD */ + diff --git a/~mtjm/cups-usblp/cups-no-export-ssllibs.patch b/~mtjm/cups-usblp/cups-no-export-ssllibs.patch new file mode 100644 index 000000000..9be3c819b --- /dev/null +++ b/~mtjm/cups-usblp/cups-no-export-ssllibs.patch @@ -0,0 +1,12 @@ +diff -up cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs cups-1.5b1/config-scripts/cups-ssl.m4 +--- cups-1.5b1/config-scripts/cups-ssl.m4.no-export-ssllibs 2011-05-11 02:52:08.000000000 +0200 ++++ cups-1.5b1/config-scripts/cups-ssl.m4 2011-05-23 17:47:27.000000000 +0200 +@@ -164,7 +164,7 @@ AC_SUBST(IPPALIASES) + AC_SUBST(SSLFLAGS) + AC_SUBST(SSLLIBS) + +-EXPORT_SSLLIBS="$SSLLIBS" ++EXPORT_SSLLIBS="" + AC_SUBST(EXPORT_SSLLIBS) + + diff --git a/~mtjm/cups-usblp/cups-no-gcrypt.patch b/~mtjm/cups-usblp/cups-no-gcrypt.patch new file mode 100644 index 000000000..42f71d0d4 --- /dev/null +++ b/~mtjm/cups-usblp/cups-no-gcrypt.patch @@ -0,0 +1,38 @@ +diff -ruN cups-1.4.7.orig//config-scripts/cups-ssl.m4 cups-1.4.7/config-scripts/cups-ssl.m4 +--- cups-1.5.0.orig//config-scripts/cups-ssl.m4 2011-01-11 08:05:58.000000000 +0100 ++++ cups-1.5.0/config-scripts/cups-ssl.m4 2011-08-02 10:44:26.011047900 +0200 +@@ -96,7 +96,6 @@ + dnl Then look for GNU TLS... + if test $have_ssl = 0 -a "x$enable_gnutls" != "xno" -a "x$PKGCONFIG" != x; then + AC_PATH_PROG(LIBGNUTLSCONFIG,libgnutls-config) +- AC_PATH_PROG(LIBGCRYPTCONFIG,libgcrypt-config) + if $PKGCONFIG --exists gnutls; then + have_ssl=1 + SSLLIBS=`$PKGCONFIG --libs gnutls` +@@ -110,16 +109,6 @@ + AC_DEFINE(HAVE_SSL) + AC_DEFINE(HAVE_GNUTLS) + fi +- +- if test $have_ssl = 1; then +- if $PKGCONFIG --exists gcrypt; then +- SSLLIBS="$SSLLIBS `$PKGCONFIG --libs gcrypt`" +- SSLFLAGS="$SSLFLAGS `$PKGCONFIG --cflags gcrypt`" +- elif test "x$LIBGCRYPTCONFIG" != x; then +- SSLLIBS="$SSLLIBS `$LIBGCRYPTCONFIG --libs`" +- SSLFLAGS="$SSLFLAGS `$LIBGCRYPTCONFIG --cflags`" +- fi +- fi + fi + + dnl Check for the OpenSSL library last... +--- cups-1.5.0.orig//cups/http-private.h 2011-01-22 01:07:22.000000000 +0100 ++++ cups-1.5.0/cups/http-private.h 2011-08-02 10:42:43.341604107 +0200 +@@ -93,7 +93,6 @@ + # elif defined HAVE_GNUTLS + # include + # include +-# include + # elif defined(HAVE_CDSASSL) + # include + # include diff --git a/~mtjm/cups-usblp/cups.install b/~mtjm/cups-usblp/cups.install new file mode 100644 index 000000000..47c3d9b82 --- /dev/null +++ b/~mtjm/cups-usblp/cups.install @@ -0,0 +1,26 @@ +post_install() { + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi + echo ">> If you use an HTTPS connection to CUPS, the first time you access" + echo ">> the interface it may take a very long time before the site comes up." + echo ">> This is because the first request triggers the generation of the CUPS" + echo ">> SSL certificates which can be a very time-consuming job." +} + +post_upgrade() { + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi + if [ "`vercmp $2 1.4.7-2`" -lt 0 ]; then + # important upgrade notice + echo "daemon script has been renamed to /etc/rc.d/cupsd" + echo "change your entry in /etc/rc.conf" + fi +} + +post_remove() { + if [ -x usr/bin/xdg-icon-resource ]; then + xdg-icon-resource forceupdate --theme hicolor 2> /dev/null + fi +} diff --git a/~mtjm/cups-usblp/cups.logrotate b/~mtjm/cups-usblp/cups.logrotate new file mode 100644 index 000000000..9c49bbdaf --- /dev/null +++ b/~mtjm/cups-usblp/cups.logrotate @@ -0,0 +1,8 @@ +/var/log/cups/*log { + missingok + notifempty + delaycompress + postrotate + /bin/kill -HUP `cat /var/run/cups.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/~mtjm/cups-usblp/cups.pam b/~mtjm/cups-usblp/cups.pam new file mode 100644 index 000000000..53724d1f8 --- /dev/null +++ b/~mtjm/cups-usblp/cups.pam @@ -0,0 +1,3 @@ +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so -- cgit v1.2.3-54-g00ecf From 2aa2acfff38de7de825868995e49792ecfc03126 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 24 Jan 2012 23:15:03 +0000 Subject: Tue Jan 24 23:15:02 UTC 2012 --- community-staging/gdk-pixbuf/PKGBUILD | 43 +++ .../gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch | 48 ++++ .../gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch | 19 ++ .../gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch | 134 +++++++++ .../gdk-pixbuf/gdk-pixbuf-0.22.0.patch | 129 +++++++++ community-staging/gdk-pixbuf/libpng15.patch | 30 ++ community-staging/libharu/PKGBUILD | 34 +++ community-staging/libharu/libpng15.patch | 302 +++++++++++++++++++++ community-staging/mapnik/PKGBUILD | 51 ++++ community-staging/mapnik/mapnik.install | 11 + community-staging/openmotif/PKGBUILD | 45 +++ community-staging/python2-matplotlib/PKGBUILD | 52 ++++ community-staging/python2-matplotlib/setup.cfg | 83 ++++++ community-staging/qpxtool/PKGBUILD | 28 ++ community-staging/qpxtool/libpng15.patch | 127 +++++++++ community-staging/rawstudio/PKGBUILD | 36 +++ community-staging/rawstudio/libpng15.patch | 40 +++ community-staging/rawstudio/rawstudio.install | 11 + community/libircclient/PKGBUILD | 4 +- community/packagekit/PKGBUILD | 43 +-- community/packagekit/alpm.patch | 230 +++++++++++++--- community/tinyproxy/PKGBUILD | 7 +- community/tinyproxy/tinyproxy | 6 +- community/tinyproxy/tinyproxy.install | 9 + core/btrfs-progs/PKGBUILD | 31 +++ core/iproute2/PKGBUILD | 14 +- core/iproute2/fix-ip-l.patch | 27 ++ extra/freeglut/PKGBUILD | 25 +- extra/gptfdisk/PKGBUILD | 6 +- extra/memcached/PKGBUILD | 6 +- extra/perl-alien-sdl/PKGBUILD | 10 +- multilib/lib32-sdl_image/PKGBUILD | 6 +- staging/avahi/PKGBUILD | 75 +++++ staging/avahi/gnome-nettool.png | Bin 0 -> 4509 bytes staging/avahi/install | 21 ++ staging/avahi/rc.d.patch | 11 + staging/bmp/0.9.7.1-visualization.patch | 12 + staging/bmp/PKGBUILD | 34 +++ staging/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch | 108 ++++++++ staging/bmp/bmp.install | 11 + staging/gtk-engines/PKGBUILD | 28 ++ staging/gtkhtml/PKGBUILD | 31 +++ staging/gtkmm/PKGBUILD | 38 +++ staging/gtksourceview2/PKGBUILD | 28 ++ staging/imlib2/PKGBUILD | 38 +++ staging/libgnomecanvas/PKGBUILD | 27 ++ staging/opengtl/PKGBUILD | 32 +++ staging/pekwm/PKGBUILD | 45 +++ staging/pekwm/libpng-1.4.patch | 21 ++ staging/pekwm/pekwm.desktop | 8 + staging/pilot-link/PKGBUILD | 32 +++ staging/pilot-link/pilot-link-png14.patch | 100 +++++++ staging/pygtk/PKGBUILD | 37 +++ staging/pygtk/python27.patch | 50 ++++ staging/skanlite/PKGBUILD | 30 ++ staging/xawtv/PKGBUILD | 29 ++ staging/xorg-xcursorgen/PKGBUILD | 28 ++ testing/gcc/PKGBUILD | 260 ++++++++++++++++++ testing/gcc/gcc-ada.install | 20 ++ testing/gcc/gcc-fortran.install | 16 ++ testing/gcc/gcc-go.install | 20 ++ testing/gcc/gcc-hash-style-both.patch | 122 +++++++++ testing/gcc/gcc-libs.install | 16 ++ testing/gcc/gcc.install | 20 ++ testing/gcc/gcc_pure64.patch | 26 ++ 65 files changed, 2927 insertions(+), 94 deletions(-) create mode 100644 community-staging/gdk-pixbuf/PKGBUILD create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch create mode 100644 community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch create mode 100644 community-staging/gdk-pixbuf/libpng15.patch create mode 100644 community-staging/libharu/PKGBUILD create mode 100644 community-staging/libharu/libpng15.patch create mode 100644 community-staging/mapnik/PKGBUILD create mode 100644 community-staging/mapnik/mapnik.install create mode 100644 community-staging/openmotif/PKGBUILD create mode 100644 community-staging/python2-matplotlib/PKGBUILD create mode 100644 community-staging/python2-matplotlib/setup.cfg create mode 100644 community-staging/qpxtool/PKGBUILD create mode 100644 community-staging/qpxtool/libpng15.patch create mode 100644 community-staging/rawstudio/PKGBUILD create mode 100644 community-staging/rawstudio/libpng15.patch create mode 100644 community-staging/rawstudio/rawstudio.install create mode 100644 community/tinyproxy/tinyproxy.install create mode 100644 core/btrfs-progs/PKGBUILD create mode 100644 core/iproute2/fix-ip-l.patch create mode 100644 staging/avahi/PKGBUILD create mode 100644 staging/avahi/gnome-nettool.png create mode 100644 staging/avahi/install create mode 100644 staging/avahi/rc.d.patch create mode 100644 staging/bmp/0.9.7.1-visualization.patch create mode 100644 staging/bmp/PKGBUILD create mode 100644 staging/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch create mode 100644 staging/bmp/bmp.install create mode 100644 staging/gtk-engines/PKGBUILD create mode 100644 staging/gtkhtml/PKGBUILD create mode 100644 staging/gtkmm/PKGBUILD create mode 100644 staging/gtksourceview2/PKGBUILD create mode 100644 staging/imlib2/PKGBUILD create mode 100644 staging/libgnomecanvas/PKGBUILD create mode 100644 staging/opengtl/PKGBUILD create mode 100644 staging/pekwm/PKGBUILD create mode 100644 staging/pekwm/libpng-1.4.patch create mode 100644 staging/pekwm/pekwm.desktop create mode 100644 staging/pilot-link/PKGBUILD create mode 100644 staging/pilot-link/pilot-link-png14.patch create mode 100644 staging/pygtk/PKGBUILD create mode 100644 staging/pygtk/python27.patch create mode 100644 staging/skanlite/PKGBUILD create mode 100644 staging/xawtv/PKGBUILD create mode 100644 staging/xorg-xcursorgen/PKGBUILD create mode 100644 testing/gcc/PKGBUILD create mode 100644 testing/gcc/gcc-ada.install create mode 100644 testing/gcc/gcc-fortran.install create mode 100644 testing/gcc/gcc-go.install create mode 100644 testing/gcc/gcc-hash-style-both.patch create mode 100644 testing/gcc/gcc-libs.install create mode 100644 testing/gcc/gcc.install create mode 100644 testing/gcc/gcc_pure64.patch (limited to 'community') diff --git a/community-staging/gdk-pixbuf/PKGBUILD b/community-staging/gdk-pixbuf/PKGBUILD new file mode 100644 index 000000000..8c9a1bced --- /dev/null +++ b/community-staging/gdk-pixbuf/PKGBUILD @@ -0,0 +1,43 @@ +# $Id: PKGBUILD 62652 2012-01-23 09:38:23Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: dorphell +# Contributor: Judd Vinet + +pkgname=gdk-pixbuf +pkgver=0.22.0 +pkgrel=9 +pkgdesc="Image loading and manipulation library" +arch=('i686' 'x86_64') +url="http://www.gtk.org/" +license=('GPL' 'LGPL') +depends=('gtk' 'libtiff' 'libpng') +makedepends=('libxt') +options=('!libtool') +source=(ftp://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.24/${pkgname}-${pkgver}.tar.bz2 + gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch + gdk-pixbuf-0.22.0-bmp_secure.patch + gdk-pixbuf-0.22.0-loaders.patch + gdk-pixbuf-0.22.0.patch + libpng15.patch) +md5sums=('05fcb68ceaa338614ab650c775efc2f2' + 'd1fb93f1ae994875158a7e0c108c36f8' + '5f59d5772b1482d885a180dbc581cf84' + '3cf31ae0509747f72ac27a9fd96109c2' + 'e0f5f301ce958b7cea0be631ed7b8e56' + '16db4dc83d507ebcf15d1beb753a77bc') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + export SED=/bin/sed + patch -Np1 -i ${srcdir}/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch + patch -Np0 -i ${srcdir}/gdk-pixbuf-0.22.0-bmp_secure.patch + patch -Np1 -i ${srcdir}/gdk-pixbuf-0.22.0-loaders.patch + patch -Np0 -i ${srcdir}/gdk-pixbuf-0.22.0.patch + patch -Np1 -i ${srcdir}/libpng15.patch + libtoolize --force --copy --automake + autoreconf --force --install + ./configure --prefix=/usr --disable-gtk-doc + make + make DESTDIR=${pkgdir} install + rm -rf ${pkgdir}/usr/share/gnome +} diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch new file mode 100644 index 000000000..ffb4378aa --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch @@ -0,0 +1,48 @@ +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-bmp.c 2002-09-27 23:12:40.000000000 +0200 ++++ gdk-pixbuf-0.22.0.patched/gdk-pixbuf/io-bmp.c 2005-03-30 01:33:06.000000000 +0200 +@@ -31,8 +31,6 @@ + #include "gdk-pixbuf-private.h" + #include "gdk-pixbuf-io.h" + +- +- + #if 0 + /* If these structures were unpacked, they would define the two headers of the + * BMP file. After them comes the palette, and then the image data. +@@ -206,7 +204,7 @@ + + if (State == NULL) + return NULL; +- ++ + while (feof(f) == 0) { + length = fread(membuf, 1, sizeof (membuf), f); + if (length > 0) +@@ -245,11 +243,26 @@ + static gboolean + grow_buffer (struct bmp_progressive_state *State) + { +- guchar *tmp = realloc (State->buff, State->BufferSize); ++ guchar *tmp; ++ ++ if (State->BufferSize == 0) { ++#if 0 ++ g_set_error (error, ++ GDK_PIXBUF_ERROR, ++ GDK_PIXBUF_ERROR_CORRUPT_IMAGE, ++ _("BMP image has bogus header data")); ++#endif ++ State->read_state = READ_STATE_ERROR; ++ return FALSE; ++ } ++ ++ tmp = realloc (State->buff, State->BufferSize); ++ + if (!tmp) { + State->read_state = READ_STATE_ERROR; + return FALSE; + } ++ + State->buff = tmp; + return TRUE; + } diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch new file mode 100644 index 000000000..29471f147 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_secure.patch @@ -0,0 +1,19 @@ +Index: io-bmp.c +=================================================================== +RCS file: /cvs/gnome/gtk+/gdk-pixbuf/io-bmp.c,v +retrieving revision 1.41 +diff -u -p -r1.41 io-bmp.c +--- gdk-pixbuf/io-bmp.c 13 Aug 2004 02:26:57 -0000 1.41 ++++ gdk-pixbuf/io-bmp.c 20 Aug 2004 00:18:14 -0000 +@@ -876,8 +876,10 @@ DoCompressed(struct bmp_progressive_stat + guchar c; + gint idx; + +- if (context->compr.y >= context->Header.height) ++ if (context->compr.y >= context->Header.height) { ++ context->BufferDone = 0; + return TRUE; ++ } + + y = context->compr.y; + diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch new file mode 100644 index 000000000..068653808 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0-loaders.patch @@ -0,0 +1,134 @@ +diff -NurdB gdk-pixbuf-0.22.0/gdk-pixbuf/io-ico.c gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-ico.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-ico.c 2002-09-27 17:19:15.000000000 -0500 ++++ gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-ico.c 2005-10-27 11:28:23.000000000 -0500 +@@ -330,6 +330,9 @@ + + State->HeaderSize+=I; + ++ if (State->HeaderSize < 0) ++ return FALSE; ++ + if (State->HeaderSize>State->BytesInHeaderBuf) { + guchar *tmp=realloc(State->HeaderBuf,State->HeaderSize); + if (!tmp) +diff -NurdB gdk-pixbuf-0.22.0/gdk-pixbuf/io-xpm.c gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-xpm.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-xpm.c 2001-03-01 15:16:28.000000000 -0500 ++++ gdk-pixbuf-0.22.0-patched/gdk-pixbuf/io-xpm.c 2005-10-27 11:29:14.000000000 -0500 +@@ -243,8 +243,8 @@ + break; + else { + if (numnames > 0) { +- space -= 1; +- strcat (color, " "); ++ strncat (color, " ", space); ++ space -= MIN (space, 1); + } + + strncat (color, temp, space); +@@ -281,7 +281,8 @@ + /* Fall through to the xpm_read_string. */ + + case op_body: +- xpm_read_string (h->infile, &h->buffer, &h->buffer_size); ++ if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size)) ++ return NULL; + return h->buffer; + + default: +@@ -317,13 +318,6 @@ + return NULL; + } + +-/* Destroy notification function for the pixbuf */ +-static void +-free_buffer (guchar *pixels, gpointer data) +-{ +- free (pixels); +-} +- + static gboolean + xpm_color_parse (const char *spec, XColor *color) + { +@@ -342,7 +336,8 @@ + gchar pixel_str[32]; + GHashTable *color_hash; + _XPMColor *colors, *color, *fallbackcolor; +- guchar *pixels, *pixtmp; ++ guchar *pixtmp; ++ GdkPixbuf* pixbuf; + + fallbackcolor = NULL; + +@@ -352,16 +347,33 @@ + return NULL; + } + sscanf (buffer, "%d %d %d %d", &w, &h, &n_col, &cpp); +- if (cpp >= 32) { +- g_warning ("XPM has more than 31 chars per pixel."); ++ if (cpp <= 0 || cpp >= 32) { ++ g_warning ("XPM has invalid number of chars per pixel."); + return NULL; + } ++ if (n_col <= 0 || ++ n_col >= G_MAXINT / (cpp + 1) || ++ n_col >= G_MAXINT / sizeof (_XPMColor)) { ++ g_warning ("XPM file has invalid number of colors"); ++ return NULL; ++ } + + /* The hash is used for fast lookups of color from chars */ + color_hash = g_hash_table_new (g_str_hash, g_str_equal); + +- name_buf = g_new (gchar, n_col * (cpp + 1)); +- colors = g_new (_XPMColor, n_col); ++ name_buf = g_new (gchar, n_col * (cpp + 1)); ++ if (!name_buf) { ++ g_warning ("Cannot allocate memory for loading XPM image"); ++ g_hash_table_destroy (color_hash); ++ return NULL; ++ } ++ colors = g_new (_XPMColor, n_col); ++ if (!colors) { ++ g_warning ("Cannot allocate memory for loading XPM image"); ++ g_hash_table_destroy (color_hash); ++ g_free (name_buf); ++ return NULL; ++ } + + for (cnt = 0; cnt < n_col; cnt++) { + gchar *color_name; +@@ -397,12 +409,8 @@ + fallbackcolor = color; + } + +- if (is_trans) +- pixels = malloc (w * h * 4); +- else +- pixels = malloc (w * h * 3); +- +- if (!pixels) { ++ pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, is_trans, 8, w, h); ++ if (!pixbuf) { + g_hash_table_destroy (color_hash); + g_free (colors); + g_free (name_buf); +@@ -410,7 +418,7 @@ + } + + wbytes = w * cpp; +- pixtmp = pixels; ++ pixtmp = pixbuf->pixels; + + for (ycnt = 0; ycnt < h; ycnt++) { + buffer = (*get_buf) (op_body, handle); +@@ -443,9 +451,7 @@ + g_free (colors); + g_free (name_buf); + +- return gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, is_trans, 8, +- w, h, is_trans ? (w * 4) : (w * 3), +- free_buffer, NULL); ++ return pixbuf; + } + + /* Shared library entry point for file loading */ diff --git a/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch new file mode 100644 index 000000000..8e0f55680 --- /dev/null +++ b/community-staging/gdk-pixbuf/gdk-pixbuf-0.22.0.patch @@ -0,0 +1,129 @@ +--- configure.in ++++ configure.in +@@ -21,6 +21,7 @@ + AC_PROG_CC + AC_ISC_POSIX + AM_PROG_CC_STDC ++AM_PROG_AS + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET +@@ -147,18 +148,18 @@ + dnl Test for libtiff + if test -z "$LIBTIFF"; then + AC_CHECK_LIB(tiff, TIFFReadScanline, +- AC_CHECK_HEADER(tiffio.h, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_CHECK_LIB(tiff, TIFFWriteScanline, +- AC_CHECK_HEADER(tiffio.h, ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ [AC_CHECK_LIB(tiff, TIFFWriteScanline, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_CHECK_LIB(tiff34, TIFFFlushData, +- AC_CHECK_HEADER(tiffio.h, ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ [AC_CHECK_LIB(tiff34, TIFFFlushData, ++ [AC_CHECK_HEADER(tiffio.h, + TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz', +- AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)), +- AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm), -ljpeg -lz -lm), -lm) ++ AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))], ++ AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm) + fi + + dnl Test for libjpeg +@@ -191,9 +192,9 @@ + dnl Test for libpng + if test -z "$LIBPNG"; then + AC_CHECK_LIB(png, png_read_info, +- AC_CHECK_HEADER(png.h, ++ [AC_CHECK_HEADER(png.h, + png_ok=yes, +- png_ok=no), ++ png_ok=no)], + AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm) + if test "$png_ok" = yes; then + AC_MSG_CHECKING([for png_structp in png.h]) +--- doc/Makefile.am ++++ doc/Makefile.am +@@ -156,7 +156,7 @@ + done; \ + fi) + # echo '-- Installing $(srcdir)/html/index.sgml' ; \ +-# $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ ++# $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); + + # + # Require gtk-doc when making dist +--- gdk-pixbuf.m4 ++++ gdk-pixbuf.m4 +@@ -9,7 +9,7 @@ + dnl AM_PATH_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS + dnl +-AC_DEFUN(AM_PATH_GDK_PIXBUF, ++AC_DEFUN([AM_PATH_GDK_PIXBUF], + [dnl + dnl Get the cflags and libraries from the gdk-pixbuf-config script + dnl +--- gdk-pixbuf/Makefile.am ++++ gdk-pixbuf/Makefile.am +@@ -18,7 +18,7 @@ + + libgnomecanvaspixbuf_la_LDFLAGS = -version-info 1:0:0 $(EXTRA_GNOME_LIBS) + +-libexecdir = $(libdir)/gdk-pixbuf/loaders ++loaderdir = $(libdir)/gdk-pixbuf/loaders + + # + # The PNG plugin. +@@ -118,7 +118,7 @@ + + if BUILD_DYNAMIC_MODULES + +-libexec_LTLIBRARIES = \ ++loader_LTLIBRARIES = \ + $(PNG_LIB) \ + $(JPEG_LIB) \ + $(GIF_LIB) \ +@@ -134,7 +134,7 @@ + extra_sources = + + else +-libexec_LTLIBRARIES = ++loader_LTLIBRARIES = + + extra_sources = $(libpixbufloader_png_la_SOURCES) \ + $(libpixbufloader_jpeg_la_SOURCES) \ +@@ -159,7 +159,7 @@ + -I$(top_builddir)/gdk-pixbuf \ + $(X11_CFLAGS) $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GNOME_CFLAGS) + +-AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(libexecdir)\"" ++AM_CPPFLAGS = "-DPIXBUF_LIBDIR=\"$(loaderdir)\"" + + LDADDS = libgdk_pixbuf.la $(GLIB_LIBS) $(GTK_LIBS) $(STATIC_LIB_DEPS) + +@@ -211,7 +211,7 @@ + gdk-pixbuf-parse-color.c \ + $(extra_sources) + +-libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) $(X11_LIBS) ++libgdk_pixbuf_xlib_la_LDFLAGS = -version-info 2:0:0 -export-dynamic $(GLIB_LIBS) + libgdk_pixbuf_xlib_la_LIBADD = pixops/libpixops.la libgdk_pixbuf.la $(GTK_LIBS) + + +--- gdk-pixbuf/io-bmp.c ++++ gdk-pixbuf/io-bmp.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include "gdk-pixbuf-private.h" + #include "gdk-pixbuf-io.h" + diff --git a/community-staging/gdk-pixbuf/libpng15.patch b/community-staging/gdk-pixbuf/libpng15.patch new file mode 100644 index 000000000..e667288f8 --- /dev/null +++ b/community-staging/gdk-pixbuf/libpng15.patch @@ -0,0 +1,30 @@ +diff -wbBur gdk-pixbuf-0.22.0/gdk-pixbuf/io-png.c gdk-pixbuf-0.22.0.my/gdk-pixbuf/io-png.c +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-png.c 2001-01-24 23:59:23.000000000 +0300 ++++ gdk-pixbuf-0.22.0.my/gdk-pixbuf/io-png.c 2012-01-23 13:33:08.000000000 +0400 +@@ -175,7 +175,7 @@ + return NULL; + } + +- if (setjmp (png_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(png_ptr))) { + png_destroy_read_struct (&png_ptr, &info_ptr, &end_info); + return NULL; + } +@@ -311,7 +311,7 @@ + return NULL; + } + +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + if (lc->png_info_ptr) + png_destroy_read_struct(&lc->png_read_ptr, NULL, NULL); + g_free(lc); +@@ -366,7 +366,7 @@ + lc->max_row_seen_in_chunk = -1; + + /* Invokes our callbacks as needed */ +- if (setjmp (lc->png_read_ptr->jmpbuf)) { ++ if (setjmp (png_jmpbuf(lc->png_read_ptr))) { + return FALSE; + } else { + png_process_data(lc->png_read_ptr, lc->png_info_ptr, buf, size); diff --git a/community-staging/libharu/PKGBUILD b/community-staging/libharu/PKGBUILD new file mode 100644 index 000000000..862dab0ce --- /dev/null +++ b/community-staging/libharu/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 62648 2012-01-23 08:59:04Z spupykin $ +# Maintainer: Sergej Pupykin +# Maintainer : SpepS +# Contributor: Auguste +# Contributor: Jose Negron + +pkgname=libharu +pkgver=2.2.1 +pkgrel=2 +pkgdesc="C/C++ library for generating PDF documents" +url="http://libharu.org/wiki/Main_Page" +arch=('i686' 'x86_64') +license=('custom:ZLIB') +depends=('libpng' 'gcc-libs') +options=(!libtool) +source=("http://libharu.org/files/$pkgname-$pkgver.tar.gz" + libpng15.patch) +md5sums=('63da8e087744f1d6cf16f9501b1cb766' + '3793dd30017474bcd277af3b419bc0f6') + +build() { + cd "$srcdir/$pkgname-$pkgver" + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" install + # license + install -d "$pkgdir/usr/share/licenses/$pkgname" + sed -n '102,120p' README > "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/community-staging/libharu/libpng15.patch b/community-staging/libharu/libpng15.patch new file mode 100644 index 000000000..05a8d39fc --- /dev/null +++ b/community-staging/libharu/libpng15.patch @@ -0,0 +1,302 @@ +diff -wbBur libharu-2.2.1/src/hpdf_image_png.c libharu-2.2.1.my/src/hpdf_image_png.c +--- libharu-2.2.1/src/hpdf_image_png.c 2010-02-08 12:27:51.000000000 +0300 ++++ libharu-2.2.1.my/src/hpdf_image_png.c 2012-01-23 12:53:05.000000000 +0400 +@@ -110,13 +110,13 @@ + { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + png_bytep* row_pointers = HPDF_GetMem (image->mmgr, +- info_ptr->height * sizeof (png_bytep)); ++ png_image_height(png_ptr, info_ptr) * sizeof (png_bytep)); + + if (row_pointers) { + HPDF_UINT i; + +- HPDF_MemSet (row_pointers, 0, info_ptr->height * sizeof (png_bytep)); +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ HPDF_MemSet (row_pointers, 0, png_image_height(png_ptr, info_ptr) * sizeof (png_bytep)); ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_pointers[i] = HPDF_GetMem (image->mmgr, len); + + if (image->error->error_no != HPDF_OK) +@@ -126,7 +126,7 @@ + if (image->error->error_no == HPDF_OK) { + png_read_image(png_ptr, row_pointers); + if (image->error->error_no == HPDF_OK) { /* add this line */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + if (HPDF_Stream_Write (image->stream, row_pointers[i], len) != + HPDF_OK) + break; +@@ -135,7 +135,7 @@ + } + + /* clean up */ +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_pointers[i]); + } + +@@ -156,7 +156,7 @@ + if (buf_ptr) { + HPDF_UINT i; + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + png_read_rows(png_ptr, (png_byte**)&buf_ptr, NULL, 1); + if (image->error->error_no != HPDF_OK) + break; +@@ -183,13 +183,13 @@ + HPDF_UINT i, j; + png_bytep *row_ptr; + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, png_image_height(png_ptr, info_ptr) * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -207,19 +207,19 @@ + goto Error; + } + +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { +- smask_data[info_ptr->width * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = (row_ptr[j][i] < num_trans) ? trans[row_ptr[j][i]] : 0xFF; + } + +- if (HPDF_Stream_Write (image->stream, row_ptr[j], info_ptr->width) != HPDF_OK) { ++ if (HPDF_Stream_Write (image->stream, row_ptr[j], png_image_width(png_ptr, info_ptr)) != HPDF_OK) { + ret = HPDF_FILE_IO_ERROR; + goto Error; + } + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -245,13 +245,13 @@ + return HPDF_INVALID_PNG_IMAGE; + } + +- row_ptr = HPDF_GetMem (image->mmgr, info_ptr->height * sizeof(png_bytep)); ++ row_ptr = HPDF_GetMem (image->mmgr, png_image_height(png_ptr, info_ptr) * sizeof(png_bytep)); + if (!row_ptr) { + return HPDF_FAILD_TO_ALLOC_MEM; + } else { + png_uint_32 len = png_get_rowbytes(png_ptr, info_ptr); + +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + row_ptr[i] = HPDF_GetMem(image->mmgr, len); + if (!row_ptr[i]) { + for (; i >= 0; i--) { +@@ -271,12 +271,12 @@ + + switch (color_type) { + case PNG_COLOR_TYPE_RGB_ALPHA: +- row_len = 3 * info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = 3 * png_image_width(png_ptr, info_ptr) * sizeof(png_byte); ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { + row = row_ptr[j]; + memmove(row + (3 * i), row + (4*i), 3); +- smask_data[info_ptr->width * j + i] = row[4 * i + 3]; ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = row[4 * i + 3]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -286,12 +286,12 @@ + } + break; + case PNG_COLOR_TYPE_GRAY_ALPHA: +- row_len = info_ptr->width * sizeof(png_byte); +- for (j = 0; j < info_ptr->height; j++) { +- for (i = 0; i < info_ptr->width; i++) { ++ row_len = png_image_width(png_ptr, info_ptr) * sizeof(png_byte); ++ for (j = 0; j < png_image_height(png_ptr, info_ptr); j++) { ++ for (i = 0; i < png_image_width(png_ptr, info_ptr); i++) { + row = row_ptr[j]; + row[i] = row[2 * i]; +- smask_data[info_ptr->width * j + i] = row[2 * i + 1]; ++ smask_data[png_image_width(png_ptr, info_ptr) * j + i] = row[2 * i + 1]; + } + + if (HPDF_Stream_Write (image->stream, row, row_len) != HPDF_OK) { +@@ -306,7 +306,7 @@ + } + + Error: +- for (i = 0; i < (HPDF_UINT)info_ptr->height; i++) { ++ for (i = 0; i < (HPDF_UINT)png_image_height(png_ptr, info_ptr); i++) { + HPDF_FreeMem (image->mmgr, row_ptr[i]); + } + +@@ -448,7 +448,7 @@ + } + + /* 16bit images are not supported. */ +- if (info_ptr->bit_depth == 16) { ++ if (png_get_bit_depth(png_ptr, info_ptr) == 16) { + png_set_strip_16(png_ptr); + } + +@@ -458,7 +458,7 @@ + } + + /* check palette-based images for transparent areas and load them immediately if found */ +- if (xref && PNG_COLOR_TYPE_PALETTE & info_ptr->color_type) { ++ if (xref && PNG_COLOR_TYPE_PALETTE & png_get_color_type(png_ptr, info_ptr)) { + png_bytep trans; + int num_trans; + HPDF_Dict smask; +@@ -478,10 +478,10 @@ + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -489,7 +489,7 @@ + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -503,7 +503,7 @@ + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -513,9 +513,9 @@ + + + ret += CreatePallet(image, png_ptr, info_ptr); +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -526,7 +526,7 @@ + + /* read images with alpha channel right away + we have to do this because image transparent mask must be added to the Xref */ +- if (xref && PNG_COLOR_MASK_ALPHA & info_ptr->color_type) { ++ if (xref && PNG_COLOR_MASK_ALPHA & png_get_color_type(png_ptr, info_ptr)) { + HPDF_Dict smask; + png_bytep smask_data; + +@@ -539,10 +539,10 @@ + smask->header.obj_class |= HPDF_OSUBCLASS_XOBJECT; + ret = HPDF_Dict_AddName (smask, "Type", "XObject"); + ret += HPDF_Dict_AddName (smask, "Subtype", "Image"); +- ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)info_ptr->height); ++ ret += HPDF_Dict_AddNumber (smask, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (smask, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); + ret += HPDF_Dict_AddName (smask, "ColorSpace", "DeviceGray"); +- ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (smask, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + + if (ret != HPDF_OK) { + HPDF_Dict_Free(smask); +@@ -550,7 +550,7 @@ + goto Exit; + } + +- smask_data = HPDF_GetMem(image->mmgr, info_ptr->width * info_ptr->height); ++ smask_data = HPDF_GetMem(image->mmgr, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)); + if (!smask_data) { + HPDF_Dict_Free(smask); + ret = HPDF_FAILD_TO_ALLOC_MEM; +@@ -564,7 +564,7 @@ + goto Exit; + } + +- if (HPDF_Stream_Write(smask->stream, smask_data, info_ptr->width * info_ptr->height) != HPDF_OK) { ++ if (HPDF_Stream_Write(smask->stream, smask_data, png_image_width(png_ptr, info_ptr) * png_image_height(png_ptr, info_ptr)) != HPDF_OK) { + HPDF_FreeMem(image->mmgr, smask_data); + HPDF_Dict_Free(smask); + ret = HPDF_FILE_IO_ERROR; +@@ -572,14 +572,14 @@ + } + HPDF_FreeMem(image->mmgr, smask_data); + +- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY_ALPHA) { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + } else { + ret += HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); + } +- ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width); +- ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height); +- ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)info_ptr->bit_depth); ++ ret += HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)); ++ ret += HPDF_Dict_AddNumber (image, "BitsPerComponent", (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)); + ret += HPDF_Dict_Add (image, "SMask", smask); + + png_destroy_read_struct(&png_ptr, &info_ptr, NULL); +@@ -589,9 +589,9 @@ + /* if the image has color palette, copy the pallet of the image to + * create color map. + */ +- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ++ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) + ret = CreatePallet(image, png_ptr, info_ptr); +- else if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY) ++ else if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_GRAY) + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceGray"); + else + ret = HPDF_Dict_AddName (image, "ColorSpace", "DeviceRGB"); +@@ -617,16 +617,16 @@ + } + + /* setting the info of the image. */ +- if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)info_ptr->width) ++ if (HPDF_Dict_AddNumber (image, "Width", (HPDF_UINT)png_image_width(png_ptr, info_ptr)) + != HPDF_OK) + goto Exit; + +- if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)info_ptr->height) ++ if (HPDF_Dict_AddNumber (image, "Height", (HPDF_UINT)png_image_height(png_ptr, info_ptr)) + != HPDF_OK) + goto Exit; + + if (HPDF_Dict_AddNumber (image, "BitsPerComponent", +- (HPDF_UINT)info_ptr->bit_depth) != HPDF_OK) ++ (HPDF_UINT)png_get_bit_depth(png_ptr, info_ptr)) != HPDF_OK) + goto Exit; + + /* clean up */ diff --git a/community-staging/mapnik/PKGBUILD b/community-staging/mapnik/PKGBUILD new file mode 100644 index 000000000..815ffd88f --- /dev/null +++ b/community-staging/mapnik/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 62650 2012-01-23 09:28:07Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: David Dent +# Contributor: orbisvicis + +pkgname=mapnik +pkgver=0.7.1 +pkgrel=13 +pkgdesc="Free Toolkit for developing mapping applications. Above all Mapnik is about rendering beautiful maps." +arch=('i686' 'x86_64') +url="http://mapnik.org/" +license=('LGPL') +depends=('boost-libs' 'icu' 'libpng' 'libjpeg' 'libtiff' 'freetype2' + 'libxml2' 'python2' 'proj' 'cairo' 'cairomm' 'pycairo' + 'postgresql-libs' 'postgis' 'gdal' 'curl' 'libtool') + # already in core ('zlib' 'sqlite3') +optdepends=('libxslt: Web Map Service' + 'python-lxml: Web Map Service' + 'python-imaging: Web Map Service' + 'python-nose: Web Map Service' + 'apache: Web Map Service' + 'mod_fastcgi: Web Map Service - or:' + 'mod_fcgid: Web Map Service - or:' + 'mod_wsgi: Web Map Service' + ) +makedepends=('scons' 'boost') # already in core ('pkg-config') +conflicts=('mapnik-svn') +install="mapnik.install" +source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.bz2") +md5sums=('8f65fda2a792518d6f6be8a85f62fc73') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + #patch SConstruct so libs end up in /usr/lib not /usr/lib64 on X86_64 + sed -i -e "/LIBDIR_SCHEMA=/s/lib64/lib/" SConstruct + sed -i 's|png_ptr->io_ptr|png_get_io_ptr(png_ptr)|g' src/png_reader.cpp + sed -i 's/-ansi -Wall/-ansi -DBOOST_FILESYSTEM_VERSION=2 -Wall/' SConstruct + + scons configure \ + PREFIX="/usr" \ + INPUT_PLUGINS=all \ + DESTDIR="$pkgdir" + scons +} +package(){ + cd "$srcdir/$pkgname-$pkgver" + scons install + # fix permissions on SCons-autogenerated files + chmod 644 "${pkgdir}/usr/lib/python2.7/site-packages/mapnik/paths.py" +} diff --git a/community-staging/mapnik/mapnik.install b/community-staging/mapnik/mapnik.install new file mode 100644 index 000000000..46f265d5b --- /dev/null +++ b/community-staging/mapnik/mapnik.install @@ -0,0 +1,11 @@ +post_install() { + /sbin/ldconfig +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/community-staging/openmotif/PKGBUILD b/community-staging/openmotif/PKGBUILD new file mode 100644 index 000000000..d7b0f2a89 --- /dev/null +++ b/community-staging/openmotif/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 62656 2012-01-23 10:44:50Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: Enrico Morelli + +pkgname=openmotif +pkgver=2.3.3 +pkgrel=2 +pkgdesc="Open Motif" +arch=('i686' 'x86_64') +url="http://www.motifzone.org/" +license=('GPL') +depends=(libxext libxp libxft libxt libxmu libpng libjpeg) +makedepends=(xbitmaps xproto printproto xextproto automake) +conflicts=(lesstif) +options=('!libtool') +source=(http://www.motifzone.org/files/public_downloads/openmotif/2.3/$pkgver/openmotif-$pkgver.tar.gz) +md5sums=('fd27cd3369d6c7d5ef79eccba524f7be') + +build() { + _automakever=1.11 + + cd $srcdir/openmotif-$pkgver + + sed -i 's|.*demos.*||g' Makefile.in Makefile.am + sed -i 's|doc \\|doc|g' Makefile.in Makefile.am + sed -i 's#if (!png_check_sig(sig, 8))#if (png_sig_cmp(sig, 0, 8))#' lib/Xm/Png.c + + ln -s -f /usr/share/automake-${_automakever}/compile compile + ln -s -f /usr/share/libtool/config/config.guess config.guess + ln -s -f /usr/share/libtool/config/config.sub config.sub + ln -s -f /usr/share/automake-${_automakever}/depcomp depcomp + ln -s -f /usr/share/automake-${_automakever}/install-sh install-sh + ln -s -f /usr/share/automake-${_automakever}/missing missing + ln -s -f /usr/share/libtool/config/ltmain.sh ltmain.sh + touch NEWS AUTHORS + + [ $NOEXTRACT -eq 1 ] || autoreconf -i + [ $CARCH == "x86_64" ] && export CFLAGS="$CFLAGS -fPIC" + [ $NOEXTRACT -eq 1 ] || ./configure --with-x --prefix=/usr + make -j1 + + make DESTDIR=$pkgdir install + # cleanup + (cd $pkgdir/usr/share/man/man3/ && mv Shell.3 OpenMotif-Shell.3) +} diff --git a/community-staging/python2-matplotlib/PKGBUILD b/community-staging/python2-matplotlib/PKGBUILD new file mode 100644 index 000000000..2c647212e --- /dev/null +++ b/community-staging/python2-matplotlib/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 62667 2012-01-24 00:10:45Z stephane $ +# Maintainer: Stéphane Gaudreault +# Contributor: Stefan Husmann +# Contributor: Angel 'angvp' Velasquez +# Contributor: Douglas Soares de Andrade + +pkgname=python2-matplotlib +pkgver=1.1.0 +pkgrel=2 +pkgdesc="A python plotting library, making publication quality plots" +arch=('i686' 'x86_64') +url="http://matplotlib.sourceforge.net/" +backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc) +depends=('python2-dateutil' 'python2-pytz' 'python2-numpy' 'python2-pyparsing' 'python2-qt') +optdepends=('pygtk: for use with the GTK or GTKAgg backend' + 'tk: used by the TkAgg backend' + 'wxpython: for use with the WXAgg backend') +makedepends=('pygtk' 'tk' 'wxpython') +provides=('matplotlib' "python-matplotlib=${pkgver}") +replaces=('python-matplotlib') +conflicts=('python-matplotlib') +source=("http://downloads.sourceforge.net/matplotlib/matplotlib-${pkgver}.tar.gz" + setup.cfg) +sha1sums=('435b4f04a7e099b79f66451d69ad0b5ce66030ae' + 'bcb5a83db9d95c96a57ca518fa6bd1897b23558f') +license=('custom') + +build() { + cd "${srcdir}/matplotlib-${pkgver}" + + cp ../setup.cfg . + + # remove internal copy of pyparsing + rm lib/matplotlib/pyparsing.py + sed -i "s/matplotlib.pyparsing/pyparsing/g" lib/matplotlib/{mathtext,fontconfig_pattern}.py + + # python2 fix + for file in $(find . -name '*.py' -print); do + sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python2|" \ + -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python2|" ${file} + done + + python2 setup.py build +} + +package() { + cd "${srcdir}/matplotlib-${pkgver}" + python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr + + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + install -m 644 doc/users/license.rst "${pkgdir}/usr/share/licenses/${pkgname}" +} diff --git a/community-staging/python2-matplotlib/setup.cfg b/community-staging/python2-matplotlib/setup.cfg new file mode 100644 index 000000000..4b82986e9 --- /dev/null +++ b/community-staging/python2-matplotlib/setup.cfg @@ -0,0 +1,83 @@ +# Rename this file to setup.cfg to modify matplotlib's +# build options. + +[egg_info] +tag_svn_revision = 1 + +[directories] +# Uncomment to override the default basedir in setupext.py. +# This can be a single directory or a space-delimited list of directories. +#basedirlist = /usr + +[status] +# To suppress display of the dependencies and their versions +# at the top of the build log, uncomment the following line: +#suppress = True +# +# Uncomment to insert lots of diagnostic prints in extension code +#verbose = True + +[provide_packages] +# By default, matplotlib checks for a few dependencies and +# installs them if missing. This feature can be turned off +# by uncommenting the following lines. Acceptible values are: +# True: install, overwrite an existing installation +# False: do not install +# auto: install only if the package is unavailable. This +# is the default behavior +# +## Date/timezone support: +#pytz = False +#dateutil = False + +[gui_support] +# Matplotlib supports multiple GUI toolkits, including Cocoa, +# GTK, Fltk, MacOSX, Qt, Qt4, Tk, and WX. Support for many of +# these toolkits requires AGG, the Anti-Grain Geometry library, +# which is provided by matplotlib and built by default. +# +# Some backends are written in pure Python, and others require +# extension code to be compiled. By default, matplotlib checks +# for these GUI toolkits during installation and, if present, +# compiles the required extensions to support the toolkit. GTK +# support requires the GTK runtime environment and PyGTK. Wx +# support requires wxWidgets and wxPython. Tk support requires +# Tk and Tkinter. The other GUI toolkits do not require any +# extension code, and can be used as long as the libraries are +# installed on your system. +# +# You can uncomment any the following lines if you know you do +# not want to use the GUI toolkit. Acceptible values are: +# True: build the extension. Exits with a warning if the +# required dependencies are not available +# False: do not build the extension +# auto: build if the required dependencies are available, +# otherwise skip silently. This is the default +# behavior +# +gtk = True +gtkagg = True +tkagg = True +wxagg = True +macosx = False + +[rc_options] +# User-configurable options +# +# Default backend, one of: Agg, Cairo, CocoaAgg, GTK, GTKAgg, GTKCairo, +# FltkAgg, MacOSX, Pdf, Ps, QtAgg, Qt4Agg, SVG, TkAgg, WX, WXAgg. +# +# The Agg, Ps, Pdf and SVG backends do not require external +# dependencies. Do not choose GTK, GTKAgg, GTKCairo, MacOSX, TkAgg or WXAgg +# if you have disabled the relevent extension modules. Agg will be used +# by default. +# +backend = Qt4Agg +# +# The numerix module was historically used to provide +# compatibility between the Numeric, numarray, and NumPy array +# packages. Now that NumPy has emerge as the universal array +# package for python, numerix is not really necessary and is +# maintained to provide backward compatibility. Do not change +# this unless you have a compelling reason to do so. +numerix = numpy diff --git a/community-staging/qpxtool/PKGBUILD b/community-staging/qpxtool/PKGBUILD new file mode 100644 index 000000000..47c3e14a3 --- /dev/null +++ b/community-staging/qpxtool/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 62654 2012-01-23 09:59:30Z spupykin $ +# Maintainer: Sergej Pupykin +# Contributor: Krzysztof Stasiorowski + +pkgname=qpxtool +pkgver=0.7.1_002 +pkgrel=3 +pkgdesc="Allows better controll over optical drives to include QChecks and optimization settings." +arch=('i686' 'x86_64') +url="http://qpxtool.sourceforge.net/" +license=('GPL') +depends=('qt') +source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.bz2 + libpng15.patch) +md5sums=('755321a0196b16d06857550aac74ff50' + 'ab9af7610277652c77c6d114422b2266') + +build() { + cd $srcdir/$pkgname-$pkgver + # Fix strict aliasing warnings + export CFLAGS="$CFLAGS -fno-strict-aliasing" + sed -i 's|lib64|lib|' configure + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make + mkdir -p $pkgdir/usr/bin + make DESTDIR=$pkgdir install +} diff --git a/community-staging/qpxtool/libpng15.patch b/community-staging/qpxtool/libpng15.patch new file mode 100644 index 000000000..05e6f49d2 --- /dev/null +++ b/community-staging/qpxtool/libpng15.patch @@ -0,0 +1,127 @@ +diff -wbBur qpxtool-0.7.1_002/console/f1tattoo/f1tattoo.cpp qpxtool-0.7.1_002.my/console/f1tattoo/f1tattoo.cpp +--- qpxtool-0.7.1_002/console/f1tattoo/f1tattoo.cpp 2009-11-25 10:55:44.000000000 +0300 ++++ qpxtool-0.7.1_002.my/console/f1tattoo/f1tattoo.cpp 2012-01-23 13:53:37.000000000 +0400 +@@ -129,28 +129,28 @@ + + png_read_info(png_ptr, info_ptr); + +- printf("Image size: %ld x %ld\n", info_ptr->width, info_ptr->height); ++ printf("Image size: %u x %u\n", png_get_image_width(png_ptr, info_ptr), png_get_image_height(png_ptr, info_ptr)); + +- if (info_ptr->width != 3744U || info_ptr->height != rows ) { ++ if (png_get_image_width(png_ptr, info_ptr) != 3744U || png_get_image_height(png_ptr, info_ptr) != rows ) { + printf("Image should be 3744 x %d", rows); + return 1; + } + +-// width = info_ptr->width; +-// height = info_ptr->height; +-// bit_depth = info_ptr->bit_depth; ++// width = png_get_image_width(png_ptr, info_ptr); ++// height = png_get_image_height(png_ptr, info_ptr); ++// bit_depth = png_get_bit_depth(png_ptr, info_ptr); + + number_of_passes = png_set_interlace_handling(png_ptr); + png_read_update_info(png_ptr, info_ptr); + +- printf("Color type: [%d] ", info_ptr->color_type); +- switch (info_ptr->color_type) { ++ printf("Color type: [%d] ", png_get_color_type(png_ptr, info_ptr)); ++ switch (png_get_color_type(png_ptr, info_ptr)) { + case PNG_COLOR_TYPE_GRAY: + printf("PNG_COLOR_TYPE_GRAY\n"); + break; + case PNG_COLOR_TYPE_PALETTE: + printf("PNG_COLOR_TYPE_PALETTE\n"); +- if (!(info_ptr->valid & PNG_INFO_PLTE)) { ++ if (!(png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE))) { + printf("PNG color type is indexed, but no palette found!"); + goto err_read_png; + } +@@ -168,49 +168,53 @@ + printf("unlnown PNG color type!\n"); + goto err_read_png; + } +- printf("Bit depth : %d\n", info_ptr->bit_depth); +- if (info_ptr->bit_depth != 8) { ++ printf("Bit depth : %d\n", png_get_bit_depth(png_ptr, info_ptr)); ++ if (png_get_bit_depth(png_ptr, info_ptr) != 8) { + printf("Unsupported bit depth!\n"); + goto err_read_png; + } +- if (info_ptr->valid & PNG_INFO_PLTE) { +- printf("Palette : %d colors\n", info_ptr->num_palette); ++ ++ int num_palette; ++ png_colorp plte; ++ png_get_PLTE(png_ptr, info_ptr, &plte, &num_palette); ++ ++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_PLTE)) { ++ printf("Palette : %d colors\n", num_palette); + } else { + printf("Palette : NO\n"); + } +- printf("ROW bytes : %ld\n", info_ptr->rowbytes); +- ++ printf("ROW bytes : %d\n", png_get_rowbytes(png_ptr, info_ptr)); + + raw_row_pointer = buf; +- png_row_pointer = (png_byte*) malloc(info_ptr->rowbytes); ++ png_row_pointer = (png_byte*) malloc(png_get_rowbytes(png_ptr, info_ptr)); + for (row=0; rowwidth < 3744U) ++ if (png_get_image_width(png_ptr, info_ptr) < 3744U) + memset(raw_row_pointer, 0, 3744); + +- switch (info_ptr->color_type) { ++ switch (png_get_color_type(png_ptr, info_ptr)) { + case PNG_COLOR_TYPE_GRAY: +- for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; colpalette[c].red; +- g = info_ptr->palette[c].green; +- b = info_ptr->palette[c].blue; ++ r = plte[c].red; ++ g = plte[c].green; ++ b = plte[c].blue; + c = (r*11 + g*16 + b*5) / 32; + raw_row_pointer[col] = c ^ 0xFF; + } + break; + case PNG_COLOR_TYPE_RGB: +- for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; colwidth; col++) { ++ for (col=0; col +# Maintainer: Daniel J Griffiths +# Contributor: Roman Kyrylych +# Contributor: cdhotfire + +pkgname=rawstudio +pkgver=2.0 +pkgrel=5 +pkgdesc="An open source raw-image converter written in GTK+" +arch=('i686' 'x86_64') +license=('GPL') +url="http://rawstudio.org/" +depends=('exiv2' 'libgphoto2' 'flickcurl' 'libjpeg' 'fftw' 'gconf' 'lensfun' + 'raptor1' 'lcms' 'gtk2') +install=${pkgname}.install +options=('!libtool') +source=(http://rawstudio.org/files/release/${pkgname}-${pkgver}.tar.gz + libpng15.patch) +md5sums=('b2f86b8ca6b83ad954e3104c4cb89e9b' + '2f8b7acbe10d8096ce613cbea7986fd3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p1 <$srcdir/libpng15.patch + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make prefix="${pkgdir}/usr" install + mkdir $pkgdir/usr/lib/rawstudio + mv $pkgdir/usr/share/rawstudio/plugins $pkgdir/usr/lib/rawstudio + ln -s ../../lib/rawstudio/plugins $pkgdir/usr/share/rawstudio/plugins +} diff --git a/community-staging/rawstudio/libpng15.patch b/community-staging/rawstudio/libpng15.patch new file mode 100644 index 000000000..6d3b85968 --- /dev/null +++ b/community-staging/rawstudio/libpng15.patch @@ -0,0 +1,40 @@ +diff -wbBur rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp +--- rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp 2011-02-24 01:35:18.000000000 +0300 ++++ rawstudio-2.0.my/plugins/load-gdk/exiv2-colorspace.cpp 2012-01-23 15:03:22.000000000 +0400 +@@ -102,8 +102,8 @@ + { + *linear_guess = FALSE; + RSColorSpace* profile = NULL; +- const gchar *icc_profile_title; +- const gchar *icc_profile; ++ png_charp icc_profile_title; ++ png_bytep icc_profile; + guint icc_profile_size; + png_structp png_ptr = png_create_read_struct( + PNG_LIBPNG_VER_STRING, +@@ -125,11 +125,11 @@ + + int compression_type; + /* Extract embedded ICC profile */ +- if (info_ptr->valid & PNG_INFO_iCCP) ++ if (png_get_valid(png_ptr, info_ptr, PNG_INFO_iCCP)) + { + png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, +- (png_charpp) &icc_profile_title, &compression_type, +- (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size); ++ &icc_profile_title, &compression_type, ++ &icc_profile, (png_uint_32*) &icc_profile_size); + if (retval != 0) + { + RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE); +diff -wbBur rawstudio-2.0/plugins/output-pngfile/output-pngfile.c rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c +--- rawstudio-2.0/plugins/output-pngfile/output-pngfile.c 2011-03-26 04:52:29.000000000 +0300 ++++ rawstudio-2.0.my/plugins/output-pngfile/output-pngfile.c 2012-01-23 15:04:59.000000000 +0400 +@@ -23,6 +23,7 @@ + #include + #include "config.h" + #include ++#include + + #define RS_TYPE_PNGFILE (rs_pngfile_type) + #define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile)) diff --git a/community-staging/rawstudio/rawstudio.install b/community-staging/rawstudio/rawstudio.install new file mode 100644 index 000000000..261adb7b4 --- /dev/null +++ b/community-staging/rawstudio/rawstudio.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q || true +} + +post_upgrade() { + update-desktop-database -q || true +} + +post_remove() { + update-desktop-database -q || true +} diff --git a/community/libircclient/PKGBUILD b/community/libircclient/PKGBUILD index 4608c5424..72a698e73 100644 --- a/community/libircclient/PKGBUILD +++ b/community/libircclient/PKGBUILD @@ -4,7 +4,7 @@ # Contributor: coolkehon pkgname=libircclient -pkgver=1.5 +pkgver=1.6 pkgrel=1 pkgdesc="A small but powerful library, which implements client-server IRC protocol." arch=('i686' 'x86_64') @@ -12,7 +12,7 @@ url="http://www.ulduzsoft.com/libircclient/" depends=('glibc') license=('GPL') source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz") -md5sums=('fd1f33181c50823f105df6400eb7746d') +md5sums=('eb6a2c4e91862cc10de3b13b198cfa23') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/community/packagekit/PKGBUILD b/community/packagekit/PKGBUILD index a66ae29ab..5638b68d5 100644 --- a/community/packagekit/PKGBUILD +++ b/community/packagekit/PKGBUILD @@ -1,21 +1,21 @@ -# $Id: PKGBUILD 62160 2012-01-17 00:26:49Z jconder $ +# $Id: PKGBUILD 62671 2012-01-24 01:58:04Z jconder $ # Maintainer: Jonathan Conder pkgbase='packagekit' pkgname=('packagekit' 'packagekit-qt' 'packagekit-qt2' 'packagekit-python') pkgver=0.6.21 -pkgrel=1 +pkgrel=2 pkgdesc="A system designed to make installation and updates of packages easier." arch=('i686' 'x86_64') url="http://www.packagekit.org" license=('GPL') makedepends=('dbus-glib' 'gobject-introspection' 'gtk-doc' 'intltool' 'networkmanager' 'pacman' 'pm-utils' 'polkit' 'python2' 'qt' - 'shared-mime-info' 'sqlite3' 'udev') + 'shared-mime-info' 'sqlite3' 'udev') options=('!libtool') source=("http://www.packagekit.org/releases/PackageKit-$pkgver.tar.xz" 'alpm.patch') sha256sums=('68e5d4d07adf50b1fae6cbc0963555345ba7fc12d86d3e3387874547a5448b8e' - 'fbe54a89c3495376a0b939b67fec5b2e57bed46e92b3f4816d797745882481e6') + '44e7adbff7e2255fd9712eef33df866c3a868b3758ceff4adeef209927a97716') build() { cd "$srcdir/PackageKit-$pkgver" @@ -30,23 +30,24 @@ build() { # TODO: remove when upstream is patched autoreconf ./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --libexecdir=/usr/lib/PackageKit \ - --disable-static \ - --disable-gtk-doc \ - --disable-tests \ - --disable-local \ - --disable-browser-plugin \ - --disable-gstreamer-plugin \ - --disable-gtk-module \ - --disable-command-not-found \ - --disable-cron \ - --disable-debuginfo-install \ - --enable-pm-utils \ - --disable-dummy \ - --enable-alpm \ - --with-default-backend=alpm + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/PackageKit \ + --enable-strict \ + --disable-static \ + --disable-gtk-doc \ + --disable-tests \ + --disable-local \ + --disable-browser-plugin \ + --disable-gstreamer-plugin \ + --disable-gtk-module \ + --disable-command-not-found \ + --disable-cron \ + --disable-debuginfo-install \ + --enable-pm-utils \ + --disable-dummy \ + --enable-alpm \ + --with-default-backend=alpm make -s } diff --git a/community/packagekit/alpm.patch b/community/packagekit/alpm.patch index d39ce14e1..997d252b2 100644 --- a/community/packagekit/alpm.patch +++ b/community/packagekit/alpm.patch @@ -19,7 +19,7 @@ index 5a5468a..d8c3dfc 100644 -DPK_BACKEND_DEFAULT_LOGFILE=\"$(PK_BACKEND_DEFAULT_LOGFILE)\" \ -DALPM_CACHE_PATH=\"$(ALPM_CACHE_PATH)\" \ diff --git a/backends/alpm/pk-backend-alpm.c b/backends/alpm/pk-backend-alpm.c -index ba993f0..93f6d95 100644 +index ba993f0..5c6b629 100644 --- a/backends/alpm/pk-backend-alpm.c +++ b/backends/alpm/pk-backend-alpm.c @@ -22,10 +22,13 @@ @@ -219,6 +219,18 @@ index ba993f0..93f6d95 100644 } void +@@ -380,3 +442,11 @@ pk_backend_finish (PkBackend *self, GError *error) + pk_backend_thread_finished (self); + return (error == NULL); + } ++ ++void ++pk_backend_transaction_start (PkBackend *self) ++{ ++ g_return_if_fail (self != NULL); ++ ++ pk_backend_configure_environment (self); ++} diff --git a/backends/alpm/pk-backend-alpm.h b/backends/alpm/pk-backend-alpm.h index 23a2724..ecd6d0f 100644 --- a/backends/alpm/pk-backend-alpm.h @@ -234,7 +246,7 @@ index 23a2724..ecd6d0f 100644 extern gchar *xfercmd; extern alpm_list_t *holdpkgs; diff --git a/backends/alpm/pk-backend-config.c b/backends/alpm/pk-backend-config.c -index 21a4c54..a51a984 100644 +index 21a4c54..d62b927 100644 --- a/backends/alpm/pk-backend-config.c +++ b/backends/alpm/pk-backend-config.c @@ -28,29 +28,44 @@ @@ -480,14 +492,14 @@ index 21a4c54..a51a984 100644 + } + + /* this also allows e.g. NeverEver, so put prefixes last */ -+ if (g_str_has_prefix (list, "Never") == 0) { ++ if (g_str_has_prefix (list, "Never")) { + if (package) { + *level &= ~ALPM_SIG_PACKAGE; + } + if (database) { + *level &= ~ALPM_SIG_DATABASE; + } -+ } else if (g_str_has_prefix (list, "Optional") == 0) { ++ } else if (g_str_has_prefix (list, "Optional")) { + if (package) { + *level |= ALPM_SIG_PACKAGE; + *level |= ALPM_SIG_PACKAGE_OPTIONAL; @@ -496,7 +508,7 @@ index 21a4c54..a51a984 100644 + *level |= ALPM_SIG_DATABASE; + *level |= ALPM_SIG_DATABASE_OPTIONAL; + } -+ } else if (g_str_has_prefix (list, "Required") == 0) { ++ } else if (g_str_has_prefix (list, "Required")) { + if (package) { + *level |= ALPM_SIG_PACKAGE; + *level &= ~ALPM_SIG_PACKAGE_OPTIONAL; @@ -505,7 +517,7 @@ index 21a4c54..a51a984 100644 + *level |= ALPM_SIG_DATABASE; + *level &= ~ALPM_SIG_DATABASE_OPTIONAL; + } -+ } else if (g_str_has_prefix (list, "TrustedOnly") == 0) { ++ } else if (g_str_has_prefix (list, "TrustedOnly")) { + if (package) { + *level &= ~ALPM_SIG_PACKAGE_MARGINAL_OK; + *level &= ~ALPM_SIG_PACKAGE_UNKNOWN_OK; @@ -514,7 +526,7 @@ index 21a4c54..a51a984 100644 + *level &= ~ALPM_SIG_DATABASE_MARGINAL_OK; + *level &= ~ALPM_SIG_DATABASE_UNKNOWN_OK; + } -+ } else if (g_str_has_prefix (list, "TrustAll") == 0) { ++ } else if (g_str_has_prefix (list, "TrustAll")) { + if (package) { + *level |= ALPM_SIG_PACKAGE_MARGINAL_OK; + *level |= ALPM_SIG_PACKAGE_UNKNOWN_OK; @@ -843,7 +855,7 @@ index cb8b8dc..412f59c 100644 -gboolean pk_backend_configure (const gchar *filename, GError **error); +alpm_handle_t *pk_backend_configure (const gchar *filename, GError **error); diff --git a/backends/alpm/pk-backend-databases.c b/backends/alpm/pk-backend-databases.c -index f6ab06e..ac530c7 100644 +index f6ab06e..a123297 100644 --- a/backends/alpm/pk-backend-databases.c +++ b/backends/alpm/pk-backend-databases.c @@ -26,7 +26,15 @@ @@ -873,7 +885,13 @@ index f6ab06e..ac530c7 100644 g_object_unref (output); g_object_unref (os); -@@ -128,37 +136,65 @@ disabled_repos_configure (GHashTable *table, GError **error) +@@ -124,41 +132,91 @@ disabled_repos_free (GHashTable *table) + } + + static gboolean +-disabled_repos_configure (GHashTable *table, GError **error) ++disabled_repos_configure (GHashTable *table, gboolean only_trusted, ++ GError **error) { const alpm_list_t *i; @@ -896,6 +914,7 @@ index f6ab06e..ac530c7 100644 - const gchar *repo = alpm_db_get_name (db); + for (i = configured; i != NULL; i = i->next) { + PkBackendRepo *repo = (PkBackendRepo *) i->data; ++ alpm_siglevel_t level = repo->level; + alpm_db_t *db; - if (g_hash_table_lookup (table, repo) == NULL) { @@ -904,12 +923,16 @@ index f6ab06e..ac530c7 100644 + if (g_hash_table_lookup (table, repo->name) != NULL) { + /* repo is disabled */ continue; ++ } else if (!only_trusted) { ++ level &= ~ALPM_SIG_PACKAGE; ++ level &= ~ALPM_SIG_DATABASE; ++ level &= ~ALPM_SIG_USE_DEFAULT; } - if (alpm_db_unregister (db) < 0) { - g_set_error (error, ALPM_ERROR, pm_errno, "[%s]: %s", - repo, alpm_strerrorlast ()); -+ db = alpm_db_register_sync (alpm, repo->name, repo->level); ++ db = alpm_db_register_sync (alpm, repo->name, level); + if (db == NULL) { + enum _alpm_errno_t errno = alpm_errno (alpm); + g_set_error (error, ALPM_ERROR, errno, "[%s]: %s", @@ -942,7 +965,7 @@ index f6ab06e..ac530c7 100644 + + value = g_hash_table_lookup (levels, i->data); + if (value != NULL) { -+ repo->level = *(alpm_siglevel_t *)value; ++ repo->level = *(alpm_siglevel_t *) value; + } else { + repo->level = ALPM_SIG_USE_DEFAULT; + } @@ -950,11 +973,36 @@ index f6ab06e..ac530c7 100644 + configured = alpm_list_add (configured, repo); + } +} ++ ++gboolean ++pk_backend_disable_signatures (PkBackend *self, GError **error) ++{ ++ g_return_val_if_fail (self != NULL, FALSE); ++ ++ return disabled_repos_configure (disabled, FALSE, error); ++} ++ ++gboolean ++pk_backend_enable_signatures (PkBackend *self, GError **error) ++{ ++ g_return_val_if_fail (self != NULL, FALSE); ++ ++ return disabled_repos_configure (disabled, TRUE, error); ++} + gboolean pk_backend_initialize_databases (PkBackend *self, GError **error) { -@@ -179,11 +215,21 @@ pk_backend_initialize_databases (PkBackend *self, GError **error) +@@ -169,7 +227,7 @@ pk_backend_initialize_databases (PkBackend *self, GError **error) + return FALSE; + } + +- if (!disabled_repos_configure (disabled, error)) { ++ if (!disabled_repos_configure (disabled, TRUE, error)) { + return FALSE; + } + +@@ -179,11 +237,21 @@ pk_backend_initialize_databases (PkBackend *self, GError **error) void pk_backend_destroy_databases (PkBackend *self) { @@ -976,7 +1024,7 @@ index f6ab06e..ac530c7 100644 } static gboolean -@@ -210,11 +256,12 @@ pk_backend_get_repo_list_thread (PkBackend *self) +@@ -210,11 +278,12 @@ pk_backend_get_repo_list_thread (PkBackend *self) gpointer key, value; g_return_val_if_fail (self != NULL, FALSE); @@ -991,7 +1039,12 @@ index f6ab06e..ac530c7 100644 const gchar *repo = alpm_db_get_name (db); if (pk_backend_cancelled (self)) { -@@ -269,7 +316,7 @@ pk_backend_repo_enable_thread (PkBackend *self) +@@ -265,11 +334,11 @@ pk_backend_repo_enable_thread (PkBackend *self) + + if (g_hash_table_remove (disabled, repo)) { + /* reload configuration to preserve ordering */ +- if (disabled_repos_configure (disabled, &error)) { ++ if (disabled_repos_configure (disabled, TRUE, &error)) { pk_backend_repo_list_changed (self); } } else { @@ -1000,7 +1053,7 @@ index f6ab06e..ac530c7 100644 g_set_error (&error, ALPM_ERROR, code, "[%s]: %s", repo, alpm_strerror (code)); } -@@ -292,21 +339,23 @@ pk_backend_repo_disable_thread (PkBackend *self) +@@ -292,21 +361,23 @@ pk_backend_repo_disable_thread (PkBackend *self) GError *error = NULL; g_return_val_if_fail (self != NULL, FALSE); @@ -1028,7 +1081,7 @@ index f6ab06e..ac530c7 100644 } else { g_hash_table_insert (disabled, g_strdup (repo), GINT_TO_POINTER (1)); -@@ -316,7 +365,7 @@ pk_backend_repo_disable_thread (PkBackend *self) +@@ -316,7 +387,7 @@ pk_backend_repo_disable_thread (PkBackend *self) } if (i == NULL) { @@ -1038,16 +1091,22 @@ index f6ab06e..ac530c7 100644 alpm_strerror (code)); } diff --git a/backends/alpm/pk-backend-databases.h b/backends/alpm/pk-backend-databases.h -index f9eb2f9..2636cae 100644 +index f9eb2f9..d9b9e78 100644 --- a/backends/alpm/pk-backend-databases.h +++ b/backends/alpm/pk-backend-databases.h -@@ -24,6 +24,10 @@ +@@ -24,6 +24,16 @@ #include #include +void pk_backend_configure_repos (alpm_list_t *repos, + GHashTable *servers, + GHashTable *levels); ++ ++gboolean pk_backend_disable_signatures (PkBackend *self, ++ GError **error); ++ ++gboolean pk_backend_enable_signatures (PkBackend *self, ++ GError **error); + gboolean pk_backend_initialize_databases (PkBackend *self, GError **error); @@ -1472,10 +1531,18 @@ index 28dcf65..d736e37 100644 -const gchar *alpm_pkg_get_group (pmpkg_t *pkg); +const gchar *alpm_pkg_get_group (alpm_pkg_t *pkg); diff --git a/backends/alpm/pk-backend-install.c b/backends/alpm/pk-backend-install.c -index 65a6c11..5b5e2b2 100644 +index 65a6c11..d0cbca2 100644 --- a/backends/alpm/pk-backend-install.c +++ b/backends/alpm/pk-backend-install.c -@@ -32,15 +32,19 @@ +@@ -25,6 +25,7 @@ + #include + + #include "pk-backend-alpm.h" ++#include "pk-backend-databases.h" + #include "pk-backend-error.h" + #include "pk-backend-install.h" + #include "pk-backend-transaction.h" +@@ -32,15 +33,19 @@ static gint alpm_add_file (const gchar *filename) { @@ -1498,7 +1565,7 @@ index 65a6c11..5b5e2b2 100644 alpm_pkg_free (pkg); return -1; } -@@ -61,8 +65,9 @@ pk_backend_transaction_add_targets (PkBackend *self, GError **error) +@@ -61,8 +66,9 @@ pk_backend_transaction_add_targets (PkBackend *self, GError **error) for (; *paths != NULL; ++paths) { if (alpm_add_file (*paths) < 0) { @@ -1510,6 +1577,40 @@ index 65a6c11..5b5e2b2 100644 return FALSE; } } +@@ -89,17 +95,32 @@ pk_backend_simulate_install_files_thread (PkBackend *self) + static gboolean + pk_backend_install_files_thread (PkBackend *self) + { ++ gboolean only_trusted; + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); + ++ only_trusted = pk_backend_get_bool (self, "only_trusted"); ++ ++ if (!only_trusted && !pk_backend_disable_signatures (self, &error)) { ++ goto out; ++ } ++ + if (pk_backend_transaction_initialize (self, 0, &error) && + pk_backend_transaction_add_targets (self, &error) && + pk_backend_transaction_simulate (self, &error)) { + pk_backend_transaction_commit (self, &error); + } + +- return pk_backend_transaction_finish (self, error); ++out: ++ pk_backend_transaction_end (self, (error == NULL) ? &error : NULL); ++ ++ if (!only_trusted) { ++ GError **e = (error == NULL) ? &error : NULL; ++ pk_backend_enable_signatures (self, e); ++ } ++ ++ return pk_backend_finish (self, error); + } + + void diff --git a/backends/alpm/pk-backend-packages.c b/backends/alpm/pk-backend-packages.c index e9a7c94..2d057aa 100644 --- a/backends/alpm/pk-backend-packages.c @@ -2002,10 +2103,15 @@ index 592472d..c4e80ae 100644 break; } diff --git a/backends/alpm/pk-backend-sync.c b/backends/alpm/pk-backend-sync.c -index 9e1e02b..c770159 100644 +index 9e1e02b..d2f363b 100644 --- a/backends/alpm/pk-backend-sync.c +++ b/backends/alpm/pk-backend-sync.c -@@ -30,41 +30,13 @@ +@@ -26,45 +26,18 @@ + #include + + #include "pk-backend-alpm.h" ++#include "pk-backend-databases.h" + #include "pk-backend-error.h" #include "pk-backend-sync.h" #include "pk-backend-transaction.h" @@ -2048,7 +2154,7 @@ index 9e1e02b..c770159 100644 packages = pk_backend_get_strv (self, "package_ids"); -@@ -75,9 +47,28 @@ pk_backend_transaction_sync_targets (PkBackend *self, GError **error) +@@ -75,9 +48,28 @@ pk_backend_transaction_sync_targets (PkBackend *self, GError **error) gchar *repo = package[PK_PACKAGE_ID_DATA]; gchar *name = package[PK_PACKAGE_ID_NAME]; @@ -2080,7 +2186,7 @@ index 9e1e02b..c770159 100644 g_strfreev (package); return FALSE; } -@@ -93,23 +84,27 @@ pk_backend_download_packages_thread (PkBackend *self) +@@ -93,23 +85,27 @@ pk_backend_download_packages_thread (PkBackend *self) { alpm_list_t *cachedirs; const gchar *directory; @@ -2114,7 +2220,7 @@ index 9e1e02b..c770159 100644 if (pk_backend_transaction_initialize (self, flags, &error) && pk_backend_transaction_sync_targets (self, &error) && -@@ -118,7 +113,7 @@ pk_backend_download_packages_thread (PkBackend *self) +@@ -118,7 +114,7 @@ pk_backend_download_packages_thread (PkBackend *self) } if (directory != NULL) { @@ -2123,7 +2229,40 @@ index 9e1e02b..c770159 100644 } return pk_backend_transaction_finish (self, error); -@@ -190,16 +185,17 @@ pk_backend_install_packages (PkBackend *self, gboolean only_trusted, +@@ -155,17 +151,31 @@ pk_backend_simulate_install_packages_thread (PkBackend *self) + static gboolean + pk_backend_install_packages_thread (PkBackend *self) + { ++ gboolean only_trusted; + GError *error = NULL; + + g_return_val_if_fail (self != NULL, FALSE); + ++ only_trusted = pk_backend_get_bool (self, "only_trusted"); ++ ++ if (!only_trusted && !pk_backend_disable_signatures (self, &error)) { ++ goto out; ++ } ++ + if (pk_backend_transaction_initialize (self, 0, &error) && + pk_backend_transaction_sync_targets (self, &error) && + pk_backend_transaction_simulate (self, &error)) { + pk_backend_transaction_commit (self, &error); + } + +- return pk_backend_transaction_finish (self, error); ++ pk_backend_transaction_end (self, (error == NULL) ? &error : NULL); ++out: ++ if (!only_trusted) { ++ GError **e = (error == NULL) ? &error : NULL; ++ pk_backend_enable_signatures (self, e); ++ } ++ ++ return pk_backend_finish (self, error); + } + + void +@@ -190,16 +200,17 @@ pk_backend_install_packages (PkBackend *self, gboolean only_trusted, } static gboolean @@ -2144,7 +2283,7 @@ index 9e1e02b..c770159 100644 const gchar *rname = alpm_pkg_get_name (rpkg); if (pk_backend_cancelled (self)) { -@@ -208,7 +204,7 @@ pk_backend_replaces_dependencies (PkBackend *self, pmpkg_t *pkg) +@@ -208,7 +219,7 @@ pk_backend_replaces_dependencies (PkBackend *self, pmpkg_t *pkg) continue; } @@ -2153,15 +2292,29 @@ index 9e1e02b..c770159 100644 return FALSE; } } -@@ -224,6 +220,7 @@ pk_backend_update_packages_thread (PkBackend *self) +@@ -219,13 +230,21 @@ pk_backend_replaces_dependencies (PkBackend *self, pmpkg_t *pkg) + static gboolean + pk_backend_update_packages_thread (PkBackend *self) + { ++ gboolean only_trusted; + const alpm_list_t *i; + alpm_list_t *asdeps = NULL; GError *error = NULL; g_return_val_if_fail (self != NULL, FALSE); + g_return_val_if_fail (alpm != NULL, FALSE); g_return_val_if_fail (localdb != NULL, FALSE); ++ only_trusted = pk_backend_get_bool (self, "only_trusted"); ++ ++ if (!only_trusted && !pk_backend_disable_signatures (self, &error)) { ++ goto out; ++ } ++ if (!pk_backend_transaction_initialize (self, 0, &error) || -@@ -233,8 +230,8 @@ pk_backend_update_packages_thread (PkBackend *self) + !pk_backend_transaction_sync_targets (self, &error) || + !pk_backend_transaction_simulate (self, &error)) { +@@ -233,8 +252,8 @@ pk_backend_update_packages_thread (PkBackend *self) } /* change the install reason of packages that replace dependencies */ @@ -2172,7 +2325,7 @@ index 9e1e02b..c770159 100644 const gchar *name = alpm_pkg_get_name (pkg); if (pk_backend_cancelled (self)) { -@@ -254,7 +251,8 @@ pk_backend_update_packages_thread (PkBackend *self) +@@ -254,14 +273,22 @@ pk_backend_update_packages_thread (PkBackend *self) for (i = asdeps; i != NULL; i = i->next) { const gchar *name = (const gchar *) i->data; @@ -2182,6 +2335,21 @@ index 9e1e02b..c770159 100644 } out: ++ pk_backend_transaction_end (self, (error == NULL) ? &error : NULL); ++ ++ if (!only_trusted) { ++ GError **e = (error == NULL) ? &error : NULL; ++ pk_backend_enable_signatures (self, e); ++ } ++ + alpm_list_free_inner (asdeps, g_free); + alpm_list_free (asdeps); + +- return pk_backend_transaction_finish (self, error); ++ return pk_backend_finish (self, error); + } + + void diff --git a/backends/alpm/pk-backend-transaction.c b/backends/alpm/pk-backend-transaction.c index fdb840e..76402f0 100644 --- a/backends/alpm/pk-backend-transaction.c diff --git a/community/tinyproxy/PKGBUILD b/community/tinyproxy/PKGBUILD index 968279a76..478eb7fce 100644 --- a/community/tinyproxy/PKGBUILD +++ b/community/tinyproxy/PKGBUILD @@ -1,21 +1,22 @@ -# $Id: PKGBUILD 61689 2012-01-06 19:23:37Z lfleischer $ +# $Id: PKGBUILD 62660 2012-01-23 13:31:10Z lfleischer $ # Maintainer: Lukas Fleischer # Contributor: Andrea Zucchelli pkgname=tinyproxy pkgver=1.8.3 -pkgrel=2 +pkgrel=3 pkgdesc='A light-weight HTTP proxy daemon for POSIX operating systems.' arch=('i686' 'x86_64') url='https://banu.com/tinyproxy/' license=('GPL') makedepends=('asciidoc') +install="${pkgname}.install" backup=('etc/tinyproxy/tinyproxy.conf') source=("https://banu.com/pub/${pkgname}/1.8/${pkgname}-${pkgver}.tar.bz2" 'tinyproxy' 'tinyproxy.tmpfiles.conf') md5sums=('292ac51da8ad6ae883d4ebf56908400d' - '464b5d60b1c9cbae26367fe2337c2d77' + '90eb2b3371e56d5a784fd826d4a6e5f8' '3c2764578f26581346fe312da0519a3e') build() { diff --git a/community/tinyproxy/tinyproxy b/community/tinyproxy/tinyproxy index 86ba7b77c..5580ea804 100755 --- a/community/tinyproxy/tinyproxy +++ b/community/tinyproxy/tinyproxy @@ -8,11 +8,7 @@ PID=$(pidof -o %PPID /usr/sbin/tinyproxy) start() { stat_busy "Starting Tinyproxy" - if [ ! -d /var/run/tinyproxy ]; then - mkdir -p /var/run/tinyproxy && chown nobody:nobody /var/run/tinyproxy - fi - - [ -z "$PID" ] && rm -f /var/run/tinyproxy.pid && \ + [ -z "$PID" ] && rm -f /var/run/tinyproxy/tinyproxy.pid && \ /usr/sbin/tinyproxy -c /etc/tinyproxy/tinyproxy.conf 2>/dev/null if [ $? -gt 0 ]; then diff --git a/community/tinyproxy/tinyproxy.install b/community/tinyproxy/tinyproxy.install new file mode 100644 index 000000000..85f3dfc41 --- /dev/null +++ b/community/tinyproxy/tinyproxy.install @@ -0,0 +1,9 @@ +post_install() { + if [ ! -d /var/run/tinyproxy ]; then + install -dm0770 -o nobody -g nobody /var/run/tinyproxy + fi +} + +post_upgrade() { + post_install "$@" +} diff --git a/core/btrfs-progs/PKGBUILD b/core/btrfs-progs/PKGBUILD new file mode 100644 index 000000000..343cb55c3 --- /dev/null +++ b/core/btrfs-progs/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 147160 2012-01-23 15:27:41Z ibiru $ +# Maintainer: Tom Gundersen +# Contributor: Tobias Powalowski +pkgname=btrfs-progs +pkgver=0.19.20120110 +pkgrel=2 +pkgdesc="btrfs filesystem utilities" +arch=(i686 x86_64) +depends=('glibc' 'e2fsprogs') +source=(ftp://ftp.archlinux.org/other/$pkgname/$pkgname-$pkgver.tar.xz) +url="http://btrfs.wiki.kernel.org/" +replaces=('btrfs-progs-unstable') +conflicts=('btrfs-progs-unstable') +provides=('btrfs-progs-unstable') +license=('GPL2') + +build() { + cd $srcdir/$pkgname + make CFLAGS="$CFLAGS" all convert +} + +package() { + cd $srcdir/$pkgname + make prefix=$pkgdir/usr install + # fix manpage + mkdir -p $pkgdir/usr/share/ + mv $pkgdir/usr/man $pkgdir/usr/share/man + mkdir -p ${pkgdir}/sbin + ln -sf /usr/bin/btrfs ${pkgdir}/sbin/btrfs +} +md5sums=('a3f6fbeb166f8e6b5c06833888d4ecf2') diff --git a/core/iproute2/PKGBUILD b/core/iproute2/PKGBUILD index cbf7e9c4b..b017ba58b 100644 --- a/core/iproute2/PKGBUILD +++ b/core/iproute2/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 146447 2012-01-11 15:20:57Z stephane $ +# $Id: PKGBUILD 147158 2012-01-23 15:27:38Z ibiru $ # Maintainer: Ronald van Haren # Contributor: Judd Vinet pkgname=iproute2 pkgver=3.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="IP Routing Utilities" arch=('i686' 'x86_64') license=('GPL2') @@ -19,10 +19,11 @@ options=('!makeflags') backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_protos' \ 'etc/iproute2/rt_realms' 'etc/iproute2/rt_scopes' 'etc/iproute2/rt_tables') source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz - iproute2-fhs.patch) + iproute2-fhs.patch + fix-ip-l.patch) sha1sums=('1e217f22b0bbfc870ddf746de883ee375cd9e533' - '2416b11252364d7a6c742eabb4a6924a75637a46') - + '2416b11252364d7a6c742eabb4a6924a75637a46' + '2ec5513c44f89046438d65e2cda1a014010e3b73') build() { cd $srcdir/$pkgname-$pkgver @@ -30,6 +31,9 @@ build() { # set correct fhs structure patch -Np1 -i "$srcdir/iproute2-fhs.patch" + #upstream fixes + patch -Np1 -i "$srcdir/fix-ip-l.patch" + ./configure make diff --git a/core/iproute2/fix-ip-l.patch b/core/iproute2/fix-ip-l.patch new file mode 100644 index 000000000..7f1749cbb --- /dev/null +++ b/core/iproute2/fix-ip-l.patch @@ -0,0 +1,27 @@ +From 5aa08f6bf4107f8aec43c0678466a314dbd0d054 Mon Sep 17 00:00:00 2001 +From: Stephen Hemminger +Date: Fri, 20 Jan 2012 08:16:02 -0800 +Subject: [PATCH] ip: make 'ip l' be 'ip link' + +Restore compatiablity for those lazy typists. +--- + ip/ip.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/ip/ip.c b/ip/ip.c +index 7b4bacb..20dc3b5 100644 +--- a/ip/ip.c ++++ b/ip/ip.c +@@ -72,8 +72,8 @@ static const struct cmd { + { "neighbour", do_ipneigh }, + { "ntable", do_ipntable }, + { "ntbl", do_ipntable }, +- { "l2tp", do_ipl2tp }, + { "link", do_iplink }, ++ { "l2tp", do_ipl2tp }, + { "tunnel", do_iptunnel }, + { "tunl", do_iptunnel }, + { "tuntap", do_iptuntap }, +-- +1.7.6.5 + diff --git a/extra/freeglut/PKGBUILD b/extra/freeglut/PKGBUILD index ac748f8ee..afd3f36bf 100644 --- a/extra/freeglut/PKGBUILD +++ b/extra/freeglut/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 62079 2010-01-01 23:53:58Z eric $ +# $Id: PKGBUILD 147152 2012-01-23 14:30:00Z heftig $ # Maintainer: Eric Belanger # Contributor: Tom Newsom pkgname=freeglut -pkgver=2.6.0 +pkgver=2.8.0 pkgrel=1 pkgdesc="Provides functionality for small OpenGL programs" arch=('i686' 'x86_64') @@ -14,19 +14,18 @@ replaces=('glut') provides=('glut') conflicts=('glut') options=('!libtool') -source=(http://downloads.sourceforge.net/freeglut/${pkgname}-${pkgver}.tar.gz \ - 2.6.0-GFX_radeon.patch) -md5sums=('39f0f2de89f399529d2b981188082218' '6d0a018fe4f0bc9ace2b244ca59514d3') -sha1sums=('68306c4486c13d005a4e4d54035e0c0b1bdc220b' '2e392c7d0b60016ec89e6a5edf504f5722351b95') +source=(http://downloads.sourceforge.net/freeglut/${pkgname}-${pkgver}.tar.gz) +md5sums=('5db8651af306bc403fbfd36934a20e1d') +sha1sums=('4debbe559c6c9841ce1abaddc9d461d17c6083b1') build() { cd "${srcdir}/${pkgname}-${pkgver}" -# fixes an issue with the radeon[hd] ATI opensource drivers -# ref: http://bugs.gentoo.org/show_bug.cgi?id=295163 - patch -p0 -i "${srcdir}/2.6.0-GFX_radeon.patch" || return 1 + ./configure --prefix=/usr --disable-static + make all +} - ./configure --prefix=/usr || return 1 - make all || return 1 - make DESTDIR="${pkgdir}" install || return 1 - install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1 +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/extra/gptfdisk/PKGBUILD b/extra/gptfdisk/PKGBUILD index 7a5410ff0..12bc4baa8 100644 --- a/extra/gptfdisk/PKGBUILD +++ b/extra/gptfdisk/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 139468 2011-10-02 00:35:06Z foutrelis $ +# $Id: PKGBUILD 147145 2012-01-23 07:56:33Z foutrelis $ # Maintainer: Evangelos Foutras # Contributor: Tobias Powalowski # Contributor: Hokum pkgname=gptfdisk -pkgver=0.8.1 +pkgver=0.8.2 pkgrel=1 pkgdesc="A text-mode partitioning tool that works on Globally Unique Identifier (GUID) Partition Table (GPT) disks" arch=('i686' 'x86_64') @@ -15,7 +15,7 @@ provides=("gdisk=$pkgver") conflicts=('gdisk') replaces=('gdisk') source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz) -sha1sums=('3285608c8c3087040d3bec9db1b287fae3cfc4c1') +sha256sums=('b1159027ca459661f04bc3bac8e79381895933ee214c4d6dba49b7d27204e5d3') build() { cd "$srcdir/$pkgname-$pkgver" diff --git a/extra/memcached/PKGBUILD b/extra/memcached/PKGBUILD index 7eadae184..c706303b4 100644 --- a/extra/memcached/PKGBUILD +++ b/extra/memcached/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 142481 2011-11-10 15:13:21Z dan $ +# $Id: PKGBUILD 147164 2012-01-23 19:16:26Z dan $ # Maintainer: Dan McGee # Contributor: Michael Irwin <6d6469@gmail.com> pkgname=memcached -pkgver=1.4.10 +pkgver=1.4.11 pkgrel=1 pkgdesc="A distributed memory object caching system" arch=(i686 x86_64) @@ -16,7 +16,7 @@ source=(http://memcached.googlecode.com/files/$pkgname-$pkgver.tar.gz memcached.conf memcached.sh) changelog=ChangeLog -sha256sums=('2cc3de341b561464da29fc5d5e2a4facc0f6aafc151f0e1d94228705e0758fdf' +sha256sums=('e3dcc4ff29d2b3f3c66f2b5b95a1bcef0163a65b588d6ba92a56cd6c8d73e83e' '0e57a0f528b387f1f04f628ec74856c615d82d44f4d6bc041c33b3814ce13d0a' '72efa639c5a39c7c14f07cc51731ebbf82299870d9cf31cf3aaa981bc084b4eb') diff --git a/extra/perl-alien-sdl/PKGBUILD b/extra/perl-alien-sdl/PKGBUILD index 25bd18eeb..1fe3bd4c6 100644 --- a/extra/perl-alien-sdl/PKGBUILD +++ b/extra/perl-alien-sdl/PKGBUILD @@ -1,5 +1,5 @@ -# $Id: PKGBUILD 124820 2011-05-24 15:44:07Z heftig $ -# Maintainer: Jan "heftig" Steffens +# $Id: PKGBUILD 147156 2012-01-23 14:30:07Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) # Contributor: Allan McRae # Contributor: Sarah Hay @@ -8,17 +8,17 @@ pkgname=perl-alien-sdl _realname=Alien-SDL -pkgver=1.426 +pkgver=1.430 pkgrel=1 pkgdesc="Building, finding and using SDL binaries" arch=(i686 x86_64) license=(PerlArtistic GPL) url="http://search.cpan.org/dist/Alien-SDL/" -depends=(sdl=1.2.14 perl-file-sharedir perl-capture-tiny) +depends=(sdl=1.2.15 perl-file-sharedir perl-capture-tiny) makedepends=(perl-file-which perl-text-patch) options=(!emptydirs) source=(http://search.cpan.org/CPAN/authors/id/F/FR/FROGGS/$_realname-$pkgver.tar.gz) -md5sums=('ab5e1167934418f4a7b3285a9d05c89b') +md5sums=('9d7774212fb4e1c46325746c953a808b') package() { cd "$srcdir/$_realname-$pkgver" diff --git a/multilib/lib32-sdl_image/PKGBUILD b/multilib/lib32-sdl_image/PKGBUILD index a0df01c37..bf60a1817 100644 --- a/multilib/lib32-sdl_image/PKGBUILD +++ b/multilib/lib32-sdl_image/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 62238 2012-01-18 17:43:15Z svenstaro $ +# $Id: PKGBUILD 62665 2012-01-23 18:29:11Z svenstaro $ # Maintainer: Sven-Hendrik Haase # Contributor: SpepS _pkgbasename=sdl_image pkgname=lib32-$_pkgbasename -pkgver=1.2.11 +pkgver=1.2.12 pkgrel=1 pkgdesc="A simple library to load images of various formats as SDL surfaces (32-bit)" arch=('x86_64') @@ -14,7 +14,7 @@ depends=('lib32-sdl' 'lib32-libpng' 'lib32-libjpeg' 'lib32-libtiff' 'lib32-zlib' makedepends=('gcc-multilib') options=('!libtool') source=(http://www.libsdl.org/projects/SDL_image/release/SDL_image-${pkgver}.tar.gz) -md5sums=('1210d7a7e87ab95abebb4f3e79a0fd31') +md5sums=('a0f9098ebe5400f0bdc9b62e60797ecb') build() { export CC='gcc -m32' diff --git a/staging/avahi/PKGBUILD b/staging/avahi/PKGBUILD new file mode 100644 index 000000000..b917e9248 --- /dev/null +++ b/staging/avahi/PKGBUILD @@ -0,0 +1,75 @@ +# $Id: PKGBUILD 147194 2012-01-24 04:55:03Z bisson $ +# Contributor: Douglas Soares de Andrade +# Maintainer: Gaetan Bisson + +pkgname=avahi +pkgver=0.6.30 +pkgrel=7 +pkgdesc='A multicast/unicast DNS-SD framework' +arch=('i686' 'x86_64') +url='http://www.avahi.org/' +license=('LGPL') +depends=('expat' 'libdaemon' 'glib2' 'dbus' 'libcap' 'gdbm') +optdepends=('gtk3: avahi-discover-standalone, bshell, bssh, bvnc' + 'gtk2: gtk2 bindings' + 'qt3: qt3 bindings' + 'qt: qt bindings' + 'pygtk: avahi-bookmarks, avahi-discover' + 'twisted: avahi-bookmarks' + 'mono: mono bindings' + 'dbus-python: avahi-discover' + 'nss-mdns: NSS support for mDNS') +makedepends=('qt' 'qt3' 'pygtk' 'mono' 'intltool' 'dbus-python' + 'gtk-sharp-2' 'gobject-introspection' 'gtk3') +backup=(etc/avahi/avahi-daemon.conf etc/avahi/services/{sftp-,}ssh.service) +install=install +conflicts=('howl' 'mdnsresponder') +provides=('howl' 'mdnsresponder') +replaces=('howl' 'mdnsresponder') +options=('!libtool') +source=("http://www.avahi.org/download/avahi-${pkgver}.tar.gz" + 'gnome-nettool.png' + 'rc.d.patch') +sha1sums=('5b77443537600a00770e4c77e3c443eeb5861d06' + 'cf56387c88aed246b9f435efc182ef44de4d52f3' + '625ad7c131c0c1c383caeddef18fc7a32d8f3ab9') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sed -i 's/netdev/network/g' avahi-daemon/avahi-dbus.conf + patch -p1 -i "../rc.d.patch" + + # pygtk requires python2; make it explicit in case other python are installed: FS#21865 + PYTHON=python2 \ + PKG_CONFIG_PATH=/opt/qt/lib/pkgconfig \ + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-monodoc \ + --disable-doxygen-doc \ + --disable-xmltoman \ + --enable-compat-libdns_sd \ + --enable-compat-howl \ + --with-distro=archlinux \ + --with-avahi-priv-access-group=network \ + --with-autoipd-user=avahi \ + --with-autoipd-group=avahi \ + --with-systemdsystemunitdir=/lib/systemd/system # See FS#20999 + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m 644 ../gnome-nettool.png "${pkgdir}"/usr/share/pixmaps/gnome-nettool.png + + cd "${pkgdir}" + sed -i '1c #!/usr/bin/python2' usr/bin/avahi-{bookmarks,discover} + # howl and mdnsresponder compatability + (cd usr/include; ln -s avahi-compat-libdns_sd/dns_sd.h dns_sd.h; ln -s avahi-compat-howl howl) + (cd usr/lib/pkgconfig; ln -s avahi-compat-howl.pc howl.pc) +} diff --git a/staging/avahi/gnome-nettool.png b/staging/avahi/gnome-nettool.png new file mode 100644 index 000000000..227d0678a Binary files /dev/null and b/staging/avahi/gnome-nettool.png differ diff --git a/staging/avahi/install b/staging/avahi/install new file mode 100644 index 000000000..7c75c3dd4 --- /dev/null +++ b/staging/avahi/install @@ -0,0 +1,21 @@ +post_install() { + getent group avahi &>/dev/null || groupadd -r -g 84 avahi >/dev/null + getent passwd avahi &>/dev/null || useradd -r -u 84 -g avahi -d / -s /bin/false -c avahi avahi >/dev/null + + cat < The following daemons may be added to DAEMONS in /etc/rc.conf: +==> avahi-daemon: the mdns responder, you probably want this. +==> dbus needs to be running when you start it. +==> avahi-dnsconfd: daemon used for peer-to-peer automatic dns +==> configuration on dhcp-less networks. + +==> To use some of the client applications you will have to install python. +==> In addition, pygtk is required for the graphical ones and +==> twisted for avahi-bookmarks. +EOF +} + +post_remove() { + getent passwd avahi &>/dev/null && userdel avahi >/dev/null + getent group avahi &>/dev/null && groupdel avahi >/dev/null +} diff --git a/staging/avahi/rc.d.patch b/staging/avahi/rc.d.patch new file mode 100644 index 000000000..fd735734b --- /dev/null +++ b/staging/avahi/rc.d.patch @@ -0,0 +1,11 @@ +diff -aur old/initscript/archlinux/avahi-daemon.in new/initscript/archlinux/avahi-daemon.in +--- old/initscript/archlinux/avahi-daemon.in 2011-06-24 03:07:00.916170590 +0200 ++++ new/initscript/archlinux/avahi-daemon.in 2011-06-24 03:16:32.220596377 +0200 +@@ -33,6 +33,7 @@ + + case "$1" in + start) ++ ck_daemon dbus && { echo -n "Start dbus first." >&2; stat_die; } + stat_busy "Starting $DESC" + $DAEMON -D > /dev/null 2>&1 + if [ $? -gt 0 ]; then diff --git a/staging/bmp/0.9.7.1-visualization.patch b/staging/bmp/0.9.7.1-visualization.patch new file mode 100644 index 000000000..ac03323f6 --- /dev/null +++ b/staging/bmp/0.9.7.1-visualization.patch @@ -0,0 +1,12 @@ +--- beep/vis.c 2004-12-04 10:04:29.000000000 +0100 ++++ beep/vis.c 2005-02-17 12:02:25.391044008 +0100 +@@ -223,7 +223,8 @@ vis_draw(Widget * w) + /* FIXME: The check "shouldn't" be neccessary? */ + /* if (GTK_IS_WINDOW(vis->vs_window)) { */ + GDK_THREADS_ENTER(); +- gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc, ++ if (GDK_IS_DRAWABLE(vis->vs_window)) ++ gdk_draw_indexed_image(vis->vs_window, vis->vs_widget.gc, + vis->vs_widget.x, vis->vs_widget.y, + vis->vs_widget.width, vis->vs_widget.height, + GDK_RGB_DITHER_NORMAL, (guchar *) rgb_data, diff --git a/staging/bmp/PKGBUILD b/staging/bmp/PKGBUILD new file mode 100644 index 000000000..028372325 --- /dev/null +++ b/staging/bmp/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 147143 2012-01-23 05:18:22Z eric $ +# Maintainer: Kevin Piche +# Contributor: Ben + +pkgname=bmp +pkgver=0.9.7.1 +pkgrel=9 +pkgdesc="gtk2 port of xmms" +arch=('i686' 'x86_64') +url="http://sourceforge.net/projects/beepmp/" +license=('GPL') +depends=('id3lib' 'libglade' 'libsm' 'libvorbis' 'alsa-lib' 'unzip' 'desktop-file-utils') +makedepends=('libxt') +options=('!libtool') +install=bmp.install +source=(http://downloads.sourceforge.net/sourceforge/beepmp/${pkgname}-${pkgver}.tar.gz \ + ${pkgver}-visualization.patch bmp-${pkgver}-crossfade-0.3.9.patch) +md5sums=('c25d5a8d49cc5851d13d525a20023c4c' + 'fa1bdf5a8d03e8539a6bed5caa471176' + '42ad4109ddb66024d4c6d1f3e572ab86') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -p0 -i ../${pkgver}-visualization.patch + patch -p1 -i ../${pkgname}-${pkgver}-crossfade-0.3.9.patch + LIBS+="-lm" ./configure --prefix=/usr --mandir=/usr/share/man + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} +# vim: ts=2 sw=2 et ft=sh diff --git a/staging/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch b/staging/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch new file mode 100644 index 000000000..4c1e46da9 --- /dev/null +++ b/staging/bmp/bmp-0.9.7.1-crossfade-0.3.9.patch @@ -0,0 +1,108 @@ +Patch taken from xmms-crossfade 3.10 tarball. Required for crossfade to +work. http://www.eisenlohr.org/xmms-crossfade/ + +diff -ur bmp-0.9.7.1/beep/mainwin.c bmp-0.9.7.1.patched/beep/mainwin.c +--- bmp-0.9.7.1/beep/mainwin.c 2005-05-09 10:45:39.000000000 +0200 ++++ bmp-0.9.7.1.patched/beep/mainwin.c 2005-11-25 00:03:59.000000000 +0100 +@@ -655,9 +655,11 @@ + mainwin_set_shade(!cfg.player_shaded); + } + ++gboolean is_quitting = FALSE; + void + mainwin_quit_cb(void) + { ++ is_quitting = TRUE; + gtk_widget_hide(equalizerwin); + gtk_widget_hide(playlistwin); + gtk_widget_hide(mainwin); +@@ -1318,7 +1320,7 @@ + change_song(guint pos) + { + if (bmp_playback_get_playing()) +- bmp_playback_stop(); ++ bmp_playback_stop_for_restart(); + + playlist_set_position(pos); + bmp_playback_initiate(); +diff -ur bmp-0.9.7.1/beep/playback.c bmp-0.9.7.1.patched/beep/playback.c +--- bmp-0.9.7.1/beep/playback.c 2005-01-26 06:56:15.000000000 +0100 ++++ bmp-0.9.7.1.patched/beep/playback.c 2005-11-25 00:03:59.000000000 +0100 +@@ -89,7 +89,7 @@ + return; + + if (bmp_playback_get_playing()) +- bmp_playback_stop(); ++ bmp_playback_stop_for_restart(); + + vis_clear_data(mainwin_vis); + vis_clear_data(playlistwin_vis); +@@ -135,6 +135,15 @@ + get_current_input_plugin()->pause(ip_data.paused); + } + ++gboolean input_stopped_for_restart = FALSE; ++void ++bmp_playback_stop_for_restart(void) ++{ ++ input_stopped_for_restart = TRUE; ++ bmp_playback_stop(); ++ input_stopped_for_restart = FALSE; ++} ++ + void + bmp_playback_stop(void) + { +diff -ur bmp-0.9.7.1/beep/playback.h bmp-0.9.7.1.patched/beep/playback.h +--- bmp-0.9.7.1/beep/playback.h 2004-12-04 10:04:26.000000000 +0100 ++++ bmp-0.9.7.1.patched/beep/playback.h 2005-11-25 00:03:59.000000000 +0100 +@@ -26,6 +26,7 @@ + void bmp_playback_initiate(void); + void bmp_playback_pause(void); + void bmp_playback_stop(void); ++void bmp_playback_stop_for_restart(void); + gboolean bmp_playback_play_file(const gchar * filename); + gboolean bmp_playback_get_playing(void); + gboolean bmp_playback_get_paused(void); +diff -ur bmp-0.9.7.1/beep/playlist.c bmp-0.9.7.1.patched/beep/playlist.c +--- bmp-0.9.7.1/beep/playlist.c 2005-08-11 09:25:51.000000000 +0200 ++++ bmp-0.9.7.1.patched/beep/playlist.c 2005-11-25 00:03:59.000000000 +0100 +@@ -817,7 +817,7 @@ + if (bmp_playback_get_playing()) { + /* We need to stop before changing playlist_position */ + PLAYLIST_UNLOCK(); +- bmp_playback_stop(); ++ bmp_playback_stop_for_restart(); + PLAYLIST_LOCK(); + restart_playing = TRUE; + } +@@ -868,7 +868,7 @@ + if (bmp_playback_get_playing()) { + /* We need to stop before changing playlist_position */ + PLAYLIST_UNLOCK(); +- bmp_playback_stop(); ++ bmp_playback_stop_for_restart(); + PLAYLIST_LOCK(); + restart_playing = TRUE; + } +@@ -1018,7 +1018,7 @@ + if (bmp_playback_get_playing()) { + /* We need to stop before changing playlist_position */ + PLAYLIST_UNLOCK(); +- bmp_playback_stop(); ++ bmp_playback_stop_for_restart(); + PLAYLIST_LOCK(); + restart_playing = TRUE; + } +@@ -1047,7 +1047,10 @@ + { + GList *plist_pos_list; + +- bmp_playback_stop(); ++ if (cfg.repeat) ++ bmp_playback_stop_for_restart(); ++ else ++ bmp_playback_stop(); + + PLAYLIST_LOCK(); + plist_pos_list = find_playlist_position_list(); diff --git a/staging/bmp/bmp.install b/staging/bmp/bmp.install new file mode 100644 index 000000000..2eaa60550 --- /dev/null +++ b/staging/bmp/bmp.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/staging/gtk-engines/PKGBUILD b/staging/gtk-engines/PKGBUILD new file mode 100644 index 000000000..0883d0ab4 --- /dev/null +++ b/staging/gtk-engines/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 147188 2012-01-24 03:20:02Z eric $ +# Maintainer: Jan de Groot + +pkgname=gtk-engines +pkgver=2.20.2 +pkgrel=2 +pkgdesc="Theme engines for GTK+ 2" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('gtk2>=2.22.0') +makedepends=('pkg-config' 'intltool') +options=('!libtool') +url="http://live.gnome.org/GnomeArt" +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.20/${pkgname}-${pkgver}.tar.bz2) +conflicts=('lighthouse-gtk2' 'clearlooks-gtk2') +replaces=('lighthouse-gtk2') +sha256sums=('15b680abca6c773ecb85253521fa100dd3b8549befeecc7595b10209d62d66b5') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --enable-animation + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/gtkhtml/PKGBUILD b/staging/gtkhtml/PKGBUILD new file mode 100644 index 000000000..45bc4353c --- /dev/null +++ b/staging/gtkhtml/PKGBUILD @@ -0,0 +1,31 @@ +# $Id: PKGBUILD 147192 2012-01-24 04:25:29Z eric $ +# Maintainer: Jan de Groot + +pkgname=gtkhtml +pkgver=3.32.2 +pkgrel=3 +pkgdesc="A lightweight HTML renderer/editor widget for GTK2" +arch=(i686 x86_64) +license=('GPL') +depends=('gconf' 'gtk2' 'gnome-icon-theme' 'enchant' 'iso-codes' 'libsoup') +makedepends=('intltool') +url="http://www.gnome.org" +options=('!libtool') +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/3.32/${pkgname}-${pkgver}.tar.bz2) +sha256sums=('8746053cf709e1de37c7ac775ab1364ddda4b75167660ed7f98a237b3797e39f') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc \ + --libexecdir=/usr/lib/gtkhtml \ + --localstatedir=/var --disable-static \ + --disable-deprecated-warning-flags + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + + rm -f "${pkgdir}/usr/bin/gtkhtml-editor-test" +} diff --git a/staging/gtkmm/PKGBUILD b/staging/gtkmm/PKGBUILD new file mode 100644 index 000000000..40eae3010 --- /dev/null +++ b/staging/gtkmm/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 147190 2012-01-24 04:22:44Z eric $ +# Contributor: Tom Newsom +# Maintainer: Jan de Groot + +pkgbase=gtkmm +pkgname=('gtkmm' 'gtkmm-docs') +pkgver=2.24.2 +pkgrel=2 +arch=('i686' 'x86_64') +makedepends=('gtk2' 'pangomm' 'atkmm' 'glibmm-docs') +license=('LGPL') +options=('!libtool' '!emptydirs') +url="http://gtkmm.sourceforge.net/" +source=(http://ftp.gnome.org/pub/GNOME/sources/${pkgbase}/2.24/${pkgbase}-${pkgver}.tar.xz) +sha256sums=('c90c7a29c20dd6d795925bd66ad1ff40be07cea0e4c03f4d6105a8c07448953d') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + ./configure --prefix=/usr + make +} + +package_gtkmm() { + pkgdesc="C++ bindings for gtk2" + depends=('gtk2' 'pangomm' 'atkmm') + cd "${srcdir}/${pkgbase}-${pkgver}" + + sed -i -e 's/^doc_subdirs/#doc_subdirs/' Makefile + + make DESTDIR="${pkgdir}" install +} + +package_gtkmm-docs() { + pkgdesc="Developer documentation for gtkmm v2" + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C docs DESTDIR="${pkgdir}" install +} diff --git a/staging/gtksourceview2/PKGBUILD b/staging/gtksourceview2/PKGBUILD new file mode 100644 index 000000000..6f0777cb6 --- /dev/null +++ b/staging/gtksourceview2/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 147186 2012-01-24 03:16:31Z eric $ +# Maintainer: Jan de Groot + +pkgname=gtksourceview2 +pkgver=2.10.5 +pkgrel=2 +pkgdesc="A text widget adding syntax highlighting and more to GNOME" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gtk2>=2.22.0' 'libxml2>=2.7.7') +makedepends=('intltool' 'pkg-config') +options=('!libtool') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/gtksourceview/2.10/gtksourceview-${pkgver}.tar.bz2) +sha256sums=('c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e') + +build() { + cd "${srcdir}/gtksourceview-${pkgver}" + sed -i 's#python#python2#' gtksourceview/language-specs/convert.py + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --disable-static + make +} + +package() { + cd "${srcdir}/gtksourceview-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/imlib2/PKGBUILD b/staging/imlib2/PKGBUILD new file mode 100644 index 000000000..33e0b8bca --- /dev/null +++ b/staging/imlib2/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 147170 2012-01-23 21:18:18Z eric $ +# Maintainer: Ronald van Haren +# Contributor: Arjan Timmerman +# Contributor: Tom Newsom + +pkgname=imlib2 +pkgver=1.4.5 +pkgrel=2 +pkgdesc="Library that does image file loading and saving as well as rendering, manipulation, arbitrary polygon support" +url="http://sourceforge.net/projects/enlightenment/" +arch=('i686' 'x86_64') +license=('BSD') +depends=('libtiff' 'giflib' 'bzip2' 'freetype2' 'libxext' 'libpng' 'libid3tag' 'libjpeg-turbo') +options=('!libtool') +source=("http://downloads.sourceforge.net/enlightenment/$pkgname-$pkgver.tar.bz2") +sha1sums=('af86a2c38f4bc3806db57e64e74dc9814ad474a0') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + # disable optimizations, they cause problems (e.g. FS#12268) + [ $CARCH = "i686" ] && EXTRAOPTS="--disable-mmx" + [ $CARCH = "x86_64" ] && EXTRAOPTS="--disable-amd64" + + # Configure and Build + ./configure --prefix=/usr \ + --sysconfdir=/etc/imlib2 \ + --x-libraries=/usr/lib $EXTRAOPTS + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + # Install License + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} diff --git a/staging/libgnomecanvas/PKGBUILD b/staging/libgnomecanvas/PKGBUILD new file mode 100644 index 000000000..42ba98b4d --- /dev/null +++ b/staging/libgnomecanvas/PKGBUILD @@ -0,0 +1,27 @@ +# $Id: PKGBUILD 147184 2012-01-24 03:06:37Z eric $ +# Maintainer: Jan de Groot + +pkgname=libgnomecanvas +pkgver=2.30.3 +pkgrel=2 +pkgdesc="The GNOME Canvas library" +arch=(i686 x86_64) +license=('LGPL') +depends=('libglade>=2.6.4' 'libart-lgpl>=2.3.21') +makedepends=('pkg-config' 'intltool') +options=('!libtool') +url="http://www.gnome.org" +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/2.30/${pkgname}-${pkgver}.tar.bz2) +sha256sums=('859b78e08489fce4d5c15c676fec1cd79782f115f516e8ad8bed6abcb8dedd40') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-static \ + --enable-glade + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/opengtl/PKGBUILD b/staging/opengtl/PKGBUILD new file mode 100644 index 000000000..30d4c64d7 --- /dev/null +++ b/staging/opengtl/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 147180 2012-01-24 01:25:15Z foutrelis $ +# Maintainer: Ronald van Haren +# Contributor: Andries Radu + +pkgname=opengtl +pkgver=0.9.16 +pkgrel=1 +pkgdesc="A set of library for using and integrating transformation algorithms (such as filter or color conversion) in graphics applications" +url="http://www.opengtl.org" +arch=('i686' 'x86_64') +license=('GPL') +depends=('gcc-libs' 'llvm') +makedepends=('cmake' 'libpng') +optdepends=('libpng: for using the png extension') +source=(http://download.opengtl.org/OpenGTL-${pkgver}.tar.bz2) +sha1sums=('3cfe4a08e5778c13f7e74dfc822adb68f97ad048') + +build() { + cd "${srcdir}" + mkdir build + cd build + cmake ../OpenGTL-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/pekwm/PKGBUILD b/staging/pekwm/PKGBUILD new file mode 100644 index 000000000..68cba0015 --- /dev/null +++ b/staging/pekwm/PKGBUILD @@ -0,0 +1,45 @@ +# $Id: PKGBUILD 147166 2012-01-23 20:22:29Z eric $ +# Maintainer: Kevin Piche +# Contributor: Eddie Lozon + +pkgname=pekwm +pkgver=0.1.13 +pkgrel=2 +pkgdesc="A small, fast, functional, and flexible window manager" +arch=(i686 x86_64) +license=('GPL') +url="http://pekwm.org/" +depends=('gcc-libs' 'libjpeg>=7' 'libpng' 'libxft' 'libxinerama' 'libxpm' +'libxrandr') +backup=(etc/pekwm/config + etc/pekwm/vars + etc/pekwm/autoproperties + etc/pekwm/start + etc/pekwm/keys + etc/pekwm/mouse + etc/pekwm/menu) +source=(http://www.pekwm.org/projects/pekwm/files/${pkgname}-${pkgver}.tar.bz2 +pekwm.desktop libpng-1.4.patch) +md5sums=('51a3f9030817df0304cc1da5110e493a' '5a78fc6653fbb0b7282ecf7f1f81e2c5' + '075bf1b9d32bf94780329499e4fa40e3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" +# patch -p1 < ../libpng-1.4.patch || return 1 + # Default settings: + # --enable-shape --enable-xinerama --enable-menus \ + # --enable-harbour --disable-debug --disable-pedantic \ + # --enable-xft --enable-image-xpm --enable-image-jpeg \ + # --enable-image-png --enable-xrandr + ./configure --prefix=/usr --sysconfdir=/etc + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -D -m644 "${srcdir}/${pkgname}.desktop" \ + "${pkgdir}/usr/share/xsessions/${pkgname}.desktop" +} +# vim: ts=2 sw=2 et ft=sh diff --git a/staging/pekwm/libpng-1.4.patch b/staging/pekwm/libpng-1.4.patch new file mode 100644 index 000000000..bc4df2c4d --- /dev/null +++ b/staging/pekwm/libpng-1.4.patch @@ -0,0 +1,21 @@ +diff -Naur pekwm-0.1.11-orig/src/PImageLoaderPng.cc pekwm-0.1.11/src/PImageLoaderPng.cc +--- pekwm-0.1.11-orig/src/PImageLoaderPng.cc 2010-01-22 01:57:08.000000000 -0500 ++++ pekwm-0.1.11/src/PImageLoaderPng.cc 2010-01-22 02:00:02.000000000 -0500 +@@ -108,7 +108,7 @@ + + // gray -> 8 bit gray + if (color_type == PNG_COLOR_TYPE_GRAY && (bpp < 8)) { +- png_set_gray_1_2_4_to_8(png_ptr); ++ png_set_expand_gray_1_2_4_to_8(png_ptr); + } + + if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) { +@@ -179,7 +179,7 @@ + + status = fread(sig, 1, PImageLoaderPng::PNG_SIG_BYTES, fp); + if (status == PImageLoaderPng::PNG_SIG_BYTES) { +- return (png_check_sig(sig, PImageLoaderPng::PNG_SIG_BYTES) != 0); ++ return (png_sig_cmp(sig, 0, PImageLoaderPng::PNG_SIG_BYTES) == 0); + } + return false; + } diff --git a/staging/pekwm/pekwm.desktop b/staging/pekwm/pekwm.desktop new file mode 100644 index 000000000..2f59528bd --- /dev/null +++ b/staging/pekwm/pekwm.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Pekwm +Comment=The pekwm window manager +Exec=pekwm +# no icon yet, only the top three are currently used +Icon= +Type=Application diff --git a/staging/pilot-link/PKGBUILD b/staging/pilot-link/PKGBUILD new file mode 100644 index 000000000..28fa36618 --- /dev/null +++ b/staging/pilot-link/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 147174 2012-01-23 21:43:03Z eric $ +# Maintainer: dale + +# todo: add perl support, DESTDIR has no affect on perl +# and it seems that moving the files manually doesn't work + +pkgname=pilot-link +pkgver=0.12.5 +pkgrel=3 +pkgdesc="A suite of tools for connecting to PalmOS handheld devices" +arch=(i686 x86_64) +license=('GPL' 'LGPL') +depends=('readline>=6.0' 'libpng>=1.5.0' 'libusb-compat' 'popt' 'bluez>=4.59') +options=('!libtool') +url="http://www.pilot-link.org/" +source=(http://downloads.pilot-link.org/${pkgname}-${pkgver}.tar.bz2 + pilot-link-png14.patch) +md5sums=('568c55bf504b044f6fbd50baa407c990' + 'a21a2eeb01544a8a261a75e64a3120c3') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/pilot-link-png14.patch" + ./configure --prefix=/usr --enable-conduits --enable-libusb \ + --with-libiconv --with-libpng + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/pilot-link/pilot-link-png14.patch b/staging/pilot-link/pilot-link-png14.patch new file mode 100644 index 000000000..9d753332e --- /dev/null +++ b/staging/pilot-link/pilot-link-png14.patch @@ -0,0 +1,100 @@ +diff -ru pilot-link-0.12.4/src/pilot-read-notepad.c pilot-link-0.12.4.png14/src/pilot-read-notepad.c +--- pilot-link-0.12.4/src/pilot-read-notepad.c 2007-02-05 00:06:02.000000000 +0100 ++++ pilot-link-0.12.4.png14/src/pilot-read-notepad.c 2010-01-17 15:04:33.000000000 +0100 +@@ -39,10 +39,6 @@ + + #ifdef HAVE_PNG + #include "png.h" +-#if (PNG_LIBPNG_VER < 10201) +- #define png_voidp_NULL (png_voidp)NULL +- #define png_error_ptr_NULL (png_error_ptr)NULL +-#endif + #endif + + const char *progname; +@@ -166,8 +162,8 @@ + width = n->body.width + 8; + + png_ptr = png_create_write_struct +- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL, +- png_error_ptr_NULL, png_error_ptr_NULL); ++ ( PNG_LIBPNG_VER_STRING, NULL, ++ NULL, NULL); + + if(!png_ptr) + return; +diff -ru pilot-link-0.12.4/src/pilot-read-palmpix.c pilot-link-0.12.4.png14/src/pilot-read-palmpix.c +--- pilot-link-0.12.4/src/pilot-read-palmpix.c 2007-02-05 00:06:03.000000000 +0100 ++++ pilot-link-0.12.4.png14/src/pilot-read-palmpix.c 2010-01-17 15:03:20.000000000 +0100 +@@ -42,10 +42,6 @@ + + #ifdef HAVE_PNG + #include "png.h" +-#if (PNG_LIBPNG_VER < 10201) +- #define png_voidp_NULL (png_voidp)NULL +- #define png_error_ptr_NULL (png_error_ptr)NULL +-#endif + #endif + + const char *progname; +@@ -223,8 +219,8 @@ + png_infop info_ptr; + + png_ptr = png_create_write_struct +- ( PNG_LIBPNG_VER_STRING, png_voidp_NULL, +- png_error_ptr_NULL, png_error_ptr_NULL); ++ ( PNG_LIBPNG_VER_STRING, NULL, ++ NULL, NULL); + + if(!png_ptr) + return; +diff -ru pilot-link-0.12.4/src/pilot-read-screenshot.c pilot-link-0.12.4.png14/src/pilot-read-screenshot.c +--- pilot-link-0.12.4/src/pilot-read-screenshot.c 2006-11-02 15:54:31.000000000 +0100 ++++ pilot-link-0.12.4.png14/src/pilot-read-screenshot.c 2010-01-17 15:03:52.000000000 +0100 +@@ -40,10 +40,6 @@ + + #ifdef HAVE_PNG + # include "png.h" +-# if (PNG_LIBPNG_VER < 10201) +-# define png_voidp_NULL (png_voidp)NULL +-# define png_error_ptr_NULL (png_error_ptr)NULL +-# endif + #endif + + #define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4)) +@@ -87,8 +83,8 @@ + gray_buf = malloc( state->w ); + + png_ptr = png_create_write_struct +- (PNG_LIBPNG_VER_STRING, png_voidp_NULL, +- png_error_ptr_NULL, png_error_ptr_NULL); ++ (PNG_LIBPNG_VER_STRING, NULL, ++ NULL, NULL); + + if (!png_ptr) + return; +diff -ru pilot-link-0.12.4/src/pilot-read-veo.c pilot-link-0.12.4.png14/src/pilot-read-veo.c +--- pilot-link-0.12.4/src/pilot-read-veo.c 2007-02-05 00:06:03.000000000 +0100 ++++ pilot-link-0.12.4.png14/src/pilot-read-veo.c 2010-01-17 15:04:14.000000000 +0100 +@@ -41,10 +41,6 @@ + + #ifdef HAVE_PNG + # include "png.h" +-# if (PNG_LIBPNG_VER < 10201) +-# define png_voidp_NULL (png_voidp)NULL +-# define png_error_ptr_NULL (png_error_ptr)NULL +-# endif + #endif + + #define pi_mktag(c1,c2,c3,c4) (((c1)<<24)|((c2)<<16)|((c3)<<8)|(c4)) +@@ -856,8 +852,8 @@ + png_infop info_ptr; + + png_ptr = png_create_write_struct +- (PNG_LIBPNG_VER_STRING, png_voidp_NULL, +- png_error_ptr_NULL, png_error_ptr_NULL); ++ (PNG_LIBPNG_VER_STRING, NULL, ++ NULL, NULL); + + if (!png_ptr) + return; diff --git a/staging/pygtk/PKGBUILD b/staging/pygtk/PKGBUILD new file mode 100644 index 000000000..a231b87ef --- /dev/null +++ b/staging/pygtk/PKGBUILD @@ -0,0 +1,37 @@ +# $Id: PKGBUILD 147168 2012-01-23 21:15:41Z eric $ +# Maintainer: Jan de Groot +# Contributor: Sarah Hay + +pkgname=pygtk +pkgver=2.24.0 +pkgrel=3 +pkgdesc="Python bindings for the GTK widget set" +arch=('i686' 'x86_64') +license=('LGPL') +depends=('libglade' 'python2-cairo' 'pygobject') +makedepends=('python2-numpy' 'pygobject2-devel') +optdepends=('python2-numpy') +options=('!libtool') +url="http://www.pygtk.org/" +source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2 + python27.patch) +sha256sums=('cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912' + '39a30456cba055a452bb55c74ef1ff2f5f7bfaad22855b4dd569ab009b56b682') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + #https://bugzilla.gnome.org/show_bug.cgi?id=623965 + patch -Np1 -i "${srcdir}/python27.patch" + + PYTHON=/usr/bin/python2 ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -m644 gtk/gtk-extrafuncs.defs "${pkgdir}/usr/share/pygtk/2.0/defs/" + + sed -i -e 's#env python$#env python2#' "${pkgdir}"/usr/lib/pygtk/2.0/{,demos/}*.py +} diff --git a/staging/pygtk/python27.patch b/staging/pygtk/python27.patch new file mode 100644 index 000000000..9bbe2b5ae --- /dev/null +++ b/staging/pygtk/python27.patch @@ -0,0 +1,50 @@ +diff --git a/gtk/gtkmodule.c b/gtk/gtkmodule.c +index c0e1493..aa8cf10 100644 +--- a/gtk/gtkmodule.c ++++ b/gtk/gtkmodule.c +@@ -227,8 +227,12 @@ init_gtk(void) + pygtk_add_stock_items(d); + + /* extension API */ +- PyDict_SetItemString(d, "_PyGtk_API", +- o=PyCObject_FromVoidPtr(&functions, NULL)); ++#if PY_VERSION_HEX >= 0x02070000 ++ o = PyCapsule_New(&functions, "gtk._gtk._PyGtk_API", NULL); ++#else ++ o = PyCObject_FromVoidPtr(&functions, NULL); ++#endif ++ PyDict_SetItemString(d, "_PyGtk_API", o); + Py_DECREF(o); + + PyGtkDeprecationWarning = PyErr_NewException("gtk.GtkDeprecationWarning", +diff --git a/gtk/pygtk.h b/gtk/pygtk.h +index 573c3b9..e4c680f 100644 +--- a/gtk/pygtk.h ++++ b/gtk/pygtk.h +@@ -60,6 +60,18 @@ struct _PyGtk_FunctionStruct *_PyGtk_API; + + + /* a function to initialise the pygtk functions */ ++ ++/* Python 2.7 introduced the PyCapsule API and deprecated the CObject API */ ++#if PY_VERSION_HEX >= 0x02070000 ++#define init_pygtk() G_STMT_START { \ ++ void *capsule = PyCapsule_Import("gtk._gtk._PyGtk_API", 0); \ ++ if (!capsule) { \ ++ return; \ ++ } \ ++ _PyGtk_API = (struct _PyGtk_FunctionStruct*)capsule; \ ++} G_STMT_END ++#else /* PY_VERSION_HEX */ ++/* Python 2.6 and earlier use the CObject API */ + #define init_pygtk() G_STMT_START { \ + PyObject *pygtk = PyImport_ImportModule("gtk"); \ + if (pygtk != NULL) { \ +@@ -79,6 +91,7 @@ struct _PyGtk_FunctionStruct *_PyGtk_API; + return; \ + } \ + } G_STMT_END ++#endif /* PY_VERSION_HEX */ + + #endif + diff --git a/staging/skanlite/PKGBUILD b/staging/skanlite/PKGBUILD new file mode 100644 index 000000000..2690b7308 --- /dev/null +++ b/staging/skanlite/PKGBUILD @@ -0,0 +1,30 @@ +# $Id: PKGBUILD 147182 2012-01-24 01:29:19Z foutrelis $ +# Maintainer: Andrea Scarpino +# Contributor: Pierre Schmitz + +pkgname=skanlite +pkgver=0.8 +pkgrel=2 +pkgdesc="Image Scanning Application for KDE" +arch=('i686' 'x86_64') +url='http://kde-apps.org/content/show.php?content=109803' +license=('GPL') +depends=('kdebase-runtime' 'libksane') +makedepends=('pkgconfig' 'cmake' 'automoc4') +source=("http://downloads.sourceforge.net/sanewidget/${pkgname}-${pkgver}.tar.bz2") +md5sums=('baa43dbc78be696e121969b0a3d88929') + +build() { + cd "${srcdir}" + mkdir build + cd build + cmake ../${pkgname}-${pkgver} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/usr + make +} + +package() { + cd "${srcdir}"/build + make DESTDIR="${pkgdir}" install +} diff --git a/staging/xawtv/PKGBUILD b/staging/xawtv/PKGBUILD new file mode 100644 index 000000000..d2db8af63 --- /dev/null +++ b/staging/xawtv/PKGBUILD @@ -0,0 +1,29 @@ +# $Id: PKGBUILD 147176 2012-01-23 23:36:01Z eric $ +# Maintainer: Jan de Groot +# Contributor: Sarah Hay +# Contributor: Jason Chu + +pkgname=xawtv +pkgver=3.101 +pkgrel=2 +pkgdesc="A simple Xaw-based TV program which uses the bttv driver or video4linux" +arch=('i686' 'x86_64') +url="http://git.linuxtv.org/xawtv3.git" +license=('GPL') +depends=('aalib' 'v4l-utils' 'libxv' 'libxxf86dga' 'libxrandr' 'libgl' 'libdv' 'zvbi' 'libxinerama' 'lirc-utils' 'libxft' 'libxaw' 'xorg-fonts-misc' 'libxxf86vm') +makedepends=('mesa') +source=(http://linuxtv.org/downloads/xawtv/xawtv-${pkgver}.tar.bz2) +md5sums=('330ce1789595e370be34ad4cae3dc3fa') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + autoconf + autoheader + ./configure --prefix=/usr --disable-motif --disable-quicktime + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/staging/xorg-xcursorgen/PKGBUILD b/staging/xorg-xcursorgen/PKGBUILD new file mode 100644 index 000000000..630794be0 --- /dev/null +++ b/staging/xorg-xcursorgen/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 147178 2012-01-24 01:21:47Z eric $ +# Maintainer: Jan de Groot + +pkgname=xorg-xcursorgen +pkgver=1.0.4 +pkgrel=3 +pkgdesc="Create an X cursor file from PNG images" +arch=(i686 x86_64) +url="http://xorg.freedesktop.org/" +license=('custom') +depends=('libx11' 'libxcursor' 'libpng') +makedepends=('xorg-util-macros') +groups=('xorg-apps' 'xorg') +source=(http://xorg.freedesktop.org/archive/individual/app/xcursorgen-${pkgver}.tar.bz2) +sha1sums=('244c180aae8cc07175b93f314d5bbbf24171658a') + +build() { + cd "${srcdir}/xcursorgen-${pkgver}" + ./configure --prefix=/usr + make +} + +package() { + cd "${srcdir}/xcursorgen-${pkgver}" + make DESTDIR="${pkgdir}" install + install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}" + install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/" +} diff --git a/testing/gcc/PKGBUILD b/testing/gcc/PKGBUILD new file mode 100644 index 000000000..8b41189ca --- /dev/null +++ b/testing/gcc/PKGBUILD @@ -0,0 +1,260 @@ +# $Id: PKGBUILD 147172 2012-01-23 21:35:31Z allan $ +# Maintainer: Allan McRae + +# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc +# NOTE: libtool requires rebuilt with each new gcc version + +pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada' 'gcc-go') +pkgver=4.6.2 +pkgrel=6 +_snapshot=4.6-20120120 +_libstdcppmanver=20111215 # Note: check source directory name when updating this +pkgdesc="The GNU Compiler Collection" +arch=('i686' 'x86_64') +license=('GPL' 'LGPL' 'FDL' 'custom') +url="http://gcc.gnu.org" +makedepends=('binutils>=2.22' 'libmpc' 'cloog' 'ppl' 'gcc-ada') +checkdepends=('dejagnu') +options=('!libtool' '!emptydirs') +source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 + ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-man.${_libstdcppmanver}.tar.bz2 + gcc_pure64.patch + gcc-hash-style-both.patch) +md5sums=('f7ca5d9f7a07216577f81318b7cf56ef' + '450772ce32daed97d7383199f8797f33' + '4030ee1c08dd1e843c0225b772360e76' + '4df25b623799b148a0703eaeec8fdf3f') + +if [ -n "${_snapshot}" ]; then + _basedir="${srcdir}/gcc-${_snapshot}" +else + _basedir="${srcdir}/gcc-${pkgver}" +fi + +build() { + cd ${_basedir} + + # Do not install libiberty + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + + # Do not run fixincludes + sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in + + if [ "${CARCH}" = "x86_64" ]; then + patch -Np1 -i ${srcdir}/gcc_pure64.patch + fi + patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch + + echo ${pkgver} > gcc/BASE-VER + + cd ${srcdir} + mkdir gcc-build && cd gcc-build + + ${_basedir}/configure --prefix=/usr \ + --libdir=/usr/lib --libexecdir=/usr/lib \ + --mandir=/usr/share/man --infodir=/usr/share/info \ + --with-bugurl=https://bugs.archlinux.org/ \ + --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ \ + --enable-shared --enable-threads=posix \ + --with-system-zlib --enable-__cxa_atexit \ + --disable-libunwind-exceptions --enable-clocale=gnu \ + --disable-libstdcxx-pch --enable-libstdcxx-time \ + --enable-gnu-unique-object --enable-linker-build-id \ + --with-ppl --enable-cloog-backend=isl \ + --enable-lto --enable-gold --enable-ld=default \ + --enable-plugin --with-plugin-ld=ld.gold \ + --disable-multilib --disable-libssp \ + --enable-checking=release + make +} + +check() { + cd gcc-build + + # increase stack size to prevent test failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31827 + ulimit -s 32768 + + # do not abort on error as some are "expected" + make -k check || true + ${_basedir}/contrib/test_summary +} + +package_gcc-libs() +{ + pkgdesc="Runtime libraries shipped by GCC" + groups=('base') + depends=('glibc>=2.14') + install=gcc-libs.install + + cd gcc-build + make -j1 -C $CHOST/libgcc DESTDIR=${pkgdir} install-shared + for lib in libmudflap libgomp libstdc++-v3/src; do + make -j1 -C $CHOST/$lib DESTDIR=${pkgdir} install-toolexeclibLTLIBRARIES + done + make -j1 -C $CHOST/libstdc++-v3/po DESTDIR=${pkgdir} install + make -j1 -C $CHOST/libgomp DESTDIR=${pkgdir} install-info + + make -j1 DESTDIR=${pkgdir} install-target-libquadmath + make -j1 DESTDIR=${pkgdir} install-target-libgfortran + make -j1 DESTDIR=${pkgdir} install-target-libobjc + + # remove unnecessary files installed by install-target-{libquadmath,libgfortran,libobjc} + rm -rf ${pkgdir}/usr/lib/{gcc/,libgfortran.spec} + + # remove static libraries + find ${pkgdir} -name *.a -delete + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc() +{ + pkgdesc="The GNU Compiler Collection - C and C++ frontends" + depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.22' 'libmpc' 'cloog' 'ppl') + groups=('base-devel') + install=gcc.install + + cd gcc-build + + # unfortunately it is much, much easier to install the lot and clean-up the mess... + make -j1 DESTDIR=${pkgdir} install + rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*} + rm $pkgdir/usr/lib/*.so* + rm $pkgdir/usr/lib/lib{ffi,gfortran,go{,begin},objc,quadmath}.a + rm $pkgdir/usr/lib/libgfortran.spec + rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc} + rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h} + rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a} + rm -r $pkgdir/usr/lib/go + rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info + rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo + rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1 + rm $pkgdir/usr/share/man/man3/ffi* + + # many packages require these symlinks + install -dm755 ${pkgdir}/lib + ln -sf /usr/bin/cpp ${pkgdir}/lib/cpp + ln -sf gcc ${pkgdir}/usr/bin/cc + ln -sf g++ ${pkgdir}/usr/bin/c++ + + # install gengtype for plugin support + install -m755 gcc/build/gengtype $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/ + install -m644 gcc/gtype.state $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/ + + # plugin headers are all over the place at the moment... + for i in common objc pragma pretty-print; do + ln -sf ../c-$i.h $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/plugin/include/c-family/c-$i.h + done + + # POSIX conformance launcher scripts for c89 and c99 + cat > $pkgdir/usr/bin/c89 <<"EOF" +#!/bin/sh +fl="-std=c89" +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF + + cat > $pkgdir/usr/bin/c99 <<"EOF" +#!/bin/sh +fl="-std=c99" +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec gcc $fl ${1+"$@"} +EOF + + chmod 755 $pkgdir/usr/bin/c{8,9}9 + + # install the libstdc++ man pages + install -dm755 ${pkgdir}/usr/share/man/man3 + install -m644 ${srcdir}/man3/* ${pkgdir}/usr/share/man/man3/ + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-fortran() +{ + pkgdesc="Fortran front-end for GCC" + depends=("gcc=$pkgver-$pkgrel") + install=gcc-fortran.install + + cd gcc-build + make -j1 DESTDIR=${pkgdir} install-target-libquadmath + make -j1 DESTDIR=$pkgdir install-target-libgfortran + make -j1 -C $CHOST/libgomp DESTDIR=$pkgdir install-nodist_fincludeHEADERS + make -j1 -C gcc DESTDIR=$pkgdir fortran.install-{common,man,info} + install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951 + + # remove libraries included in gcc-libs + rm ${pkgdir}/usr/lib/lib{gfortran,quadmath}.so* + rm ${pkgdir}/usr/share/info/libquadmath.info + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-fortran/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-objc() +{ + pkgdesc="Objective-C front-end for GCC" + depends=("gcc=$pkgver-$pkgrel") + + cd gcc-build + make -j1 DESTDIR=$pkgdir install-target-libobjc + install -dm755 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/ + install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/ + + # remove libraries included in gcc-libs + rm ${pkgdir}/usr/lib/libobjc.so* + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-objc/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-ada() +{ + pkgdesc="Ada front-end for GCC (GNAT)" + depends=("gcc=$pkgver-$pkgrel") + install=gcc-ada.install + + cd gcc-build/gcc + make -j1 DESTDIR=$pkgdir ada.install-{common,info} + install -m755 gnat1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-ada/RUNTIME.LIBRARY.EXCEPTION +} + +package_gcc-go() +{ + pkgdesc="Go front-end for GCC" + depends=("gcc=$pkgver-$pkgrel") + install=gcc-go.install + + cd gcc-build + make -j1 DESTDIR=$pkgdir install-target-libgo + make -j1 -C gcc DESTDIR=$pkgdir go.install-{common,man,info} + install -Dm755 gcc/go1 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/go1 + + # Install Runtime Library Exception + install -Dm644 ${_basedir}/COPYING.RUNTIME \ + ${pkgdir}/usr/share/licenses/gcc-go/RUNTIME.LIBRARY.EXCEPTION +} diff --git a/testing/gcc/gcc-ada.install b/testing/gcc/gcc-ada.install new file mode 100644 index 000000000..df0553a4f --- /dev/null +++ b/testing/gcc/gcc-ada.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gnat-style.info gnat_rm.info gnat_ugn.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/testing/gcc/gcc-fortran.install b/testing/gcc/gcc-fortran.install new file mode 100644 index 000000000..b15d89a97 --- /dev/null +++ b/testing/gcc/gcc-fortran.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +file="gfortran.info" + +post_install() { + [ -x usr/bin/install-info ] || return 0 + install-info $infodir/$file.gz $infodir/dir 2> /dev/null +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null +} diff --git a/testing/gcc/gcc-go.install b/testing/gcc/gcc-go.install new file mode 100644 index 000000000..7dc50dee5 --- /dev/null +++ b/testing/gcc/gcc-go.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(gccgo.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/testing/gcc/gcc-hash-style-both.patch b/testing/gcc/gcc-hash-style-both.patch new file mode 100644 index 000000000..8b59f4535 --- /dev/null +++ b/testing/gcc/gcc-hash-style-both.patch @@ -0,0 +1,122 @@ +--- gcc/config/alpha/linux-elf.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/alpha/linux-elf.h 2011-03-11 10:01:47.770000457 +1000 +@@ -41,7 +41,7 @@ + + #define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER + +-#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ ++#define LINK_SPEC "-m elf64alpha --hash-style=both %{G*} %{relax:-relax} \ + %{O*:-O3} %{!O*:-O1} \ + %{shared:-shared} \ + %{!shared: \ +--- gcc/config/i386/linux64.h.orig 2011-03-03 08:35:36.000000000 +1000 ++++ gcc/config/i386/linux64.h 2011-03-11 10:01:47.770000457 +1000 +@@ -78,7 +78,7 @@ + %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}" + + #undef LINK_SPEC +-#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} \ ++#define LINK_SPEC "%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386} --hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- gcc/config/i386/linux.h.orig 2011-01-15 04:45:06.000000000 +1000 ++++ gcc/config/i386/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -104,7 +104,7 @@ + { "dynamic_linker", LINUX_DYNAMIC_LINKER } + + #undef LINK_SPEC +-#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ ++#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- gcc/config/ia64/linux.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/ia64/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -64,7 +64,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "\ ++#define LINK_SPEC "--hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{!static: \ +--- gcc/config/rs6000/linux64.h.orig 2011-02-11 03:30:10.000000000 +1000 ++++ gcc/config/rs6000/linux64.h 2011-03-11 10:03:34.280000457 +1000 +@@ -389,11 +389,11 @@ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) + + +-#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}" + +-#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC64 "-m elf64ppc --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}" + +--- gcc/config/rs6000/sysv4.h.orig 2011-01-28 04:36:03.000000000 +1000 ++++ gcc/config/rs6000/sysv4.h 2011-03-11 10:01:47.773333792 +1000 +@@ -830,7 +830,7 @@ + #define LINUX_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) + +-#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ ++#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ + -dynamic-linker " LINUX_DYNAMIC_LINKER "}}" + +--- gcc/config/s390/linux.h.orig 2010-12-09 23:27:07.000000000 +1000 ++++ gcc/config/s390/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -77,7 +77,7 @@ + + #undef LINK_SPEC + #define LINK_SPEC \ +- "%{m31:-m elf_s390}%{m64:-m elf64_s390} \ ++ "%{m31:-m elf_s390}%{m64:-m elf64_s390} --hash-style=both \ + %{shared:-shared} \ + %{!shared: \ + %{static:-static} \ +--- gcc/config/sparc/linux64.h.orig 2011-02-17 23:57:21.000000000 +1000 ++++ gcc/config/sparc/linux64.h 2011-03-11 10:01:47.770000457 +1000 +@@ -113,7 +113,7 @@ + { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ + { "link_arch", LINK_ARCH_SPEC }, + +-#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,%R/usr/lib %{shared:-shared} \ ++#define LINK_ARCH32_SPEC "-m elf32_sparc --hash-style=both -Y P,%R/usr/lib %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -121,7 +121,7 @@ + %{static:-static}} \ + " + +-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ ++#define LINK_ARCH64_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -193,7 +193,7 @@ + #else /* !SPARC_BI_ARCH */ + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \ ++#define LINK_SPEC "-m elf64_sparc --hash-style=both -Y P,%R/usr/lib64 %{shared:-shared} \ + %{!shared: \ + %{!static: \ + %{rdynamic:-export-dynamic} \ +--- gcc/config/sparc/linux.h.orig 2011-01-27 06:30:12.000000000 +1000 ++++ gcc/config/sparc/linux.h 2011-03-11 10:01:47.770000457 +1000 +@@ -74,7 +74,7 @@ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + + #undef LINK_SPEC +-#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ ++#define LINK_SPEC "-m elf32_sparc --hash-style=both -Y P,/usr/lib %{shared:-shared} \ + %{!mno-relax:%{!r:-relax}} \ + %{!shared: \ + %{!static: \ diff --git a/testing/gcc/gcc-libs.install b/testing/gcc/gcc-libs.install new file mode 100644 index 000000000..23553b8f0 --- /dev/null +++ b/testing/gcc/gcc-libs.install @@ -0,0 +1,16 @@ +infodir=usr/share/info +filelist=(libgomp.info libquadmath.info) + +post_upgrade() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/testing/gcc/gcc.install b/testing/gcc/gcc.install new file mode 100644 index 000000000..3407a5e1f --- /dev/null +++ b/testing/gcc/gcc.install @@ -0,0 +1,20 @@ +infodir=usr/share/info +filelist=(cpp.info cppinternals.info gcc.info gccinstall.info gccint.info) + +post_install() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info $infodir/$file.gz $infodir/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + [ -x usr/bin/install-info ] || return 0 + for file in ${filelist[@]}; do + install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null + done +} diff --git a/testing/gcc/gcc_pure64.patch b/testing/gcc/gcc_pure64.patch new file mode 100644 index 000000000..8c0baf8e2 --- /dev/null +++ b/testing/gcc/gcc_pure64.patch @@ -0,0 +1,26 @@ +diff -Naur gcc-4.2.0.orig/gcc/config/i386/linux64.h gcc-4.2.0/gcc/config/i386/linux64.h +--- gcc-4.2.0.orig/gcc/config/i386/linux64.h 2007-05-16 19:21:19.000000000 -0400 ++++ gcc-4.2.0/gcc/config/i386/linux64.h 2007-05-18 17:04:05.000000000 -0400 +@@ -49,8 +49,8 @@ + When the -shared link option is used a final link is not being + done. */ + +-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" +-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" ++#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2" ++#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" + + #undef LINK_SPEC + #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ +diff -Naur gcc-4.2.0.orig/gcc/config/i386/t-linux64 gcc-4.2.0/gcc/config/i386/t-linux64 +--- gcc-4.2.0.orig/gcc/config/i386/t-linux64 2007-05-16 19:21:19.000000000 -0400 ++++ gcc-4.2.0/gcc/config/i386/t-linux64 2007-05-18 17:04:36.000000000 -0400 +@@ -6,7 +6,7 @@ + + MULTILIB_OPTIONS = m64/m32 + MULTILIB_DIRNAMES = 64 32 +-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) ++MULTILIB_OSDIRNAMES = ../lib ../lib32 + + LIBGCC = stmp-multilib + INSTALL_LIBGCC = install-multilib -- cgit v1.2.3-54-g00ecf