diff options
Diffstat (limited to 'development/pcc/pcc.SlackBuild')
-rw-r--r-- | development/pcc/pcc.SlackBuild | 44 |
1 files changed, 13 insertions, 31 deletions
diff --git a/development/pcc/pcc.SlackBuild b/development/pcc/pcc.SlackBuild index 1635ff4be8..2b0c2697b1 100644 --- a/development/pcc/pcc.SlackBuild +++ b/development/pcc/pcc.SlackBuild @@ -21,25 +21,12 @@ # - add logic to choose which compiler to use if CC not set. # - extract license from source, install to /usr/doc -# notes: - -# - pcc 1.0 hasn't worked since Slackware 13.37. It builds & installs -# fine, but anything compiled with it just segfaults in the -# startup code. Hence the upgrade to a beta snapshot, which at -# least can compile a working "hello world" on Slack 14.1. - -# - upstream only keeps about a weeks' worth of snapshot tarballs, so -# so I'm self-hosting them. I do plan to update the snapshot version -# from time to time, but *not* on a weekly basis. Eventually 1.1.0 -# will be released, and there will be much rejoicing. - -# - upstream filenames are pcc-1.1.0.BETA-<yyyymmdd>. If you want to -# try a different snapshot, set VERSION=1.1.0_beta_<yyyymmdd> in -# the env. AFAIK, the pcc and pcc-libs snapshot dates must always -# match (this script enforces it). +# 20150126 bkw: +# - upgraded for pcc-1.1.0 release, no more beta +# - add seddery to fix typo in cc.c (ifdef => ifndef) PRGNAM=pcc -VERSION=${VERSION:-1.1.0_beta_20141031} +VERSION=${VERSION:-1.1.0} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -69,14 +56,6 @@ fi set -e -# All this cruft will go away, when 1.1.0 is released. -SHORTVER=$( echo $VERSION | cut -d_ -f1 ) -SNAPVER=$( echo $VERSION | cut -d_ -f3 ) -TARBALL=$PRGNAM-$SHORTVER.BETA-$SNAPVER.tgz -TARDIR=$PRGNAM-$SHORTVER.BETA -LIBTARBALL=$PRGNAM-libs-$SHORTVER.BETA-$SNAPVER.tgz -LIBTARDIR=$PRGNAM-libs-$SHORTVER.BETA - # which compiler shall we use? if [ "$CC" = "" ]; then # user didn't specify, autodetect. @@ -101,12 +80,11 @@ if [ "${TLS:-no}" = "yes" ]; then TLSOPT="--enable-tls" fi -rm -rf $PKG +rm -rf $PKG $TMP/$PRGNAM mkdir -p $TMP/$PRGNAM $PKG $OUTPUT cd $TMP/$PRGNAM -rm -rf $TARDIR $LIBTARDIR -tar xvf $CWD/$TARBALL -tar xvf $CWD/$LIBTARBALL +tar xvf $CWD/$PRGNAM-$VERSION.tgz +tar xvf $CWD/$PRGNAM-libs-$VERSION.tgz chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -115,7 +93,11 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # first, the compiler itself: -cd $TARDIR +cd $PRGNAM-$VERSION + +# fix typo, ref http://marc.info/?l=pcc-list&m=141824411830017&w=2 +sed -i '0,/^#ifdef MULTI/!s,^#ifdef \(MULTI\),#ifndef \1,' cc/cc/cc.c + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ @@ -144,7 +126,7 @@ sed -n '/Copyright/,/^ *$/s,^...,,p' cc/cc/cc.c \ # now, build the libs. we don't attempt to build them with the just-built # pcc (maybe possible, but not worth the effort). -cd $TMP/$PRGNAM/$LIBTARDIR +cd $TMP/$PRGNAM/$PRGNAM-libs-$VERSION CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ |