diff options
1169 files changed, 23602 insertions, 21309 deletions
@@ -1,3 +1,19 @@ +SBo-git - slackbuilds repository for slackware-current +- - - + +this is a unofficial fork of master branch from slackbuilds.org's +git repository (http://slackbuilds.org/cgit/slackbuilds/). + +here I put my unofficial mods to their slackbuilds to run on +slackware-current with sbopkg (http://www.sbopkg.org). + +Check https://github.com/Ponce/slackbuilds/wiki for additional informations. + +See https://github.com/Ponce/slackbuilds/wiki/configuring-the-current-repository-with-sbopkg +for instructions on how to use this repository with sbopkg. + +original README from slackbuilds.org follows: +--------------------------------------------- See https://slackbuilds.org/howto/ for instructions on how to use the contents of this directory. diff --git a/academic/antiprism/antiprism.SlackBuild b/academic/antiprism/antiprism.SlackBuild index 271184a166..f3c6c291e6 100644 --- a/academic/antiprism/antiprism.SlackBuild +++ b/academic/antiprism/antiprism.SlackBuild @@ -55,7 +55,7 @@ find -L . \ sed "/^docdir/s|= .*|= @docdir@|" -i Makefile.in CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBDIRSUFFIX \ diff --git a/academic/gelemental/gcc.patch b/academic/gelemental/gcc.patch new file mode 100644 index 0000000000..eeb16293d9 --- /dev/null +++ b/academic/gelemental/gcc.patch @@ -0,0 +1,12 @@ +diff -Naur gelemental-1.2.0.orig/src/dialogs.cc gelemental-1.2.0/src/dialogs.cc +--- gelemental-1.2.0.orig/src/dialogs.cc 2007-09-25 06:49:33.000000000 +0200 ++++ gelemental-1.2.0/src/dialogs.cc 2017-07-27 21:45:34.356776770 +0200 +@@ -247,7 +247,7 @@ + const Gtk::TreePath& tpath, bool) + { + Gtk::TreeIter iter = store->get_iter (tpath); +- return iter ? iter->get_value (cols.property) : false; ++ return iter ? static_cast<bool>(iter->get_value (cols.property)) : false; + } + + diff --git a/academic/gelemental/gelemental.SlackBuild b/academic/gelemental/gelemental.SlackBuild index 22beaf7d9c..f8a08e984d 100644 --- a/academic/gelemental/gelemental.SlackBuild +++ b/academic/gelemental/gelemental.SlackBuild @@ -84,6 +84,9 @@ sed -i "s:set_size_request (50, 50):set_size_request (64, 64):" src/buttons.cc # include glib.h instead of individual headers. patch -p1 -i $CWD/glib-single-include.patch +# Fix for the newer gcc +patch -p1 -i $CWD/gcc.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS -std=c++11" \ ./configure \ diff --git a/academic/genius/README b/academic/genius/README index d4a270574c..fa2fa4b67b 100644 --- a/academic/genius/README +++ b/academic/genius/README @@ -7,5 +7,5 @@ or educational tool. The syntax is very intuitive and is designed to mimic how mathematics is usually written. If you would like the GUI interface as well, it requires -libgnomeui and gtksourceview. If you have these dependencies, +libgnomeui, gtksourceview and vte2. If you have these dependencies, pass the variable of GNOME=YES (or anything that isn't NO ;) diff --git a/academic/genometools/genometools.SlackBuild b/academic/genometools/genometools.SlackBuild index f4af4db0f9..117e1bb420 100644 --- a/academic/genometools/genometools.SlackBuild +++ b/academic/genometools/genometools.SlackBuild @@ -76,7 +76,7 @@ find -L . \ sed -i "s:lib/libgenometools:lib${LIBDIRSUFFIX}/libgenometools:g" Makefile sed -i "s:\$(prefix)/lib:\$(prefix)/lib${LIBDIRSUFFIX}:g" Makefile -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -Wno-error=format-truncation=" \ CXXFLAGS="$SLKCFLAGS" \ make $BUILDARCH \ prefix=/usr diff --git a/academic/ngspice/ngspice.SlackBuild b/academic/ngspice/ngspice.SlackBuild index 80db525824..9dea3d9e42 100644 --- a/academic/ngspice/ngspice.SlackBuild +++ b/academic/ngspice/ngspice.SlackBuild @@ -87,6 +87,7 @@ CFLAGS="$SLKCFLAGS" \ --disable-static \ --enable-x \ --enable-ndev \ + --with-ngshared \ --build=$ARCH-slackware-linux make make DESTDIR=$PKG install diff --git a/academic/primer3/primer3.SlackBuild b/academic/primer3/primer3.SlackBuild index d3ae1b399c..514f65fd23 100644 --- a/academic/primer3/primer3.SlackBuild +++ b/academic/primer3/primer3.SlackBuild @@ -75,13 +75,11 @@ patch -p1 -i $CWD/gcc-7.patch cd ./src # Use our CFLAGS -sed -i "/^CFLAGS/s/=/+=/" Makefile +sed -i -e "s|-O2|$SLKCFLAGS|" -e "s|-g -Wall|-fpermissive|" Makefile # Look for configuration files in /usr/share instead of /opt sed -i "s:/opt/primer3_config:/usr/share/$PRGNAM/primer3_config:g" thal_main.c primer3_boulder_main.c -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ make # This is recommended, but the tests take a really long time. Be patient diff --git a/academic/root/root.SlackBuild b/academic/root/root.SlackBuild index bb507f0536..e0ec409dca 100644 --- a/academic/root/root.SlackBuild +++ b/academic/root/root.SlackBuild @@ -18,7 +18,7 @@ # Modified by the slackbuilds.org project PRGNAM=root -VERSION=${VERSION:-5.34.36} +VERSION=${VERSION:-6.10.02} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -79,9 +79,9 @@ fi rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM\_v$VERSION.source.tar.gz -cd $PRGNAM +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -134,9 +134,8 @@ mkdir -p $PKG$PYTHONDIR mv \ $PKG$PREFIX/lib$LIBDIRSUFFIX/*.py \ $PKG$PREFIX/lib$LIBDIRSUFFIX/*.pyc \ - $PKG$PREFIX/lib$LIBDIRSUFFIX/python/genreflex \ + $PKG$PREFIX/lib$LIBDIRSUFFIX/*.pyo \ $PKG$PYTHONDIR -rm -fr $PKG$PREFIX/lib$LIBDIRSUFFIX/python find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneded 2> /dev/null || true diff --git a/academic/root/root.info b/academic/root/root.info index 450e1bde00..7df5c81738 100644 --- a/academic/root/root.info +++ b/academic/root/root.info @@ -1,10 +1,10 @@ PRGNAM="root" -VERSION="5.34.36" +VERSION="6.10.02" HOMEPAGE="http://root.cern.ch/drupal/" -DOWNLOAD="https://root.cern.ch/download/root_v5.34.36.source.tar.gz" -MD5SUM="6a1ad549b3b79b10bbb1f116b49067ee" +DOWNLOAD="https://root.cern.ch/download/root_v6.10.02.source.tar.gz" +MD5SUM="19f2285c845a48355db779938fb4db99" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="ftgl" +REQUIRES="ftgl unixODBC" MAINTAINER="Jože Zobec" EMAIL="jozze.zepl@gmail.com" diff --git a/academic/t_coffee/t_coffee.SlackBuild b/academic/t_coffee/t_coffee.SlackBuild index 7329c61e2f..b2b07568f2 100644 --- a/academic/t_coffee/t_coffee.SlackBuild +++ b/academic/t_coffee/t_coffee.SlackBuild @@ -73,7 +73,8 @@ find -L . \ cd t_coffee_source -CFLAGS="$SLKCFLAGS" \ +sed -i "s|-O3|$SLKCFLAGS -fpermissive|" makefile + CC="gcc" \ FCC="gfortran" \ make -i all diff --git a/academic/tophat/make_pair.patch b/academic/tophat/make_pair.patch new file mode 100644 index 0000000000..44b71d1059 --- /dev/null +++ b/academic/tophat/make_pair.patch @@ -0,0 +1,24 @@ +diff -uBw -aur tophat-2.1.1/src/juncs_db.cpp tophat-2.1.1-patched/src/juncs_db.cpp +--- tophat-2.1.1/src/juncs_db.cpp 2016-02-14 19:21:17.354079000 +0100 ++++ tophat-2.1.1-patched/src/juncs_db.cpp 2016-06-02 11:26:34.097425159 +0200 +@@ -338,7 +338,7 @@ + uint32_t left_coord = atoi(scan_left_coord); + uint32_t right_coord = atoi(scan_right_coord); + bool antisense = *orientation == '-'; +- junctions.insert(make_pair<Junction, JunctionStats>(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); ++ junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), JunctionStats())); + } + } + +diff -uBw -aur tophat-2.1.1/src/tophat_reports.cpp tophat-2.1.1-patched/src/tophat_reports.cpp +--- tophat-2.1.1/src/tophat_reports.cpp 2016-02-23 22:20:44.320710000 +0100 ++++ tophat-2.1.1-patched/src/tophat_reports.cpp 2016-06-02 11:26:22.057239478 +0200 +@@ -2705,7 +2705,7 @@ + junction_stat.gtf_match = true; + junction_stat.accepted = true; + +- gtf_junctions.insert(make_pair<Junction, JunctionStats>(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); ++ gtf_junctions.insert(make_pair(Junction(ref_id, left_coord, right_coord, antisense), junction_stat)); + } + } + fprintf(stderr, "Loaded %d GFF junctions from %s.\n", (int)(gtf_junctions.size()), gtf_juncs.c_str()); diff --git a/academic/tophat/tophat.SlackBuild b/academic/tophat/tophat.SlackBuild index e579ff1e9a..bdddfa4182 100644 --- a/academic/tophat/tophat.SlackBuild +++ b/academic/tophat/tophat.SlackBuild @@ -69,6 +69,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks archlinux +patch -p1 < $CWD/make_pair.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/academic/ugene/ugene-1.22.0-dont_hardcode_includes.patch b/academic/ugene/ugene-1.22.0-dont_hardcode_includes.patch new file mode 100644 index 0000000000..6bc26e1f19 --- /dev/null +++ b/academic/ugene/ugene-1.22.0-dont_hardcode_includes.patch @@ -0,0 +1,24 @@ +diff -up ugene-1.22.0/src/libs_3rdparty/samtools/samtools.pri.dont_hardcode_includes ugene-1.22.0/src/libs_3rdparty/samtools/samtools.pri +--- ugene-1.22.0/src/libs_3rdparty/samtools/samtools.pri.dont_hardcode_includes 2016-03-31 07:21:56.000000000 -0500 ++++ ugene-1.22.0/src/libs_3rdparty/samtools/samtools.pri 2016-06-02 17:49:02.383069490 -0500 +@@ -3,7 +3,7 @@ UGENE_RELATIVE_DESTDIR = '' + + TEMPLATE = lib + CONFIG +=thread debug_and_release staticlib warn_off +-INCLUDEPATH += src src/samtools ../../include /usr/include ++INCLUDEPATH += src src/samtools ../../include + win32 : INCLUDEPATH += src/samtools/win32 + DEFINES+="_FILE_OFFSET_BITS=64" _LARGEFILE64_SOURCE _USE_KNETFILE + win32 : DEFINES += _USE_MATH_DEFINES "inline=__inline" "__func__=__FUNCTION__" "R_OK=4" "atoll=_atoi64" "alloca=_alloca" +diff -up ugene-1.22.0/src/plugins_3rdparty/variants/variants.pri.dont_hardcode_includes ugene-1.22.0/src/plugins_3rdparty/variants/variants.pri +--- ugene-1.22.0/src/plugins_3rdparty/variants/variants.pri.dont_hardcode_includes 2016-03-31 07:22:09.000000000 -0500 ++++ ugene-1.22.0/src/plugins_3rdparty/variants/variants.pri 2016-06-02 20:26:35.265356432 -0500 +@@ -20,7 +20,7 @@ use_bundled_zlib() { + win32 : LIBS += -lwsock32 + + +-INCLUDEPATH += src ../../include /usr/include ++INCLUDEPATH += src ../../include + INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools + INCLUDEPATH += ../../libs_3rdparty/samtools/src + INCLUDEPATH += ../../libs_3rdparty/samtools/src/samtools/bcftools diff --git a/academic/ugene/ugene.SlackBuild b/academic/ugene/ugene.SlackBuild index c93a523b65..b124c211b1 100644 --- a/academic/ugene/ugene.SlackBuild +++ b/academic/ugene/ugene.SlackBuild @@ -73,6 +73,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks fedora +patch -p1 < $CWD/ugene-1.22.0-dont_hardcode_includes.patch + # Fix libraries and man pages paths sed -i "s:/lib:/lib${LIBDIRSUFFIX}:g" src/ugene_globals.pri sed -i "s:/share/man:/man:g" src/ugene_globals.pri diff --git a/academic/veusz/veusz.SlackBuild b/academic/veusz/veusz.SlackBuild index 119648fd3d..21c0875fa3 100644 --- a/academic/veusz/veusz.SlackBuild +++ b/academic/veusz/veusz.SlackBuild @@ -69,10 +69,6 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -PYTHONVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.) -export SIP_EXE=/usr/bin/python2-sip -export SIP_INCLUDE_DIR="/usr/include/python$PYTHONVER/python2-sip" - python setup.py install --root $PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/accessibility/easystroke/easystroke.SlackBuild b/accessibility/easystroke/easystroke.SlackBuild index 29b04e812b..3e2f2fedcc 100644 --- a/accessibility/easystroke/easystroke.SlackBuild +++ b/accessibility/easystroke/easystroke.SlackBuild @@ -59,6 +59,7 @@ sed -i 's|-lboost_serialization-mt|-lboost_serialization|' Makefile # Thanks to ARCH Linux patch -p1 < $CWD/lambda.patch +patch -p1 < $CWD/gcc7-build-fix.patch make CXX="g++ $SLKCFLAGS" CC="gcc -std=c99 $SLKCFLAGS" PREFIX=/usr diff --git a/accessibility/easystroke/gcc7-build-fix.patch b/accessibility/easystroke/gcc7-build-fix.patch new file mode 100644 index 0000000000..b66bcb4edf --- /dev/null +++ b/accessibility/easystroke/gcc7-build-fix.patch @@ -0,0 +1,40 @@ +From 9e2c32390c5c253aade3bb703e51841748d2c37e Mon Sep 17 00:00:00 2001 +From: Jonathan Wakely <jwakely@redhat.com> +Date: Sat, 28 Jan 2017 01:26:00 +0000 +Subject: [PATCH] Remove abs(float) function that clashes with std::abs(float) + +Depending on which C++ standard library headers have been included there +might an abs(float) function already declared in the global namespace, +so the definition in this file conflicts with it. This cause a build +failure with GCC 7, which conforms more closely to the C++ standard with +respect to overloads of abs. + +Including <cmath> and adding a using-declaration for std::abs ensures +that the standard std::abs(float) function is available. This solution +should be portable to all compilers. +--- + handler.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/handler.cc b/handler.cc +index 8830ea2..685b1ff 100644 +--- a/handler.cc ++++ b/handler.cc +@@ -23,6 +23,8 @@ + #include <X11/extensions/XTest.h> + #include <X11/XKBlib.h> + #include <X11/Xproto.h> ++#include <cmath> // std::abs(float) ++using std::abs; + + XState *xstate = nullptr; + +@@ -533,8 +535,6 @@ class WaitForPongHandler : public Handler, protected Timeout { + virtual Grabber::State grab_mode() { return parent->grab_mode(); } + }; + +-static inline float abs(float x) { return x > 0 ? x : -x; } +- + class AbstractScrollHandler : public Handler { + bool have_x, have_y; + float last_x, last_y; diff --git a/accessibility/flite/flite.info b/accessibility/flite/flite.info index 4b6c62b261..05d4e52227 100644 --- a/accessibility/flite/flite.info +++ b/accessibility/flite/flite.info @@ -5,6 +5,6 @@ DOWNLOAD="http://festvox.org/flite/packed/flite-2.1/flite-2.1-release.tar.bz2" MD5SUM="915ac91068fc962f4a0e8aa26164cc8a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="" +REQUIRES="texi2html" MAINTAINER="B. Watson" EMAIL="yalhcru@gmail.com" diff --git a/accessibility/jpilot/jpilot.SlackBuild b/accessibility/jpilot/jpilot.SlackBuild index 78eeb3f868..e2dd848145 100644 --- a/accessibility/jpilot/jpilot.SlackBuild +++ b/accessibility/jpilot/jpilot.SlackBuild @@ -25,13 +25,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=jpilot -VERSION=${VERSION:-1.8.1} +VERSION=${VERSION:-1.8.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -60,15 +60,16 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP rm -rf $PRGNAM-$VERSION +cd $TMP +rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS -std=gnu89" \ CXXFLAGS="$SLKCFLAGS -std=gnu89" \ @@ -84,10 +85,8 @@ CXXFLAGS="$SLKCFLAGS -std=gnu89" \ make make install-strip DESTDIR=$PKG -( cd $PKG/usr/man - find . -type f -exec gzip -9 {} \; - for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -) +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done mv $PKG/usr/share/doc $PKG/usr mv $PKG/usr/doc/jpilot $PKG/usr/doc/jpilot-$VERSION diff --git a/accessibility/jpilot/jpilot.info b/accessibility/jpilot/jpilot.info index 4030813d5e..9d14b884f0 100644 --- a/accessibility/jpilot/jpilot.info +++ b/accessibility/jpilot/jpilot.info @@ -1,8 +1,8 @@ PRGNAM="jpilot" -VERSION="1.8.1" +VERSION="1.8.2" HOMEPAGE="http://www.jpilot.org" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/jpilot-1.8.1.tar.gz" -MD5SUM="ac59a5708f37e30d39e85b1fcedd266f" +DOWNLOAD="http://jpilot.org/tarballs/jpilot-1.8.2.tar.gz" +MD5SUM="8b539d8943ac75c7890fc5c071e89adb" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/audio/aacgain/aacgain.SlackBuild b/audio/aacgain/aacgain.SlackBuild index 2a138e95c9..cabdf16c33 100644 --- a/audio/aacgain/aacgain.SlackBuild +++ b/audio/aacgain/aacgain.SlackBuild @@ -120,7 +120,7 @@ cd ../mp4v2 patch -p2 -i ../$PRGNAM/mp4v2.patch CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --build=$ARCH-slackware-linux diff --git a/audio/alsamodularsynth/alsamodularsynth.SlackBuild b/audio/alsamodularsynth/alsamodularsynth.SlackBuild index 60c79fccb5..088d4c44dd 100644 --- a/audio/alsamodularsynth/alsamodularsynth.SlackBuild +++ b/audio/alsamodularsynth/alsamodularsynth.SlackBuild @@ -31,7 +31,7 @@ TARNAM=ams if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -72,6 +72,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +export CC=clang +export CXX=clang++ + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LIBS="-ldl" \ diff --git a/audio/audacious-aac/audacious-aac.SlackBuild b/audio/audacious-aac/audacious-aac.SlackBuild index fa61144a3d..686aee386c 100644 --- a/audio/audacious-aac/audacious-aac.SlackBuild +++ b/audio/audacious-aac/audacious-aac.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=audacious-aac -VERSION=${VERSION:-3.7.2} +VERSION=${VERSION:-3.8.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -31,7 +31,7 @@ SRCNAM=audacious-plugins if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" ARCHOPTS="--disable-sse2" elif [ "$ARCH" = "i686" ]; then diff --git a/audio/audacious-aac/audacious-aac.info b/audio/audacious-aac/audacious-aac.info index 6b6130fe82..a55c639a2d 100644 --- a/audio/audacious-aac/audacious-aac.info +++ b/audio/audacious-aac/audacious-aac.info @@ -1,8 +1,8 @@ PRGNAM="audacious-aac" -VERSION="3.7.2" +VERSION="3.8.2" HOMEPAGE="https://audacious-media-player.org/" -DOWNLOAD="https://distfiles.audacious-media-player.org/audacious-plugins-3.7.2.tar.bz2" -MD5SUM="6ae2f17885897e717b8bbafc32858e2f" +DOWNLOAD="https://distfiles.audacious-media-player.org/audacious-plugins-3.8.2.tar.bz2" +MD5SUM="20710cd19fa08c4bffb6cb33002872df" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="faad2" diff --git a/audio/audacious-cue/audacious-cue.SlackBuild b/audio/audacious-cue/audacious-cue.SlackBuild index a3a796cd74..8d018fdadb 100644 --- a/audio/audacious-cue/audacious-cue.SlackBuild +++ b/audio/audacious-cue/audacious-cue.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=audacious-cue -VERSION=${VERSION:-3.7.2} +VERSION=${VERSION:-3.8.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -31,7 +31,7 @@ SRCNAM=audacious-plugins if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" ARCHOPTS="--disable-sse2" elif [ "$ARCH" = "i686" ]; then diff --git a/audio/audacious-cue/audacious-cue.info b/audio/audacious-cue/audacious-cue.info index 3ae7eef3e3..31b7a1a12c 100644 --- a/audio/audacious-cue/audacious-cue.info +++ b/audio/audacious-cue/audacious-cue.info @@ -1,8 +1,8 @@ PRGNAM="audacious-cue" -VERSION="3.7.2" +VERSION="3.8.2" HOMEPAGE="https://audacious-media-player.org/" -DOWNLOAD="https://distfiles.audacious-media-player.org/audacious-plugins-3.7.2.tar.bz2" -MD5SUM="6ae2f17885897e717b8bbafc32858e2f" +DOWNLOAD="https://distfiles.audacious-media-player.org/audacious-plugins-3.8.2.tar.bz2" +MD5SUM="20710cd19fa08c4bffb6cb33002872df" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libcue" diff --git a/audio/audacious-ffmpeg/README b/audio/audacious-ffmpeg/README deleted file mode 100644 index 04da987f9f..0000000000 --- a/audio/audacious-ffmpeg/README +++ /dev/null @@ -1,4 +0,0 @@ -audacious-ffmpeg (ffmpeg Decoder Plugin used by the Audacious player) - -This plugin adds all audio ffmpeg decoders to the Audacious media -player that comes with Slackware stock packages diff --git a/audio/audacious-ffmpeg/audacious-ffmpeg.SlackBuild b/audio/audacious-ffmpeg/audacious-ffmpeg.SlackBuild deleted file mode 100644 index f45b5c764f..0000000000 --- a/audio/audacious-ffmpeg/audacious-ffmpeg.SlackBuild +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh - -# Slackware build script for audacious-ffmpeg - -# Copyright 2016 Johannes Schoepfer, Herrenberg, BW; Germany -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=audacious-ffmpeg -VERSION=${VERSION:-3.7.2} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -SRCNAM=audacious-plugins - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" - ARCHOPTS="--disable-sse2" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" - ARCHOPTS="--disable-sse2" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" - ARCHOPTS="" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" - ARCHOPTS="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2 -cd $SRCNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# Patch Makefile to build only aac plugin -patch -p1 <$CWD/patches/enable_only_ffmpeg_plugin.diff || exit 1 - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --disable-aac \ - --program-prefix= \ - --program-suffix= \ - ${ARCHOPTS} \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/audacious-ffmpeg/audacious-ffmpeg.info b/audio/audacious-ffmpeg/audacious-ffmpeg.info deleted file mode 100644 index 4d49914a64..0000000000 --- a/audio/audacious-ffmpeg/audacious-ffmpeg.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="audacious-ffmpeg" -VERSION="3.7.2" -HOMEPAGE="https://audacious-media-player.org/" -DOWNLOAD="https://distfiles.audacious-media-player.org/audacious-plugins-3.7.2.tar.bz2" -MD5SUM="6ae2f17885897e717b8bbafc32858e2f" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="ffmpeg" -MAINTAINER="Johannes Schoepfer" -EMAIL="slackbuilds[at]schoepfer[dot]info" diff --git a/audio/audacious-ffmpeg/patches/enable_only_ffmpeg_plugin.diff b/audio/audacious-ffmpeg/patches/enable_only_ffmpeg_plugin.diff deleted file mode 100644 index feb3fab813..0000000000 --- a/audio/audacious-ffmpeg/patches/enable_only_ffmpeg_plugin.diff +++ /dev/null @@ -1,8 +0,0 @@ ---- audacious-plugins-3.6.1/Makefile.ORIG 2015-04-04 02:02:06.000000000 +0200 -+++ audacious-plugins-3.6.1/Makefile 2015-04-23 19:59:48.072721987 +0200 -@@ -1,4 +1,4 @@ --SUBDIRS = src po -+SUBDIRS = src/ffaudio - - DISTCLEAN = buildsys.mk config.h config.log config.status extra.mk - diff --git a/audio/audacious-ffmpeg/slack-desc b/audio/audacious-ffmpeg/slack-desc deleted file mode 100644 index e14234a198..0000000000 --- a/audio/audacious-ffmpeg/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -audacious-ffmpeg: audacious-ffmpeg (ffmpeg Decoder Plugin) -audacious-ffmpeg: -audacious-ffmpeg: This plugin adds all audio ffmpeg decoders to the Audacious media -audacious-ffmpeg: player that comes with Slackware stock packages -audacious-ffmpeg: -audacious-ffmpeg: Homepage: https://audacious-media-player.org/ -audacious-ffmpeg: -audacious-ffmpeg: -audacious-ffmpeg: -audacious-ffmpeg: -audacious-ffmpeg: diff --git a/audio/butt/butt.SlackBuild b/audio/butt/butt.SlackBuild index 8cfe05ed28..5a9e116b18 100644 --- a/audio/butt/butt.SlackBuild +++ b/audio/butt/butt.SlackBuild @@ -55,7 +55,7 @@ find . \ -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --prefix $PREFIX \ --docdir $DOCDIR diff --git a/audio/calf-ladspa/calf-ladspa.SlackBuild b/audio/calf-ladspa/calf-ladspa.SlackBuild index f78f393bc7..2d85f57020 100644 --- a/audio/calf-ladspa/calf-ladspa.SlackBuild +++ b/audio/calf-ladspa/calf-ladspa.SlackBuild @@ -98,7 +98,7 @@ patch -p1 < $CWD/disable-jack-and-fluidsynth.diff # This patch replaces them with C-style MIN and MAX macros. Not actually # needed on Slack 14.2, so it's commented out, but I'm checking the actual # patch into git so I won't lose track of it. -#patch -p1 < $CWD/minmax.diff +patch -p1 < $CWD/minmax.diff autoreconf -if diff --git a/audio/darkice/darkice.SlackBuild b/audio/darkice/darkice.SlackBuild index b9829076da..887e4fa8d4 100644 --- a/audio/darkice/darkice.SlackBuild +++ b/audio/darkice/darkice.SlackBuild @@ -71,7 +71,7 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -fpermissive" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ diff --git a/audio/easytag/README b/audio/easytag/README deleted file mode 100644 index b03cc1adc5..0000000000 --- a/audio/easytag/README +++ /dev/null @@ -1,7 +0,0 @@ -EasyTAG - Tag editor for MP3, ogg vorbis and various other files. - -EasyTAG is a utility for viewing and editing tags for MP3, MP2, FLAC -Ogg Vorbis, MP4/AAC, MusePack and Monkey's Audio files. Its simple -and nice GTK2 interface makes tagging easier under GNU/Linux. - -libmp4v2 is an optional dependency. diff --git a/audio/easytag/doinst.sh b/audio/easytag/doinst.sh deleted file mode 100644 index aea0f894eb..0000000000 --- a/audio/easytag/doinst.sh +++ /dev/null @@ -1,13 +0,0 @@ -if [ -x /usr/bin/update-desktop-database ]; then - /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 -fi - -if [ -x /usr/bin/update-mime-database ]; then - /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 -fi - -if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then - if [ -x /usr/bin/gtk-update-icon-cache ]; then - /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 - fi -fi diff --git a/audio/easytag/easytag.SlackBuild b/audio/easytag/easytag.SlackBuild deleted file mode 100644 index 7ad594517c..0000000000 --- a/audio/easytag/easytag.SlackBuild +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh - -# Slackware build script for easytag - -# Copyright 2006 Halim Issa <yallaone@gmail.com> -# Copyright 2013-2014 LEVAI Daniel <leva@ecentrum.hu> -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=easytag -VERSION=${VERSION:-2.1.10} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i486 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --mandir=/usr/man \ - --build=$ARCH-slackware-linux - -make -make install-strip DESTDIR=$PKG - -DOCS="AUTHORS ChangeLog COPYING HACKING INSTALL README NEWS THANKS TODO" - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -cat $CWD/$PRGNAM.info > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.info - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh - -cd $PKG -/sbin/makepkg -p -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/easytag/easytag.info b/audio/easytag/easytag.info deleted file mode 100644 index b35369e4a5..0000000000 --- a/audio/easytag/easytag.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="easytag" -VERSION="2.1.10" -HOMEPAGE="http://projects.gnome.org/easytag/" -DOWNLOAD="http://download.gnome.org/sources/easytag/2.1/easytag-2.1.10.tar.xz" -MD5SUM="feafcd13508c26171f1376aa4b0629c4" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="id3lib" -MAINTAINER="LEVAI Daniel" -EMAIL="leva@ecentrum.hu" diff --git a/audio/easytag/slack-desc b/audio/easytag/slack-desc deleted file mode 100644 index 07c27c80ce..0000000000 --- a/audio/easytag/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -easytag: easytag (Tag editor for MP3 and Ogg Vorbis files) -easytag: -easytag: EasyTAG is a utility for viewing and editing tags for MP3, MP2, FLAC -easytag: Ogg Vorbis, MP4/AAC, MusePack and Monkey's Audio files. Its simple -easytag: and nice GTK2 interface makes tagging easier under GNU/Linux. -easytag: -easytag: Website : http://easytag.sourceforge.net -easytag: -easytag: -easytag: -easytag: diff --git a/audio/fluidsynth/README b/audio/fluidsynth/README deleted file mode 100644 index a309ca2db2..0000000000 --- a/audio/fluidsynth/README +++ /dev/null @@ -1,9 +0,0 @@ -FluidSynth is a software real-time synthesizer based on the Soundfont 2 -specifications. FluidSynth reads and handles MIDI events from the MIDI -input device. It is the software analogue of a MIDI synthesizer. -FluidSynth can also play midifiles using a Soundfont. - -If you want to build support for ladspa plugins, you can pass -LADSPA=yes to the script. That requires ladspa_sdk. - -Optional deps are lash, portaudio, and jack-audio-connection-kit. diff --git a/audio/fluidsynth/fluidsynth.SlackBuild b/audio/fluidsynth/fluidsynth.SlackBuild deleted file mode 100644 index 7cf814a89d..0000000000 --- a/audio/fluidsynth/fluidsynth.SlackBuild +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -# Slackware build script for fluidsynth - -# Copyright 2008-2013 Heinz Wiesinger, Amsterdam, The Netherlands -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=fluidsynth -VERSION=${VERSION:-1.1.6} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -mkdir build -cd build - cmake \ - -DCMAKE_C_FLAGS="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ - -DCMAKE_EXE_LINKER_FLAGS="-ltermcap" \ - -DCMAKE_SHARED_LINKER_FLAGS="-ltermcap" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLIB_SUFFIX="$LIBDIRSUFFIX" \ - -DDOC_INSTALL_DIR="doc" \ - -DMAN_INSTALL_DIR="man/man1" \ - -Denable-ladspa="${LADSPA:-no}" \ - .. - - make - make install DESTDIR=$PKG -cd - - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS ChangeLog COPYING INSTALL NEWS README THANKS TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/fluidsynth/fluidsynth.info b/audio/fluidsynth/fluidsynth.info deleted file mode 100644 index d3b454c60f..0000000000 --- a/audio/fluidsynth/fluidsynth.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="fluidsynth" -VERSION="1.1.6" -HOMEPAGE="http://www.fluidsynth.org/" -DOWNLOAD="http://downloads.sourceforge.net/fluidsynth/fluidsynth-1.1.6.tar.gz" -MD5SUM="ae5aca6de824b4173667cbd3a310b263" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Heinz Wiesinger" -EMAIL="pprkut@liwjatan.at" diff --git a/audio/fluidsynth/slack-desc b/audio/fluidsynth/slack-desc deleted file mode 100644 index 46df5825cd..0000000000 --- a/audio/fluidsynth/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -fluidsynth: fluidsynth (Software Synthesizer) -fluidsynth: -fluidsynth: FluidSynth is a software real-time synthesizer based on the -fluidsynth: Soundfont 2 specifications. FluidSynth reads and handles MIDI -fluidsynth: events from the MIDI input device. It is the software analogue -fluidsynth: of a MIDI synthesizer. FluidSynth can also play midifiles -fluidsynth: using a Soundfont. -fluidsynth: -fluidsynth: Homepage: http://www.fluidsynth.org/ -fluidsynth: -fluidsynth: diff --git a/audio/lash/lash.SlackBuild b/audio/lash/lash.SlackBuild index 0918bdd95d..7b197365b9 100644 --- a/audio/lash/lash.SlackBuild +++ b/audio/lash/lash.SlackBuild @@ -76,6 +76,8 @@ if [ "$(/usr/share/texmf/bin/texi2html --version)" != "1.76" ]; then patch -p1 --verbose < $CWD/texlive.patch fi +export LDFLAGS="-ldl -lm" + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/audio/lmms/gcc6.patch b/audio/lmms/gcc6.patch new file mode 100644 index 0000000000..ef7fbe75c9 --- /dev/null +++ b/audio/lmms/gcc6.patch @@ -0,0 +1,112 @@ +From a06cb0126ccb025993efb2d81c7cbfd8edd60609 Mon Sep 17 00:00:00 2001 +From: Javier Serrano Polo <javier@jasp.net> +Date: Sat, 30 Apr 2016 00:00:09 +0200 +Subject: [PATCH] Fixed build problems with GCC 6 + +--- + plugins/LadspaEffect/calf/src/modules_limit.cpp | 3 ++- + plugins/opl2/fmopl.c | 29 +++++++++++----------- + .../zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl | 6 +++-- + .../zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl | 6 +++-- + 5 files changed, 29 insertions(+), 22 deletions(-) + +diff --git a/plugins/LadspaEffect/calf/src/modules_limit.cpp b/plugins/LadspaEffect/calf/src/modules_limit.cpp +index 3930078..cd3d6fa 100644 +--- a/plugins/LadspaEffect/calf/src/modules_limit.cpp ++++ b/plugins/LadspaEffect/calf/src/modules_limit.cpp +@@ -540,7 +540,8 @@ uint32_t multibandlimiter_audio_module::process(uint32_t offset, uint32_t numsam + } // process single strip with filter + + // write multiband coefficient to buffer +- buffer[pos] = std::min(*params[param_limit] / std::max(fabs(sum_left), fabs(sum_right)), 1.0); ++ float pre_buffer = *params[param_limit] / std::max(fabs(sum_left), fabs(sum_right)); ++ buffer[pos] = std::min(pre_buffer, 1.0f); + + for (int i = 0; i < strips; i++) { + // process gain reduction +diff --git a/plugins/opl2/fmopl.c b/plugins/opl2/fmopl.c +index 9b411a2..3dd4a51 100644 +--- a/plugins/opl2/fmopl.c ++++ b/plugins/opl2/fmopl.c +@@ -653,21 +653,21 @@ static void init_timetables( FM_OPL *OPL , int ARRATE , int DRRATE ) { + double rate; + + /* make attack rate & decay rate tables */ +- for ( i = 0; i < 4; i++ ) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; { +- for (i = 4; i <= 60; i++) { +- rate = OPL->freqbase; /* frequency rate */ +- if( i < 60 ) { +- rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */ +- } +- rate *= 1<<((i>>2)-1); /* b2-5 : shift bit */ +- rate *= (double)(EG_ENT<<ENV_BITS); +- OPL->AR_TABLE[i] = rate / ARRATE; +- OPL->DR_TABLE[i] = rate / DRRATE; +- } +- for ( i = 60; i < 75; i++ ) { +- OPL->AR_TABLE[i] = EG_AED-1; +- OPL->DR_TABLE[i] = OPL->DR_TABLE[60]; ++ for ( i = 0; i < 4; i++ ) OPL->AR_TABLE[i] = OPL->DR_TABLE[i] = 0; ++ for (i = 4; i <= 60; i++) { ++ rate = OPL->freqbase; /* frequency rate */ ++ if( i < 60 ) { ++ rate *= 1.0+(i&3)*0.25; /* b0-1 : x1 , x1.25 , x1.5 , x1.75 */ + } ++ rate *= 1<<((i>>2)-1); /* b2-5 : shift bit */ ++ rate *= (double)(EG_ENT<<ENV_BITS); ++ OPL->AR_TABLE[i] = rate / ARRATE; ++ OPL->DR_TABLE[i] = rate / DRRATE; ++ } ++ for ( i = 60; i < 75; i++ ) { ++ OPL->AR_TABLE[i] = EG_AED-1; ++ OPL->DR_TABLE[i] = OPL->DR_TABLE[60]; ++ } + #if 0 + for ( i = 0; i < 64 ; i++ ) { /* make for overflow area */ + LOG(LOG_WAR,("rate %2d , ar %f ms , dr %f ms \n",i, +@@ -675,7 +675,6 @@ static void init_timetables( FM_OPL *OPL , int ARRATE , int DRRATE ) { + ((double)(EG_ENT<<ENV_BITS) / OPL->DR_TABLE[i]) * (1000.0 / OPL->rate) )); + } + #endif +- } + } + + /* ---------- generic table initialize ---------- */ +diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl +index 359f64c..db70677 100644 +--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl ++++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/EnvelopeUI.fl +@@ -204,12 +204,14 @@ if (event==FL_RELEASE){ + + if ((event==FL_DRAG)&&(currentpoint>=0)){ + int ny=127-(int) (y_*127.0/h()); +- if (ny<0) ny=0;if (ny>127) ny=127; ++ if (ny<0) ny=0; ++ if (ny>127) ny=127; + env->Penvval[currentpoint]=ny; + + int dx=(int)((x_-cpx)*0.1); + int newdt=cpdt+dx; +- if (newdt<0) newdt=0;if (newdt>127) newdt=127; ++ if (newdt<0) newdt=0; ++ if (newdt>127) newdt=127; + if (currentpoint!=0) env->Penvdt[currentpoint]=newdt; + else env->Penvdt[currentpoint]=0; + +diff --git a/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl b/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl +index f1b887c..5ab7290 100644 +--- a/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl ++++ b/plugins/zynaddsubfx/zynaddsubfx/src/UI/ResonanceUI.fl +@@ -133,8 +133,10 @@ if ( (x_>=0)&&(x_<w()) && (y_>=0)&&(y_<h())){ + if ((event==FL_PUSH)||(event==FL_DRAG)){ + int leftbutton=1; + if (Fl::event_button()==FL_RIGHT_MOUSE) leftbutton=0; +- if (x_<0) x_=0;if (y_<0) y_=0; +- if (x_>=w()) x_=w();if (y_>=h()-1) y_=h()-1; ++ if (x_<0) x_=0; ++ if (y_<0) y_=0; ++ if (x_>=w()) x_=w(); ++ if (y_>=h()-1) y_=h()-1; + + if ((oldx<0)||(oldx==x_)){ + int sn=(int)(x_*1.0/w()*N_RES_POINTS); diff --git a/audio/lmms/lmms.SlackBuild b/audio/lmms/lmms.SlackBuild index 521fc88259..2d2981d37b 100644 --- a/audio/lmms/lmms.SlackBuild +++ b/audio/lmms/lmms.SlackBuild @@ -51,6 +51,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks archlinux +patch -p1 < $CWD/gcc6.patch + mkdir build cd build cmake \ diff --git a/audio/mac/gcc6.patch b/audio/mac/gcc6.patch new file mode 100644 index 0000000000..e22d1c1f53 --- /dev/null +++ b/audio/mac/gcc6.patch @@ -0,0 +1,181 @@ +From: Peter Levine <plevine457@gmail.com> +--- mac-3.99-u4-b5-s7/src/Shared/NoWindows.h.old 2016-09-18 21:37:56.049105791 -0400 ++++ mac-3.99-u4-b5-s7/src/Shared/NoWindows.h 2016-09-18 21:55:29.666295506 -0400 +@@ -39,8 +39,8 @@ + typedef const wchar_t * LPCWSTR; + + #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES); +-#define max(a,b) (((a) > (b)) ? (a) : (b)) +-#define min(a,b) (((a) < (b)) ? (a) : (b)) ++#define max_macro(a,b) (((a) > (b)) ? (a) : (b)) ++#define min_macro(a,b) (((a) < (b)) ? (a) : (b)) + + #define __stdcall + #define CALLBACK +--- mac-3.99-u4-b5-s7/src/Shared/CircleBuffer.cpp.old 2016-09-18 21:43:44.270495095 -0400 ++++ mac-3.99-u4-b5-s7/src/Shared/CircleBuffer.cpp 2016-09-18 21:44:47.960148731 -0400 +@@ -45,7 +45,7 @@ + + if (pBuffer != NULL && nBytes > 0) + { +- int nHeadBytes = min(m_nEndCap - m_nHead, nBytes); ++ int nHeadBytes = min_macro(m_nEndCap - m_nHead, nBytes); + int nFrontBytes = nBytes - nHeadBytes; + + memcpy(&pBuffer[0], &m_pBuffer[m_nHead], nHeadBytes); +@@ -72,7 +72,7 @@ + + int CCircleBuffer::RemoveHead(int nBytes) + { +- nBytes = min(MaxGet(), nBytes); ++ nBytes = min_macro(MaxGet(), nBytes); + m_nHead += nBytes; + if (m_nHead >= m_nEndCap) + m_nHead -= m_nEndCap; +@@ -81,7 +81,7 @@ + + int CCircleBuffer::RemoveTail(int nBytes) + { +- nBytes = min(MaxGet(), nBytes); ++ nBytes = min_macro(MaxGet(), nBytes); + m_nTail -= nBytes; + if (m_nTail < 0) + m_nTail += m_nEndCap; +--- mac-3.99-u4-b5-s7/src/MACLib/APECompress.cpp.old 2016-09-18 21:48:40.916547811 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/APECompress.cpp 2016-09-18 21:51:43.670733601 -0400 +@@ -117,7 +117,7 @@ + return ERROR_UNDEFINED; + + // calculate how many bytes to copy and add that much to the buffer +- int nBytesToProcess = min(nBytesAvailable, nBytes - nBytesDone); ++ int nBytesToProcess = min_macro(nBytesAvailable, nBytes - nBytesDone); + memcpy(pBuffer, &pData[nBytesDone], nBytesToProcess); + + // unlock the buffer (fail if not successful) +@@ -162,7 +162,7 @@ + + while ((m_nBufferTail - m_nBufferHead) >= nThreshold) + { +- int nFrameBytes = min(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead); ++ int nFrameBytes = min_macro(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead); + + if (nFrameBytes == 0) + break; +--- mac-3.99-u4-b5-s7/src/MACLib/APEDecompress.cpp.old 2016-09-18 21:46:56.962072960 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/APEDecompress.cpp 2016-09-18 22:01:14.402044817 -0400 +@@ -35,8 +35,8 @@ + m_bErrorDecodingCurrentFrame = FALSE; + + // set the "real" start and finish blocks +- m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); +- m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); ++ m_nStartBlock = (nStartBlock < 0) ? 0 : min_macro(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); ++ m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min_macro(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS)); + m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS)); + } + +@@ -85,7 +85,7 @@ + + // cap + int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock; +- const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish); ++ const int nBlocksToRetrieve = min_macro(nBlocks, nBlocksUntilFinish); + + // get the data + unsigned char * pOutputBuffer = (unsigned char *) pBuffer; +@@ -99,7 +99,7 @@ + + // analyze how much to remove from the buffer + const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks; +- nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks); ++ nBlocksThisPass = min_macro(nBlocksLeft, nFrameBufferBlocks); + + // remove as much as possible + if (nBlocksThisPass > 0) +@@ -182,7 +182,7 @@ + + int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME); + int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks; +- int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft); ++ int nBlocksThisPass = min_macro(nFrameBlocksLeft, nBlocksLeft); + + // start the frame if we need to + if (nFrameOffsetBlocks == 0) +--- mac-3.99-u4-b5-s7/src/MACLib/APESimple.cpp.old 2016-09-18 21:47:16.972925909 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/APESimple.cpp 2016-09-18 21:52:39.022779503 -0400 +@@ -193,7 +193,7 @@ + nBytesRead = 1; + while ((nBytesLeft > 0) && (nBytesRead > 0)) + { +- int nBytesToRead = min(16384, nBytesLeft); ++ int nBytesToRead = min_macro(16384, nBytesLeft); + if (pIO->Read(spBuffer, nBytesToRead, &nBytesRead) != ERROR_SUCCESS) + return ERROR_IO_READ; + +--- mac-3.99-u4-b5-s7/src/MACLib/APETag.cpp.old 2016-09-18 21:55:53.331533348 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/APETag.cpp 2016-09-18 21:58:21.508345586 -0400 +@@ -16,7 +16,7 @@ + memcpy(m_spFieldNameUTF16, pFieldName, (wcslen(pFieldName) + 1) * sizeof(str_utf16)); + + // data (we'll always allocate two extra bytes and memset to 0 so we're safely NULL terminated) +- m_nFieldValueBytes = max(nFieldBytes, 0); ++ m_nFieldValueBytes = max_macro(nFieldBytes, 0); + m_spFieldValue.Assign(new char [m_nFieldValueBytes + 2], TRUE); + memset(m_spFieldValue, 0, m_nFieldValueBytes + 2); + if (m_nFieldValueBytes > 0) +--- mac-3.99-u4-b5-s7/src/MACLib/BitArray.cpp.old 2016-09-18 21:53:24.090030009 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/BitArray.cpp 2016-09-18 22:00:13.500083252 -0400 +@@ -113,7 +113,7 @@ + m_nCurrentBitIndex = (m_nCurrentBitIndex & 31); + + // zero the rest of the memory (may not need the +1 because of frame byte alignment) +- memset(&m_pBitArray[1], 0, min(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1)); ++ memset(&m_pBitArray[1], 0, min_macro(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1)); + } + + // return a success +@@ -247,7 +247,7 @@ + BitArrayState.k++; + + // figure the pivot value +- int nPivotValue = max(nOriginalKSum / 32, 1); ++ int nPivotValue = max_macro(nOriginalKSum / 32, 1); + int nOverflow = nEncode / nPivotValue; + int nBase = nEncode - (nOverflow * nPivotValue); + +--- mac-3.99-u4-b5-s7/src/MACLib/MACProgressHelper.cpp.old 2016-09-18 21:56:44.606337012 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/MACProgressHelper.cpp 2016-09-18 21:59:55.854310134 -0400 +@@ -35,7 +35,7 @@ + m_nCurrentStep = nCurrentStep; + + // figure the percentage done +- float fPercentageDone = float(m_nCurrentStep) / float(max(m_nTotalSteps, 1)); ++ float fPercentageDone = float(m_nCurrentStep) / float(max_macro(m_nTotalSteps, 1)); + int nPercentageDone = (int) (fPercentageDone * 1000 * 100); + if (nPercentageDone > 100000) nPercentageDone = 100000; + +--- mac-3.99-u4-b5-s7/src/MACLib/Prepare.cpp.old 2016-09-18 21:56:29.974394222 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/Prepare.cpp 2016-09-18 21:59:28.214726465 -0400 +@@ -177,9 +177,9 @@ + + if (LPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_LEFT_SILENCE; } + if (RPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_RIGHT_SILENCE; } +- if (max(LPeak, RPeak) > *pPeakLevel) ++ if (max_macro(LPeak, RPeak) > *pPeakLevel) + { +- *pPeakLevel = max(LPeak, RPeak); ++ *pPeakLevel = max_macro(LPeak, RPeak); + } + + // check for pseudo-stereo files +--- mac-3.99-u4-b5-s7/src/MACLib/UnBitArray.cpp.old 2016-09-18 21:56:16.548445898 -0400 ++++ mac-3.99-u4-b5-s7/src/MACLib/UnBitArray.cpp 2016-09-18 21:58:56.148161050 -0400 +@@ -110,7 +110,7 @@ + if (m_nVersion >= 3990) + { + // figure the pivot value +- int nPivotValue = max(BitArrayState.nKSum / 32, 1); ++ int nPivotValue = max_macro(BitArrayState.nKSum / 32, 1); + + // get the overflow + int nOverflow = 0; diff --git a/audio/mac/mac.SlackBuild b/audio/mac/mac.SlackBuild index d6a2912baf..cc20891de3 100644 --- a/audio/mac/mac.SlackBuild +++ b/audio/mac/mac.SlackBuild @@ -73,6 +73,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ +patch -p1 < $CWD/gcc6.patch + LDFLAGS="-Wl,-s" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/audio/milkytracker/README b/audio/milkytracker/README index f16c7e8551..b940d275bb 100644 --- a/audio/milkytracker/README +++ b/audio/milkytracker/README @@ -1,5 +1,4 @@ This is MilkyTracker 0.90.80. MilkyTracker is an audio tracker, and can create standard .MOD and .XM module files. -JACK support is optional and can be added by doing: - JACK=yes ./milkytracker.SlackBuild +lhasa is an optional dependency. diff --git a/audio/milkytracker/milkytracker.SlackBuild b/audio/milkytracker/milkytracker.SlackBuild index 7f6841c8f1..fc2a020d71 100644 --- a/audio/milkytracker/milkytracker.SlackBuild +++ b/audio/milkytracker/milkytracker.SlackBuild @@ -24,13 +24,14 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=milkytracker -VERSION=${VERSION:-0.90.86} +SRCNAM=MilkyTracker +VERSION=${VERSION:-1.02.00} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -41,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -60,34 +61,37 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 -cd $PRGNAM-$VERSION +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* +cd $SRCNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -lasound" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --with-jack=${JACK:-no} +# Thanks fedora +patch -p1 < $CWD/sdlmain.patch -make -make install DESTDIR=$PKG +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_DOCDIR=/usr/doc/$PRGNAM-$VERSION \ + -DCMAKE_BUILD_TYPE=Release \ + .. + make + make install DESTDIR=$PKG +cd .. mkdir -p $PKG/usr/share/{applications,pixmaps} cp $CWD/milkytracker.desktop $PKG/usr/share/applications cp resources/pictures/carton.png $PKG/usr/share/pixmaps/milkytracker-icon-128.png -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION diff --git a/audio/milkytracker/milkytracker.info b/audio/milkytracker/milkytracker.info index cdab01e8f0..d1ff04930b 100644 --- a/audio/milkytracker/milkytracker.info +++ b/audio/milkytracker/milkytracker.info @@ -1,10 +1,10 @@ PRGNAM="milkytracker" -VERSION="0.90.86" +VERSION="1.02.00" HOMEPAGE="http://www.milkytracker.org/" -DOWNLOAD="http://www.milkytracker.org/files/milkytracker-0.90.86.tar.bz2" -MD5SUM="1ef462969cf54ba61748d4d878b5747e" +DOWNLOAD="https://github.com/milkytracker/MilkyTracker/archive/v1.02.00/milkytracker-1.02.00.tar.gz" +MD5SUM="ab4c881b8bbd41fde60823c191c7c6ce" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="zziplib" +REQUIRES="jack-audio-connection-kit zziplib" MAINTAINER="Erik Hanson" EMAIL="erik@slackbuilds.org" diff --git a/audio/milkytracker/sdlmain.patch b/audio/milkytracker/sdlmain.patch new file mode 100644 index 0000000000..3917a062d6 --- /dev/null +++ b/audio/milkytracker/sdlmain.patch @@ -0,0 +1,12 @@ +diff -ru MilkyTracker-1.0.0/cmake/FindSDL2.cmake MilkyTracker-sdlmain/cmake/FindSDL2.cmake +--- MilkyTracker-1.0.0/cmake/FindSDL2.cmake 2017-03-12 21:30:25.000000000 +0200 ++++ MilkyTracker-sdlmain/cmake/FindSDL2.cmake 2017-03-19 20:23:15.773398294 +0200 +@@ -93,7 +93,7 @@ + endif() + + set(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) +-set(SDL2_LIBRARIES ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY}) ++set(SDL2_LIBRARIES ${SDL2_LIBRARY}) + + include(FindPackageHandleStandardArgs) + diff --git a/audio/muse/README b/audio/muse/README index 232eb66968..9930502f1b 100644 --- a/audio/muse/README +++ b/audio/muse/README @@ -4,6 +4,10 @@ the MusE development team. MusE aims to be a complete multitrack virtual studio for Linux, it is published under the GNU General Public License. -Optional dependencies are fluidsynth, dssi and lash. +Optional dependencies are fluidsynth, lash and lilv. To start MusE, the user has to be in the "audio" group. + +NOTE: it seems like native vst support is broken on x86 so we +disable it on this platform: vst plugins on x86 can still be used +through the optional dependency dssi-vst. diff --git a/audio/muse/muse.SlackBuild b/audio/muse/muse.SlackBuild index 833fd3ba30..90dffd9086 100644 --- a/audio/muse/muse.SlackBuild +++ b/audio/muse/muse.SlackBuild @@ -5,13 +5,13 @@ # Written by Felix Pfeifer pfeifer[dot]felix[at]googlemail[dot]com PRGNAM=muse -VERSION=${VERSION:-2.1.2} +VERSION=${VERSION:-3.0pre2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -22,8 +22,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -36,6 +36,9 @@ else LIBDIRSUFFIX="" fi +native_vst="" +[ "$ARCH" = "i586" ] && native_vst="-DENABLE_VST_NATIVE=0 -DENABLE_VST_VESTIGE=0" + set -e rm -rf $PKG @@ -46,19 +49,21 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +echo $native_vst mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -fpermissive" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DENABLE_PYTHON:STRING="ON" \ + $native_vst \ -DCMAKE_BUILD_TYPE=Release .. make make install DESTDIR=$PKG diff --git a/audio/muse/muse.info b/audio/muse/muse.info index f72af27286..c4baf66135 100644 --- a/audio/muse/muse.info +++ b/audio/muse/muse.info @@ -1,10 +1,10 @@ PRGNAM="muse" -VERSION="2.1.2" +VERSION="3.0pre2" HOMEPAGE="http://muse-sequencer.org/" -DOWNLOAD="http://downloads.sf.net/lmuse/muse-2.1.2.tar.gz" -MD5SUM="ad917335ac05a3d62e3cd073af901001" +DOWNLOAD="http://downloads.sf.net/lmuse/muse-3.0pre2.tar.gz" +MD5SUM="9737152b13ff90959507890ed1491bfa" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="jack-audio-connection-kit ladspa_sdk liblo" +REQUIRES="dssi jack-audio-connection-kit ladspa_sdk liblo qt5" MAINTAINER="Felix Pfeifer" EMAIL="pfeifer[dot]felix[at]googlemail[dot]com" diff --git a/audio/ocp/ocp.SlackBuild b/audio/ocp/ocp.SlackBuild index 523d4638c8..4351552662 100644 --- a/audio/ocp/ocp.SlackBuild +++ b/audio/ocp/ocp.SlackBuild @@ -70,7 +70,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; sed -i "s/0.1.20/0.1.21/g" configure -sed -i "4592c2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*|5.*)" configure +sed -i "4592c2.95.[2-9]|2.95.[2-9][-.]*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*|5.*|6.*|7.*)" configure CFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/audio/opus-tools/README b/audio/opus-tools/README deleted file mode 100644 index 4f031bf99a..0000000000 --- a/audio/opus-tools/README +++ /dev/null @@ -1,2 +0,0 @@ -opus-tools provides command-line utilities to encode, inspect and -decode .opus files. diff --git a/audio/opus-tools/opus-tools.SlackBuild b/audio/opus-tools/opus-tools.SlackBuild deleted file mode 100644 index 56c5cb9b65..0000000000 --- a/audio/opus-tools/opus-tools.SlackBuild +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh - -# Slackware build script for opus-tools - -# Copyright 2013-2018 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=opus-tools -VERSION=${VERSION:-0.1.10} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -DOCS="AUTHORS COPYING" - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/opus-tools/opus-tools.info b/audio/opus-tools/opus-tools.info deleted file mode 100644 index 9ee074f07d..0000000000 --- a/audio/opus-tools/opus-tools.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="opus-tools" -VERSION="0.1.10" -HOMEPAGE="http://www.opus-codec.org" -DOWNLOAD="https://ftp.mozilla.org/pub/mozilla.org/opus/opus-tools-0.1.10.tar.gz" -MD5SUM="6b78535d58b94832710b14e219f65a91" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="opus" -MAINTAINER="Matteo Bernardini" -EMAIL="ponce@slackbuilds.org" diff --git a/audio/opus-tools/slack-desc b/audio/opus-tools/slack-desc deleted file mode 100644 index 39aaf10819..0000000000 --- a/audio/opus-tools/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -opus-tools: opus-tools (utilities for opus) -opus-tools: -opus-tools: opus-tools provides command-line utilities to encode, inspect and -opus-tools: decode .opus files. -opus-tools: -opus-tools: homepage: http://www.opus-codec.org -opus-tools: -opus-tools: -opus-tools: -opus-tools: -opus-tools: diff --git a/audio/opus/README b/audio/opus/README deleted file mode 100644 index df5dd26216..0000000000 --- a/audio/opus/README +++ /dev/null @@ -1,4 +0,0 @@ -Opus is a totally open, royalty-free, highly versatile audio codec. -It is standardized by the Internet Engineering Task Force (IETF) -as RFC 6716 which incorporated technology from Skype's SILK codec -and Xiph.Org's CELT codec. diff --git a/audio/opus/opus.SlackBuild b/audio/opus/opus.SlackBuild deleted file mode 100644 index 0775667b2d..0000000000 --- a/audio/opus/opus.SlackBuild +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -# Slackware build script for opus - -# Copyright 2012-2017 Willy Sudiarto Raharjo <willysr@slackbuilds.org> -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=opus -VERSION=${VERSION:-1.3} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --disable-static \ - --enable-intrinsics \ - --enable-ambisonics \ - --enable-rtcd \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/opus/opus.info b/audio/opus/opus.info deleted file mode 100644 index 7006fbabfc..0000000000 --- a/audio/opus/opus.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="opus" -VERSION="1.3" -HOMEPAGE="https://opus-codec.org/" -DOWNLOAD="https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz" -MD5SUM="c4143b6823f2f0d5520d1be2155db2eb" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Willy Sudiarto Raharjo" -EMAIL="willysr@slackbuilds.org" diff --git a/audio/opus/slack-desc b/audio/opus/slack-desc deleted file mode 100644 index fb36dc8f15..0000000000 --- a/audio/opus/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -opus: opus (Audio Codec) -opus: -opus: Opus is a totally open, royalty-free, highly versatile audio codec. -opus: It is standardized by the Internet Engineering Task Force (IETF) -opus: as RFC 6716 which incorporated technology from Skype's SILK codec -opus: and Xiph.Org's CELT codec. -opus: -opus: Project site: https://opus-codec.org/ -opus: -opus: -opus: diff --git a/audio/opusfile/README b/audio/opusfile/README deleted file mode 100644 index 4c32609f79..0000000000 --- a/audio/opusfile/README +++ /dev/null @@ -1,2 +0,0 @@ -opusfile provides application developers with a high-level API for -decoding and seeking in .opus files. diff --git a/audio/opusfile/opusfile.info b/audio/opusfile/opusfile.info deleted file mode 100644 index 5a1d075dc5..0000000000 --- a/audio/opusfile/opusfile.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="opusfile" -VERSION="0.11" -HOMEPAGE="http://www.opus-codec.org" -DOWNLOAD="https://ftp.mozilla.org/pub/mozilla.org/opus/opusfile-0.11.tar.gz" -MD5SUM="e1e94a9a663b4ca7a388f367baf1a7e3" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="opus" -MAINTAINER="Matteo Bernardini" -EMAIL="ponce@slackbuilds.org" diff --git a/audio/opusfile/slack-desc b/audio/opusfile/slack-desc deleted file mode 100644 index e77532d058..0000000000 --- a/audio/opusfile/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -opusfile: opusfile (opus decoding API) -opusfile: -opusfile: opusfile provides application developers with a high-level API for -opusfile: decoding and seeking in .opus files. -opusfile: -opusfile: homepage: http://www.opus-codec.org -opusfile: -opusfile: -opusfile: -opusfile: -opusfile: diff --git a/audio/pithos/doinst.sh b/audio/pithos/doinst.sh index 4a25de5e6f..e924bab47c 100644 --- a/audio/pithos/doinst.sh +++ b/audio/pithos/doinst.sh @@ -8,3 +8,9 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then fi fi +if [ -e usr/share/glib-2.0/schemas ]; then + if [ -x /usr/bin/glib-compile-schemas ]; then + /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1 + fi +fi + diff --git a/audio/pithos/pithos.SlackBuild b/audio/pithos/pithos.SlackBuild index 32579cffe5..0d7c1f9b1e 100644 --- a/audio/pithos/pithos.SlackBuild +++ b/audio/pithos/pithos.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for pithos -# Copyright 2013 Robby Workman, Northport, Alabama, USA +# Copyright 2013,2017 Robby Workman, Tuscaloosa, Alabama, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=pithos -VERSION=${VERSION:-git_ed501485} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.4.0} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -61,15 +61,25 @@ mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION tar xvf $CWD/$PRGNAM-$VERSION.tar.xz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ +chown -R root:root $PRGNAM-$VERSION +find -L $PRGNAM-$VERSION \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python setup.py install --root=$PKG +mkdir -p $PRGNAM-$VERSION/build +meson \ + --prefix=/usr \ + --libdir=/usr/lib64 \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + $PRGNAM-$VERSION \ + $PRGNAM-$VERSION/build + +DESTDIR=$PKG ninja -C $PRGNAM-$VERSION/build install cat $CWD/contrib/pithosctl > $PKG/usr/bin/pithosctl chmod 0755 $PKG/usr/bin/pithosctl @@ -78,7 +88,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a CHANGELOG README.md $PKG/usr/doc/$PRGNAM-$VERSION +cp -a $PRGNAM-$VERSION/README.md $PRGNAM-$VERSION/license $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install diff --git a/audio/pithos/pithos.info b/audio/pithos/pithos.info index c276852bd2..198bec9218 100644 --- a/audio/pithos/pithos.info +++ b/audio/pithos/pithos.info @@ -1,10 +1,10 @@ PRGNAM="pithos" -VERSION="git_ed501485" -HOMEPAGE="http://kevinmehall.net/p/pithos/" -DOWNLOAD="http://harrier.slackbuilds.org/misc/pithos-git_ed501485.tar.xz" -MD5SUM="fb7f45ff93b5aab7b60e5b943d7bb024" +VERSION="1.4.0" +HOMEPAGE="https://github.com/pithos/pithos" +DOWNLOAD="https://github.com/pithos/pithos/releases/download/1.4.0/pithos-1.4.0.tar.xz" +MD5SUM="2324a9ed104682fb2417f662a82cc8bb" DOWNLOAD_x86_64="" MD5SUM_x86_64="" -REQUIRES="gst0-python gst0-ffmpeg" +REQUIRES="meson gst-python gst-libav" MAINTAINER="Robby Workman" EMAIL="rworkman@slackbuilds.org" diff --git a/audio/pithos/slack-desc b/audio/pithos/slack-desc index 3ac97f0f7d..c55001e893 100644 --- a/audio/pithos/slack-desc +++ b/audio/pithos/slack-desc @@ -13,7 +13,7 @@ pithos: lightweight than the Pandora.com web client and integrates with pithos: desktop features such as media keys, notifications, and the sound pithos: menu. pithos: -pithos: Homepage: http://kevinmehall.net/p/pithos/ +pithos: Homepage: https://github.com/pithos/pithos pithos: pithos: pithos: diff --git a/audio/rumor/gcc7.diff b/audio/rumor/gcc7.diff new file mode 100644 index 0000000000..a8c54f20c0 --- /dev/null +++ b/audio/rumor/gcc7.diff @@ -0,0 +1,12 @@ +diff -Naur rumor-1.0.5.orig/src/notator.cc rumor-1.0.5.new/src/notator.cc +--- rumor-1.0.5.orig/src/notator.cc 2010-11-15 18:40:22.000000000 +0100 ++++ rumor-1.0.5.new/src/notator.cc 2017-05-31 15:51:42.014855383 +0200 +@@ -334,7 +334,7 @@ + } + } else { + OctaveTic=(RefPitch_wt>AbsPitch_wt?',':'\''); +- NumTics=(abs(RefPitch_wt-AbsPitch_wt)+3)/7; ++ NumTics=(RefPitch_wt-AbsPitch_wt+3)/7; + RefPitch_wt=AbsPitch_wt; + } + for (int i=0; i<NumTics; i++){ diff --git a/audio/rumor/rumor.SlackBuild b/audio/rumor/rumor.SlackBuild index daeebef2b9..d3ee309487 100644 --- a/audio/rumor/rumor.SlackBuild +++ b/audio/rumor/rumor.SlackBuild @@ -49,6 +49,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Thanks to archlinux +patch -p1 < $CWD/gcc7.diff + ./autogen.sh CFLAGS="$SLKCFLAGS" \ diff --git a/audio/seq24/perfedit.patch b/audio/seq24/perfedit.patch deleted file mode 100644 index 960e6d2bcc..0000000000 --- a/audio/seq24/perfedit.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- seq24/trunk/src/perfedit.cpp.old 2016-01-03 23:30:55.562890265 +0700 -+++ seq24/trunk/src/perfedit.cpp 2016-01-03 23:32:24.958812214 +0700 -@@ -119,7 +119,7 @@ - /* snap */ - m_button_snap = manage( new Button()); - m_button_snap->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( snap_xpm )))); -- m_button_snap->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_snap )); -+ m_button_snap->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_snap )); - add_tooltip( m_button_snap, "Grid snap. (Fraction of Measure Length)" ); - m_entry_snap = manage( new Entry()); - m_entry_snap->set_size_request( 40, -1 ); -@@ -152,7 +152,7 @@ - /* beats per measure */ - m_button_bpm = manage( new Button()); - m_button_bpm->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( down_xpm )))); -- m_button_bpm->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_bpm )); -+ m_button_bpm->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_bpm )); - add_tooltip( m_button_bpm, "Time Signature. Beats per Measure" ); - m_entry_bpm = manage( new Entry()); - m_entry_bpm->set_width_chars(2); -@@ -162,7 +162,7 @@ - /* beat width */ - m_button_bw = manage( new Button()); - m_button_bw->add( *manage( new Image(Gdk::Pixbuf::create_from_xpm_data( down_xpm )))); -- m_button_bw->signal_clicked().connect( bind<Menu *>( mem_fun( *this, &perfedit::popup_menu), m_menu_bw )); -+ m_button_bw->signal_clicked().connect( bind<void>( mem_fun( *this, &perfedit::popup_menu), m_menu_bw )); - add_tooltip( m_button_bw, "Time Signature. Length of Beat" ); - m_entry_bw = manage( new Entry()); - m_entry_bw->set_width_chars(2); diff --git a/audio/seq24/seq24.SlackBuild b/audio/seq24/seq24.SlackBuild index 39df07766b..4b8cf91b27 100644 --- a/audio/seq24/seq24.SlackBuild +++ b/audio/seq24/seq24.SlackBuild @@ -23,13 +23,13 @@ # YOUR DATA IS DESTROYED. PRGNAM=seq24 -VERSION=${VERSION:-rev136} +VERSION=${VERSION:-0.9.3} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,9 +59,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM/trunk -tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM/trunk +rm -rf $PRGNAM-$VERSION +tar -xvf $CWD/$PRGNAM-$VERSION.tar.?z* +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,12 +69,17 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -autoreconf -i - -patch -p2 < $CWD/perfedit.patch +# Thanks to fedora for this: +# class "mutex" in src/* clashes with "std::mutex" due +# to "using namespace std;". Rename mutex to seq24_mutex. +sed -i \ + -e 's,mutex::,seq24_mutex::,' \ + -e 's,\([ cs]\) mutex,\1 seq24_mutex,' \ + -e 's,::mutex,::seq24_mutex,' \ + src/*.h src/*.cpp CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS -O2 -std=c++11" \ +CXXFLAGS="$SLKCFLAGS -std=c++11" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ diff --git a/audio/seq24/seq24.info b/audio/seq24/seq24.info index 7681d18b95..3ebc841eb3 100644 --- a/audio/seq24/seq24.info +++ b/audio/seq24/seq24.info @@ -1,8 +1,8 @@ PRGNAM="seq24" -VERSION="rev136" +VERSION="0.9.3" HOMEPAGE="http://filter24.org/seq24/" -DOWNLOAD="http://master.dl.sourceforge.net/project/slackbuildsdirectlinks/seq24/seq24-rev136.tar.gz" -MD5SUM="e3616365eefa04349773198fec794241" +DOWNLOAD="https://launchpad.net/seq24/trunk/0.9.3/+download/seq24-0.9.3.tar.bz2" +MD5SUM="e7c653abb71f17e5cc070ef1d8406a1a" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/audio/shell-fm/README b/audio/shell-fm/README deleted file mode 100644 index fdf6eca651..0000000000 --- a/audio/shell-fm/README +++ /dev/null @@ -1,12 +0,0 @@ -shell-fm is a lightweight, console-based player for Last.FM radio streams. -It's pretty small (the binary is currently a little smaller than 60K, or -50K when stripped) and it has most features the "official" player has, if -not even a few more. Additional features are, for example: - -network interface (control shell-fm remotely) -autoban (automatically ban all tracks of an artist you don't like) -bookmark stations (quickly jump to bookmarked stations with a single key) -... probably more - -*NOTE: Last-FM have changed their API so that only PAID subscribers -can listen to streams in shell-fm. diff --git a/audio/shell-fm/shell-fm.SlackBuild b/audio/shell-fm/shell-fm.SlackBuild deleted file mode 100644 index 94028cc20f..0000000000 --- a/audio/shell-fm/shell-fm.SlackBuild +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh - -# Slackware build script for shell-fm - -# Copyright 2009-2013 David Woodfall <dave@dawoodfall.net> -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=shell-fm -VERSION=${VERSION:-0.8} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -CFLAGS="$SLKCFLAGS" \ -make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a INSTALL AUTHORS RELEASE \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/shell-fm/shell-fm.info b/audio/shell-fm/shell-fm.info deleted file mode 100644 index 28956094c1..0000000000 --- a/audio/shell-fm/shell-fm.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="shell-fm" -VERSION="0.8" -HOMEPAGE="https://github.com/jkramer/shell-fm" -DOWNLOAD="https://github.com/jkramer/shell-fm/archive/v0.8/shell-fm-0.8.tar.gz" -MD5SUM="6d6aca71fb8a33562ecf614a10a45255" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="David Woodfall" -EMAIL="dave@dawoodfall.net" diff --git a/audio/shell-fm/slack-desc b/audio/shell-fm/slack-desc deleted file mode 100644 index 3bf0b1a989..0000000000 --- a/audio/shell-fm/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -shell-fm: shell-fm (a command line last.fm player) -shell-fm: -shell-fm: shell-fm is a lightweight, console-based player for Last.FM radio -shell-fm: streams. It's pretty small (the binary is currently a little smaller -shell-fm: than 60K, or 50K when stripped) and it has most features the -shell-fm: "official" player has, if not even a few more. -shell-fm: -shell-fm: Homepage: https://github.com/jkramer/shell-fm -shell-fm: -shell-fm: -shell-fm: diff --git a/audio/sidplayfp/sidplayfp.SlackBuild b/audio/sidplayfp/sidplayfp.SlackBuild index ae706d48f7..dd201aac7e 100644 --- a/audio/sidplayfp/sidplayfp.SlackBuild +++ b/audio/sidplayfp/sidplayfp.SlackBuild @@ -25,13 +25,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=sidplayfp -VERSION=${VERSION:-1.3.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-1.4.3} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -42,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" diff --git a/audio/sidplayfp/sidplayfp.info b/audio/sidplayfp/sidplayfp.info index 8c8d1ac6dd..1c16a8fcd7 100644 --- a/audio/sidplayfp/sidplayfp.info +++ b/audio/sidplayfp/sidplayfp.info @@ -1,8 +1,8 @@ PRGNAM="sidplayfp" -VERSION="1.3.0" +VERSION="1.4.3" HOMEPAGE="https://sourceforge.net/projects/sidplay-residfp/" -DOWNLOAD="https://sourceforge.net/projects/sidplay-residfp/files/sidplayfp/1.3/sidplayfp-1.3.0.tar.gz" -MD5SUM="65ae736d372860223bee9bceb00a3b91" +DOWNLOAD="https://downloads.sourceforge.net/sidplay-residfp/sidplayfp-1.4.3.tar.gz" +MD5SUM="be020b5927c80c4269273895400a8120" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libsidplayfp" diff --git a/audio/speex/README b/audio/speex/README deleted file mode 100644 index 339c23c818..0000000000 --- a/audio/speex/README +++ /dev/null @@ -1,7 +0,0 @@ -Speex is an Open Source/Free Software patent-free audio compression -format designed for speech. The Speex Project aims to lower the barrier -of entry for voice applications by providing a free alternative to -expensive proprietary speech codecs. Moreover, Speex is well-adapted -to Internet applications and provides useful features that are not -present in most other codecs. Finally, Speex is part of the GNU -Project and is available under the revised BSD license. diff --git a/audio/speex/slack-desc b/audio/speex/slack-desc deleted file mode 100644 index a675982e71..0000000000 --- a/audio/speex/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -speex: speex (an audio compression format designed for speech) -speex: -speex: Speex is an Open Source/Free Software patent-free audio compression -speex: format designed for speech. The Speex Project aims to lower the -speex: barrier of entry for voice applications by providing a free -speex: alternative to expensive proprietary speech codecs. Moreover, Speex -speex: is well-adapted to Internet applications and provides useful features -speex: that are not present in most other codecs. Finally, Speex is part of -speex: the GNU Project and is available under the revised BSD license. -speex: -speex: homepage: https://speex.org/ diff --git a/audio/speex/speex.SlackBuild b/audio/speex/speex.SlackBuild deleted file mode 100644 index dba755fb36..0000000000 --- a/audio/speex/speex.SlackBuild +++ /dev/null @@ -1,116 +0,0 @@ -#!/bin/sh - -# Slackware build script for speex - -# Copyright (c) 2007 Alex Lysenka <me@alkos333.net> -# Copyright (c) 2012 Vliegendehuiskat -# Copyright (c) 2014-2016 Matteo Bernardini <ponce@slackbuilds.org> -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Modified by SlackBuilds.org - -PRGNAM=speex -VERSION=${VERSION:-1.2.0} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -# Fix end-of-line encoding. -sed -i 's/\r//' README.TI-DSP - -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -SPEEXDSP_CFLAGS="-I$PKG/usr/include" \ -SPEEXDSP_LIBS="-L$PKG/usr/lib${LIBDIRSUFFIX} -lspeexdsp" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --enable-static=no \ - --enable-binaries \ - --build=$ARCH-slackware-linux - -# Hack to also make it look in the right directory on multilib systems -make LDFLAGS="-L/usr/lib${LIBDIRSUFFIX} -L$PKG/usr/lib${LIBDIRSUFFIX} -lspeexdsp" -make install DESTDIR=$PKG - -find $PKG/usr/man -type f -exec gzip -9 '{}' \; - -# Fix libspeex.la (if present) -sed -i "s|-L$PKG.*/lib${LIBDIRSUFFIX} ||" $PKG/usr/lib${LIBDIRSUFFIX}/libspeex.la || true - -cp -a \ - AUTHORS COPYING ChangeLog INSTALL NEWS README* TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -find $PKG/usr/doc -type f -exec chown root:root {} \; -exec chmod 644 {} \; - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/audio/speex/speex.info b/audio/speex/speex.info deleted file mode 100644 index 0fb235e318..0000000000 --- a/audio/speex/speex.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="speex" -VERSION="1.2.0" -HOMEPAGE="https://speex.org" -DOWNLOAD="https://ftp.osuosl.org/pub/xiph/releases/speex/speex-1.2.0.tar.gz" -MD5SUM="8ab7bb2589110dfaf0ed7fa7757dc49c" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Matteo Bernardini" -EMAIL="ponce@slackbuilds.org" diff --git a/audio/xmms2/xmms2.SlackBuild b/audio/xmms2/xmms2.SlackBuild index fcd1ede0a8..21a5a5e300 100644 --- a/audio/xmms2/xmms2.SlackBuild +++ b/audio/xmms2/xmms2.SlackBuild @@ -7,7 +7,7 @@ # Updated by Andrew Brouwers, abrouwers at gmail d0t com (13.0, 64-bit) PRGNAM=xmms2 -VERSION=${VERSION:-"20150712_942b17f"} +VERSION=${VERSION:-"20170827_dedc33d"} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} diff --git a/audio/xmms2/xmms2.info b/audio/xmms2/xmms2.info index 61f3ec488c..e4ba4787bd 100644 --- a/audio/xmms2/xmms2.info +++ b/audio/xmms2/xmms2.info @@ -1,8 +1,8 @@ PRGNAM="xmms2" -VERSION="20150712_942b17f" +VERSION="20170827_dedc33d" HOMEPAGE="http://wiki.xmms2.xmms.se/" -DOWNLOAD="http://ponce.cc/slackware/sources/repo/xmms2-20150712_942b17f.tar.xz" -MD5SUM="8a5c43ef18fdaf24f6853ced83ce1620" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/xmms2-20170827_dedc33d.tar.xz" +MD5SUM="082e47f3ca4f40b5c0029e8a3f0a7d55" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/desktop/cairo-dock-plugins/README b/desktop/cairo-dock-plugins/README index d758f4c722..496a240ad9 100644 --- a/desktop/cairo-dock-plugins/README +++ b/desktop/cairo-dock-plugins/README @@ -3,4 +3,4 @@ plug-ins for Cairo-Dock It provides some new functionnalities like controling music players or note-taking, a clock or a desktop switcher but also some views, dialogs and desklets skins, etc. -vala, python3 and mono are optional dependencies. +libetpan, vala, python3 and mono are optional dependencies. diff --git a/desktop/cairo-dock-plugins/cairo-dock-plugins.SlackBuild b/desktop/cairo-dock-plugins/cairo-dock-plugins.SlackBuild index 1ef6650ec5..ff20324bc6 100644 --- a/desktop/cairo-dock-plugins/cairo-dock-plugins.SlackBuild +++ b/desktop/cairo-dock-plugins/cairo-dock-plugins.SlackBuild @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=cairo-dock-plugins -VERSION=${VERSION:-3.3.2} +VERSION=${VERSION:-3.4.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,9 +59,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION +rm -rf cairo-dock-plug-ins-$VERSION tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +cd cairo-dock-plug-ins-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,25 +69,33 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Thanks to fedora and archlinux +patch -p1 < $CWD/patches/mono.patch +patch -p1 < $CWD/patches/time_h-confict.patch +sed -i.wall -e 's|-Wno-all||' Dbus/interfaces/vala/src/CMakeLists.txt + +mkdir build +cd build cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release . + -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install DESTDIR=$PKG +cd .. # Sheesh. Donchaloveruby? -mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ruby/1.9.1 +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ruby/2.4.0 if [ -d $PKG/usr/usr ]; then - mv $PKG/usr/usr/lib${LIBDIRSUFFIX}/ruby/1.9.1/CDApplet.rb \ - $PKG/usr/lib${LIBDIRSUFFIX}/ruby/1.9.1 + mv $PKG/usr/usr/lib${LIBDIRSUFFIX}/ruby/2.4.0/CDApplet.rb \ + $PKG/usr/lib${LIBDIRSUFFIX}/ruby/2.4.0 rm -rf $PKG/usr/usr elif [ -e $PKG/usr/CDApplet.rb ]; then - mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ruby/1.9.1 - mv $PKG/usr/CDApplet.rb $PKG/usr/lib${LIBDIRSUFFIX}/ruby/1.9.1 + mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/ruby/2.4.0 + mv $PKG/usr/CDApplet.rb $PKG/usr/lib${LIBDIRSUFFIX}/ruby/2.4.0 fi find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ diff --git a/desktop/cairo-dock-plugins/cairo-dock-plugins.info b/desktop/cairo-dock-plugins/cairo-dock-plugins.info index b28117ab5d..3fb0f52e51 100644 --- a/desktop/cairo-dock-plugins/cairo-dock-plugins.info +++ b/desktop/cairo-dock-plugins/cairo-dock-plugins.info @@ -1,8 +1,8 @@ PRGNAM="cairo-dock-plugins" -VERSION="3.3.2" +VERSION="3.4.1" HOMEPAGE="http://www.glx-dock.org" -DOWNLOAD="https://launchpad.net/cairo-dock-plug-ins/3.3/3.3.2/+download/cairo-dock-plugins-3.3.2.tar.gz" -MD5SUM="3c40afe91cba65da68a70e5e78b76c24" +DOWNLOAD="https://github.com/Cairo-Dock/cairo-dock-plug-ins/archive/3.4.1/cairo-dock-plugins-3.4.1.tar.gz" +MD5SUM="434941926f9205fd8562a15b6ac5f243" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="cairo-dock" diff --git a/desktop/cairo-dock-plugins/patches/mono.patch b/desktop/cairo-dock-plugins/patches/mono.patch new file mode 100644 index 0000000000..6e6ecfecb6 --- /dev/null +++ b/desktop/cairo-dock-plugins/patches/mono.patch @@ -0,0 +1,106 @@ +diff -rupN cairo-dock-plug-ins-3.4.1.orig/CMakeLists.txt cairo-dock-plug-ins-3.4.1/CMakeLists.txt +--- cairo-dock-plug-ins-3.4.1.orig/CMakeLists.txt 2015-03-12 09:43:57.171067365 +0100 ++++ cairo-dock-plug-ins-3.4.1/CMakeLists.txt 2015-03-12 09:46:20.717120675 +0100 +@@ -573,11 +573,11 @@ if (enable-mono-interface) + if (NOT GMCS_EXECUTABLE OR NOT EXISTS ${GMCS_EXECUTABLE}) + message (STATUS "Could not find Mono compiler gmcs, won't build Mono interface.") + else() +- pkg_check_modules (MONO_PACKAGE glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0) ++ pkg_check_modules (MONO_PACKAGE dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-3.0) + if (NOT MONO_PACKAGE_FOUND) +- message (STATUS "Could not find glib-sharp-2.0, ndesk-dbus-1.0 or ndesk-dbus-glib-1.0; won't be built Mono interface.") +- message (WARNING "These modules are required to compile DBus applet with Mono interface: glib-sharp-2.0, ndesk-dbus-1.0 and ndesk-dbus-glib-1.0") +- set (MODULES_MISSING "${MODULES_MISSING} glib-sharp-2.0 ndesk-dbus-1.0 ndesk-dbus-glib-1.0") ++ message (STATUS "Could not find dbus-sharp-2.0, dbus-sharp-glib-2.0 or glib-sharp-3.0; won't be built Mono interface.") ++ message (WARNING "These modules are required to compile DBus applet with Mono interface: dbus-sharp-2.0, dbus-sharp-glib-2.0 and glib-sharp-3.0") ++ set (MODULES_MISSING "${MODULES_MISSING} dbus-sharp-2.0 dbus-sharp-glib-2.0 glib-sharp-3.0") + else() + set (MONO_FOUND TRUE) + set (with_mono yes) +diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CDApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CDApplet.cs +--- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CDApplet.cs 2015-03-12 09:52:56.491934965 +0100 ++++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CDApplet.cs 2015-03-12 09:56:50.191652099 +0100 +@@ -21,7 +21,7 @@ + // Make your own class derive from a CDApplet, and override the functions you need (the ones which don't start with an underscore). + + // Compile it with the following command, then rename 'demo_mono.exe' to 'demo_mono'. +-// gmcs /target:library CDApplet.cs ISubApplet.cs IApplet.cs -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0 ++// gmcs /target:library CDApplet.cs ISubApplet.cs IApplet.cs -pkg:dbus-sharp-2.0 -pkg:dbus-sharp-glib-2.0 -pkg:glib-sharp-3.0 + ////////////////////////// + ////// dependancies ////// + ////////////////////////// +@@ -29,7 +29,7 @@ using System; // Environment + using System.IO; // Path, Directory + using System.Reflection; + using GLib; +-using NDesk.DBus; ++using DBus; + using CairoDock.Applet; + + //namespace CairoDock.Applet +@@ -258,8 +258,8 @@ public class CDApplet + + private void _connect_to_dock () + { +- NDesk.DBus.BusG.Init(); +- NDesk.DBus.Bus bus = NDesk.DBus.Bus.Session; ++ DBus.BusG.Init(); ++ DBus.Bus bus = DBus.Bus.Session; + this.icon = bus.GetObject<IApplet> ("org.cairodock.CairoDock", new ObjectPath (this.cBusPath)); + this.icon.on_click += new OnClickEvent (on_click); + this.icon.on_middle_click += new OnMiddleClickEvent (on_middle_click); +diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CMakeLists.txt cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CMakeLists.txt +--- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/CMakeLists.txt 2015-03-12 09:52:56.491934965 +0100 ++++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/CMakeLists.txt 2015-03-12 09:54:07.418777441 +0100 +@@ -3,7 +3,7 @@ + + execute_process(COMMAND ${GMCS_EXECUTABLE} + -target:library +- -pkg:glib-sharp-2.0 -pkg:ndesk-dbus-1.0 -pkg:ndesk-dbus-glib-1.0 ++ -pkg:dbus-sharp-2.0 -pkg:dbus-sharp-glib-2.0 -pkg:glib-sharp-3.0 + -out:${CMAKE_CURRENT_BINARY_DIR}/CDApplet.dll + ${CMAKE_CURRENT_SOURCE_DIR}/CDApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/ISubApplet.cs ${CMAKE_CURRENT_SOURCE_DIR}/IApplet.cs) + ### find how to register to GAC ... +diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/demos/demo_mono/demo_mono.cs cairo-dock-plug-ins-3.4.1/Dbus/demos/demo_mono/demo_mono.cs +--- cairo-dock-plug-ins-3.4.1.orig/Dbus/demos/demo_mono/demo_mono.cs 2015-03-12 09:59:41.064312097 +0100 ++++ cairo-dock-plug-ins-3.4.1/Dbus/demos/demo_mono/demo_mono.cs 2015-03-12 10:02:39.473424651 +0100 +@@ -138,7 +138,7 @@ public class Applet : CDApplet + public override void on_build_menu () + { + Console.WriteLine("*** build menu"); +- /// Warning : teh AddMenuItems fails with NDesk-DBus 0.6.0; until this is fixed, use the PopulateMenu method. ++ /// Warning : the AddMenuItems fails with DBus Sharp 0.6.0; until this is fixed, use the PopulateMenu method. + /**Dictionary<string, object>[] pItems = new Dictionary<string, object>[] { + new Dictionary<string, object>() + { +diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/IApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/IApplet.cs +--- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/IApplet.cs 2015-03-12 09:59:41.067645289 +0100 ++++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/IApplet.cs 2015-03-12 10:00:35.395334804 +0100 +@@ -1,6 +1,6 @@ + using System; + using System.Collections.Generic; // Dictionnary +-using NDesk.DBus; ++using DBus; + + namespace CairoDock.Applet + { +@@ -27,7 +27,7 @@ namespace CairoDock.Applet + Left + } + +- [NDesk.DBus.Interface("org.cairodock.CairoDock.applet")] ++ [DBus.Interface("org.cairodock.CairoDock.applet")] + public interface IApplet + { + object Get(string cProperty); +diff -rupN cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/ISubApplet.cs cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/ISubApplet.cs +--- cairo-dock-plug-ins-3.4.1.orig/Dbus/interfaces/mono/ISubApplet.cs 2015-03-12 09:59:41.067645289 +0100 ++++ cairo-dock-plug-ins-3.4.1/Dbus/interfaces/mono/ISubApplet.cs 2015-03-12 10:00:16.522802989 +0100 +@@ -1,6 +1,6 @@ + using System; + using System.Collections.Generic; // Dictionnary +-using NDesk.DBus; ++using DBus; + + namespace CairoDock.Applet + { diff --git a/desktop/cairo-dock-plugins/patches/time_h-confict.patch b/desktop/cairo-dock-plugins/patches/time_h-confict.patch new file mode 100644 index 0000000000..0a2ea720d1 --- /dev/null +++ b/desktop/cairo-dock-plugins/patches/time_h-confict.patch @@ -0,0 +1,137 @@ +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-config.c.glibc 2016-12-11 16:10:41.656840262 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-config.c 2016-12-11 16:23:31.875117800 +0900 +@@ -17,6 +17,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#include "applet-time_h-struct.h" + #include <string.h> + + #include "applet-struct.h" +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-init.c.glibc 2016-12-11 16:10:41.657840257 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-init.c 2016-12-11 16:22:24.465443591 +0900 +@@ -17,6 +17,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#include "applet-time_h-struct.h" + #include "stdlib.h" + + #include "applet-struct.h" +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-notifications.c.glibc 2015-02-20 01:13:47.000000000 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-notifications.c 2016-12-11 16:24:08.991938415 +0900 +@@ -17,6 +17,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#include "applet-time_h-struct.h" + #include <stdlib.h> + #include <string.h> + +@@ -66,4 +67,4 @@ + + + return GLDI_NOTIFICATION_LET_PASS; +-} +\ ファイル末尾に改行がありません ++} +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-sound.c.glibc 2015-02-20 01:13:47.000000000 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-sound.c 2016-12-11 16:23:55.137005376 +0900 +@@ -19,6 +19,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#include "applet-time_h-struct.h" + #include <stdlib.h> + #ifndef __FreeBSD__ + #include <endian.h> +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-struct.h.glibc 2016-12-11 16:10:41.657840257 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-struct.h 2016-12-11 16:22:59.589273837 +0900 +@@ -21,6 +21,7 @@ + #ifndef __CD_APPLET_STRUCT__ + #define __CD_APPLET_STRUCT__ + ++#include "applet-time_h-struct.h" + #include <sys/types.h> + #include <alsa/asoundlib.h> + #define _STRUCT_TIMEVAL +--- cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-time_h-struct.h.glibc 2016-12-11 16:11:55.464483550 +0900 ++++ cairo-dock-plugins-3.4.1/Sound-Effects/src/applet-time_h-struct.h 2016-12-11 16:19:52.003180440 +0900 +@@ -0,0 +1,27 @@ ++/** ++* This file is a part of the Cairo-Dock project ++* ++* Copyright : (C) see the 'copyright' file. ++* E-mail : see the 'copyright' file. ++* ++* 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 3 ++* of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#ifndef __CD_APPLET_TIME_H_STRUCT__ ++#define __CD_APPLET_TIME_H_STRUCT__ ++ ++#define _POSIX_C_SOURCE 200809L ++#include <time.h> ++ ++#endif ++ +--- cairo-dock-plugins-3.4.1/alsaMixer/src/applet-generic.c.glibc 2015-02-20 01:13:47.000000000 +0900 ++++ cairo-dock-plugins-3.4.1/alsaMixer/src/applet-generic.c 2016-12-11 16:20:44.168928323 +0900 +@@ -20,6 +20,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + ++#include "applet-time_h-struct.h" + #include <stdlib.h> + + #include "applet-struct.h" +--- cairo-dock-plugins-3.4.1/alsaMixer/src/applet-struct.h.glibc 2015-02-20 01:13:47.000000000 +0900 ++++ cairo-dock-plugins-3.4.1/alsaMixer/src/applet-struct.h 2016-12-11 16:19:47.713201174 +0900 +@@ -20,6 +20,7 @@ + #ifndef __CD_APPLET_STRUCT__ + #define __CD_APPLET_STRUCT__ + ++#include "applet-time_h-struct.h" + #include <sys/types.h> + #include <alsa/asoundlib.h> + #define _STRUCT_TIMEVAL +--- cairo-dock-plugins-3.4.1/alsaMixer/src/applet-time_h-struct.h.glibc 2016-12-11 16:11:55.464483550 +0900 ++++ cairo-dock-plugins-3.4.1/alsaMixer/src/applet-time_h-struct.h 2016-12-11 16:19:52.003180440 +0900 +@@ -0,0 +1,27 @@ ++/** ++* This file is a part of the Cairo-Dock project ++* ++* Copyright : (C) see the 'copyright' file. ++* E-mail : see the 'copyright' file. ++* ++* 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 3 ++* of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>. ++*/ ++ ++#ifndef __CD_APPLET_TIME_H_STRUCT__ ++#define __CD_APPLET_TIME_H_STRUCT__ ++ ++#define _POSIX_C_SOURCE 200809L ++#include <time.h> ++ ++#endif ++ diff --git a/desktop/cairo-dock/cairo-dock.SlackBuild b/desktop/cairo-dock/cairo-dock.SlackBuild index f12d52fb2d..9935833256 100644 --- a/desktop/cairo-dock/cairo-dock.SlackBuild +++ b/desktop/cairo-dock/cairo-dock.SlackBuild @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=cairo-dock -VERSION=${VERSION:-3.3.2} +VERSION=${VERSION:-3.4.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -59,9 +59,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION +rm -rf $PRGNAM-core-$VERSION tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +cd $PRGNAM-core-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -69,16 +69,19 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +mkdir build +cd build cmake \ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DCMAKE_INSTALL_PREFIX=/usr \ -DMAN_INSTALL_DIR=/usr/man \ - -DCMAKE_BUILD_TYPE=Release . + -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install DESTDIR=$PKG +cd .. find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/desktop/cairo-dock/cairo-dock.info b/desktop/cairo-dock/cairo-dock.info index d439b98f7a..1c6f1ba104 100644 --- a/desktop/cairo-dock/cairo-dock.info +++ b/desktop/cairo-dock/cairo-dock.info @@ -1,8 +1,8 @@ PRGNAM="cairo-dock" -VERSION="3.3.2" +VERSION="3.4.1" HOMEPAGE="http://www.glx-dock.org" -DOWNLOAD="https://launchpad.net/cairo-dock-core/3.3/3.3.2/+download/cairo-dock-3.3.2.tar.gz" -MD5SUM="aae077803322049e2488ca7c2980cd0d" +DOWNLOAD="https://github.com/Cairo-Dock/cairo-dock-core/archive/3.4.1/cairo-dock-3.4.1.tar.gz" +MD5SUM="63285f2744a76354cea9cc4c012b3c11" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="gtkglext" diff --git a/desktop/ceti-2-theme/README b/desktop/ceti-2-theme/README deleted file mode 100644 index 81caf7d90f..0000000000 --- a/desktop/ceti-2-theme/README +++ /dev/null @@ -1,10 +0,0 @@ -ceti-2-theme (GTK2|GTK3 themes) - -ceti-2 is a theme for GTK 3, GTK 2 and Gnome-Shell. It supports GTK 3 -and GTK 2 based desktop environments like Gnome, Unity, Budgie, -Pantheon, etc. - -It is the Official continuation of ceti for Gnome 3.14, 3.16 and 3.18. -It has been completely revamped and is now based on Vertex. - -Optional dependencies: gtk-engines, gtk-engines-unico. diff --git a/desktop/ceti-2-theme/ceti-2-theme.SlackBuild b/desktop/ceti-2-theme/ceti-2-theme.SlackBuild deleted file mode 100644 index f5ed3c662c..0000000000 --- a/desktop/ceti-2-theme/ceti-2-theme.SlackBuild +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# -# Slackware build script for ceti-2-theme. -# -# Copyright 2016 Edinaldo P. Silva, Rio de Janeiro, Brazil. -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM="ceti-2-theme" -VERSION=${VERSION:-20150923} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -ARCH=noarch - -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} -CWD=$(pwd) - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -./autogen.sh \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --enable-silent-rules \ - --disable-gnome-shell \ - --disable-unity \ - --build=$ARCH-slackware-linux - -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING README.md $PKG/usr/doc/$PRGNAM-$VERSION/ -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc -cat $CWD/doinst.sh > $PKG/install/doinst.sh - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/desktop/ceti-2-theme/ceti-2-theme.info b/desktop/ceti-2-theme/ceti-2-theme.info deleted file mode 100644 index 28f1dffa11..0000000000 --- a/desktop/ceti-2-theme/ceti-2-theme.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="ceti-2-theme" -VERSION="20150923" -HOMEPAGE="https://github.com/horst3180/Ceti-2-theme" -DOWNLOAD="https://github.com/horst3180/ceti-2-theme/archive/20150923/ceti-2-theme-20150923.tar.gz" -MD5SUM="5da8e4e6c2260113b12fafc0a682b389" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="murrine" -MAINTAINER="Edinaldo P. Silva" -EMAIL="edps.mundognu@gmail.com" diff --git a/desktop/ceti-2-theme/doinst.sh b/desktop/ceti-2-theme/doinst.sh deleted file mode 100644 index aea0f894eb..0000000000 --- a/desktop/ceti-2-theme/doinst.sh +++ /dev/null @@ -1,13 +0,0 @@ -if [ -x /usr/bin/update-desktop-database ]; then - /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 -fi - -if [ -x /usr/bin/update-mime-database ]; then - /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 -fi - -if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then - if [ -x /usr/bin/gtk-update-icon-cache ]; then - /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 - fi -fi diff --git a/desktop/ceti-2-theme/slack-desc b/desktop/ceti-2-theme/slack-desc deleted file mode 100644 index efcdc3ee26..0000000000 --- a/desktop/ceti-2-theme/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -ceti-2-theme: ceti-2-theme (GTK2|GTK3 themes) -ceti-2-theme: -ceti-2-theme: ceti-2 is a theme for GTK 3, GTK 2 and Gnome-Shell. It supports GTK 3 -ceti-2-theme: and GTK 2 based desktop environments like Gnome, Unity, Budgie, -ceti-2-theme: Pantheon, etc. -ceti-2-theme: -ceti-2-theme: It is the Official continuation of Ceti for Gnome 3.14, 3.16 and 3.18. -ceti-2-theme: It has been completely revamped and is now based on Vertex. -ceti-2-theme: -ceti-2-theme: Home page: https://github.com/horst3180/Ceti-2-theme -ceti-2-theme: diff --git a/desktop/devilspie/devilspie.SlackBuild b/desktop/devilspie/devilspie.SlackBuild index 471bd18014..5334d2b91d 100644 --- a/desktop/devilspie/devilspie.SlackBuild +++ b/desktop/devilspie/devilspie.SlackBuild @@ -55,7 +55,7 @@ sed -i -e '/-DG.*_DISABLE_DEPRECATED/d' src/Makefile.am autoreconf -i LDFLAGS="-lX11" \ -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -Wno-error=format-y2k" \ CPPFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ diff --git a/desktop/lumina/lumina.SlackBuild b/desktop/lumina/lumina.SlackBuild index 6814c758bb..fddcea452b 100644 --- a/desktop/lumina/lumina.SlackBuild +++ b/desktop/lumina/lumina.SlackBuild @@ -80,6 +80,7 @@ qmake-qt5 \ LIBPREFIX=/usr/lib${LIBDIRSUFFIX} \ QMAKE_CFLAGS="$SLKCFLAGS" \ QMAKE_CXXFLAGS="$SLKCFLAGS" \ + QMAKE_CFLAGS_ISYSTEM= \ QT5LIBDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \ L_ETCDIR=/etc \ diff --git a/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch b/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch new file mode 100644 index 0000000000..81783617b9 --- /dev/null +++ b/desktop/polybar/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch @@ -0,0 +1,44 @@ +From 00165e1a6d5dd61bc153e1352b21ec07fc81245d Mon Sep 17 00:00:00 2001 +From: patrick96 <p.ziegler96@gmail.com> +Date: Sun, 11 Feb 2018 21:27:52 +0100 +Subject: [PATCH] fix(generators): Add support for eventstruct + +Newer xcb-proto commits after the 1.12 release require the 'eventstruct' +key in the output dictionary, otherwise the generator crashes. + +I don't see a need for xpp to actually support the eventstruct key and +thus it uses a NOP lambda function +--- + generators/cpp_client.py | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/generators/cpp_client.py b/generators/cpp_client.py +index 20d116f..709e8d8 100644 +--- a/generators/cpp_client.py ++++ b/generators/cpp_client.py +@@ -3130,15 +3130,16 @@ def cpp_type_classes(): + # } + + # Must create an "output" dictionary before any xcbgen imports. +-output = {'open' : c_open, +- 'close' : c_close, +- 'simple' : c_simple, # lambda x, y: None, +- 'enum' : lambda x, y: None, +- 'struct' : lambda x, y: None, +- 'union' : lambda x, y: None, +- 'request' : c_request, +- 'event' : cpp_event, +- 'error' : cpp_error, ++output = {'open' : c_open, ++ 'close' : c_close, ++ 'simple' : c_simple, # lambda x, y: None, ++ 'enum' : lambda x, y: None, ++ 'struct' : lambda x, y: None, ++ 'union' : lambda x, y: None, ++ 'request' : c_request, ++ 'event' : cpp_event, ++ 'error' : cpp_error, ++ 'eventstruct' : lambda x, y: None, + } + + # Boilerplate below this point diff --git a/desktop/polybar/polybar.SlackBuild b/desktop/polybar/polybar.SlackBuild index c2e6b4cb72..155f9059f9 100644 --- a/desktop/polybar/polybar.SlackBuild +++ b/desktop/polybar/polybar.SlackBuild @@ -75,6 +75,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +( cd lib/xpp + patch -p1 < $CWD/00165e1a6d5dd61bc153e1352b21ec07fc81245d.patch ) + # Fixes install location sed -i -e '/share\/doc\/polybar/s/share\///' doc/CMakeLists.txt sed -i -e '/share\/man\/man1/s/share\///' man/CMakeLists.txt @@ -83,7 +86,7 @@ mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -Wno-error=implicit-fallthrough" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release .. make -j1 diff --git a/desktop/seafile-gui/README b/desktop/seafile-client/README index 94ced6564e..94ced6564e 100644 --- a/desktop/seafile-gui/README +++ b/desktop/seafile-client/README diff --git a/desktop/seafile-gui/doinst.sh b/desktop/seafile-client/doinst.sh index 65c7e2eeb9..65c7e2eeb9 100644 --- a/desktop/seafile-gui/doinst.sh +++ b/desktop/seafile-client/doinst.sh diff --git a/desktop/seafile-gui/seafile-gui.SlackBuild b/desktop/seafile-client/seafile-client.SlackBuild index 9b7e62a867..a50bcb3248 100644 --- a/desktop/seafile-gui/seafile-gui.SlackBuild +++ b/desktop/seafile-client/seafile-client.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Slackware build script for "seafile-client". +# Slackware build script for seafile-client. # Copyright 2015 Marcel Saegebarth <marc@mos6581.de> # All rights reserved. @@ -24,15 +24,14 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -PRGNAM=seafile-gui -SRCNAM=seafile-client -VERSION=${VERSION:-4.4.2} +PRGNAM=seafile-client +VERSION=${VERSION:-6.2.5} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -43,8 +42,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -62,9 +61,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $SRCNAM-$VERSION -tar xvf $CWD/v$VERSION.tar.gz || tar xvf $CWD/$SRCNAM-$VERSION.tar.gz -cd $SRCNAM-$VERSION +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ diff --git a/desktop/seafile-client/seafile-client.info b/desktop/seafile-client/seafile-client.info new file mode 100644 index 0000000000..92933b6c01 --- /dev/null +++ b/desktop/seafile-client/seafile-client.info @@ -0,0 +1,10 @@ +PRGNAM="seafile-client" +VERSION="6.2.5" +HOMEPAGE="http://seafile.com/" +DOWNLOAD="https://github.com/haiwen/seafile-client/archive/v6.2.5/seafile-client-6.2.5.tar.gz" +MD5SUM="3f3cd465109e1d49888fbca310033a3b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="qt5 seafile" +MAINTAINER="Marcel Saegebarth" +EMAIL="marc@mos6581.de" diff --git a/network/seafile-client/slack-desc b/desktop/seafile-client/slack-desc index e41d278faa..2f39a14e33 100644 --- a/network/seafile-client/slack-desc +++ b/desktop/seafile-client/slack-desc @@ -6,14 +6,14 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -seafile-client: seafile-client (Cloud Storage System) +seafile-client: seafile-client (Seafile Desktop Client) seafile-client: -seafile-client: Seafile is a next-generation open source cloud storage system with -seafile-client: advanced support for file syncing, privacy protection and teamwork. +seafile-client: Graphical desktop client for the Seafile next-generation open +seafile-client: source cloud storage system with advanced support for file syncing, +seafile-client: privacy protection and teamwork. seafile-client: seafile-client: Homepage: http://seafile.com/ seafile-client: seafile-client: seafile-client: seafile-client: -seafile-client: diff --git a/desktop/seafile-gui/seafile-gui.info b/desktop/seafile-gui/seafile-gui.info deleted file mode 100644 index a878209924..0000000000 --- a/desktop/seafile-gui/seafile-gui.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="seafile-gui" -VERSION="4.4.2" -HOMEPAGE="http://seafile.com/" -DOWNLOAD="https://github.com/haiwen/seafile-client/archive/v4.4.2.tar.gz" -MD5SUM="8749f059e9209df31e662c9325c735e5" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="seafile-client" -MAINTAINER="Marcel Saegebarth" -EMAIL="marc@mos6581.de" diff --git a/desktop/searchmonkey/patch.txt b/desktop/searchmonkey/patch.txt new file mode 100644 index 0000000000..08d9959efd --- /dev/null +++ b/desktop/searchmonkey/patch.txt @@ -0,0 +1,11 @@ +--- ./mainwindow.cpp 2010-05-16 11:42:14.000000000 -0400 ++++ ./mainwindow.cpp.new 2016-09-06 21:07:18.462298114 -0400 +@@ -781,7 +781,7 @@ + ******************************************************************************/ + void MainWindow::find () throw() { + +- auto autoSettingsReset asr(sui); // dtor calls sui->reset() ++ + + bool modeAdvanced = ui->actionAdvanced->isChecked(); + qDebug() << "modeAdvanced-" << modeAdvanced; diff --git a/desktop/searchmonkey/searchmonkey.SlackBuild b/desktop/searchmonkey/searchmonkey.SlackBuild index b1c2ef0824..f807c46128 100644 --- a/desktop/searchmonkey/searchmonkey.SlackBuild +++ b/desktop/searchmonkey/searchmonkey.SlackBuild @@ -69,6 +69,7 @@ find -L . \ -exec chmod 644 {} \; patch -p1 --verbose <$CWD/searchmonkey-2.0.0-gcc4.7.patch +patch -p1 --verbose <$CWD/patch.txt qmake \ QMAKE_CFLAGS="$SLKCFLAGS" \ diff --git a/desktop/thunar-archive-plugin/thunar-archive-plugin.SlackBuild b/desktop/thunar-archive-plugin/thunar-archive-plugin.SlackBuild index fd27c5b191..4b3135bcda 100644 --- a/desktop/thunar-archive-plugin/thunar-archive-plugin.SlackBuild +++ b/desktop/thunar-archive-plugin/thunar-archive-plugin.SlackBuild @@ -23,13 +23,13 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=thunar-archive-plugin -VERSION=${VERSION:-0.3.1} +VERSION=${VERSION:-0.4.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" diff --git a/desktop/thunar-archive-plugin/thunar-archive-plugin.info b/desktop/thunar-archive-plugin/thunar-archive-plugin.info index 7181974b68..88e6670e73 100644 --- a/desktop/thunar-archive-plugin/thunar-archive-plugin.info +++ b/desktop/thunar-archive-plugin/thunar-archive-plugin.info @@ -1,8 +1,8 @@ PRGNAM="thunar-archive-plugin" -VERSION="0.3.1" +VERSION="0.4.0" HOMEPAGE="https://goodies.xfce.org/projects/thunar-plugins/thunar-archive-plugin" -DOWNLOAD="https://archive.xfce.org/src/thunar-plugins/thunar-archive-plugin/0.3/thunar-archive-plugin-0.3.1.tar.bz2" -MD5SUM="425f4faaace6dc7a4716a35b7795463a" +DOWNLOAD="http://archive.xfce.org/src/thunar-plugins/thunar-archive-plugin/0.4/thunar-archive-plugin-0.4.0.tar.bz2" +MD5SUM="0a7738a3a5f84bf218ece3ffb5241c63" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="xarchiver" diff --git a/desktop/wbar/wbar.SlackBuild b/desktop/wbar/wbar.SlackBuild index 09fd3d2bc5..d16ff8a236 100644 --- a/desktop/wbar/wbar.SlackBuild +++ b/desktop/wbar/wbar.SlackBuild @@ -74,7 +74,7 @@ find -L . \ sed -i 's|pidof|/sbin/pidof|g' src/config/Run.cc CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS -Wno-error=literal-suffix" \ ./configure \ --prefix=/usr \ --exec-prefix=/usr \ diff --git a/development/ChezScheme/ChezScheme.SlackBuild b/development/ChezScheme/ChezScheme.SlackBuild index 9b36c4bce6..16124c9120 100644 --- a/development/ChezScheme/ChezScheme.SlackBuild +++ b/development/ChezScheme/ChezScheme.SlackBuild @@ -86,6 +86,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; ./configure \ + CFLAGS="-Wno-error=implicit-fallthrough=" \ $WSIZE \ $THREADS \ --installprefix=/usr \ diff --git a/development/Coin/Coin.SlackBuild b/development/Coin/Coin.SlackBuild index 96953fa909..eb99408893 100644 --- a/development/Coin/Coin.SlackBuild +++ b/development/Coin/Coin.SlackBuild @@ -61,6 +61,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Thanks Fedora +patch -p1 < $CWD/memhandler-initialization.patch + # Thanks Debian patch -p1 < $CWD/coin-include_and_js.patch diff --git a/development/Coin/memhandler-initialization.patch b/development/Coin/memhandler-initialization.patch new file mode 100644 index 0000000000..4c346487ed --- /dev/null +++ b/development/Coin/memhandler-initialization.patch @@ -0,0 +1,20 @@ +--- Coin-3.1.3/src/misc/SbHash.h.init 2010-03-02 22:20:09.000000000 +0900 ++++ Coin-3.1.3/src/misc/SbHash.h 2016-04-22 16:52:39.888883757 +0900 +@@ -89,6 +89,8 @@ + cc_memalloc_deallocate(entry->memhandler, ptr); + } + SbHashEntry(const Key & key, const Type & obj) : key(key), obj(obj) {} ++ SbHashEntry(const Key & key, const Type & obj, cc_memalloc *memhandler) ++ : key(key), obj(obj), memhandler(memhandler) {} + + Key key; + Type obj; +@@ -218,7 +220,7 @@ + /* Key not already in the hash table; insert a new + * entry as the first element in the bucket + */ +- entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj); ++ entry = new (this->memhandler) SbHashEntry<Type, Key>(key, obj, this->memhandler); + entry->next = this->buckets[i]; + this->buckets[i] = entry; + diff --git a/development/FreeBASIC/FreeBASIC.SlackBuild b/development/FreeBASIC/FreeBASIC.SlackBuild index bba9d245a7..70775745d0 100644 --- a/development/FreeBASIC/FreeBASIC.SlackBuild +++ b/development/FreeBASIC/FreeBASIC.SlackBuild @@ -89,13 +89,10 @@ if [ "$ARCH" = "x86_64" ]; then $PKG/usr/lib/${PRGNAM,,} fi -# fix linking with libtinfo over libncurses +# fix linking libtinfo over the newer version - WARNING, UGLY SHIT! -ponce ln -sf \ - /usr/lib${LIBDIRSUFFIX}/libncurses.so.5 \ + /usr/lib${LIBDIRSUFFIX}/libtinfo.so.6 \ $PKG/usr/lib${LIBDIRSUFFIX}/libtinfo.so.5 -ln -sf \ - /usr/lib${LIBDIRSUFFIX}/libtinfo.so.5 \ - $PKG/usr/lib${LIBDIRSUFFIX}/libtinfo.so # gzip man page gzip -c doc/fbc.1 > $PKG/usr/man/man1/fbc.1.gz diff --git a/development/MySQL-python/MySQL-python.SlackBuild b/development/MySQL-python/MySQL-python.SlackBuild index c367b99dc9..cc212f17be 100644 --- a/development/MySQL-python/MySQL-python.SlackBuild +++ b/development/MySQL-python/MySQL-python.SlackBuild @@ -57,7 +57,7 @@ patch -p1 < $CWD/patches/no_distribute_download.patch # Include my_config.h first patch -p1 < $CWD/patches/MySQL-python-1.2.4-include-my_config-first.patch -python setup.py install --root=$PKG +CPPFLAGS="-I/usr/include/mysql/server" python setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/development/SDL2_gfx/README b/development/SDL2_gfx/README deleted file mode 100644 index 6be21f40d1..0000000000 --- a/development/SDL2_gfx/README +++ /dev/null @@ -1,3 +0,0 @@ -SDL graphics drawing primitives and other support functions -wrapped up in an addon library for the Simple Direct Media -(SDL) cross-platform API layer. diff --git a/development/SDL2_gfx/SDL2_gfx.SlackBuild b/development/SDL2_gfx/SDL2_gfx.SlackBuild deleted file mode 100644 index cdf7a8fb56..0000000000 --- a/development/SDL2_gfx/SDL2_gfx.SlackBuild +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh - -# Slackware build script for SDL2_gfx - -# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=SDL2_gfx -VERSION=${VERSION:-1.0.4} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" -else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" -fi - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; - -./autogen.sh -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --disable-static \ - --build=$ARCH-slackware-linux - -make -make install DESTDIR=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS COPYING ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/SDL2_gfx/SDL2_gfx.info b/development/SDL2_gfx/SDL2_gfx.info deleted file mode 100644 index 2f64868bd2..0000000000 --- a/development/SDL2_gfx/SDL2_gfx.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="SDL2_gfx" -VERSION="1.0.4" -HOMEPAGE="http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/" -DOWNLOAD="http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz" -MD5SUM="15f9866c6464ca298f28f62fe5b36d9f" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="SDL2" -MAINTAINER="Dimitris Zlatanidis" -EMAIL="d.zlatanidis@gmail.com" diff --git a/development/SDL2_gfx/slack-desc b/development/SDL2_gfx/slack-desc deleted file mode 100644 index 72864f2da7..0000000000 --- a/development/SDL2_gfx/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -SDL2_gfx: SDL2_gfx (addon library for the SDL2) -SDL2_gfx: -SDL2_gfx: SDL graphics drawing primitives and other support functions -SDL2_gfx: wrapped up in an addon library for the Simple Direct Media (SDL) -SDL2_gfx: cross-platform API layer. -SDL2_gfx: -SDL2_gfx: Homepage: -SDL2_gfx: http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/ -SDL2_gfx: -SDL2_gfx: -SDL2_gfx: diff --git a/development/acpica/acpica.SlackBuild b/development/acpica/acpica.SlackBuild index f3ffc6d06f..9fdf830070 100644 --- a/development/acpica/acpica.SlackBuild +++ b/development/acpica/acpica.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for acpica -# Copyright 2008-2017 Heinz Wiesinger, Amsterdam, The Netherlands +# Copyright 2008-2018 Heinz Wiesinger, Amsterdam, The Netherlands # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=acpica -VERSION=${VERSION:-20170531} +VERSION=${VERSION:-20180105} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -74,7 +74,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; cd generate/unix - CFLAGS="$SLKCFLAGS" \ + CFLAGS="$SLKCFLAGS -Wno-error=format-overflow" \ CXXFLAGS="$SLKCFLAGS" \ make BITS=$BITS diff --git a/development/acpica/acpica.info b/development/acpica/acpica.info index dea5cd5d50..3ac0a61986 100644 --- a/development/acpica/acpica.info +++ b/development/acpica/acpica.info @@ -1,8 +1,8 @@ PRGNAM="acpica" -VERSION="20170531" +VERSION="20180105" HOMEPAGE="http://www.acpica.org" -DOWNLOAD="https://acpica.org/sites/acpica/files/acpica-unix2-20170531.tar.gz" -MD5SUM="46c4c93435ad1d8c4eb5bacde17503b8" +DOWNLOAD="https://acpica.org/sites/acpica/files/acpica-unix2-20180105.tar.gz" +MD5SUM="5aa086f71f4b5273c0932a1e04419a37" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/android-tools/README b/development/android-tools/README index e7d793fe84..f8f0f70641 100644 --- a/development/android-tools/README +++ b/development/android-tools/README @@ -1,2 +1,2 @@ -These are the adb, fastboot, mkbootimg and make_ext4fs tools from the -android sdk. +These are the adb, fastboot, mkbootimg, mke2fs.android, e2fsdroid +and ext2simg tools from the android sdk. diff --git a/development/android-tools/android-tools.SlackBuild b/development/android-tools/android-tools.SlackBuild index 8e141f5fbd..d967c127d6 100644 --- a/development/android-tools/android-tools.SlackBuild +++ b/development/android-tools/android-tools.SlackBuild @@ -25,13 +25,13 @@ PRGNAM=android-tools -VERSION=${VERSION:-8.0.0_r24} -SRC1=core-6cd85e2a89347e0a107f59e38ece61fa19e6da78.tar.gz -SRC2=extras-af2dce5151ad478673401211dd71ae1579d2b5be.tar.gz -SRC3=selinux-be29c2550c3ff6551a56048c075a88da01b46cab.tar.gz -SRC4=f2fs-tools-b8baf1712d991541141bb0bdddd625f527e6d41f.tar.gz -SRC5=boringssl-58e449904e248f34bdfc2be7a609c58bcb0257b7.tar.gz - +VERSION=${VERSION:-9.0.0_r18} +SRC1=core-c9602275fc7dae822d22ba36c933d29f4556d6aa.tar.gz +SRC2=e2fsprogs-fecf0a211618bbed183ebf58d5bf489105bed72c.tar.gz +SRC3=extras-9d680761912ab259ffd35b05c880b9e49d800bc8.tar.gz +SRC4=f2fs-tools-d2d127499ebdfaa681df4c13a303a7d0445f1e80.tar.gz +SRC5=selinux-0d8f825909d3e600facbf23be4758877f98c2602.tar.gz +SRC6=boringssl-45210dd4e21ace9d28cb76b3f83303fcdd2efcce.tar.gz BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -73,19 +73,25 @@ cd $TMP/android-tools mkdir core tar -xvf $CWD/$SRC1 -C core +mkdir e2fsprogs +tar -xvf $CWD/$SRC2 -C e2fsprogs mkdir extras -tar -xvf $CWD/$SRC2 -C extras -mkdir selinux -tar -xvf $CWD/$SRC3 -C selinux +tar -xvf $CWD/$SRC3 -C extras mkdir f2fs-tools tar -xvf $CWD/$SRC4 -C f2fs-tools +mkdir selinux +tar -xvf $CWD/$SRC5 -C selinux mkdir boringssl -tar -xvf $CWD/$SRC5 -C boringssl +tar -xvf $CWD/$SRC6 -C boringssl +## android.googlesource.com stuff takes android-$VERSION as a tag #git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/core #git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/system/extras -#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/libselinux +#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/selinux +#git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/e2fsprogs #git clone --branch android-$VERSION --depth 1 https://android.googlesource.com/platform/external/f2fs-tools +## boringssl commit id is from https://android.googlesource.com/platform/external/boringssl/+/$VERSION/BORINGSSL_REVISION +#git clone https://boringssl.googlesource.com/boringssl # generate_build.rb borrowed from Arch Linux # And thanks to Alan Alberghini for the make_ext4fs patch. @@ -95,6 +101,10 @@ cd core patch -p1 < $CWD/fix_build_core.patch cd .. +cd e2fsprogs +patch -p1 < $CWD/fix_build_e2fsprogs.patch +cd .. + cd selinux patch -p1 < $CWD/fix_build_selinux.patch cd .. @@ -119,7 +129,11 @@ mkdir -p $PKG/usr/bin install -Dm 755 adb $PKG/usr/bin/adb install -Dm 755 fastboot $PKG/usr/bin/fastboot install -Dm 755 core/mkbootimg/mkbootimg $PKG/usr/bin/mkbootimg -install -Dm 755 make_ext4fs $PKG/usr/bin/make_ext4fs +install -Dm 755 mke2fs.android $PKG/usr/bin/mke2fs.android +install -Dm 755 e2fsdroid $PKG/usr/bin/e2fsdroid +install -Dm 755 ext2simg $PKG/usr/bin/ext2simg + +install -Dm 644 $CWD/bash_completion.fastboot $PKG/usr/share/bash-completion/completions/fastboot find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/development/android-tools/android-tools.info b/development/android-tools/android-tools.info index ba44d787e2..0be06697ab 100644 --- a/development/android-tools/android-tools.info +++ b/development/android-tools/android-tools.info @@ -1,16 +1,18 @@ PRGNAM="android-tools" -VERSION="8.0.0_r24" +VERSION="9.0.0_r18" HOMEPAGE="http://developer.android.com/sdk/" -DOWNLOAD="https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/core-6cd85e2a89347e0a107f59e38ece61fa19e6da78.tar.gz \ - https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/extras-af2dce5151ad478673401211dd71ae1579d2b5be.tar.gz \ - https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/f2fs-tools-b8baf1712d991541141bb0bdddd625f527e6d41f.tar.gz \ - https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/selinux-be29c2550c3ff6551a56048c075a88da01b46cab.tar.gz \ - https://sourceforge.net/projects/slackbuildsdirectlinks/files/android-tools/8.0.0_r24/boringssl-58e449904e248f34bdfc2be7a609c58bcb0257b7.tar.gz" -MD5SUM="b5b3857b5edae7305f5348e1db148b61 \ - 19bdc27835ed340fdbb4205d6af8e721 \ - 2ebe16bb82a5b24706d78d9e16d66f6e \ - 0599c72a1ff3142ad6baed8886d074a3 \ - 83ed1371eee7769f29b767c217e865e7" +DOWNLOAD="http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/core-c9602275fc7dae822d22ba36c933d29f4556d6aa.tar.gz \ + http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/e2fsprogs-fecf0a211618bbed183ebf58d5bf489105bed72c.tar.gz \ + http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/extras-9d680761912ab259ffd35b05c880b9e49d800bc8.tar.gz \ + http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/f2fs-tools-d2d127499ebdfaa681df4c13a303a7d0445f1e80.tar.gz \ + http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/selinux-0d8f825909d3e600facbf23be4758877f98c2602.tar.gz \ + http://ponce.cc/slackware/sources/repo/android-tools/9.0.0_r18/boringssl-45210dd4e21ace9d28cb76b3f83303fcdd2efcce.tar.gz" +MD5SUM="8bba902ab4b5aace76e2efc34e47fe46 \ + 8f01009b219d13fce4960a9b5de2e868 \ + 44894217f0c6b8dcae77292b08e51d40 \ + 789498e1c7f5dc2851590d8e2fa05028 \ + b94232d9153df5a020419ac228153837 \ + a532caf142cb80ca418629e45cfa4b67" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="gtest ninja pcre2" diff --git a/development/android-tools/bash_completion.fastboot b/development/android-tools/bash_completion.fastboot new file mode 100644 index 0000000000..bc59ee8636 --- /dev/null +++ b/development/android-tools/bash_completion.fastboot @@ -0,0 +1,90 @@ +## Bash completion for the Android SDK tools. +## +## Copyright (c) 2009 Matt Brubeck +## +## Permission is hereby granted, free of charge, to any person obtaining a copy +## of this software and associated documentation files (the "Software"), to deal +## in the Software without restriction, including without limitation the rights +## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +## copies of the Software, and to permit persons to whom the Software is +## furnished to do so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in +## all copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +## THE SOFTWARE. + + +function _fastboot() +{ + local cur prev opts cmds c subcommand device_selected + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="-w -s -p -c -i -b -n" + cmds="update flashall flash erase getvar boot devices \ + reboot reboot-bootloader oem continue" + subcommand="" + partition_list="boot recovery system userdata bootloader radio" + device_selected="" + + # Look for the subcommand. + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + if [ "$word" = "-s" ]; then + device_selected=true + fi + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + case "${subcommand}" in + '') + case "${prev}" in + -s) + # Use 'fastboot devices' to list serial numbers. + COMPREPLY=( $(compgen -W "$(fastboot devices|cut -f1)" -- ${cur} ) ) + return 0 + ;; + esac + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 + ;; + esac + if [ -z "$device_selected" ]; then + local num_devices=$(( $(fastboot devices 2>/dev/null|wc -l) )) + if [ "$num_devices" -gt "1" ]; then + # With multiple devices, you must choose a device first. + COMPREPLY=( $(compgen -W "-s" -- ${cur}) ) + return 0 + fi + fi + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + return 0 + ;; + flash) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + erase) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + esac +} +complete -o default -F _fastboot fastboot diff --git a/development/android-tools/fix_build_core.patch b/development/android-tools/fix_build_core.patch index b67a540199..7b163633de 100644 --- a/development/android-tools/fix_build_core.patch +++ b/development/android-tools/fix_build_core.patch @@ -1,16 +1,16 @@ diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp -index 7025f283c..66fad6564 100644 +index 46c3f58ec5..a0c36f0151 100644 --- a/adb/client/usb_libusb.cpp +++ b/adb/client/usb_libusb.cpp -@@ -21,6 +21,7 @@ - #include <stdint.h> +@@ -22,6 +22,7 @@ + #include <stdlib.h> #include <atomic> +#include <condition_variable> #include <chrono> + #include <condition_variable> #include <memory> - #include <mutex> -@@ -28,7 +29,7 @@ +@@ -30,7 +31,7 @@ #include <thread> #include <unordered_map> @@ -19,20 +19,32 @@ index 7025f283c..66fad6564 100644 #include <android-base/file.h> #include <android-base/logging.h> +diff --git a/adb/client/usb_linux.cpp b/adb/client/usb_linux.cpp +index 1f376a4c93..f1d6779159 100644 +--- a/adb/client/usb_linux.cpp ++++ b/adb/client/usb_linux.cpp +@@ -29,6 +29,7 @@ + #include <stdlib.h> + #include <string.h> + #include <sys/ioctl.h> ++#include <sys/sysmacros.h> + #include <sys/time.h> + #include <sys/types.h> + #include <unistd.h> diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp -index 45da5af4a..516c716d9 100644 +index ecd1fd24ec..86166c0e2c 100644 --- a/adb/sysdeps/posix/network.cpp +++ b/adb/sysdeps/posix/network.cpp -@@ -16,6 +16,7 @@ +@@ -21,6 +21,7 @@ + #include <sys/socket.h> - #include "sysdeps/network.h" + #include <string> ++#include <string.h> + + #include "adb_unique_fd.h" -+#include <cstring> - #include <errno.h> - #include <netinet/in.h> - #include <sys/socket.h> diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp -index 296995efe..48269b675 100644 +index 296995efe2..48269b6750 100644 --- a/base/errors_unix.cpp +++ b/base/errors_unix.cpp @@ -17,6 +17,7 @@ @@ -44,7 +56,7 @@ index 296995efe..48269b675 100644 namespace android { namespace base { diff --git a/base/file.cpp b/base/file.cpp -index 2f697a1cc..81aef5758 100644 +index 2f697a1cc1..81aef5758c 100644 --- a/base/file.cpp +++ b/base/file.cpp @@ -22,6 +22,7 @@ @@ -56,7 +68,7 @@ index 2f697a1cc..81aef5758 100644 #include <memory> #include <mutex> diff --git a/base/logging.cpp b/base/logging.cpp -index 6357b4ba7..3c7dbce13 100644 +index a31feefab2..d746cc4d78 100644 --- a/base/logging.cpp +++ b/base/logging.cpp @@ -23,6 +23,7 @@ @@ -67,15 +79,40 @@ index 6357b4ba7..3c7dbce13 100644 // For getprogname(3) or program_invocation_short_name. #if defined(__ANDROID__) || defined(__APPLE__) +diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp +index c30ca1e4b3..fdc042ff36 100644 +--- a/fastboot/fs.cpp ++++ b/fastboot/fs.cpp +@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize, + static constexpr int block_size = 4096; + const std::string exec_dir = android::base::GetExecutableDirectory(); + +- const std::string mke2fs_path = exec_dir + "/mke2fs"; ++ const std::string mke2fs_path = exec_dir + "/mke2fs.android"; + std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"}; + + std::string block_size_str = std::to_string(block_size); diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp -index bd668735a..76cf43299 100644 +index 4379635270..ccb565bb63 100644 --- a/libsparse/sparse_read.cpp +++ b/libsparse/sparse_read.cpp -@@ -18,6 +18,7 @@ - #define _LARGEFILE64_SOURCE 1 +@@ -26,6 +26,7 @@ + #include <stdlib.h> + #include <string.h> + #include <string> ++#include <string.h> + #include <unistd.h> - #include <algorithm> -+#include <cstring> - #include <inttypes.h> - #include <fcntl.h> - #include <stdarg.h> + #include <sparse/sparse.h> +diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc +index 5e5e7afd18..ebbc819a7a 100644 +--- a/libziparchive/zip_archive.cc ++++ b/libziparchive/zip_archive.cc +@@ -29,6 +29,7 @@ + #include <string.h> + #include <time.h> + #include <unistd.h> ++#include <string_view> + + #include <memory> + #include <vector> diff --git a/development/android-tools/fix_build_e2fsprogs.patch b/development/android-tools/fix_build_e2fsprogs.patch new file mode 100644 index 0000000000..b9fdb5eafe --- /dev/null +++ b/development/android-tools/fix_build_e2fsprogs.patch @@ -0,0 +1,83 @@ +diff --git a/contrib/android/perms.c b/contrib/android/perms.c +index d83ad35a..dca5b620 100644 +--- a/contrib/android/perms.c ++++ b/contrib/android/perms.c +@@ -5,6 +5,7 @@ + #include "support/nls-enable.h" + #include <time.h> + #include <sys/stat.h> ++#include "private/android_filesystem_capability.h" + + #ifndef XATTR_SELINUX_SUFFIX + # define XATTR_SELINUX_SUFFIX "selinux" +diff --git a/lib/ext2fs/bitops.h b/lib/ext2fs/bitops.h +index 505b3c9c..7be5105f 100644 +--- a/lib/ext2fs/bitops.h ++++ b/lib/ext2fs/bitops.h +@@ -233,11 +233,11 @@ extern errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap + #if (__STDC_VERSION__ >= 199901L) + #define _INLINE_ extern inline + #else +-#define _INLINE_ inline ++#define _INLINE_ static inline + #endif + #else /* !INCLUDE_INLINE FUNCS */ + #if (__STDC_VERSION__ >= 199901L) +-#define _INLINE_ inline ++#define _INLINE_ static inline + #else /* not C99 */ + #ifdef __GNUC__ + #define _INLINE_ extern __inline__ +diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h +index 470e7d7a..95a41e0d 100644 +--- a/lib/ext2fs/ext2fs.h ++++ b/lib/ext2fs/ext2fs.h +@@ -1743,7 +1743,7 @@ extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large + #define _INLINE_ extern + #else + #if (__STDC_VERSION__ >= 199901L) +-#define _INLINE_ inline ++#define _INLINE_ static inline + #else + #ifdef __GNUC__ + #define _INLINE_ extern __inline__ +diff --git a/misc/create_inode.c b/misc/create_inode.c +index 1373b46b..e6f34bd9 100644 +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -403,7 +403,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset) + } + #endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */ + +-static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, ++static errcode_t e2_copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file, + off_t start, off_t end, char *buf, + char *zerobuf) + { +@@ -477,7 +477,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf, + + data_blk = data & ~(fs->blocksize - 1); + hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1); +- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, ++ err = e2_copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf, + zerobuf); + if (err) + return err; +@@ -527,7 +527,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file, + } + for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents; + i++, ext++) { +- err = copy_file_range(fs, fd, e2_file, ext->fe_logical, ++ err = e2_copy_file_range(fs, fd, e2_file, ext->fe_logical, + ext->fe_logical + ext->fe_length, + buf, zerobuf); + if (err) +@@ -580,7 +580,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf, + goto out; + #endif + +- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, ++ err = e2_copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf, + zerobuf); + out: + ext2fs_free_mem(&zerobuf); diff --git a/development/android-tools/generate_build.rb b/development/android-tools/generate_build.rb index cb3e1e685c..91f42fec0b 100644 --- a/development/android-tools/generate_build.rb +++ b/development/android-tools/generate_build.rb @@ -5,7 +5,7 @@ # This script tries to mimic Android build rules. def expand(dir, files) - files.map{|f| File.join(dir,f)} + files.map { |f| File.join(dir, f) } end # Compiles sources to *.o files. @@ -16,17 +16,17 @@ def compile(sources, cflags) ext = File.extname(s) case ext - when '.c' - cc = 'cc' - lang_flags = '-std=gnu11 $CFLAGS $CPPFLAGS' - when '.cpp', '.cc' - cc = 'cxx' - lang_flags = '-std=gnu++14 $CXXFLAGS $CPPFLAGS' + when ".c" + cc = "cc" + lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS" + when ".cpp", ".cc" + cc = "cxx" + lang_flags = "-std=gnu++17 $CXXFLAGS $CPPFLAGS" else - raise "Unknown extension #{ext}" + raise "Unknown extension #{ext}" end - output = s + '.o' + output = s + ".o" outputs << output puts "build #{output}: #{cc} #{s}\n cflags = #{lang_flags} #{cflags}" end @@ -38,24 +38,23 @@ end # lib - static library path relative to dir def subninja(dir, lib) puts "subninja #{dir}build.ninja" - return lib.each{|l| dir + l} + return lib.each { |l| dir + l } end # Links object files def link(output, objects, ldflags) - puts "build #{output}: link #{objects.join(' ')}\n ldflags = #{ldflags} $LDFLAGS" + puts "build #{output}: link #{objects.join(" ")}\n ldflags = #{ldflags} $LDFLAGS" end puts "# This set of commands generated by generate_build.rb script\n\n" -puts "CC = #{ENV['CC'] || 'clang'}" -puts "CXX = #{ENV['CXX'] || 'clang++'}\n\n" -puts "CFLAGS = #{ENV['CFLAGS']}" -puts "CXXFLAGS = #{ENV['CXXFLAGS']}" -puts "LDFLAGS = #{ENV['LDFLAGS']}" -puts "PKGVER = #{ENV['PKGVER']}\n\n" - - -puts """ +puts "CC = #{ENV["CC"] || "clang"}" +puts "CXX = #{ENV["CXX"] || "clang++"}\n\n" +puts "CFLAGS = #{ENV["CFLAGS"]}" +puts "CXXFLAGS = #{ENV["CXXFLAGS"]}" +puts "LDFLAGS = #{ENV["LDFLAGS"]}" +puts "PKGVER = #{ENV["PKGVER"]}\n\n" + +puts "" " rule cc command = $CC $cflags -c $in -o $out @@ -66,7 +65,7 @@ rule link command = $CXX $ldflags $LDFLAGS $in -o $out -""" +" "" adbdfiles = %w( adb.cpp @@ -85,7 +84,7 @@ adbdfiles = %w( adb_auth_host.cpp shell_service_protocol.cpp ) -libadbd = compile(expand('core/adb', adbdfiles), '-DADB_VERSION="\"$PKGVER\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include') +libadbd = compile(expand("core/adb", adbdfiles), '-DADB_VERSION="\"$PKGVER\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include') adbfiles = %w( console.cpp @@ -96,13 +95,13 @@ adbfiles = %w( file_sync_client.cpp sysdeps_unix.cpp sysdeps/errno.cpp - sysdeps/posix/network.cpp client/main.cpp client/usb_dispatch.cpp client/usb_linux.cpp client/usb_libusb.cpp + sysdeps/posix/network.cpp ) -libadb = compile(expand('core/adb', adbfiles), '-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb') +libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb") basefiles = %w( file.cpp @@ -113,7 +112,7 @@ basefiles = %w( errors_unix.cpp test_utils.cpp ) -libbase = compile(expand('core/base', basefiles), '-DADB_HOST=1 -Icore/base/include -Icore/include') +libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include") logfiles = %w( log_event_write.c @@ -129,39 +128,38 @@ logfiles = %w( stderr_write.c logprint.c ) -liblog = compile(expand('core/liblog', logfiles), '-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include') +liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include") cutilsfiles = %w( - load_file.c - canned_fs_config.c - fs_config.cpp - socket_local_client_unix.c - socket_network_client_unix.c - socket_local_server_unix.c + load_file.cpp + socket_local_client_unix.cpp + socket_network_client_unix.cpp + socket_local_server_unix.cpp sockets_unix.cpp - socket_inaddr_any_server_unix.c + socket_inaddr_any_server_unix.cpp sockets.cpp android_get_control_file.cpp - threads.c + threads.cpp + fs_config.cpp + canned_fs_config.cpp ) -libcutils = compile(expand('core/libcutils', cutilsfiles), '-D_GNU_SOURCE -Icore/include -Icore/libcutils/include') +libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include") diagnoseusbfiles = %w( diagnose_usb.cpp ) -libdiagnoseusb = compile(expand('core/adb', diagnoseusbfiles), '-Icore/include -Icore/base/include') +libdiagnoseusb = compile(expand("core/adb", diagnoseusbfiles), "-Icore/include -Icore/base/include") libcryptofiles = %w( android_pubkey.c ) -libcrypto = compile(expand('core/libcrypto_utils', libcryptofiles), '-Icore/libcrypto_utils/include -Iboringssl/include') +libcrypto = compile(expand("core/libcrypto_utils", libcryptofiles), "-Icore/libcrypto_utils/include -Iboringssl/include") # TODO: make subninja working #boringssl = subninja('boringssl/build/', ['crypto/libcrypto.a']) -boringssl = ['boringssl/build/crypto/libcrypto.a'] - -link('adb', libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, '-lpthread -lusb-1.0') +boringssl = ["boringssl/build/crypto/libcrypto.a"] +link("adb", libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, "-lpthread -lusb-1.0") fastbootfiles = %w( protocol.cpp @@ -175,7 +173,7 @@ fastbootfiles = %w( tcp.cpp udp.cpp ) -libfastboot = compile(expand('core/fastboot', fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils') +libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/mkbootimg/include/bootimg') sparsefiles = %w( backed_block.c @@ -185,44 +183,28 @@ sparsefiles = %w( sparse_err.c sparse_read.cpp ) -libsparse = compile(expand('core/libsparse', sparsefiles), '-Icore/libsparse/include -Icore/base/include') +libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include") f2fsfiles = %w( - f2fs_utils.c - f2fs_ioutils.c - f2fs_dlutils.c ) -f2fs = compile(expand('extras/f2fs_utils', f2fsfiles), '-Iextras/f2fs_utils -If2fs-tools/include -If2fs-tools/mkfs -Icore/libsparse/include -Iselinux/libselinux/include') +f2fs = compile(expand("extras/f2fs_utils", f2fsfiles), "-DHAVE_LINUX_TYPES_H -If2fs-tools/include -Icore/liblog/include") zipfiles = %w( zip_archive.cc ) -libzip = compile(expand('core/libziparchive', zipfiles), '-Icore/base/include -Icore/include') +libzip = compile(expand("core/libziparchive", zipfiles), "-Icore/base/include -Icore/include -Icore/libziparchive/include") utilfiles = %w( FileMap.cpp ) -libutil = compile(expand('core/libutils', utilfiles), '-Icore/include') +libutil = compile(expand("core/libutils", utilfiles), "-Icore/include") ext4files = %w( - make_ext4fs.c - ext4fixup.c ext4_utils.c - allocate.c - contents.c - extent.c - indirect.c - sha1.c wipe.c - crc16.c ext4_sb.c ) -libext4 = compile(expand('extras/ext4_utils', ext4files), '-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -DANDROID -DHOST=1') - -make_ext4files = %w( - make_ext4fs_main.c -) -libmake_ext4 = compile(expand('extras/ext4_utils', make_ext4files), '-DANDROID -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -DHOST=1') +libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include") selinuxfiles = %w( callbacks.c @@ -250,7 +232,7 @@ selinuxfiles = %w( getenforce.c setenforce.c ) -libselinux = compile(expand('selinux/libselinux/src', selinuxfiles), '-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL -DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DPCRE2_CODE_UNIT_WIDTH=8 -Iselinux/libselinux/include -Iselinux/libsepol/include') +libselinux = compile(expand("selinux/libselinux/src", selinuxfiles), "-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL -DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DPCRE2_CODE_UNIT_WIDTH=8 -Iselinux/libselinux/include -Iselinux/libsepol/include") libsepolfiles = %w( policydb_public.c @@ -277,7 +259,140 @@ libsepolfiles = %w( expand.c hierarchy.c ) -libsepol = compile(expand('selinux/libsepol/src', libsepolfiles), '-Iselinux/libsepol/include') +libsepol = compile(expand("selinux/libsepol/src", libsepolfiles), "-Iselinux/libsepol/include") + +link("fastboot", libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb, "-lz -lpcre2-8 -lpthread -ldl") + +# mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955) +libext2fsfiles = %w( + lib/blkid/cache.c + lib/blkid/dev.c + lib/blkid/devname.c + lib/blkid/devno.c + lib/blkid/getsize.c + lib/blkid/llseek.c + lib/blkid/probe.c + lib/blkid/read.c + lib/blkid/resolve.c + lib/blkid/save.c + lib/blkid/tag.c + lib/e2p/feature.c + lib/e2p/hashstr.c + lib/e2p/mntopts.c + lib/e2p/ostype.c + lib/e2p/parse_num.c + lib/e2p/uuid.c + lib/et/com_err.c + lib/et/error_message.c + lib/et/et_name.c + lib/ext2fs/alloc.c + lib/ext2fs/alloc_sb.c + lib/ext2fs/alloc_stats.c + lib/ext2fs/alloc_tables.c + lib/ext2fs/atexit.c + lib/ext2fs/badblocks.c + lib/ext2fs/bb_inode.c + lib/ext2fs/bitmaps.c + lib/ext2fs/bitops.c + lib/ext2fs/blkmap64_ba.c + lib/ext2fs/blkmap64_rb.c + lib/ext2fs/blknum.c + lib/ext2fs/block.c + lib/ext2fs/bmap.c + lib/ext2fs/closefs.c + lib/ext2fs/crc16.c + lib/ext2fs/crc32c.c + lib/ext2fs/csum.c + lib/ext2fs/dirblock.c + lib/ext2fs/dir_iterate.c + lib/ext2fs/expanddir.c + lib/ext2fs/ext2_err.c + lib/ext2fs/ext_attr.c + lib/ext2fs/extent.c + lib/ext2fs/fallocate.c + lib/ext2fs/fileio.c + lib/ext2fs/freefs.c + lib/ext2fs/gen_bitmap64.c + lib/ext2fs/gen_bitmap.c + lib/ext2fs/get_num_dirs.c + lib/ext2fs/getsectsize.c + lib/ext2fs/getsize.c + lib/ext2fs/hashmap.c + lib/ext2fs/i_block.c + lib/ext2fs/ind_block.c + lib/ext2fs/initialize.c + lib/ext2fs/inline.c + lib/ext2fs/inline_data.c + lib/ext2fs/inode.c + lib/ext2fs/io_manager.c + lib/ext2fs/ismounted.c + lib/ext2fs/link.c + lib/ext2fs/llseek.c + lib/ext2fs/lookup.c + lib/ext2fs/mkdir.c + lib/ext2fs/mkjournal.c + lib/ext2fs/mmp.c + lib/ext2fs/namei.c + lib/ext2fs/newdir.c + lib/ext2fs/openfs.c + lib/ext2fs/progress.c + lib/ext2fs/punch.c + lib/ext2fs/rbtree.c + lib/ext2fs/read_bb.c + lib/ext2fs/read_bb_file.c + lib/ext2fs/res_gdt.c + lib/ext2fs/rw_bitmaps.c + lib/ext2fs/sha512.c + lib/ext2fs/sparse_io.c + lib/ext2fs/symlink.c + lib/ext2fs/undo_io.c + lib/ext2fs/unix_io.c + lib/ext2fs/valid_blk.c + lib/support/dict.c + lib/support/mkquota.c + lib/support/parse_qtype.c + lib/support/plausible.c + lib/support/prof_err.c + lib/support/profile.c + lib/support/quotaio.c + lib/support/quotaio_tree.c + lib/support/quotaio_v2.c + lib/uuid/gen_uuid.c + lib/uuid/isnull.c + lib/uuid/pack.c + lib/uuid/parse.c + lib/uuid/unpack.c + lib/uuid/unparse.c + misc/create_inode.c +) +libext2fs = compile(expand("e2fsprogs", libext2fsfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Icore/libsparse/include") + +mke2fsfiles = %w( + misc/default_profile.c + misc/mke2fs.c + misc/mk_hugefiles.c + misc/util.c +) +mke2fs = compile(expand("e2fsprogs", mke2fsfiles), "-Ie2fsprogs/lib") + +link("mke2fs.android", mke2fs + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lpthread -lz") + +e2fsdroidfiles = %w( + contrib/android/e2fsdroid.c + contrib/android/basefs_allocator.c + contrib/android/block_range.c + contrib/android/base_fs.c + contrib/android/fsmap.c + contrib/android/block_list.c + contrib/android/perms.c +) +e2fsdroid = compile(expand("e2fsprogs", e2fsdroidfiles), "-Ie2fsprogs/lib -Ie2fsprogs/lib/ext2fs -Iselinux/libselinux/include -Icore/libcutils/include -Ie2fsprogs/misc") + +link("e2fsdroid", e2fsdroid + libext2fs + libsparse + libbase + libzip + liblog + libutil + libselinux + libsepol + libcutils, "-lz -lpthread -lpcre2-8") + +ext2simgfiles = %w( + contrib/android/ext2simg.c +) +ext2simg = compile(expand("e2fsprogs", ext2simgfiles), "-Ie2fsprogs/lib -Icore/libsparse/include") -link('fastboot', libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb, '-lz -lpcre2-8 -lpthread -ldl') -link('make_ext4fs', libmake_ext4 + libzip + libcutils + liblog + libutil + libbase + libext4 + libselinux + libsepol + libsparse, '-lz -lpcre2-8 -lpthread') +link("ext2simg", ext2simg + libext2fs + libsparse + libbase + libzip + liblog + libutil, "-lz -lpthread") diff --git a/development/anjuta/anjuta.SlackBuild b/development/anjuta/anjuta.SlackBuild index c4f11f91b6..60ab56357a 100644 --- a/development/anjuta/anjuta.SlackBuild +++ b/development/anjuta/anjuta.SlackBuild @@ -69,7 +69,7 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS -Wno-error=format-nonliteral -Wno-error=format-y2k" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ diff --git a/development/apache-log4cxx/apache-log4cxx.SlackBuild b/development/apache-log4cxx/apache-log4cxx.SlackBuild index 8e1adafefb..a0971e9701 100644 --- a/development/apache-log4cxx/apache-log4cxx.SlackBuild +++ b/development/apache-log4cxx/apache-log4cxx.SlackBuild @@ -70,6 +70,7 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; zcat $CWD/fixincludes.patch.gz | patch -p1 || exit +zcat $CWD/narrowing-fixes.patch.gz | patch -p1 || exit CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/development/apache-log4cxx/narrowing-fixes.patch.gz b/development/apache-log4cxx/narrowing-fixes.patch.gz Binary files differnew file mode 100644 index 0000000000..cd79cc6971 --- /dev/null +++ b/development/apache-log4cxx/narrowing-fixes.patch.gz diff --git a/development/arm-gcc/README b/development/arm-gcc/README index 964a9570c2..c40bc6bb12 100644 --- a/development/arm-gcc/README +++ b/development/arm-gcc/README @@ -1,2 +1,2 @@ This package contains cross compiling version of GNU gcc, which can be -used to compile C and C++ programs for the ARM platform. +used to compile C programs for the ARM platform. diff --git a/development/arm-gcc/arm-gcc.SlackBuild b/development/arm-gcc/arm-gcc.SlackBuild index 782ac73ba1..664f99713f 100644 --- a/development/arm-gcc/arm-gcc.SlackBuild +++ b/development/arm-gcc/arm-gcc.SlackBuild @@ -25,7 +25,7 @@ # Written by Marek Buras <cyfr0n (at) go2 !dot pl> PRGNAM=arm-gcc -VERSION=${VERSION:-4.9.2} +VERSION=${VERSION:-8.2.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -62,7 +62,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf gcc-$VERSION arm-gcc-build-$VERSION -tar xvf $CWD/gcc-$VERSION.tar.bz2 +tar xvf $CWD/gcc-$VERSION.tar.xz mkdir arm-gcc-build-$VERSION cd arm-gcc-build-$VERSION chown -R root:root . @@ -130,6 +130,9 @@ rm -rf $PKG/usr/share rm -rf $PKG/usr/man/man7 rm -rf $PKG/usr/libexec/gcc/arm/$VERSION/install-tools +# These files collide with the ones from Slackware's gcc, so we move them +mv $PKG/usr/lib$LIBDIRSUFFIX/libcc* $PKG/usr/lib$LIBDIRSUFFIX/gcc/arm-none-eabi/$VERSION/ + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true diff --git a/development/arm-gcc/arm-gcc.info b/development/arm-gcc/arm-gcc.info index 1aa9100d78..45dfc07ff1 100644 --- a/development/arm-gcc/arm-gcc.info +++ b/development/arm-gcc/arm-gcc.info @@ -1,8 +1,8 @@ PRGNAM="arm-gcc" -VERSION="4.9.2" +VERSION="8.2.0" HOMEPAGE="http://www.gnu.org/software/gcc/" -DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2" -MD5SUM="4df8ee253b7f3863ad0b86359cd39c43" +DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz" +MD5SUM="4ab282f414676496483b3e1793d07862" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="arm-binutils" diff --git a/development/atom/atom.SlackBuild b/development/atom/atom.SlackBuild index 4b37a523e6..cb91f78ccf 100644 --- a/development/atom/atom.SlackBuild +++ b/development/atom/atom.SlackBuild @@ -23,7 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=atom -VERSION=${VERSION:-1.23.3} +VERSION=${VERSION:-1.32.0_beta0} +SRCVER=$(echo $VERSION | tr _ - ) BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -65,9 +66,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$SRCVER +tar -xvf $CWD/$PRGNAM-$SRCVER.tar.gz +cd $PRGNAM-$SRCVER chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -120,7 +121,9 @@ if [ "${ELECTRON_VERSION}" != "" ]; then $PKG/$ATOM_RESOURCES/apm/node_modules/atom-package-manager/lib/apm.js else # packaged installation - cp -r out/$PRGNAM-$VERSION-$ARCH_OUTPUT $PKG/usr/share/atom + BETA="" + if echo $VERSION | grep -q beta ; then BETA="-beta" ; fi + cp -r out/${PRGNAM}${BETA}-$SRCVER-$ARCH_OUTPUT $PKG/usr/share/atom fi install -Dm755 atom.sh $PKG/usr/bin/atom diff --git a/development/atom/atom.info b/development/atom/atom.info index 2f69bc17d7..6f155359b4 100644 --- a/development/atom/atom.info +++ b/development/atom/atom.info @@ -1,8 +1,8 @@ PRGNAM="atom" -VERSION="1.23.3" +VERSION="1.32.0_beta0" HOMEPAGE="https://atom.io/" -DOWNLOAD="https://github.com/atom/atom/archive/v1.23.3/atom-1.23.3.tar.gz" -MD5SUM="1dfc819b29c910daaed20c11a629b28f" +DOWNLOAD="https://github.com/atom/atom/archive/v1.32.0-beta0/atom-1.32.0-beta0.tar.gz" +MD5SUM="eab5898091d0e5e333d847e3025a158b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="nodejs" diff --git a/development/autogen/autogen.SlackBuild b/development/autogen/autogen.SlackBuild index 8318ecd660..3fdb23b320 100644 --- a/development/autogen/autogen.SlackBuild +++ b/development/autogen/autogen.SlackBuild @@ -70,7 +70,11 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ +# Patched for guile 2.2.x +patch -p1 < $CWD/guile-2.2.patch + +autoreconf +CFLAGS="$SLKCFLAGS -Wno-error=implicit-fallthrough -Wno-error=format-overflow" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -81,6 +85,7 @@ CXXFLAGS="$SLKCFLAGS" \ --infodir=/usr/info \ --docdir=/usr/doc/$PRGNAM-$VERSION \ --enable-static=no \ + --disable-dependency-tracking \ --build=$ARCH-slackware-linux make diff --git a/development/autogen/guile-2.2.patch b/development/autogen/guile-2.2.patch new file mode 100644 index 0000000000..b3d50f4b79 --- /dev/null +++ b/development/autogen/guile-2.2.patch @@ -0,0 +1,78 @@ +diff --git a/agen5/guile-iface.h b/agen5/guile-iface.h +index 0aeabb0..6ce3520 100644 +--- a/agen5/guile-iface.h ++++ b/agen5/guile-iface.h +@@ -9,7 +9,7 @@ + # error AutoGen does not work with this version of Guile + choke me. + +-#elif GUILE_VERSION < 201000 ++#else + # define AG_SCM_IS_PROC(_p) scm_is_true( scm_procedure_p(_p)) + # define AG_SCM_LIST_P(_l) scm_is_true( scm_list_p(_l)) + # define AG_SCM_PAIR_P(_p) scm_is_true( scm_pair_p(_p)) +@@ -24,9 +24,6 @@ + # define AG_SCM_TO_ULONG(_v) ((unsigned long)scm_to_ulong(_v)) + # define AG_SCM_VEC_P(_v) scm_is_vector(_v) + +-#else +-# error unknown GUILE_VERSION +- choke me. + #endif + + #endif /* MUTATING_GUILE_IFACE_H_GUARD */ +diff --git a/configure b/configure +index befe20b..c4254eb 100755 +--- a/configure ++++ b/configure +@@ -14191,7 +14191,7 @@ $as_echo "no" >&6; } + PKG_CONFIG="" + fi + fi +- _guile_versions_to_search="2.0 1.8" ++ _guile_versions_to_search="2.2 2.0 1.8" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do + +diff --git a/agen5/guile-iface.h b/agen5/guile-iface.h +index 0aeabb0..6ce3520 100644 +--- autogen-5.18.12/config/guile-orig.m4 2017-11-21 15:23:45.047606700 -0500 ++++ autogen-5.18.12/config/guile.m4 2017-11-21 15:24:20.414686700 -0500 +@@ -47,7 +47,7 @@ + # for an available version of Guile. + # + # By default, this macro will search for the latest stable version of +-# Guile (e.g. 2.0), falling back to the previous stable version ++# Guile (e.g. 2.2), falling back to the previous stable version + # (e.g. 1.8) if it is available. If no guile-@var{VERSION}.pc file is + # found, an error is signalled. The found version is stored in + # @var{GUILE_EFFECTIVE_VERSION}. +@@ -61,7 +61,7 @@ + # + AC_DEFUN([GUILE_PKG], + [PKG_PROG_PKG_CONFIG +- _guile_versions_to_search="m4_default([$1], [2.0 1.8])" ++ _guile_versions_to_search="m4_default([$1], [2.2 1.8])" + if test -n "$GUILE_EFFECTIVE_VERSION"; then + _guile_tmp="" + for v in $_guile_versions_to_search; do +@@ -184,7 +184,7 @@ + # If @code{guile} is not found, signal an error. + # + # By default, this macro will search for the latest stable version of +-# Guile (e.g. 2.0). x.y or x.y.z versions can be specified. If an older ++# Guile (e.g. 2.2). x.y or x.y.z versions can be specified. If an older + # version is found, the macro will signal an error. + # + # The effective version of the found @code{guile} is set to +@@ -201,7 +201,7 @@ + [AC_PATH_PROG(GUILE,guile) + _guile_required_version="m4_default([$1], [$GUILE_EFFECTIVE_VERSION])" + if test -z "$_guile_required_version"; then +- _guile_required_version=2.0 ++ _guile_required_version=2.2 + fi + if test "$GUILE" = "" ; then + AC_MSG_ERROR([guile required but not found]) + diff --git a/development/avr-binutils/avr-binutils.SlackBuild b/development/avr-binutils/avr-binutils.SlackBuild index 3b31a96b3f..8684c76c33 100644 --- a/development/avr-binutils/avr-binutils.SlackBuild +++ b/development/avr-binutils/avr-binutils.SlackBuild @@ -9,7 +9,7 @@ # This file is placed in the public domain. PRGNAM=avr-binutils -VERSION=${VERSION:-2.25} +VERSION=${VERSION:-2.29} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} diff --git a/development/avr-binutils/avr-binutils.info b/development/avr-binutils/avr-binutils.info index 6b640d3296..370f240a4b 100644 --- a/development/avr-binutils/avr-binutils.info +++ b/development/avr-binutils/avr-binutils.info @@ -1,8 +1,8 @@ PRGNAM="avr-binutils" -VERSION="2.25" +VERSION="2.29" HOMEPAGE="http://www.gnu.org/software/binutils" -DOWNLOAD="http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2" -MD5SUM="d9f3303f802a5b6b0bb73a335ab89d66" +DOWNLOAD="http://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2" +MD5SUM="23733a26c8276edbb1168c9bee60e40e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/avr-gcc/Revert-eeb6872bf.patch b/development/avr-gcc/Revert-eeb6872bf.patch new file mode 100644 index 0000000000..1688c149a8 --- /dev/null +++ b/development/avr-gcc/Revert-eeb6872bf.patch @@ -0,0 +1,82 @@ +commit 43d83a70267a9e5c456d28de8e7348820446b712 +Author: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> +Date: Tue May 16 07:50:42 2017 +0200 + + Revert "Prevent LTO wrappers to process a recursive execution" + + This reverts commit eeb6872bfdfd1e71b27de6f62a5f5c08a2efb015. + +diff --git a/gcc/file-find.c b/gcc/file-find.c +index b072a4993d76..b5a1fe8494e8 100644 +--- a/gcc/file-find.c ++++ b/gcc/file-find.c +@@ -208,38 +208,3 @@ prefix_from_string (const char *p, struct path_prefix *pprefix) + } + free (nstore); + } +- +-void +-remove_prefix (const char *prefix, struct path_prefix *pprefix) +-{ +- struct prefix_list *remove, **prev, **remove_prev = NULL; +- int max_len = 0; +- +- if (pprefix->plist) +- { +- prev = &pprefix->plist; +- for (struct prefix_list *pl = pprefix->plist; pl->next; pl = pl->next) +- { +- if (strcmp (prefix, pl->prefix) == 0) +- { +- remove = pl; +- remove_prev = prev; +- continue; +- } +- +- int l = strlen (pl->prefix); +- if (l > max_len) +- max_len = l; +- +- prev = &pl; +- } +- +- if (remove_prev) +- { +- *remove_prev = remove->next; +- free (remove); +- } +- +- pprefix->max_len = max_len; +- } +-} +diff --git a/gcc/file-find.h b/gcc/file-find.h +index 8f49a3af273e..407feba26e74 100644 +--- a/gcc/file-find.h ++++ b/gcc/file-find.h +@@ -41,7 +41,6 @@ extern void find_file_set_debug (bool); + extern char *find_a_file (struct path_prefix *, const char *, int); + extern void add_prefix (struct path_prefix *, const char *); + extern void add_prefix_begin (struct path_prefix *, const char *); +-extern void remove_prefix (const char *prefix, struct path_prefix *); + extern void prefix_from_env (const char *, struct path_prefix *); + extern void prefix_from_string (const char *, struct path_prefix *); + +diff --git a/gcc/gcc-ar.c b/gcc/gcc-ar.c +index 78d2fc1ad306..d5d80e042e5a 100644 +--- a/gcc/gcc-ar.c ++++ b/gcc/gcc-ar.c +@@ -194,14 +194,6 @@ main (int ac, char **av) + #ifdef CROSS_DIRECTORY_STRUCTURE + real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); + #endif +- /* Do not search original location in the same folder. */ +- char *exe_folder = lrealpath (av[0]); +- exe_folder[strlen (exe_folder) - strlen (lbasename (exe_folder))] = '\0'; +- char *location = concat (exe_folder, PERSONALITY, NULL); +- +- if (access (location, X_OK) == 0) +- remove_prefix (exe_folder, &path); +- + exe_name = find_a_file (&path, real_exe_name, X_OK); + if (!exe_name) + { diff --git a/development/avr-gcc/avr-gcc.SlackBuild b/development/avr-gcc/avr-gcc.SlackBuild index a91986fe8c..ab3f811380 100644 --- a/development/avr-gcc/avr-gcc.SlackBuild +++ b/development/avr-gcc/avr-gcc.SlackBuild @@ -8,7 +8,7 @@ # This file is placed in the public domain. PRGNAM=avr-gcc -VERSION=${VERSION:-4.9.2} +VERSION=${VERSION:-7.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -45,9 +45,8 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf gcc-$VERSION avr-gcc-build-$VERSION -tar xvf $CWD/gcc-$VERSION.tar.bz2 || exit 1 -mkdir avr-gcc-build-$VERSION -cd avr-gcc-build-$VERSION || exit 1 +tar xvf $CWD/gcc-$VERSION.tar.bz2 +cd gcc-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -55,6 +54,12 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80717 +patch -p1 < $CWD/Revert-eeb6872bf.patch + +mkdir ../avr-gcc-build-$VERSION +cd ../avr-gcc-build-$VERSION + CFLAGS_FOR_BUILD="$SLKCFLAGS" \ CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \ ../gcc-$VERSION/configure \ @@ -99,6 +104,7 @@ make install DESTDIR=$PKG || exit 1 # Remove useless stuff rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libiberty.a +rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libcc1.* rm -rf $PKG/usr/info rm -rf $PKG/usr/include rm -rf $PKG/usr/share diff --git a/development/avr-gcc/avr-gcc.info b/development/avr-gcc/avr-gcc.info index 6bd3a9b64d..4eda349091 100644 --- a/development/avr-gcc/avr-gcc.info +++ b/development/avr-gcc/avr-gcc.info @@ -1,8 +1,8 @@ PRGNAM="avr-gcc" -VERSION="4.9.2" +VERSION="7.1.0" HOMEPAGE="http://www.gnu.org/software/gcc/" -DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2" -MD5SUM="4df8ee253b7f3863ad0b86359cd39c43" +DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2" +MD5SUM="6bf56a2bca9dac9dbbf8e8d1036964a8" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="avr-binutils" diff --git a/development/docutils/README b/development/docutils/README deleted file mode 100644 index 1160a389f0..0000000000 --- a/development/docutils/README +++ /dev/null @@ -1,6 +0,0 @@ -Docutils (Python Documentation Utilities) - -Docutils is a modular system for processing documentation into useful -formats, such as HTML, XML, and LaTeX. For input Docutils supports -reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext -markup syntax. diff --git a/development/docutils/docutils.SlackBuild b/development/docutils/docutils.SlackBuild deleted file mode 100644 index ffbf286185..0000000000 --- a/development/docutils/docutils.SlackBuild +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -# Slackware build script for docutils - -# Copyright 2006-2018 Robby Workman Tuscaloosa, AL, USA -# All rights reserved. -# -# Redistribution and use of this script, with or without modification, is -# permitted provided that the following conditions are met: -# -# 1. Redistributions of this script must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -PRGNAM=docutils -VERSION=${VERSION:-0.14} -BUILD=${BUILD:-1} -TAG=${TAG:-_SBo} - -if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$( uname -m ) ;; - esac -fi - -CWD=$(pwd) -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} - -set -e - -rm -rf $PKG -mkdir -p $TMP $PKG $OUTPUT -cd $TMP -rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION -chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \ - -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -python setup.py install --root=$PKG - -find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \ - grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a *.txt PKG-INFO $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc - -cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/docutils/docutils.info b/development/docutils/docutils.info deleted file mode 100644 index 04448db78e..0000000000 --- a/development/docutils/docutils.info +++ /dev/null @@ -1,10 +0,0 @@ -PRGNAM="docutils" -VERSION="0.14" -HOMEPAGE="http://docutils.sourceforge.net" -DOWNLOAD="http://downloads.sourceforge.net/docutils/docutils-0.14.tar.gz" -MD5SUM="c53768d63db3873b7d452833553469de" -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="Robby Workman" -EMAIL="rworkman@slackbuilds.org" diff --git a/development/docutils/slack-desc b/development/docutils/slack-desc deleted file mode 100644 index 06dc8a4d0d..0000000000 --- a/development/docutils/slack-desc +++ /dev/null @@ -1,19 +0,0 @@ -# HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. -# Line up the first '|' above the ':' following the base package name, and -# the '|' on the right side marks the last column you can put a character in. -# You must make exactly 11 lines for the formatting to be correct. It's also -# customary to leave one space after the ':' except on otherwise blank lines. - - |-----handy-ruler------------------------------------------------------| -docutils: docutils (Python Document Utilities module) -docutils: -docutils: Docutils is an open-source text processing system for processing -docutils: plaintext documentation into useful formats, such as HTML or LaTeX. -docutils: It includes reStructuredText, the easy to read, easy to use, -docutils: what-you-see-is-what-you-get plaintext markup language. -docutils: -docutils: Homepage: http://docutils.sourceforge.net/ -docutils: -docutils: -docutils: diff --git a/development/freetds/freetds.SlackBuild b/development/freetds/freetds.SlackBuild index 826125272e..64317e53d1 100644 --- a/development/freetds/freetds.SlackBuild +++ b/development/freetds/freetds.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=freetds -VERSION=${VERSION:-1.00.9} +VERSION=${VERSION:-1.00.99} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} diff --git a/development/freetds/freetds.info b/development/freetds/freetds.info index 530fdb3b51..81e2313fd5 100644 --- a/development/freetds/freetds.info +++ b/development/freetds/freetds.info @@ -1,8 +1,8 @@ PRGNAM="freetds" -VERSION="1.00.9" +VERSION="1.00.99" HOMEPAGE="http://www.freetds.org/" -DOWNLOAD="ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.9.tar.gz" -MD5SUM="9f3518c9763f195eca119e4ee504be8d" +DOWNLOAD="ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.99.tar.gz" +MD5SUM="32777effeb8e45daa5890ef5ad636230" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/gcc5/README b/development/gcc5/README new file mode 100644 index 0000000000..043d62efcf --- /dev/null +++ b/development/gcc5/README @@ -0,0 +1,46 @@ +This gcc5 package can be installed alongside Slackware's gcc-7 packages. +These version 7 compilers can sometimes be quite a bit more strict about +what they accept as valid code. As a consequence, you will regularly run +into compilation issues with software. Not just the software made with +the scripts on slackbuilds.org, but also some of the software in +the Slackware core distribution requires patches in order to get them +to compile. + +Still having the gcc version 5 compilers can sometimes be a lifesaver. +Particulars of the gcc5 package: +- The gcc5 binaries were given a suffix '-5' to make them stand apart + from Slackware's default compilers. +- The gcc5 package only contains the C, C++ and Java language compilers. +- One all-encompassing package is built by the SlackBuild script. +- Profile scripts are added to /etc/profile.d/. You can 'source' + the profile script to prefer the gcc-5 compilers over gcc-7. +- On 64bit Slackware, the gcc5.SlackBuild will detect an existing gcc + multilib compiler and will then build a multilib capable gcc5. + If you run pure 64bit Slackware, then a pure 64bit gcc5 package is built. + +How to use these gcc5 compilers instead of Slackware's default C and C++? +Simple: +In your console or terminal, you 'source' the provided profile script, +like this (a c-shell compatible script is available as well): + + source /etc/profile.d/gcc5.sh + +The command 'source' is equivalent to the dot command ' . '. +The profile script will (re-)define the common variables that are used +by make and other programs to determine which binary to run as the compiler: + +export CC=gcc-5 +export CPP=cpp-5 +export CXX=g++-5 +export AR=gcc-ar-5 +export NM=gcc-nm-5 +export RANLIB=gcc-ranlib-5 + +Nothing else needs to be done after sourcing the profile script. +All you do next is run your compile job as usual in that same console. +Your program will be compiled with the binaries provided by the gcc5 package. + +** WARNING: +** The temporary build location used by the script (defaulting here to /tmp/SBo) +** should *NOT* be a directory path a non-root user could create later... + diff --git a/development/gcc5/c89.sh b/development/gcc5/c89.sh new file mode 100644 index 0000000000..424b1e1669 --- /dev/null +++ b/development/gcc5/c89.sh @@ -0,0 +1,11 @@ +#!/bin/sh +fl="-std=c89" +CC=${CC:-"gcc"} +for opt; do + case "$opt" in + -ansi|-std=c89|-std=iso9899:1990) fl="";; + -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2 + exit 1;; + esac +done +exec $CC $fl ${1+"$@"} diff --git a/development/gcc5/c99.sh b/development/gcc5/c99.sh new file mode 100644 index 0000000000..c33636937c --- /dev/null +++ b/development/gcc5/c99.sh @@ -0,0 +1,11 @@ +#!/bin/sh +fl="-std=c99" +CC=${CC:-"gcc"} +for opt; do + case "$opt" in + -std=c99|-std=iso9899:1999) fl="";; + -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2 + exit 1;; + esac +done +exec $CC $fl ${1+"$@"} diff --git a/development/gcc5/ecj.sh b/development/gcc5/ecj.sh new file mode 100644 index 0000000000..1d8b797931 --- /dev/null +++ b/development/gcc5/ecj.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +CLASSPATH=@JAVADIR@/ecj.jar${CLASSPATH:+:}$CLASSPATH \ + java org.eclipse.jdt.internal.compiler.batch.Main "$@" + diff --git a/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch new file mode 100644 index 0000000000..ab6262407a --- /dev/null +++ b/development/gcc5/fastjar-patches/1000-fastjar-0.97-segfault.patch @@ -0,0 +1,29 @@ +2009-01-14 Jakub Jelinek <jakub@redhat.com> + + * jartool.c (make_manifest): Initialize current_time before + calling unix2dostime on it. + +--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200 ++++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100 +@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m + int mod_time; /* file modification time */ + struct zipentry *ze; + ++ current_time = time(NULL); ++ if(current_time == (time_t)-1) ++ exit_on_error("time"); ++ + mod_time = unix2dostime(¤t_time); + + /* If we are creating a new manifest, create a META-INF directory entry */ +@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m + + memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/ + +- current_time = time(NULL); +- if(current_time == (time_t)-1) +- exit_on_error("time"); +- + PACK_UB2(file_header, LOC_EXTRA, 0); + PACK_UB2(file_header, LOC_COMP, 0); + PACK_UB2(file_header, LOC_FNLEN, nlen); diff --git a/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch new file mode 100644 index 0000000000..722351d334 --- /dev/null +++ b/development/gcc5/fastjar-patches/1001-fastjar-0.97-len1.patch @@ -0,0 +1,16 @@ +2009-12-21 Chris Ball <cjb@laptop.org> + + * jartool.c (add_file_to_jar): Test write return value against -1 + instead of 1. + +--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400 ++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500 +@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co + exit_on_error("write"); + + /* write the file name to the zip file */ +- if (1 == write(jfd, fname, file_name_length)) ++ if (-1 == write(jfd, fname, file_name_length)) + exit_on_error("write"); + + if(verbose){ diff --git a/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch b/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch new file mode 100644 index 0000000000..34a02a74f3 --- /dev/null +++ b/development/gcc5/fastjar-patches/1002-fastjar-0.97-filename0.patch @@ -0,0 +1,14 @@ +2010-03-01 Richard Guenther <rguenther@suse.de> + + * jartool.c (read_entries): Properly zero-terminate filename. + +--- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59 ++++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60 +@@ -790,6 +790,7 @@ int read_entries (int fd) + progname, jarfile); + return 1; + } ++ ze->filename[len] = '\0'; + len = UNPACK_UB4(header, CEN_EFLEN); + len += UNPACK_UB4(header, CEN_COMLEN); + if (lseek (fd, len, SEEK_CUR) == -1) diff --git a/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch b/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch new file mode 100644 index 0000000000..2c6e23c76c --- /dev/null +++ b/development/gcc5/fastjar-patches/1003-fastjar-CVE-2010-0831.patch @@ -0,0 +1,102 @@ +2010-06-10 Jakub Jelinek <jakub@redhat.com> + Dan Rosenberg <dan.j.rosenberg@gmail.com> + + * jartool.c (extract_jar): Fix up checks for traversal to parent + directories, disallow absolute paths, make the code slightly more + efficient. + +--- fastjar-0.97/jartool.c.jj 2009-09-07 00:10:47.000000000 +0200 ++++ fastjar-0.97/jartool.c 2010-06-08 20:00:29.000000000 +0200 +@@ -1730,7 +1730,17 @@ int extract_jar(int fd, const char **fil + struct stat sbuf; + int depth = 0; + +- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename)); ++ if(*filename == '/'){ ++ fprintf(stderr, "Absolute path names are not allowed.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ tmp_buff = malloc(strlen((const char *)filename)); ++ ++ if(tmp_buff == NULL) { ++ fprintf(stderr, "Out of memory.\n"); ++ exit(EXIT_FAILURE); ++ } + + for(;;){ + const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/'); +@@ -1738,25 +1748,28 @@ int extract_jar(int fd, const char **fil + if(idx == NULL) + break; + else if(idx == start){ ++ tmp_buff[idx - filename] = '/'; + start++; + continue; + } +- start = idx + 1; + +- strncpy(tmp_buff, (const char *)filename, (idx - filename)); +- tmp_buff[(idx - filename)] = '\0'; ++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start)); ++ tmp_buff[idx - filename] = '\0'; + + #ifdef DEBUG + printf("checking the existance of %s\n", tmp_buff); + #endif +- if(strcmp(tmp_buff, "..") == 0){ ++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){ + --depth; + if (depth < 0){ + fprintf(stderr, "Traversal to parent directories during unpacking!\n"); + exit(EXIT_FAILURE); + } +- } else if (strcmp(tmp_buff, ".") != 0) ++ } else if (idx - start != 1 || *start != '.') + ++depth; ++ ++ start = idx + 1; ++ + if(stat(tmp_buff, &sbuf) < 0){ + if(errno != ENOENT) + exit_on_error("stat"); +@@ -1765,6 +1778,7 @@ int extract_jar(int fd, const char **fil + #ifdef DEBUG + printf("Directory exists\n"); + #endif ++ tmp_buff[idx - filename] = '/'; + continue; + }else { + fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n", +@@ -1781,10 +1795,11 @@ int extract_jar(int fd, const char **fil + if(verbose && handle) + printf("%10s: %s/\n", "created", tmp_buff); + ++ tmp_buff[idx - filename] = '/'; + } + + /* only a directory */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + dir = TRUE; + + #ifdef DEBUG +@@ -1792,7 +1807,7 @@ int extract_jar(int fd, const char **fil + #endif + + /* If the entry was just a directory, don't write to file, etc */ +- if(strlen((const char *)start) == 0) ++ if(*start == '\0') + f_fd = -1; + + free(tmp_buff); +@@ -1876,7 +1891,8 @@ int extract_jar(int fd, const char **fil + exit(EXIT_FAILURE); + } + +- close(f_fd); ++ if (f_fd != -1) ++ close(f_fd); + + if(verbose && dir == FALSE && handle) + printf("%10s: %s\n", diff --git a/development/gcc5/fastjar-patches/1004-fastjar-man.patch b/development/gcc5/fastjar-patches/1004-fastjar-man.patch new file mode 100644 index 0000000000..34bf704dbb --- /dev/null +++ b/development/gcc5/fastjar-patches/1004-fastjar-man.patch @@ -0,0 +1,27 @@ +2010-03-24 Jan Kratochvil <jan.kratochvil@redhat.com> + + * Makefile.am (POD2MAN): Provide --date from ChangeLog. + * Makefile.in: Regenerate. + +--- fastjar-0.97/Makefile.am.jj 2008-10-16 04:24:55.000000000 -0400 ++++ fastjar-0.97/Makefile.am 2010-06-21 09:29:41.021398000 -0400 +@@ -39,7 +39,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + .pod.1: + -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \ +--- fastjar-0.97/Makefile.in.jj 2008-10-16 04:15:16.000000000 -0400 ++++ fastjar-0.97/Makefile.in 2010-06-21 09:30:15.882810000 -0400 +@@ -515,7 +515,7 @@ EXTRA_DIST = \ + texi2pod.pl + + TEXI2POD = perl $(srcdir)/texi2pod.pl +-POD2MAN = pod2man --center="GNU" --release=@VERSION@ ++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog) + + #SPLINT_FLAGS=-I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H +posixlib +weak + SPLINT_FLAGS = -I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H -DPRIx32= -warnposix +weak diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild new file mode 100644 index 0000000000..7054b3184f --- /dev/null +++ b/development/gcc5/gcc5.SlackBuild @@ -0,0 +1,565 @@ +#!/bin/sh +# GCC package build script (written by volkerdi@slackware.com) +# +# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA +# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# Modified 2011 by Eric Hameleers <alien at slackware.com> for OpenJDK. +# Modified 2017, 2018 by Eric Hameleers <alien at slackware.com> for gcc5. + +# Some notes, Fri May 16 12:31:32 PDT 2003: +# +# Why i486 and not i386? Because the shared C++ libraries in gcc-3.2.x will +# require 486 opcodes even when a 386 target is used (so we already weren't +# compatible with the i386 for Slackware 9.0, didn't notice, and nobody +# complained :-). gcc-3.3 fixes this issue and allows you to build a 386 +# compiler, but the fix is done in a way that produces binaries that are not +# compatible with gcc-3.2.x compiled binaries. To retain compatibility with +# Slackware 9.0, we'll have to use i486 (or better) as the compiler target +# for gcc-3.3. +# +# It's time to say goodbye to i386 support in Slackware. I've surveyed 386 +# usage online, and the most common thing I see people say when someone asks +# about running Linux on a 386 is to "run Slackware", but then they also +# usually go on to say "be sure to get an OLD version, like 4.0, before glibc, +# because it'll be more efficient." Now, if that's the general advice, then +# I see no reason to continue 386 support in the latest Slackware (and indeed +# it's no longer easily possible). + +# Some more notes, Mon Aug 3 19:49:51 UTC 2015: +# +# Changing to -march=i586 for 32-bit x86 as several things (Mesa being one of +# them) no longer work if constrained to -march=i486. We're not going to use +# -march=i686 since the only additional opcode is CMOV, which is actually less +# efficient on modern CPUs running in 32-bit mode than the alternate i586 +# instructions. No need to throw i586 CPUs under the bus (yet). + +PRGNAM=gcc5 +VERSION=${VERSION:-5.5.0} +MAJVER=$(echo ${VERSION} |cut -d. -f1) +BUILD=${BUILD:-1} +TAG=${TAG:-SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; + esac + export ARCH +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=i386 +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=s390 +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + SLKLDFLAGS="-L/usr/lib64" + LIBDIRSUFFIX="64" + LIB_ARCH=amd64 +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=armv7hl +else + SLKCFLAGS="-O2" + SLKLDFLAGS="" + LIBDIRSUFFIX="" + LIB_ARCH=$ARCH +fi + +# What do we want to build +LANGS=${LANGS:-'c,c++,java'} + +echo "Building these compilers: $LANGS" + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + +if [ "$ARCH" = "x86_64" ]; then + if [ -f /usr/lib/libc.a ]; then + # If we find a 32bit C library on 64bit Slackware, assume multilib: + GCC_ARCHOPTS="--enable-multilib" + MULTILIB="YES" + else + GCC_ARCHOPTS="--disable-multilib" + MULTILIB="NO" + fi +else + GCC_ARCHOPTS="--with-arch=$ARCH" + MULTILIB="NO" +fi + +# Clear the build locations: +rm -fr $TMP/fastjar-* $TMP/gcc-$VERSION $TMP/gcc.build.lnx $TMP/gcc.build.log $TMP/package-$PRGNAM + +mkdir -p $PKG/usr/doc/gcc-$VERSION + +# Insert package description: +mkdir -p $PKG/install +if [ ${MULTILIB} = "YES" ]; then + SLDESC=" The compilers support multilib." +else + SLDESC="" +fi +cat $CWD/slack-desc.gcc5 | sed -e "s/@MULTILIB@/${SLDESC}/" \ + > $PKG/install/slack-desc + +# Unpack the gcc sources: +cd $TMP +tar xvf $CWD/gcc-$VERSION.tar.?z || exit 1 + +# Patches based inside the gcc directory go here: +#( cd gcc-$VERSION/gcc +# #cat $CWD/patches/gcc.66782.diff | patch -p0 --verbose || exit 1 +#) || exit 1 + +# Copy ecj.jar into the TLD of the source. Needed for java compiler. +# This can be retrieved from ftp://sourceware.org/pub/java +cp $CWD/ecj-4.9.jar gcc-$VERSION/ecj.jar + +# Use an antlr runtime to compile javadoc. +# The runtime can be obtained from: +#https://oss.sonatype.org/content/repositories/releases/org/antlr/antlr-runtime/ +ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) + +# install docs +( cd gcc-$VERSION + # Smite the fixincludes: + cat $CWD/patches/gcc-no_fixincludes.diff | patch -p1 --verbose --backup --suffix=.orig || exit 1 + + # Add retpoline support: + cat $CWD/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0005-x86-Add-mindirect-branch-doc.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0005-x86-Add-mindirect-branch.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0006-x86-Add-mfunction-return-doc.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0006-x86-Add-mfunction-return.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0007-x86-Add-mindirect-branch-register-doc.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0007-x86-Add-mindirect-branch-register.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0008-x86-Add-V-register-operand-modifier-doc.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0008-x86-Add-V-register-operand-modifier.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff | patch -p2 --verbose || exit 1 + cat $CWD/patches/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff | patch -p2 --verbose || exit 1 + + # Fix perms/owners + chown -R root:root . + find . -perm 777 -exec chmod 755 {} \; + find . -perm 775 -exec chmod 755 {} \; + find . -perm 754 -exec chmod 755 {} \; + find . -perm 664 -exec chmod 644 {} \; + mkdir -p $PKG/usr/doc/gcc-$VERSION + cp -a \ + COPYING* ChangeLog* FAQ INSTALL \ + LAST_UPDATED MAINTAINERS NEWS \ + README* *.html \ + $PKG/usr/doc/gcc-$VERSION + + # We will keep part of these, but they are really big... + if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/gcc-$VERSION) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog + fi + if [ -r NEWS ]; then + DOCSDIR=$(echo $PKG/usr/doc/gcc-$VERSION) + cat NEWS | head -n 1000 > $DOCSDIR/NEWS + touch -r NEWS $DOCSDIR/NEWS + fi + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/gcc + ( cd gcc + cp -a \ + ABOUT* COPYING* DATESTAMP DEV-PHASE LANG* ONEWS README* SERVICE \ + $PKG/usr/doc/gcc-$VERSION/gcc + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/gcc/java + ( cd java + cp -a \ + ChangeLog.tree-ssa \ + $PKG/usr/doc/gcc-${VERSION}/gcc/java + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog + fi + ) + + ) || exit 1 + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/libffi + ( cd libffi + cp -a \ + ChangeLog.libgcj ChangeLog.v1 \ + LICENSE* README* \ + $PKG/usr/doc/gcc-${VERSION}/libffi + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libffi/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libffi/ChangeLog + fi + ) + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/libjava + ( cd libjava + cp -a \ + COPYING* HACKING LIBGCJ_LICENSE \ + NEWS README* THANKS \ + $PKG/usr/doc/gcc-${VERSION}/libjava + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libjava/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libjava/ChangeLog + fi + ) + + if [ -d libmudflap ]; then + mkdir -p $PKG/usr/doc/gcc-${VERSION}/libmudflap + ( cd libmudflap + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog + fi + ) + fi + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/libgomp + ( cd libgomp + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libgomp/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libgomp/ChangeLog + fi + ) + + mkdir -p $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3 + ( cd libstdc++-v3 + cp -a \ + README* \ + doc/html/faq.html \ + $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3 + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog + touch -r ChangeLog $PKG/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog + fi + ) +) + +# Add fastjar to the gcc5 package: +( cd $TMP + FASTJARVER=$(echo $CWD/fastjar-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev) + echo + echo "Building fastjar-$FASTJARVER first" + echo + rm -rf fastjar-$FASTJARVER + tar xvf $CWD/fastjar-$FASTJARVER.tar.?z* || exit 1 + cd fastjar-$FASTJARVER || exit 1 + chown -R root:root . + find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + for patch in $CWD/fastjar-patches/* ; do + cat $patch | patch -p1 --verbose || exit 1 + done + LDFLAGS="$SLKLDFLAGS" \ + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --build=$TARGET + make || exit 1 + make install DESTDIR=$PKG || exit 1 + mkdir -p $PKG/usr/doc/fastjar-$FASTJARVER + cp -a \ + AUTHORS CHANGES COPYING* INSTALL NEWS README* TODO \ + $PKG/usr/doc/fastjar-$FASTJARVER + # If there's a ChangeLog, installing at least part of the recent history + # is useful, but don't let it get totally out of control: + if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/fastjar-$FASTJARVER) + cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog + touch -r ChangeLog $DOCSDIR/ChangeLog + fi + find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + # Compress and if needed symlink the man pages: + if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) + fi + # Compress info files, if any: + if [ -d $PKG/usr/info ]; then + ( cd $PKG/usr/info + rm -f dir + gzip -9 * + ) + fi + echo +) || exit 1 + +# build gcc +( mkdir gcc.build.lnx; + cd gcc.build.lnx; + + # I think it's incorrect to include this option (as it'll end up set + # to i586 on x86 platforms), and we want to tune the binary structure + # for i686, as that's where almost all of the optimization speedups + # are to be found. + # Correct me if my take on this is wrong. + # --with-cpu=$ARCH + + # NOTE: For Slackware 15.0, look into removing --with-default-libstdcxx-abi=gcc4-compatible, + # which will then require rebuilding all C++ libraries. That is, if there's any benefit. + + LDFLAGS="$SLKLDFLAGS" \ + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ../gcc-$VERSION/configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --enable-shared \ + --enable-bootstrap \ + --enable-languages=${LANGS} \ + --enable-threads=posix \ + --enable-checking=release \ + --enable-objc-gc \ + --with-system-zlib \ + --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \ + --enable-libstdcxx-dual-abi \ + --with-default-libstdcxx-abi=gcc4-compatible \ + --disable-libunwind-exceptions \ + --enable-__cxa_atexit \ + --enable-libssp \ + --enable-lto \ + --disable-install-libiberty \ + --with-gnu-ld \ + --verbose \ + --enable-java-home \ + --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \ + --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \ + --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \ + --with-arch-directory=$LIB_ARCH \ + --with-antlr-jar=$ANTLJAR \ + --program-suffix=-${MAJVER} \ + --enable-version-specific-runtime-libs \ + $GCC_ARCHOPTS \ + --target=${TARGET} \ + --build=${TARGET} \ + --host=${TARGET} || exit 1 + #--enable-java-awt=gtk \ + #--disable-gtktest \ + + # Start the build: + + # Include all debugging info (for now): + make bootstrap + make info + make install DESTDIR=$PKG + +# KLUDGE ALERT +# These *gdb.py files are causing ldconfig to complain, so they are going +# to be REMOVED for now... at some point, they might be moved somewhere +# else, in which case things should Just Work(tm). Keep an eye on it. +rm -f $PKG/usr/lib*/*gdb.py + +# Be sure the "specs" file is installed. +if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs ]; then + cat stage1-gcc/specs > $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs +fi + +if [ ${MULTILIB} = "NO" ]; then + # Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory: + (only needed if gcc was compiled with disable-multilib) + if [ "$ARCH" = "x86_64" ]; then + sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \ + $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs + fi +fi + +make -i install-info DESTDIR=$PKG + +# Move potentially conflicting stuff to version specific subdirectory: +if [ -d $PKG/usr/lib${LIBDIRSUFFIX} ]; then + mv $PKG/usr/lib${LIBDIRSUFFIX}/lib* $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/ +fi +if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/lib${LIBDIRSUFFIX}/ ]; then + mv $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/lib${LIBDIRSUFFIX}/lib* $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/ +fi +chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/libgcc_s.so.1 +if [ ${MULTILIB} = "YES" ]; then + if [ -d $PKG/usr/lib ]; then + mv $PKG/usr/lib/lib* $PKG/usr/lib/gcc/${TARGET}/${VERSION}/ + fi + if [ -d $PKG/usr/lib/gcc/${TARGET}/lib/ ]; then + mv $PKG/usr/lib/gcc/${TARGET}/lib/lib* $PKG/usr/lib/gcc/${TARGET}/${VERSION}/ + fi + chmod 755 $PKG/usr/lib/gcc/${TARGET}/${VERSION}/libgcc_s.so.1 +fi + +# The (huge) static GNU java libraries are not packaged. In nearly all +# cases one or more dependencies will not be available as static anyway. +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libgcj.a +rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a +rm -f $PKG/usr/lib/libgcj.a +rm -f $PKG/usr/lib/libgcj-tools.a + +# Fix stuff up: +( cd $PKG/usr/info + rm dir + for eachinfo in *.info ; do + mv $eachinfo $(basename $eachinfo .info)-${MAJVER}.info + done + gzip -9 * +) + +( cd $PKG/usr/bin + ln -sf g++-${MAJVER} c++-${MAJVER} + ln -sf gcc-${MAJVER} cc-${MAJVER} + # Improved versions of the Slackware c?9 scripts, + # it is safe to overwrite the originals: + cat $CWD/c89.sh > c89 + cat $CWD/c99.sh > c99 + chmod 755 c89 c99 +) + +( cd $PKG/usr/man + rm -r man7 # Part of the system gcc package + gzip -9 */* + cd man1 + ln -sf g++-${MAJVER}.1.gz c++-${MAJVER}.1.gz + ln -sf gcc-${MAJVER}.1.gz cc-${MAJVER}.1.gz +) + +# keep a log +) 2>&1 | tee $TMP/gcc.build.log + +# Add profile scripts (non-executable by default) to make it easier +# to set the environment for compiling with gcc5: +mkdir -p $PKG/etc/profile.d +cat $CWD/profile.d/gcc5.sh > $PKG/etc/profile.d/gcc5.sh +cat $CWD/profile.d/gcc5.csh > $PKG/etc/profile.d/gcc5.csh +chmod 644 $PKG/etc/profile.d/* + +# The ecj wrapper script: +cat $CWD/ecj.sh | sed -e "s,@JAVADIR@,/usr/share/java," > $PKG/usr/bin/ecj +chmod 755 $PKG/usr/bin/ecj +# Some compatibility links. +for JAVAPROG in gcj gcjh gcj-dbtool gjar gjarsigner gjavah ; do + ln -s ${JAVAPROG}-${MAJVER} $PKG/usr/bin/${JAVAPROG} +done +( cd $PKG + for JAVALIB in usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/libgcj* ; do + ln -s /${JAVALIB} $PKG/usr/lib${LIBDIRSUFFIX}/ + done +) +# And add the missing javac symlink: +ln -s ../../../bin/ecj $PKG/usr/lib$LIBDIRSUFFIX/jvm/bin/javac +# Don't package libffi stuff anymore. GCC will link the internal version +# statically, and we'll need a newer one elsewhere. +find . -name "ffi*.h" | xargs rm -f +find . -name "libffi*" | xargs rm -f +rm -f usr/man/man3/ffi* +rm -f usr/info/libffi* +# Install a proper pkgconfig file for libgcj: +rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/pkgconfig/libgcj*pc +rm $PKG/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/32/pkgconfig/libgcj*pc +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig +cat $CWD/libgcj-5.pc \ + | sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX}," \ + | sed -e "s,@TARGET@,${TARGET}," \ + | sed -e "s,@VERSION@,${VERSION}," \ + > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/libgcj-5.pc + +# Filter all .la files (thanks much to Mark Post for the sed script): +( cd $PKG + for file in $(find . -type f -name "*.la") ; do + cat $file | sed -e 's%-L'${TMP}'[[:graph:]]* % %g' > $TMP/tmp-la-file + cat $TMP/tmp-la-file > $file + done + rm $TMP/tmp-la-file +) + +## Strip bloated binaries and libraries: +( cd $PKG + find . -name "lib*so*" -exec strip --strip-unneeded "{}" \; + find . -name "lib*a" -exec strip -g "{}" \; + strip --strip-unneeded usr/bin/* 2> /dev/null + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +# Remove localizations overlapping with Slackware's gcc +rm -rf $PKG/usr/share/locale + +( cd $PKG + if [ ${MULTILIB} = "YES" ]; then + /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}_multilib-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} + else + /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} + fi +) diff --git a/development/gcc5/gcc5.info b/development/gcc5/gcc5.info new file mode 100644 index 0000000000..cb7d761a98 --- /dev/null +++ b/development/gcc5/gcc5.info @@ -0,0 +1,17 @@ +PRGNAM="gcc5" +VERSION="5.5.0" +HOMEPAGE="https://gcc.gnu.org/" +DOWNLOAD="https://ftp.gnu.org/gnu/gcc/gcc-5.5.0/gcc-5.5.0.tar.xz \ + http://www.antlr3.org/download/antlr-runtime-3.4.jar \ + https://sourceware.org/pub/java/ecj-4.9.jar \ + https://download.savannah.gnu.org/releases/fastjar/fastjar-0.97.tar.gz" +MD5SUM="0f70424213b4a1113c04ba66ddda0c1f \ + 0e0318be407e51fdf7ba6777eabfdf73 \ + 7339f199ba11c941890031fd9981d7be \ + 2659f09c2e43ef8b7d4406321753f1b2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Eric Hameleers" +EMAIL="alien@slackware.com" + diff --git a/development/gcc5/libgcj-5.pc b/development/gcc5/libgcj-5.pc new file mode 100644 index 0000000000..e2eb293209 --- /dev/null +++ b/development/gcc5/libgcj-5.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib@LIBDIRSUFFIX@/gcc/@TARGET@/@VERSION@ +includedir=$(libdir)/include/ + +Name: libgcj +Description: libgcj +Version: @VERSION@ +Libs: -L${libdir} -lgcj +Cflags: -I${includedir} diff --git a/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff b/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff new file mode 100644 index 0000000000..413d75697f --- /dev/null +++ b/development/gcc5/patches/0001-i386-Move-struct-ix86_frame-to-machine_function.diff @@ -0,0 +1,239 @@ +From 11a3b9034935080b9996caf07fca6353309006f1 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 15 Jan 2018 11:27:24 +0000 +Subject: [PATCH 1/9] i386: Move struct ix86_frame to machine_function + +Make ix86_frame available to i386 code generation. This is needed to +backport the patch set of -mindirect-branch= to mitigate variant #2 of +the speculative execution vulnerabilities on x86 processors identified +by CVE-2017-5715, aka Spectre. + + Backport from mainline + * config/i386/i386.c (ix86_frame): Moved to ... + * config/i386/i386.h (ix86_frame): Here. + (machine_function): Add frame. + * config/i386/i386.c (ix86_compute_frame_layout): Repace the + frame argument with &cfun->machine->frame. + (ix86_can_use_return_insn_p): Don't pass &frame to + ix86_compute_frame_layout. Copy frame from cfun->machine->frame. + (ix86_can_eliminate): Likewise. + (ix86_expand_prologue): Likewise. + (ix86_expand_epilogue): Likewise. + (ix86_expand_split_stack_prologue): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256691 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + src/gcc/config/i386/i386.c | 68 ++++++++------------------------------------- + src/gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++- + 2 files changed, 65 insertions(+), 56 deletions(-) + +Index: b/src/gcc/config/i386/i386.c +=================================================================== +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -2306,53 +2306,6 @@ struct GTY(()) stack_local_entry { + struct stack_local_entry *next; + }; + +-/* Structure describing stack frame layout. +- Stack grows downward: +- +- [arguments] +- <- ARG_POINTER +- saved pc +- +- saved static chain if ix86_static_chain_on_stack +- +- saved frame pointer if frame_pointer_needed +- <- HARD_FRAME_POINTER +- [saved regs] +- <- regs_save_offset +- [padding0] +- +- [saved SSE regs] +- <- sse_regs_save_offset +- [padding1] | +- | <- FRAME_POINTER +- [va_arg registers] | +- | +- [frame] | +- | +- [padding2] | = to_allocate +- <- STACK_POINTER +- */ +-struct ix86_frame +-{ +- int nsseregs; +- int nregs; +- int va_arg_size; +- int red_zone_size; +- int outgoing_arguments_size; +- +- /* The offsets relative to ARG_POINTER. */ +- HOST_WIDE_INT frame_pointer_offset; +- HOST_WIDE_INT hard_frame_pointer_offset; +- HOST_WIDE_INT stack_pointer_offset; +- HOST_WIDE_INT hfp_save_offset; +- HOST_WIDE_INT reg_save_offset; +- HOST_WIDE_INT sse_reg_save_offset; +- +- /* When save_regs_using_mov is set, emit prologue using +- move instead of push instructions. */ +- bool save_regs_using_mov; +-}; +- + /* Which cpu are we scheduling for. */ + enum attr_cpu ix86_schedule; + +@@ -2443,7 +2396,7 @@ static unsigned int ix86_function_arg_bo + const_tree); + static rtx ix86_static_chain (const_tree, bool); + static int ix86_function_regparm (const_tree, const_tree); +-static void ix86_compute_frame_layout (struct ix86_frame *); ++static void ix86_compute_frame_layout (void); + static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode, + rtx, rtx, int); + static void ix86_add_new_builtins (HOST_WIDE_INT); +@@ -9664,7 +9617,8 @@ ix86_can_use_return_insn_p (void) + if (crtl->args.pops_args && crtl->args.size >= 32768) + return 0; + +- ix86_compute_frame_layout (&frame); ++ ix86_compute_frame_layout (); ++ frame = cfun->machine->frame; + return (frame.stack_pointer_offset == UNITS_PER_WORD + && (frame.nregs + frame.nsseregs) == 0); + } +@@ -10073,8 +10027,8 @@ ix86_can_eliminate (const int from, cons + HOST_WIDE_INT + ix86_initial_elimination_offset (int from, int to) + { +- struct ix86_frame frame; +- ix86_compute_frame_layout (&frame); ++ ix86_compute_frame_layout (); ++ struct ix86_frame frame = cfun->machine->frame; + + if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) + return frame.hard_frame_pointer_offset; +@@ -10113,8 +10067,9 @@ ix86_builtin_setjmp_frame_value (void) + /* Fill structure ix86_frame about frame of currently computed function. */ + + static void +-ix86_compute_frame_layout (struct ix86_frame *frame) ++ix86_compute_frame_layout (void) + { ++ struct ix86_frame *frame = &cfun->machine->frame; + unsigned HOST_WIDE_INT stack_alignment_needed; + HOST_WIDE_INT offset; + unsigned HOST_WIDE_INT preferred_alignment; +@@ -11417,7 +11372,8 @@ ix86_expand_prologue (void) + m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET; + m->fs.sp_valid = true; + +- ix86_compute_frame_layout (&frame); ++ ix86_compute_frame_layout (); ++ frame = m->frame; + + if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl)) + { +@@ -12083,7 +12039,8 @@ ix86_expand_epilogue (int style) + bool using_drap; + + ix86_finalize_stack_realign_flags (); +- ix86_compute_frame_layout (&frame); ++ ix86_compute_frame_layout (); ++ frame = m->frame; + + m->fs.sp_valid = (!frame_pointer_needed + || (crtl->sp_is_unchanging +@@ -12546,7 +12503,8 @@ ix86_expand_split_stack_prologue (void) + gcc_assert (flag_split_stack && reload_completed); + + ix86_finalize_stack_realign_flags (); +- ix86_compute_frame_layout (&frame); ++ ix86_compute_frame_layout (); ++ frame = cfun->machine->frame; + allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET; + + /* This is the label we will branch to if we have enough stack +Index: b/src/gcc/config/i386/i386.h +=================================================================== +--- a/src/gcc/config/i386/i386.h ++++ b/src/gcc/config/i386/i386.h +@@ -2409,9 +2409,56 @@ enum avx_u128_state + + #define FASTCALL_PREFIX '@' + ++#ifndef USED_FOR_TARGET ++/* Structure describing stack frame layout. ++ Stack grows downward: ++ ++ [arguments] ++ <- ARG_POINTER ++ saved pc ++ ++ saved static chain if ix86_static_chain_on_stack ++ ++ saved frame pointer if frame_pointer_needed ++ <- HARD_FRAME_POINTER ++ [saved regs] ++ <- regs_save_offset ++ [padding0] ++ ++ [saved SSE regs] ++ <- sse_regs_save_offset ++ [padding1] | ++ | <- FRAME_POINTER ++ [va_arg registers] | ++ | ++ [frame] | ++ | ++ [padding2] | = to_allocate ++ <- STACK_POINTER ++ */ ++struct GTY(()) ix86_frame ++{ ++ int nsseregs; ++ int nregs; ++ int va_arg_size; ++ int red_zone_size; ++ int outgoing_arguments_size; ++ ++ /* The offsets relative to ARG_POINTER. */ ++ HOST_WIDE_INT frame_pointer_offset; ++ HOST_WIDE_INT hard_frame_pointer_offset; ++ HOST_WIDE_INT stack_pointer_offset; ++ HOST_WIDE_INT hfp_save_offset; ++ HOST_WIDE_INT reg_save_offset; ++ HOST_WIDE_INT sse_reg_save_offset; ++ ++ /* When save_regs_using_mov is set, emit prologue using ++ move instead of push instructions. */ ++ bool save_regs_using_mov; ++}; ++ + /* Machine specific frame tracking during prologue/epilogue generation. */ + +-#ifndef USED_FOR_TARGET + struct GTY(()) machine_frame_state + { + /* This pair tracks the currently active CFA as reg+offset. When reg +@@ -2457,6 +2504,9 @@ struct GTY(()) machine_function { + int varargs_fpr_size; + int optimize_mode_switching[MAX_386_ENTITIES]; + ++ /* Cached initial frame layout for the current function. */ ++ struct ix86_frame frame; ++ + /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE + has been computed for. */ + int use_fast_prologue_epilogue_nregs; +@@ -2524,6 +2574,7 @@ struct GTY(()) machine_function { + #define ix86_current_function_calls_tls_descriptor \ + (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG)) + #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack) ++#define ix86_red_zone_size (cfun->machine->frame.red_zone_size) + + /* Control behavior of x86_file_start. */ + #define X86_FILE_START_VERSION_DIRECTIVE false diff --git a/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff b/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff new file mode 100644 index 0000000000..7b928df765 --- /dev/null +++ b/development/gcc5/patches/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff @@ -0,0 +1,72 @@ +From 18202ba32cb8de22fc43a5839235a751d0f5c4d9 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 15 Jan 2018 11:28:44 +0000 +Subject: [PATCH 2/9] i386: Use reference of struct ix86_frame to avoid copy + +When there is no need to make a copy of ix86_frame, we can use reference +of struct ix86_frame to avoid copy. + + Backport from mainline + * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference + of struct ix86_frame. + (ix86_initial_elimination_offset): Likewise. + (ix86_expand_split_stack_prologue): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256692 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/config/i386/i386.c | 9 +++------ + gcc/testsuite/ChangeLog | 8 ++++++++ + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 8133372..397ef7c 100644 +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -11843,8 +11843,6 @@ symbolic_reference_mentioned_p (rtx op) + bool + ix86_can_use_return_insn_p (void) + { +- struct ix86_frame frame; +- + if (! reload_completed || frame_pointer_needed) + return 0; + +@@ -11857,7 +11855,7 @@ ix86_can_use_return_insn_p (void) + return 0; + + ix86_compute_frame_layout (); +- frame = cfun->machine->frame; ++ struct ix86_frame &frame = cfun->machine->frame; + return (frame.stack_pointer_offset == UNITS_PER_WORD + && (frame.nregs + frame.nsseregs) == 0); + } +@@ -12344,7 +12342,7 @@ HOST_WIDE_INT + ix86_initial_elimination_offset (int from, int to) + { + ix86_compute_frame_layout (); +- struct ix86_frame frame = cfun->machine->frame; ++ struct ix86_frame &frame = cfun->machine->frame; + + if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) + return frame.hard_frame_pointer_offset; +@@ -14860,7 +14858,6 @@ static GTY(()) rtx split_stack_fn_large; + void + ix86_expand_split_stack_prologue (void) + { +- struct ix86_frame frame; + HOST_WIDE_INT allocate; + unsigned HOST_WIDE_INT args_size; + rtx_code_label *label; +@@ -14873,7 +14870,7 @@ ix86_expand_split_stack_prologue (void) + + ix86_finalize_stack_realign_flags (); + ix86_compute_frame_layout (); +- frame = cfun->machine->frame; ++ struct ix86_frame &frame = cfun->machine->frame; + allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET; + + /* This is the label we will branch to if we have enough stack +-- +2.7.4 + diff --git a/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff b/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff new file mode 100644 index 0000000000..f6f30d1d22 --- /dev/null +++ b/development/gcc5/patches/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff @@ -0,0 +1,59 @@ +From 839ca2d69157ef03c8df0ab912dacdb991738694 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 15 Jan 2018 11:33:42 +0000 +Subject: [PATCH 3/9] i386: More use reference of struct ix86_frame to avoid copy + +When there is no need to make a copy of ix86_frame, we can use reference +of struct ix86_frame to avoid copy. + + Backport from mainline + * config/i386/i386.c (ix86_expand_prologue): Use reference of + struct ix86_frame. + (ix86_expand_epilogue): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256695 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 7 +++++++ + gcc/config/i386/i386.c | 6 ++---- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index 397ef7c..986e6d7 100644 +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -13667,7 +13667,6 @@ ix86_expand_prologue (void) + { + struct machine_function *m = cfun->machine; + rtx insn, t; +- struct ix86_frame frame; + HOST_WIDE_INT allocate; + bool int_registers_saved; + bool sse_registers_saved; +@@ -13691,7 +13690,7 @@ ix86_expand_prologue (void) + m->fs.sp_valid = true; + + ix86_compute_frame_layout (); +- frame = m->frame; ++ struct ix86_frame &frame = cfun->machine->frame; + + if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl)) + { +@@ -14354,13 +14353,12 @@ ix86_expand_epilogue (int style) + { + struct machine_function *m = cfun->machine; + struct machine_frame_state frame_state_save = m->fs; +- struct ix86_frame frame; + bool restore_regs_via_mov; + bool using_drap; + + ix86_finalize_stack_realign_flags (); + ix86_compute_frame_layout (); +- frame = m->frame; ++ struct ix86_frame &frame = cfun->machine->frame; + + m->fs.sp_valid = (!frame_pointer_needed + || (crtl->sp_is_unchanging +-- +2.7.4 + diff --git a/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff b/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff new file mode 100644 index 0000000000..7678444cd7 --- /dev/null +++ b/development/gcc5/patches/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff @@ -0,0 +1,63 @@ +From c25b81ba01fa9ac0c1baa3aabd64190c47928f03 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Tue, 16 Jan 2018 12:49:29 +0000 +Subject: [PATCH 4/9] i386: Don't use reference of struct ix86_frame + +Use reference of struct ix86_frame in ix86_expand_prologue and +ix86_expand_epilogue caused: + +raised STORAGE_ERROR : stack overflow or erroneous memory access +make[5]: *** [/export/gnu/import/git/sources/gcc/gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 1 + +on trunk when bootstrapping GCC with ada on x86-64. + + * config/i386/i386.c (ix86_expand_prologue): Don't use reference + of struct ix86_frame. + (ix86_expand_epilogue): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256742 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 10 ++++++++++ + gcc/config/i386/i386.c | 6 ++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c +index e758387..ba2abc5 100644 +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -14061,6 +14061,7 @@ ix86_expand_prologue (void) + { + struct machine_function *m = cfun->machine; + rtx insn, t; ++ struct ix86_frame frame; + HOST_WIDE_INT allocate; + bool int_registers_saved; + bool sse_registers_saved; +@@ -14084,7 +14085,7 @@ ix86_expand_prologue (void) + m->fs.sp_valid = true; + + ix86_compute_frame_layout (); +- struct ix86_frame &frame = cfun->machine->frame; ++ frame = m->frame; + + if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl)) + { +@@ -14747,12 +14748,13 @@ ix86_expand_epilogue (int style) + { + struct machine_function *m = cfun->machine; + struct machine_frame_state frame_state_save = m->fs; ++ struct ix86_frame frame; + bool restore_regs_via_mov; + bool using_drap; + + ix86_finalize_stack_realign_flags (); + ix86_compute_frame_layout (); +- struct ix86_frame &frame = cfun->machine->frame; ++ frame = m->frame; + + m->fs.sp_valid = (!frame_pointer_needed + || (crtl->sp_is_unchanging +-- +2.7.4 + diff --git a/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff b/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff new file mode 100644 index 0000000000..bcaf572b1e --- /dev/null +++ b/development/gcc5/patches/0005-x86-Add-mindirect-branch-doc.diff @@ -0,0 +1,279 @@ +From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Tue, 16 Jan 2018 10:59:42 +0000 +Subject: [PATCH 5/9] x86: Add -mindirect-branch= (documentation) + +Add -mindirect-branch= option to convert indirect call and jump to call +and return thunks. The default is 'keep', which keeps indirect call and +jump unmodified. 'thunk' converts indirect call and jump to call and +return thunk. 'thunk-inline' converts indirect call and jump to inlined +call and return thunk. 'thunk-extern' converts indirect call and jump to +external call and return thunk provided in a separate object file. You +can control this behavior for a specific function by using the function +attribute indirect_branch. + +2 kinds of thunks are geneated. Memory thunk where the function address +is at the top of the stack: + +__x86_indirect_thunk: + call L2 +L1: + pause + lfence + jmp L1 +L2: + lea 8(%rsp), %rsp|lea 4(%esp), %esp + ret + +Indirect jmp via memory, "jmp mem", is converted to + + push memory + jmp __x86_indirect_thunk + +Indirect call via memory, "call mem", is converted to + + jmp L2 +L1: + push [mem] + jmp __x86_indirect_thunk +L2: + call L1 + +Register thunk where the function address is in a register, reg: + +__x86_indirect_thunk_reg: + call L2 +L1: + pause + lfence + jmp L1 +L2: + movq %reg, (%rsp)|movl %reg, (%esp) + ret + +where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di, +(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15. + +Indirect jmp via register, "jmp reg", is converted to + + jmp __x86_indirect_thunk_reg + +Indirect call via register, "call reg", is converted to + + call __x86_indirect_thunk_reg + +gcc/ + + Backport from mainline + * config/i386/i386-opts.h (indirect_branch): New. + * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise. + * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone + with local indirect jump when converting indirect call and jump. + (ix86_set_indirect_branch_type): New. + (ix86_set_current_function): Call ix86_set_indirect_branch_type. + (indirectlabelno): New. + (indirect_thunk_needed): Likewise. + (indirect_thunk_bnd_needed): Likewise. + (indirect_thunks_used): Likewise. + (indirect_thunks_bnd_used): Likewise. + (INDIRECT_LABEL): Likewise. + (indirect_thunk_name): Likewise. + (output_indirect_thunk): Likewise. + (output_indirect_thunk_function): Likewise. + (ix86_output_indirect_branch_via_reg): Likewise. + (ix86_output_indirect_branch_via_push): Likewise. + (ix86_output_indirect_branch): Likewise. + (ix86_output_indirect_jmp): Likewise. + (ix86_code_end): Call output_indirect_thunk_function if needed. + (ix86_output_call_insn): Call ix86_output_indirect_branch if + needed. + (ix86_handle_fndecl_attribute): Handle indirect_branch. + (ix86_attribute_table): Add indirect_branch. + * config/i386/i386.h (machine_function): Add indirect_branch_type + and has_local_indirect_jump. + * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump + to true. + (tablejump): Likewise. + (*indirect_jump): Use ix86_output_indirect_jmp. + (*tablejump_1): Likewise. + (simple_return_indirect_internal): Likewise. + * config/i386/i386.opt (mindirect-branch=): New option. + (indirect_branch): New. + (keep): Likewise. + (thunk): Likewise. + (thunk-inline): Likewise. + (thunk-extern): Likewise. + * doc/extend.texi: Document indirect_branch function attribute. + * doc/invoke.texi: Document -mindirect-branch= option. + +gcc/testsuite/ + + Backport from mainline + * gcc.target/i386/indirect-thunk-1.c: New test. + * gcc.target/i386/indirect-thunk-2.c: Likewise. + * gcc.target/i386/indirect-thunk-3.c: Likewise. + * gcc.target/i386/indirect-thunk-4.c: Likewise. + * gcc.target/i386/indirect-thunk-5.c: Likewise. + * gcc.target/i386/indirect-thunk-6.c: Likewise. + * gcc.target/i386/indirect-thunk-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-5.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-6.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-5.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-6.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4 + +[UBUNTU NOTES: Updated for gcc-5.4 to include defines for + FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in + https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269. + Dropped indirect-thunk-5.c, indirect-thunk-6.c, + indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c, + indirect-thunk-extern-5.c, indirect-thunk-extern-6.c, + indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due + to gcc 5.4 and earlier not supporting the -fno-plt option. + --sbeattie, tyhicks] +--- + src/gcc/config/i386/i386-opts.h | 13 + src/gcc/config/i386/i386-protos.h | 1 + src/gcc/config/i386/i386.c | 621 +++++++++++- + src/gcc/config/i386/i386.h | 12 + src/gcc/config/i386/i386.md | 26 + src/gcc/config/i386/i386.opt | 20 + src/gcc/doc/extend.texi | 10 + src/gcc/doc/invoke.texi | 14 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44 + 33 files changed, 1334 insertions(+), 15 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c + +Index: b/src/gcc/doc/extend.texi +=================================================================== +--- a/src/gcc/doc/extend.texi ++++ b/src/gcc/doc/extend.texi +@@ -4119,6 +4119,16 @@ Specify which floating-point unit to use + @code{target("fpmath=sse,387")} option must be specified as + @code{target("fpmath=sse+387")} because the comma would separate + different options. ++ ++@item indirect_branch("@var{choice}") ++@cindex @code{indirect_branch} function attribute, x86 ++On x86 targets, the @code{indirect_branch} attribute causes the compiler ++to convert indirect call and jump with @var{choice}. @samp{keep} ++keeps indirect call and jump unmodified. @samp{thunk} converts indirect ++call and jump to call and return thunk. @samp{thunk-inline} converts ++indirect call and jump to inlined call and return thunk. ++@samp{thunk-extern} converts indirect call and jump to external call ++and return thunk provided in a separate object file. + @end table + + On the PowerPC, the following options are allowed: +Index: b/src/gcc/doc/invoke.texi +=================================================================== +--- a/src/gcc/doc/invoke.texi ++++ b/src/gcc/doc/invoke.texi +@@ -1090,7 +1090,8 @@ See RS/6000 and PowerPC Options. + -m32 -m64 -mx32 -m16 -mlarge-data-threshold=@var{num} @gol + -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol + -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol +--malign-data=@var{type} -mstack-protector-guard=@var{guard}} ++-malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol ++-mindirect-branch=@var{choice}} + + @emph{x86 Windows Options} + @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol +@@ -24017,6 +24018,17 @@ The default value of this option is enab + of the option is @option{-fno-sync-libcalls}. This option is used in + the implementation of the @file{libatomic} runtime library. + ++@item -mindirect-branch=@var{choice} ++@opindex -mindirect-branch ++Convert indirect call and jump with @var{choice}. The default is ++@samp{keep}, which keeps indirect call and jump unmodified. ++@samp{thunk} converts indirect call and jump to call and return thunk. ++@samp{thunk-inline} converts indirect call and jump to inlined call ++and return thunk. @samp{thunk-extern} converts indirect call and jump ++to external call and return thunk provided in a separate object file. ++You can control this behavior for a specific function by using the ++function attribute @code{indirect_branch}. @xref{Function Attributes}. ++ + @end table + + @c man end diff --git a/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff b/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff new file mode 100644 index 0000000000..db9690ccc1 --- /dev/null +++ b/development/gcc5/patches/0005-x86-Add-mindirect-branch.diff @@ -0,0 +1,1870 @@ +From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Tue, 16 Jan 2018 10:59:42 +0000 +Subject: [PATCH 5/9] x86: Add -mindirect-branch= + +Add -mindirect-branch= option to convert indirect call and jump to call +and return thunks. The default is 'keep', which keeps indirect call and +jump unmodified. 'thunk' converts indirect call and jump to call and +return thunk. 'thunk-inline' converts indirect call and jump to inlined +call and return thunk. 'thunk-extern' converts indirect call and jump to +external call and return thunk provided in a separate object file. You +can control this behavior for a specific function by using the function +attribute indirect_branch. + +2 kinds of thunks are geneated. Memory thunk where the function address +is at the top of the stack: + +__x86_indirect_thunk: + call L2 +L1: + pause + lfence + jmp L1 +L2: + lea 8(%rsp), %rsp|lea 4(%esp), %esp + ret + +Indirect jmp via memory, "jmp mem", is converted to + + push memory + jmp __x86_indirect_thunk + +Indirect call via memory, "call mem", is converted to + + jmp L2 +L1: + push [mem] + jmp __x86_indirect_thunk +L2: + call L1 + +Register thunk where the function address is in a register, reg: + +__x86_indirect_thunk_reg: + call L2 +L1: + pause + lfence + jmp L1 +L2: + movq %reg, (%rsp)|movl %reg, (%esp) + ret + +where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di, +(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15. + +Indirect jmp via register, "jmp reg", is converted to + + jmp __x86_indirect_thunk_reg + +Indirect call via register, "call reg", is converted to + + call __x86_indirect_thunk_reg + +gcc/ + + Backport from mainline + * config/i386/i386-opts.h (indirect_branch): New. + * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise. + * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone + with local indirect jump when converting indirect call and jump. + (ix86_set_indirect_branch_type): New. + (ix86_set_current_function): Call ix86_set_indirect_branch_type. + (indirectlabelno): New. + (indirect_thunk_needed): Likewise. + (indirect_thunk_bnd_needed): Likewise. + (indirect_thunks_used): Likewise. + (indirect_thunks_bnd_used): Likewise. + (INDIRECT_LABEL): Likewise. + (indirect_thunk_name): Likewise. + (output_indirect_thunk): Likewise. + (output_indirect_thunk_function): Likewise. + (ix86_output_indirect_branch_via_reg): Likewise. + (ix86_output_indirect_branch_via_push): Likewise. + (ix86_output_indirect_branch): Likewise. + (ix86_output_indirect_jmp): Likewise. + (ix86_code_end): Call output_indirect_thunk_function if needed. + (ix86_output_call_insn): Call ix86_output_indirect_branch if + needed. + (ix86_handle_fndecl_attribute): Handle indirect_branch. + (ix86_attribute_table): Add indirect_branch. + * config/i386/i386.h (machine_function): Add indirect_branch_type + and has_local_indirect_jump. + * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump + to true. + (tablejump): Likewise. + (*indirect_jump): Use ix86_output_indirect_jmp. + (*tablejump_1): Likewise. + (simple_return_indirect_internal): Likewise. + * config/i386/i386.opt (mindirect-branch=): New option. + (indirect_branch): New. + (keep): Likewise. + (thunk): Likewise. + (thunk-inline): Likewise. + (thunk-extern): Likewise. + * doc/extend.texi: Document indirect_branch function attribute. + * doc/invoke.texi: Document -mindirect-branch= option. + +gcc/testsuite/ + + Backport from mainline + * gcc.target/i386/indirect-thunk-1.c: New test. + * gcc.target/i386/indirect-thunk-2.c: Likewise. + * gcc.target/i386/indirect-thunk-3.c: Likewise. + * gcc.target/i386/indirect-thunk-4.c: Likewise. + * gcc.target/i386/indirect-thunk-5.c: Likewise. + * gcc.target/i386/indirect-thunk-6.c: Likewise. + * gcc.target/i386/indirect-thunk-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-1.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-2.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-3.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-4.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-5.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-6.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-7.c: Likewise. + * gcc.target/i386/indirect-thunk-attr-8.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise. + * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-1.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-2.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-3.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-4.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-5.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-6.c: Likewise. + * gcc.target/i386/indirect-thunk-extern-7.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-1.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-2.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-3.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-4.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-5.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-6.c: Likewise. + * gcc.target/i386/indirect-thunk-inline-7.c: Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4 + +[UBUNTU NOTES: Updated for gcc-5.4 to include defines for + FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in + https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269. + Dropped indirect-thunk-5.c, indirect-thunk-6.c, + indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c, + indirect-thunk-extern-5.c, indirect-thunk-extern-6.c, + indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due + to gcc 5.4 and earlier not supporting the -fno-plt option. + --sbeattie, tyhicks] +--- + src/gcc/config/i386/i386-opts.h | 13 + src/gcc/config/i386/i386-protos.h | 1 + src/gcc/config/i386/i386.c | 621 +++++++++++- + src/gcc/config/i386/i386.h | 12 + src/gcc/config/i386/i386.md | 26 + src/gcc/config/i386/i386.opt | 20 + src/gcc/doc/extend.texi | 10 + src/gcc/doc/invoke.texi | 14 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21 + src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44 + 33 files changed, 1334 insertions(+), 15 deletions(-) + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c + create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c + +Index: b/src/gcc/config/i386/i386-opts.h +=================================================================== +--- a/src/gcc/config/i386/i386-opts.h ++++ b/src/gcc/config/i386/i386-opts.h +@@ -99,4 +99,17 @@ enum stack_protector_guard { + SSP_GLOBAL /* global canary */ + }; + ++/* This is used to mitigate variant #2 of the speculative execution ++ vulnerabilities on x86 processors identified by CVE-2017-5715, aka ++ Spectre. They convert indirect branches and function returns to ++ call and return thunks to avoid speculative execution via indirect ++ call, jmp and ret. */ ++enum indirect_branch { ++ indirect_branch_unset = 0, ++ indirect_branch_keep, ++ indirect_branch_thunk, ++ indirect_branch_thunk_inline, ++ indirect_branch_thunk_extern ++}; ++ + #endif +Index: b/src/gcc/config/i386/i386-protos.h +=================================================================== +--- a/src/gcc/config/i386/i386-protos.h ++++ b/src/gcc/config/i386/i386-protos.h +@@ -306,6 +306,7 @@ extern enum attr_cpu ix86_schedule; + #endif + + extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op); ++extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p); + + #ifdef RTX_CODE + /* Target data for multipass lookahead scheduling. +Index: b/src/gcc/config/i386/i386.c +=================================================================== +--- a/src/gcc/config/i386/i386.c ++++ b/src/gcc/config/i386/i386.c +@@ -2554,12 +2554,23 @@ make_pass_insert_vzeroupper (gcc::contex + return new pass_insert_vzeroupper (ctxt); + } + +-/* Return true if a red-zone is in use. */ ++/* Return true if a red-zone is in use. We can't use red-zone when ++ there are local indirect jumps, like "indirect_jump" or "tablejump", ++ which jumps to another place in the function, since "call" in the ++ indirect thunk pushes the return address onto stack, destroying ++ red-zone. ++ ++ TODO: If we can reserve the first 2 WORDs, for PUSH and, another ++ for CALL, in red-zone, we can allow local indirect jumps with ++ indirect thunk. */ + + static inline bool + ix86_using_red_zone (void) + { +- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI; ++ return (TARGET_RED_ZONE ++ && !TARGET_64BIT_MS_ABI ++ && (!cfun->machine->has_local_indirect_jump ++ || cfun->machine->indirect_branch_type == indirect_branch_keep)); + } + + /* Return a string that documents the current -m options. The caller is +@@ -5126,6 +5137,37 @@ ix86_reset_previous_fndecl (void) + ix86_previous_fndecl = NULL_TREE; + } + ++/* Set the indirect_branch_type field from the function FNDECL. */ ++ ++static void ++ix86_set_indirect_branch_type (tree fndecl) ++{ ++ if (cfun->machine->indirect_branch_type == indirect_branch_unset) ++ { ++ tree attr = lookup_attribute ("indirect_branch", ++ DECL_ATTRIBUTES (fndecl)); ++ if (attr != NULL) ++ { ++ tree args = TREE_VALUE (attr); ++ if (args == NULL) ++ gcc_unreachable (); ++ tree cst = TREE_VALUE (args); ++ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0) ++ cfun->machine->indirect_branch_type = indirect_branch_keep; ++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0) ++ cfun->machine->indirect_branch_type = indirect_branch_thunk; ++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0) ++ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline; ++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0) ++ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern; ++ else ++ gcc_unreachable (); ++ } ++ else ++ cfun->machine->indirect_branch_type = ix86_indirect_branch; ++ } ++} ++ + /* Establish appropriate back-end context for processing the function + FNDECL. The argument might be NULL to indicate processing at top + level, outside of any function scope. */ +@@ -5136,7 +5178,11 @@ ix86_set_current_function (tree fndecl) + several times in the course of compiling a function, and we don't want to + slow things down too much or call target_reinit when it isn't safe. */ + if (fndecl == ix86_previous_fndecl) +- return; ++ { ++ if (fndecl != NULL_TREE) ++ ix86_set_indirect_branch_type (fndecl); ++ return; ++ } + + tree old_tree; + if (ix86_previous_fndecl == NULL_TREE) +@@ -5153,6 +5199,8 @@ ix86_set_current_function (tree fndecl) + return; + } + ++ ix86_set_indirect_branch_type (fndecl); ++ + tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl); + if (new_tree == NULL_TREE) + new_tree = target_option_default_node; +@@ -9681,6 +9729,220 @@ ix86_setup_frame_addresses (void) + # endif + #endif + ++/* Label count for call and return thunks. It is used to make unique ++ labels in call and return thunks. */ ++static int indirectlabelno; ++ ++/* True if call and return thunk functions are needed. */ ++static bool indirect_thunk_needed = false; ++/* True if call and return thunk functions with the BND prefix are ++ needed. */ ++static bool indirect_thunk_bnd_needed = false; ++ ++/* Bit masks of integer registers, which contain branch target, used ++ by call and return thunks functions. */ ++static int indirect_thunks_used; ++/* Bit masks of integer registers, which contain branch target, used ++ by call and return thunks functions with the BND prefix. */ ++static int indirect_thunks_bnd_used; ++ ++#ifndef INDIRECT_LABEL ++# define INDIRECT_LABEL "LIND" ++#endif ++ ++/* Fills in the label name that should be used for the indirect thunk. */ ++ ++static void ++indirect_thunk_name (char name[32], int regno, bool need_bnd_p) ++{ ++ if (USE_HIDDEN_LINKONCE) ++ { ++ const char *bnd = need_bnd_p ? "_bnd" : ""; ++ if (regno >= 0) ++ { ++ const char *reg_prefix; ++ if (LEGACY_INT_REGNO_P (regno)) ++ reg_prefix = TARGET_64BIT ? "r" : "e"; ++ else ++ reg_prefix = ""; ++ sprintf (name, "__x86_indirect_thunk%s_%s%s", ++ bnd, reg_prefix, reg_names[regno]); ++ } ++ else ++ sprintf (name, "__x86_indirect_thunk%s", bnd); ++ } ++ else ++ { ++ if (regno >= 0) ++ { ++ if (need_bnd_p) ++ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno); ++ else ++ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno); ++ } ++ else ++ { ++ if (need_bnd_p) ++ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0); ++ else ++ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0); ++ } ++ } ++} ++ ++/* Output a call and return thunk for indirect branch. If BND_P is ++ true, the BND prefix is needed. If REGNO != -1, the function ++ address is in REGNO and the call and return thunk looks like: ++ ++ call L2 ++ L1: ++ pause ++ jmp L1 ++ L2: ++ mov %REG, (%sp) ++ ret ++ ++ Otherwise, the function address is on the top of stack and the ++ call and return thunk looks like: ++ ++ call L2 ++ L1: ++ pause ++ jmp L1 ++ L2: ++ lea WORD_SIZE(%sp), %sp ++ ret ++ */ ++ ++static void ++output_indirect_thunk (bool need_bnd_p, int regno) ++{ ++ char indirectlabel1[32]; ++ char indirectlabel2[32]; ++ ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL, ++ indirectlabelno++); ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL, ++ indirectlabelno++); ++ ++ /* Call */ ++ if (need_bnd_p) ++ fputs ("\tbnd call\t", asm_out_file); ++ else ++ fputs ("\tcall\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel2); ++ fputc ('\n', asm_out_file); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1); ++ ++ /* Pause + lfence. */ ++ fprintf (asm_out_file, "\tpause\n\tlfence\n"); ++ ++ /* Jump. */ ++ fputs ("\tjmp\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel1); ++ fputc ('\n', asm_out_file); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2); ++ ++ if (regno >= 0) ++ { ++ /* MOV. */ ++ rtx xops[2]; ++ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx); ++ xops[1] = gen_rtx_REG (word_mode, regno); ++ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops); ++ } ++ else ++ { ++ /* LEA. */ ++ rtx xops[2]; ++ xops[0] = stack_pointer_rtx; ++ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD); ++ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops); ++ } ++ ++ if (need_bnd_p) ++ fputs ("\tbnd ret\n", asm_out_file); ++ else ++ fputs ("\tret\n", asm_out_file); ++} ++ ++/* Output a funtion with a call and return thunk for indirect branch. ++ If BND_P is true, the BND prefix is needed. If REGNO != -1, the ++ function address is in REGNO. Otherwise, the function address is ++ on the top of stack. */ ++ ++static void ++output_indirect_thunk_function (bool need_bnd_p, int regno) ++{ ++ char name[32]; ++ tree decl; ++ ++ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */ ++ indirect_thunk_name (name, regno, need_bnd_p); ++ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL, ++ get_identifier (name), ++ build_function_type_list (void_type_node, NULL_TREE)); ++ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL, ++ NULL_TREE, void_type_node); ++ TREE_PUBLIC (decl) = 1; ++ TREE_STATIC (decl) = 1; ++ DECL_IGNORED_P (decl) = 1; ++ ++#if TARGET_MACHO ++ if (TARGET_MACHO) ++ { ++ switch_to_section (darwin_sections[picbase_thunk_section]); ++ fputs ("\t.weak_definition\t", asm_out_file); ++ assemble_name (asm_out_file, name); ++ fputs ("\n\t.private_extern\t", asm_out_file); ++ assemble_name (asm_out_file, name); ++ putc ('\n', asm_out_file); ++ ASM_OUTPUT_LABEL (asm_out_file, name); ++ DECL_WEAK (decl) = 1; ++ } ++ else ++#endif ++ if (USE_HIDDEN_LINKONCE) ++ { ++ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl)); ++ ++ targetm.asm_out.unique_section (decl, 0); ++ switch_to_section (get_named_section (decl, NULL, 0)); ++ ++ targetm.asm_out.globalize_label (asm_out_file, name); ++ fputs ("\t.hidden\t", asm_out_file); ++ assemble_name (asm_out_file, name); ++ putc ('\n', asm_out_file); ++ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl); ++ } ++ else ++ { ++ switch_to_section (text_section); ++ ASM_OUTPUT_LABEL (asm_out_file, name); ++ } ++ ++ DECL_INITIAL (decl) = make_node (BLOCK); ++ current_function_decl = decl; ++ allocate_struct_function (decl, false); ++ init_function_start (decl); ++ /* We're about to hide the function body from callees of final_* by ++ emitting it directly; tell them we're a thunk, if they care. */ ++ cfun->is_thunk = true; ++ first_function_block_is_cold = false; ++ /* Make sure unwind info is emitted for the thunk if needed. */ ++ final_start_function (emit_barrier (), asm_out_file, 1); ++ ++ output_indirect_thunk (need_bnd_p, regno); ++ ++ final_end_function (); ++ init_insn_lengths (); ++ free_after_compilation (cfun); ++ set_cfun (NULL); ++ current_function_decl = NULL; ++} ++ + static int pic_labels_used; + + /* Fills in the label name that should be used for a pc thunk for +@@ -9707,11 +9969,32 @@ ix86_code_end (void) + rtx xops[2]; + int regno; + ++ if (indirect_thunk_needed) ++ output_indirect_thunk_function (false, -1); ++ if (indirect_thunk_bnd_needed) ++ output_indirect_thunk_function (true, -1); ++ ++ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++) ++ { ++ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1; ++ if ((indirect_thunks_used & (1 << i))) ++ output_indirect_thunk_function (false, regno); ++ ++ if ((indirect_thunks_bnd_used & (1 << i))) ++ output_indirect_thunk_function (true, regno); ++ } ++ + for (regno = AX_REG; regno <= SP_REG; regno++) + { + char name[32]; + tree decl; + ++ if ((indirect_thunks_used & (1 << regno))) ++ output_indirect_thunk_function (false, regno); ++ ++ if ((indirect_thunks_bnd_used & (1 << regno))) ++ output_indirect_thunk_function (true, regno); ++ + if (!(pic_labels_used & (1 << regno))) + continue; + +@@ -25805,12 +26088,292 @@ ix86_expand_call (rtx retval, rtx fnaddr + return call; + } + ++/* Output indirect branch via a call and return thunk. CALL_OP is a ++ register which contains the branch target. XASM is the assembly ++ template for CALL_OP. Branch is a tail call if SIBCALL_P is true. ++ A normal call is converted to: ++ ++ call __x86_indirect_thunk_reg ++ ++ and a tail call is converted to: ++ ++ jmp __x86_indirect_thunk_reg ++ */ ++ ++static void ++ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p) ++{ ++ char thunk_name_buf[32]; ++ char *thunk_name; ++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn); ++ int regno = REGNO (call_op); ++ ++ if (cfun->machine->indirect_branch_type ++ != indirect_branch_thunk_inline) ++ { ++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk) ++ { ++ int i = regno; ++ if (i >= FIRST_REX_INT_REG) ++ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1); ++ if (need_bnd_p) ++ indirect_thunks_bnd_used |= 1 << i; ++ else ++ indirect_thunks_used |= 1 << i; ++ } ++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p); ++ thunk_name = thunk_name_buf; ++ } ++ else ++ thunk_name = NULL; ++ ++ if (sibcall_p) ++ { ++ if (thunk_name != NULL) ++ { ++ if (need_bnd_p) ++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name); ++ else ++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name); ++ } ++ else ++ output_indirect_thunk (need_bnd_p, regno); ++ } ++ else ++ { ++ if (thunk_name != NULL) ++ { ++ if (need_bnd_p) ++ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name); ++ else ++ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name); ++ return; ++ } ++ ++ char indirectlabel1[32]; ++ char indirectlabel2[32]; ++ ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, ++ INDIRECT_LABEL, ++ indirectlabelno++); ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, ++ INDIRECT_LABEL, ++ indirectlabelno++); ++ ++ /* Jump. */ ++ if (need_bnd_p) ++ fputs ("\tbnd jmp\t", asm_out_file); ++ else ++ fputs ("\tjmp\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel2); ++ fputc ('\n', asm_out_file); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1); ++ ++ if (thunk_name != NULL) ++ { ++ if (need_bnd_p) ++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name); ++ else ++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name); ++ } ++ else ++ output_indirect_thunk (need_bnd_p, regno); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2); ++ ++ /* Call. */ ++ if (need_bnd_p) ++ fputs ("\tbnd call\t", asm_out_file); ++ else ++ fputs ("\tcall\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel1); ++ fputc ('\n', asm_out_file); ++ } ++} ++ ++/* Output indirect branch via a call and return thunk. CALL_OP is ++ the branch target. XASM is the assembly template for CALL_OP. ++ Branch is a tail call if SIBCALL_P is true. A normal call is ++ converted to: ++ ++ jmp L2 ++ L1: ++ push CALL_OP ++ jmp __x86_indirect_thunk ++ L2: ++ call L1 ++ ++ and a tail call is converted to: ++ ++ push CALL_OP ++ jmp __x86_indirect_thunk ++ */ ++ ++static void ++ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm, ++ bool sibcall_p) ++{ ++ char thunk_name_buf[32]; ++ char *thunk_name; ++ char push_buf[64]; ++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn); ++ int regno = -1; ++ ++ if (cfun->machine->indirect_branch_type ++ != indirect_branch_thunk_inline) ++ { ++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk) ++ { ++ if (need_bnd_p) ++ indirect_thunk_bnd_needed = true; ++ else ++ indirect_thunk_needed = true; ++ } ++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p); ++ thunk_name = thunk_name_buf; ++ } ++ else ++ thunk_name = NULL; ++ ++ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s", ++ TARGET_64BIT ? 'q' : 'l', xasm); ++ ++ if (sibcall_p) ++ { ++ output_asm_insn (push_buf, &call_op); ++ if (thunk_name != NULL) ++ { ++ if (need_bnd_p) ++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name); ++ else ++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name); ++ } ++ else ++ output_indirect_thunk (need_bnd_p, regno); ++ } ++ else ++ { ++ char indirectlabel1[32]; ++ char indirectlabel2[32]; ++ ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, ++ INDIRECT_LABEL, ++ indirectlabelno++); ++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, ++ INDIRECT_LABEL, ++ indirectlabelno++); ++ ++ /* Jump. */ ++ if (need_bnd_p) ++ fputs ("\tbnd jmp\t", asm_out_file); ++ else ++ fputs ("\tjmp\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel2); ++ fputc ('\n', asm_out_file); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1); ++ ++ /* An external function may be called via GOT, instead of PLT. */ ++ if (MEM_P (call_op)) ++ { ++ struct ix86_address parts; ++ rtx addr = XEXP (call_op, 0); ++ if (ix86_decompose_address (addr, &parts) ++ && parts.base == stack_pointer_rtx) ++ { ++ /* Since call will adjust stack by -UNITS_PER_WORD, ++ we must convert "disp(stack, index, scale)" to ++ "disp+UNITS_PER_WORD(stack, index, scale)". */ ++ if (parts.index) ++ { ++ addr = gen_rtx_MULT (Pmode, parts.index, ++ GEN_INT (parts.scale)); ++ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, ++ addr); ++ } ++ else ++ addr = stack_pointer_rtx; ++ ++ rtx disp; ++ if (parts.disp != NULL_RTX) ++ disp = plus_constant (Pmode, parts.disp, ++ UNITS_PER_WORD); ++ else ++ disp = GEN_INT (UNITS_PER_WORD); ++ ++ addr = gen_rtx_PLUS (Pmode, addr, disp); ++ call_op = gen_rtx_MEM (GET_MODE (call_op), addr); ++ } ++ } ++ ++ output_asm_insn (push_buf, &call_op); ++ ++ if (thunk_name != NULL) ++ { ++ if (need_bnd_p) ++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name); ++ else ++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name); ++ } ++ else ++ output_indirect_thunk (need_bnd_p, regno); ++ ++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2); ++ ++ /* Call. */ ++ if (need_bnd_p) ++ fputs ("\tbnd call\t", asm_out_file); ++ else ++ fputs ("\tcall\t", asm_out_file); ++ assemble_name_raw (asm_out_file, indirectlabel1); ++ fputc ('\n', asm_out_file); ++ } ++} ++ ++/* Output indirect branch via a call and return thunk. CALL_OP is ++ the branch target. XASM is the assembly template for CALL_OP. ++ Branch is a tail call if SIBCALL_P is true. */ ++ ++static void ++ix86_output_indirect_branch (rtx call_op, const char *xasm, ++ bool sibcall_p) ++{ ++ if (REG_P (call_op)) ++ ix86_output_indirect_branch_via_reg (call_op, sibcall_p); ++ else ++ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p); ++} ++/* Output indirect jump. CALL_OP is the jump target. Jump is a ++ function return if RET_P is true. */ ++ ++const char * ++ix86_output_indirect_jmp (rtx call_op, bool ret_p) ++{ ++ if (cfun->machine->indirect_branch_type != indirect_branch_keep) ++ { ++ /* We can't have red-zone if this isn't a function return since ++ "call" in the indirect thunk pushes the return address onto ++ stack, destroying red-zone. */ ++ if (!ret_p && ix86_red_zone_size != 0) ++ gcc_unreachable (); ++ ++ ix86_output_indirect_branch (call_op, "%0", true); ++ return ""; ++ } ++ else ++ return "%!jmp\t%A0"; ++} ++ + /* Output the assembly for a call instruction. */ + + const char * + ix86_output_call_insn (rtx_insn *insn, rtx call_op) + { + bool direct_p = constant_call_address_operand (call_op, VOIDmode); ++ bool output_indirect_p ++ = (!TARGET_SEH ++ && cfun->machine->indirect_branch_type != indirect_branch_keep); + bool seh_nop_p = false; + const char *xasm; + +@@ -25823,9 +26386,17 @@ ix86_output_call_insn (rtx_insn *insn, r + else if (TARGET_SEH) + xasm = "%!rex.W jmp %A0"; + else +- xasm = "%!jmp\t%A0"; ++ { ++ if (output_indirect_p) ++ xasm = "%0"; ++ else ++ xasm = "%!jmp\t%A0"; ++ } + +- output_asm_insn (xasm, &call_op); ++ if (output_indirect_p && !direct_p) ++ ix86_output_indirect_branch (call_op, xasm, true); ++ else ++ output_asm_insn (xasm, &call_op); + return ""; + } + +@@ -25862,9 +26433,17 @@ ix86_output_call_insn (rtx_insn *insn, r + if (direct_p) + xasm = "%!call\t%P0"; + else +- xasm = "%!call\t%A0"; ++ { ++ if (output_indirect_p) ++ xasm = "%0"; ++ else ++ xasm = "%!call\t%A0"; ++ } + +- output_asm_insn (xasm, &call_op); ++ if (output_indirect_p && !direct_p) ++ ix86_output_indirect_branch (call_op, xasm, false); ++ else ++ output_asm_insn (xasm, &call_op); + + if (seh_nop_p) + return "nop"; +@@ -43014,7 +43593,7 @@ ix86_handle_struct_attribute (tree *node + } + + static tree +-ix86_handle_fndecl_attribute (tree *node, tree name, tree, int, ++ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int, + bool *no_add_attrs) + { + if (TREE_CODE (*node) != FUNCTION_DECL) +@@ -43023,6 +43602,29 @@ ix86_handle_fndecl_attribute (tree *node + name); + *no_add_attrs = true; + } ++ ++ if (is_attribute_p ("indirect_branch", name)) ++ { ++ tree cst = TREE_VALUE (args); ++ if (TREE_CODE (cst) != STRING_CST) ++ { ++ warning (OPT_Wattributes, ++ "%qE attribute requires a string constant argument", ++ name); ++ *no_add_attrs = true; ++ } ++ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0 ++ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0 ++ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0 ++ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0) ++ { ++ warning (OPT_Wattributes, ++ "argument to %qE attribute is not " ++ "(keep|thunk|thunk-inline|thunk-extern)", name); ++ *no_add_attrs = true; ++ } ++ } ++ + return NULL_TREE; + } + +@@ -46915,6 +47517,9 @@ static const struct attribute_spec ix86_ + false }, + { "callee_pop_aggregate_return", 1, 1, false, true, true, + ix86_handle_callee_pop_aggregate_return, true }, ++ { "indirect_branch", 1, 1, true, false, false, ++ ix86_handle_fndecl_attribute, false }, ++ + /* End element. */ + { NULL, 0, 0, false, false, false, NULL, false } + }; +Index: b/src/gcc/config/i386/i386.h +=================================================================== +--- a/src/gcc/config/i386/i386.h ++++ b/src/gcc/config/i386/i386.h +@@ -1229,6 +1229,9 @@ extern const char *host_detect_local_cpu + /* Base register for access to local variables of the function. */ + #define FRAME_POINTER_REGNUM 20 + ++#define FIRST_INT_REG AX_REG ++#define LAST_INT_REG SP_REG ++ + /* First floating point reg */ + #define FIRST_FLOAT_REG 8 + +@@ -1465,6 +1468,8 @@ enum reg_class + registers. */ + #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true + ++#define LEGACY_INT_REGNO_P(N) (IN_RANGE ((N), FIRST_INT_REG, LAST_INT_REG)) ++ + #define QI_REG_P(X) (REG_P (X) && QI_REGNO_P (REGNO (X))) + #define QI_REGNO_P(N) IN_RANGE ((N), AX_REG, BX_REG) + +@@ -2550,6 +2555,13 @@ struct GTY(()) machine_function { + /* If true, it is safe to not save/restore DRAP register. */ + BOOL_BITFIELD no_drap_save_restore : 1; + ++ /* How to generate indirec branch. */ ++ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3; ++ ++ /* If true, the current function has local indirect jumps, like ++ "indirect_jump" or "tablejump". */ ++ BOOL_BITFIELD has_local_indirect_jump : 1; ++ + /* During prologue/epilogue generation, the current frame state. + Otherwise, the frame state at the end of the prologue. */ + struct machine_frame_state fs; +Index: b/src/gcc/config/i386/i386.md +=================================================================== +--- a/src/gcc/config/i386/i386.md ++++ b/src/gcc/config/i386/i386.md +@@ -11556,13 +11556,18 @@ + { + if (TARGET_X32) + operands[0] = convert_memory_address (word_mode, operands[0]); ++ cfun->machine->has_local_indirect_jump = true; + }) + + (define_insn "*indirect_jump" + [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))] + "" +- "%!jmp\t%A0" +- [(set_attr "type" "ibr") ++ "* return ix86_output_indirect_jmp (operands[0], false);" ++ [(set (attr "type") ++ (if_then_else (match_test "(cfun->machine->indirect_branch_type ++ != indirect_branch_keep)") ++ (const_string "multi") ++ (const_string "ibr"))) + (set_attr "length_immediate" "0")]) + + (define_expand "tablejump" +@@ -11604,14 +11609,19 @@ + + if (TARGET_X32) + operands[0] = convert_memory_address (word_mode, operands[0]); ++ cfun->machine->has_local_indirect_jump = true; + }) + + (define_insn "*tablejump_1" + [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw")) + (use (label_ref (match_operand 1)))] + "" +- "%!jmp\t%A0" +- [(set_attr "type" "ibr") ++ "* return ix86_output_indirect_jmp (operands[0], false);" ++ [(set (attr "type") ++ (if_then_else (match_test "(cfun->machine->indirect_branch_type ++ != indirect_branch_keep)") ++ (const_string "multi") ++ (const_string "ibr"))) + (set_attr "length_immediate" "0")]) + + ;; Convert setcc + movzbl to xor + setcc if operands don't overlap. +@@ -12198,8 +12208,12 @@ + [(simple_return) + (use (match_operand:SI 0 "register_operand" "r"))] + "reload_completed" +- "%!jmp\t%A0" +- [(set_attr "type" "ibr") ++ "* return ix86_output_indirect_jmp (operands[0], true);" ++ [(set (attr "type") ++ (if_then_else (match_test "(cfun->machine->indirect_branch_type ++ != indirect_branch_keep)") ++ (const_string "multi") ++ (const_string "ibr"))) + (set_attr "length_immediate" "0")]) + + (define_insn "nop" +Index: b/src/gcc/config/i386/i386.opt +=================================================================== +--- a/src/gcc/config/i386/i386.opt ++++ b/src/gcc/config/i386/i386.opt +@@ -876,3 +876,23 @@ Enum(stack_protector_guard) String(tls) + + EnumValue + Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL) ++ ++mindirect-branch= ++Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep) ++Convert indirect call and jump to call and return thunks. ++ ++Enum ++Name(indirect_branch) Type(enum indirect_branch) ++Known indirect branch choices (for use with the -mindirect-branch= option): ++ ++EnumValue ++Enum(indirect_branch) String(keep) Value(indirect_branch_keep) ++ ++EnumValue ++Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk) ++ ++EnumValue ++Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline) ++ ++EnumValue ++Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern) +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c +@@ -0,0 +1,20 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch; ++ ++void ++male_indirect_jump (long offset) ++{ ++ dispatch(offset); ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c +@@ -0,0 +1,20 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch[256]; ++ ++void ++male_indirect_jump (long offset) ++{ ++ dispatch[offset](offset); ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c +@@ -0,0 +1,21 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch; ++ ++int ++male_indirect_jump (long offset) ++{ ++ dispatch(offset); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c +@@ -0,0 +1,21 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch[256]; ++ ++int ++male_indirect_jump (long offset) ++{ ++ dispatch[offset](offset); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c +@@ -0,0 +1,44 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */ ++ ++void func0 (void); ++void func1 (void); ++void func2 (void); ++void func3 (void); ++void func4 (void); ++void func4 (void); ++void func5 (void); ++ ++void ++bar (int i) ++{ ++ switch (i) ++ { ++ default: ++ func0 (); ++ break; ++ case 1: ++ func1 (); ++ break; ++ case 2: ++ func2 (); ++ break; ++ case 3: ++ func3 (); ++ break; ++ case 4: ++ func4 (); ++ break; ++ case 5: ++ func5 (); ++ break; ++ } ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c +@@ -0,0 +1,23 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch; ++ ++extern void male_indirect_jump (long) ++ __attribute__ ((indirect_branch("thunk"))); ++ ++void ++male_indirect_jump (long offset) ++{ ++ dispatch(offset); ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c +@@ -0,0 +1,21 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch[256]; ++ ++__attribute__ ((indirect_branch("thunk"))) ++void ++male_indirect_jump (long offset) ++{ ++ dispatch[offset](offset); ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */ ++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c +@@ -0,0 +1,23 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch; ++extern int male_indirect_jump (long) ++ __attribute__ ((indirect_branch("thunk-inline"))); ++ ++int ++male_indirect_jump (long offset) ++{ ++ dispatch(offset); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */ ++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ ++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */ ++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */ +Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c +=================================================================== +--- /dev/null ++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c +@@ -0,0 +1,22 @@ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -fno-pic" } */ ++ ++typedef void (*dispatch_t)(long offset); ++ ++dispatch_t dispatch[256]; ++ ++__attribute__ ((indirect_branch("thunk-inline"))) ++int ++male_indirect_jump (long offset) ++{ ++ dispatch[offset](offset); ++ return 0; ++} ++ ++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */ ++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */ ++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */ ++/* { dg-final { scan-assembler {\tpause} } } */ ++/* { dg-final { scan-assembler {\tlfence} } } */ |