diff options
author | B. Watson <yalhcru@gmail.com> | 2017-01-30 00:08:19 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-02-04 07:00:06 +0700 |
commit | a32f0ee37044b314da00013b9fc688ad8f7189a0 (patch) | |
tree | d51285cd871359013c7025666c9ebac37801447e | |
parent | ed20b637b19b8fce0d0e75f98f5e86142e080a00 (diff) | |
download | slackbuilds-a32f0ee37044b314da00013b9fc688ad8f7189a0.tar.gz |
development/cc65: Updated for version 2.15_20170126.
-rw-r--r-- | development/cc65/cc65.SlackBuild | 46 | ||||
-rw-r--r-- | development/cc65/cc65.info | 6 | ||||
-rw-r--r-- | development/cc65/git2targz.sh | 44 | ||||
-rw-r--r-- | development/cc65/slack-desc | 2 |
4 files changed, 73 insertions, 25 deletions
diff --git a/development/cc65/cc65.SlackBuild b/development/cc65/cc65.SlackBuild index 604b6b9c17..43e5d6955c 100644 --- a/development/cc65/cc65.SlackBuild +++ b/development/cc65/cc65.SlackBuild @@ -6,8 +6,15 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170129 bkw: +# - Update for v2.15_20170126, aka git 6878ede. Upstream hasn't done +# a release since 2013 or so, but there's been lots of development. +# Script modified enough that it can no longer build v2.13.3; use +# the one from SBo's 14.1 repo if you need the old version for some +# reason. Source is created from a git checkout, see git2targz.sh. + PRGNAM=cc65 -VERSION=${VERSION:-2.13.3} +VERSION=${VERSION:-2.15_20170126} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -40,33 +47,30 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT $PKG/usr/doc/$PRGNAM-$VERSION cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-sources-$VERSION.tar.bz2 +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 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ - -exec chmod 644 {} \; - -# external CFLAGS not honored, fix 'em with perlery: -find . -name gcc.mak | xargs perl -i -pe \ - 'if(/^CFLAGS\s*=/) { s/-g\b//; s/-O\d/'"$SLKCFLAGS"'/; }' - -make -j1 -f make/gcc.mak prefix=/usr +find . -type f -print0 | xargs -0 chmod 644 +find . -type d -print0 | xargs -0 chmod 755 -# for some reason, the install script isn't creating this directory in 2.13.3, -# though it used to in 2.13.2 -mkdir -p $PKG/usr/lib/cc65/tgi +# external CFLAGS not honored +sed -i "/^CFLAGS/s,-O,$SLKCFLAGS," src/Makefile -make -j1 -f make/gcc.mak install prefix=$PKG/usr docdir=$PKG/usr/doc/$PRGNAM-$VERSION +# If we wanted GNU info docs, we could 'make doc' instead of 'make -C doc +# html'. But, they're the same as the HTML pages, and they install into +# /usr/info with names like 'intro' and 'index', which would be confusing. +# It would be possible to patch things so we had 'cc65-intro', etc, +# but IMO not worth the effort. -# binaries already stripped, no man/info pages +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +make all prefix=/usr LDFLAGS=-Wl,-s +make -C doc html +make install prefix=$PKG/usr htmldir=$PKGDOC samplesdir=$PKGDOC/samples -# easier to cleanup afterwards than force 'make install' to do the docs right: -( cd $PKG/usr/doc/$PRGNAM-$VERSION && mv cc65/* . && rmdir cc65 ) +# binaries already stripped, no man pages -rmdir $PKG/usr/share # why is this even created? *shrug* +mkdir -p $PKGDOC +cp -a README* LICENSE $PKGDOC mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc diff --git a/development/cc65/cc65.info b/development/cc65/cc65.info index c7834fbebc..ab1be6e0b9 100644 --- a/development/cc65/cc65.info +++ b/development/cc65/cc65.info @@ -1,8 +1,8 @@ PRGNAM="cc65" -VERSION="2.13.3" +VERSION="2.15_20170126" HOMEPAGE="http://cc65.github.io/cc65/" -DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/cc65-sources-2.13.3.tar.bz2" -MD5SUM="99de534c4a9e04b45a82c239ed4ded20" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/cc65-2.15_20170126.tar.xz" +MD5SUM="59be82081cd44d50d170773d32839b22" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/cc65/git2targz.sh b/development/cc65/git2targz.sh new file mode 100644 index 0000000000..c86e2d9412 --- /dev/null +++ b/development/cc65/git2targz.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Create source tarball from cc65 git repo, with generated version +# number. We don't want to include the whole git history in the tarball, +# but we do want to build the git hash into the binary (for --version), +# so there's a bit of extra stuff here. + +# Note that this script doesn't need to be run as root. It does +# need to be able to write to the current directory it's run from. + +PRGNAM=cc65 +CLONE_URL=https://github.com/$PRGNAM/$PRGNAM.git + +set -e + +GITDIR=$( mktemp -dt cc65.git.XXXXXX ) +rm -rf $GITDIR +git clone $CLONE_URL $GITDIR + +CWD="$( pwd )" +cd $GITDIR +GIT_SHA=$( git rev-parse --short HEAD ) +sed -i "1iGIT_SHA=$GIT_SHA" src/Makefile + +# 6878ede and earlier commits are missing a \ in src/Makefile, which +# causes the git hash *not* to be part of --version output. Fix, if +# needed. +sed -i '/-DLD65_LIB[^\\]*$/s,$, \\,' src/Makefile + +DATE=$( git log --date=format:%Y%m%d --format=%cd | head -1 ) + +VERFILE=src/common/version.c +MAJOR=$( sed -n 's,#define\s\+VER_MAJOR\s\+\([0-9]\+\)U.*,\1,p' $VERFILE ) +MINOR=$( sed -n 's,#define\s\+VER_MINOR\s\+\([0-9]\+\)U.*,\1,p' $VERFILE ) + +VERSION=${MAJOR}.${MINOR}_$DATE + +rm -rf .git +find . -name .gitignore -print0 | xargs -0 rm -f + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION diff --git a/development/cc65/slack-desc b/development/cc65/slack-desc index 9488468759..3729110b14 100644 --- a/development/cc65/slack-desc +++ b/development/cc65/slack-desc @@ -6,7 +6,7 @@ # customary to leave one space after the ':' except on otherwise blank lines. |-----handy-ruler------------------------------------------------------| -cc65: cc65 (a complete cross development package for 65(C) +cc65: cc65 (6502 cross compiler suite) cc65: cc65: cc65 is a complete cross development package for 65(C)02 systems, cc65: including a powerful macro assembler, a C compiler, linker, |