diff --git a/CHANGELOG b/CHANGELOG index 07793f5221..37626b8d88 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ Changelog OpenELEC-1.0 to OpenELEC-2.0 Package updates: - update XBMC to XBMC-11.0 (Eden) - - update eglibc to eglibc-2.14 + - update eglibc to eglibc-2.14.1 - update Python to Python-2.7.2 - update gcc to gcc-4.6.2 - update openssl to openssl-1.0.0e diff --git a/config/functions b/config/functions index 5f5b8339a1..65c788030b 100644 --- a/config/functions +++ b/config/functions @@ -15,6 +15,7 @@ setup_toolchain() { export NM=$TARGET_NM export RANLIB=$TARGET_RANLIB export OBJCOPY=$TARGET_OBJCOPY + export OBJDUMP=$TARGET_OBJDUMP export STRIP=$TARGET_STRIP export CPPFLAGS="$TARGET_CPPFLAGS" export CFLAGS="$TARGET_CFLAGS" @@ -117,39 +118,39 @@ add_group() { do_autoreconf() { export ACLOCAL_DIR=$SYSROOT_PREFIX/usr/share/aclocal - if [ -e $ROOT/$TOOLCHAIN/bin/autoconf ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/autoconf" ]; then export AUTOCONF=$ROOT/$TOOLCHAIN/bin/autoconf fi - if [ -e $ROOT/$TOOLCHAIN/bin/automake ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/automake" ]; then export AUTOMAKE=$ROOT/$TOOLCHAIN/bin/automake fi - if [ -e $ROOT/$TOOLCHAIN/bin/autopoint ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/autopoint" ]; then export AUTOPOINT=$ROOT/$TOOLCHAIN/bin/autopoint fi - if [ -e $ROOT/$TOOLCHAIN/bin/libtoolize ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/libtoolize" ]; then export LIBTOOLIZE=$ROOT/$TOOLCHAIN/bin/libtoolize fi - if [ -e $ROOT/$TOOLCHAIN/bin/intltoolize ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/intltoolize" ]; then export INTLTOOLIZE=$ROOT/$TOOLCHAIN/bin/intltoolize fi - if [ -e $ROOT/$TOOLCHAIN/bin/aclocal ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/aclocal" ]; then export ACLOCAL="$ROOT/$TOOLCHAIN/bin/aclocal -I $ACLOCAL_DIR" fi - if [ -e $ROOT/$TOOLCHAIN/bin/autoheader ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/autoheader" ]; then export AUTOHEADER=$ROOT/$TOOLCHAIN/bin/autoheader fi - if [ -e $ROOT/$TOOLCHAIN/bin/libtool ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/libtool" ]; then export LIBTOOL=$ROOT/$TOOLCHAIN/bin/libtool fi - if [ -e $ROOT/$TOOLCHAIN/bin/autoreconf -a -e $INTLTOOLIZE ]; then + if [ -e "$ROOT/$TOOLCHAIN/bin/autoreconf" -a -e "$INTLTOOLIZE" ]; then mkdir -p $ACLOCAL_DIR export AUTORECONF="$ROOT/$TOOLCHAIN/bin/autoreconf --verbose --force --install -I $ACLOCAL_DIR" $AUTORECONF $@ @@ -174,3 +175,17 @@ strip_gold() { LDFLAGS=`echo $LDFLAGS | sed -e "s|-fuse-ld=gold||g"` } +fix_module_depends() { + # modify .modinfo section in kernel module to depends on other required modules + local MODULE="$1" + local DEPENDS="$2" + cp ${MODULE} ${MODULE}_orig + $OBJDUMP -s -j .modinfo ${MODULE}_orig | awk 'BEGIN{v=0;} /Contents/ {v=1; next;} {if (v==1) print $0;}' >new.modinfo1 + cat new.modinfo1 | cut -c7-41 | awk '{printf($0);}' | sed 's/ //g;s/../\\\x&/g;' >new.modinfo2 + /bin/echo -ne `cat new.modinfo2` >new.modinfo3 + cat new.modinfo3 | tr '\000' '\n' | awk '/^depends=/ {next;} {print $0;}' | tr '\n' '\000' >new.modinfo4 + /bin/echo -ne "depends=$DEPENDS\0" >>new.modinfo4 + $OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo4 --set-section-flags .modinfo=contents,alloc,load,readonly,data ${MODULE}_orig ${MODULE} + rm new.modinfo* +} + diff --git a/config/path b/config/path index f60f280fa5..d4b2024426 100644 --- a/config/path +++ b/config/path @@ -82,6 +82,7 @@ TARGET_AR=${TARGET_PREFIX}ar TARGET_NM=${TARGET_PREFIX}nm TARGET_RANLIB=${TARGET_PREFIX}ranlib TARGET_OBJCOPY=${TARGET_PREFIX}objcopy +TARGET_OBJDUMP=${TARGET_PREFIX}objdump TARGET_STRIP=${TARGET_PREFIX}strip . config/optimize diff --git a/packages/addons/debugging/tools/evtest/addon b/packages/addons/debugging/tools/evtest/addon index 175d4e3742..ba9fd9267c 100755 --- a/packages/addons/debugging/tools/evtest/addon +++ b/packages/addons/debugging/tools/evtest/addon @@ -29,4 +29,4 @@ mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib cp -P $BUILD/libiconv-[0-9]*/lib/.libs/libiconv.so* $ADDON_BUILD/$PKG_ADDON_ID/lib cp -P $BUILD/libxml2-[0-9]*/.build-target/.libs/libxml2.so* $ADDON_BUILD/$PKG_ADDON_ID/lib - cp -P $BUILD/zlib-[0-9]*/.build-target/libz.so.* $ADDON_BUILD/$PKG_ADDON_ID/lib + cp -P $BUILD/zlib-[0-9]*/libz.so.* $ADDON_BUILD/$PKG_ADDON_ID/lib diff --git a/packages/addons/multimedia/makemkv/changelog.txt b/packages/addons/multimedia/makemkv/changelog.txt index d75afa10ac..585dfdacb5 100644 --- a/packages/addons/multimedia/makemkv/changelog.txt +++ b/packages/addons/multimedia/makemkv/changelog.txt @@ -1,3 +1,6 @@ +1.90.1 +- update to makemkv-1.6.16 + 1.90.0 - prepare for OpenELEC-1.90 release diff --git a/packages/addons/multimedia/makemkv/meta b/packages/addons/multimedia/makemkv/meta index 0b9d84f234..46b09433d2 100644 --- a/packages/addons/multimedia/makemkv/meta +++ b/packages/addons/multimedia/makemkv/meta @@ -19,8 +19,8 @@ ################################################################################ PKG_NAME="makemkv" -PKG_VERSION="1.6.15" -PKG_REV="0" +PKG_VERSION="1.6.16" +PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.makemkv.com/forum2/viewforum.php?f=3" diff --git a/packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.6.15-000-crosscompiling-0.1.patch b/packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.6.16-000-crosscompiling-0.1.patch similarity index 100% rename from packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.6.15-000-crosscompiling-0.1.patch rename to packages/addons/multimedia/makemkv/patches.upstream/makemkv-1.6.16-000-crosscompiling-0.1.patch diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt b/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt index 02012ef083..ec98f9bbc7 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/changelog.txt @@ -1,3 +1,6 @@ +1.90.1 +- rebuild for OpenSSL upgrade + 1.90.0 - prepare for OpenELEC-1.90 release diff --git a/packages/addons/service/downloadmanager/SABnzbd-Suite/meta b/packages/addons/service/downloadmanager/SABnzbd-Suite/meta index eb3c7eca8f..c6ca4e906b 100644 --- a/packages/addons/service/downloadmanager/SABnzbd-Suite/meta +++ b/packages/addons/service/downloadmanager/SABnzbd-Suite/meta @@ -20,7 +20,7 @@ PKG_NAME="SABnzbd-Suite" PKG_VERSION="1.90" -PKG_REV="0" +PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.openelec.tv" diff --git a/packages/addons/service/downloadmanager/transmission/build b/packages/addons/service/downloadmanager/transmission/build index 7c3d851b73..eb85b5db5e 100755 --- a/packages/addons/service/downloadmanager/transmission/build +++ b/packages/addons/service/downloadmanager/transmission/build @@ -25,7 +25,7 @@ # transmission (svn 11666) fails to build with LTO support strip_lto -export LDFLAGS="$LDFLAGS -liconv" +export LIBS="-liconv" cd $PKG_BUILD ./configure --host=$TARGET_NAME \ @@ -35,12 +35,8 @@ cd $PKG_BUILD --localstatedir=/var \ --disable-static \ --enable-shared \ + --disable-utp \ --enable-largefile \ - --disable-gtk \ - --disable-libnotify \ - --disable-libappindicator \ - --disable-libcanberra \ - --disable-gconf2 \ --disable-nls \ --disable-cli \ --disable-mac \ diff --git a/packages/addons/service/downloadmanager/transmission/changelog.txt b/packages/addons/service/downloadmanager/transmission/changelog.txt index 85f94fefdc..ce4ab8e981 100644 --- a/packages/addons/service/downloadmanager/transmission/changelog.txt +++ b/packages/addons/service/downloadmanager/transmission/changelog.txt @@ -1,3 +1,6 @@ +1.90.1 +- update to transmission-2.42 + 1.90.0 - prepare for OpenELEC-1.90 release diff --git a/packages/addons/service/downloadmanager/transmission/meta b/packages/addons/service/downloadmanager/transmission/meta index ac8ebfc340..6b5a6b30f9 100644 --- a/packages/addons/service/downloadmanager/transmission/meta +++ b/packages/addons/service/downloadmanager/transmission/meta @@ -19,8 +19,8 @@ ################################################################################ PKG_NAME="transmission" -PKG_VERSION="2.41" -PKG_REV="0" +PKG_VERSION="2.42" +PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.transmissionbt.com/" diff --git a/packages/addons/service/downloadmanager/transmission/patches/transmission-2.42-utp.patch b/packages/addons/service/downloadmanager/transmission/patches/transmission-2.42-utp.patch new file mode 100644 index 0000000000..1978f7af18 --- /dev/null +++ b/packages/addons/service/downloadmanager/transmission/patches/transmission-2.42-utp.patch @@ -0,0 +1,14 @@ +--- a/third-party/libutp/utypes.h.orig Wed Sep 28 19:46:15 2011 ++++ b/third-party/libutp/utypes.h Wed Sep 28 19:47:06 2011 +@@ -36,7 +36,11 @@ typedef const char * cstr; + typedef char * str; + + #ifndef __cplusplus ++#ifdef HAVE_STDBOOL_H ++#include ++#else + typedef uint8 bool; ++#endif + #endif + + #endif //__UTYPES_H__ diff --git a/packages/addons/service/multimedia/hts-tvheadend/changelog.txt b/packages/addons/service/multimedia/hts-tvheadend/changelog.txt index 6acfabf6b1..da8981dbf1 100644 --- a/packages/addons/service/multimedia/hts-tvheadend/changelog.txt +++ b/packages/addons/service/multimedia/hts-tvheadend/changelog.txt @@ -1,3 +1,6 @@ +1.90.1 +- update to hts-tvheadend-fdc743f + 1.90.0 - add (CH) GA Weissenstein default muxes - prepare for OpenELEC-1.90 release diff --git a/packages/addons/service/multimedia/hts-tvheadend/meta b/packages/addons/service/multimedia/hts-tvheadend/meta index 869e5f621f..999e8c46b0 100644 --- a/packages/addons/service/multimedia/hts-tvheadend/meta +++ b/packages/addons/service/multimedia/hts-tvheadend/meta @@ -19,8 +19,8 @@ ################################################################################ PKG_NAME="hts-tvheadend" -PKG_VERSION="c88a646" -PKG_REV="0" +PKG_VERSION="fdc743f" +PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.lonelycoder.com/hts/tvheadend_overview.html" diff --git a/packages/audio/alsa-plugins/install b/packages/audio/alsa-plugins/install index 626ab795a1..de131369b6 100755 --- a/packages/audio/alsa-plugins/install +++ b/packages/audio/alsa-plugins/install @@ -24,6 +24,10 @@ mkdir -p $INSTALL/usr/lib/alsa cp -P $PKG_BUILD/*/.libs/*.so $INSTALL/usr/lib/alsa + if [ -f $INSTALL/usr/lib/alsa/libasound_module_rate_speexrate.so ]; then + ln -sf libasound_module_rate_speexrate.so $INSTALL/usr/lib/alsa/libasound_module_rate_speexrate_best.so + ln -sf libasound_module_rate_speexrate.so $INSTALL/usr/lib/alsa/libasound_module_rate_speexrate_medium.so + fi mkdir -p $INSTALL/usr/share/alsa/pcm cp -R $PKG_DIR/config/*.conf $INSTALL/usr/share/alsa/pcm diff --git a/packages/audio/alsa-utils/install b/packages/audio/alsa-utils/install index a599857b56..f5284f5a5c 100755 --- a/packages/audio/alsa-utils/install +++ b/packages/audio/alsa-utils/install @@ -25,13 +25,14 @@ mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/amixer/amixer $INSTALL/usr/bin cp $PKG_BUILD/aplay/aplay $INSTALL/usr/bin - cp $PKG_DIR/scripts/soundconfig $INSTALL/usr/bin cp $PKG_BUILD/speaker-test/speaker-test $INSTALL/usr/bin +mkdir -p $INSTALL/usr/lib/udev + cp $PKG_DIR/scripts/soundconfig $INSTALL/usr/lib/udev + mkdir -p $INSTALL/usr/sbin cp $PKG_BUILD/alsactl/alsactl $INSTALL/usr/sbin mkdir -p $INSTALL/usr/share/alsa/init cp $PKG_BUILD/alsactl/init/* $INSTALL/usr/share/alsa/init rm -rf $INSTALL/usr/share/alsa/init/Makefile* - diff --git a/packages/audio/alsa-utils/udev.d/40-alsa.rules b/packages/audio/alsa-utils/udev.d/40-alsa.rules index fba4e61f66..c20bd742ae 100644 --- a/packages/audio/alsa-utils/udev.d/40-alsa.rules +++ b/packages/audio/alsa-utils/udev.d/40-alsa.rules @@ -18,16 +18,5 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -# Give the audio group ownership of sound devices -SUBSYSTEM=="sound", GROUP="audio" -SUBSYSTEM=="snd", GROUP="audio" - -# ALSA Devices # When a sound device is detected, restore the volume settings -KERNEL=="controlC[0-9]*", NAME="snd/%k", ACTION=="add", RUN+="/usr/bin/soundconfig" -KERNEL=="hw[CD0-9]*", NAME="snd/%k" -KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k" -KERNEL=="midiC[D0-9]*", NAME="snd/%k" -KERNEL=="timer", NAME="snd/%k" -KERNEL=="seq", NAME="snd/%k" -KERNEL=="mixer0", SYMLINK+="mixer" + KERNEL=="controlC[0-9]*", NAME="snd/%k", ACTION=="add", RUN+="soundconfig" diff --git a/packages/audio/alsa/meta b/packages/audio/alsa/meta index 512a494749..5a494cdb61 100644 --- a/packages/audio/alsa/meta +++ b/packages/audio/alsa/meta @@ -34,3 +34,9 @@ PKG_LONGDESC="ALSA (Advanced Linux Sound Architecture) is the next generation Li PKG_IS_ADDON="no" PKG_AUTORECONF="no" + +if [ "$PULSEAUDIO_SUPPORT" = yes ]; then + PKG_DEPENDS="$PKG_DEPENDS alsa-plugins" + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS alsa-plugins" +fi + diff --git a/packages/audio/libsamplerate/build b/packages/audio/libsamplerate/build index b5e8f9ab90..0c5634b2f6 100755 --- a/packages/audio/libsamplerate/build +++ b/packages/audio/libsamplerate/build @@ -32,7 +32,7 @@ cd $PKG_BUILD --disable-static \ --datadir=/usr/share \ --disable-fftw \ - --disable-sndfile \ + --enable-sndfile \ make diff --git a/packages/audio/libsamplerate/meta b/packages/audio/libsamplerate/meta index 49aadaaf73..1f7431b4de 100644 --- a/packages/audio/libsamplerate/meta +++ b/packages/audio/libsamplerate/meta @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="libsamplerate" -PKG_VERSION="0.1.7" +PKG_VERSION="0.1.8" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.mega-nerd.com/SRC/" PKG_URL="http://www.mega-nerd.com/SRC/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_DEPENDS="libsndfile" +PKG_BUILD_DEPENDS="toolchain libsndfile" PKG_PRIORITY="optional" PKG_SECTION="audio" PKG_SHORTDESC="libsamplerate: A Sample Rate Converter library for audio" diff --git a/packages/audio/libsndfile/build b/packages/audio/libsndfile/build index 3589a7ddda..7cf787b5db 100755 --- a/packages/audio/libsndfile/build +++ b/packages/audio/libsndfile/build @@ -29,9 +29,9 @@ cd $PKG_BUILD --disable-static \ --enable-shared \ --disable-silent-rules \ - --disable-sqlite \ + --enable-sqlite \ --enable-alsa \ - --disable-external-libs \ + --enable-external-libs \ --disable-experimental \ --disable-test-coverage \ --enable-largefile \ diff --git a/packages/audio/libsndfile/meta b/packages/audio/libsndfile/meta index bf4b6ab070..35768b3722 100644 --- a/packages/audio/libsndfile/meta +++ b/packages/audio/libsndfile/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.mega-nerd.com/libsndfile/" PKG_URL="http://www.mega-nerd.com/$PKG_NAME/files/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="alsa-lib" -PKG_BUILD_DEPENDS="toolchain alsa-lib" +PKG_DEPENDS="alsa-lib sqlite flac libvorbis libogg" +PKG_BUILD_DEPENDS="toolchain alsa-lib sqlite flac libvorbis libogg" PKG_PRIORITY="optional" PKG_SECTION="audio" PKG_SHORTDESC="libsndfile: A library for accessing various audio file formats" diff --git a/packages/audio/pulseaudio/build b/packages/audio/pulseaudio/build index f26b88e560..9b748cfcd3 100755 --- a/packages/audio/pulseaudio/build +++ b/packages/audio/pulseaudio/build @@ -44,7 +44,7 @@ cd $PKG_BUILD --disable-nls \ --enable-largefile \ --disable-rpath \ - --enable-x11 \ + --disable-x11 \ --enable-samplerate \ --disable-oss-output \ --disable-oss-wrapper \ @@ -70,26 +70,20 @@ cd $PKG_BUILD --disable-orc \ --disable-manpages \ --disable-per-user-esound-socket \ - --enable-legacy-runtime-dir \ - --enable-legacy-database-entry-format \ + --disable-legacy-runtime-dir \ + --disable-legacy-database-entry-format \ --with-system-user=root \ --with-system-group=root \ --with-access-group=root \ --with-module-dir="/usr/lib/pulse" \ -# --with-system-user=pulse \ -# --with-system-group=pulse \ -# --with-access-group=pulse-access \ - -# --with-system-user=root \ -# --with-system-group=root \ -# --with-access-group=root \ - make mkdir -p $SYSROOT_PREFIX/usr/lib cp -P src/.libs/libpulse.so* $SYSROOT_PREFIX/usr/lib cp -P src/.libs/libpulse-simple.so* $SYSROOT_PREFIX/usr/lib + cp -P src/.libs/libpulsecommon-*.so* $SYSROOT_PREFIX/usr/lib + cp -P src/.libs/libpulsecore-*.so $SYSROOT_PREFIX/usr/lib mkdir -p $SYSROOT_PREFIX/usr/lib/pkgconfig cp libpulse.pc $SYSROOT_PREFIX/usr/lib/pkgconfig diff --git a/packages/audio/pulseaudio/config/default.pa b/packages/audio/pulseaudio/config/default.pa index 431d5e420b..814f24e45a 100644 --- a/packages/audio/pulseaudio/config/default.pa +++ b/packages/audio/pulseaudio/config/default.pa @@ -41,9 +41,10 @@ load-module module-augment-properties ### Load audio drivers statically ### (it's probably better to not load these drivers manually, but instead ### use module-udev-detect -- see below -- for doing this automatically) -load-module module-alsa-sink device=hw:1,7 +#load-module module-alsa-sink device=hw:1,7 #load-module module-alsa-sink #load-module module-alsa-source device=hw:1,0 +load-module module-alsa-source device=hw:1,7 #load-module module-null-sink #load-module module-pipe-sink diff --git a/packages/audio/pulseaudio/init.d/35_PulseAudio b/packages/audio/pulseaudio/init.d/91_PulseAudio similarity index 90% rename from packages/audio/pulseaudio/init.d/35_PulseAudio rename to packages/audio/pulseaudio/init.d/91_PulseAudio index 0b4f058936..8d4f0b5706 100644 --- a/packages/audio/pulseaudio/init.d/35_PulseAudio +++ b/packages/audio/pulseaudio/init.d/91_PulseAudio @@ -23,10 +23,6 @@ # runlevels: openelec, textmode progress "starting PulseAudio daemon" - pulseaudio --system \ - --daemonize \ + pulseaudio --system --daemonize \ --log-target=file:/var/log/pulseaudio.log \ --log-level=debug >/dev/null 2>&1 - -# --disallow-exit \ -# --disallow-module-loading \ diff --git a/packages/audio/pulseaudio/install b/packages/audio/pulseaudio/install index 6dd8c7a1b8..d692ee1fc7 100755 --- a/packages/audio/pulseaudio/install +++ b/packages/audio/pulseaudio/install @@ -20,11 +20,11 @@ mkdir -p $INSTALL/etc/pulse cp $PKG_BUILD/src/client.conf $INSTALL/etc/pulse cp $PKG_BUILD/src/daemon.conf $INSTALL/etc/pulse # cp $PKG_BUILD/src/default.pa $INSTALL/etc/pulse - cp $PKG_DIR/config/default.pa $INSTALL/etc/pulse +# cp $PKG_DIR/config/default.pa $INSTALL/etc/pulse cp $PKG_BUILD/src/system.pa $INSTALL/etc/pulse -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules $INSTALL/lib/udev/rules.d +mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules $INSTALL/usr/lib/udev/rules.d mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/src/.libs/pacat $INSTALL/usr/bin @@ -35,7 +35,7 @@ mkdir -p $INSTALL/usr/bin ln -sf pactl $INSTALL/usr/bin/parec ln -sf pactl $INSTALL/usr/bin/parecord cp $PKG_BUILD/src/.libs/pasuspender $INSTALL/usr/bin - cp $PKG_BUILD/src/.libs/pax11publish $INSTALL/usr/bin +# cp $PKG_BUILD/src/.libs/pax11publish $INSTALL/usr/bin cp $PKG_BUILD/src/.libs/pulseaudio $INSTALL/usr/bin # cp $PKG_BUILD/src/start-pulseaudio-x11 $INSTALL/usr/bin diff --git a/packages/audio/pulseaudio/meta b/packages/audio/pulseaudio/meta index 8c9c2ac957..a5cd5f98b2 100644 --- a/packages/audio/pulseaudio/meta +++ b/packages/audio/pulseaudio/meta @@ -24,8 +24,8 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://pulseaudio.org/" -PKG_URL="http://freedesktop.org/software/pulseaudio/releases/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="libtool json-c alsa-lib libsndfile libsamplerate speex dbus udev openssl alsa-plugins" +PKG_URL="http://freedesktop.org/software/pulseaudio/releases/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="libtool json-c alsa-lib libsndfile libsamplerate speex dbus udev openssl" PKG_BUILD_DEPENDS="toolchain libtool json-c alsa-lib libsndfile libsamplerate speex dbus udev openssl" PKG_PRIORITY="optional" PKG_SECTION="audio" diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch new file mode 100644 index 0000000000..2c71ab052e --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0001-alsa-support-fixed-latency-range-in-alsa-modules.patch @@ -0,0 +1,218 @@ +From 7a387fed36ed5bc0b925269fb76b5e8e3a738a5f Mon Sep 17 00:00:00 2001 +From: "Lars R. Damerow" +Date: Thu, 3 Nov 2011 21:14:45 +0100 +Subject: [PATCH 1/3] alsa: support fixed latency range in alsa modules + +This adds a boolean module parameter to disable automatic dynamic +latency readjustments on underruns, but leaves automatic dynamic +watermark readjustments untouched. +--- + src/modules/alsa/alsa-sink.c | 23 +++++++++++++++++++---- + src/modules/alsa/alsa-source.c | 22 ++++++++++++++++++---- + src/modules/alsa/module-alsa-sink.c | 4 +++- + src/modules/alsa/module-alsa-source.c | 4 +++- + src/pulsecore/protocol-native.c | 4 ++++ + 5 files changed, 47 insertions(+), 10 deletions(-) + +diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c +index 7b31b1b..1386196 100644 +--- a/src/modules/alsa/alsa-sink.c ++++ b/src/modules/alsa/alsa-sink.c +@@ -134,7 +134,7 @@ struct userdata { + char *device_name; /* name of the PCM device */ + char *control_device; /* name of the control device */ + +- pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1; ++ pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1, fixed_latency_range:1; + + pa_bool_t first, after_rewind; + +@@ -331,7 +331,12 @@ static void increase_watermark(struct userdata *u) { + return; + } + +- /* Hmm, we cannot increase the watermark any further, hence let's raise the latency */ ++ /* Hmm, we cannot increase the watermark any further, hence let's ++ raise the latency, unless doing so was disabled in ++ configuration */ ++ if (u->fixed_latency_range) ++ return; ++ + old_min_latency = u->sink->thread_info.min_latency; + new_min_latency = PA_MIN(old_min_latency * 2, old_min_latency + TSCHED_WATERMARK_INC_STEP_USEC); + new_min_latency = PA_MIN(new_min_latency, u->sink->thread_info.max_latency); +@@ -1969,7 +1974,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark, rewind_safeguard; + snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames; + size_t frame_size; +- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, set_formats = FALSE; ++ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, set_formats = FALSE, fixed_latency_range = FALSE; + pa_sink_new_data data; + pa_alsa_profile_set *profile_set = NULL; + +@@ -2039,6 +2044,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + goto fail; + } + ++ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { ++ pa_log("Failed to parse fixed_latency_range argument."); ++ goto fail; ++ } ++ + use_tsched = pa_alsa_may_tsched(use_tsched); + + u = pa_xnew0(struct userdata, 1); +@@ -2047,6 +2057,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + u->use_mmap = use_mmap; + u->use_tsched = use_tsched; + u->deferred_volume = deferred_volume; ++ u->fixed_latency_range = fixed_latency_range; + u->first = TRUE; + u->rewind_safeguard = rewind_safeguard; + u->rtpoll = pa_rtpoll_new(); +@@ -2143,9 +2154,13 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca + if (u->use_mmap) + pa_log_info("Successfully enabled mmap() mode."); + +- if (u->use_tsched) ++ if (u->use_tsched) { + pa_log_info("Successfully enabled timer-based scheduling mode."); + ++ if (u->fixed_latency_range) ++ pa_log_info("Disabling latency range changes on underrun"); ++ } ++ + if (is_iec958(u) || is_hdmi(u)) + set_formats = TRUE; + +diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c +index 7a51572..255a61d 100644 +--- a/src/modules/alsa/alsa-source.c ++++ b/src/modules/alsa/alsa-source.c +@@ -121,7 +121,7 @@ struct userdata { + char *device_name; /* name of the PCM device */ + char *control_device; /* name of the control device */ + +- pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1; ++ pa_bool_t use_mmap:1, use_tsched:1, deferred_volume:1, fixed_latency_range:1; + + pa_bool_t first; + +@@ -306,7 +306,12 @@ static void increase_watermark(struct userdata *u) { + return; + } + +- /* Hmm, we cannot increase the watermark any further, hence let's raise the latency */ ++ /* Hmm, we cannot increase the watermark any further, hence let's ++ raise the latency unless doing so was disabled in ++ configuration */ ++ if (u->fixed_latency_range) ++ return; ++ + old_min_latency = u->source->thread_info.min_latency; + new_min_latency = PA_MIN(old_min_latency * 2, old_min_latency + TSCHED_WATERMARK_INC_STEP_USEC); + new_min_latency = PA_MIN(new_min_latency, u->source->thread_info.max_latency); +@@ -1710,7 +1715,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark; + snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames; + size_t frame_size; +- pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE; ++ pa_bool_t use_mmap = TRUE, b, use_tsched = TRUE, d, ignore_dB = FALSE, namereg_fail = FALSE, deferred_volume = FALSE, fixed_latency_range = FALSE; + pa_source_new_data data; + pa_alsa_profile_set *profile_set = NULL; + +@@ -1774,6 +1779,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + goto fail; + } + ++ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { ++ pa_log("Failed to parse fixed_latency_range argument."); ++ goto fail; ++ } ++ + use_tsched = pa_alsa_may_tsched(use_tsched); + + u = pa_xnew0(struct userdata, 1); +@@ -1782,6 +1792,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + u->use_mmap = use_mmap; + u->use_tsched = use_tsched; + u->deferred_volume = deferred_volume; ++ u->fixed_latency_range = fixed_latency_range; + u->first = TRUE; + u->rtpoll = pa_rtpoll_new(); + pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll); +@@ -1877,8 +1888,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p + if (u->use_mmap) + pa_log_info("Successfully enabled mmap() mode."); + +- if (u->use_tsched) ++ if (u->use_tsched) { + pa_log_info("Successfully enabled timer-based scheduling mode."); ++ if (u->fixed_latency_range) ++ pa_log_info("Disabling latency range changes on overrun"); ++ } + + /* ALSA might tweak the sample spec, so recalculate the frame size */ + frame_size = pa_frame_size(&ss); +diff --git a/src/modules/alsa/module-alsa-sink.c b/src/modules/alsa/module-alsa-sink.c +index 019ccf0..927f075 100644 +--- a/src/modules/alsa/module-alsa-sink.c ++++ b/src/modules/alsa/module-alsa-sink.c +@@ -59,7 +59,8 @@ PA_MODULE_USAGE( + "rewind_safeguard= " + "deferred_volume= " + "deferred_volume_safety_margin= " +- "deferred_volume_extra_delay="); ++ "deferred_volume_extra_delay= " ++ "fixed_latency_range="); + + static const char* const valid_modargs[] = { + "name", +@@ -85,6 +86,7 @@ static const char* const valid_modargs[] = { + "deferred_volume", + "deferred_volume_safety_margin", + "deferred_volume_extra_delay", ++ "fixed_latency_range", + NULL + }; + +diff --git a/src/modules/alsa/module-alsa-source.c b/src/modules/alsa/module-alsa-source.c +index 2d2c8b6..efb2d0c 100644 +--- a/src/modules/alsa/module-alsa-source.c ++++ b/src/modules/alsa/module-alsa-source.c +@@ -67,7 +67,8 @@ PA_MODULE_USAGE( + "control=" + "deferred_volume= " + "deferred_volume_safety_margin= " +- "deferred_volume_extra_delay="); ++ "deferred_volume_extra_delay= " ++ "fixed_latency_range="); + + static const char* const valid_modargs[] = { + "name", +@@ -92,6 +93,7 @@ static const char* const valid_modargs[] = { + "deferred_volume", + "deferred_volume_safety_margin", + "deferred_volume_extra_delay", ++ "fixed_latency_range", + NULL + }; + +diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c +index 0ee4ead..d6bff11 100644 +--- a/src/pulsecore/protocol-native.c ++++ b/src/pulsecore/protocol-native.c +@@ -1008,6 +1008,10 @@ static void fix_playback_buffer_attr(playback_stream *s) { + tlength_usec -= s->configured_sink_latency; + } + ++ pa_log_debug("Requested latency=%0.2f ms, Received latency=%0.2f ms", ++ (double) sink_usec / PA_USEC_PER_MSEC, ++ (double) s->configured_sink_latency / PA_USEC_PER_MSEC); ++ + /* FIXME: This is actually larger than necessary, since not all of + * the sink latency is actually rewritable. */ + if (tlength_usec < s->configured_sink_latency + 2*minreq_usec) +-- +1.7.6.4 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch new file mode 100644 index 0000000000..e75cecf650 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0002-alsa-fixed-latency-range-handling-for-udev-detect.patch @@ -0,0 +1,78 @@ +From c07c4b353dffe17607fee89e294181bb4e2da40d Mon Sep 17 00:00:00 2001 +From: "Lars R. Damerow" +Date: Thu, 3 Nov 2011 21:29:03 +0100 +Subject: [PATCH 2/3] alsa: fixed latency range handling for udev-detect + +--- + src/modules/module-udev-detect.c | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c +index c5312a8..1192194 100644 +--- a/src/modules/module-udev-detect.c ++++ b/src/modules/module-udev-detect.c +@@ -45,6 +45,7 @@ PA_MODULE_VERSION(PACKAGE_VERSION); + PA_MODULE_LOAD_ONCE(TRUE); + PA_MODULE_USAGE( + "tsched= " ++ "fixed_latency_range= " + "ignore_dB= " + "deferred_volume="); + +@@ -62,6 +63,7 @@ struct userdata { + pa_hashmap *devices; + + pa_bool_t use_tsched:1; ++ pa_bool_t fixed_latency_range:1; + pa_bool_t ignore_dB:1; + pa_bool_t deferred_volume:1; + +@@ -75,6 +77,7 @@ struct userdata { + + static const char* const valid_modargs[] = { + "tsched", ++ "fixed_latency_range", + "ignore_dB", + "deferred_volume", + NULL +@@ -388,6 +391,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) { + "card_name=\"%s\" " + "namereg_fail=false " + "tsched=%s " ++ "fixed_latency_range=%s " + "ignore_dB=%s " + "deferred_volume=%s " + "card_properties=\"module-udev-detect.discovered=1\"", +@@ -395,6 +399,7 @@ static void card_changed(struct userdata *u, struct udev_device *dev) { + n, + d->card_name, + pa_yes_no(u->use_tsched), ++ pa_yes_no(u->fixed_latency_range), + pa_yes_no(u->ignore_dB), + pa_yes_no(u->deferred_volume)); + pa_xfree(n); +@@ -665,7 +670,7 @@ int pa__init(pa_module *m) { + struct udev_enumerate *enumerate = NULL; + struct udev_list_entry *item = NULL, *first = NULL; + int fd; +- pa_bool_t use_tsched = TRUE, ignore_dB = FALSE, deferred_volume = m->core->deferred_volume; ++ pa_bool_t use_tsched = TRUE, fixed_latency_range = FALSE, ignore_dB = FALSE, deferred_volume = m->core->deferred_volume; + + + pa_assert(m); +@@ -686,6 +691,12 @@ int pa__init(pa_module *m) { + } + u->use_tsched = use_tsched; + ++ if (pa_modargs_get_value_boolean(ma, "fixed_latency_range", &fixed_latency_range) < 0) { ++ pa_log("Failed to parse fixed_latency_range= argument."); ++ goto fail; ++ } ++ u->fixed_latency_range = fixed_latency_range; ++ + if (pa_modargs_get_value_boolean(ma, "ignore_dB", &ignore_dB) < 0) { + pa_log("Failed to parse ignore_dB= argument."); + goto fail; +-- +1.7.6.4 + diff --git a/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch new file mode 100644 index 0000000000..d9665c2af6 --- /dev/null +++ b/packages/audio/pulseaudio/patches/pulseaudio-1.1-0003-alsa-fixed_latency_range-modarg-for-module-alsa-card.patch @@ -0,0 +1,32 @@ +From 1e6eda8eda615ec1275a1f208e5f3c9b41238f10 Mon Sep 17 00:00:00 2001 +From: "Lars R. Damerow" +Date: Thu, 3 Nov 2011 21:31:48 +0100 +Subject: [PATCH 3/3] alsa: fixed_latency_range modarg for module-alsa-card + +--- + src/modules/alsa/module-alsa-card.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c +index 5bf6480..344563f 100644 +--- a/src/modules/alsa/module-alsa-card.c ++++ b/src/modules/alsa/module-alsa-card.c +@@ -64,6 +64,7 @@ PA_MODULE_USAGE( + "tsched_buffer_size= " + "tsched_buffer_watermark= " + "profile= " ++ "fixed_latency_range= " + "ignore_dB= " + "deferred_volume= " + "profile_set= "); +@@ -88,6 +89,7 @@ static const char* const valid_modargs[] = { + "tsched", + "tsched_buffer_size", + "tsched_buffer_watermark", ++ "fixed_latency_range", + "profile", + "ignore_dB", + "deferred_volume", +-- +1.7.6.4 + diff --git a/packages/compress/zlib-host/build b/packages/compress/zlib-host/build index bb37eaa29e..5a31f9905e 100755 --- a/packages/compress/zlib-host/build +++ b/packages/compress/zlib-host/build @@ -28,14 +28,9 @@ setup_toolchain host cd $BUILD/zlib-* -# needed for building with cmake - rm -rf zconf.h +cd zlib-host -mkdir -p .build-host && cd .build-host - -cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ - -DCMAKE_INSTALL_PREFIX=$ROOT/$TOOLCHAIN \ - .. +./configure --prefix=$ROOT/$TOOLCHAIN make make install diff --git a/packages/compress/zlib-host/meta b/packages/compress/zlib-host/meta index 7b974cf8e0..0c039c36e3 100644 --- a/packages/compress/zlib-host/meta +++ b/packages/compress/zlib-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.zlib.net" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="ccache" PKG_PRIORITY="optional" PKG_SECTION="compress" PKG_SHORTDESC="zlib: A general purpose (ZIP) data compression library" diff --git a/packages/compress/zlib/build b/packages/compress/zlib/build index 4b44b2b650..92303b6af0 100755 --- a/packages/compress/zlib/build +++ b/packages/compress/zlib/build @@ -24,14 +24,8 @@ cd $PKG_BUILD -# needed for building with cmake - rm -rf zconf.h - -mkdir -p .build-target && cd .build-target - -cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ - -DCMAKE_INSTALL_PREFIX=/usr \ - .. +./configure --prefix=/usr make + $MAKEINSTALL diff --git a/packages/compress/zlib/install b/packages/compress/zlib/install index e281394a2b..afe2733c0a 100755 --- a/packages/compress/zlib/install +++ b/packages/compress/zlib/install @@ -23,4 +23,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -R $PKG_BUILD/.build-target/*.so* $INSTALL/usr/lib + cp -R $PKG_BUILD/*.so* $INSTALL/usr/lib diff --git a/packages/compress/zlib/unpack b/packages/compress/zlib/unpack new file mode 100755 index 0000000000..85da904707 --- /dev/null +++ b/packages/compress/zlib/unpack @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +ZLIB_DIR=`ls -d $PKG_BUILD` + +cp -r "$ZLIB_DIR" "$BUILD/zlib-host" || rm -rf "$BUILD/zlib-host" +mv "$BUILD/zlib-host" "$ZLIB_DIR" diff --git a/packages/databases/sqlite/meta b/packages/databases/sqlite/meta index 077a8a3318..7088517ad1 100644 --- a/packages/databases/sqlite/meta +++ b/packages/databases/sqlite/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="sqlite" -PKG_VERSION="autoconf-3070800" +PKG_VERSION="autoconf-3070900" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="PublicDomain" diff --git a/packages/devel/attr/meta b/packages/devel/attr/meta index 8c5c6c0054..5d8ee30221 100644 --- a/packages/devel/attr/meta +++ b/packages/devel/attr/meta @@ -20,7 +20,7 @@ ################################################################################ PKG_NAME="attr" -PKG_VERSION="2.4.44" +PKG_VERSION="2.4.46" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/devel/boost/meta b/packages/devel/boost/meta index 8968d56fbd..165d1ccd84 100644 --- a/packages/devel/boost/meta +++ b/packages/devel/boost/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.boost.org/" PKG_URL="$SOURCEFORGE_SRC/boost/boost/1.45.0/${PKG_NAME}_${PKG_VERSION}.tar.bz2" PKG_DEPENDS="zlib bzip2" -PKG_BUILD_DEPENDS="toolchain boost-jam Python zlib bzip2" +PKG_BUILD_DEPENDS="toolchain boost-jam Python-host zlib bzip2" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="boost: Peer-reviewed STL style libraries for C++" diff --git a/packages/devel/glib-host/build b/packages/devel/glib-host/build index fb63d840d5..8e7f921401 100755 --- a/packages/devel/glib-host/build +++ b/packages/devel/glib-host/build @@ -27,10 +27,10 @@ $SCRIPTS/unpack glib setup_toolchain host export ZLIB_CFLAGS="" export ZLIB_LIBS="" +export LIBFFI_CFLAGS="-I$ROOT/$TOOLCHAIN/include/libffi" +export LIBFFI_LIBS="-L$ROOT/$TOOLCHAIN/lib -lffi" cd $BUILD/glib* - -do_autoreconf mkdir -p .build-host && cd .build-host ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/devel/glib-host/meta b/packages/devel/glib-host/meta index 59f1a0f1c4..46ccacd267 100644 --- a/packages/devel/glib-host/meta +++ b/packages/devel/glib-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.gtk.org/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain libffi-host zlib-host" +PKG_BUILD_DEPENDS="ccache libffi-host zlib-host Python-host" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="glib-host: C support library" diff --git a/packages/devel/glib/meta b/packages/devel/glib/meta index 317666404e..efed62e0fb 100644 --- a/packages/devel/glib/meta +++ b/packages/devel/glib/meta @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="glib" -PKG_VERSION="2.30.0" +PKG_VERSION="2.31.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.gtk.org/" -PKG_URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.30/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/glib/2.31/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="zlib libiconv libffi pcre" -PKG_BUILD_DEPENDS="toolchain zlib libiconv libffi pcre glib-host gtk-doc" +PKG_BUILD_DEPENDS="toolchain zlib libiconv libffi pcre glib-host gtk-doc Python-host" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="glib: C support library" diff --git a/packages/devel/gmp/build b/packages/devel/gmp/build new file mode 100755 index 0000000000..f984060784 --- /dev/null +++ b/packages/devel/gmp/build @@ -0,0 +1,44 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +export CFLAGS="$CFLAGS -fPIC" +export CPPFLAGS="$CPPFLAGS -fexceptions" + +cd $PKG_BUILD + +mkdir -p .objdir-target && cd .objdir-target + +../configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --disable-static \ + --enable-shared \ + --disable-mpbsd \ + --disable-cxx \ + +make +$MAKEINSTALL \ No newline at end of file diff --git a/packages/devel/usbmuxd/install b/packages/devel/gmp/install similarity index 81% rename from packages/devel/usbmuxd/install rename to packages/devel/gmp/install index 5757d1b4c8..4ea4daa37e 100755 --- a/packages/devel/usbmuxd/install +++ b/packages/devel/gmp/install @@ -23,10 +23,4 @@ . config/options $1 mkdir -p $INSTALL/usr/lib - cp -P $PKG_BUILD/build/libusbmuxd/libusbmuxd.so* $INSTALL/usr/lib - -mkdir -p $INSTALL/usr/sbin - cp -P $PKG_BUILD/build/daemon/usbmuxd $INSTALL/usr/sbin - -mkdir -p $INSTALL/lib/udev/rules.d - cp -P $PKG_BUILD/build/udev/*.rules $INSTALL/lib/udev/rules.d + cp -P $PKG_BUILD/.objdir-target/.libs/libgmp.so* $INSTALL/usr/lib diff --git a/packages/toolchain/math/gmp/meta b/packages/devel/gmp/meta similarity index 96% rename from packages/toolchain/math/gmp/meta rename to packages/devel/gmp/meta index 9486cd1bf8..4eec81da7f 100644 --- a/packages/toolchain/math/gmp/meta +++ b/packages/devel/gmp/meta @@ -26,11 +26,11 @@ PKG_LICENSE="LGPL" PKG_SITE="http://gmplib.org/" PKG_URL="http://ftp.sunet.se/pub/gnu/gmp/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache" +PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" -PKG_SECTION="toolchain/math" +PKG_SECTION="devel" PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library" PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms." PKG_IS_ADDON="no" -PKG_AUTORECONF="no" +PKG_AUTORECONF="yes" diff --git a/packages/devel/gobject-introspection/meta b/packages/devel/gobject-introspection/meta index ce31af4ce9..ea901906ac 100644 --- a/packages/devel/gobject-introspection/meta +++ b/packages/devel/gobject-introspection/meta @@ -19,12 +19,12 @@ ################################################################################ PKG_NAME="gobject-introspection" -PKG_VERSION="0.10.0" +PKG_VERSION="1.31.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://live.gnome.org/GObjectIntrospection" -PKG_URL="http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/0.10/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.31/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" diff --git a/packages/devel/libcec/meta b/packages/devel/libcec/meta index 664e100d3a..51772f4944 100644 --- a/packages/devel/libcec/meta +++ b/packages/devel/libcec/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libcec" -PKG_VERSION="cb91287" +PKG_VERSION="84c27c4" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/devel/libffi-host/build b/packages/devel/libffi-host/build index 6cc66d174c..37b59c6ba6 100755 --- a/packages/devel/libffi-host/build +++ b/packages/devel/libffi-host/build @@ -27,10 +27,14 @@ $SCRIPTS/unpack libffi setup_toolchain host cd $BUILD/libffi-* + +do_autoreconf + mkdir -p .build-host && cd .build-host ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ --prefix=$ROOT/$TOOLCHAIN \ + --includedir=$ROOT/$TOOLCHAIN/include \ --sysconfdir=/etc \ --disable-static \ --enable-shared \ diff --git a/packages/devel/libffi-host/meta b/packages/devel/libffi-host/meta index cad9095434..74c4db302c 100644 --- a/packages/devel/libffi-host/meta +++ b/packages/devel/libffi-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://sourceware.org/$PKG_NAME/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="ccache autotools" PKG_PRIORITY="optional" PKG_SECTION="devel" PKG_SHORTDESC="Foreign Function Interface Library" diff --git a/packages/devel/libffi/build b/packages/devel/libffi/build index 08f3b805ef..ea2e76e9e6 100755 --- a/packages/devel/libffi/build +++ b/packages/devel/libffi/build @@ -27,6 +27,7 @@ mkdir -p .build-target && cd .build-target ../configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --includedir=/usr/include \ --sysconfdir=/etc \ --disable-static \ --enable-shared \ diff --git a/packages/devel/libffi/patches/libffi-3.0.10-includedir.patch b/packages/devel/libffi/patches/libffi-3.0.10-includedir.patch new file mode 100644 index 0000000000..bb709a368c --- /dev/null +++ b/packages/devel/libffi/patches/libffi-3.0.10-includedir.patch @@ -0,0 +1,22 @@ +diff -Naur libffi-3.0.10/include/Makefile.am libffi-3.0.10.patch/include/Makefile.am +--- libffi-3.0.10/include/Makefile.am 2011-08-22 20:38:12.000000000 +0200 ++++ libffi-3.0.10.patch/include/Makefile.am 2011-11-04 09:26:38.587669344 +0100 +@@ -5,5 +5,5 @@ + DISTCLEANFILES=ffitarget.h + EXTRA_DIST=ffi.h.in ffi_common.h + +-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includesdir = $(includedir)/@PACKAGE_NAME@ + nodist_includes_HEADERS = ffi.h ffitarget.h +diff -Naur libffi-3.0.10/libffi.pc.in libffi-3.0.10.patch/libffi.pc.in +--- libffi-3.0.10/libffi.pc.in 2011-08-22 20:38:12.000000000 +0200 ++++ libffi-3.0.10.patch/libffi.pc.in 2011-11-04 09:25:20.218682315 +0100 +@@ -1,7 +1,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + libdir=@libdir@ +-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include ++includedir=@includedir@/@PACKAGE_NAME@ + + Name: @PACKAGE_NAME@ + Description: Library supporting Foreign Function Interfaces diff --git a/packages/devel/pcre/meta b/packages/devel/pcre/meta index d7d704bae6..317a5dad83 100644 --- a/packages/devel/pcre/meta +++ b/packages/devel/pcre/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="pcre" -PKG_VERSION="8.13" +PKG_VERSION="8.20" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OSS" diff --git a/packages/devel/usbmuxd/patches/usbmuxd-1.0.6-version.tag.patch b/packages/devel/usbmuxd/patches/usbmuxd-1.0.6-version.tag.patch deleted file mode 100644 index c273cd3796..0000000000 --- a/packages/devel/usbmuxd/patches/usbmuxd-1.0.6-version.tag.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Naur usbmuxd-1.0.6/Modules/describe.sh usbmuxd-1.0.6.patch/Modules/describe.sh ---- usbmuxd-1.0.6/Modules/describe.sh 2010-09-28 03:32:44.000000000 +0200 -+++ usbmuxd-1.0.6.patch/Modules/describe.sh 2011-01-05 14:28:41.461148284 +0100 -@@ -1,17 +1,8 @@ --#!/bin/bash -+#!/bin/sh - --# Check for git and a git repo. --if head=`git rev-parse --verify HEAD 2>/dev/null`; then -- /bin/echo -n `git describe` -- -- # Are there uncommitted changes? -- git update-index --refresh --unmerged > /dev/null -- git diff-index --quiet HEAD || /bin/echo -n -dirty --else - # Check for version tag - if [ -e version.tag ]; then - /bin/echo -n `cat version.tag` - fi --fi - - echo diff --git a/packages/graphics/Mesa/meta b/packages/graphics/Mesa/meta index 23c4e1a806..6879701736 100644 --- a/packages/graphics/Mesa/meta +++ b/packages/graphics/Mesa/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.mesa3d.org/" PKG_URL="ftp://ftp.freedesktop.org/pub/mesa/$PKG_VERSION/MesaLib-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11" -PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" +PKG_BUILD_DEPENDS="toolchain Python-host makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" PKG_PRIORITY="optional" PKG_SECTION="graphics" PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API" diff --git a/packages/graphics/mesa/meta b/packages/graphics/mesa/meta index 36fd38a007..3ef7e191a4 100644 --- a/packages/graphics/mesa/meta +++ b/packages/graphics/mesa/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.mesa3d.org/" PKG_URL="http://cgit.freedesktop.org/mesa/mesa/snapshot/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXdamage libdrm expat libXext libXfixes libXxf86vm libxcb libX11" -PKG_BUILD_DEPENDS="toolchain Python makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" +PKG_BUILD_DEPENDS="toolchain Python-host makedepend libxml2-host expat glproto dri2proto libdrm libXext libXdamage libXfixes libXxf86vm libxcb libX11" PKG_PRIORITY="optional" PKG_SECTION="graphics" PKG_SHORTDESC="mesa: 3-D graphics library with OpenGL API" diff --git a/packages/initramfs/compress/zlib-initramfs/install b/packages/initramfs/compress/zlib-initramfs/install index a6b4c723e0..6c59423c48 100755 --- a/packages/initramfs/compress/zlib-initramfs/install +++ b/packages/initramfs/compress/zlib-initramfs/install @@ -25,4 +25,4 @@ ZLIB_DIR="$BUILD/zlib-*" mkdir -p $INSTALL/lib - cp -R $ZLIB_DIR/.build-target/*.so* $INSTALL/lib + cp -R $ZLIB_DIR/*.so* $INSTALL/lib diff --git a/packages/initramfs/sysutils/busybox-initramfs/scripts/init b/packages/initramfs/sysutils/busybox-initramfs/scripts/init index 31b0962c15..2621d54f7d 100755 --- a/packages/initramfs/sysutils/busybox-initramfs/scripts/init +++ b/packages/initramfs/sysutils/busybox-initramfs/scripts/init @@ -101,8 +101,8 @@ NFS_OVERLAY="192.168.1.1:/var/lib/overlay" if [ "$SPLASH" = "no" ]; then break else - if [ -f "/sbin/ply-image" ]; then - /sbin/ply-image "$SPLASHIMAGE" & + if [ -f "/bin/ply-image" ]; then + /bin/ply-image "$SPLASHIMAGE" & fi fi } @@ -160,7 +160,7 @@ NFS_OVERLAY="192.168.1.1:/var/lib/overlay" if [ "$FS_TYPE" = "\"hfs\"" -o "$FS_TYPE" = "\"hfsplus\"" ]; then progress "check filesystem $DEVICE [$FS_TYPE]..." - /sbin/fsck_hfs -r -y $DEVICE > /dev/null 2>&1 + /bin/fsck_hfs -r -y $DEVICE > /dev/null 2>&1 fi done } diff --git a/packages/initramfs/sysutils/diskdev_cmds-initramfs/install b/packages/initramfs/sysutils/diskdev_cmds-initramfs/install index 3e4e3ef6e3..ce907bf067 100755 --- a/packages/initramfs/sysutils/diskdev_cmds-initramfs/install +++ b/packages/initramfs/sysutils/diskdev_cmds-initramfs/install @@ -24,7 +24,7 @@ DISKDEV_CMDS_DIR="$BUILD/diskdev_cmds-*" -mkdir -p $INSTALL/sbin - cp $DISKDEV_CMDS_DIR/fsck_hfs.tproj/fsck_hfs $INSTALL/sbin - ln -sf fsck_hfs $INSTALL/sbin/fsck.hfs - ln -sf fsck_hfs $INSTALL/sbin/fsck.hfsplus +mkdir -p $INSTALL/bin + cp $DISKDEV_CMDS_DIR/fsck_hfs.tproj/fsck_hfs $INSTALL/bin + ln -sf fsck_hfs $INSTALL/bin/fsck.hfs + ln -sf fsck_hfs $INSTALL/bin/fsck.hfsplus diff --git a/packages/initramfs/sysutils/e2fsprogs-initramfs/install b/packages/initramfs/sysutils/e2fsprogs-initramfs/install index 20ee681f73..cdd6680349 100755 --- a/packages/initramfs/sysutils/e2fsprogs-initramfs/install +++ b/packages/initramfs/sysutils/e2fsprogs-initramfs/install @@ -27,12 +27,12 @@ E2FSPROGS_DIR="$BUILD/e2fsprogs-*" mkdir -p $INSTALL/etc cp $E2FSPROGS_DIR/misc/mke2fs.conf $INSTALL/etc -mkdir -p $INSTALL/sbin - cp $E2FSPROGS_DIR/e2fsck/e2fsck $INSTALL/sbin - ln -sf e2fsck $INSTALL/sbin/fsck.ext2 - ln -sf e2fsck $INSTALL/sbin/fsck.ext3 - ln -sf e2fsck $INSTALL/sbin/fsck.ext4 - ln -sf e2fsck $INSTALL/sbin/fsck.ext4dev +mkdir -p $INSTALL/bin + cp $E2FSPROGS_DIR/e2fsck/e2fsck $INSTALL/bin + ln -sf e2fsck $INSTALL/bin/fsck.ext2 + ln -sf e2fsck $INSTALL/bin/fsck.ext3 + ln -sf e2fsck $INSTALL/bin/fsck.ext4 + ln -sf e2fsck $INSTALL/bin/fsck.ext4dev mkdir -p $INSTALL/lib cp -P $E2FSPROGS_DIR/lib/e2p/libe2p.so.* $INSTALL/lib diff --git a/packages/initramfs/sysutils/plymouth-lite/install b/packages/initramfs/sysutils/plymouth-lite/install index df85e99e69..c01a7bf46d 100755 --- a/packages/initramfs/sysutils/plymouth-lite/install +++ b/packages/initramfs/sysutils/plymouth-lite/install @@ -22,8 +22,8 @@ . config/options $1 -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/ply-image $INSTALL/sbin +mkdir -p $INSTALL/bin + cp $PKG_BUILD/ply-image $INSTALL/bin mkdir -p $INSTALL/splash if [ -f $PROJECT_DIR/$PROJECT/splash/splash.png ]; then diff --git a/packages/lang/Python-host/build b/packages/lang/Python-host/build new file mode 100755 index 0000000000..0fd791fa87 --- /dev/null +++ b/packages/lang/Python-host/build @@ -0,0 +1,67 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +$SCRIPTS/unpack Python + +setup_toolchain host + +PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" + +cd $BUILD/Python-* +mkdir -p .objdir-host && cd .objdir-host + +OPT="$HOST_CFLAGS" \ +LDFLAGS="$LDFLAGS -lexpat" \ +../configure --host=$HOST_NAME \ + --build=$HOST_NAME \ + --prefix=$ROOT/$TOOLCHAIN \ + --cache-file=config.cache \ + --enable-shared \ + --without-cxx-main \ + --with-threads \ + --enable-unicode=ucs4 \ + --with-system-expat \ + +make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \ + PYTHON_MODULES_LIB="$HOST_LIBDIR" \ + PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ + +make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \ + PYTHON_MODULES_LIB="$HOST_LIBDIR" \ + PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ + install + +cp Parser/pgen $ROOT/$TOOLCHAIN/bin + +# symlink python binary to python2 (needed for Mesa) + ln -sf python $ROOT/$TOOLCHAIN/bin/python2 + +# replace python-config to make sure python uses $SYSROOT_PREFIX + mkdir -p $ROOT/$TOOLCHAIN/bin + rm -rf $ROOT/$TOOLCHAIN/bin/python*-config + + sed -e "s:%PREFIX%:$SYSROOT_PREFIX/usr:g" -e "s:%CFLAGS%:$TARGET_CFLAGS:g" \ + $ROOT/$PKG_DIR/scripts/python-config > $ROOT/$TOOLCHAIN/bin/python2.7-config + chmod +x $ROOT/$TOOLCHAIN/bin/python2.7-config + ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config diff --git a/packages/lang/Python-host/meta b/packages/lang/Python-host/meta new file mode 100644 index 0000000000..e5c6e7822b --- /dev/null +++ b/packages/lang/Python-host/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="Python-host" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://www.python.org/" +PKG_URL="" +PKG_DEPENDS="zlib-host expat-host" +PKG_BUILD_DEPENDS="ccache zlib-host expat-host" +PKG_PRIORITY="optional" +PKG_SECTION="lang" +PKG_SHORTDESC="python: The Python programming language" +PKG_LONGDESC="Python is an interpreted object-oriented programming language, and is often compared with Tcl, Perl, Java or Scheme." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/lang/Python/scripts/python-config b/packages/lang/Python-host/scripts/python-config similarity index 100% rename from packages/lang/Python/scripts/python-config rename to packages/lang/Python-host/scripts/python-config diff --git a/packages/lang/Python/build b/packages/lang/Python/build index 26088f8220..f0786dd0ae 100755 --- a/packages/lang/Python/build +++ b/packages/lang/Python/build @@ -24,51 +24,15 @@ PY_DISABLED_MODULES="readline _curses _curses_panel _tkinter nis gdbm bsddb _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" -cd $PKG_BUILD - -mkdir -p .objdir-host && cd .objdir-host - -setup_toolchain host - -OPT="$HOST_CFLAGS" \ -LDFLAGS="$LDFLAGS -lexpat" \ -../configure --host=$HOST_NAME \ - --build=$HOST_NAME \ - --prefix=$ROOT/$TOOLCHAIN \ - --cache-file=config.cache \ - --enable-shared \ - --without-cxx-main \ - --with-threads \ - --enable-unicode=ucs4 \ - --with-system-expat \ - -make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \ - PYTHON_MODULES_LIB="$HOST_LIBDIR" - -make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \ - PYTHON_MODULES_LIB="$HOST_LIBDIR" \ - install - -# symlink python binary to python2 (needed for Mesa) - ln -sf python $ROOT/$TOOLCHAIN/bin/python2 - -cp Parser/pgen ./hostpgen -cp python ./hostpython - -cd .. - -mkdir -p .objdir-target && cd .objdir-target - -setup_toolchain target - # dont use some optimizations because of problems # this fixes problems with expat (maybe) LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` strip_lto -#LDFLAGS="$LDFLAGS -lexpat -lffi" \ -#LDFLAGS="$LDFLAGS -lffi" \ +cd $PKG_BUILD +mkdir -p .objdir-target && cd .objdir-target + ac_cv_file_dev_ptc=no \ ac_cv_file_dev_ptmx=yes \ ac_cv_func_lchflags_works=no \ @@ -96,10 +60,10 @@ OPT="$CFLAGS -fno-strict-aliasing" \ --with-system-expat \ make -j1 CC="$TARGET_CC" \ - HOSTPYTHON=../.objdir-host/hostpython \ - HOSTPGEN=../.objdir-host/hostpgen \ - RUNSHARED="LD_LIBRARY_PATH=../.objdir-host:" \ + HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \ + HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ BLDSHARED="$CC -shared" \ + RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/:$LD_LIBRARY_PATH" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ CROSS_COMPILE="$TARGET_NAME" \ CROSS_COMPILE_TARGET="yes" \ @@ -108,10 +72,10 @@ make -j1 CC="$TARGET_CC" \ make -j1 CC="$TARGET_CC" \ DESTDIR=$SYSROOT_PREFIX \ - HOSTPYTHON=../.objdir-host/hostpython \ - HOSTPGEN=../.objdir-host/hostpgen \ - RUNSHARED="LD_LIBRARY_PATH=../.objdir-host:" \ + HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \ + HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \ BLDSHARED="$CC -shared" \ + RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/:$LD_LIBRARY_PATH" \ PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \ CROSS_COMPILE="$TARGET_NAME" \ CROSS_COMPILE_TARGET="yes" \ @@ -119,11 +83,3 @@ make -j1 CC="$TARGET_CC" \ PYTHON_MODULES_LIB="$TARGET_LIBDIR" \ install -# replace python-config to make sure python uses $SYSROOT_PREFIX - mkdir -p $ROOT/$TOOLCHAIN/bin - rm -rf $ROOT/$TOOLCHAIN/bin/python*-config - - sed -e "s:%PREFIX%:$SYSROOT_PREFIX/usr:g" -e "s:%CFLAGS%:$TARGET_CFLAGS:g" \ - $ROOT/$PKG_DIR/scripts/python-config > $ROOT/$TOOLCHAIN/bin/python2.7-config - chmod +x $ROOT/$TOOLCHAIN/bin/python2.7-config - ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config diff --git a/packages/lang/Python/meta b/packages/lang/Python/meta index a325e4d0c9..300b89caab 100644 --- a/packages/lang/Python/meta +++ b/packages/lang/Python/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="OSS" PKG_SITE="http://www.python.org/" PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS="zlib openssl libffi file" -PKG_BUILD_DEPENDS="toolchain expat-host sqlite expat zlib-host zlib openssl libffi" +PKG_DEPENDS="sqlite expat zlib openssl libffi file" +PKG_BUILD_DEPENDS="toolchain Python-host sqlite expat zlib openssl libffi" PKG_PRIORITY="optional" PKG_SECTION="lang" PKG_SHORTDESC="python: The Python programming language" diff --git a/packages/lang/php/meta b/packages/lang/php/meta index 8c8adf0eb5..d891b508ae 100644 --- a/packages/lang/php/meta +++ b/packages/lang/php/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="php" -PKG_VERSION="5.3.6" +PKG_VERSION="5.3.8" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OpenSource" diff --git a/packages/linux-drivers/AF9035/install b/packages/linux-drivers/AF9035/install index d6ae5e6c2e..343e55d80c 100755 --- a/packages/linux-drivers/AF9035/install +++ b/packages/linux-drivers/AF9035/install @@ -29,10 +29,5 @@ mkdir -p $INSTALL/lib/modules/$VER/AF9035 cp $PKG_BUILD/tua9001.ko $INSTALL/lib/modules/$VER/AF9035 cp $PKG_BUILD/af9033.ko $INSTALL/lib/modules/$VER/AF9035 -mkdir -p $INSTALL/lib/firmware - cp $PKG_DIR/firmware/*.fw $INSTALL/lib/firmware - -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done +mkdir -p $INSTALL/usr/lib/firmware + cp $PKG_DIR/firmware/*.fw $INSTALL/usr/lib/firmware diff --git a/packages/linux-drivers/AF9035/meta b/packages/linux-drivers/AF9035/meta index 67803f5d29..5a10f15ee5 100644 --- a/packages/linux-drivers/AF9035/meta +++ b/packages/linux-drivers/AF9035/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.abclinuxu.cz/hardware/pridavne-karty/televizni-karty/dvb-t/usb/aver-tv-volar-hd-a835" PKG_URL="http://xgazza.altervista.org/Linux/DVB/Drivers/${PKG_NAME}_${PKG_VERSION}.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_BUILD_DEPENDS="toolchain linux" PKG_PRIORITY="optional" PKG_SECTION="driver" PKG_SHORTDESC="AF9035 driver: Afa Technologies Inc. AF9035A USB Device" diff --git a/packages/linux-drivers/a867_drv/install b/packages/linux-drivers/a867_drv/install index 238f6a8dc2..d31dae7330 100755 --- a/packages/linux-drivers/a867_drv/install +++ b/packages/linux-drivers/a867_drv/install @@ -26,8 +26,3 @@ VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/lib/modules/$VER/a867 cp $PKG_BUILD/a867.ko $INSTALL/lib/modules/$VER/a867/ - -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done diff --git a/packages/linux-drivers/a867_drv/meta b/packages/linux-drivers/a867_drv/meta index 7178a7209e..cee50485a5 100644 --- a/packages/linux-drivers/a867_drv/meta +++ b/packages/linux-drivers/a867_drv/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.avermedia.com/Product/ProductDetail.aspx?Id=516&tab=APDriver" PKG_URL="http://www.avermedia.com/avertv/Upload/Download/${PKG_NAME}_${PKG_VERSION}.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_BUILD_DEPENDS="toolchain linux" PKG_PRIORITY="optional" PKG_SECTION="driver" PKG_SHORTDESC="AVerTV Volar HD Nano A867R driver" diff --git a/packages/linux-drivers/asix-ax887xx/install b/packages/linux-drivers/asix-ax887xx/install index 22d7f9193e..1265bf3cbf 100755 --- a/packages/linux-drivers/asix-ax887xx/install +++ b/packages/linux-drivers/asix-ax887xx/install @@ -26,8 +26,3 @@ VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/lib/modules/$VER/asix-ax887xx cp $PKG_BUILD/asix.ko $INSTALL/lib/modules/$VER/asix-ax887xx - -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done diff --git a/packages/linux-drivers/asix-ax887xx/meta b/packages/linux-drivers/asix-ax887xx/meta index fe3d033f7f..9716d8038b 100644 --- a/packages/linux-drivers/asix-ax887xx/meta +++ b/packages/linux-drivers/asix-ax887xx/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.asix.com.tw" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_BUILD_DEPENDS="toolchain linux" PKG_PRIORITY="optional" PKG_SECTION="driver" PKG_SHORTDESC="asix-ax887xx: ASIX AX88772B/772A/760/772/178 Linux USB LANDriver" diff --git a/packages/linux-drivers/aver_h826d/build b/packages/linux-drivers/aver_h826d/build new file mode 100755 index 0000000000..60a261766a --- /dev/null +++ b/packages/linux-drivers/aver_h826d/build @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD/installer/src + +make KERNELDIR=$(kernel_path) + +fix_module_depends "h826d.ko" "averusbh826d,videodev" diff --git a/packages/linux-drivers/aver_h826d/install b/packages/linux-drivers/aver_h826d/install new file mode 100755 index 0000000000..bdcf91d47c --- /dev/null +++ b/packages/linux-drivers/aver_h826d/install @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +VER=`ls $BUILD/linux*/modules/lib/modules` + +mkdir -p $INSTALL/lib/modules/$VER/aver_h826d + cp $PKG_BUILD/installer/src/*.ko $INSTALL/lib/modules/$VER/aver_h826d diff --git a/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/_prebuild.o_shipped b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/_prebuild.o_shipped new file mode 100644 index 0000000000..f167884b53 Binary files /dev/null and b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/_prebuild.o_shipped differ diff --git a/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/aver/osdep_dvb.o_shipped b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/aver/osdep_dvb.o_shipped new file mode 100644 index 0000000000..9c98ea8137 Binary files /dev/null and b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-4GREG/aver/osdep_dvb.o_shipped differ diff --git a/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/_prebuild.o_shipped b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/_prebuild.o_shipped new file mode 100644 index 0000000000..9a49dc8a22 Binary files /dev/null and b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/_prebuild.o_shipped differ diff --git a/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/aver/osdep_dvb.o_shipped b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/aver/osdep_dvb.o_shipped new file mode 100644 index 0000000000..38ab6ef008 Binary files /dev/null and b/packages/linux-drivers/aver_h826d/kdep_2.6.30/OBJ-x64/aver/osdep_dvb.o_shipped differ diff --git a/packages/linux-drivers/aver_h826d/meta b/packages/linux-drivers/aver_h826d/meta new file mode 100644 index 0000000000..e390a0a659 --- /dev/null +++ b/packages/linux-drivers/aver_h826d/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="aver_h826d" +PKG_VERSION="0.10" +PKG_REV="1" +PKG_ARCH="i386 x86_64" +PKG_LICENSE="GPL" +PKG_SITE="http://www.avermedia-usa.com/avertv/product/ProductDetail.aspx?Id=431&tab=APDriver" +[ "$TARGET_ARCH" = "i386" ] && PKG_URL="http://www.avermedia-usa.com/AVerTV/Upload/Download/C038A827H826_Installer_x86_0.10-Beta_091126.zip" +[ "$TARGET_ARCH" = "x86_64" ] && PKG_URL="http://www.avermedia-usa.com/AVerTV/Upload/Download/C038A827H826_Installer_x64_0.10-Beta_091126.zip" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="AVerTV Hybrid Volar MAX H826 driver" +PKG_LONGDESC="AVerTV Hybrid Volar MAX H826 driver" +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch b/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch new file mode 100644 index 0000000000..43d8659c47 --- /dev/null +++ b/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch @@ -0,0 +1,65 @@ +diff -Nr -u0 original/installer/installer.sh modified/installer/installer.sh +--- original/installer/installer.sh 2009-11-13 11:47:33.000000000 +0100 ++++ modified/installer/installer.sh 2011-08-28 20:58:38.000000000 +0200 +@@ -177,13 +176,0 @@ +- if [[ "$kversion" != "2" || "$kpatchlevel" != "6" ]]; then +- dialog --backtitle "$BACKTITLE" \ +- --title "Kernel version error" \ +- --msgbox "Installer cannot determine kernel version or the running kernel is not 2.6.x kernel. \n\ +-Installer will abort now. +-" \ +- 10 $WIDTH +- log "generate_kdep_string: wrong kernel version ${kversion}.${kpatchlevel}.${ksublevel}. Abort." +- log_from_file $ksrc/Makefile #s016 +- log_from_file $kobj/Makefile #s016 +- exit +- fi +- +diff -Nr -u0 original/installer/src/aver/osdep.c modified/installer/src/aver/osdep.c +--- original/installer/src/aver/osdep.c 2009-11-13 11:54:56.000000000 +0100 ++++ modified/installer/src/aver/osdep.c 2011-08-28 20:19:19.000000000 +0200 +@@ -89 +88,0 @@ +-#include +@@ -435 +434 @@ +- init_MUTEX(tmp); ++ sema_init(tmp, 1); +@@ -439 +438 @@ +- init_MUTEX_LOCKED(tmp); ++ sema_init(tmp, 0); +@@ -1069,0 +1069 @@ ++static DEFINE_MUTEX(dvbdev_mutex); +@@ -1072 +1072 @@ +- lock_kernel(); ++ mutex_lock(&dvbdev_mutex); +@@ -1077 +1077 @@ +- unlock_kernel(); ++ mutex_unlock(&dvbdev_mutex); +diff -Nr -u0 original/installer/src/aver/osdep_dvb.c modified/installer/src/aver/osdep_dvb.c +--- original/installer/src/aver/osdep_dvb.c 2009-11-13 11:54:57.000000000 +0100 ++++ modified/installer/src/aver/osdep_dvb.c 2011-08-28 20:19:36.000000000 +0200 +@@ -79 +78,0 @@ +-#include +@@ -233 +232 @@ +- init_MUTEX(&p->feedlock); ++ sema_init(&p->feedlock, 1); +diff -Nr -u0 original/installer/src/aver/osdep_th2.c modified/installer/src/aver/osdep_th2.c +--- original/installer/src/aver/osdep_th2.c 2009-11-13 11:54:57.000000000 +0100 ++++ modified/installer/src/aver/osdep_th2.c 2011-08-28 20:20:00.000000000 +0200 +@@ -78 +77,0 @@ +-#include +@@ -80,0 +80 @@ ++#include "osdep.h" +@@ -90 +90 @@ +- lock_kernel(); ++ SysLockKernel(); +@@ -100 +100 @@ +- unlock_kernel(); ++ SysUnlockKernel(); +diff -Nr -u0 original/installer/src/aver/osdep_v4l2.c modified/installer/src/aver/osdep_v4l2.c +--- original/installer/src/aver/osdep_v4l2.c 2009-11-13 11:54:58.000000000 +0100 ++++ modified/installer/src/aver/osdep_v4l2.c 2011-08-28 20:20:19.000000000 +0200 +@@ -75,0 +76,2 @@ ++#define VFL_TYPE_VTX 3 ++ +@@ -84 +85,0 @@ +-#include diff --git a/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch.txt b/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch.txt new file mode 100644 index 0000000000..181f84035f --- /dev/null +++ b/packages/linux-drivers/aver_h826d/patches-manual/aver_h826d-0.10-100-latest_kernel.patch.txt @@ -0,0 +1 @@ +http://linuxtv.org/wiki/index.php/AVerMedia_AverTV_Hybrid_Volar_HX_(A827) \ No newline at end of file diff --git a/packages/linux-drivers/aver_h826d/unpack b/packages/linux-drivers/aver_h826d/unpack new file mode 100755 index 0000000000..de62af18dc --- /dev/null +++ b/packages/linux-drivers/aver_h826d/unpack @@ -0,0 +1,52 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +ZIP_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`" + +mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION} + +unzip $SOURCES/$1/$ZIP_PKG -d $BUILD/${PKG_NAME}-${PKG_VERSION} >/dev/null 2>&1 + +tail -n +115 $BUILD/${PKG_NAME}-${PKG_VERSION}/H826D_Installer_*/AVERMEDIA-Linux-*-H826D-0.10-beta.sh | bzip2 -d | tar xf - -C $BUILD/${PKG_NAME}-${PKG_VERSION} + +# this code is copied from scripts/unpack +PKG_BUILD=`ls -d $BUILD/${PKG_NAME}[-_.]${PKG_VERSION}` +for i in $PKG_DIR/patches-manual/$PKG_NAME-$PKG_VERSION*.patch ; do + if [ -f "$i" ]; then + PATCH=`basename $i` + PT=`echo $PATCH | sed 's/.*\.\(.*\)$/\1/'` + if [ "$PT" != "patch" -a "$PT" != "$TARGET_ARCH" ]; then + printf "%${INDENT}c SKIP PATCH: $i\n" >&$SILENT_OUT + continue; + else + printf "%${INDENT}c APPLY PATCH: $i\n" >&$SILENT_OUT + cat $i | patch -p1 -d `echo "$PKG_BUILD" | cut -f1 -d\ ` -p1 >&$VERBOSE_OUT + fi + fi +done + +# prebuild objects were hex edited for kernel 3.1 +[ "$TARGET_ARCH" = "x86_64" ] && KVSTR=x64 +[ "$TARGET_ARCH" = "i386" ] && KVSTR=4GREG +cp -rf $PKG_DIR/kdep_2.6.30/OBJ-$KVSTR/* $BUILD/${PKG_NAME}-${PKG_VERSION}/installer/src diff --git a/packages/linux-drivers/bcm_sta/install b/packages/linux-drivers/bcm_sta/install index 14c895425d..3645075d50 100755 --- a/packages/linux-drivers/bcm_sta/install +++ b/packages/linux-drivers/bcm_sta/install @@ -25,10 +25,9 @@ VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/lib/modules/$VER/bcm_sta -[ "$TARGET_ARCH" = "i386" ] && cp $PKG_BUILD/x86-32/wl.ko $INSTALL/lib/modules/$VER/bcm_sta -[ "$TARGET_ARCH" = "x86_64" ] && cp $PKG_BUILD/x86-64/wl.ko $INSTALL/lib/modules/$VER/bcm_sta - -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done + if [ "$TARGET_ARCH" = "i386" ]; then + cp $PKG_BUILD/x86-32/wl.ko $INSTALL/lib/modules/$VER/bcm_sta + fi + if [ "$TARGET_ARCH" = "x86_64" ]; then + cp $PKG_BUILD/x86-64/wl.ko $INSTALL/lib/modules/$VER/bcm_sta + fi diff --git a/packages/linux-drivers/bcm_sta/meta b/packages/linux-drivers/bcm_sta/meta index 540b86a4bd..0dfff5c60d 100644 --- a/packages/linux-drivers/bcm_sta/meta +++ b/packages/linux-drivers/bcm_sta/meta @@ -26,7 +26,7 @@ PKG_LICENSE="nonfree" PKG_SITE="http://www.broadcom.com/" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_BUILD_DEPENDS="toolchain linux" PKG_PRIORITY="optional" PKG_SECTION="driver" PKG_SHORTDESC="bcm_sta: Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-, BCM4322-, BCM43224-, and BCM43225-based WLAN driver" diff --git a/packages/linux-firmware/dvb-firmware/install b/packages/linux-firmware/dvb-firmware/install index e15be287d7..1f73289b6e 100755 --- a/packages/linux-firmware/dvb-firmware/install +++ b/packages/linux-firmware/dvb-firmware/install @@ -22,5 +22,5 @@ . config/options $1 -mkdir -p $INSTALL - cp -PR $PKG_BUILD/.install/* $INSTALL +mkdir -p $INSTALL/usr + cp -PR $PKG_BUILD/.install/* $INSTALL/usr diff --git a/packages/linux-firmware/misc-firmware/install b/packages/linux-firmware/misc-firmware/install index e15be287d7..1f73289b6e 100755 --- a/packages/linux-firmware/misc-firmware/install +++ b/packages/linux-firmware/misc-firmware/install @@ -22,5 +22,5 @@ . config/options $1 -mkdir -p $INSTALL - cp -PR $PKG_BUILD/.install/* $INSTALL +mkdir -p $INSTALL/usr + cp -PR $PKG_BUILD/.install/* $INSTALL/usr diff --git a/packages/linux-firmware/wlan-firmware/install b/packages/linux-firmware/wlan-firmware/install index e15be287d7..1f73289b6e 100755 --- a/packages/linux-firmware/wlan-firmware/install +++ b/packages/linux-firmware/wlan-firmware/install @@ -22,5 +22,5 @@ . config/options $1 -mkdir -p $INSTALL - cp -PR $PKG_BUILD/.install/* $INSTALL +mkdir -p $INSTALL/usr + cp -PR $PKG_BUILD/.install/* $INSTALL/usr diff --git a/packages/linux/install b/packages/linux/install index a2162fbb64..5a035d03af 100755 --- a/packages/linux/install +++ b/packages/linux/install @@ -30,15 +30,10 @@ mkdir -p $INSTALL/lib/modules/$VER cp -r $PKG_BUILD/modules/* $INSTALL rm -f $INSTALL/lib/modules/$VER/modules.* -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done - # copy kernel firmwares (if present and requested) - mkdir -p $INSTALL/lib/firmware + mkdir -p $INSTALL/usr/lib/firmware [ -d $PKG_BUILD/modules/lib/firmware ] && \ - cp -rf $PKG_BUILD/modules/lib/firmware/* $INSTALL/lib/firmware || true + cp -rf $PKG_BUILD/modules/lib/firmware/* $INSTALL/usr/lib/firmware || true mkdir -p $INSTALL/etc cp $PKG_DIR/config/modules $INSTALL/etc diff --git a/packages/mediacenter/xbmc/meta b/packages/mediacenter/xbmc/meta index 040c210363..e558c5147f 100644 --- a/packages/mediacenter/xbmc/meta +++ b/packages/mediacenter/xbmc/meta @@ -48,6 +48,11 @@ PKG_AUTORECONF="no" PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS dbus" PKG_DEPENDS="$PKG_DEPENDS dbus" +if [ "$PULSEAUDIO_SUPPORT" = yes ]; then + PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS pulseaudio" + PKG_DEPENDS="$PKG_DEPENDS pulseaudio" +fi + if [ "$CEC_SUPPORT" = yes ]; then PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS libcec" PKG_DEPENDS="$PKG_DEPENDS libcec" diff --git a/packages/mediacenter/xbmc/patches/xbmc-2884715-341-xbmc-PR468-0.1.patch b/packages/mediacenter/xbmc/patches/xbmc-2884715-341-xbmc-PR468-0.1.patch index 9f2150ea86..69a09161fd 100644 --- a/packages/mediacenter/xbmc/patches/xbmc-2884715-341-xbmc-PR468-0.1.patch +++ b/packages/mediacenter/xbmc/patches/xbmc-2884715-341-xbmc-PR468-0.1.patch @@ -1,39 +1,15 @@ -From 23d2cd19f9f867637bb0e72e57bba56ded85f60c Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sat, 8 Oct 2011 10:44:23 +0200 -Subject: [PATCH 1/6] vdpau: notify decoder when refresh rate is going to - change and flush renderer - ---- - xbmc/ApplicationMessenger.cpp | 5 ++ - xbmc/ApplicationMessenger.h | 1 + - xbmc/cores/VideoRenderers/BaseRenderer.h | 1 + - xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 14 ++++ - xbmc/cores/VideoRenderers/LinuxRendererGL.h | 1 + - xbmc/cores/VideoRenderers/RenderManager.cpp | 29 ++++++++ - xbmc/cores/VideoRenderers/RenderManager.h | 2 + - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 79 ++++++++++++++++++--- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 22 ++++-- - xbmc/guilib/DispResource.h | 33 +++++++++ - xbmc/windowing/X11/WinSystemX11.cpp | 90 ++++++++++++++++++++++++ - xbmc/windowing/X11/WinSystemX11.h | 11 +++ - xbmc/windowing/X11/WinSystemX11GL.cpp | 2 + - 13 files changed, 274 insertions(+), 16 deletions(-) - create mode 100644 xbmc/guilib/DispResource.h - -diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp -index 9cd3723..5e7bcfa 100644 ---- a/xbmc/ApplicationMessenger.cpp -+++ b/xbmc/ApplicationMessenger.cpp -@@ -42,6 +42,7 @@ - #include "guilib/GUIDialog.h" +diff -Naur xbmc-b44b653/xbmc/ApplicationMessenger.cpp xbmc-b44b653.patch/xbmc/ApplicationMessenger.cpp +--- xbmc-b44b653/xbmc/ApplicationMessenger.cpp 2011-11-06 23:13:34.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/ApplicationMessenger.cpp 2011-11-06 23:52:47.037192895 +0100 +@@ -43,6 +43,7 @@ #include "windowing/WindowingFactory.h" #include "GUIInfoManager.h" + #include "utils/Splash.h" +#include "cores/VideoRenderers/RenderManager.h" #include "powermanagement/PowerManager.h" -@@ -231,6 +232,10 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg) +@@ -232,6 +233,10 @@ case POWERSTATE_MINIMIZE: Minimize(); break; @@ -44,11 +20,10 @@ index 9cd3723..5e7bcfa 100644 } } break; -diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h -index b0b4687..31b4ffb 100644 ---- a/xbmc/ApplicationMessenger.h -+++ b/xbmc/ApplicationMessenger.h -@@ -76,6 +76,7 @@ class CGUIWindow; +diff -Naur xbmc-b44b653/xbmc/ApplicationMessenger.h xbmc-b44b653.patch/xbmc/ApplicationMessenger.h +--- xbmc-b44b653/xbmc/ApplicationMessenger.h 2011-11-06 23:13:35.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/ApplicationMessenger.h 2011-11-06 23:52:47.038192908 +0100 +@@ -76,6 +76,7 @@ #define TMSG_MINIMIZE 309 #define TMSG_TOGGLEFULLSCREEN 310 #define TMSG_SETLANGUAGE 311 @@ -56,884 +31,10 @@ index b0b4687..31b4ffb 100644 #define TMSG_HTTPAPI 400 -diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h -index faef87c..af51852 100644 ---- a/xbmc/cores/VideoRenderers/BaseRenderer.h -+++ b/xbmc/cores/VideoRenderers/BaseRenderer.h -@@ -64,6 +64,7 @@ public: - float GetAspectRatio() const; - - virtual bool AddVideoPicture(DVDVideoPicture* picture) { return false; } -+ virtual void Flush() {}; - - virtual unsigned int GetProcessorSize() { return 0; } - -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 02d317e..0e247aa 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -554,6 +554,20 @@ void CLinuxRendererGL::Reset() - } - } - -+void CLinuxRendererGL::Flush() -+{ -+ if (!m_bValidated) -+ return; -+ -+ glFinish(); -+ -+ for (int i = 0 ; i < m_NumYV12Buffers ; i++) -+ (this->*m_textureDelete)(i); -+ -+ glFinish(); -+ m_bValidated = false; -+} -+ - void CLinuxRendererGL::Update(bool bPauseDrawing) - { - if (!m_bConfigured) return; -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.h b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -index 8f1664a..38c84aa 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGL.h -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.h -@@ -140,6 +140,7 @@ public: - virtual unsigned int PreInit(); - virtual void UnInit(); - virtual void Reset(); /* resets renderer after seek for example */ -+ virtual void Flush(); - - #ifdef HAVE_LIBVDPAU - virtual void AddProcessor(CVDPAU* vdpau); -diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp -index 50c465c..31bb49a 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.cpp -+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp -@@ -337,6 +337,35 @@ void CXBMCRenderManager::UnInit() - m_pRenderer->UnInit(); - } - -+bool CXBMCRenderManager::Flush() -+{ -+ if (!m_pRenderer) -+ return true; -+ -+ if (g_application.IsCurrentThread()) -+ { -+ CLog::Log(LOGDEBUG, "%s - flushing renderer", __FUNCTION__); -+ -+ CRetakeLock lock(m_sharedSection); -+ m_pRenderer->Flush(); -+ m_flushEvent.Set(); -+ } -+ else -+ { -+ ThreadMessage msg = {TMSG_RENDERER_FLUSH}; -+ m_flushEvent.Reset(); -+ g_application.getApplicationMessenger().SendMessage(msg, false); -+ if (!m_flushEvent.WaitMSec(1000)) -+ { -+ CLog::Log(LOGERROR, "%s - timed out waiting for renderer to flush", __FUNCTION__); -+ return false; -+ } -+ else -+ return true; -+ } -+ return true; -+} -+ - void CXBMCRenderManager::SetupScreenshot() - { - CSharedLock lock(m_sharedSection); -diff --git a/xbmc/cores/VideoRenderers/RenderManager.h b/xbmc/cores/VideoRenderers/RenderManager.h -index f8f68ab..b81bced 100644 ---- a/xbmc/cores/VideoRenderers/RenderManager.h -+++ b/xbmc/cores/VideoRenderers/RenderManager.h -@@ -76,6 +76,7 @@ public: - void FlipPage(volatile bool& bStop, double timestamp = 0.0, int source = -1, EFIELDSYNC sync = FS_NONE); - unsigned int PreInit(); - void UnInit(); -+ bool Flush(); - - void AddOverlay(CDVDOverlay* o, double pts) - { -@@ -227,6 +228,7 @@ protected: - EPRESENTSTEP m_presentstep; - int m_presentsource; - CEvent m_presentevent; -+ CEvent m_flushEvent; - - - OVERLAY::CRenderer m_overlays; -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 0ad0451..06629df 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -@@ -95,6 +95,7 @@ CVDPAU::CVDPAU() - recover = false; - m_mixerfield = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; - m_mixerstep = 0; -+ m_DisplayState = VDPAU_OPEN; - - m_glPixmap = 0; - m_Pixmap = 0; -@@ -191,6 +192,8 @@ bool CVDPAU::Open(AVCodecContext* avctx, const enum PixelFormat, unsigned int su - avctx->release_buffer = CVDPAU::FFReleaseBuffer; - avctx->draw_horiz_band = CVDPAU::FFDrawSlice; - avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; -+ -+ g_Windowing.Register(this); - return true; - } - return false; -@@ -208,6 +211,8 @@ void CVDPAU::Close() - FiniVDPAUOutput(); - FiniVDPAUProcs(); - -+ g_Windowing.Unregister(this); -+ - if (m_glPixmap) - { - CLog::Log(LOGINFO, "GLX: Destroying glPixmap"); -@@ -363,6 +368,11 @@ bool CVDPAU::MakePixmap(int width, int height) - - void CVDPAU::BindPixmap() - { -+ { CSingleLock lock(m_DisplaySection); -+ if (m_DisplayState != VDPAU_OPEN) -+ return; -+ } -+ - if (m_glPixmap) - { - if(presentSurface != VDP_INVALID_HANDLE) -@@ -389,6 +399,11 @@ void CVDPAU::BindPixmap() - - void CVDPAU::ReleasePixmap() - { -+ { CSingleLock lock(m_DisplaySection); -+ if (m_DisplayState != VDPAU_OPEN) -+ return; -+ } -+ - if (m_glPixmap) - { - glXReleaseTexImageEXT(m_Display, m_glPixmap, GLX_FRONT_LEFT_EXT); -@@ -396,22 +411,53 @@ void CVDPAU::ReleasePixmap() - else CLog::Log(LOGERROR,"(VDPAU) ReleasePixmap called without valid pixmap"); - } - --bool CVDPAU::CheckRecover(bool force) -+void CVDPAU::OnLostDevice() -+{ -+ CSingleLock lock(m_DisplaySection); -+ m_DisplayState = VDPAU_LOST; -+ m_DisplayEvent.Reset(); -+} -+ -+void CVDPAU::OnResetDevice() -+{ -+ CSingleLock lock(m_DisplaySection); -+ -+ if (m_DisplayState == VDPAU_LOST) -+ { -+ m_DisplayState = VDPAU_RESET; -+ m_DisplayEvent.Set(); -+ } -+} -+ -+int CVDPAU::Check(AVCodecContext* avctx) - { -- if (recover || force) -+ CSingleLock lock(m_DisplaySection); -+ -+ if (m_DisplayState == VDPAU_LOST) -+ { -+ lock.Leave(); -+ if (!m_DisplayEvent.WaitMSec(2000)) -+ { -+ CLog::Log(LOGERROR, "CVDPAU::Check - device didn't reset in reasonable time"); -+ return VC_ERROR; -+ } -+ lock.Enter(); -+ } -+ if (recover || m_DisplayState == VDPAU_RESET) - { - CLog::Log(LOGNOTICE,"Attempting recovery"); - - FiniVDPAUOutput(); - FiniVDPAUProcs(); - -- recover = false; -- - InitVDPAUProcs(); - -- return true; -+ recover = false; -+ m_DisplayState = VDPAU_OPEN; -+ -+ return VC_FLUSHED; - } -- return false; -+ return 0; - } - - bool CVDPAU::IsVDPAUFormat(PixelFormat format) -@@ -750,6 +796,9 @@ void CVDPAU::InitVDPAUProcs() - &VDPPreemptionCallbackFunction, - (void*)this); - CheckStatus(vdp_st, __LINE__); -+ -+ CSingleLock lock(m_DisplaySection); -+ m_DisplayState = VDPAU_OPEN; - } - - void CVDPAU::FiniVDPAUProcs() -@@ -1132,8 +1181,9 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) - VdpStatus vdp_st; - VdpTime time; - -- if (CheckRecover(false)) -- return VC_FLUSHED; -+ int result = Check(avctx); -+ if (result) -+ return result; - - if (!vdpauConfigured) - return VC_ERROR; -@@ -1318,6 +1368,11 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) - - bool CVDPAU::GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) - { -+ { CSingleLock lock(m_DisplaySection); -+ if (m_DisplayState != VDPAU_OPEN) -+ return false; -+ } -+ - *picture = m_DVDVideoPics.front(); - // if this is the first field of an interlaced frame, we'll need - // this same picture for the second field later -@@ -1358,6 +1413,12 @@ void CVDPAU::Present() - { - //CLog::Log(LOGNOTICE,"%s",__FUNCTION__); - VdpStatus vdp_st; -+ -+ { CSingleLock lock(m_DisplaySection); -+ if (m_DisplayState != VDPAU_OPEN) -+ return; -+ } -+ - presentSurface = outputSurface; - - vdp_st = vdp_presentation_queue_display(vdp_flip_queue, -@@ -1370,7 +1431,7 @@ void CVDPAU::Present() - - void CVDPAU::VDPPreemptionCallbackFunction(VdpDevice device, void* context) - { -- CLog::Log(LOGERROR,"VDPAU Device Preempted - attempting recovery"); -+ CLog::Log(LOGDEBUG,"VDPAU Device Preempted - attempting recovery"); - CVDPAU* pCtx = (CVDPAU*)context; - pCtx->recover = true; - } -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 2056de1..6eab3fc 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -@@ -33,6 +33,8 @@ - #include - #include "threads/CriticalSection.h" - #include "settings/VideoSettings.h" -+#include "guilib/DispResource.h" -+#include "threads/Event.h" - namespace Surface { class CSurface; } - - #define NUM_OUTPUT_SURFACES 4 -@@ -44,6 +46,7 @@ namespace Surface { class CSurface; } - - class CVDPAU - : public CDVDVideoCodecFFmpeg::IHardwareDecoder -+ , public IDispResource - { - public: - -@@ -69,13 +72,8 @@ public: - virtual void Reset(); - virtual void Close(); - -- virtual int Check(AVCodecContext* avctx) -- { -- if(CheckRecover(false)) -- return VC_FLUSHED; -- else -- return 0; -- } -+ virtual int Check(AVCodecContext* avctx); -+ - virtual const std::string Name() { return "vdpau"; } - - bool MakePixmap(int width, int height); -@@ -227,4 +225,14 @@ public: - , VdpChromaType &chroma_type); - - std::vector m_videoSurfaces; -+ -+ enum EDisplayState -+ { VDPAU_OPEN -+ , VDPAU_RESET -+ , VDPAU_LOST -+ } m_DisplayState; -+ CCriticalSection m_DisplaySection; -+ CEvent m_DisplayEvent; -+ virtual void OnLostDevice(); -+ virtual void OnResetDevice(); - }; -diff --git a/xbmc/guilib/DispResource.h b/xbmc/guilib/DispResource.h -new file mode 100644 -index 0000000..d2833cb ---- /dev/null -+++ b/xbmc/guilib/DispResource.h -@@ -0,0 +1,33 @@ -+/* -+* Copyright (C) 2005-2008 Team XBMC -+* http://www.xbmc.org -+* -+* This Program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU General Public License as published by -+* the Free Software Foundation; either version 2, or (at your option) -+* any later version. -+* -+* This Program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details. -+* -+* You should have received a copy of the GNU General Public License -+* along with XBMC; see the file COPYING. If not, write to -+* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. -+* http://www.gnu.org/copyleft/gpl.html -+* -+*/ -+ -+#pragma once -+ -+#ifdef HAS_GLX -+class IDispResource -+{ -+public: -+ virtual ~IDispResource() {}; -+ virtual void OnLostDevice() {}; -+ virtual void OnResetDevice() {}; -+}; -+ -+#endif -diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index 4287a04..ea20c0e 100644 ---- a/xbmc/windowing/X11/WinSystemX11.cpp -+++ b/xbmc/windowing/X11/WinSystemX11.cpp -@@ -27,9 +27,18 @@ - #include "WinSystemX11.h" - #include "settings/Settings.h" - #include "guilib/Texture.h" -+#include "guilib/DispResource.h" - #include "utils/log.h" - #include "XRandR.h" - #include -+#include "threads/SingleLock.h" -+#include -+#include "cores/VideoRenderers/RenderManager.h" -+#include "utils/TimeUtils.h" -+ -+#if defined(HAS_XRANDR) -+#include -+#endif - - using namespace std; - -@@ -42,6 +51,7 @@ CWinSystemX11::CWinSystemX11() : CWinSystemBase() - m_glWindow = 0; - m_wmWindow = 0; - m_bWasFullScreenBeforeMinimize = false; -+ m_dpyLostTime = 0; - } - - CWinSystemX11::~CWinSystemX11() -@@ -126,6 +136,13 @@ bool CWinSystemX11::CreateNewWindow(const CStdString& name, bool fullScreen, RES - SDL_WM_SetIcon(SDL_CreateRGBSurfaceFrom(iconTexture.GetPixels(), iconTexture.GetWidth(), iconTexture.GetHeight(), 32, iconTexture.GetPitch(), 0xff0000, 0x00ff00, 0x0000ff, 0xff000000L), NULL); - SDL_WM_SetCaption("XBMC Media Center", NULL); - -+ // register XRandR Events -+#if defined(HAS_XRANDR) -+ int iReturn; -+ XRRQueryExtension(m_dpy, &m_RREventBase, &iReturn); -+ XRRSelectInput(m_dpy, m_wmWindow, RRScreenChangeNotifyMask); -+#endif -+ - m_bWindowCreated = true; - return true; - } -@@ -175,7 +192,10 @@ bool CWinSystemX11::SetFullScreen(bool fullScreen, RESOLUTION_INFO& res, bool bl - mode.id = res.strId; - - if(m_bFullScreen) -+ { -+ OnLostDevice(); - g_xrandr.SetMode(out, mode); -+ } - else - g_xrandr.RestoreState(); - #endif -@@ -444,4 +464,74 @@ bool CWinSystemX11::Show(bool raise) - XSync(m_dpy, False); - return true; - } -+ -+void CWinSystemX11::CheckDisplayEvents() -+{ -+#if defined(HAS_XRANDR) -+ bool bGotEvent(false); -+ bool bTimeout(false); -+ XEvent Event; -+ while (XCheckTypedEvent(m_dpy, m_RREventBase + RRScreenChangeNotify, &Event)) -+ { -+ if (Event.type == m_RREventBase + RRScreenChangeNotify) -+ { -+ CLog::Log(LOGDEBUG, "%s: Received RandR event %i", __FUNCTION__, Event.type); -+ bGotEvent = true; -+ } -+ XRRUpdateConfiguration(&Event); -+ } -+ -+ // check fail safe timer -+ if (m_dpyLostTime && CurrentHostCounter() - m_dpyLostTime > (uint64_t)3 * CurrentHostFrequency()) -+ { -+ CLog::Log(LOGERROR, "%s - no display event after 3 seconds", __FUNCTION__); -+ bTimeout = true; -+ } -+ -+ if (bGotEvent || bTimeout) -+ { -+ CLog::Log(LOGDEBUG, "%s - notify display reset event", __FUNCTION__); -+ -+ CSingleLock lock(m_resourceSection); -+ -+ // tell any shared resources -+ for (vector::iterator i = m_resources.begin(); i != m_resources.end(); i++) -+ (*i)->OnResetDevice(); -+ -+ // reset fail safe timer -+ m_dpyLostTime = 0; -+ } -+#endif -+} -+ -+void CWinSystemX11::OnLostDevice() -+{ -+ CLog::Log(LOGDEBUG, "%s - notify display change event", __FUNCTION__); -+ -+ { CSingleLock lock(m_resourceSection); -+ for (vector::iterator i = m_resources.begin(); i != m_resources.end(); i++) -+ (*i)->OnLostDevice(); -+ } -+ -+ // make sure renderer has no invalid references -+ g_renderManager.Flush(); -+ -+ // fail safe timer -+ m_dpyLostTime = CurrentHostCounter(); -+} -+ -+void CWinSystemX11::Register(IDispResource *resource) -+{ -+ CSingleLock lock(m_resourceSection); -+ m_resources.push_back(resource); -+} -+ -+void CWinSystemX11::Unregister(IDispResource* resource) -+{ -+ CSingleLock lock(m_resourceSection); -+ vector::iterator i = find(m_resources.begin(), m_resources.end(), resource); -+ if (i != m_resources.end()) -+ m_resources.erase(i); -+} -+ - #endif -diff --git a/xbmc/windowing/X11/WinSystemX11.h b/xbmc/windowing/X11/WinSystemX11.h -index da6accf..5b941be 100644 ---- a/xbmc/windowing/X11/WinSystemX11.h -+++ b/xbmc/windowing/X11/WinSystemX11.h -@@ -26,6 +26,9 @@ - #include "windowing/WinSystem.h" - #include "utils/Stopwatch.h" - #include -+#include "threads/CriticalSection.h" -+ -+class IDispResource; - - class CWinSystemX11 : public CWinSystemBase - { -@@ -51,6 +54,8 @@ public: - virtual bool Restore() ; - virtual bool Hide(); - virtual bool Show(bool raise = true); -+ virtual void Register(IDispResource *resource); -+ virtual void Unregister(IDispResource *resource); - - // Local to WinSystemX11 only - Display* GetDisplay() { return m_dpy; } -@@ -58,6 +63,8 @@ public: - - protected: - bool RefreshGlxContext(); -+ void CheckDisplayEvents(); -+ void OnLostDevice(); - - SDL_Surface* m_SDLSurface; - GLXContext m_glContext; -@@ -65,6 +72,10 @@ protected: - Window m_wmWindow; - Display* m_dpy; - bool m_bWasFullScreenBeforeMinimize; -+ int m_RREventBase; -+ CCriticalSection m_resourceSection; -+ std::vector m_resources; -+ uint64_t m_dpyLostTime; - - private: - bool IsSuitableVisual(XVisualInfo *vInfo); -diff --git a/xbmc/windowing/X11/WinSystemX11GL.cpp b/xbmc/windowing/X11/WinSystemX11GL.cpp -index 94f369e..ed9ed6d 100644 ---- a/xbmc/windowing/X11/WinSystemX11GL.cpp -+++ b/xbmc/windowing/X11/WinSystemX11GL.cpp -@@ -43,6 +43,8 @@ CWinSystemX11GL::~CWinSystemX11GL() - - bool CWinSystemX11GL::PresentRenderImpl(const CDirtyRegionList& dirty) - { -+ CheckDisplayEvents(); -+ - if(m_iVSyncMode == 3) - { - glFinish(); --- -1.7.5.4 - - -From e29ca1112c976afd9a78c7cdfbda7e26efb8880a Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sat, 15 Oct 2011 22:28:24 +0200 -Subject: [PATCH 2/6] vdpau: remove recover variable and use diplay state - ---- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 39 +++++++++++++++-------- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 5 ++- - 2 files changed, 28 insertions(+), 16 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 06629df..8debcb6 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -@@ -92,7 +92,7 @@ CVDPAU::CVDPAU() - surfaceNum = presentSurfaceNum = 0; - picAge.b_age = picAge.ip_age[0] = picAge.ip_age[1] = 256*256*256*64; - vdpauConfigured = false; -- recover = false; -+ m_DisplayState = VDPAU_OPEN; - m_mixerfield = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; - m_mixerstep = 0; - m_DisplayState = VDPAU_OPEN; -@@ -443,7 +443,7 @@ int CVDPAU::Check(AVCodecContext* avctx) - } - lock.Enter(); - } -- if (recover || m_DisplayState == VDPAU_RESET) -+ if (m_DisplayState == VDPAU_RESET) - { - CLog::Log(LOGNOTICE,"Attempting recovery"); - -@@ -452,7 +452,6 @@ int CVDPAU::Check(AVCodecContext* avctx) - - InitVDPAUProcs(); - -- recover = false; - m_DisplayState = VDPAU_OPEN; - - return VC_FLUSHED; -@@ -1038,10 +1037,12 @@ int CVDPAU::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic) - struct pictureAge* pA = &vdp->picAge; - - // while we are waiting to recover we can't do anything -- if(vdp->recover) -- { -- CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - returning due to awaiting recovery"); -- return -1; -+ { CSingleLock lock(vdp->m_DisplaySection); -+ if(vdp->m_DisplayState != VDPAU_OPEN) -+ { -+ CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - returning due to awaiting recovery"); -+ return -1; -+ } - } - - vdpau_render_state * render = NULL; -@@ -1134,9 +1135,11 @@ void CVDPAU::FFDrawSlice(struct AVCodecContext *s, - CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)s->opaque; - CVDPAU* vdp = (CVDPAU*)ctx->GetHardware(); - -- /* while we are waiting to recover we can't do anything */ -- if(vdp->recover) -- return; -+ // while we are waiting to recover we can't do anything -+ { CSingleLock lock(vdp->m_DisplaySection); -+ if(vdp->m_DisplayState != VDPAU_OPEN) -+ return; -+ } - - if(src->linesize[0] || src->linesize[1] || src->linesize[2] - || offset[0] || offset[1] || offset[2]) -@@ -1433,23 +1436,31 @@ void CVDPAU::VDPPreemptionCallbackFunction(VdpDevice device, void* context) - { - CLog::Log(LOGDEBUG,"VDPAU Device Preempted - attempting recovery"); - CVDPAU* pCtx = (CVDPAU*)context; -- pCtx->recover = true; -+ -+ { CSingleLock lock(pCtx->m_DisplaySection); -+ if(pCtx->m_DisplayState == VDPAU_OPEN) -+ pCtx->m_DisplayState = VDPAU_RESET; -+ } - } - - bool CVDPAU::CheckStatus(VdpStatus vdp_st, int line) - { -+ CSingleLock lock(m_DisplaySection); -+ - if (vdp_st == VDP_STATUS_HANDLE_DEVICE_MISMATCH - || vdp_st == VDP_STATUS_DISPLAY_PREEMPTED) -- recover = true; -+ if(m_DisplayState == VDPAU_OPEN) -+ m_DisplayState = VDPAU_RESET; - - // no need to log errors about this case, as it will happen on cleanup -- if (vdp_st == VDP_STATUS_INVALID_HANDLE && recover && vdpauConfigured) -+ if (vdp_st == VDP_STATUS_INVALID_HANDLE && (m_DisplayState != VDPAU_OPEN) && vdpauConfigured) - return false; - - if (vdp_st != VDP_STATUS_OK) - { - CLog::Log(LOGERROR, " (VDPAU) Error: %s(%d) at %s:%d\n", vdp_get_error_string(vdp_st), vdp_st, __FILE__, line); -- recover = true; -+ if(m_DisplayState == VDPAU_OPEN) -+ m_DisplayState = VDPAU_RESET; - return true; - } - return false; -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 6eab3fc..31cb653 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -@@ -102,7 +102,6 @@ public: - void InitCSCMatrix(int Height); - bool CheckStatus(VdpStatus vdp_st, int line); - -- bool CheckRecover(bool force = false); - void CheckFeatures(); - void SetColor(); - void SetNoiseReduction(); -@@ -111,7 +110,6 @@ public: - void SetHWUpscaling(); - - pictureAge picAge; -- bool recover; - vdpau_render_state *past[2], *current, *future; - int tmpDeintMode, tmpDeintGUI, tmpDeint; - float tmpNoiseReduction, tmpSharpness; -@@ -226,6 +224,9 @@ public: - - std::vector m_videoSurfaces; - -+ // OnLostDevice triggers transition from all states to LOST -+ // internal errors trigger transition from OPEN to RESET -+ // OnResetDevice triggers transition from LOST to RESET - enum EDisplayState - { VDPAU_OPEN - , VDPAU_RESET --- -1.7.5.4 - - -From 27662f3b3212db24c5691514a7159f801a02e4d2 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Wed, 19 Oct 2011 16:20:15 +0200 -Subject: [PATCH 3/6] vdpau: fix memory leak and access violation in - vdpau_render_state structure - ---- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 54 +++++++++++++++++++----- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 2 + - 2 files changed, 45 insertions(+), 11 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 8debcb6..cb2aaac 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -@@ -151,6 +151,9 @@ bool CVDPAU::Open(AVCodecContext* avctx, const enum PixelFormat, unsigned int su - } - } - -+ if (!m_dllAvUtil.Load()) -+ return false; -+ - InitVDPAUProcs(); - - if (vdp_device != VDP_INVALID_HANDLE) -@@ -212,6 +215,7 @@ void CVDPAU::Close() - FiniVDPAUProcs(); - - g_Windowing.Unregister(this); -+ m_dllAvUtil.Unload(); - - if (m_glPixmap) - { -@@ -431,19 +435,24 @@ void CVDPAU::OnResetDevice() - - int CVDPAU::Check(AVCodecContext* avctx) - { -- CSingleLock lock(m_DisplaySection); -+ EDisplayState state; - -- if (m_DisplayState == VDPAU_LOST) -+ { CSingleLock lock(m_DisplaySection); -+ state = m_DisplayState; -+ } -+ -+ if (state == VDPAU_LOST) - { -- lock.Leave(); - if (!m_DisplayEvent.WaitMSec(2000)) - { - CLog::Log(LOGERROR, "CVDPAU::Check - device didn't reset in reasonable time"); - return VC_ERROR; - } -- lock.Enter(); -+ { CSingleLock lock(m_DisplaySection); -+ state = m_DisplayState; -+ } - } -- if (m_DisplayState == VDPAU_RESET) -+ if (state == VDPAU_RESET) - { - CLog::Log(LOGNOTICE,"Attempting recovery"); - -@@ -452,8 +461,6 @@ int CVDPAU::Check(AVCodecContext* avctx) - - InitVDPAUProcs(); - -- m_DisplayState = VDPAU_OPEN; -- - return VC_FLUSHED; - } - return 0; -@@ -863,6 +870,7 @@ void CVDPAU::FiniVDPAUOutput() - vdp_st = vdp_video_surface_destroy(m_videoSurfaces[i]->surface); - CheckStatus(vdp_st, __LINE__); - m_videoSurfaces[i]->surface = VDP_INVALID_HANDLE; -+ m_dllAvUtil.av_freep(&m_videoSurfaces[i]->bitstream_buffers); - free(m_videoSurfaces[i]); - } - m_videoSurfaces.clear(); -@@ -1065,6 +1073,11 @@ int CVDPAU::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic) - VdpDecoderProfile profile; - ReadFormatOf(avctx->pix_fmt, profile, vdp->vdp_chroma_type); - render = (vdpau_render_state*)calloc(sizeof(vdpau_render_state), 1); -+ if (render == NULL) -+ { -+ CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - calloc failed"); -+ return -1; -+ } - vdp_st = vdp->vdp_video_surface_create(vdp->vdp_device, - vdp->vdp_chroma_type, - avctx->width, -@@ -1112,19 +1125,38 @@ int CVDPAU::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic) - void CVDPAU::FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic) - { - //CLog::Log(LOGNOTICE,"%s",__FUNCTION__); -- vdpau_render_state * render; -- int i; -+ CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque; -+ CVDPAU* vdp = (CVDPAU*)ctx->GetHardware(); -+ vdpau_render_state * render; -+ unsigned int i; - - render=(vdpau_render_state*)pic->data[0]; - if(!render) - { -- CLog::Log(LOGERROR, "CVDPAU::FFDrawSlice - invalid context handle provided"); -+ CLog::Log(LOGERROR, "CVDPAU::FFReleaseBuffer - invalid context handle provided"); - return; - } - -- render->state &= ~FF_VDPAU_STATE_USED_FOR_REFERENCE; - for(i=0; i<4; i++) - pic->data[i]= NULL; -+ -+ // find render state in queue -+ bool found(false); -+ for(i = 0; i < vdp->m_videoSurfaces.size(); ++i) -+ { -+ if(vdp->m_videoSurfaces[i] == render) -+ { -+ found = true; -+ break; -+ } -+ } -+ if (!found) -+ { -+ CLog::Log(LOGDEBUG, "CVDPAU::FFReleaseBuffer - buffer not found"); -+ return; -+ } -+ -+ render->state &= ~FF_VDPAU_STATE_USED_FOR_REFERENCE; - } - - -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 31cb653..d10d845 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -@@ -21,6 +21,7 @@ - * - */ - -+#include "DllAvUtil.h" - #include "DVDVideoCodec.h" - #include "DVDVideoCodecFFmpeg.h" - #include "libavcodec/vdpau.h" -@@ -223,6 +224,7 @@ public: - , VdpChromaType &chroma_type); - - std::vector m_videoSurfaces; -+ DllAvUtil m_dllAvUtil; - - // OnLostDevice triggers transition from all states to LOST - // internal errors trigger transition from OPEN to RESET --- -1.7.5.4 - - -From dcfe717dd680598f09fd3fbe34e77bd75d390660 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Fri, 21 Oct 2011 09:06:06 +0200 -Subject: [PATCH 4/6] vdpau: revamp error recovery, verify picture buffers - from ffmpeg because some decoders like vc-1 dont flush - ---- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 168 ++++++++++++------------ - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 3 - - 2 files changed, 84 insertions(+), 87 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index cb2aaac..814c05c 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -@@ -73,12 +73,6 @@ static struct SInterlaceMapping +diff -Naur xbmc-b44b653/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp xbmc-b44b653.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +--- xbmc-b44b653/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2011-11-06 23:13:41.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp 2011-11-06 23:52:47.042192960 +0100 +@@ -73,12 +73,6 @@ , {VS_INTERLACEMETHOD_NONE , (VdpVideoMixerFeature)-1} }; @@ -946,7 +47,14 @@ index cb2aaac..814c05c 100644 //since libvdpau 0.4, vdp_device_create_x11() installs a callback on the Display*, //if we unload libvdpau with dlclose(), we segfault on XCloseDisplay, //so we just keep a static handle to libvdpau around -@@ -99,7 +93,6 @@ CVDPAU::CVDPAU() +@@ -92,13 +86,12 @@ + surfaceNum = presentSurfaceNum = 0; + picAge.b_age = picAge.ip_age[0] = picAge.ip_age[1] = 256*256*256*64; + vdpauConfigured = false; +- recover = false; ++ m_DisplayState = VDPAU_OPEN; + m_mixerfield = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; + m_mixerstep = 0; m_glPixmap = 0; m_Pixmap = 0; @@ -954,10 +62,49 @@ index cb2aaac..814c05c 100644 if (!glXBindTexImageEXT) glXBindTexImageEXT = (PFNGLXBINDTEXIMAGEEXTPROC)glXGetProcAddress((GLubyte *) "glXBindTexImageEXT"); if (!glXReleaseTexImageEXT) -@@ -230,13 +223,6 @@ void CVDPAU::Close() - XFreePixmap(m_Display, m_Pixmap); - m_Pixmap = NULL; +@@ -150,6 +143,9 @@ + } } + ++ if (!m_dllAvUtil.Load()) ++ return false; ++ + InitVDPAUProcs(); + + if (vdp_device != VDP_INVALID_HANDLE) +@@ -184,13 +180,14 @@ + } + + InitCSCMatrix(avctx->height); +- MakePixmap(avctx->width,avctx->height); + + /* finally setup ffmpeg */ + avctx->get_buffer = CVDPAU::FFGetBuffer; + avctx->release_buffer = CVDPAU::FFReleaseBuffer; + avctx->draw_horiz_band = CVDPAU::FFDrawSlice; + avctx->slice_flags=SLICE_FLAG_CODED_ORDER|SLICE_FLAG_ALLOW_FIELD; ++ ++ g_Windowing.Register(this); + return true; + } + return false; +@@ -208,26 +205,8 @@ + FiniVDPAUOutput(); + FiniVDPAUProcs(); + +- if (m_glPixmap) +- { +- CLog::Log(LOGINFO, "GLX: Destroying glPixmap"); +- glXReleaseTexImageEXT(m_Display, m_glPixmap, GLX_FRONT_LEFT_EXT); +- glXDestroyPixmap(m_Display, m_glPixmap); +- m_glPixmap = NULL; +- } +- if (m_Pixmap) +- { +- CLog::Log(LOGINFO, "GLX: Destroying XPixmap"); +- XFreePixmap(m_Display, m_Pixmap); +- m_Pixmap = NULL; +- } - - if (m_glContext) - { @@ -965,10 +112,12 @@ index cb2aaac..814c05c 100644 - glXDestroyContext(m_Display, m_glContext); - m_glContext = NULL; - } ++ g_Windowing.Unregister(this); ++ m_dllAvUtil.Unload(); } bool CVDPAU::MakePixmapGL() -@@ -284,36 +270,9 @@ bool CVDPAU::MakePixmapGL() +@@ -275,36 +254,9 @@ XFree(fbConfigs); return false; } @@ -1005,7 +154,109 @@ index cb2aaac..814c05c 100644 } bool CVDPAU::MakePixmap(int width, int height) -@@ -798,17 +757,26 @@ void CVDPAU::InitVDPAUProcs() +@@ -363,6 +315,13 @@ + + void CVDPAU::BindPixmap() + { ++ CSharedLock lock(m_DecoderSection); ++ ++ { CSharedLock dLock(m_DisplaySection); ++ if (m_DisplayState != VDPAU_OPEN) ++ return; ++ } ++ + if (m_glPixmap) + { + if(presentSurface != VDP_INVALID_HANDLE) +@@ -389,6 +348,13 @@ + + void CVDPAU::ReleasePixmap() + { ++ CSharedLock lock(m_DecoderSection); ++ ++ { CSharedLock dLock(m_DisplaySection); ++ if (m_DisplayState != VDPAU_OPEN) ++ return; ++ } ++ + if (m_glPixmap) + { + glXReleaseTexImageEXT(m_Display, m_glPixmap, GLX_FRONT_LEFT_EXT); +@@ -396,22 +362,67 @@ + else CLog::Log(LOGERROR,"(VDPAU) ReleasePixmap called without valid pixmap"); + } + +-bool CVDPAU::CheckRecover(bool force) ++void CVDPAU::OnLostDevice() + { +- if (recover || force) ++ CLog::Log(LOGNOTICE,"CVDPAU::OnLostDevice event"); ++ ++ { CExclusiveLock lock(m_DecoderSection); ++ FiniVDPAUOutput(); ++ FiniVDPAUProcs(); ++ } ++ ++ CExclusiveLock lock(m_DisplaySection); ++ m_DisplayState = VDPAU_LOST; ++ m_DisplayEvent.Reset(); ++} ++ ++void CVDPAU::OnResetDevice() ++{ ++ CLog::Log(LOGNOTICE,"CVDPAU::OnResetDevice event"); ++ ++ CExclusiveLock lock(m_DisplaySection); ++ if (m_DisplayState == VDPAU_LOST) ++ { ++ m_DisplayState = VDPAU_RESET; ++ m_DisplayEvent.Set(); ++ } ++} ++ ++int CVDPAU::Check(AVCodecContext* avctx) ++{ ++ EDisplayState state; ++ ++ { CSharedLock lock(m_DisplaySection); ++ state = m_DisplayState; ++ } ++ ++ if (state == VDPAU_LOST) ++ { ++ CLog::Log(LOGNOTICE,"CVDPAU::Check waiting for display reset event"); ++ if (!m_DisplayEvent.WaitMSec(2000)) ++ { ++ CLog::Log(LOGERROR, "CVDPAU::Check - device didn't reset in reasonable time"); ++ return VC_ERROR; ++ } ++ { CSharedLock lock(m_DisplaySection); ++ state = m_DisplayState; ++ } ++ } ++ if (state == VDPAU_RESET) + { + CLog::Log(LOGNOTICE,"Attempting recovery"); + ++ CSingleLock gLock(g_graphicsContext); ++ CExclusiveLock lock(m_DecoderSection); ++ + FiniVDPAUOutput(); + FiniVDPAUProcs(); + +- recover = false; +- + InitVDPAUProcs(); + +- return true; ++ return VC_FLUSHED; + } +- return false; ++ return 0; + } + + bool CVDPAU::IsVDPAUFormat(PixelFormat format) +@@ -746,14 +757,35 @@ #undef VDP_PROC @@ -1013,9 +264,20 @@ index cb2aaac..814c05c 100644 - &VDPPreemptionCallbackFunction, - (void*)this); - CheckStatus(vdp_st, __LINE__); -- - CSingleLock lock(m_DisplaySection); - m_DisplayState = VDPAU_OPEN; ++ // set all vdpau resources to invalid ++ vdp_flip_target = VDP_INVALID_HANDLE; ++ vdp_flip_queue = VDP_INVALID_HANDLE; ++ videoMixer = VDP_INVALID_HANDLE; ++ totalAvailableOutputSurfaces = 0; ++ presentSurface = VDP_INVALID_HANDLE; ++ outputSurface = VDP_INVALID_HANDLE; ++ for (int i = 0; i < NUM_OUTPUT_SURFACES; i++) ++ outputSurfaces[i] = VDP_INVALID_HANDLE; ++ ++ m_vdpauOutputMethod = OUTPUT_NONE; ++ ++ CExclusiveLock lock(m_DisplaySection); ++ m_DisplayState = VDPAU_OPEN; + vdpauConfigured = false; } @@ -1030,14 +292,20 @@ index cb2aaac..814c05c 100644 + render->bitstream_buffers_allocated = 0; + free(render); + } -+ -+ while (!m_DVDVideoPics.empty()) -+ m_DVDVideoPics.pop(); + if (vdp_device == VDP_INVALID_HANDLE) return; VdpStatus vdp_st; -@@ -841,15 +809,18 @@ void CVDPAU::FiniVDPAUOutput() +@@ -779,6 +811,8 @@ + + void CVDPAU::FiniVDPAUOutput() + { ++ FiniOutputMethod(); ++ + if (vdp_device == VDP_INVALID_HANDLE || !vdpauConfigured) return; + + CLog::Log(LOGNOTICE, " (VDPAU) %s", __FUNCTION__); +@@ -786,40 +820,23 @@ VdpStatus vdp_st; vdp_st = vdp_decoder_destroy(decoder); @@ -1046,42 +314,33 @@ index cb2aaac..814c05c 100644 + return; decoder = VDP_INVALID_HANDLE; - vdp_st = vdp_presentation_queue_destroy(vdp_flip_queue); +- vdp_st = vdp_presentation_queue_destroy(vdp_flip_queue); - CheckStatus(vdp_st, __LINE__); -+ if (CheckStatus(vdp_st, __LINE__)) -+ return; - vdp_flip_queue = VDP_INVALID_HANDLE; - - vdp_st = vdp_presentation_queue_target_destroy(vdp_flip_target); +- vdp_flip_queue = VDP_INVALID_HANDLE; +- +- vdp_st = vdp_presentation_queue_target_destroy(vdp_flip_target); - CheckStatus(vdp_st, __LINE__); -+ if (CheckStatus(vdp_st, __LINE__)) -+ return; - vdp_flip_target = VDP_INVALID_HANDLE; - - outputSurface = presentSurface = VDP_INVALID_HANDLE; -@@ -857,23 +828,30 @@ void CVDPAU::FiniVDPAUOutput() - for (int i = 0; i < totalAvailableOutputSurfaces; i++) - { - vdp_st = vdp_output_surface_destroy(outputSurfaces[i]); -- CheckStatus(vdp_st, __LINE__); -+ if (CheckStatus(vdp_st, __LINE__)) -+ return; - outputSurfaces[i] = VDP_INVALID_HANDLE; - } - - vdp_st = vdp_video_mixer_destroy(videoMixer); -- CheckStatus(vdp_st, __LINE__); -+ if (CheckStatus(vdp_st, __LINE__)) -+ return; - videoMixer = VDP_INVALID_HANDLE; - -- for(unsigned int i = 0; i < m_videoSurfaces.size(); i++) +- vdp_flip_target = VDP_INVALID_HANDLE; +- +- outputSurface = presentSurface = VDP_INVALID_HANDLE; +- +- for (int i = 0; i < totalAvailableOutputSurfaces; i++) + while (!m_videoSurfaces.empty()) { +- vdp_st = vdp_output_surface_destroy(outputSurfaces[i]); +- CheckStatus(vdp_st, __LINE__); +- outputSurfaces[i] = VDP_INVALID_HANDLE; +- } +- +- vdp_st = vdp_video_mixer_destroy(videoMixer); +- CheckStatus(vdp_st, __LINE__); +- videoMixer = VDP_INVALID_HANDLE; +- +- for(unsigned int i = 0; i < m_videoSurfaces.size(); i++) +- { - vdp_st = vdp_video_surface_destroy(m_videoSurfaces[i]->surface); - CheckStatus(vdp_st, __LINE__); - m_videoSurfaces[i]->surface = VDP_INVALID_HANDLE; -- m_dllAvUtil.av_freep(&m_videoSurfaces[i]->bitstream_buffers); - free(m_videoSurfaces[i]); + vdpau_render_state *render = m_videoSurfaces.back(); + m_videoSurfaces.pop_back(); @@ -1095,17 +354,35 @@ index cb2aaac..814c05c 100644 + return; } - m_videoSurfaces.clear(); -+ - while (!m_DVDVideoPics.empty()) - m_DVDVideoPics.pop(); +- while (!m_DVDVideoPics.empty()) +- m_DVDVideoPics.pop(); } -@@ -947,17 +925,20 @@ bool CVDPAU::ConfigVDPAU(AVCodecContext* avctx, int ref_frames) + + +@@ -891,17 +908,37 @@ vid_height, max_references, &decoder); - CHECK_VDPAU_RETURN(vdp_st, false); + if (CheckStatus(vdp_st, __LINE__)) + return false; ++ ++ m_vdpauOutputMethod = OUTPUT_NONE; ++ ++ vdpauConfigured = true; ++ return true; ++} ++ ++bool CVDPAU::ConfigOutputMethod(AVCodecContext *avctx, AVFrame *pFrame) ++{ ++ VdpStatus vdp_st; ++ ++ if (m_vdpauOutputMethod == OUTPUT_PIXMAP) ++ return true; ++ ++ FiniOutputMethod(); ++ ++ MakePixmap(avctx->width,avctx->height); vdp_st = vdp_presentation_queue_target_create_x11(vdp_device, m_Pixmap, //x_window, @@ -1123,7 +400,7 @@ index cb2aaac..814c05c 100644 totalAvailableOutputSurfaces = 0; -@@ -973,7 +954,8 @@ bool CVDPAU::ConfigVDPAU(AVCodecContext* avctx, int ref_frames) +@@ -917,7 +954,8 @@ OutWidth, OutHeight, &outputSurfaces[i]); @@ -1133,412 +410,14 @@ index cb2aaac..814c05c 100644 totalAvailableOutputSurfaces++; } CLog::Log(LOGNOTICE, " (VDPAU) Total Output Surfaces Available: %i of a max (tmp: %i const: %i)", -@@ -983,8 +965,10 @@ bool CVDPAU::ConfigVDPAU(AVCodecContext* avctx, int ref_frames) - - surfaceNum = presentSurfaceNum = 0; - outputSurface = outputSurfaces[surfaceNum]; -+ outputSurface = presentSurface = VDP_INVALID_HANDLE; -+ videoMixer = VDP_INVALID_HANDLE; - --vdpauConfigured = true; -+ vdpauConfigured = true; - return true; - } - -@@ -1152,7 +1136,7 @@ void CVDPAU::FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic) - } - if (!found) - { -- CLog::Log(LOGDEBUG, "CVDPAU::FFReleaseBuffer - buffer not found"); -+ CLog::Log(LOGDEBUG, "CVDPAU::FFReleaseBuffer - ignoring invalid buffer"); - return; - } - -@@ -1190,6 +1174,22 @@ void CVDPAU::FFDrawSlice(struct AVCodecContext *s, - return; - } - -+ // ffmpeg vc-1 decoder does not flush, make sure the data buffer is still valid -+ bool found(false); -+ for(unsigned int i = 0; i < vdp->m_videoSurfaces.size(); ++i) -+ { -+ if(vdp->m_videoSurfaces[i] == render) -+ { -+ found = true; -+ break; -+ } -+ } -+ if (!found) -+ { -+ CLog::Log(LOGWARNING, "CVDPAU::FFDrawSlice - ignoring invalid buffer"); -+ return; -+ } -+ - uint32_t max_refs = 0; - if(s->pix_fmt == PIX_FMT_VDPAU_H264) - max_refs = render->info.h264.num_ref_frames; -@@ -1250,6 +1250,22 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) - if(!render) - return VC_ERROR; - -+ // ffmpeg vc-1 decoder does not flush, make sure the data buffer is still valid -+ bool found(false); -+ for(unsigned int i = 0; i < m_videoSurfaces.size(); ++i) -+ { -+ if(m_videoSurfaces[i] == render) -+ { -+ found = true; -+ break; -+ } -+ } -+ if (!found) -+ { -+ CLog::Log(LOGWARNING, "CVDPAU::Decode - ignoring invalid buffer"); -+ return VC_BUFFER; -+ } -+ - render->state |= FF_VDPAU_STATE_USED_FOR_RENDER; - - ClearUsedForRender(&past[0]); -@@ -1464,35 +1480,19 @@ void CVDPAU::Present() - CheckStatus(vdp_st, __LINE__); - } - --void CVDPAU::VDPPreemptionCallbackFunction(VdpDevice device, void* context) --{ -- CLog::Log(LOGDEBUG,"VDPAU Device Preempted - attempting recovery"); -- CVDPAU* pCtx = (CVDPAU*)context; -- -- { CSingleLock lock(pCtx->m_DisplaySection); -- if(pCtx->m_DisplayState == VDPAU_OPEN) -- pCtx->m_DisplayState = VDPAU_RESET; -- } --} -- - bool CVDPAU::CheckStatus(VdpStatus vdp_st, int line) - { - CSingleLock lock(m_DisplaySection); - -- if (vdp_st == VDP_STATUS_HANDLE_DEVICE_MISMATCH -- || vdp_st == VDP_STATUS_DISPLAY_PREEMPTED) -- if(m_DisplayState == VDPAU_OPEN) -- m_DisplayState = VDPAU_RESET; -- -- // no need to log errors about this case, as it will happen on cleanup -- if (vdp_st == VDP_STATUS_INVALID_HANDLE && (m_DisplayState != VDPAU_OPEN) && vdpauConfigured) -- return false; -- - if (vdp_st != VDP_STATUS_OK) - { - CLog::Log(LOGERROR, " (VDPAU) Error: %s(%d) at %s:%d\n", vdp_get_error_string(vdp_st), vdp_st, __FILE__, line); -+ -+ vdp_device = VDP_INVALID_HANDLE; -+ - if(m_DisplayState == VDPAU_OPEN) - m_DisplayState = VDPAU_RESET; -+ - return true; - } - return false; -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index d10d845..868ca60 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -@@ -87,7 +87,6 @@ public: - PFNGLXRELEASETEXIMAGEEXTPROC glXReleaseTexImageEXT; - GLXPixmap m_glPixmap; - Pixmap m_Pixmap; -- GLXContext m_glContext; - - static void FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic); - static void FFDrawSlice(struct AVCodecContext *s, -@@ -95,8 +94,6 @@ public: - int y, int type, int height); - static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic); - -- static void VDPPreemptionCallbackFunction(VdpDevice device, void* context); -- - void Present(); - bool ConfigVDPAU(AVCodecContext *avctx, int ref_frames); - void SpewHardwareAvailable(); --- -1.7.5.4 - - -From ad1dfc3aefe71075185cd8aaec5639b4af4de390 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sat, 22 Oct 2011 10:31:47 +0200 -Subject: [PATCH 5/6] LinuxRendererGL: call glFinish in uninit - ---- - xbmc/cores/VideoRenderers/LinuxRendererGL.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -index 0e247aa..4c736bf 100644 ---- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp -@@ -1049,6 +1049,8 @@ void CLinuxRendererGL::UnInit() - CLog::Log(LOGDEBUG, "LinuxRendererGL: Cleaning up GL resources"); - CSingleLock lock(g_graphicsContext); - -+ glFinish(); -+ - if (m_rgbPbo) - { - glDeleteBuffersARB(1, &m_rgbPbo); --- -1.7.5.4 - - -From e80b167c14fd96065ce40ac588772582788d8e93 Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Sat, 22 Oct 2011 14:49:40 +0200 -Subject: [PATCH 6/6] vdpau: change order of creation/clear down of pixmap and - presentation queue - ---- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp | 197 ++++++++++++++++-------- - xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h | 17 ++- - xbmc/windowing/X11/WinSystemX11.cpp | 6 +- - 3 files changed, 152 insertions(+), 68 deletions(-) - -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -index 814c05c..c10c5b8 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp -@@ -89,7 +89,6 @@ CVDPAU::CVDPAU() - m_DisplayState = VDPAU_OPEN; - m_mixerfield = VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME; - m_mixerstep = 0; -- m_DisplayState = VDPAU_OPEN; - - m_glPixmap = 0; - m_Pixmap = 0; -@@ -181,7 +180,6 @@ bool CVDPAU::Open(AVCodecContext* avctx, const enum PixelFormat, unsigned int su - } - - InitCSCMatrix(avctx->height); -- MakePixmap(avctx->width,avctx->height); - - /* finally setup ffmpeg */ - avctx->get_buffer = CVDPAU::FFGetBuffer; -@@ -209,20 +207,6 @@ void CVDPAU::Close() - - g_Windowing.Unregister(this); - m_dllAvUtil.Unload(); -- -- if (m_glPixmap) -- { -- CLog::Log(LOGINFO, "GLX: Destroying glPixmap"); -- glXReleaseTexImageEXT(m_Display, m_glPixmap, GLX_FRONT_LEFT_EXT); -- glXDestroyPixmap(m_Display, m_glPixmap); -- m_glPixmap = NULL; -- } -- if (m_Pixmap) -- { -- CLog::Log(LOGINFO, "GLX: Destroying XPixmap"); -- XFreePixmap(m_Display, m_Pixmap); -- m_Pixmap = NULL; -- } - } - - bool CVDPAU::MakePixmapGL() -@@ -331,7 +315,9 @@ bool CVDPAU::MakePixmap(int width, int height) - - void CVDPAU::BindPixmap() - { -- { CSingleLock lock(m_DisplaySection); -+ CSharedLock lock(m_DecoderSection); -+ -+ { CSharedLock dLock(m_DisplaySection); - if (m_DisplayState != VDPAU_OPEN) - return; - } -@@ -362,7 +348,9 @@ void CVDPAU::BindPixmap() - - void CVDPAU::ReleasePixmap() - { -- { CSingleLock lock(m_DisplaySection); -+ CSharedLock lock(m_DecoderSection); -+ -+ { CSharedLock dLock(m_DisplaySection); - if (m_DisplayState != VDPAU_OPEN) - return; - } -@@ -376,15 +364,23 @@ void CVDPAU::ReleasePixmap() - - void CVDPAU::OnLostDevice() - { -- CSingleLock lock(m_DisplaySection); -+ CLog::Log(LOGNOTICE,"CVDPAU::OnLostDevice event"); -+ -+ { CExclusiveLock lock(m_DecoderSection); -+ FiniVDPAUOutput(); -+ FiniVDPAUProcs(); -+ } -+ -+ CExclusiveLock lock(m_DisplaySection); - m_DisplayState = VDPAU_LOST; - m_DisplayEvent.Reset(); - } - - void CVDPAU::OnResetDevice() - { -- CSingleLock lock(m_DisplaySection); -+ CLog::Log(LOGNOTICE,"CVDPAU::OnResetDevice event"); - -+ CExclusiveLock lock(m_DisplaySection); - if (m_DisplayState == VDPAU_LOST) - { - m_DisplayState = VDPAU_RESET; -@@ -396,18 +392,19 @@ int CVDPAU::Check(AVCodecContext* avctx) - { - EDisplayState state; - -- { CSingleLock lock(m_DisplaySection); -+ { CSharedLock lock(m_DisplaySection); - state = m_DisplayState; - } - - if (state == VDPAU_LOST) - { -+ CLog::Log(LOGNOTICE,"CVDPAU::Check waiting for display reset event"); - if (!m_DisplayEvent.WaitMSec(2000)) - { - CLog::Log(LOGERROR, "CVDPAU::Check - device didn't reset in reasonable time"); - return VC_ERROR; - } -- { CSingleLock lock(m_DisplaySection); -+ { CSharedLock lock(m_DisplaySection); - state = m_DisplayState; - } - } -@@ -415,6 +412,9 @@ int CVDPAU::Check(AVCodecContext* avctx) - { - CLog::Log(LOGNOTICE,"Attempting recovery"); - -+ CSingleLock gLock(g_graphicsContext); -+ CExclusiveLock lock(m_DecoderSection); -+ - FiniVDPAUOutput(); - FiniVDPAUProcs(); - -@@ -757,7 +757,19 @@ void CVDPAU::InitVDPAUProcs() - - #undef VDP_PROC - -- CSingleLock lock(m_DisplaySection); -+ // set all vdpau resources to invalid -+ vdp_flip_target = VDP_INVALID_HANDLE; -+ vdp_flip_queue = VDP_INVALID_HANDLE; -+ videoMixer = VDP_INVALID_HANDLE; -+ totalAvailableOutputSurfaces = 0; -+ presentSurface = VDP_INVALID_HANDLE; -+ outputSurface = VDP_INVALID_HANDLE; -+ for (int i = 0; i < NUM_OUTPUT_SURFACES; i++) -+ outputSurfaces[i] = VDP_INVALID_HANDLE; -+ -+ m_vdpauOutputMethod = OUTPUT_NONE; -+ -+ CExclusiveLock lock(m_DisplaySection); - m_DisplayState = VDPAU_OPEN; - vdpauConfigured = false; - } -@@ -774,9 +786,6 @@ void CVDPAU::FiniVDPAUProcs() - free(render); - } - -- while (!m_DVDVideoPics.empty()) -- m_DVDVideoPics.pop(); -- - if (vdp_device == VDP_INVALID_HANDLE) return; - - VdpStatus vdp_st; -@@ -802,6 +811,8 @@ void CVDPAU::InitCSCMatrix(int Height) - - void CVDPAU::FiniVDPAUOutput() - { -+ FiniOutputMethod(); -+ - if (vdp_device == VDP_INVALID_HANDLE || !vdpauConfigured) return; - - CLog::Log(LOGNOTICE, " (VDPAU) %s", __FUNCTION__); -@@ -813,31 +824,6 @@ void CVDPAU::FiniVDPAUOutput() - return; - decoder = VDP_INVALID_HANDLE; - -- vdp_st = vdp_presentation_queue_destroy(vdp_flip_queue); -- if (CheckStatus(vdp_st, __LINE__)) -- return; -- vdp_flip_queue = VDP_INVALID_HANDLE; -- -- vdp_st = vdp_presentation_queue_target_destroy(vdp_flip_target); -- if (CheckStatus(vdp_st, __LINE__)) -- return; -- vdp_flip_target = VDP_INVALID_HANDLE; -- -- outputSurface = presentSurface = VDP_INVALID_HANDLE; -- -- for (int i = 0; i < totalAvailableOutputSurfaces; i++) -- { -- vdp_st = vdp_output_surface_destroy(outputSurfaces[i]); -- if (CheckStatus(vdp_st, __LINE__)) -- return; -- outputSurfaces[i] = VDP_INVALID_HANDLE; -- } -- -- vdp_st = vdp_video_mixer_destroy(videoMixer); -- if (CheckStatus(vdp_st, __LINE__)) -- return; -- videoMixer = VDP_INVALID_HANDLE; -- - while (!m_videoSurfaces.empty()) - { - vdpau_render_state *render = m_videoSurfaces.back(); -@@ -851,9 +837,6 @@ void CVDPAU::FiniVDPAUOutput() - if (CheckStatus(vdp_st, __LINE__)) - return; - } -- -- while (!m_DVDVideoPics.empty()) -- m_DVDVideoPics.pop(); - } - - -@@ -928,6 +911,23 @@ bool CVDPAU::ConfigVDPAU(AVCodecContext* avctx, int ref_frames) - if (CheckStatus(vdp_st, __LINE__)) - return false; - -+ m_vdpauOutputMethod = OUTPUT_NONE; -+ -+ vdpauConfigured = true; -+ return true; -+} -+ -+bool CVDPAU::ConfigOutputMethod(AVCodecContext *avctx, AVFrame *pFrame) -+{ -+ VdpStatus vdp_st; -+ -+ if (m_vdpauOutputMethod == OUTPUT_PIXMAP) -+ return true; -+ -+ FiniOutputMethod(); -+ -+ MakePixmap(avctx->width,avctx->height); -+ - vdp_st = vdp_presentation_queue_target_create_x11(vdp_device, - m_Pixmap, //x_window, - &vdp_flip_target); -@@ -964,11 +964,67 @@ bool CVDPAU::ConfigVDPAU(AVCodecContext* avctx, int ref_frames) +@@ -926,9 +964,67 @@ NUM_OUTPUT_SURFACES); surfaceNum = presentSurfaceNum = 0; - outputSurface = outputSurfaces[surfaceNum]; - outputSurface = presentSurface = VDP_INVALID_HANDLE; - videoMixer = VDP_INVALID_HANDLE; - -- vdpauConfigured = true; ++ outputSurface = presentSurface = VDP_INVALID_HANDLE; ++ videoMixer = VDP_INVALID_HANDLE; ++ + m_vdpauOutputMethod = OUTPUT_PIXMAP; + + return true; @@ -1596,56 +475,140 @@ index 814c05c..c10c5b8 100644 + + while (!m_DVDVideoPics.empty()) + m_DVDVideoPics.pop(); -+ + +-vdpauConfigured = true; return true; } -@@ -1029,7 +1085,9 @@ int CVDPAU::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic) +@@ -989,10 +1085,14 @@ struct pictureAge* pA = &vdp->picAge; // while we are waiting to recover we can't do anything -- { CSingleLock lock(vdp->m_DisplaySection); +- if(vdp->recover) +- { +- CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - returning due to awaiting recovery"); +- return -1; + CSharedLock lock(vdp->m_DecoderSection); + + { CSharedLock dLock(vdp->m_DisplaySection); - if(vdp->m_DisplayState != VDPAU_OPEN) - { - CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - returning due to awaiting recovery"); -@@ -1114,6 +1172,8 @@ void CVDPAU::FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic) - vdpau_render_state * render; - unsigned int i; ++ if(vdp->m_DisplayState != VDPAU_OPEN) ++ { ++ CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - returning due to awaiting recovery"); ++ return -1; ++ } + } -+ CSharedLock lock(vdp->m_DecoderSection); + vdpau_render_state * render = NULL; +@@ -1015,6 +1115,11 @@ + VdpDecoderProfile profile; + ReadFormatOf(avctx->pix_fmt, profile, vdp->vdp_chroma_type); + render = (vdpau_render_state*)calloc(sizeof(vdpau_render_state), 1); ++ if (render == NULL) ++ { ++ CLog::Log(LOGWARNING, "CVDPAU::FFGetBuffer - calloc failed"); ++ return -1; ++ } + vdp_st = vdp->vdp_video_surface_create(vdp->vdp_device, + vdp->vdp_chroma_type, + avctx->width, +@@ -1062,19 +1167,40 @@ + void CVDPAU::FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic) + { + //CLog::Log(LOGNOTICE,"%s",__FUNCTION__); +- vdpau_render_state * render; +- int i; ++ CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque; ++ CVDPAU* vdp = (CVDPAU*)ctx->GetHardware(); ++ vdpau_render_state * render; ++ unsigned int i; + ++ CSharedLock lock(vdp->m_DecoderSection); + render=(vdpau_render_state*)pic->data[0]; if(!render) { -@@ -1152,11 +1212,14 @@ void CVDPAU::FFDrawSlice(struct AVCodecContext *s, +- CLog::Log(LOGERROR, "CVDPAU::FFDrawSlice - invalid context handle provided"); ++ CLog::Log(LOGERROR, "CVDPAU::FFReleaseBuffer - invalid context handle provided"); + return; + } + +- render->state &= ~FF_VDPAU_STATE_USED_FOR_REFERENCE; + for(i=0; i<4; i++) + pic->data[i]= NULL; ++ ++ // find render state in queue ++ bool found(false); ++ for(i = 0; i < vdp->m_videoSurfaces.size(); ++i) ++ { ++ if(vdp->m_videoSurfaces[i] == render) ++ { ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ { ++ CLog::Log(LOGDEBUG, "CVDPAU::FFReleaseBuffer - ignoring invalid buffer"); ++ return; ++ } ++ ++ render->state &= ~FF_VDPAU_STATE_USED_FOR_REFERENCE; + } + + +@@ -1085,9 +1211,14 @@ + CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)s->opaque; CVDPAU* vdp = (CVDPAU*)ctx->GetHardware(); - // while we are waiting to recover we can't do anything -- { CSingleLock lock(vdp->m_DisplaySection); +- /* while we are waiting to recover we can't do anything */ +- if(vdp->recover) +- return; ++ // while we are waiting to recover we can't do anything + CSharedLock lock(vdp->m_DecoderSection); + + { CSharedLock dLock(vdp->m_DisplaySection); - if(vdp->m_DisplayState != VDPAU_OPEN) - return; - } - ++ if(vdp->m_DisplayState != VDPAU_OPEN) ++ return; ++ } + + if(src->linesize[0] || src->linesize[1] || src->linesize[2] || offset[0] || offset[1] || offset[2]) - { -@@ -1216,6 +1279,8 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) +@@ -1106,6 +1237,22 @@ + return; + } + ++ // ffmpeg vc-1 decoder does not flush, make sure the data buffer is still valid ++ bool found(false); ++ for(unsigned int i = 0; i < vdp->m_videoSurfaces.size(); ++i) ++ { ++ if(vdp->m_videoSurfaces[i] == render) ++ { ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ { ++ CLog::Log(LOGWARNING, "CVDPAU::FFDrawSlice - ignoring invalid buffer"); ++ return; ++ } ++ + uint32_t max_refs = 0; + if(s->pix_fmt == PIX_FMT_VDPAU_H264) + max_refs = render->info.h264.num_ref_frames; +@@ -1132,12 +1279,19 @@ VdpStatus vdp_st; VdpTime time; +- if (CheckRecover(false)) +- return VC_FLUSHED; + CSharedLock lock(m_DecoderSection); + - int result = Check(avctx); - if (result) - return result; -@@ -1223,6 +1288,10 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) ++ int result = Check(avctx); ++ if (result) ++ return result; + if (!vdpauConfigured) return VC_ERROR; @@ -1656,56 +619,171 @@ index 814c05c..c10c5b8 100644 outputSurface = outputSurfaces[surfaceNum]; CheckFeatures(); -@@ -1419,7 +1488,9 @@ int CVDPAU::Decode(AVCodecContext *avctx, AVFrame *pFrame) +@@ -1165,6 +1319,22 @@ + if(!render) + return VC_ERROR; + ++ // ffmpeg vc-1 decoder does not flush, make sure the data buffer is still valid ++ bool found(false); ++ for(unsigned int i = 0; i < m_videoSurfaces.size(); ++i) ++ { ++ if(m_videoSurfaces[i] == render) ++ { ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ { ++ CLog::Log(LOGWARNING, "CVDPAU::Decode - ignoring invalid buffer"); ++ return VC_BUFFER; ++ } ++ + render->state |= FF_VDPAU_STATE_USED_FOR_RENDER; + + ClearUsedForRender(&past[0]); +@@ -1318,6 +1488,13 @@ bool CVDPAU::GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) { -- { CSingleLock lock(m_DisplaySection); + CSharedLock lock(m_DecoderSection); + + { CSharedLock dLock(m_DisplaySection); - if (m_DisplayState != VDPAU_OPEN) - return false; - } -@@ -1465,7 +1536,9 @@ void CVDPAU::Present() ++ if (m_DisplayState != VDPAU_OPEN) ++ return false; ++ } ++ + *picture = m_DVDVideoPics.front(); + // if this is the first field of an interlaced frame, we'll need + // this same picture for the second field later +@@ -1358,6 +1535,14 @@ + { //CLog::Log(LOGNOTICE,"%s",__FUNCTION__); VdpStatus vdp_st; - -- { CSingleLock lock(m_DisplaySection); ++ + CSharedLock lock(m_DecoderSection); + + { CSharedLock dLock(m_DisplaySection); - if (m_DisplayState != VDPAU_OPEN) - return; - } -@@ -1482,13 +1555,11 @@ void CVDPAU::Present() ++ if (m_DisplayState != VDPAU_OPEN) ++ return; ++ } ++ + presentSurface = outputSurface; + vdp_st = vdp_presentation_queue_display(vdp_flip_queue, +@@ -1368,27 +1553,17 @@ + CheckStatus(vdp_st, __LINE__); + } + +-void CVDPAU::VDPPreemptionCallbackFunction(VdpDevice device, void* context) +-{ +- CLog::Log(LOGERROR,"VDPAU Device Preempted - attempting recovery"); +- CVDPAU* pCtx = (CVDPAU*)context; +- pCtx->recover = true; +-} +- bool CVDPAU::CheckStatus(VdpStatus vdp_st, int line) { -- CSingleLock lock(m_DisplaySection); +- if (vdp_st == VDP_STATUS_HANDLE_DEVICE_MISMATCH +- || vdp_st == VDP_STATUS_DISPLAY_PREEMPTED) +- recover = true; +- +- // no need to log errors about this case, as it will happen on cleanup +- if (vdp_st == VDP_STATUS_INVALID_HANDLE && recover && vdpauConfigured) +- return false; - if (vdp_st != VDP_STATUS_OK) { CLog::Log(LOGERROR, " (VDPAU) Error: %s(%d) at %s:%d\n", vdp_get_error_string(vdp_st), vdp_st, __FILE__, line); - -- vdp_device = VDP_INVALID_HANDLE; +- recover = true; ++ + CExclusiveLock lock(m_DisplaySection); ++ ++ if(m_DisplayState == VDPAU_OPEN) ++ m_DisplayState = VDPAU_RESET; ++ + return true; + } + return false; +diff -Naur xbmc-b44b653/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h xbmc-b44b653.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +--- xbmc-b44b653/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2011-11-06 23:13:41.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h 2011-11-06 23:52:47.047193025 +0100 +@@ -21,6 +21,7 @@ + * + */ - if(m_DisplayState == VDPAU_OPEN) - m_DisplayState = VDPAU_RESET; -diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -index 868ca60..0686d98 100644 ---- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h -@@ -33,6 +33,7 @@ ++#include "DllAvUtil.h" + #include "DVDVideoCodec.h" + #include "DVDVideoCodecFFmpeg.h" + #include "libavcodec/vdpau.h" +@@ -32,7 +33,10 @@ #include #include #include "threads/CriticalSection.h" +#include "threads/SharedSection.h" #include "settings/VideoSettings.h" - #include "guilib/DispResource.h" - #include "threads/Event.h" -@@ -134,6 +135,8 @@ public: ++#include "guilib/DispResource.h" ++#include "threads/Event.h" + namespace Surface { class CSurface; } + + #define NUM_OUTPUT_SURFACES 4 +@@ -44,6 +48,7 @@ + + class CVDPAU + : public CDVDVideoCodecFFmpeg::IHardwareDecoder ++ , public IDispResource + { + public: + +@@ -69,13 +74,8 @@ + virtual void Reset(); + virtual void Close(); + +- virtual int Check(AVCodecContext* avctx) +- { +- if(CheckRecover(false)) +- return VC_FLUSHED; +- else +- return 0; +- } ++ virtual int Check(AVCodecContext* avctx); ++ + virtual const std::string Name() { return "vdpau"; } + + bool MakePixmap(int width, int height); +@@ -88,7 +88,6 @@ + PFNGLXRELEASETEXIMAGEEXTPROC glXReleaseTexImageEXT; + GLXPixmap m_glPixmap; + Pixmap m_Pixmap; +- GLXContext m_glContext; + + static void FFReleaseBuffer(AVCodecContext *avctx, AVFrame *pic); + static void FFDrawSlice(struct AVCodecContext *s, +@@ -96,15 +95,12 @@ + int y, int type, int height); + static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic); + +- static void VDPPreemptionCallbackFunction(VdpDevice device, void* context); +- + void Present(); + bool ConfigVDPAU(AVCodecContext *avctx, int ref_frames); + void SpewHardwareAvailable(); + void InitCSCMatrix(int Height); + bool CheckStatus(VdpStatus vdp_st, int line); + +- bool CheckRecover(bool force = false); + void CheckFeatures(); + void SetColor(); + void SetNoiseReduction(); +@@ -113,7 +109,6 @@ + void SetHWUpscaling(); + + pictureAge picAge; +- bool recover; + vdpau_render_state *past[2], *current, *future; + int tmpDeintMode, tmpDeintGUI, tmpDeint; + float tmpNoiseReduction, tmpSharpness; +@@ -140,6 +135,8 @@ void InitVDPAUProcs(); void FiniVDPAUProcs(); void FiniVDPAUOutput(); @@ -1714,10 +792,12 @@ index 868ca60..0686d98 100644 VdpDevice vdp_device; VdpGetProcAddress * vdp_get_proc_address; -@@ -223,6 +226,15 @@ public: - std::vector m_videoSurfaces; - DllAvUtil m_dllAvUtil; +@@ -227,4 +224,28 @@ + , VdpChromaType &chroma_type); + std::vector m_videoSurfaces; ++ DllAvUtil m_dllAvUtil; ++ + enum VDPAUOutputMethod + { + OUTPUT_NONE, @@ -1727,43 +807,351 @@ index 868ca60..0686d98 100644 + }; + VDPAUOutputMethod m_vdpauOutputMethod; + - // OnLostDevice triggers transition from all states to LOST - // internal errors trigger transition from OPEN to RESET - // OnResetDevice triggers transition from LOST to RESET -@@ -231,8 +243,9 @@ public: - , VDPAU_RESET - , VDPAU_LOST - } m_DisplayState; -- CCriticalSection m_DisplaySection; -- CEvent m_DisplayEvent; ++ // OnLostDevice triggers transition from all states to LOST ++ // internal errors trigger transition from OPEN to RESET ++ // OnResetDevice triggers transition from LOST to RESET ++ enum EDisplayState ++ { VDPAU_OPEN ++ , VDPAU_RESET ++ , VDPAU_LOST ++ } m_DisplayState; + CSharedSection m_DecoderSection; + CSharedSection m_DisplaySection; + CEvent m_DisplayEvent; - virtual void OnLostDevice(); - virtual void OnResetDevice(); ++ virtual void OnLostDevice(); ++ virtual void OnResetDevice(); }; -diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp -index ea20c0e..62cf554 100644 ---- a/xbmc/windowing/X11/WinSystemX11.cpp -+++ b/xbmc/windowing/X11/WinSystemX11.cpp -@@ -508,14 +508,14 @@ void CWinSystemX11::OnLostDevice() - { - CLog::Log(LOGDEBUG, "%s - notify display change event", __FUNCTION__); +diff -Naur xbmc-b44b653/xbmc/cores/VideoRenderers/BaseRenderer.h xbmc-b44b653.patch/xbmc/cores/VideoRenderers/BaseRenderer.h +--- xbmc-b44b653/xbmc/cores/VideoRenderers/BaseRenderer.h 2011-11-06 23:13:42.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/VideoRenderers/BaseRenderer.h 2011-11-06 23:52:47.047193025 +0100 +@@ -64,6 +64,7 @@ + float GetAspectRatio() const; + virtual bool AddVideoPicture(DVDVideoPicture* picture) { return false; } ++ virtual void Flush() {}; + + virtual unsigned int GetProcessorSize() { return 0; } + +diff -Naur xbmc-b44b653/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp xbmc-b44b653.patch/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +--- xbmc-b44b653/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2011-11-06 23:13:42.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp 2011-11-06 23:52:47.049193053 +0100 +@@ -554,6 +554,20 @@ + } + } + ++void CLinuxRendererGL::Flush() ++{ ++ if (!m_bValidated) ++ return; ++ ++ glFinish(); ++ ++ for (int i = 0 ; i < m_NumYV12Buffers ; i++) ++ (this->*m_textureDelete)(i); ++ ++ glFinish(); ++ m_bValidated = false; ++} ++ + void CLinuxRendererGL::Update(bool bPauseDrawing) + { + if (!m_bConfigured) return; +@@ -1035,6 +1049,8 @@ + CLog::Log(LOGDEBUG, "LinuxRendererGL: Cleaning up GL resources"); + CSingleLock lock(g_graphicsContext); + ++ glFinish(); ++ + if (m_rgbPbo) + { + glDeleteBuffersARB(1, &m_rgbPbo); +diff -Naur xbmc-b44b653/xbmc/cores/VideoRenderers/LinuxRendererGL.h xbmc-b44b653.patch/xbmc/cores/VideoRenderers/LinuxRendererGL.h +--- xbmc-b44b653/xbmc/cores/VideoRenderers/LinuxRendererGL.h 2011-11-06 23:13:42.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/VideoRenderers/LinuxRendererGL.h 2011-11-06 23:52:47.049193053 +0100 +@@ -140,6 +140,7 @@ + virtual unsigned int PreInit(); + virtual void UnInit(); + virtual void Reset(); /* resets renderer after seek for example */ ++ virtual void Flush(); + + #ifdef HAVE_LIBVDPAU + virtual void AddProcessor(CVDPAU* vdpau); +diff -Naur xbmc-b44b653/xbmc/cores/VideoRenderers/RenderManager.cpp xbmc-b44b653.patch/xbmc/cores/VideoRenderers/RenderManager.cpp +--- xbmc-b44b653/xbmc/cores/VideoRenderers/RenderManager.cpp 2011-11-06 23:13:42.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/VideoRenderers/RenderManager.cpp 2011-11-06 23:52:47.050193066 +0100 +@@ -337,6 +337,35 @@ + m_pRenderer->UnInit(); + } + ++bool CXBMCRenderManager::Flush() ++{ ++ if (!m_pRenderer) ++ return true; ++ ++ if (g_application.IsCurrentThread()) ++ { ++ CLog::Log(LOGDEBUG, "%s - flushing renderer", __FUNCTION__); ++ ++ CRetakeLock lock(m_sharedSection); ++ m_pRenderer->Flush(); ++ m_flushEvent.Set(); ++ } ++ else ++ { ++ ThreadMessage msg = {TMSG_RENDERER_FLUSH}; ++ m_flushEvent.Reset(); ++ g_application.getApplicationMessenger().SendMessage(msg, false); ++ if (!m_flushEvent.WaitMSec(1000)) ++ { ++ CLog::Log(LOGERROR, "%s - timed out waiting for renderer to flush", __FUNCTION__); ++ return false; ++ } ++ else ++ return true; ++ } ++ return true; ++} ++ + void CXBMCRenderManager::SetupScreenshot() + { + CSharedLock lock(m_sharedSection); +diff -Naur xbmc-b44b653/xbmc/cores/VideoRenderers/RenderManager.h xbmc-b44b653.patch/xbmc/cores/VideoRenderers/RenderManager.h +--- xbmc-b44b653/xbmc/cores/VideoRenderers/RenderManager.h 2011-11-06 23:13:41.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/cores/VideoRenderers/RenderManager.h 2011-11-06 23:52:47.050193066 +0100 +@@ -76,6 +76,7 @@ + void FlipPage(volatile bool& bStop, double timestamp = 0.0, int source = -1, EFIELDSYNC sync = FS_NONE); + unsigned int PreInit(); + void UnInit(); ++ bool Flush(); + + void AddOverlay(CDVDOverlay* o, double pts) + { +@@ -227,6 +228,7 @@ + EPRESENTSTEP m_presentstep; + int m_presentsource; + CEvent m_presentevent; ++ CEvent m_flushEvent; + + + OVERLAY::CRenderer m_overlays; +diff -Naur xbmc-b44b653/xbmc/guilib/DispResource.h xbmc-b44b653.patch/xbmc/guilib/DispResource.h +--- xbmc-b44b653/xbmc/guilib/DispResource.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/guilib/DispResource.h 2011-11-06 23:52:47.050193066 +0100 +@@ -0,0 +1,33 @@ ++/* ++* Copyright (C) 2005-2008 Team XBMC ++* http://www.xbmc.org ++* ++* This Program is free software; you can redistribute it and/or modify ++* it under the terms of the GNU General Public License as published by ++* the Free Software Foundation; either version 2, or (at your option) ++* any later version. ++* ++* This Program is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++* GNU General Public License for more details. ++* ++* You should have received a copy of the GNU General Public License ++* along with XBMC; see the file COPYING. If not, write to ++* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ++* http://www.gnu.org/copyleft/gpl.html ++* ++*/ ++ ++#pragma once ++ ++#ifdef HAS_GLX ++class IDispResource ++{ ++public: ++ virtual ~IDispResource() {}; ++ virtual void OnLostDevice() {}; ++ virtual void OnResetDevice() {}; ++}; ++ ++#endif +diff -Naur xbmc-b44b653/xbmc/windowing/X11/WinSystemX11.cpp xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11.cpp +--- xbmc-b44b653/xbmc/windowing/X11/WinSystemX11.cpp 2011-11-06 23:13:40.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11.cpp 2011-11-06 23:52:47.051193079 +0100 +@@ -27,9 +27,18 @@ + #include "WinSystemX11.h" + #include "settings/Settings.h" + #include "guilib/Texture.h" ++#include "guilib/DispResource.h" + #include "utils/log.h" + #include "XRandR.h" + #include ++#include "threads/SingleLock.h" ++#include ++#include "cores/VideoRenderers/RenderManager.h" ++#include "utils/TimeUtils.h" ++ ++#if defined(HAS_XRANDR) ++#include ++#endif + + using namespace std; + +@@ -42,6 +51,7 @@ + m_glWindow = 0; + m_wmWindow = 0; + m_bWasFullScreenBeforeMinimize = false; ++ m_dpyLostTime = 0; + } + + CWinSystemX11::~CWinSystemX11() +@@ -126,6 +136,13 @@ + SDL_WM_SetIcon(SDL_CreateRGBSurfaceFrom(iconTexture.GetPixels(), iconTexture.GetWidth(), iconTexture.GetHeight(), 32, iconTexture.GetPitch(), 0xff0000, 0x00ff00, 0x0000ff, 0xff000000L), NULL); + SDL_WM_SetCaption("XBMC Media Center", NULL); + ++ // register XRandR Events ++#if defined(HAS_XRANDR) ++ int iReturn; ++ XRRQueryExtension(m_dpy, &m_RREventBase, &iReturn); ++ XRRSelectInput(m_dpy, m_wmWindow, RRScreenChangeNotifyMask); ++#endif ++ + m_bWindowCreated = true; + return true; + } +@@ -175,7 +192,10 @@ + mode.id = res.strId; + + if(m_bFullScreen) ++ { ++ OnLostDevice(); + g_xrandr.SetMode(out, mode); ++ } + else + g_xrandr.RestoreState(); + #endif +@@ -444,4 +464,74 @@ + XSync(m_dpy, False); + return true; + } ++ ++void CWinSystemX11::CheckDisplayEvents() ++{ ++#if defined(HAS_XRANDR) ++ bool bGotEvent(false); ++ bool bTimeout(false); ++ XEvent Event; ++ while (XCheckTypedEvent(m_dpy, m_RREventBase + RRScreenChangeNotify, &Event)) ++ { ++ if (Event.type == m_RREventBase + RRScreenChangeNotify) ++ { ++ CLog::Log(LOGDEBUG, "%s: Received RandR event %i", __FUNCTION__, Event.type); ++ bGotEvent = true; ++ } ++ XRRUpdateConfiguration(&Event); ++ } ++ ++ // check fail safe timer ++ if (m_dpyLostTime && CurrentHostCounter() - m_dpyLostTime > (uint64_t)3 * CurrentHostFrequency()) ++ { ++ CLog::Log(LOGERROR, "%s - no display event after 3 seconds", __FUNCTION__); ++ bTimeout = true; ++ } ++ ++ if (bGotEvent || bTimeout) ++ { ++ CLog::Log(LOGDEBUG, "%s - notify display reset event", __FUNCTION__); ++ ++ CSingleLock lock(m_resourceSection); ++ ++ // tell any shared resources ++ for (vector::iterator i = m_resources.begin(); i != m_resources.end(); i++) ++ (*i)->OnResetDevice(); ++ ++ // reset fail safe timer ++ m_dpyLostTime = 0; ++ } ++#endif ++} ++ ++void CWinSystemX11::OnLostDevice() ++{ ++ CLog::Log(LOGDEBUG, "%s - notify display change event", __FUNCTION__); ++ + // make sure renderer has no invalid references + g_renderManager.Flush(); + - { CSingleLock lock(m_resourceSection); - for (vector::iterator i = m_resources.begin(); i != m_resources.end(); i++) - (*i)->OnLostDevice(); - } ++ { CSingleLock lock(m_resourceSection); ++ for (vector::iterator i = m_resources.begin(); i != m_resources.end(); i++) ++ (*i)->OnLostDevice(); ++ } ++ ++ // fail safe timer ++ m_dpyLostTime = CurrentHostCounter(); ++} ++ ++void CWinSystemX11::Register(IDispResource *resource) ++{ ++ CSingleLock lock(m_resourceSection); ++ m_resources.push_back(resource); ++} ++ ++void CWinSystemX11::Unregister(IDispResource* resource) ++{ ++ CSingleLock lock(m_resourceSection); ++ vector::iterator i = find(m_resources.begin(), m_resources.end(), resource); ++ if (i != m_resources.end()) ++ m_resources.erase(i); ++} ++ + #endif +diff -Naur xbmc-b44b653/xbmc/windowing/X11/WinSystemX11GL.cpp xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11GL.cpp +--- xbmc-b44b653/xbmc/windowing/X11/WinSystemX11GL.cpp 2011-11-06 23:13:40.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11GL.cpp 2011-11-06 23:52:47.051193079 +0100 +@@ -43,6 +43,8 @@ -- // make sure renderer has no invalid references -- g_renderManager.Flush(); -- - // fail safe timer - m_dpyLostTime = CurrentHostCounter(); - } --- -1.7.5.4 - + bool CWinSystemX11GL::PresentRenderImpl(const CDirtyRegionList& dirty) + { ++ CheckDisplayEvents(); ++ + if(m_iVSyncMode == 3) + { + glFinish(); +diff -Naur xbmc-b44b653/xbmc/windowing/X11/WinSystemX11.h xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11.h +--- xbmc-b44b653/xbmc/windowing/X11/WinSystemX11.h 2011-11-06 23:13:39.000000000 +0100 ++++ xbmc-b44b653.patch/xbmc/windowing/X11/WinSystemX11.h 2011-11-06 23:52:47.051193079 +0100 +@@ -26,6 +26,9 @@ + #include "windowing/WinSystem.h" + #include "utils/Stopwatch.h" + #include ++#include "threads/CriticalSection.h" ++ ++class IDispResource; + + class CWinSystemX11 : public CWinSystemBase + { +@@ -51,6 +54,8 @@ + virtual bool Restore() ; + virtual bool Hide(); + virtual bool Show(bool raise = true); ++ virtual void Register(IDispResource *resource); ++ virtual void Unregister(IDispResource *resource); + + // Local to WinSystemX11 only + Display* GetDisplay() { return m_dpy; } +@@ -58,6 +63,8 @@ + + protected: + bool RefreshGlxContext(); ++ void CheckDisplayEvents(); ++ void OnLostDevice(); + + SDL_Surface* m_SDLSurface; + GLXContext m_glContext; +@@ -65,6 +72,10 @@ + Window m_wmWindow; + Display* m_dpy; + bool m_bWasFullScreenBeforeMinimize; ++ int m_RREventBase; ++ CCriticalSection m_resourceSection; ++ std::vector m_resources; ++ uint64_t m_dpyLostTime; + + private: + bool IsSuitableVisual(XVisualInfo *vInfo); diff --git a/packages/mediacenter/xbmc/patches/xbmc-2884715-342-revert_ffmpeg_00d1e96bf4fc0467744f840fbc85d1a65cbb6f08.patch b/packages/mediacenter/xbmc/patches/xbmc-2884715-342-revert_ffmpeg_00d1e96bf4fc0467744f840fbc85d1a65cbb6f08.patch deleted file mode 100644 index 641471f691..0000000000 --- a/packages/mediacenter/xbmc/patches/xbmc-2884715-342-revert_ffmpeg_00d1e96bf4fc0467744f840fbc85d1a65cbb6f08.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -Naur xbmc-4c32cde/lib/ffmpeg/libavcodec/h264.c xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/h264.c ---- xbmc-4c32cde/lib/ffmpeg/libavcodec/h264.c 2011-10-28 15:29:40.000000000 +0200 -+++ xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/h264.c 2011-10-29 15:18:16.716609657 +0200 -@@ -1802,7 +1802,7 @@ - if(h->sps.frame_mbs_only_flag) - s->height= 16*s->mb_height - 2*FFMIN(h->sps.crop_bottom, 7); - else -- s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 7); -+ s->height= 16*s->mb_height - 4*FFMIN(h->sps.crop_bottom, 3); - - if (s->context_initialized - && ( s->width != s->avctx->width || s->height != s->avctx->height -diff -Naur xbmc-4c32cde/lib/ffmpeg/libavcodec/h264_ps.c xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/h264_ps.c ---- xbmc-4c32cde/lib/ffmpeg/libavcodec/h264_ps.c 2011-10-28 15:29:39.000000000 +0200 -+++ xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/h264_ps.c 2011-10-29 15:18:16.718609683 +0200 -@@ -374,7 +374,7 @@ - if(sps->crop_left || sps->crop_top){ - av_log(h->s.avctx, AV_LOG_ERROR, "insane cropping not completely supported, this could look slightly wrong ...\n"); - } -- if(sps->crop_right >= 8 || sps->crop_bottom >= 8){ -+ if(sps->crop_right >= 8 || sps->crop_bottom >= (8>> !sps->frame_mbs_only_flag)){ - av_log(h->s.avctx, AV_LOG_ERROR, "brainfart cropping not supported, this could look slightly wrong ...\n"); - } - }else{ -diff -Naur xbmc-4c32cde/lib/ffmpeg/libavcodec/mpegvideo.c xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/mpegvideo.c ---- xbmc-4c32cde/lib/ffmpeg/libavcodec/mpegvideo.c 2011-10-28 15:29:40.000000000 +0200 -+++ xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/mpegvideo.c 2011-10-29 15:18:16.719609696 +0200 -@@ -498,7 +498,7 @@ - - if(s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) - s->mb_height = (s->height + 31) / 32 * 2; -- else if (s->codec_id != CODEC_ID_H264) -+ else - s->mb_height = (s->height + 15) / 16; - - if(s->avctx->pix_fmt == PIX_FMT_NONE){ -diff -Naur xbmc-4c32cde/lib/ffmpeg/libavcodec/utils.c xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/utils.c ---- xbmc-4c32cde/lib/ffmpeg/libavcodec/utils.c 2011-10-28 15:29:41.000000000 +0200 -+++ xbmc-4c32cde.patch/lib/ffmpeg/libavcodec/utils.c 2011-10-29 15:18:16.721609720 +0200 -@@ -145,7 +145,7 @@ - case PIX_FMT_YUVA420P: - w_align= 16; //FIXME check for non mpeg style codecs and use less alignment - h_align= 16; -- if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP || s->codec_id == CODEC_ID_H264) -+ if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP) - h_align= 32; // interlaced is rounded up to 2 MBs - break; - case PIX_FMT_YUV411P: diff --git a/packages/multimedia/crystalhd/install b/packages/multimedia/crystalhd/install index 4015b22193..de76e3536b 100755 --- a/packages/multimedia/crystalhd/install +++ b/packages/multimedia/crystalhd/install @@ -24,19 +24,14 @@ VER=`ls $BUILD/linux*/modules/lib/modules` -mkdir -p $INSTALL/lib/firmware - cp $PKG_BUILD/firmware/fwbin/*/*.bin $INSTALL/lib/firmware +mkdir -p $INSTALL/usr/lib/firmware + cp $PKG_BUILD/firmware/fwbin/*/*.bin $INSTALL/usr/lib/firmware mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/linux_lib/libcrystalhd/*.so* $INSTALL/usr/lib -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/driver/linux/*.rules $INSTALL/lib/udev/rules.d +mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/driver/linux/*.rules $INSTALL/usr/lib/udev/rules.d mkdir -p $INSTALL/lib/modules/$VER/crystalhd cp $PKG_BUILD/driver/linux/crystalhd.ko $INSTALL/lib/modules/$VER/crystalhd - -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done diff --git a/packages/multimedia/crystalhd/meta b/packages/multimedia/crystalhd/meta index d2dd717cde..f3e3bb4152 100644 --- a/packages/multimedia/crystalhd/meta +++ b/packages/multimedia/crystalhd/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://code.google.com/p/crystalhd-for-osx/" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="linux" -PKG_BUILD_DEPENDS="toolchain busybox-hosttools linux" +PKG_BUILD_DEPENDS="toolchain linux" PKG_PRIORITY="optional" PKG_SECTION="multimedia" PKG_SHORTDESC="crystalhd: OSX and Linux driver and library support for the Broadcom Crystal HD Video Accelerator." diff --git a/packages/network/bluez/install b/packages/network/bluez/install index 19e4d5c3c0..ee8540ddfc 100755 --- a/packages/network/bluez/install +++ b/packages/network/bluez/install @@ -34,15 +34,15 @@ mkdir -p $INSTALL/etc/bluetooth mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/src/bluetooth.conf $INSTALL/etc/dbus-1/system.d -mkdir -p $INSTALL/lib/udev -# not needed: cp $PKG_BUILD/scripts/bluetooth_serial $INSTALL/lib/udev -# not needed: chmod +x $INSTALL/lib/udev/bluetooth_serial - cp $PKG_BUILD/tools/hid2hci $INSTALL/lib/udev +mkdir -p $INSTALL/usr/lib/udev +# not needed: cp $PKG_BUILD/scripts/bluetooth_serial $INSTALL/usr/lib/udev +# not needed: chmod +x $INSTALL/usr/lib/udev/bluetooth_serial + cp $PKG_BUILD/tools/hid2hci $INSTALL/usr/lib/udev -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/scripts/97-bluetooth.rules $INSTALL/lib/udev/rules.d -# todo: cp $PKG_BUILD/scripts/97-bluetooth-hid2hci.rules $INSTALL/lib/udev/rules.d -# not needed: cp $PKG_BUILD/scripts/97-bluetooth-serial.rules $INSTALL/lib/udev/rules.d +mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/scripts/97-bluetooth.rules $INSTALL/usr/lib/udev/rules.d +# todo: cp $PKG_BUILD/scripts/97-bluetooth-hid2hci.rules $INSTALL/usr/lib/udev/rules.d +# not needed: cp $PKG_BUILD/scripts/97-bluetooth-serial.rules $INSTALL/usr/lib/udev/rules.d mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/.libs/libbluetooth.so* $INSTALL/usr/lib diff --git a/packages/network/connman/build b/packages/network/connman/build index d91bd8074f..1015f250fb 100755 --- a/packages/network/connman/build +++ b/packages/network/connman/build @@ -22,8 +22,10 @@ . config/options $1 +export WPASUPPLICANT="/usr/bin/wpa_supplicant" + cd $PKG_BUILD -ac_cv_path_WPASUPPLICANT="/sbin/wpa_supplicant" \ +#ac_cv_path_WPASUPPLICANT="/sbin/wpa_supplicant" \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ diff --git a/packages/network/ethtool/install b/packages/network/ethtool/install index 59c3dd5651..dcd2fb7e72 100755 --- a/packages/network/ethtool/install +++ b/packages/network/ethtool/install @@ -25,5 +25,3 @@ mkdir -p $INSTALL/usr/sbin cp $PKG_BUILD/ethtool $INSTALL/usr/sbin -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_DIR/udev.d/*.rules $INSTALL/lib/udev/rules.d \ No newline at end of file diff --git a/packages/devel/usbmuxd/build b/packages/network/libgssglue/build similarity index 75% rename from packages/devel/usbmuxd/build rename to packages/network/libgssglue/build index cc77ea9b1c..863198b42a 100755 --- a/packages/devel/usbmuxd/build +++ b/packages/network/libgssglue/build @@ -23,17 +23,15 @@ . config/options $1 cd $PKG_BUILD - -# Set the owner of the device node to be usbmuxd - sed -i 's/ATTR{idVendor}=="05ac"/OWNER="root", ATTR{idVendor}=="05ac"/' udev/85-usbmuxd.rules.in - sed -i 's/-U usbmux/-U root/' udev/85-usbmuxd.rules.in - -mkdir -p build && cd build - -cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX="" \ - .. +ac_cv_func_realloc_0_nonnull=yes \ +ac_cv_func_malloc_0_nonnull=yes \ +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + --with-gnu-ld make $MAKEINSTALL diff --git a/packages/network/libgssglue/install b/packages/network/libgssglue/install new file mode 100755 index 0000000000..d4f74e8383 --- /dev/null +++ b/packages/network/libgssglue/install @@ -0,0 +1,26 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib diff --git a/packages/network/libgssglue/meta b/packages/network/libgssglue/meta new file mode 100644 index 0000000000..a1b011d49c --- /dev/null +++ b/packages/network/libgssglue/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="libgssglue" +PKG_VERSION="0.3" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/" +PKG_URL="http://www.citi.umich.edu/projects/nfsv4/linux/libgssglue/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="libgssglue: a library which exports a gssapi interface, but doesn't implement any gssapi mechanisms itself" +PKG_LONGDESC="libgssglue is a library which exports a gssapi interface, but doesn't implement any gssapi mechanisms itself; instead it calls gssapi routines in other libraries, depending on the mechanism." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/libnfs/meta b/packages/network/libnfs/meta index 4cd20ac533..576c4981ba 100644 --- a/packages/network/libnfs/meta +++ b/packages/network/libnfs/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="https://github.com/sahlberg/libnfs" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libtirpc" -PKG_BUILD_DEPENDS="toolchain libtirpc" +PKG_DEPENDS="rpcbind" +PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" PKG_SECTION="network" PKG_SHORTDESC="libnfs: a client library for accessing NFS shares over a network." diff --git a/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-007_fix_syslog_defines.patch b/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-007_fix_syslog_defines.patch new file mode 100644 index 0000000000..85517396e6 --- /dev/null +++ b/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-007_fix_syslog_defines.patch @@ -0,0 +1,24 @@ +--- a/src/shairport.h 2011-10-01 04:09:16.000000000 +0200 ++++ b/src/shairport.h 2011-11-07 18:05:05.000000000 +0100 +@@ -16,10 +16,17 @@ + + #define HWID_SIZE 6 + #define SHAIRPORT_LOG 1 +-#define LOG_INFO 1 +-#define LOG_DEBUG 5 +-#define LOG_DEBUG_V 6 +-#define LOG_DEBUG_VV 7 ++ ++#ifndef LOG_INFO ++#define LOG_INFO 5 ++#endif ++ ++#ifndef LOG_DEBUG ++#define LOG_DEBUG 6 ++#endif ++ ++#define LOG_DEBUG_V 7 ++#define LOG_DEBUG_VV 8 + + struct shairbuffer + { diff --git a/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-008_add_missing_libs.patch b/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-008_add_missing_libs.patch new file mode 100644 index 0000000000..d06abf20c1 --- /dev/null +++ b/packages/network/libshairport/patches/libshairport-1.2.0.20310_lib-008_add_missing_libs.patch @@ -0,0 +1,21 @@ +--- a/configure.in-org 2011-11-08 11:53:42.802419355 -0500 ++++ b/configure.in 2011-11-08 11:55:38.082419413 -0500 +@@ -11,8 +11,9 @@ AC_PROG_LIBTOOL + + # Checks for libraries. + #AC_CHECK_LIB([c], [main]) +-#AC_CHECK_LIB([m], [main]) ++AC_CHECK_LIB([m], [main]) + AC_CHECK_LIB([ssl], [main],, AC_MSG_ERROR($missing_library)) ++AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library)) + + OUTPUT_FILES="Makefile" +@@ -21,4 +22,4 @@ LIBDIR=$PREFIX + + AC_CONFIG_FILES([${OUTPUT_FILES}]) + AC_OUTPUT(Makefile src/Makefile) +-AC_OUTPUT +\ No newline at end of file ++AC_OUTPUT + diff --git a/packages/network/libssh/meta b/packages/network/libssh/meta index da304252f4..193cab4347 100644 --- a/packages/network/libssh/meta +++ b/packages/network/libssh/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libssh" -PKG_VERSION="0.5.0" +PKG_VERSION="0.5.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="OpenSource" diff --git a/packages/network/libtirpc/build b/packages/network/libtirpc/build new file mode 100755 index 0000000000..8ef956a03a --- /dev/null +++ b/packages/network/libtirpc/build @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + --enable-gss \ + --with-gnu-ld + +make +$MAKEINSTALL diff --git a/packages/network/libtirpc/install b/packages/network/libtirpc/install new file mode 100755 index 0000000000..fd9621cbc5 --- /dev/null +++ b/packages/network/libtirpc/install @@ -0,0 +1,30 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp $PKG_BUILD/src/.libs/*.so* $INSTALL/usr/lib + +mkdir -p $INSTALL/etc + cp $PKG_BUILD/doc/etc_netconfig $INSTALL/etc/netconfig + diff --git a/packages/devel/usbmuxd/meta b/packages/network/libtirpc/meta similarity index 67% rename from packages/devel/usbmuxd/meta rename to packages/network/libtirpc/meta index 663b7554b0..5f6309d7f4 100644 --- a/packages/devel/usbmuxd/meta +++ b/packages/network/libtirpc/meta @@ -18,19 +18,19 @@ # http://www.gnu.org/copyleft/gpl.html ################################################################################ -PKG_NAME="usbmuxd" -PKG_VERSION="1.0.6" +PKG_NAME="libtirpc" +PKG_VERSION="0.2.2" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" -PKG_SITE="http://marcansoft.com/uploads/" -PKG_URL="http://marcansoft.com/uploads/usbmuxd/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="libusb" -PKG_BUILD_DEPENDS="toolchain libusb" +PKG_SITE="https://sourceforge.net/projects/libtirpc/" +PKG_URL="https://downloads.sourceforge.net/project/libtirpc/libtirpc/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libgssglue" +PKG_BUILD_DEPENDS="toolchain libgssglue" PKG_PRIORITY="optional" -PKG_SECTION="devel" -PKG_SHORTDESC="usbmuxd: a daemon used for communicating with Apple's iPod Touch and iPhone devices." -PKG_LONGDESC="usbmuxd is a daemon used for communicating with Apple's iPod Touch and iPhone devices. It allows multiple services on the device to be accessed simultaneously." +PKG_SECTION="network" +PKG_SHORTDESC="libtirpc: Transport Independent RPC Library" +PKG_LONGDESC="Libtirpc is a port of Suns Transport-Independent RPC library to Linux. It's being developed by the Bull GNU/Linux NFSv4 project." PKG_IS_ADDON="no" -PKG_AUTORECONF="no" +PKG_AUTORECONF="yes" diff --git a/packages/network/libtirpc/patches/libtirpc-0.2.2-Delete_unused_local_variable.patch b/packages/network/libtirpc/patches/libtirpc-0.2.2-Delete_unused_local_variable.patch new file mode 100644 index 0000000000..88a3d9b026 --- /dev/null +++ b/packages/network/libtirpc/patches/libtirpc-0.2.2-Delete_unused_local_variable.patch @@ -0,0 +1,19 @@ +X-Git-Url: http://git.infradead.org + +diff --git a/src/rpc_soc.c b/src/rpc_soc.c +index c678429..63d2197 100644 +--- a/src/rpc_soc.c ++++ b/src/rpc_soc.c +@@ -560,12 +560,10 @@ clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz) + u_int recvsz; + { + struct netbuf *svcaddr; +- struct netconfig *nconf; + CLIENT *cl; + int len; + + cl = NULL; +- nconf = NULL; + svcaddr = NULL; + if (((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || + ((svcaddr->buf = malloc(sizeof(struct sockaddr_un))) == NULL)) { diff --git a/packages/network/libtirpc/patches/libtirpc-0.2.2-libtirpc-0.2.3rc1.patch b/packages/network/libtirpc/patches/libtirpc-0.2.2-libtirpc-0.2.3rc1.patch new file mode 100644 index 0000000000..d57a59e1f2 --- /dev/null +++ b/packages/network/libtirpc/patches/libtirpc-0.2.2-libtirpc-0.2.3rc1.patch @@ -0,0 +1,637 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index 7ee8cbc..6731ff9 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -50,7 +50,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_generic.c \ + svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c des_crypt.c ++ auth_time.c auth_des.c authdes_prot.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c +diff --git a/src/auth_des.c b/src/auth_des.c +index 37e7667..f0c8b8c 100644 +--- a/src/auth_des.c ++++ b/src/auth_des.c +@@ -223,6 +223,7 @@ authdes_pk_seccreate(const char *servername, netobj *pkey, u_int window, + goto failed; + } + ad->ad_nis_srvr = NULL; /* not needed any longer */ ++ auth_get(auth); /* Reference for caller */ + return (auth); + + failed: +@@ -472,6 +473,12 @@ authdes_destroy(AUTH *auth) + FREE(auth, sizeof(AUTH)); + } + ++static bool_t ++authdes_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authdes_ops(void) + { +@@ -487,6 +494,8 @@ authdes_ops(void) + ops.ah_validate = authdes_validate; + ops.ah_refresh = authdes_refresh; + ops.ah_destroy = authdes_destroy; ++ ops.ah_wrap = authdes_wrap; ++ ops.ah_unwrap = authdes_wrap; + } + mutex_unlock(&authdes_ops_lock); + return (&ops); +diff --git a/src/auth_gss.c b/src/auth_gss.c +index df3017a..a992049 100644 +--- a/src/auth_gss.c ++++ b/src/auth_gss.c +@@ -200,6 +200,8 @@ authgss_create(CLIENT *clnt, gss_name_t name, struct rpc_gss_sec *sec) + + if (!authgss_refresh(auth)) + auth = NULL; ++ else ++ auth_get(auth); /* Reference for caller */ + + clnt->cl_auth = save_auth; + +@@ -555,9 +557,20 @@ authgss_destroy_context(AUTH *auth) + + if (gd->gc.gc_ctx.length != 0) { + if (gd->established) { ++ AUTH *save_auth = NULL; ++ ++ /* Make sure we use the right auth_ops */ ++ if (gd->clnt->cl_auth != auth) { ++ save_auth = gd->clnt->cl_auth; ++ gd->clnt->cl_auth = auth; ++ } ++ + gd->gc.gc_proc = RPCSEC_GSS_DESTROY; + clnt_call(gd->clnt, NULLPROC, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_void, NULL, AUTH_TIMEOUT); ++ ++ if (save_auth != NULL) ++ gd->clnt->cl_auth = save_auth; + } + gss_release_buffer(&min_stat, &gd->gc.gc_ctx); + /* XXX ANDROS check size of context - should be 8 */ +diff --git a/src/auth_none.c b/src/auth_none.c +index a439ec6..008c589 100644 +--- a/src/auth_none.c ++++ b/src/auth_none.c +@@ -155,6 +155,12 @@ authnone_destroy(AUTH *client) + { + } + ++static bool_t ++authnone_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authnone_ops() + { +@@ -170,6 +176,8 @@ authnone_ops() + ops.ah_validate = authnone_validate; + ops.ah_refresh = authnone_refresh; + ops.ah_destroy = authnone_destroy; ++ ops.ah_wrap = authnone_wrap; ++ ops.ah_unwrap = authnone_wrap; + } + mutex_unlock(&ops_lock); + return (&ops); +diff --git a/src/auth_unix.c b/src/auth_unix.c +index c2469da..4b9b13f 100644 +--- a/src/auth_unix.c ++++ b/src/auth_unix.c +@@ -162,6 +162,7 @@ authunix_create(machname, uid, gid, len, aup_gids) + */ + auth->ah_cred = au->au_origcred; + marshal_new_auth(auth); ++ auth_get(auth); /* Reference for caller */ + return (auth); + #ifndef _KERNEL + cleanup_authunix_create: +@@ -396,6 +397,12 @@ marshal_new_auth(auth) + XDR_DESTROY(xdrs); + } + ++static bool_t ++authunix_wrap(AUTH *auth, XDR *xdrs, xdrproc_t xfunc, caddr_t xwhere) ++{ ++ return ((*xfunc)(xdrs, xwhere)); ++} ++ + static struct auth_ops * + authunix_ops() + { +@@ -411,6 +418,8 @@ authunix_ops() + ops.ah_validate = authunix_validate; + ops.ah_refresh = authunix_refresh; + ops.ah_destroy = authunix_destroy; ++ ops.ah_wrap = authunix_wrap; ++ ops.ah_unwrap = authunix_wrap; + } + mutex_unlock(&ops_lock); + return (&ops); +diff --git a/src/authgss_prot.c b/src/authgss_prot.c +index 9d7fa09..0168318 100644 +--- a/src/authgss_prot.c ++++ b/src/authgss_prot.c +@@ -161,6 +161,7 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, + databuflen = end - start - 4; + XDR_SETPOS(xdrs, start + 4); + databuf.value = XDR_INLINE(xdrs, databuflen); ++ databuf.length = databuflen; + + xdr_stat = FALSE; + +@@ -169,7 +170,6 @@ xdr_rpc_gss_wrap_data(XDR *xdrs, xdrproc_t xdr_func, caddr_t xdr_ptr, + XDR_SETPOS(xdrs, start); + if (!xdr_u_int(xdrs, (u_int *)&databuflen)) + return (FALSE); +- databuf.length = databuflen; + + /* Checksum rpc_gss_data_t. */ + maj_stat = gss_get_mic(&min_stat, ctx, qop, +diff --git a/src/clnt_dg.c b/src/clnt_dg.c +index 79fed5d..4a1f60a 100644 +--- a/src/clnt_dg.c ++++ b/src/clnt_dg.c +@@ -366,7 +366,7 @@ call_again: + + if ((! XDR_PUTINT32(xdrs, (int32_t *)&proc)) || + (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || +- (! (*xargs)(xdrs, argsp))) { ++ (! AUTH_WRAP(cl->cl_auth, xdrs, xargs, argsp))) { + cu->cu_error.re_status = RPC_CANTENCODEARGS; + goto out; + } +@@ -400,8 +400,8 @@ get_reply: + * (We assume that this is actually only executed once.) + */ + reply_msg.acpted_rply.ar_verf = _null_auth; +- reply_msg.acpted_rply.ar_results.where = resultsp; +- reply_msg.acpted_rply.ar_results.proc = xresults; ++ reply_msg.acpted_rply.ar_results.where = NULL; ++ reply_msg.acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; + + fd.fd = cu->cu_fd; + fd.events = POLLIN; +@@ -512,6 +512,10 @@ get_reply: + &reply_msg.acpted_rply.ar_verf)) { + cu->cu_error.re_status = RPC_AUTHERROR; + cu->cu_error.re_why = AUTH_INVALIDRESP; ++ } else if (! AUTH_UNWRAP(cl->cl_auth, &reply_xdrs, ++ xresults, resultsp)) { ++ if (cu->cu_error.re_status == RPC_SUCCESS) ++ cu->cu_error.re_status = RPC_CANTDECODERES; + } + if (reply_msg.acpted_rply.ar_verf.oa_base != NULL) { + xdrs->x_op = XDR_FREE; +diff --git a/src/clnt_vc.c b/src/clnt_vc.c +index 359063c..097cae8 100644 +--- a/src/clnt_vc.c ++++ b/src/clnt_vc.c +@@ -364,7 +364,7 @@ call_again: + if ((! XDR_PUTBYTES(xdrs, ct->ct_u.ct_mcallc, ct->ct_mpos)) || + (! XDR_PUTINT32(xdrs, (int32_t *)&proc)) || + (! AUTH_MARSHALL(cl->cl_auth, xdrs)) || +- (! (*xdr_args)(xdrs, args_ptr))) { ++ (! AUTH_WRAP(cl->cl_auth, xdrs, xdr_args, args_ptr))) { + if (ct->ct_error.re_status == RPC_SUCCESS) + ct->ct_error.re_status = RPC_CANTENCODEARGS; + (void)xdrrec_endofrecord(xdrs, TRUE); +@@ -420,7 +420,8 @@ call_again: + &reply_msg.acpted_rply.ar_verf)) { + ct->ct_error.re_status = RPC_AUTHERROR; + ct->ct_error.re_why = AUTH_INVALIDRESP; +- } else if (! (*xdr_results)(xdrs, results_ptr)) { ++ } else if (! AUTH_UNWRAP(cl->cl_auth, xdrs, ++ xdr_results, results_ptr)) { + if (ct->ct_error.re_status == RPC_SUCCESS) + ct->ct_error.re_status = RPC_CANTDECODERES; + } +diff --git a/src/svc.c b/src/svc.c +index b4a63d0..08cd6c9 100644 +--- a/src/svc.c ++++ b/src/svc.c +@@ -77,9 +77,6 @@ static struct svc_callout + + extern rwlock_t svc_lock; + extern rwlock_t svc_fd_lock; +-#ifdef HAVE_LIBGSSAPI +-extern struct svc_auth_ops svc_auth_gss_ops; +-#endif + + static struct svc_callout *svc_find (rpcprog_t, rpcvers_t, + struct svc_callout **, char *); +@@ -717,11 +714,9 @@ svc_getreq_common (fd) + SVC_DESTROY (xprt); + break; + } +- else if ((xprt->xp_auth != NULL) +-#ifdef HAVE_LIBGSSAPI +- && (xprt->xp_auth->svc_ah_ops != &svc_auth_gss_ops) +-#endif +- ) { ++ else if ((xprt->xp_auth != NULL) && ++ (xprt->xp_auth->svc_ah_private == NULL)) ++ { + xprt->xp_auth = NULL; + } + } +diff --git a/src/svc_auth.c b/src/svc_auth.c +index c6b3a0b..e80d5f9 100644 +--- a/src/svc_auth.c ++++ b/src/svc_auth.c +@@ -98,8 +98,8 @@ _authenticate(rqst, msg) + rqst->rq_xprt->xp_verf.oa_length = 0; + cred_flavor = rqst->rq_cred.oa_flavor; + switch (cred_flavor) { +- case AUTH_NULL: +- dummy = _svcauth_null(rqst, msg); ++ case AUTH_NONE: ++ dummy = _svcauth_none(rqst, msg); + return (dummy); + case AUTH_SYS: + dummy = _svcauth_unix(rqst, msg); +@@ -132,15 +132,6 @@ _authenticate(rqst, msg) + return (AUTH_REJECTEDCRED); + } + +-/*ARGSUSED*/ +-enum auth_stat +-_svcauth_null(rqst, msg) +- struct svc_req *rqst; +- struct rpc_msg *msg; +-{ +- return (AUTH_OK); +-} +- + /* + * Allow the rpc service to register new authentication types that it is + * prepared to handle. When an authentication flavor is registered, +diff --git a/src/svc_auth_unix.c b/src/svc_auth_unix.c +index ce83859..9585069 100644 +--- a/src/svc_auth_unix.c ++++ b/src/svc_auth_unix.c +@@ -43,6 +43,8 @@ + + #include + ++extern SVCAUTH svc_auth_none; ++ + /* + * Unix longhand authenticator + */ +@@ -67,6 +69,8 @@ _svcauth_unix(rqst, msg) + assert(rqst != NULL); + assert(msg != NULL); + ++ rqst->rq_xprt->xp_auth = &svc_auth_none; ++ + area = (struct area *) rqst->rq_clntcred; + aup = &area->area_aup; + aup->aup_machname = area->area_machname; +@@ -142,5 +146,6 @@ _svcauth_short(rqst, msg) + struct svc_req *rqst; + struct rpc_msg *msg; + { ++ rqst->rq_xprt->xp_auth = &svc_auth_none; + return (AUTH_REJECTEDCRED); + } +diff --git a/src/svc_dg.c b/src/svc_dg.c +index 66a56ee..5ef9df2 100644 +--- a/src/svc_dg.c ++++ b/src/svc_dg.c +@@ -134,6 +134,7 @@ svc_dg_create(fd, sendsize, recvsize) + su->su_cache = NULL; + xprt->xp_fd = fd; + xprt->xp_p2 = su; ++ xprt->xp_auth = NULL; + xprt->xp_verf.oa_base = su->su_verfbody; + svc_dg_ops(xprt); + xprt->xp_rtaddr.maxlen = sizeof (struct sockaddr_storage); +@@ -234,10 +235,27 @@ svc_dg_reply(xprt, msg) + bool_t stat = FALSE; + size_t slen; + ++ xdrproc_t xdr_results; ++ caddr_t xdr_location; ++ bool_t has_args; ++ ++ if (msg->rm_reply.rp_stat == MSG_ACCEPTED && ++ msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { ++ has_args = TRUE; ++ xdr_results = msg->acpted_rply.ar_results.proc; ++ xdr_location = msg->acpted_rply.ar_results.where; ++ ++ msg->acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; ++ msg->acpted_rply.ar_results.where = NULL; ++ } else ++ has_args = FALSE; ++ + xdrs->x_op = XDR_ENCODE; + XDR_SETPOS(xdrs, 0); + msg->rm_xid = su->su_xid; +- if (xdr_replymsg(xdrs, msg)) { ++ if (xdr_replymsg(xdrs, msg) && ++ (!has_args || ++ (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + struct msghdr *msg = &su->su_msghdr; + struct iovec iov; + +@@ -264,7 +282,12 @@ svc_dg_getargs(xprt, xdr_args, args_ptr) + xdrproc_t xdr_args; + void *args_ptr; + { +- return (*xdr_args)(&(su_data(xprt)->su_xdrs), args_ptr); ++ if (! SVCAUTH_UNWRAP(xprt->xp_auth, &(su_data(xprt)->su_xdrs), ++ xdr_args, args_ptr)) { ++ (void)svc_freeargs(xprt, xdr_args, args_ptr); ++ return FALSE; ++ } ++ return TRUE; + } + + static bool_t +@@ -288,6 +311,10 @@ svc_dg_destroy(xprt) + xprt_unregister(xprt); + if (xprt->xp_fd != -1) + (void)close(xprt->xp_fd); ++ if (xprt->xp_auth != NULL) { ++ SVCAUTH_DESTROY(xprt->xp_auth); ++ xprt->xp_auth = NULL; ++ } + XDR_DESTROY(&(su->su_xdrs)); + (void) mem_free(rpc_buffer(xprt), su->su_iosz); + (void) mem_free(su, sizeof (*su)); +diff --git a/src/svc_vc.c b/src/svc_vc.c +index aaaf2d7..74632e2 100644 +--- a/src/svc_vc.c ++++ b/src/svc_vc.c +@@ -172,6 +172,7 @@ svc_vc_create(fd, sendsize, recvsize) + xprt->xp_p1 = r; + xprt->xp_p2 = NULL; + xprt->xp_p3 = NULL; ++ xprt->xp_auth = NULL; + xprt->xp_verf = _null_auth; + svc_vc_rendezvous_ops(xprt); + xprt->xp_port = (u_short)-1; /* It is the rendezvouser */ +@@ -283,6 +284,7 @@ makefd_xprt(fd, sendsize, recvsize) + xdrrec_create(&(cd->xdrs), sendsize, recvsize, + xprt, read_vc, write_vc); + xprt->xp_p1 = cd; ++ xprt->xp_auth = NULL; + xprt->xp_verf.oa_base = cd->verf_body; + svc_vc_ops(xprt); /* truely deals with calls */ + xprt->xp_port = 0; /* this is a connection, not a rendezvouser */ +@@ -412,6 +414,10 @@ __svc_vc_dodestroy(xprt) + XDR_DESTROY(&(cd->xdrs)); + mem_free(cd, sizeof(struct cf_conn)); + } ++ if (xprt->xp_auth != NULL) { ++ SVCAUTH_DESTROY(xprt->xp_auth); ++ xprt->xp_auth = NULL; ++ } + if (xprt->xp_rtaddr.buf) + mem_free(xprt->xp_rtaddr.buf, xprt->xp_rtaddr.maxlen); + if (xprt->xp_ltaddr.buf) +@@ -610,7 +616,11 @@ svc_vc_recv(xprt, msg) + } + + xdrs->x_op = XDR_DECODE; +- (void)xdrrec_skiprecord(xdrs); ++ /* ++ * No need skip records with nonblocking connections ++ */ ++ if (cd->nonblock == FALSE) ++ (void)xdrrec_skiprecord(xdrs); + if (xdr_callmsg(xdrs, msg)) { + cd->x_id = msg->rm_xid; + return (TRUE); +@@ -628,8 +638,13 @@ svc_vc_getargs(xprt, xdr_args, args_ptr) + + assert(xprt != NULL); + /* args_ptr may be NULL */ +- return ((*xdr_args)(&(((struct cf_conn *)(xprt->xp_p1))->xdrs), +- args_ptr)); ++ ++ if (! SVCAUTH_UNWRAP(xprt->xp_auth, ++ &(((struct cf_conn *)(xprt->xp_p1))->xdrs), ++ xdr_args, args_ptr)) { ++ return FALSE; ++ } ++ return TRUE; + } + + static bool_t +@@ -658,15 +673,35 @@ svc_vc_reply(xprt, msg) + XDR *xdrs; + bool_t rstat; + ++ xdrproc_t xdr_results; ++ caddr_t xdr_location; ++ bool_t has_args; ++ + assert(xprt != NULL); + assert(msg != NULL); + + cd = (struct cf_conn *)(xprt->xp_p1); + xdrs = &(cd->xdrs); + ++ if (msg->rm_reply.rp_stat == MSG_ACCEPTED && ++ msg->rm_reply.rp_acpt.ar_stat == SUCCESS) { ++ has_args = TRUE; ++ xdr_results = msg->acpted_rply.ar_results.proc; ++ xdr_location = msg->acpted_rply.ar_results.where; ++ ++ msg->acpted_rply.ar_results.proc = (xdrproc_t)xdr_void; ++ msg->acpted_rply.ar_results.where = NULL; ++ } else ++ has_args = FALSE; ++ + xdrs->x_op = XDR_ENCODE; + msg->rm_xid = cd->x_id; +- rstat = xdr_replymsg(xdrs, msg); ++ rstat = FALSE; ++ if (xdr_replymsg(xdrs, msg) && ++ (!has_args || ++ (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ rstat = TRUE; ++ } + (void)xdrrec_endofrecord(xdrs, TRUE); + return (rstat); + } +diff --git a/src/xdr_rec.c b/src/xdr_rec.c +index 4e815d7..2aca623 100644 +--- a/src/xdr_rec.c ++++ b/src/xdr_rec.c +@@ -64,7 +64,6 @@ + #include + #include + #include "rpc_com.h" +-#include + static bool_t xdrrec_getlong(XDR *, long *); + static bool_t xdrrec_putlong(XDR *, const long *); + static bool_t xdrrec_getbytes(XDR *, char *, u_int); +@@ -330,22 +329,22 @@ xdrrec_getpos(xdrs) + RECSTREAM *rstrm = (RECSTREAM *)xdrs->x_private; + off_t pos; + +- pos = lseek((int)(u_long)rstrm->tcp_handle, (off_t)0, 1); +- if (pos != -1) +- switch (xdrs->x_op) { ++ switch (xdrs->x_op) { + +- case XDR_ENCODE: +- pos += rstrm->out_finger - rstrm->out_base; +- break; ++ case XDR_ENCODE: ++ pos = rstrm->out_finger - rstrm->out_base ++ - BYTES_PER_XDR_UNIT; ++ break; + +- case XDR_DECODE: +- pos -= rstrm->in_boundry - rstrm->in_finger; +- break; ++ case XDR_DECODE: ++ pos = rstrm->in_boundry - rstrm->in_finger ++ - BYTES_PER_XDR_UNIT; ++ break; + +- default: +- pos = (off_t) -1; +- break; +- } ++ default: ++ pos = (off_t) -1; ++ break; ++ } + return ((u_int) pos); + } + +diff --git a/tirpc/rpc/auth.h b/tirpc/rpc/auth.h +index 734e6b9..5f66e67 100644 +--- a/tirpc/rpc/auth.h ++++ b/tirpc/rpc/auth.h +@@ -203,8 +203,22 @@ typedef struct __auth { + + } *ah_ops; + void *ah_private; ++ int ah_refcnt; + } AUTH; + ++static __inline int ++auth_get(AUTH *auth) ++{ ++ return __sync_add_and_fetch(&auth->ah_refcnt, 1); ++} ++ ++static __inline int ++auth_put(AUTH *auth) ++{ ++ return __sync_sub_and_fetch(&auth->ah_refcnt, 1); ++} ++ ++ + + /* + * Authentication ops. +@@ -234,10 +248,23 @@ typedef struct __auth { + #define auth_refresh(auth, msg) \ + ((*((auth)->ah_ops->ah_refresh))(auth, msg)) + +-#define AUTH_DESTROY(auth) \ +- ((*((auth)->ah_ops->ah_destroy))(auth)) +-#define auth_destroy(auth) \ +- ((*((auth)->ah_ops->ah_destroy))(auth)) ++#define AUTH_DESTROY(auth) \ ++ do { \ ++ int refs; \ ++ if ((refs = auth_put((auth))) == 0) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth));\ ++ log_debug("%s: auth_put(), refs %d\n", \ ++ __func__, refs); \ ++ } while (0) ++ ++#define auth_destroy(auth) \ ++ do { \ ++ int refs; \ ++ if ((refs = auth_put((auth))) == 0) \ ++ ((*((auth)->ah_ops->ah_destroy))(auth));\ ++ log_debug("%s: auth_put(), refs %d\n", \ ++ __func__, refs); \ ++ } while (0) + + #define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ + ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ +@@ -373,7 +400,7 @@ __END_DECLS + __BEGIN_DECLS + struct svc_req; + struct rpc_msg; +-enum auth_stat _svcauth_null (struct svc_req *, struct rpc_msg *); ++enum auth_stat _svcauth_none (struct svc_req *, struct rpc_msg *); + enum auth_stat _svcauth_short (struct svc_req *, struct rpc_msg *); + enum auth_stat _svcauth_unix (struct svc_req *, struct rpc_msg *); + __END_DECLS +diff --git a/tirpc/rpc/des.h b/tirpc/rpc/des.h +index e3d6897..d2881ad 100644 +--- a/tirpc/rpc/des.h ++++ b/tirpc/rpc/des.h +@@ -33,6 +33,9 @@ + * Copyright (c) 1986 by Sun Microsystems, Inc. + */ + ++#ifndef _RPC_DES_H_ ++#define _RPC_DES_H_ ++ + #define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ + #define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ + +@@ -80,3 +83,5 @@ struct desparams { + * Software DES. + */ + extern int _des_crypt( char *, int, struct desparams * ); ++ ++#endif +diff --git a/tirpc/rpc/svc_auth.h b/tirpc/rpc/svc_auth.h +index 659e90c..14269d1 100644 +--- a/tirpc/rpc/svc_auth.h ++++ b/tirpc/rpc/svc_auth.h +@@ -44,17 +44,23 @@ + /* + * Interface to server-side authentication flavors. + */ +-typedef struct { ++typedef struct SVCAUTH { + struct svc_auth_ops { +- int (*svc_ah_wrap)(void); +- int (*svc_ah_unwrap)(void); +- int (*svc_ah_destroy)(void); ++ int (*svc_ah_wrap)(struct SVCAUTH *, XDR *, xdrproc_t, ++ caddr_t); ++ int (*svc_ah_unwrap)(struct SVCAUTH *, XDR *, xdrproc_t, ++ caddr_t); ++ int (*svc_ah_destroy)(struct SVCAUTH *); + } *svc_ah_ops; + caddr_t svc_ah_private; + } SVCAUTH; + +-#define SVCAUTH_DESTROY(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) +-#define svcauth_destroy(cred) ((*(cred)->svc_ah_ops->svc_ah_destroy)()) ++#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ ++ ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere)) ++#define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ ++ ((*((auth)->svc_ah_ops->svc_ah_unwrap))(auth, xdrs, xfunc, xwhere)) ++#define SVCAUTH_DESTROY(auth) \ ++ ((*((auth)->svc_ah_ops->svc_ah_destroy))(auth)) + + /* + * Server side authenticator diff --git a/packages/network/libtirpc/patches/libtirpc-0.2.2-wrap-segfault.patch b/packages/network/libtirpc/patches/libtirpc-0.2.2-wrap-segfault.patch new file mode 100644 index 0000000000..8a04c16de4 --- /dev/null +++ b/packages/network/libtirpc/patches/libtirpc-0.2.2-wrap-segfault.patch @@ -0,0 +1,28 @@ +diff -up libtirpc-0.2.2/src/svc_dg.c.orig libtirpc-0.2.2/src/svc_dg.c +--- libtirpc-0.2.2/src/svc_dg.c.orig 2011-07-19 15:02:41.087631000 -0400 ++++ libtirpc-0.2.2/src/svc_dg.c 2011-07-19 15:04:43.154243000 -0400 +@@ -254,8 +254,8 @@ svc_dg_reply(xprt, msg) + XDR_SETPOS(xdrs, 0); + msg->rm_xid = su->su_xid; + if (xdr_replymsg(xdrs, msg) && +- (!has_args || +- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ (!has_args || (xprt->xp_auth && ++ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + struct msghdr *msg = &su->su_msghdr; + struct iovec iov; + +diff -up libtirpc-0.2.2/src/svc_vc.c.orig libtirpc-0.2.2/src/svc_vc.c +--- libtirpc-0.2.2/src/svc_vc.c.orig 2011-07-19 15:05:28.577588000 -0400 ++++ libtirpc-0.2.2/src/svc_vc.c 2011-07-19 15:05:40.058928000 -0400 +@@ -698,8 +698,8 @@ svc_vc_reply(xprt, msg) + msg->rm_xid = cd->x_id; + rstat = FALSE; + if (xdr_replymsg(xdrs, msg) && +- (!has_args || +- (SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { ++ (!has_args || (xprt->xp_auth && ++ SVCAUTH_WRAP(xprt->xp_auth, xdrs, xdr_results, xdr_location)))) { + rstat = TRUE; + } + (void)xdrrec_endofrecord(xdrs, TRUE); diff --git a/packages/network/rpcbind/build b/packages/network/rpcbind/build new file mode 100755 index 0000000000..d38081ff5e --- /dev/null +++ b/packages/network/rpcbind/build @@ -0,0 +1,36 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-warmstarts \ + --disable-libwrap \ + --with-statedir=/tmp \ + --with-rpcuser=root \ + +make +$MAKEINSTALL diff --git a/packages/network/rpcbind/init.d/22_rpcbind b/packages/network/rpcbind/init.d/22_rpcbind new file mode 100644 index 0000000000..4bca01420f --- /dev/null +++ b/packages/network/rpcbind/init.d/22_rpcbind @@ -0,0 +1,26 @@ +################################################################################ +# Copyright (C) 2009-2010 OpenELEC.tv +# http://www.openelec.tv +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +# start rpcbind daemon +# +# runlevels: openelec, textmode + +progress "start rpcbind daemon" + rpcbind \ No newline at end of file diff --git a/packages/network/rpcbind/install b/packages/network/rpcbind/install new file mode 100755 index 0000000000..b155f0e712 --- /dev/null +++ b/packages/network/rpcbind/install @@ -0,0 +1,27 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/rpcbind $INSTALL/usr/bin + cp $PKG_BUILD/rpcinfo $INSTALL/usr/bin diff --git a/packages/network/rpcbind/meta b/packages/network/rpcbind/meta new file mode 100644 index 0000000000..e570f477b6 --- /dev/null +++ b/packages/network/rpcbind/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="rpcbind" +PKG_VERSION="0.2.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://rpcbind.sourceforge.net/" +PKG_URL="$SOURCEFORGE_SRC/rpcbind/rpcbind/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_DEPENDS="libtirpc" +PKG_BUILD_DEPENDS="toolchain libtirpc" +PKG_PRIORITY="optional" +PKG_SECTION="network" +PKG_SHORTDESC="rpcbind: a server that converts RPC program numbers into universal addresses." +PKG_LONGDESC="The rpcbind utility is a server that converts RPC program numbers into universal addresses." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/network/rpcbind/patches/rpcbind-0.2.0-001-rpcbind-0.2.1rc3.patch b/packages/network/rpcbind/patches/rpcbind-0.2.0-001-rpcbind-0.2.1rc3.patch new file mode 100644 index 0000000000..ff46f67a35 --- /dev/null +++ b/packages/network/rpcbind/patches/rpcbind-0.2.0-001-rpcbind-0.2.1rc3.patch @@ -0,0 +1,1054 @@ +diff --git a/.gitignore b/.gitignore +index 5a7546c..bee4bab 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,3 +1,4 @@ ++INSTALL + Makefile + Makefile.in + aclocal.m4 +@@ -13,18 +14,14 @@ depcomp + install-sh + libtool + ltmain.sh +-man/Makefile +-man/Makefile.in + missing +-src/.deps/ +-src/Makefile +-src/Makefile.in + src/config.h + src/stamp-h2 + stamp-h1 + # file generated during compilation ++.deps + *.o +-src/rpcbind +-src/rpcinfo ++rpcbind ++rpcinfo + # cscope database files + cscope.* +diff --git a/INSTALL b/INSTALL +index 98e5d87..7d1c323 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -1,32 +1,25 @@ +-Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software +-Foundation, Inc. ++Installation Instructions ++************************* + +- This file is free documentation; the Free Software Foundation gives +-unlimited permission to copy, distribute and modify it. +- +- +-rpcbind Quick Installation +-========================== +- +-$ ./configure +-$ make +-# make install +- +- The install phase will install the rpcbind and rpcinfo commands +-under /usr/bin. If you wish they replace the basic portmap and +-rpcinfo commands, you can run: +- +-# mv /sbin/portmap /sbin/portmap.sav +-# ln -s /usr/bin/rpcbind /sbin/portmap +- +-# mv /usr/sbin/rpcinfo /usr/sbin/rpcinfo.sav +-# ln -s /usr/bin/rpcinfo /usr/sbin/rpcinfo ++Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, ++2006, 2007, 2008, 2009 Free Software Foundation, Inc. + ++ Copying and distribution of this file, with or without modification, ++are permitted in any medium without royalty provided the copyright ++notice and this notice are preserved. This file is offered as-is, ++without warranty of any kind. + + Basic Installation + ================== + +- These are generic installation instructions. ++ Briefly, the shell commands `./configure; make; make install' should ++configure, build, and install this package. The following ++more-detailed instructions are generic; see the `README' file for ++instructions specific to this package. Some packages provide this ++`INSTALL' file but do not implement all of the features documented ++below. The lack of an optional feature in a given package is not ++necessarily a bug. More recommendations for GNU packages can be found ++in *note Makefile Conventions: (standards)Makefile Conventions. + + The `configure' shell script attempts to guess correct values for + various system-dependent variables used during compilation. It uses +@@ -39,9 +32,9 @@ debugging `configure'). + + It can also use an optional file (typically called `config.cache' + and enabled with `--cache-file=config.cache' or simply `-C') that saves +-the results of its tests to speed up reconfiguring. (Caching is ++the results of its tests to speed up reconfiguring. Caching is + disabled by default to prevent problems with accidental use of stale +-cache files.) ++cache files. + + If you need to do unusual things to compile the package, please try + to figure out how `configure' could check whether to do them, and mail +@@ -51,30 +44,37 @@ some point `config.cache' contains results you don't want to keep, you + may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +-`configure' by a program called `autoconf'. You only need +-`configure.ac' if you want to change it or regenerate `configure' using +-a newer version of `autoconf'. ++`configure' by a program called `autoconf'. You need `configure.ac' if ++you want to change it or regenerate `configure' using a newer version ++of `autoconf'. + +-The simplest way to compile this package is: ++ The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type +- `./configure' to configure the package for your system. If you're +- using `csh' on an old version of System V, you might need to type +- `sh ./configure' instead to prevent `csh' from trying to execute +- `configure' itself. ++ `./configure' to configure the package for your system. + +- Running `configure' takes awhile. While running, it prints some +- messages telling which features it is checking for. ++ Running `configure' might take a while. While running, it prints ++ some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with +- the package. ++ the package, generally using the just-built uninstalled binaries. + + 4. Type `make install' to install the programs and any data files and +- documentation. +- +- 5. You can remove the program binaries and object files from the ++ documentation. When installing into a prefix owned by root, it is ++ recommended that the package be configured and built as a regular ++ user, and only the `make install' phase executed with root ++ privileges. ++ ++ 5. Optionally, type `make installcheck' to repeat any self-tests, but ++ this time using the binaries in their final installed location. ++ This target does not install anything. Running this target as a ++ regular user, particularly if the prior `make install' required ++ root privileges, verifies that the installation completed ++ correctly. ++ ++ 6. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is +@@ -83,6 +83,16 @@ The simplest way to compile this package is: + all sorts of other programs in order to regenerate files that came + with the distribution. + ++ 7. Often, you can also type `make uninstall' to remove the installed ++ files again. In practice, not all packages have tested that ++ uninstallation works correctly, even though it is required by the ++ GNU Coding Standards. ++ ++ 8. Some packages, particularly those that use Automake, provide `make ++ distcheck', which can by used by developers to test that all other ++ targets like `make install' and `make uninstall' work correctly. ++ This target is generally not run by end users. ++ + Compilers and Options + ===================== + +@@ -94,7 +104,7 @@ for details on some of the pertinent environment variables. + by setting variables in the command line or in the environment. Here + is an example: + +- ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix ++ ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +@@ -103,44 +113,89 @@ Compiling For Multiple Architectures + + You can compile the package for more than one kind of computer at the + same time, by placing the object files for each architecture in their +-own directory. To do this, you must use a version of `make' that +-supports the `VPATH' variable, such as GNU `make'. `cd' to the ++own directory. To do this, you can use GNU `make'. `cd' to the + directory where you want the object files and executables to go and run + the `configure' script. `configure' automatically checks for the +-source code in the directory that `configure' is in and in `..'. ++source code in the directory that `configure' is in and in `..'. This ++is known as a "VPATH" build. + +- If you have to use a `make' that does not support the `VPATH' +-variable, you have to compile the package for one architecture at a +-time in the source code directory. After you have installed the +-package for one architecture, use `make distclean' before reconfiguring +-for another architecture. ++ With a non-GNU `make', it is safer to compile the package for one ++architecture at a time in the source code directory. After you have ++installed the package for one architecture, use `make distclean' before ++reconfiguring for another architecture. ++ ++ On MacOS X 10.5 and later systems, you can create libraries and ++executables that work on multiple system types--known as "fat" or ++"universal" binaries--by specifying multiple `-arch' options to the ++compiler but only a single `-arch' option to the preprocessor. Like ++this: ++ ++ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ ++ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ ++ CPP="gcc -E" CXXCPP="g++ -E" ++ ++ This is not guaranteed to produce working output in all cases, you ++may have to build one architecture at a time and combine the results ++using the `lipo' tool if you have problems. + + Installation Names + ================== + +- By default, `make install' will install the package's files in +-`/usr/local/bin', `/usr/local/man', etc. You can specify an +-installation prefix other than `/usr/local' by giving `configure' the +-option `--prefix=PATH'. ++ By default, `make install' installs the package's commands under ++`/usr/local/bin', include files under `/usr/local/include', etc. You ++can specify an installation prefix other than `/usr/local' by giving ++`configure' the option `--prefix=PREFIX', where PREFIX must be an ++absolute file name. + + You can specify separate installation prefixes for + architecture-specific files and architecture-independent files. If you +-give `configure' the option `--exec-prefix=PATH', the package will use +-PATH as the prefix for installing programs and libraries. +-Documentation and other data files will still use the regular prefix. ++pass the option `--exec-prefix=PREFIX' to `configure', the package uses ++PREFIX as the prefix for installing programs and libraries. ++Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +-options like `--bindir=PATH' to specify different values for particular ++options like `--bindir=DIR' to specify different values for particular + kinds of files. Run `configure --help' for a list of the directories +-you can set and what kinds of files go in them. ++you can set and what kinds of files go in them. In general, the ++default for these options is expressed in terms of `${prefix}', so that ++specifying just `--prefix' will affect all of the other directory ++specifications that were not explicitly provided. ++ ++ The most portable way to affect installation locations is to pass the ++correct locations to `configure'; however, many packages provide one or ++both of the following shortcuts of passing variable assignments to the ++`make install' command line to change installation locations without ++having to reconfigure or recompile. ++ ++ The first method involves providing an override variable for each ++affected directory. For example, `make install ++prefix=/alternate/directory' will choose an alternate location for all ++directory configuration variables that were expressed in terms of ++`${prefix}'. Any directories that were specified during `configure', ++but not in terms of `${prefix}', must each be overridden at install ++time for the entire installation to be relocated. The approach of ++makefile variable overrides for each directory variable is required by ++the GNU Coding Standards, and ideally causes no recompilation. ++However, some platforms have known limitations with the semantics of ++shared libraries that end up requiring recompilation when using this ++method, particularly noticeable in packages that use GNU Libtool. ++ ++ The second method involves providing the `DESTDIR' variable. For ++example, `make install DESTDIR=/alternate/directory' will prepend ++`/alternate/directory' before all installation names. The approach of ++`DESTDIR' overrides is not required by the GNU Coding Standards, and ++does not work on platforms that have drive letters. On the other hand, ++it does better at avoiding recompilation issues, and works well even ++when some directory options were not specified in terms of `${prefix}' ++at `configure' time. ++ ++Optional Features ++================= + + If the package supports it, you can cause programs to be installed + with an extra prefix or suffix on their names by giving `configure' the + option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +-Optional Features +-================= +- + Some packages pay attention to `--enable-FEATURE' options to + `configure', where FEATURE indicates an optional part of the package. + They may also pay attention to `--with-PACKAGE' options, where PACKAGE +@@ -153,6 +208,45 @@ find the X include and library files automatically, but if it doesn't, + you can use the `configure' options `--x-includes=DIR' and + `--x-libraries=DIR' to specify their locations. + ++ Some packages offer the ability to configure how verbose the ++execution of `make' will be. For these packages, running `./configure ++--enable-silent-rules' sets the default to minimal output, which can be ++overridden with `make V=1'; while running `./configure ++--disable-silent-rules' sets the default to verbose, which can be ++overridden with `make V=0'. ++ ++Particular systems ++================== ++ ++ On HP-UX, the default C compiler is not ANSI C compatible. If GNU ++CC is not installed, it is recommended to use the following options in ++order to use an ANSI C compiler: ++ ++ ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" ++ ++and if that doesn't work, install pre-built binaries of GCC for HP-UX. ++ ++ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot ++parse its `' header file. The option `-nodtk' can be used as ++a workaround. If GNU CC is not installed, it is therefore recommended ++to try ++ ++ ./configure CC="cc" ++ ++and if that doesn't work, try ++ ++ ./configure CC="cc -nodtk" ++ ++ On Solaris, don't put `/usr/ucb' early in your `PATH'. This ++directory contains several dysfunctional programs; working variants of ++these programs are available in `/usr/bin'. So, if you need `/usr/ucb' ++in your `PATH', put it _after_ `/usr/bin'. ++ ++ On Haiku, software installed for all users goes in `/boot/common', ++not `/usr/local'. It is recommended to use the following options: ++ ++ ./configure --prefix=/boot/common ++ + Specifying the System Type + ========================== + +@@ -168,14 +262,15 @@ type, such as `sun4', or a canonical name which has the form: + + where SYSTEM can have one of these forms: + +- OS KERNEL-OS ++ OS ++ KERNEL-OS + + See the file `config.sub' for the possible values of each field. If + `config.sub' isn't included in this package, then this package doesn't + need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +-use the `--target=TYPE' option to select the type of system they will ++use the option `--target=TYPE' to select the type of system they will + produce code for. + + If you want to _use_ a cross compiler, that generates code for a +@@ -205,9 +300,14 @@ them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +-will cause the specified gcc to be used as the C compiler (unless it is ++causes the specified `gcc' to be used as the C compiler (unless it is + overridden in the site shell script). + ++Unfortunately, this technique does not work for `CONFIG_SHELL' due to ++an Autoconf bug. Until the bug is fixed you can use this workaround: ++ ++ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash ++ + `configure' Invocation + ====================== + +@@ -216,7 +316,14 @@ operates. + + `--help' + `-h' +- Print a summary of the options to `configure', and exit. ++ Print a summary of all of the options to `configure', and exit. ++ ++`--help=short' ++`--help=recursive' ++ Print a summary of the options unique to this package's ++ `configure', and exit. The `short' variant lists options used ++ only in the top level, while the `recursive' variant lists options ++ also present in any nested packages. + + `--version' + `-V' +@@ -243,6 +350,16 @@ operates. + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + ++`--prefix=DIR' ++ Use DIR as the installation prefix. *note Installation Names:: ++ for more details, including other options available for fine-tuning ++ the installation locations. ++ ++`--no-create' ++`-n' ++ Run the configure checks, but stop before creating any output ++ files. ++ + `configure' also accepts some other, not widely useful, options. Run + `configure --help' for more details. + +diff --git a/Makefile.am b/Makefile.am +index cd56148..9fa608e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,2 +1,44 @@ +-SUBDIRS= src man ++AM_CPPFLAGS = \ ++ -DCHECK_LOCAL \ ++ -DPORTMAP \ ++ -DFACILITY=LOG_MAIL \ ++ -DSEVERITY=LOG_INFO \ ++ -DINET6 \ ++ -DRPCBIND_STATEDIR="\"$(statedir)\"" \ ++ -DRPCUSER="\"$(rpcuser)\"" \ ++ -D_GNU_SOURCE \ ++ $(TIRPC_CFLAGS) + ++if DEBUG ++AM_CPPFLAGS += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL ++AM_CPPFLAGS += -DND_DEBUG -DBIND_DEBUG ++endif ++ ++if WARMSTART ++AM_CPPFLAGS += -DWARMSTART ++endif ++ ++if LIBWRAP ++AM_CPPFLAGS += -DLIBWRAP ++endif ++ ++bin_PROGRAMS = rpcbind rpcinfo ++ ++rpcbind_SOURCES = \ ++ src/check_bound.c \ ++ src/pmap_svc.c \ ++ src/rpcb_stat.c \ ++ src/rpcb_svc.c \ ++ src/rpcb_svc_4.c \ ++ src/rpcb_svc_com.c \ ++ src/rpcbind.c \ ++ src/rpcbind.h \ ++ src/security.c \ ++ src/util.c \ ++ src/warmstart.c ++rpcbind_LDADD = $(TIRPC_LIBS) ++ ++rpcinfo_SOURCES = src/rpcinfo.c ++rpcinfo_LDADD = $(TIRPC_LIBS) ++ ++dist_man8_MANS = man/rpcbind.8 man/rpcinfo.8 +diff --git a/autogen.sh b/autogen.sh +index 1613b6d..761db90 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -36,7 +36,7 @@ if test x"${1}" = x"clean"; then + fi + + aclocal +-libtoolize --force --copy +-autoheader ++#libtoolize --force --copy ++#autoheader + automake --add-missing --copy --gnu # -Wall + autoconf # -Wall +diff --git a/configure.in b/configure.in +index de1c730..2b67720 100644 +--- a/configure.in ++++ b/configure.in +@@ -1,66 +1,39 @@ +- AC_INIT(rpcbind, 0.2.0) ++AC_INIT(rpcbind, 0.2.0) + +- AM_INIT_AUTOMAKE +-# AM_MAINTAINER_MODE ++AM_INIT_AUTOMAKE + AC_CONFIG_SRCDIR([src/rpcbind.c]) +- AC_PROG_CC +- AM_CONFIG_HEADER(config.h) +- AC_HEADER_DIRENT +- AC_PREFIX_DEFAULT(/usr) +- +-AC_CONFIG_SRCDIR([src/config.h.in]) +-AC_CONFIG_HEADERS([src/config.h]) +- +-AC_PROG_LIBTOOL +- +-AC_ARG_ENABLE(debug,[ --enable-debug Turns on rpcbind debugging], +- [case "${enableval}" in +- yes) debug=true ;; +- no) debug=no ;; +- *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; +- esac],[debug=false]) +-AM_CONDITIONAL(DEBUG, test x$debug = xtrue) +- +-AC_ARG_ENABLE(warmstarts,[ --enable-warmstarts Enables Warm Starts], +- [case "${enableval}" in +- yes) warmstarts=true ;; +- no) warmstarts=no ;; +- *) AC_MSG_ERROR(bad value ${enableval} for --enable-warmstarts) ;; +- esac],[warmstarts=false]) +-AM_CONDITIONAL(WARMSTART, test x$warmstarts = xtrue) +- +-if test "$warmstarts" = "true" ; then +- AC_ARG_WITH(statedir, +- [ --with-statedir=/foo use state dir /foo [/tmp]], +- statedir=$withval, +- statedir=/tmp) +- AC_SUBST(statedir) +- AC_DEFINE_UNQUOTED(RPCBIND_STATEDIR, "$statedir", [This defines the location where the state files will be kept for warm starts]) +-fi +-AC_ARG_WITH(rpcuser, +- [ --with-rpcuser=user uid to use [root]], +- rpcuser=$withval, +- rpcuser=root) +- AC_SUBST(rpcuser) +-AC_DEFINE_UNQUOTED(RPCBIND_USER, "$rpcuser", [This defines the uid to run as]) ++AC_PREFIX_DEFAULT(/usr) ++AC_PROG_CC ++ ++AC_ARG_ENABLE([libwrap], ++ AS_HELP_STRING([--enable-libwrap], [Enables host name checking through tcpd @<:@default=no@:>@])) ++AM_CONDITIONAL(LIBWRAP, test x$enable_libwrap = xyes) ++ ++AC_ARG_ENABLE([debug], ++ AS_HELP_STRING([--enable-debug], [Turns on rpcbind debugging @<:@default=no@:>@])) ++AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes) ++ ++AC_ARG_ENABLE([warmstarts], ++ AS_HELP_STRING([--enable-warmstarts], [Enables Warm Starts @<:@default=no@:>@])) ++AM_CONDITIONAL(WARMSTART, test x$enable_warmstarts = xyes) ++ ++AC_ARG_WITH([statedir], ++ AS_HELP_STRING([--with-statedir=ARG], [use ARG as state dir @<:@default=/tmp@:>@]) ++ ,, [with_statedir=/tmp]) ++AC_SUBST([statedir], [$with_statedir]) ++ ++AC_ARG_WITH([rpcuser], ++ AS_HELP_STRING([--with-rpcuser=ARG], [use ARG for RPC @<:@default=root@:>@]), ++ ,, [with_rpcuser=root]) ++AC_SUBST([rpcuser], [$with_rpcuser]) ++ ++PKG_CHECK_MODULES([TIRPC], [libtirpc]) + +-AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \ +- netinet/in.h stdlib.h string.h \ +- sys/param.h sys/socket.h \ +- sys/time.h syslog.h \ +- unistd.h nss.h]) ++AS_IF([test x$enable_libwrap = xyes], [ ++ AC_CHECK_LIB([wrap], [hosts_access], , ++ AC_MSG_ERROR([libwrap support requested but unable to find libwrap])) ++]) + +-AC_CHECK_LIB([pthread], [pthread_create]) +-AC_CHECK_LIB([tirpc], [clnt_create]) +-AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking], +- [case "${enableval}" in +- yes) libwarp=true +- AC_CHECK_LIB([wrap], [hosts_access]) ;; +- no) libwarp=no ;; +- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;; +- esac],[libwarp=false]) +-AM_CONDITIONAL(LIBWRAP, test x$libwarp = xtrue) ++AC_SEARCH_LIBS([pthread_create], [pthread]) + +-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) +-AC_OUTPUT() +- ++AC_OUTPUT([Makefile]) +diff --git a/man/Makefile.am b/man/Makefile.am +deleted file mode 100644 +index 84818e9..0000000 +--- a/man/Makefile.am ++++ /dev/null +@@ -1,2 +0,0 @@ +-man8_MANS = rpcbind.8 +-EXTRA_DIST = $(man8_MANS) +diff --git a/man/rpcbind.8 b/man/rpcbind.8 +index 32806d4..c5b8fb7 100644 +--- a/man/rpcbind.8 ++++ b/man/rpcbind.8 +@@ -82,6 +82,8 @@ during operation, and will abort on certain errors if + is also specified. + With this option, the name-to-address translation consistency + checks are shown in detail. ++.It Fl f ++Do not fork and become a background process. + .It Fl h + Specify specific IP addresses to bind to for UDP requests. + This option +diff --git a/src/Makefile.am b/src/Makefile.am +deleted file mode 100644 +index cc0a85b..0000000 +--- a/src/Makefile.am ++++ /dev/null +@@ -1,34 +0,0 @@ +-INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \ +- -D_GNU_SOURCE -Wall -pipe +-if DEBUG +-INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL +-INCLUDES += -DND_DEBUG -DBIND_DEBUG +-endif +- +-if WARMSTART +-INCLUDES += -DWARMSTART +-endif +- +-if LIBWRAP +-INCLUDES += -DLIBWRAP +-endif +- +- +-bin_PROGRAMS = rpcbind rpcinfo +- +-rpcbind_SOURCES = check_bound.c rpcbind.c \ +- rpcb_svc_4.c rpcb_svc_com.c \ +- util.c pmap_svc.c rpcb_stat.c \ +- rpcb_svc.c security.c warmstart.c \ +- rpcbind.h +- +-rpcinfo_SOURCES = rpcinfo.c +-rpcinfo_LDFLAGS = -lpthread -ltirpc +-rpcinfo_LDADD = $(LIB_TIRPC) +- +- +-rpcbind_LDFLAGS = -lpthread -ltirpc +-rpcbind_LDADD = $(LIB_TIRPC) +-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \ +- -DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO +- +diff --git a/src/config.h.in b/src/config.h.in +deleted file mode 100644 +index 67a0e39..0000000 +--- a/src/config.h.in ++++ /dev/null +@@ -1,105 +0,0 @@ +-/* config.h.in. Generated from configure.in by autoheader. */ +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_ARPA_INET_H +- +-/* Define to 1 if you have the header file, and it defines `DIR'. +- */ +-#undef HAVE_DIRENT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_FCNTL_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H +- +-/* Define to 1 if you have the `pthread' library (-lpthread). */ +-#undef HAVE_LIBPTHREAD +- +-/* Define to 1 if you have the `tirpc' library (-ltirpc). */ +-#undef HAVE_LIBTIRPC +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_MEMORY_H +- +-/* Define to 1 if you have the header file, and it defines `DIR'. */ +-#undef HAVE_NDIR_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_NETDB_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_NETINET_IN_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STDINT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STDLIB_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STRINGS_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STRING_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYSLOG_H +- +-/* Define to 1 if you have the header file, and it defines `DIR'. +- */ +-#undef HAVE_SYS_DIR_H +- +-/* Define to 1 if you have the header file, and it defines `DIR'. +- */ +-#undef HAVE_SYS_NDIR_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_PARAM_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_SOCKET_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_STAT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TIME_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TYPES_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_UNISTD_H +- +-/* Name of package */ +-#undef PACKAGE +- +-/* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT +- +-/* Define to the full name of this package. */ +-#undef PACKAGE_NAME +- +-/* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING +- +-/* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME +- +-/* Define to the version of this package. */ +-#undef PACKAGE_VERSION +- +-/* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS +- +-/* Version number of package */ +-#undef VERSION +- +-/* This defines the location where the state files will be kept for warm +- starts */ +-#undef RPCBIND_STATEDIR +- +-/* This defines the uid to run as */ +-#undef RPCBIND_USER +- +diff --git a/src/pmap_svc.c b/src/pmap_svc.c +index 4736700..337e64d 100644 +--- a/src/pmap_svc.c ++++ b/src/pmap_svc.c +@@ -80,7 +80,7 @@ pmap_service(struct svc_req *rqstp, SVCXPRT *xprt) + if (debugging) + fprintf(stderr, "PMAPPROC_NULL\n"); + #endif +- check_access(xprt, rqstp->rq_proc, NULL, PMAPVERS); ++ check_access(xprt, rqstp->rq_proc, 0, PMAPVERS); + if ((!svc_sendreply(xprt, (xdrproc_t) xdr_void, NULL)) && + debugging) { + if (doabort) { +@@ -201,11 +201,11 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long + reg.pm_prog, reg.pm_vers); + #endif + +- if (!check_access(xprt, op, ®, PMAPVERS)) { ++ if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); + return (FALSE); + } +- ++ + rpcbreg.r_prog = reg.pm_prog; + rpcbreg.r_vers = reg.pm_vers; + +@@ -276,7 +276,7 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + return (FALSE); + } + +- if (!check_access(xprt, PMAPPROC_GETPORT, ®, PMAPVERS)) { ++ if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) { + svcerr_weakauth(xprt); + return FALSE; + } +@@ -340,7 +340,7 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt) + return (FALSE); + } + +- if (!check_access(xprt, PMAPPROC_DUMP, NULL, PMAPVERS)) { ++ if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) { + svcerr_weakauth(xprt); + return FALSE; + } +diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c +index 0514ba5..e350f85 100644 +--- a/src/rpcb_svc.c ++++ b/src/rpcb_svc.c +@@ -75,6 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + char *result; + xdrproc_t xdr_argument, xdr_result; + void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); ++ rpcprog_t setprog = 0; + + rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc); + +@@ -88,7 +89,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + fprintf(stderr, "RPCBPROC_NULL\n"); + #endif + /* This call just logs, no actual checks */ +- check_access(transp, rqstp->rq_proc, NULL, RPCBVERS); ++ check_access(transp, rqstp->rq_proc, 0, RPCBVERS); + (void) svc_sendreply(transp, (xdrproc_t)xdr_void, (char *)NULL); + return; + +@@ -166,7 +167,13 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp) + (void) fprintf(stderr, "rpcbind: could not decode\n"); + return; + } +- if (!check_access(transp, rqstp->rq_proc, &argument, RPCBVERS)) { ++ ++ if (rqstp->rq_proc == RPCBPROC_SET ++ || rqstp->rq_proc == RPCBPROC_UNSET ++ || rqstp->rq_proc == RPCBPROC_GETADDR) ++ setprog = argument.rpcbproc_set_3_arg.r_prog; ++ ++ if (!check_access(transp, rqstp->rq_proc, setprog, RPCBVERS)) { + svcerr_weakauth(transp); + goto done; + } +diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c +index 9fd5bef..313e6d1 100644 +--- a/src/rpcb_svc_4.c ++++ b/src/rpcb_svc_4.c +@@ -78,6 +78,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + char *result; + xdrproc_t xdr_argument, xdr_result; + void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t)); ++ rpcprog_t setprog = 0; + + rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc); + +@@ -90,7 +91,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + if (debugging) + fprintf(stderr, "RPCBPROC_NULL\n"); + #endif +- check_access(transp, rqstp->rq_proc, NULL, RPCBVERS4); ++ check_access(transp, rqstp->rq_proc, 0, RPCBVERS4); + (void) svc_sendreply(transp, (xdrproc_t) xdr_void, + (char *)NULL); + return; +@@ -220,7 +221,13 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp) + (void) fprintf(stderr, "rpcbind: could not decode\n"); + return; + } +- if (!check_access(transp, rqstp->rq_proc, &argument, RPCBVERS4)) { ++ ++ if (rqstp->rq_proc == RPCBPROC_SET ++ || rqstp->rq_proc == RPCBPROC_UNSET ++ || rqstp->rq_proc == RPCBPROC_GETADDR) ++ setprog = argument.rpcbproc_set_4_arg.r_prog; ++ ++ if (!check_access(transp, rqstp->rq_proc, setprog, RPCBVERS4)) { + svcerr_weakauth(transp); + goto done; + } +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 291421f..5bb9a44 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -1372,10 +1372,13 @@ static char * + getowner(SVCXPRT *transp, char *owner, size_t ownersize) + { + uid_t uid; +- +- if (__rpc_get_local_uid(transp, &uid) < 0) +- snprintf(owner, ownersize, "unknown"); +- else if (uid == 0) ++ ++ if (__rpc_get_local_uid(transp, &uid) < 0) { ++ if (is_localroot(svc_getrpccaller(transp))) ++ snprintf(owner, ownersize, "superuser"); ++ else ++ snprintf(owner, ownersize, "unknown"); ++ } else if (uid == 0) + snprintf(owner, ownersize, "superuser"); + else + snprintf(owner, ownersize, "%d", uid); +diff --git a/src/rpcbind.c b/src/rpcbind.c +index 525ffba..24e069b 100644 +--- a/src/rpcbind.c ++++ b/src/rpcbind.c +@@ -68,7 +68,6 @@ + #include + #include + #include +-#include "config.h" + #include "rpcbind.h" + + /*#define RPCBIND_DEBUG*/ +@@ -77,6 +76,7 @@ + + int debugging = 0; /* Tell me what's going on */ + int doabort = 0; /* When debugging, do an abort on errors */ ++int dofork = 1; /* fork? */ + + rpcblist_ptr list_rbl; /* A list of version 3/4 rpcbind services */ + +@@ -213,8 +213,8 @@ main(int argc, char *argv[]) + printf("\n"); + } + #endif +- } else { +- if (daemon(0, 0)) ++ } else if (dofork) { ++ if (daemon(0, 0)) + err(1, "fork failed"); + } + +@@ -276,6 +276,7 @@ init_transport(struct netconfig *nconf) + int addrlen = 0; + int nhostsbak; + int checkbind; ++ int on = 1; + struct sockaddr *sa = NULL; + u_int32_t host_addr[4]; /* IPv4 or IPv6 */ + struct sockaddr_un sun; +@@ -493,6 +494,14 @@ init_transport(struct netconfig *nconf) + } + oldmask = umask(S_IXUSR|S_IXGRP|S_IXOTH); + __rpc_fd2sockinfo(fd, &si); ++ if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, ++ sizeof(on)) != 0) { ++ syslog(LOG_ERR, "cannot set SO_REUSEADDR on %s", ++ nconf->nc_netid); ++ if (res != NULL) ++ freeaddrinfo(res); ++ return 1; ++ } + if (bind(fd, sa, addrlen) < 0) { + syslog(LOG_ERR, "cannot bind %s: %m", nconf->nc_netid); + if (res != NULL) +@@ -731,7 +740,7 @@ parseargs(int argc, char *argv[]) + { + int c; + oldstyle_local = 1; +- while ((c = getopt(argc, argv, "dwah:ils")) != -1) { ++ while ((c = getopt(argc, argv, "adh:ilswf")) != -1) { + switch (c) { + case 'a': + doabort = 1; /* when debugging, do an abort on */ +@@ -758,13 +767,16 @@ parseargs(int argc, char *argv[]) + case 's': + runasdaemon = 1; + break; ++ case 'f': ++ dofork = 0; ++ break; + #ifdef WARMSTART + case 'w': + warmstart = 1; + break; + #endif + default: /* error */ +- fprintf(stderr, "usage: rpcbind [-Idwils]\n"); ++ fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); + exit (1); + } + } +diff --git a/src/rpcbind.h b/src/rpcbind.h +index c800577..74f9591 100644 +--- a/src/rpcbind.h ++++ b/src/rpcbind.h +@@ -119,7 +119,7 @@ void rpcbind_abort(void); + void reap(int); + void toggle_verboselog(int); + +-int check_access(SVCXPRT *, rpcproc_t, void *, unsigned int); ++int check_access(SVCXPRT *, rpcproc_t, rpcprog_t, unsigned int); + int check_callit(SVCXPRT *, struct r_rmtcall_args *, int); + void logit(int, struct sockaddr *, rpcproc_t, rpcprog_t, const char *); + int is_loopback(struct netbuf *); +diff --git a/src/security.c b/src/security.c +index 0edeac6..d272f74 100644 +--- a/src/security.c ++++ b/src/security.c +@@ -62,34 +62,21 @@ int log_severity = PORTMAP_LOG_FACILITY|PORTMAP_LOG_SEVERITY; + extern int verboselog; + + int +-check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, unsigned int rpcbvers) ++check_access(SVCXPRT *xprt, rpcproc_t proc, rpcprog_t prog, unsigned int rpcbvers) + { + struct netbuf *caller = svc_getrpccaller(xprt); + struct sockaddr *addr = (struct sockaddr *)caller->buf; + #ifdef LIBWRAP + struct request_info req; + #endif +- rpcprog_t prog = 0; +- rpcb *rpcbp; +- struct pmap *pmap; + + /* + * The older PMAP_* equivalents have the same numbers, so + * they are accounted for here as well. + */ + switch (proc) { +- case RPCBPROC_GETADDR: + case RPCBPROC_SET: + case RPCBPROC_UNSET: +- if (rpcbvers > PMAPVERS) { +- rpcbp = (rpcb *)args; +- prog = rpcbp->r_prog; +- } else { +- pmap = (struct pmap *)args; +- prog = pmap->pm_prog; +- } +- if (proc == RPCBPROC_GETADDR) +- break; + if (!insecure && !is_loopback(caller)) { + #ifdef RPCBIND_DEBUG + if (debugging) +@@ -101,6 +88,7 @@ check_access(SVCXPRT *xprt, rpcproc_t proc, void *args, unsigned int rpcbvers) + return 0; + } + break; ++ case RPCBPROC_GETADDR: + case RPCBPROC_CALLIT: + case RPCBPROC_INDIRECT: + case RPCBPROC_DUMP: +@@ -150,8 +138,7 @@ is_loopback(struct netbuf *nbuf) + "Checking caller's adress (port = %d)\n", + ntohs(sin->sin_port)); + #endif +- return ((sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK)) && +- (ntohs(sin->sin_port) < IPPORT_RESERVED)); ++ return (sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK)); + #ifdef INET6 + case AF_INET6: + if (!oldstyle_local) +@@ -163,10 +150,9 @@ is_loopback(struct netbuf *nbuf) + "Checking caller's adress (port = %d)\n", + ntohs(sin6->sin6_port)); + #endif +- return ((IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr) || ++ return (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr) || + (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr) && +- sin6->sin6_addr.s6_addr32[3] == htonl(INADDR_LOOPBACK))) && +- (ntohs(sin6->sin6_port) < IPV6PORT_RESERVED)); ++ sin6->sin6_addr.s6_addr32[3] == htonl(INADDR_LOOPBACK))); + #endif + case AF_LOCAL: + return 1; +diff --git a/src/warmstart.c b/src/warmstart.c +index 25e5d89..d1bb971 100644 +--- a/src/warmstart.c ++++ b/src/warmstart.c +@@ -46,7 +46,6 @@ + #include + #include + +-#include "config.h" + #include "rpcbind.h" + + #ifndef RPCBIND_STATEDIR diff --git a/packages/network/wpa_supplicant/build b/packages/network/wpa_supplicant/build index cbfcf9cb08..77909d5388 100755 --- a/packages/network/wpa_supplicant/build +++ b/packages/network/wpa_supplicant/build @@ -30,4 +30,4 @@ cp $ROOT/$PKG_DIR/config/makefile.config .config # echo "CONFIG_GNUTLS_EXTRA=y" >> .config [ ! "$DEBUG" = "yes" ] && echo "CONFIG_NO_STDOUT_DEBUG=y" >> .config -make +make LIBDIR=/usr/lib BINDIR=/usr/bin diff --git a/packages/network/wpa_supplicant/install b/packages/network/wpa_supplicant/install index 8b38a06262..4458efd4b4 100755 --- a/packages/network/wpa_supplicant/install +++ b/packages/network/wpa_supplicant/install @@ -25,9 +25,9 @@ mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/wpa_supplicant/dbus/dbus-wpa_supplicant.conf $INSTALL/etc/dbus-1/system.d -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/wpa_supplicant/wpa_supplicant $INSTALL/sbin - cp $PKG_BUILD/wpa_supplicant/wpa_passphrase $INSTALL/sbin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/wpa_supplicant/wpa_supplicant $INSTALL/usr/bin + cp $PKG_BUILD/wpa_supplicant/wpa_passphrase $INSTALL/usr/bin mkdir -p $INSTALL/usr/share/dbus-1/system-services cp $PKG_BUILD/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service $INSTALL/usr/share/dbus-1/system-services diff --git a/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-path.patch b/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-path.patch new file mode 100644 index 0000000000..92898a64e5 --- /dev/null +++ b/packages/network/wpa_supplicant/patches/wpa_supplicant-0.7.3-path.patch @@ -0,0 +1,18 @@ +diff -Naur wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service 2010-09-07 17:43:39.000000000 +0200 ++++ wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service 2011-11-06 22:34:15.331582673 +0100 +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=fi.epitest.hostap.WPASupplicant +-Exec=/sbin/wpa_supplicant -u ++Exec=/usr/bin/wpa_supplicant -u + User=root +diff -Naur wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service +--- wpa_supplicant-0.7.3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service 2010-09-07 17:43:39.000000000 +0200 ++++ wpa_supplicant-0.7.3.patch/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service 2011-11-06 22:34:24.216699484 +0100 +@@ -1,4 +1,4 @@ + [D-BUS Service] + Name=fi.w1.wpa_supplicant1 +-Exec=/sbin/wpa_supplicant -u ++Exec=/usr/bin/wpa_supplicant -u + User=root diff --git a/packages/python/graphics/Imaging/meta b/packages/python/graphics/Imaging/meta index c7928a6268..010da8fc68 100644 --- a/packages/python/graphics/Imaging/meta +++ b/packages/python/graphics/Imaging/meta @@ -24,7 +24,7 @@ PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="BSD" PKG_SITE="http://www.pythonware.com/products/pil/" -PKG_URL="http://effbot.org/downloads/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_URL="http://effbot.org/media/downloads/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="Python distribute zlib freetype $LIBJPEG" PKG_BUILD_DEPENDS="toolchain Python distribute distutilscross zlib freetype $LIBJPEG" PKG_PRIORITY="optional" diff --git a/packages/security/cryptodev-linux/build b/packages/security/cryptodev-linux/build new file mode 100755 index 0000000000..7e4881333d --- /dev/null +++ b/packages/security/cryptodev-linux/build @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD + make V=1 CC=$CC -C $(kernel_path) SUBDIRS=`pwd` modules + +mkdir -p $SYSROOT_PREFIX/usr/include/crypto + cp crypto/cryptodev.h $SYSROOT_PREFIX/usr/include/crypto \ No newline at end of file diff --git a/packages/security/cryptodev-linux/install b/packages/security/cryptodev-linux/install new file mode 100755 index 0000000000..a565817e1b --- /dev/null +++ b/packages/security/cryptodev-linux/install @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +VER=`ls $BUILD/linux*/modules/lib/modules` + +mkdir -p $INSTALL/lib/modules/$VER/cryptodev + cp $PKG_BUILD/cryptodev.ko $INSTALL/lib/modules/$VER/cryptodev diff --git a/packages/security/cryptodev-linux/meta b/packages/security/cryptodev-linux/meta new file mode 100644 index 0000000000..729fb578d2 --- /dev/null +++ b/packages/security/cryptodev-linux/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="cryptodev-linux" +PKG_VERSION="1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://home.gna.org/cryptodev-linux/" +PKG_URL="http://download.gna.org/cryptodev-linux/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="cryptodev-linux: a device that allows access to Linux kernel cryptographic drivers" +PKG_LONGDESC="Cryptodev-linux is a device that allows access to Linux kernel cryptographic drivers; thus allowing of userspace applications to take advantage of hardware accelerators. Cryptodev-linux is implemented as a standalone module that requires no dependencies other than a stock linux kernel. It's API is similar to OpenBSD's cryptodev userspace API (/dev/crypto)." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/security/cryptodev-linux/need_unpack b/packages/security/cryptodev-linux/need_unpack new file mode 100755 index 0000000000..5d6df529ff --- /dev/null +++ b/packages/security/cryptodev-linux/need_unpack @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +STAMP=$STAMPS/$1/unpack + +test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PKG_DIR/url -nt $STAMP -o \ + $PKG_DIR/meta -nt $STAMP && rm -f $STAMP + +exit 0 diff --git a/packages/security/gnutls/build b/packages/security/gnutls/build index 8189b6997b..c36e5b94f6 100755 --- a/packages/security/gnutls/build +++ b/packages/security/gnutls/build @@ -26,8 +26,6 @@ strip_lto cd $PKG_BUILD - -cd lib ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -35,35 +33,30 @@ cd lib --localstatedir=/var \ --disable-static \ --enable-shared \ + --enable-hardware-acceleration \ + --enable-cryptodev \ + --enable-openssl-compatibility \ + --without-p11-kit \ --with-included-libtasn1 \ - --with-lzo \ + --with-included-libcfg \ + --with-libnettle-prefix="$SYSROOT_PREFIX/usr" \ --with-libz-prefix="$SYSROOT_PREFIX/usr" \ - --with-libgcrypt \ - --with-libgcrypt-prefix="$SYSROOT_PREFIX/usr" \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-gtk-doc-pdf \ --disable-nls \ + --disable-guile \ + --disable-valgrind-tests \ --with-gnu-ld -# --enable-cryptodev \ # TODO: add later +# --enable-extra-pki \ +# --enable-srp-authentication \ +# --enable-anon-authentication \ +# --disable-psk-authentication=yes \ +# --disable-openpgp-authentication=yes \ -make -$MAKEINSTALL - -cd ../libextra -./configure --host=$TARGET_NAME \ - --build=$HOST_NAME \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --enable-shared \ - --with-included-libtasn1 \ - --with-lzo \ - --with-libgcrypt \ - --with-libgcrypt-prefix="$SYSROOT_PREFIX/usr" \ - --with-gnu-ld - -# --enable-openssl-compatibility \ -# --enable-cryptodev \ # TODO: add later - -make -$MAKEINSTALL +make -C gl +make -C lib +make -C extra +$MAKEINSTALL -C lib +$MAKEINSTALL -C extra diff --git a/packages/security/gnutls/install b/packages/security/gnutls/install index baec342186..9591cfe7d6 100755 --- a/packages/security/gnutls/install +++ b/packages/security/gnutls/install @@ -26,7 +26,5 @@ mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/lib/.libs/libgnutls.so* $INSTALL/usr/lib cp -P $PKG_BUILD/lib/.libs/libgnutlsxx.so* $INSTALL/usr/lib rm -rf $INSTALL/usr/lib/libgnutlsxx.so*T - cp -P $PKG_BUILD/libextra/.libs/libgnutls-extra.so* $INSTALL/usr/lib - rm -rf $INSTALL/usr/lib/libgnutls-extra.so*T - cp -P $PKG_BUILD/libextra/.libs/libgnutls-openssl.so* $INSTALL/usr/lib + cp -P $PKG_BUILD/extra/.libs/libgnutls-openssl.so* $INSTALL/usr/lib rm -rf $INSTALL/usr/lib/libgnutls-openssl.so*T diff --git a/packages/security/gnutls/meta b/packages/security/gnutls/meta index 6d34bf55cc..97734a5e61 100644 --- a/packages/security/gnutls/meta +++ b/packages/security/gnutls/meta @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="gnutls" -PKG_VERSION="2.10.5" +PKG_VERSION="3.0.7" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="LGPL" PKG_SITE="http://www.gnutls.org/" -PKG_URL="http://ftp.gnu.org/gnu/gnutls/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_DEPENDS="zlib lzo libgcrypt" -PKG_BUILD_DEPENDS="toolchain zlib lzo libgcrypt" +PKG_URL="http://ftp.gnu.org/gnu/gnutls/$PKG_NAME-$PKG_VERSION.tar.xz" +PKG_DEPENDS="cryptodev-linux zlib nettle" +PKG_BUILD_DEPENDS="toolchain cryptodev-linux zlib nettle" PKG_PRIORITY="optional" PKG_SECTION="security" PKG_SHORTDESC="gnutls: Development Library for TLS applications" diff --git a/packages/security/nettle/build b/packages/security/nettle/build new file mode 100755 index 0000000000..bb60b56693 --- /dev/null +++ b/packages/security/nettle/build @@ -0,0 +1,37 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-shared \ + --disable-openssl \ + --with-gnu-ld + +make +$MAKEINSTALL diff --git a/packages/security/nettle/install b/packages/security/nettle/install new file mode 100755 index 0000000000..1f374394e5 --- /dev/null +++ b/packages/security/nettle/install @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/libnettle.so $INSTALL/usr/lib + ln -sf libnettle.so $INSTALL/usr/lib/`basename $PKG_BUILD/.lib/libnettle.so.[0-9]` + cp -P $PKG_BUILD/libhogweed.so $INSTALL/usr/lib + ln -sf libhogweed.so $INSTALL/usr/lib/`basename $PKG_BUILD/.lib/libhogweed.so.[0-9]` diff --git a/packages/security/nettle/meta b/packages/security/nettle/meta new file mode 100644 index 0000000000..aaa9ce2775 --- /dev/null +++ b/packages/security/nettle/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="nettle" +PKG_VERSION="2.4" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.lysator.liu.se/~nisse/nettle" +PKG_URL="http://www.lysator.liu.se/~nisse/archive/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="gmp" +PKG_BUILD_DEPENDS="toolchain gmp" +PKG_PRIORITY="optional" +PKG_SECTION="security" +PKG_SHORTDESC="nettle: a cryptographic library" +PKG_LONGDESC="Nettle is a cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space. In most contexts, you need more than the basic cryptographic algorithms, you also need some way to keep track of available algorithms, their properties and variants. You often have some algorithm selection process, often dictated by a protocol you want to implement." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="yes" diff --git a/packages/security/polkit/meta b/packages/security/polkit/meta index 396aff420d..3fa1006410 100644 --- a/packages/security/polkit/meta +++ b/packages/security/polkit/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="polkit" -PKG_VERSION="0.101" +PKG_VERSION="0.102" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="MIT" diff --git a/packages/sysutils/ConsoleKit/build b/packages/sysutils/ConsoleKit/build index b89b782e8b..13942fed6a 100755 --- a/packages/sysutils/ConsoleKit/build +++ b/packages/sysutils/ConsoleKit/build @@ -26,8 +26,9 @@ cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --sysconfdir=/etc \ - --sbindir=/sbin \ --libexecdir=/usr/lib/ConsoleKit \ --localstatedir=/var \ --disable-static \ diff --git a/packages/sysutils/ConsoleKit/install b/packages/sysutils/ConsoleKit/install index dc6238b008..3ac6908ecf 100755 --- a/packages/sysutils/ConsoleKit/install +++ b/packages/sysutils/ConsoleKit/install @@ -30,13 +30,11 @@ mkdir -p $INSTALL/etc/ConsoleKit/seats.d mkdir -p $INSTALL/etc/dbus-1/system.d cp -P $PKG_BUILD/data/ConsoleKit.conf $INSTALL/etc/dbus-1/system.d -mkdir -p $INSTALL/sbin - cp -P $PKG_BUILD/tools/ck-log-system-restart $INSTALL/sbin - cp -P $PKG_BUILD/tools/ck-log-system-start $INSTALL/sbin - cp -P $PKG_BUILD/tools/ck-log-system-stop $INSTALL/sbin - cp -P $PKG_BUILD/src/console-kit-daemon $INSTALL/sbin - mkdir -p $INSTALL/usr/bin + cp -P $PKG_BUILD/tools/ck-log-system-restart $INSTALL/usr/bin + cp -P $PKG_BUILD/tools/ck-log-system-start $INSTALL/usr/bin + cp -P $PKG_BUILD/tools/ck-log-system-stop $INSTALL/usr/bin + cp -P $PKG_BUILD/src/console-kit-daemon $INSTALL/usr/bin cp -P $PKG_BUILD/tools/.libs/ck-launch-session $INSTALL/usr/bin cp -P $PKG_BUILD/tools/ck-list-sessions $INSTALL/usr/bin cp -P $PKG_BUILD/tools/ck-history $INSTALL/usr/bin diff --git a/packages/sysutils/LVM2/build b/packages/sysutils/LVM2/build index 6ccacdb5e4..a90a9db9d9 100755 --- a/packages/sysutils/LVM2/build +++ b/packages/sysutils/LVM2/build @@ -27,6 +27,8 @@ ac_cv_func_malloc_0_nonnull=yes \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --disable-lvm1_fallback \ --disable-static_link \ --disable-readline \ @@ -47,3 +49,4 @@ ac_cv_func_malloc_0_nonnull=yes \ make $MAKEINSTALL +make DESTDIR=`pwd`/.install install \ No newline at end of file diff --git a/packages/sysutils/LVM2/install b/packages/sysutils/LVM2/install index ea7d1253ba..9e07a90c7d 100755 --- a/packages/sysutils/LVM2/install +++ b/packages/sysutils/LVM2/install @@ -29,7 +29,7 @@ mkdir -p $INSTALL/usr/lib cp -P $PKG_BUILD/libdm/ioctl/libdevmapper.so* $INSTALL/usr/lib if [ "$DEVTOOLS" = yes ]; then - mkdir -p $INSTALL/sbin - cp $PKG_BUILD/tools/lvm $INSTALL/sbin + mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/tools/lvm $INSTALL/usr/bin fi diff --git a/packages/sysutils/busybox/config/busybox.conf b/packages/sysutils/busybox/config/busybox.conf index 9cb258f583..17a1e9f14f 100644 --- a/packages/sysutils/busybox/config/busybox.conf +++ b/packages/sysutils/busybox/config/busybox.conf @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Busybox version: 1.19.2 -# Wed Sep 28 18:13:56 2011 +# Busybox version: 1.19.3 +# Fri Nov 11 18:25:06 2011 # CONFIG_HAVE_DOT_CONFIG=y @@ -23,8 +23,8 @@ CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y CONFIG_SHOW_USAGE=y CONFIG_FEATURE_VERBOSE_USAGE=y # CONFIG_FEATURE_COMPRESS_USAGE is not set -# CONFIG_FEATURE_INSTALLER is not set -# CONFIG_INSTALL_NO_USR is not set +CONFIG_FEATURE_INSTALLER=y +CONFIG_INSTALL_NO_USR=y # CONFIG_LOCALE_SUPPORT is not set CONFIG_UNICODE_SUPPORT=y # CONFIG_UNICODE_USING_LOCALE is not set @@ -517,7 +517,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" # CONFIG_REV is not set # CONFIG_ACPID is not set # CONFIG_FEATURE_ACPID_COMPAT is not set -# CONFIG_BLKID is not set +CONFIG_BLKID=y # CONFIG_FEATURE_BLKID_TYPE is not set CONFIG_DMESG=y CONFIG_FEATURE_DMESG_PRETTY=y @@ -572,7 +572,7 @@ CONFIG_FEATURE_MOUNT_VERBOSE=y CONFIG_FEATURE_MOUNT_HELPERS=y CONFIG_FEATURE_MOUNT_LABEL=y CONFIG_FEATURE_MOUNT_NFS=y -# CONFIG_FEATURE_MOUNT_CIFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y CONFIG_FEATURE_MOUNT_FLAGS=y # CONFIG_FEATURE_MOUNT_FSTAB is not set # CONFIG_PIVOT_ROOT is not set @@ -585,7 +585,7 @@ CONFIG_RDATE=y # CONFIG_SETARCH is not set # CONFIG_SWAPONOFF is not set # CONFIG_FEATURE_SWAPON_PRI is not set -# CONFIG_SWITCH_ROOT is not set +CONFIG_SWITCH_ROOT=y CONFIG_UMOUNT=y CONFIG_FEATURE_UMOUNT_ALL=y diff --git a/packages/sysutils/busybox/profile.d/systemid.conf b/packages/sysutils/busybox/profile.d/systemid.conf index d358798797..a3d985e9cb 100644 --- a/packages/sysutils/busybox/profile.d/systemid.conf +++ b/packages/sysutils/busybox/profile.d/systemid.conf @@ -32,7 +32,7 @@ elif [ -e "/sys/class/net/wlan0/address" ]; then fi if [ -n "$MAC_ADRESS" ]; then - SYSTEMID=`/bin/echo $MAC_ADRESS | /usr/bin/md5sum | /usr/bin/cut -f1 -d" "` + SYSTEMID=`echo $MAC_ADRESS | md5sum | cut -f1 -d" "` fi export SYSTEMID diff --git a/packages/sysutils/dbus/build b/packages/sysutils/dbus/build index 61eeed1888..31310402b2 100755 --- a/packages/sysutils/dbus/build +++ b/packages/sysutils/dbus/build @@ -42,13 +42,13 @@ mkdir -p .build-target && cd .build-target --disable-xml-docs \ --disable-doxygen-docs \ --enable-abstract-sockets \ - --enable-x11-autolaunch \ + --disable-x11-autolaunch \ --disable-selinux \ --disable-libaudit \ --enable-dnotify \ --enable-inotify \ --with-xml=expat \ - --with-x \ + --without-x \ --with-dbus-user=dbus \ make diff --git a/packages/sysutils/dbus/meta b/packages/sysutils/dbus/meta index 6f6c013875..7dad0841e1 100644 --- a/packages/sysutils/dbus/meta +++ b/packages/sysutils/dbus/meta @@ -25,8 +25,8 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://dbus.freedesktop.org" PKG_URL="http://dbus.freedesktop.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.gz" -PKG_DEPENDS="expat libX11" -PKG_BUILD_DEPENDS="toolchain expat libX11" +PKG_DEPENDS="expat" +PKG_BUILD_DEPENDS="toolchain expat" PKG_PRIORITY="required" PKG_SECTION="system" PKG_SHORTDESC="dbus: simple interprocess messaging system" diff --git a/packages/sysutils/diskdev_cmds/install b/packages/sysutils/diskdev_cmds/install index 032b34818e..387ea8d658 100755 --- a/packages/sysutils/diskdev_cmds/install +++ b/packages/sysutils/diskdev_cmds/install @@ -22,11 +22,7 @@ . config/options $1 -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/fsck_hfs.tproj/fsck_hfs $INSTALL/sbin - ln -sf fsck_hfs $INSTALL/sbin/fsck.hfs - ln -sf fsck_hfs $INSTALL/sbin/fsck.hfsplus - - cp $PKG_BUILD/newfs_hfs.tproj/newfs_hfs $INSTALL/sbin - ln -sf newfs_hfs $INSTALL/sbin/mkfs.hfs - ln -sf newfs_hfs $INSTALL/sbin/mkfs.hfsplus +mkdir -p $INSTALL/bin + cp $PKG_BUILD/fsck_hfs.tproj/fsck_hfs $INSTALL/bin + ln -sf fsck_hfs $INSTALL/bin/fsck.hfs + ln -sf fsck_hfs $INSTALL/bin/fsck.hfsplus diff --git a/packages/sysutils/e2fsprogs/build b/packages/sysutils/e2fsprogs/build index 93a7dcb5d5..6e4961d798 100755 --- a/packages/sysutils/e2fsprogs/build +++ b/packages/sysutils/e2fsprogs/build @@ -27,6 +27,8 @@ cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --sysconfdir=/etc \ --enable-verbose-makecmds \ --enable-symlink-install \ diff --git a/packages/sysutils/e2fsprogs/install b/packages/sysutils/e2fsprogs/install index 41e7d9399a..699adb350c 100755 --- a/packages/sysutils/e2fsprogs/install +++ b/packages/sysutils/e2fsprogs/install @@ -25,23 +25,23 @@ mkdir -p $INSTALL/etc cp $PKG_BUILD/misc/mke2fs.conf $INSTALL/etc -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/e2fsck/e2fsck $INSTALL/sbin - ln -sf e2fsck $INSTALL/sbin/fsck.ext2 - ln -sf e2fsck $INSTALL/sbin/fsck.ext3 - ln -sf e2fsck $INSTALL/sbin/fsck.ext4 - ln -sf e2fsck $INSTALL/sbin/fsck.ext4dev - cp $PKG_BUILD/misc/mke2fs $INSTALL/sbin - ln -sf mke2fs $INSTALL/sbin/mkfs.ext2 - ln -sf mke2fs $INSTALL/sbin/mkfs.ext3 - ln -sf mke2fs $INSTALL/sbin/mkfs.ext4 - ln -sf mke2fs $INSTALL/sbin/mkfs.ext4dev - cp $PKG_BUILD/resize/resize2fs $INSTALL/sbin - cp $PKG_BUILD/misc/tune2fs $INSTALL/sbin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/e2fsck/e2fsck $INSTALL/usr/bin + ln -sf e2fsck $INSTALL/usr/bin/fsck.ext2 + ln -sf e2fsck $INSTALL/usr/bin/fsck.ext3 + ln -sf e2fsck $INSTALL/usr/bin/fsck.ext4 + ln -sf e2fsck $INSTALL/usr/bin/fsck.ext4dev + cp $PKG_BUILD/misc/mke2fs $INSTALL/usr/bin + ln -sf mke2fs $INSTALL/usr/bin/mkfs.ext2 + ln -sf mke2fs $INSTALL/usr/bin/mkfs.ext3 + ln -sf mke2fs $INSTALL/usr/bin/mkfs.ext4 + ln -sf mke2fs $INSTALL/usr/bin/mkfs.ext4dev + cp $PKG_BUILD/resize/resize2fs $INSTALL/usr/bin + cp $PKG_BUILD/misc/tune2fs $INSTALL/usr/bin -mkdir -p $INSTALL/lib - cp -P $PKG_BUILD/lib/*.so.[0-9] $INSTALL/lib - cp -P $PKG_BUILD/lib/e2p/libe2p.so.* $INSTALL/lib - cp -P $PKG_BUILD/lib/et/libcom_err.so.* $INSTALL/lib - cp -P $PKG_BUILD/lib/ext2fs/libext2fs.so.* $INSTALL/lib - cp -P $PKG_BUILD/lib/ss/libss.so.* $INSTALL/lib +mkdir -p $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/*.so.[0-9] $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/e2p/libe2p.so.* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/et/libcom_err.so.* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/ext2fs/libext2fs.so.* $INSTALL/usr/lib + cp -P $PKG_BUILD/lib/ss/libss.so.* $INSTALL/usr/lib diff --git a/packages/sysutils/grep/install b/packages/sysutils/grep/install index bb01f9a050..31fd6792a9 100755 --- a/packages/sysutils/grep/install +++ b/packages/sysutils/grep/install @@ -22,5 +22,5 @@ . config/options $1 -mkdir -p $INSTALL/bin - cp $PKG_BUILD/src/grep $INSTALL/bin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/src/grep $INSTALL/usr/bin diff --git a/packages/sysutils/libatasmart/build b/packages/sysutils/libatasmart/build index 8d9ad06f03..6b3e2df4df 100755 --- a/packages/sysutils/libatasmart/build +++ b/packages/sysutils/libatasmart/build @@ -22,9 +22,11 @@ . config/options $1 -cd $PKG_BUILD +export CC_FOR_BUILD="$HOST_CC" +export BUILD_CFLAGS="$HOST_CFLAGS" +export BUILD_LDFLAGS="$HOST_LDFLAGS" -mkdir -p m4 && do_autoreconf +cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -34,7 +36,5 @@ mkdir -p m4 && do_autoreconf --disable-static \ --enable-shared \ -make CC="$HOST_CC" CFLAGS="$HOST_CFLAGS" LDFLAGS="$HOST_LDFLAGS" strpool make - $MAKEINSTALL diff --git a/packages/sysutils/libatasmart/meta b/packages/sysutils/libatasmart/meta index ea0a5bbec5..79acb669a6 100644 --- a/packages/sysutils/libatasmart/meta +++ b/packages/sysutils/libatasmart/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libatasmart" -PKG_VERSION="0.17" +PKG_VERSION="0.18" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/sysutils/ntfs-3g_ntfsprogs/build b/packages/sysutils/ntfs-3g_ntfsprogs/build index 18d13a123f..d3056136f1 100755 --- a/packages/sysutils/ntfs-3g_ntfsprogs/build +++ b/packages/sysutils/ntfs-3g_ntfsprogs/build @@ -26,6 +26,8 @@ cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --enable-shared \ --disable-static \ --disable-dependency-tracking \ diff --git a/packages/sysutils/ntfs-3g_ntfsprogs/install b/packages/sysutils/ntfs-3g_ntfsprogs/install index 8eace56988..4222508f28 100755 --- a/packages/sysutils/ntfs-3g_ntfsprogs/install +++ b/packages/sysutils/ntfs-3g_ntfsprogs/install @@ -22,9 +22,7 @@ . config/options $1 -mkdir -p $INSTALL/bin - cp $PKG_BUILD/src/ntfs-3g $INSTALL/bin - -mkdir -p $INSTALL/sbin - ln -sf /bin/ntfs-3g $INSTALL/sbin/mount.ntfs - ln -sf /bin/ntfs-3g $INSTALL/sbin/mount.ntfs-3g +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/src/ntfs-3g $INSTALL/usr/bin + ln -sf ntfs-3g $INSTALL/usr/bin/mount.ntfs + ln -sf ntfs-3g $INSTALL/usr/bin/mount.ntfs-3g diff --git a/packages/sysutils/remote/eventlircd/evmap/03_0471_0613.evmap b/packages/sysutils/remote/eventlircd/evmap/03_0471_0613.evmap new file mode 100644 index 0000000000..07bf67c4eb --- /dev/null +++ b/packages/sysutils/remote/eventlircd/evmap/03_0471_0613.evmap @@ -0,0 +1,38 @@ +# 0471:0613 PHILIPS MCE USB IR Receiver- Spinel plus + + KEY_1 = KEY_NUMERIC_1 # 1 + KEY_2 = KEY_NUMERIC_2 # 2 + KEY_3 = KEY_NUMERIC_3 # 3 + KEY_4 = KEY_NUMERIC_4 # 4 + KEY_5 = KEY_NUMERIC_5 # 5 + KEY_6 = KEY_NUMERIC_6 # 6 + KEY_7 = KEY_NUMERIC_7 # 7 + KEY_8 = KEY_NUMERIC_8 # 8 + KEY_9 = KEY_NUMERIC_9 # 9 + KEY_0 = KEY_NUMERIC_0 # 0 + shift+KEY_8 = KEY_NUMERIC_STAR # * + shift+KEY_3 = KEY_NUMERIC_POUND # # + + KEY_POWER = KEY_POWER # Power + KEY_RECORD = KEY_RECORD # Record + KEY_PAUSE = KEY_PAUSE # Pause + KEY_STOPCD = KEY_STOP # Stop + KEY_REWIND = KEY_REWIND # Rev + KEY_PLAY = KEY_PLAY # Play + KEY_FASTFORWARD = KEY_FASTFORWARD # Fwd + KEY_PREVIOUSSONG = KEY_PREVIOUS # Prev + KEY_NEXTSONG = KEY_NEXT # Next + KEY_BACK = KEY_EXIT # BACK + KEY_PROPS = KEY_INFO # Info/EPG + KEY_LEFT = KEY_LEFT # Left Arrow + KEY_RIGHT = KEY_RIGHT # Right Arrow + KEY_UP = KEY_UP # Up Arrow + KEY_DOWN = KEY_DOWN # Down Arrow + KEY_ENTER = KEY_OK # Enter & Ok + KEY_VOLUMEUP = KEY_VOLUMEUP # Vol + + KEY_VOLUMEDOWN = KEY_VOLUMEDOWN # Vol - + KEY_CHANNELUP = KEY_CHANNELUP # CH/PG up + KEY_CHANNELDOWN = KEY_CHANNELDOWN # CH/PG down + KEY_MUTE = KEY_MUTE # Mute + KEY_PROGRAM = KEY_SUBTITLE # Program # remapped to Subtitle + KEY_ESC = KEY_DELETE # Delete/Clear diff --git a/packages/sysutils/remote/eventlircd/install b/packages/sysutils/remote/eventlircd/install index 7e4837fce5..b9e8029395 100755 --- a/packages/sysutils/remote/eventlircd/install +++ b/packages/sysutils/remote/eventlircd/install @@ -25,11 +25,11 @@ mkdir -p $INSTALL/usr/sbin cp $PKG_BUILD/src/eventlircd $INSTALL/usr/sbin -mkdir -p $INSTALL/lib/udev - cp $PKG_BUILD/udev/lircd_helper $INSTALL/lib/udev - chmod +x $INSTALL/lib/udev/lircd_helper - cp $PKG_BUILD/udev/wakeup_enable $INSTALL/lib/udev - chmod +x $INSTALL/lib/udev/wakeup_enable +mkdir -p $INSTALL/usr/lib/udev + cp $PKG_BUILD/udev/lircd_helper $INSTALL/usr/lib/udev + chmod +x $INSTALL/usr/lib/udev/lircd_helper + cp $PKG_BUILD/udev/wakeup_enable $INSTALL/usr/lib/udev + chmod +x $INSTALL/usr/lib/udev/wakeup_enable mkdir -p $INSTALL/etc/eventlircd.d cp $PKG_DIR/evmap/*.evmap $INSTALL/etc/eventlircd.d diff --git a/packages/sysutils/remote/eventlircd/udev.d/98-eventlircd.rules b/packages/sysutils/remote/eventlircd/udev.d/98-eventlircd.rules index 259831e33e..fb8febd84f 100644 --- a/packages/sysutils/remote/eventlircd/udev.d/98-eventlircd.rules +++ b/packages/sysutils/remote/eventlircd/udev.d/98-eventlircd.rules @@ -135,6 +135,10 @@ ENV{ID_VENDOR_ID}=="9022", ENV{ID_MODEL_ID}=="d660", \ ENV{eventlircd_enable}="true", \ ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap" +ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="0613", \ + ENV{eventlircd_enable}="true", \ + ENV{eventlircd_evmap}="03_$env{ID_VENDOR_ID}_$env{ID_MODEL_ID}.evmap" + # Enable wake-on-usb for the USB remotes. RUN+="wakeup_enable" diff --git a/packages/sysutils/udev/build b/packages/sysutils/udev/build index 8acffaf7b1..1c503aaee6 100755 --- a/packages/sysutils/udev/build +++ b/packages/sysutils/udev/build @@ -31,8 +31,9 @@ LDFLAGS="$LDFLAGS -I$SYSROOT_PREFIX/usr/include/glib-2.0" \ --build=$HOST_NAME \ --prefix=/usr \ --sysconfdir=/etc \ - --sbindir=/sbin \ - --libexecdir=/lib/udev \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/udev \ --localstatedir=/var \ --disable-silent-rules \ --disable-static \ @@ -52,7 +53,7 @@ LDFLAGS="$LDFLAGS -I$SYSROOT_PREFIX/usr/include/glib-2.0" \ --disable-edd \ --without-selinux \ --without-systemdsystemunitdir \ - --with-firmware-path=/lib/firmware \ + --with-firmware-path="/storage/.config/firmware:/usr/lib/firmware" \ --with-pci-ids-path=/usr/share/pci.ids \ --with-usb-ids-path=/usr/share/usb.ids \ --with-gnu-ld \ diff --git a/packages/sysutils/udev/init.d/13_udev-trigger b/packages/sysutils/udev/init.d/13_udev-trigger index 65f1cebc65..18b5f503d2 100644 --- a/packages/sysutils/udev/init.d/13_udev-trigger +++ b/packages/sysutils/udev/init.d/13_udev-trigger @@ -24,10 +24,10 @@ # runlevels: openelec, installer, textmode progress "request udev events from the kernel (type: subsystems)" - /sbin/udevadm trigger --type=subsystems --action=add + udevadm trigger --type=subsystems --action=add progress "request udev events from the kernel (type: devices)" - /sbin/udevadm trigger --type=devices --action=add + udevadm trigger --type=devices --action=add progress "watching udev event queue from the kernel" - /sbin/udevadm settle & + udevadm settle & diff --git a/packages/sysutils/udev/install b/packages/sysutils/udev/install index 20f83e0763..340da9e3dc 100755 --- a/packages/sysutils/udev/install +++ b/packages/sysutils/udev/install @@ -32,38 +32,39 @@ add_group tape 33 add_group tty 5 add_group video 39 -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/$1/udevadm $INSTALL/sbin - cp $PKG_BUILD/$1/udevd $INSTALL/sbin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/$1/udevadm $INSTALL/usr/bin + cp $PKG_BUILD/$1/udevd $INSTALL/usr/bin mkdir -p $INSTALL/usr/lib cp -PR $PKG_BUILD/libudev/.libs/libudev.so* $INSTALL/usr/lib cp -PR $PKG_BUILD/extras/gudev/.libs/libgudev*.so* $INSTALL/usr/lib rm -rf $INSTALL/usr/lib/libgudev*.*T -mkdir -p $INSTALL/lib/udev - for i in accelerometer ata_id cdrom_id collect firmware input_id mtd_probe path_id scsi_id usb-db usb_id v4l_id; do - cp $PKG_BUILD/extras/$i/$i $INSTALL/lib/udev +mkdir -p $INSTALL/usr/lib/udev + for i in accelerometer ata_id cdrom_id collect firmware mtd_probe scsi_id usb-db v4l_id; do + cp $PKG_BUILD/extras/$i/$i $INSTALL/usr/lib/udev done - cp $PKG_BUILD/extras/usb-db/pci-db $INSTALL/lib/udev + cp $PKG_BUILD/extras/usb-db/pci-db $INSTALL/usr/lib/udev -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/extras/accelerometer/61-accelerometer.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/extras/firmware/50-firmware.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/50-udev-default.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/extras/cdrom_id/60-cdrom_id.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/60-persistent-alsa.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/60-persistent-input.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/60-persistent-serial.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/60-persistent-storage-tape.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/60-persistent-storage.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/extras/v4l_id/60-persistent-v4l.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/extras/mtd_probe/75-probe_mtd.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/78-sound-card.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/80-drivers.rules $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/rules/rules.d/95-udev-late.rules $INSTALL/lib/udev/rules.d +mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/extras/firmware/50-firmware.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/50-udev-default.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/extras/cdrom_id/60-cdrom_id.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/60-persistent-alsa.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/60-persistent-input.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/60-persistent-serial.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/60-persistent-storage-tape.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/60-persistent-storage.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/extras/v4l_id/60-persistent-v4l.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/extras/accelerometer/61-accelerometer.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/75-net-description.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/extras/mtd_probe/75-probe_mtd.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/78-sound-card.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/80-drivers.rules $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/rules/rules.d/95-udev-late.rules $INSTALL/usr/lib/udev/rules.d -mkdir -p $INSTALL/lib/udev/devices +mkdir -p $INSTALL/usr/lib/udev/devices mkdir -p $INSTALL/etc/udev cp $PKG_BUILD/udev.conf $INSTALL/etc/udev diff --git a/packages/sysutils/udev/meta b/packages/sysutils/udev/meta index ae102e74f2..538006f46c 100644 --- a/packages/sysutils/udev/meta +++ b/packages/sysutils/udev/meta @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="udev" -PKG_VERSION="173" +PKG_VERSION="175" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://ftp.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" #PKG_URL="http://www.eu.kernel.org/pub/linux/utils/kernel/hotplug/$PKG_NAME-$PKG_VERSION.tar.bz2" #PKG_URL="ftp://ftp.pgpi.com/linux/kernel/pub/linux/utils/kernel/hotplug/$PKG_NAME-$PKG_VERSION.tar.bz2" -PKG_URL="http://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/utils/kernel/hotplug/$PKG_NAME-$PKG_VERSION.tar.bz2" +PKG_URL="http://people.freedesktop.org/~kay/udev/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="glib pciutils usbutils libusb-compat" PKG_BUILD_DEPENDS="toolchain glib pciutils usbutils libusb-compat" PKG_PRIORITY="optional" diff --git a/packages/sysutils/udev/patches/udev-175-003-blkid_path-0.1.patch b/packages/sysutils/udev/patches/udev-175-003-blkid_path-0.1.patch new file mode 100644 index 0000000000..98372ad256 --- /dev/null +++ b/packages/sysutils/udev/patches/udev-175-003-blkid_path-0.1.patch @@ -0,0 +1,19 @@ +diff -Naur udev-173/rules/rules.d/60-persistent-storage.rules udev-173.patch/rules/rules.d/60-persistent-storage.rules +--- udev-173/rules/rules.d/60-persistent-storage.rules 2011-07-18 20:00:25.000000000 +0200 ++++ udev-173.patch/rules/rules.d/60-persistent-storage.rules 2011-11-04 20:42:24.734426182 +0100 +@@ -66,12 +66,12 @@ + ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" + + # probe filesystem metadata of optical drives which have a media inserted +-KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" ++KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/usr/bin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode" + # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +-KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode" ++KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/usr/bin/blkid -o udev -p -u noraid $tempnode" + + # probe filesystem metadata of disks +-KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode" ++KERNEL!="sr*", IMPORT{program}="/usr/bin/blkid -o udev -p $tempnode" + + # watch metadata changes by tools closing the device after writing + KERNEL!="sr*", OPTIONS+="watch" diff --git a/packages/sysutils/udisks/build b/packages/sysutils/udisks/build index 796665aa7f..a1dc97187f 100755 --- a/packages/sysutils/udisks/build +++ b/packages/sysutils/udisks/build @@ -26,6 +26,8 @@ cd $PKG_BUILD ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --sysconfdir=/etc \ --datadir=/usr/share \ --libexecdir=/usr/lib/udisks \ diff --git a/packages/sysutils/udisks/init.d/15_automount b/packages/sysutils/udisks/init.d/15_automount index bdaec73e5e..66d4d68a7e 100644 --- a/packages/sysutils/udisks/init.d/15_automount +++ b/packages/sysutils/udisks/init.d/15_automount @@ -24,4 +24,4 @@ # runlevels: openelec, installer, textmode progress "request events from the kernel (subsystem: block)" - /sbin/udevadm trigger --subsystem-match=block --action=add & + udevadm trigger --subsystem-match=block --action=add & diff --git a/packages/sysutils/udisks/install b/packages/sysutils/udisks/install index db9474e26d..15ce595976 100755 --- a/packages/sysutils/udisks/install +++ b/packages/sysutils/udisks/install @@ -25,20 +25,18 @@ mkdir -p $INSTALL/etc/dbus-1/system.d cp $PKG_BUILD/data/org.freedesktop.UDisks.conf $INSTALL/etc/dbus-1/system.d -mkdir -p $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-dm-export $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-part-id $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-probe-ata-smart $INSTALL/lib/udev - cp -P $PKG_BUILD/src/probers/udisks-probe-sas-expander $INSTALL/lib/udev +mkdir -p $INSTALL/usr/lib/udev + cp -P $PKG_BUILD/src/probers/udisks-dm-export $INSTALL/usr/lib/udev + cp -P $PKG_BUILD/src/probers/udisks-part-id $INSTALL/usr/lib/udev + cp -P $PKG_BUILD/src/probers/udisks-probe-ata-smart $INSTALL/usr/lib/udev + cp -P $PKG_BUILD/src/probers/udisks-probe-sas-expander $INSTALL/usr/lib/udev -mkdir -p $INSTALL/lib/udev/rules.d -# cp $PKG_BUILD/data/80-udisks.rules $INSTALL/lib/udev/rules.d - -mkdir -p $INSTALL/sbin - cp -P $PKG_BUILD/tools/umount.udisks $INSTALL/sbin +mkdir -p $INSTALL/usr/lib/udev/rules.d +# cp $PKG_BUILD/data/80-udisks.rules $INSTALL/usr/lib/udev/rules.d mkdir -p $INSTALL/usr/bin cp -P $PKG_BUILD/tools/udisks $INSTALL/usr/bin + cp -P $PKG_BUILD/tools/umount.udisks $INSTALL/usr/bin mkdir -p $INSTALL/usr/lib/udisks cp -P $PKG_BUILD/src/udisks-daemon $INSTALL/usr/lib/udisks diff --git a/packages/sysutils/util-linux/build b/packages/sysutils/util-linux/build index 9844a006e5..8ed4735ca6 100755 --- a/packages/sysutils/util-linux/build +++ b/packages/sysutils/util-linux/build @@ -27,6 +27,8 @@ gt_cv_func_gnugettext1_libintl=no \ ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/bin \ --disable-silent-rules \ --enable-shared \ --disable-static \ diff --git a/packages/sysutils/util-linux/install b/packages/sysutils/util-linux/install index 659b5e8784..7486115d0b 100755 --- a/packages/sysutils/util-linux/install +++ b/packages/sysutils/util-linux/install @@ -22,12 +22,12 @@ . config/options $1 -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/misc-utils/.libs/blkid $INSTALL/sbin - cp $PKG_BUILD/sys-utils/fstrim $INSTALL/sbin - cp $PKG_BUILD/mount/.libs/swapon $INSTALL/sbin - ln -sf swapon $INSTALL/sbin/swapoff - cp $PKG_BUILD/fsck/.libs/fsck $INSTALL/sbin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/misc-utils/.libs/blkid $INSTALL/usr/bin + cp $PKG_BUILD/sys-utils/fstrim $INSTALL/usr/bin + cp $PKG_BUILD/mount/.libs/swapon $INSTALL/usr/bin + ln -sf swapon $INSTALL/usr/bin/swapoff + cp $PKG_BUILD/fsck/.libs/fsck $INSTALL/usr/bin mkdir -p $INSTALL/usr/lib cp -PR $PKG_BUILD/libblkid/src/.libs/libblkid.so* $INSTALL/usr/lib diff --git a/packages/sysutils/util-linux/udev.d.bk/10-fsck.rules b/packages/sysutils/util-linux/udev.d.bk/10-fsck.rules index e2af879c71..29cee79a44 100644 --- a/packages/sysutils/util-linux/udev.d.bk/10-fsck.rules +++ b/packages/sysutils/util-linux/udev.d.bk/10-fsck.rules @@ -22,7 +22,7 @@ SUBSYSTEM!="block", GOTO="end" DEVTYPE!="partition", GOTO="end" -ACTION=="add|change", RUN+="/sbin/fsck -M -T -a /dev/%k" +ACTION=="add|change", RUN+="/usr/bin/fsck -M -T -a /dev/%k" # exit LABEL="end" diff --git a/packages/sysutils/v4l-utils/install b/packages/sysutils/v4l-utils/install index 035878ddeb..d5935ab8b0 100755 --- a/packages/sysutils/v4l-utils/install +++ b/packages/sysutils/v4l-utils/install @@ -25,8 +25,8 @@ mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/utils/keytable/ir-keytable $INSTALL/usr/bin -mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_BUILD/utils/keytable/*.rules $INSTALL/lib/udev/rules.d +mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_BUILD/utils/keytable/*.rules $INSTALL/usr/lib/udev/rules.d mkdir -p $INSTALL/etc cp $PKG_BUILD/utils/keytable/rc_maps.cfg $INSTALL/etc diff --git a/packages/textproc/expat-host/meta b/packages/textproc/expat-host/meta index 7ed99955af..9c62e0a861 100644 --- a/packages/textproc/expat-host/meta +++ b/packages/textproc/expat-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://expat.sourceforge.net/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain" +PKG_BUILD_DEPENDS="ccache autotools" PKG_PRIORITY="optional" PKG_SECTION="textproc" PKG_SHORTDESC="expat: XML parser library" diff --git a/packages/textproc/libxml2-host/meta b/packages/textproc/libxml2-host/meta index e98d4e804c..a4755f2d23 100644 --- a/packages/textproc/libxml2-host/meta +++ b/packages/textproc/libxml2-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="MIT" PKG_SITE="http://xmlsoft.org" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain zlib-host Python" +PKG_BUILD_DEPENDS="toolchain zlib-host Python-host" PKG_PRIORITY="optional" PKG_SECTION="textproc" PKG_SHORTDESC="libxml: XML parser library for Gnome" diff --git a/packages/toolchain/devel/autotools/autoconf-2.64/meta b/packages/toolchain/devel/autotools/autoconf-2.64/meta index b2a865c43d..a24a33c639 100644 --- a/packages/toolchain/devel/autotools/autoconf-2.64/meta +++ b/packages/toolchain/devel/autotools/autoconf-2.64/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://sources.redhat.com/autoconf/" PKG_URL="http://ftp.gnu.org/gnu/autoconf/$PKG_NAME.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache m4 libtool-host" +PKG_BUILD_DEPENDS="ccache m4" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="autoconf: A GNU tool for automatically configuring source code" diff --git a/packages/toolchain/devel/autotools/autoconf/meta b/packages/toolchain/devel/autotools/autoconf/meta index 4e42810efa..87b2020f74 100644 --- a/packages/toolchain/devel/autotools/autoconf/meta +++ b/packages/toolchain/devel/autotools/autoconf/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://sources.redhat.com/autoconf/" PKG_URL="http://ftp.gnu.org/gnu/autoconf/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache m4 gettext libtool-host" +PKG_BUILD_DEPENDS="ccache m4 gettext" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="autoconf: A GNU tool for automatically configuring source code" diff --git a/packages/toolchain/devel/intltool/build b/packages/toolchain/devel/autotools/intltool/build similarity index 100% rename from packages/toolchain/devel/intltool/build rename to packages/toolchain/devel/autotools/intltool/build diff --git a/packages/toolchain/devel/intltool/meta b/packages/toolchain/devel/autotools/intltool/meta similarity index 100% rename from packages/toolchain/devel/intltool/meta rename to packages/toolchain/devel/autotools/intltool/meta diff --git a/packages/toolchain/devel/autotools/libtool-host/meta b/packages/toolchain/devel/autotools/libtool-host/meta index 36b315c854..a32fae2a24 100644 --- a/packages/toolchain/devel/autotools/libtool-host/meta +++ b/packages/toolchain/devel/autotools/libtool-host/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.gnu.org/software/libtool/libtool.html" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache" +PKG_BUILD_DEPENDS="ccache autoconf" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="libtool: Generic library support script" diff --git a/packages/toolchain/devel/autotools/meta b/packages/toolchain/devel/autotools/meta new file mode 100644 index 0000000000..9fe676869b --- /dev/null +++ b/packages/toolchain/devel/autotools/meta @@ -0,0 +1,37 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="autotools" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.openelec.tv" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache autoconf automake libtool-host intltool autoconf-archive" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/devel" +PKG_SHORTDESC="autotools: Metapackage" +PKG_LONGDESC="" +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" + diff --git a/packages/toolchain/devel/binutils/meta b/packages/toolchain/devel/binutils/meta index 32c7de3622..83ca639309 100644 --- a/packages/toolchain/devel/binutils/meta +++ b/packages/toolchain/devel/binutils/meta @@ -29,7 +29,7 @@ PKG_URL="http://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/devel/binut #PKG_URL="http://ftp.gnu.org/gnu/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" #PKG_URL="ftp://ftp.kernel.org/pub/linux/devel/binutils/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache bison flex linux-headers gmp mpfr ppl cloog-ppl libelf" +PKG_BUILD_DEPENDS="ccache bison flex linux-headers gmp-host mpfr ppl cloog-ppl libelf" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="binutils: A GNU collection of binary utilities" diff --git a/packages/toolchain/devel/ccache/meta b/packages/toolchain/devel/ccache/meta index 075430609d..715707c736 100644 --- a/packages/toolchain/devel/ccache/meta +++ b/packages/toolchain/devel/ccache/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="ccache" -PKG_VERSION="3.1.5" +PKG_VERSION="3.1.6" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/toolchain/devel/cmake/meta b/packages/toolchain/devel/cmake/meta index 3982512831..201b57a3b0 100644 --- a/packages/toolchain/devel/cmake/meta +++ b/packages/toolchain/devel/cmake/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="cmake" -PKG_VERSION="2.8.5" +PKG_VERSION="2.8.6" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="BSD" diff --git a/packages/toolchain/devel/eglibc/build b/packages/toolchain/devel/eglibc/build index 16736697bf..a363bd03ab 100755 --- a/packages/toolchain/devel/eglibc/build +++ b/packages/toolchain/devel/eglibc/build @@ -34,6 +34,8 @@ strip_gold # Fails to compile using the gold linker. LDFLAGS=`echo $LDFLAGS | sed -e "s|-Ofast|-O2|g"` LDFLAGS=`echo $LDFLAGS | sed -e "s|-O.|-O2|g"` + LDFLAGS=`echo $LDFLAGS | sed -e "s|-Wl,--as-needed||"` + # set some CFLAGS we need CFLAGS="$CFLAGS -g -fno-stack-protector" diff --git a/packages/toolchain/devel/eglibc/install b/packages/toolchain/devel/eglibc/install index 97d5936204..2fac3902b9 100755 --- a/packages/toolchain/devel/eglibc/install +++ b/packages/toolchain/devel/eglibc/install @@ -25,25 +25,28 @@ mkdir -p $INSTALL/lib cp $PKG_BUILD/objdir-$1/elf/ld*.so.* $INSTALL/lib cp $PKG_BUILD/objdir-$1/libc.so.6 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/dlfcn/libdl.so.2 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/nptl/libpthread.so.0 $INSTALL/lib cp $PKG_BUILD/objdir-$1/math/libm.so.6 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/login/libutil.so.1 $INSTALL/lib # e.g. for utmp support, needed by PAM_filter - cp $PKG_BUILD/objdir-$1/rt/librt.so.1 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/resolv/libnss_dns.so.2 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/nis/libnsl.so.1 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/nis/libnss_compat.so.2 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/nss/libnss_files.so.2 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/crypt/libcrypt.so.1 $INSTALL/lib - cp $PKG_BUILD/objdir-$1/resolv/libresolv.so.2 $INSTALL/lib + +mkdir -p $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/crypt/libcrypt.so.1 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/dlfcn/libdl.so.2 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/nis/libnsl.so.1 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/nis/libnss_compat.so.2 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/nss/libnss_files.so.2 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/resolv/libnss_dns.so.2 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/resolv/libresolv.so.2 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/rt/librt.so.1 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/nptl/libpthread.so.0 $INSTALL/usr/lib + cp $PKG_BUILD/objdir-$1/login/libutil.so.1 $INSTALL/usr/lib # e.g. for utmp support, needed by PAM_filter + [ "$DEVTOOLS" = yes ] && cp $PKG_BUILD/objdir-$1/nptl_db/libthread_db.so.1 $INSTALL/lib # for GDB -mkdir -p $INSTALL/bin - cp $PKG_BUILD/objdir-$1/elf/ldd $INSTALL/bin - sed -i 's%bash%sh%g' $INSTALL/bin/ldd +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/objdir-$1/elf/ldd $INSTALL/usr/bin + sed -i 's%bash%sh%g' $INSTALL/usr/bin/ldd - cp $PKG_BUILD/objdir-$1/locale/locale $INSTALL/bin + cp $PKG_BUILD/objdir-$1/locale/locale $INSTALL/usr/bin # libiconv replacement: # mkdir -p $INSTALL/usr/lib/gconv diff --git a/packages/toolchain/devel/eglibc/meta b/packages/toolchain/devel/eglibc/meta index 68bfdde822..ff1819032f 100644 --- a/packages/toolchain/devel/eglibc/meta +++ b/packages/toolchain/devel/eglibc/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="eglibc" -PKG_VERSION="2.14-15360" +PKG_VERSION="2.14.1-15769" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-bad-fix.patch b/packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-bad-fix.patch similarity index 70% rename from packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-bad-fix.patch rename to packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-bad-fix.patch index 1f67b780eb..f76512f9e0 100644 --- a/packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-bad-fix.patch +++ b/packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-bad-fix.patch @@ -3,10 +3,9 @@ From: Andreas Schwab Date: Wed, 22 Sep 2010 12:06:30 +0200 Subject: [PATCH] Fix memory leak on init/fini dependency list -diff --git a/elf/dl-close.c b/elf/dl-close.c -index 73b2a2f..9bd91e3 100644 ---- a/elf/dl-close.c -+++ b/elf/dl-close.c +diff -Naur eglibc-2.14.1-15769/elf/dl-close.c eglibc-2.14.1-15769.patch/elf/dl-close.c +--- eglibc-2.14.1-15769/elf/dl-close.c 2011-11-10 17:59:49.000000000 +0100 ++++ eglibc-2.14.1-15769.patch/elf/dl-close.c 2011-11-11 13:11:54.317765891 +0100 @@ -1,5 +1,5 @@ /* Close a shared object opened by `_dl_open'. - Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc. @@ -14,7 +13,7 @@ index 73b2a2f..9bd91e3 100644 This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or -@@ -119,17 +119,8 @@ _dl_close_worker (struct link_map *map) +@@ -119,17 +119,8 @@ if (map->l_direct_opencount > 0 || map->l_type != lt_loaded || dl_close_state != not_pending) { @@ -33,12 +32,11 @@ index 73b2a2f..9bd91e3 100644 + dl_close_state = rerun; /* There are still references to this object. Do nothing more. */ - if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) -diff --git a/elf/dl-deps.c b/elf/dl-deps.c -index 9e30594..3890d00 100644 ---- a/elf/dl-deps.c -+++ b/elf/dl-deps.c -@@ -478,6 +478,7 @@ _dl_map_object_deps (struct link_map *map, + if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)) +diff -Naur eglibc-2.14.1-15769/elf/dl-deps.c eglibc-2.14.1-15769.patch/elf/dl-deps.c +--- eglibc-2.14.1-15769/elf/dl-deps.c 2011-11-10 17:59:49.000000000 +0100 ++++ eglibc-2.14.1-15769.patch/elf/dl-deps.c 2011-11-11 13:14:07.711207504 +0100 +@@ -478,6 +478,7 @@ nneeded * sizeof needed[0]); atomic_write_barrier (); l->l_initfini = l_initfini; @@ -46,7 +44,7 @@ index 9e30594..3890d00 100644 } /* If we have no auxiliary objects just go on to the next map. */ -@@ -681,6 +682,7 @@ Filters not supported with LD_TRACE_PRELINKING")); +@@ -678,6 +679,7 @@ l_initfini[nlist] = NULL; atomic_write_barrier (); map->l_initfini = l_initfini; @@ -54,18 +52,19 @@ index 9e30594..3890d00 100644 if (l_reldeps != NULL) { atomic_write_barrier (); -@@ -689,5 +691,5 @@ Filters not supported with LD_TRACE_PRELINKING")); +@@ -686,7 +688,7 @@ _dl_scope_free (old_l_reldeps); } if (old_l_initfini != NULL) - map->l_orig_initfini = old_l_initfini; + _dl_scope_free (old_l_initfini); - } -diff --git a/elf/dl-libc.c b/elf/dl-libc.c -index 7be9483..a13fce3 100644 ---- a/elf/dl-libc.c -+++ b/elf/dl-libc.c -@@ -265,13 +265,13 @@ libc_freeres_fn (free_mem) + + if (errno_reason) + _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname, +diff -Naur eglibc-2.14.1-15769/elf/dl-libc.c eglibc-2.14.1-15769.patch/elf/dl-libc.c +--- eglibc-2.14.1-15769/elf/dl-libc.c 2011-11-10 17:59:49.000000000 +0100 ++++ eglibc-2.14.1-15769.patch/elf/dl-libc.c 2011-11-11 13:11:54.319765853 +0100 +@@ -265,13 +265,13 @@ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns) { @@ -80,7 +79,7 @@ index 7be9483..a13fce3 100644 while (lnp != NULL) { struct libname_list *old = lnp; -@@ -279,6 +279,10 @@ libc_freeres_fn (free_mem) +@@ -279,6 +279,10 @@ if (! old->dont_free) free (old); } @@ -91,11 +90,10 @@ index 7be9483..a13fce3 100644 } if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0 -diff --git a/elf/rtld.c b/elf/rtld.c -index 4a9109e..617e30e 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -2251,6 +2251,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", +diff -Naur eglibc-2.14.1-15769/elf/rtld.c eglibc-2.14.1-15769.patch/elf/rtld.c +--- eglibc-2.14.1-15769/elf/rtld.c 2011-11-10 17:59:49.000000000 +0100 ++++ eglibc-2.14.1-15769.patch/elf/rtld.c 2011-11-11 13:11:54.320765834 +0100 +@@ -2264,6 +2264,7 @@ lnp->dont_free = 1; lnp = lnp->next; } @@ -103,10 +101,9 @@ index 4a9109e..617e30e 100644 if (l != &GL(dl_rtld_map)) _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0, -diff --git a/include/link.h b/include/link.h -index e877104..051b99a 100644 ---- a/include/link.h -+++ b/include/link.h +diff -Naur eglibc-2.14.1-15769/include/link.h eglibc-2.14.1-15769.patch/include/link.h +--- eglibc-2.14.1-15769/include/link.h 2011-11-10 17:59:51.000000000 +0100 ++++ eglibc-2.14.1-15769.patch/include/link.h 2011-11-11 13:11:54.321765815 +0100 @@ -1,6 +1,6 @@ /* Data structure for communication from the run-time dynamic linker for loaded ELF shared objects. @@ -115,7 +112,7 @@ index e877104..051b99a 100644 This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or -@@ -192,6 +192,9 @@ struct link_map +@@ -192,6 +192,9 @@ during LD_TRACE_PRELINKING=1 contains any DT_SYMBOLIC libraries. */ @@ -125,7 +122,7 @@ index e877104..051b99a 100644 /* Collected information about own RPATH directories. */ struct r_search_path_struct l_rpath_dirs; -@@ -240,9 +243,6 @@ struct link_map +@@ -240,9 +243,6 @@ /* List of object in order of the init and fini calls. */ struct link_map **l_initfini; diff --git a/packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-libgcc_eh-1.patch b/packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-libgcc_eh-1.patch similarity index 100% rename from packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-libgcc_eh-1.patch rename to packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-libgcc_eh-1.patch diff --git a/packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-restore-rpc+nis.patch b/packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-restore-rpc+nis.patch similarity index 100% rename from packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-restore-rpc+nis.patch rename to packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-restore-rpc+nis.patch diff --git a/packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-select_fd_type.patch b/packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-select_fd_type.patch similarity index 100% rename from packages/toolchain/devel/eglibc/patches/eglibc-2.14-15360-select_fd_type.patch rename to packages/toolchain/devel/eglibc/patches/eglibc-2.14.1-15769-select_fd_type.patch diff --git a/packages/toolchain/devel/pkg-config/build b/packages/toolchain/devel/pkg-config/build index d71c51c390..2cfb88571e 100755 --- a/packages/toolchain/devel/pkg-config/build +++ b/packages/toolchain/devel/pkg-config/build @@ -22,6 +22,9 @@ . config/options $1 +export GLIB_CFLAGS="-I$ROOT/$TOOLCHAIN/include/glib-2.0 -I$ROOT/$TOOLCHAIN/lib/glib-2.0/include" +export GLIB_LIBS="-L$ROOT/$TOOLCHAIN/lib -lglib-2.0" + setup_toolchain host cd $PKG_BUILD diff --git a/packages/toolchain/devel/pkg-config/meta b/packages/toolchain/devel/pkg-config/meta index 49447fefa7..5e9565196b 100644 --- a/packages/toolchain/devel/pkg-config/meta +++ b/packages/toolchain/devel/pkg-config/meta @@ -19,14 +19,14 @@ ################################################################################ PKG_NAME="pkg-config" -PKG_VERSION="0.25" +PKG_VERSION="0.26" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.freedesktop.org/software/pkgconfig/" PKG_URL="http://pkgconfig.freedesktop.org/releases/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache" +PKG_BUILD_DEPENDS="ccache glib-host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="pkg-config: A library configuration management system" diff --git a/packages/toolchain/devel/pkg-config/patches/pkg-config-0.25-m4_pattern_allow.patch b/packages/toolchain/devel/pkg-config/patches/pkg-config-0.25-m4_pattern_allow.patch deleted file mode 100644 index 7613fe0268..0000000000 --- a/packages/toolchain/devel/pkg-config/patches/pkg-config-0.25-m4_pattern_allow.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -Naur pkg-config-0.25-old/pkg.m4 pkg-config-0.25-new/pkg.m4 ---- pkg-config-0.25-old/pkg.m4 2009-12-06 12:39:02.000000000 -0800 -+++ pkg-config-0.25-new/pkg.m4 2010-05-28 16:55:19.000000000 -0700 -@@ -26,7 +26,15 @@ - # ---------------------------------- - AC_DEFUN([PKG_PROG_PKG_CONFIG], - [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) --m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -+m4_pattern_allow([^PKG_CONFIG$]) -+m4_pattern_allow([^PKG_CONFIG_ALLOW_SYSTEM_CFLAGS$]) -+m4_pattern_allow([^PKG_CONFIG_ALLOW_SYSTEM_LIBS$]) -+m4_pattern_allow([^PKG_CONFIG_DEBUG_SPEW$]) -+m4_pattern_allow([^PKG_CONFIG_DISABLE_UNINSTALLED$]) -+m4_pattern_allow([^PKG_CONFIG_LIBDIR$]) -+m4_pattern_allow([^PKG_CONFIG_PATH$]) -+m4_pattern_allow([^PKG_CONFIG_SYSROOT_DIR$]) -+m4_pattern_allow([^PKG_CONFIG_TOP_BUILD_DIR$]) - AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) - AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) - AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) diff --git a/packages/toolchain/lang/gcc-core/meta b/packages/toolchain/lang/gcc-core/meta index 1aed495658..90e8b78507 100644 --- a/packages/toolchain/lang/gcc-core/meta +++ b/packages/toolchain/lang/gcc-core/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://gcc.gnu.org/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp mpfr mpc ppl cloog-ppl libelf" +PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp-host mpfr mpc ppl cloog-ppl libelf" PKG_PRIORITY="optional" PKG_SECTION="toolchain/lang" PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)" diff --git a/packages/toolchain/lang/gcc-final/meta b/packages/toolchain/lang/gcc-final/meta index 3e378ac96c..46a3fff01b 100644 --- a/packages/toolchain/lang/gcc-final/meta +++ b/packages/toolchain/lang/gcc-final/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://gcc.gnu.org/" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp mpfr mpc ppl cloog-ppl libelf eglibc" +PKG_BUILD_DEPENDS="ccache autoconf-2.64 binutils gmp-host mpfr mpc ppl cloog-ppl libelf eglibc" PKG_PRIORITY="optional" PKG_SECTION="toolchain/lang" PKG_SHORTDESC="gcc: The GNU Compiler Collection Version 4 (aka GNU C Compiler)" diff --git a/packages/toolchain/lang/yasm/meta b/packages/toolchain/lang/yasm/meta index df6752e083..00d7b666b6 100644 --- a/packages/toolchain/lang/yasm/meta +++ b/packages/toolchain/lang/yasm/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="yasm" -PKG_VERSION="1.1.0" +PKG_VERSION="1.2.0" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="BSD" diff --git a/packages/toolchain/math/cloog-ppl/meta b/packages/toolchain/math/cloog-ppl/meta index 07685bf0de..d740e280f8 100644 --- a/packages/toolchain/math/cloog-ppl/meta +++ b/packages/toolchain/math/cloog-ppl/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.cloog.org/" PKG_URL="ftp://gcc.gnu.org/pub/gcc/infrastructure/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp ppl" +PKG_BUILD_DEPENDS="ccache gmp-host ppl" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="cloog-ppl: Code Generator in the Polyhedral Model's Home" diff --git a/packages/toolchain/math/gmp/build b/packages/toolchain/math/gmp-host/build similarity index 94% rename from packages/toolchain/math/gmp/build rename to packages/toolchain/math/gmp-host/build index 8c82bc67f9..b26d3c0621 100755 --- a/packages/toolchain/math/gmp/build +++ b/packages/toolchain/math/gmp-host/build @@ -22,15 +22,16 @@ . config/options $1 +$SCRIPTS/unpack gmp + setup_toolchain host export CFLAGS="$CFLAGS -fPIC" export CPPFLAGS="$CPPFLAGS -fexceptions" -cd $PKG_BUILD +cd $BUILD/gmp-* -mkdir -p objdir -cd objdir +mkdir -p .objdir-host && cd .objdir-host ../configure --host=$HOST_NAME \ --build=$HOST_NAME \ diff --git a/packages/toolchain/math/gmp-host/meta b/packages/toolchain/math/gmp-host/meta new file mode 100644 index 0000000000..f99ea13388 --- /dev/null +++ b/packages/toolchain/math/gmp-host/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="gmp" +PKG_VERSION="" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="LGPL" +PKG_SITE="http://gmplib.org/" +PKG_URL="" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="ccache" +PKG_PRIORITY="optional" +PKG_SECTION="toolchain/math" +PKG_SHORTDESC="gmp: The GNU MP (multiple precision arithmetic) library" +PKG_LONGDESC="GNU MP is a library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. It has a rich set of functions, and the functions have a regular interface. GNU MP is designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, by carefully optimized assembly code for the most common inner loops for a lots of CPUs, and by a general emphasis on speed (instead of simplicity or elegance). The speed of GNU MP is believed to be faster than any other similar library. The advantage for GNU MP increases with the operand sizes for certain operations, since GNU MP in many cases has asymptotically faster algorithms." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no" diff --git a/packages/toolchain/math/mpc/build b/packages/toolchain/math/mpc/build index 52776b66c8..76f268a356 100755 --- a/packages/toolchain/math/mpc/build +++ b/packages/toolchain/math/mpc/build @@ -22,9 +22,6 @@ . config/options $1 -$SCRIPTS/build gmp -$SCRIPTS/build mpfr - setup_toolchain host cd $PKG_BUILD diff --git a/packages/toolchain/math/mpc/meta b/packages/toolchain/math/mpc/meta index 94b79f2bbe..6ea3da4b8d 100644 --- a/packages/toolchain/math/mpc/meta +++ b/packages/toolchain/math/mpc/meta @@ -26,7 +26,7 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.multiprecision.org" PKG_URL="http://www.multiprecision.org/mpc/download/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp mpfr" +PKG_BUILD_DEPENDS="ccache gmp-host mpfr" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpc: A C library for the arithmetic of high precision complex numbers" diff --git a/packages/toolchain/math/mpfr/meta b/packages/toolchain/math/mpfr/meta index 50bfa5c47a..43c437e6cb 100644 --- a/packages/toolchain/math/mpfr/meta +++ b/packages/toolchain/math/mpfr/meta @@ -26,7 +26,7 @@ PKG_LICENSE="LGPL" PKG_SITE="http://www.mpfr.org/" PKG_URL="http://ftp.gnu.org/gnu/mpfr/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp" +PKG_BUILD_DEPENDS="ccache gmp-host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="mpfr: A C library for multiple-precision floating-point computations with exact roundi" diff --git a/packages/toolchain/math/ppl/meta b/packages/toolchain/math/ppl/meta index 6aec57b2f1..cc8b0aa281 100644 --- a/packages/toolchain/math/ppl/meta +++ b/packages/toolchain/math/ppl/meta @@ -27,7 +27,7 @@ PKG_SITE="http://www.cs.unipr.it/ppl" PKG_URL="http://www.cs.unipr.it/ppl/Download/ftp/releases/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/ppl-0.11.2.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="ccache gmp" +PKG_BUILD_DEPENDS="ccache gmp-host" PKG_PRIORITY="optional" PKG_SECTION="toolchain/math" PKG_SHORTDESC="ppl: Parma Polyhedra Library" diff --git a/packages/toolchain/meta b/packages/toolchain/meta index a1aae5528d..eca42af944 100644 --- a/packages/toolchain/meta +++ b/packages/toolchain/meta @@ -26,7 +26,7 @@ PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" PKG_URL="" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="make xz sed pkg-config automake autoconf autoconf-archive intltool gcc-final bison flex cmake jam yasm nasm" +PKG_BUILD_DEPENDS="make xz sed pkg-config autotools gcc-final bison flex cmake jam yasm nasm" PKG_PRIORITY="optional" PKG_SECTION="toolchain/devel" PKG_SHORTDESC="toolchain: OpenELEC.tv' toolchain" diff --git a/packages/tools/hdparm/build b/packages/tools/hdparm/build index 35ae8ec7a8..0a9e5c080d 100755 --- a/packages/tools/hdparm/build +++ b/packages/tools/hdparm/build @@ -25,4 +25,4 @@ LDFLAGS="$CFLAGS $LDFLAGS -fwhole-program" cd $PKG_BUILD - make binprefix="/usr" sbindir="/sbin" + make binprefix="/usr" sbindir="/usr/bin" diff --git a/packages/tools/hdparm/install b/packages/tools/hdparm/install index 766f42c877..abb22d7069 100755 --- a/packages/tools/hdparm/install +++ b/packages/tools/hdparm/install @@ -22,5 +22,5 @@ . config/options $1 -mkdir -p $INSTALL/sbin - cp $PKG_BUILD/hdparm $INSTALL/sbin +mkdir -p $INSTALL/usr/bin + cp $PKG_BUILD/hdparm $INSTALL/usr/bin diff --git a/packages/web/libmicrohttpd/meta b/packages/web/libmicrohttpd/meta index 1c98852e19..0357f5bae5 100644 --- a/packages/web/libmicrohttpd/meta +++ b/packages/web/libmicrohttpd/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="libmicrohttpd" -PKG_VERSION="0.9.9" +PKG_VERSION="0.9.16" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" diff --git a/packages/x11/driver/xf86-video-fglrx/install b/packages/x11/driver/xf86-video-fglrx/install index 98965e03b2..165db6f21b 100755 --- a/packages/x11/driver/xf86-video-fglrx/install +++ b/packages/x11/driver/xf86-video-fglrx/install @@ -22,8 +22,6 @@ . config/options $1 -$SCRIPTS/build busybox-hosttools - VER=`ls $BUILD/linux*/modules/lib/modules` if [ "$TARGET_ARCH" = i386 ]; then @@ -40,11 +38,6 @@ fi mkdir -p $INSTALL/lib/modules/$VER/ati cp $PKG_BUILD/common/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko $INSTALL/lib/modules/$VER/ati -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done - # X.Org modules mkdir -p $INSTALL/$XORG_PATH_MODULES cp -P $PKG_BUILD/$BASEDIR/usr/X11R6/$LIBDIR/modules/*.so $INSTALL/$XORG_PATH_MODULES diff --git a/packages/x11/driver/xf86-video-nvidia/install b/packages/x11/driver/xf86-video-nvidia/install index c2ef9a73d2..10ffeebe25 100755 --- a/packages/x11/driver/xf86-video-nvidia/install +++ b/packages/x11/driver/xf86-video-nvidia/install @@ -22,8 +22,6 @@ . config/options $1 -$SCRIPTS/build busybox-hosttools - VER=`ls $BUILD/linux*/modules/lib/modules` mkdir -p $INSTALL/$XORG_PATH_MODULES/drivers @@ -46,11 +44,6 @@ mkdir -p $INSTALL/usr/lib mkdir -p $INSTALL/lib/modules/$VER/nvidia cp $PKG_BUILD/kernel/nvidia.ko $INSTALL/lib/modules/$VER/nvidia -$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null -for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do - rm -f $i -done - mkdir -p $INSTALL/usr/bin cp $PKG_BUILD/nvidia-smi $INSTALL/usr/bin diff --git a/packages/x11/driver/xf86-video-nvidia/meta b/packages/x11/driver/xf86-video-nvidia/meta index 4af43a0e46..c2783c031a 100644 --- a/packages/x11/driver/xf86-video-nvidia/meta +++ b/packages/x11/driver/xf86-video-nvidia/meta @@ -19,7 +19,7 @@ ################################################################################ PKG_NAME="xf86-video-nvidia" -PKG_VERSION="290.03" +PKG_VERSION="290.06" PKG_REV="1" PKG_ARCH="i386 x86_64" PKG_LICENSE="nonfree" diff --git a/packages/x11/lib/libxcb/meta b/packages/x11/lib/libxcb/meta index 09a70be2e4..386078417f 100644 --- a/packages/x11/lib/libxcb/meta +++ b/packages/x11/lib/libxcb/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://xcb.freedesktop.org" PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="libXau" -PKG_BUILD_DEPENDS="toolchain util-macros Python xcb-proto libpthread-stubs libXau" +PKG_BUILD_DEPENDS="toolchain util-macros Python-host xcb-proto libpthread-stubs libXau" PKG_PRIORITY="optional" PKG_SECTION="x11/lib" PKG_SHORTDESC="libxcb: X C-language Bindings library" diff --git a/packages/x11/proto/xcb-proto/meta b/packages/x11/proto/xcb-proto/meta index 7b178be864..35e2b5d945 100644 --- a/packages/x11/proto/xcb-proto/meta +++ b/packages/x11/proto/xcb-proto/meta @@ -26,7 +26,7 @@ PKG_LICENSE="OSS" PKG_SITE="http://www.X.org" PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_DEPENDS="" -PKG_BUILD_DEPENDS="toolchain util-macros Python" +PKG_BUILD_DEPENDS="toolchain util-macros Python-host" PKG_PRIORITY="optional" PKG_SECTION="x11/proto" PKG_SHORTDESC="xcb-proto: X C-language Bindings protocol headers" diff --git a/packages/x11/xserver/xorg-server/install b/packages/x11/xserver/xorg-server/install index 2998966072..ac7a347123 100755 --- a/packages/x11/xserver/xorg-server/install +++ b/packages/x11/xserver/xorg-server/install @@ -30,8 +30,8 @@ XORG_DST="$INSTALL/$XORG_PATH_MODULES" mkdir -p $INSTALL/usr/bin cp $XORG_SRC/Xorg $INSTALL/usr/bin -mkdir -p $INSTALL/lib/udev - cp $PKG_DIR/scripts/xorg_start $INSTALL/lib/udev +mkdir -p $INSTALL/usr/lib/udev + cp $PKG_DIR/scripts/xorg_start $INSTALL/usr/lib/udev mkdir -p $XORG_DST cp -P $XORG_SRC/exa/.libs/libexa.so $XORG_DST diff --git a/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules b/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules index ebc76a2736..31b10b620a 100644 --- a/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules +++ b/packages/x11/xserver/xorg-server/udev.d/97-xorg.rules @@ -42,6 +42,6 @@ GOTO="end_video" # start Xorg LABEL="start_xorg" -ENV{xorg_driver}=="?*", RUN+="/lib/udev/xorg_start" +ENV{xorg_driver}=="?*", RUN+="xorg_start" LABEL="end_video" diff --git a/projects/ATV/options b/projects/ATV/options index 993462274e..53bb88b9e7 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 bcm_sta a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 bcm_sta a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Fusion/options b/projects/Fusion/options index ee5eb0951b..6d4c1aa8c6 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Generic/options b/projects/Generic/options index 942902e694..1abb483287 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index cf700db743..f3d2331284 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/ION/options b/projects/ION/options index f5ccc4a47d..c30df37935 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Intel/options b/projects/Intel/options index f2cf0f6020..dc08309f30 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Ultra/options b/projects/Ultra/options index 1a2b125e42..b6d5910516 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -150,7 +150,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" - ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d" # build with network support (yes / no) NETWORK="yes" diff --git a/scripts/checkdeps b/scripts/checkdeps index 3348295948..ef91fcae0f 100755 --- a/scripts/checkdeps +++ b/scripts/checkdeps @@ -33,8 +33,8 @@ case $1 in deps_pkg="wget" ;; build) - deps="gcc g++ sed patch touch tar bzip2 gzip perl cp gawk makeinfo gettext autopoint gperf autoconf automake m4 cvs zip unzip mkfontscale libtool diff xsltproc msgfmt" - deps_pkg="gcc g++ sed patch fileutils tar bzip2 gzip perl coreutils gawk texinfo gettext gettext-devel gperf autoconf automake m4 cvs zip unzip xutils libtool diff xsltproc gettext" + deps="gcc g++ sed patch touch tar bzip2 gzip perl cp gawk makeinfo gperf cvs zip unzip mkfontscale diff xsltproc" + deps_pkg="gcc g++ sed patch fileutils tar bzip2 gzip perl coreutils gawk texinfo gperf cvs zip unzip xutils diff xsltproc" files="/usr/include/stdio.h /usr/include/ncurses.h" files_pkg="libc6-dev libncurses5-dev" ;; diff --git a/scripts/image b/scripts/image index f2ae1a0bd7..edee6cb589 100755 --- a/scripts/image +++ b/scripts/image @@ -26,6 +26,7 @@ $SCRIPTS/checkdeps build $SCRIPTS/build toolchain $SCRIPTS/build squashfs $SCRIPTS/build fakeroot +$SCRIPTS/build busybox-hosttools export INSTALL=$BUILD/image/system @@ -146,6 +147,13 @@ IMAGE_NAME="$DISTRONAME-$TARGET_VERSION" # OEM packages [ "$OEM_SUPPORT" = "yes" ] && $SCRIPTS/install oem +# run depmod + KVER=`ls $BUILD/linux-*/modules/lib/modules` + $ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $KVER > /dev/null + for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do + rm -f $i + done + # strip kernel modules for MOD in `find $INSTALL/lib/modules/ -name *.ko`; do $STRIP --strip-debug $MOD diff --git a/scripts/install b/scripts/install index cfc0abb316..a4a81a8e35 100755 --- a/scripts/install +++ b/scripts/install @@ -54,8 +54,8 @@ if [ -d $PKG_DIR/profile.d ]; then fi if [ -d $PKG_DIR/udev.d ]; then - mkdir -p $INSTALL/lib/udev/rules.d - cp $PKG_DIR/udev.d/*.rules $INSTALL/lib/udev/rules.d + mkdir -p $INSTALL/usr/lib/udev/rules.d + cp $PKG_DIR/udev.d/*.rules $INSTALL/usr/lib/udev/rules.d fi if [ -d $PKG_DIR/init.network ]; then diff --git a/tools/mkpkg/mkpkg_eglibc-2.14.1 b/tools/mkpkg/mkpkg_eglibc-2.14.1 new file mode 100755 index 0000000000..4f790f9d65 --- /dev/null +++ b/tools/mkpkg/mkpkg_eglibc-2.14.1 @@ -0,0 +1,45 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +echo "getting sources..." + svn co svn://svn.eglibc.org/branches/eglibc-2_14/libc eglibc-2.14.1-latest + svn co svn://svn.eglibc.org/branches/eglibc-2_14/ports eglibc-2.14.1-latest/ports + svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads eglibc-2.14.1-latest/linuxthreads + svn co svn://svn.eglibc.org/branches/eglibc-2_14/linuxthreads/linuxthreads_db eglibc-2.14.1-latest/linuxthreads_db + +echo "getting version..." + cd eglibc-2.14.1-latest + SVN_REV=`LANG=C svn info 2>/dev/null | grep Revision: | sed -e 's/.*\: //'` + echo $SVN_REV + cd .. + +echo "copying sources..." + rm -rf eglibc-2.14.1-$SVN_REV + cp -R eglibc-2.14.1-latest eglibc-2.14.1-$SVN_REV + +echo "cleaning sources..." + find eglibc-2.14.1-$SVN_REV -name .svn -exec rm -rf {} ";" + +echo "packing sources..." + tar cvJf eglibc-2.14.1-$SVN_REV.tar.xz eglibc-2.14.1-$SVN_REV + +echo "remove temporary sourcedir..." + rm -rf eglibc-2.14.1-$SVN_REV