diff options
author | Eric Hameleers <alien@slackware.com> | 2017-07-09 23:37:19 +0200 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2021-04-18 12:22:50 +0200 |
commit | f7e2cae4390d351f4fcda373fc5c5c2c9b5fe3ce (patch) | |
tree | bcb09975b7f5efa8239c3e3c593c5dc5769eee57 /development | |
parent | 57a75502dd1e88aaa949c0e4c684c10783438f6b (diff) | |
download | slackbuilds-f7e2cae4390d351f4fcda373fc5c5c2c9b5fe3ce.tar.gz |
development/gcc5: Addressed ponce's remarks about the SlackBuild.
Non-multilib on 64bit should now be properly handled;
The actual fastjar tarball compression was different than assumed;
Use PRGNAM (SBo convention) in the SlackBuild script, rather than
PKGNAM (Slackware convention);
Get rid of error regarding the non-existing mudflap directory.
Signed-off-by: Eric Hameleers <alien@slackware.com>
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'development')
-rw-r--r-- | development/gcc5/gcc5.SlackBuild | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/development/gcc5/gcc5.SlackBuild b/development/gcc5/gcc5.SlackBuild index 9e0786442d..3e92d4fce7 100644 --- a/development/gcc5/gcc5.SlackBuild +++ b/development/gcc5/gcc5.SlackBuild @@ -53,7 +53,7 @@ # efficient on modern CPUs running in 32-bit mode than the alternate i586 # instructions. No need to throw i586 CPUs under the bus (yet). -PKGNAM=gcc5 +PRGNAM=gcc5 VERSION=${VERSION:-5.4.0} MAJVER=$(echo ${VERSION} |cut -d. -f1) BUILD=${BUILD:-1} @@ -122,10 +122,15 @@ case "$ARCH" in *) TARGET=$ARCH-slackware-linux ;; esac -if [ "$ARCH" = "x86_64" -a -f /usr/lib/libc.a ]; then - # If we find a 32bit C library on 64bit Slackware, assume multilib: - GCC_ARCHOPTS="--enable-multilib" - MULTILIB="YES" +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" @@ -134,7 +139,7 @@ fi CWD=$(pwd) # Temporary build location. This should *NOT* be a directory # path a non-root user could create later... -TMP=${TMP:-"/gcc-$(mcookie)"} +TMP=${TMP:-"/tmp/SBo/gcc-$(mcookie)"} # Where we dump the package: OUTPUT=${OUTPUT:-/tmp} @@ -247,13 +252,15 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) fi ) - mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libmudflap - ( cd libmudflap - if [ -r ChangeLog ]; then - cat ChangeLog | head -n 1000 > $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog - touch -r ChangeLog $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog - fi - ) + if [ -d libmudflap ]; then + mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libmudflap + ( cd libmudflap + if [ -r ChangeLog ]; then + cat ChangeLog | head -n 1000 > $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog + touch -r ChangeLog $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog + fi + ) + fi mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libgomp ( cd libgomp @@ -278,12 +285,12 @@ ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1) # Add fastjar to the gcc5 package: ( cd $TMP - FASTJARVER=$(echo $CWD/fastjar-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev) + 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.xz || exit 1 + tar xvf $CWD/fastjar-$FASTJARVER.tar.?z* || exit 1 cd fastjar-$FASTJARVER || exit 1 chown -R root:root . find . \ @@ -536,9 +543,9 @@ cat $CWD/libgcj-5.pc \ ( cd $PKG1 if [ ${MULTILIB} = "YES" ]; then - /sbin/makepkg -l y -c n $OUTPUT/${PKGNAM}-${VERSION}_multilib-$ARCH-$BUILD$TAG.txz + /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}_multilib-$ARCH-$BUILD$TAG.txz else - /sbin/makepkg -l y -c n $OUTPUT/${PKGNAM}-${VERSION}-$ARCH-$BUILD$TAG.txz + /sbin/makepkg -l y -c n $OUTPUT/${PRGNAM}-${VERSION}-$ARCH-$BUILD$TAG.txz fi ) |