From 387fc867c347c6ddd7104a7c3f2962b687fec06a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 7 Sep 2018 15:46:56 -0400 Subject: development/cc65: Updated for version 2.17_20180906. Signed-off-by: B. Watson --- development/cc65/README | 6 ++++ development/cc65/README_SBo.txt | 40 ++++++++++++++++++++++++ development/cc65/cc65.SlackBuild | 8 ++++- development/cc65/cc65.info | 6 ++-- development/cc65/git2targz.sh | 54 -------------------------------- development/cc65/git2tarxz.sh | 66 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+), 58 deletions(-) create mode 100644 development/cc65/README_SBo.txt delete mode 100644 development/cc65/git2targz.sh create mode 100644 development/cc65/git2tarxz.sh (limited to 'development') diff --git a/development/cc65/README b/development/cc65/README index bf08c187db..9c046f4d84 100644 --- a/development/cc65/README +++ b/development/cc65/README @@ -1,3 +1,5 @@ +cc65 (6502 cross compiler suite) + cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools. @@ -5,3 +7,7 @@ and several other tools. Supported targets include the Atari 400/800/XL/XE computers, the Atari Lynx console, the Commodore PET/VIC/64/16/Plus4, the Nintendo NES, the Apple II, and others. + +The cc65 project rarely does releases. This build is updated once or +twice a year, to the latest git. If you need a specific version of cc65, +see README_SBo.txt. diff --git a/development/cc65/README_SBo.txt b/development/cc65/README_SBo.txt new file mode 100644 index 0000000000..b6afc73c71 --- /dev/null +++ b/development/cc65/README_SBo.txt @@ -0,0 +1,40 @@ +cc65 releases are few and far between, so unlike most SlackBuilds, this +one packages a git snapshot. The build is only updated once or twice a +year, but you might find you need a later snapshot that fixes a bug or +adds a feature that you need. + +To build a specific tag or commit of the cc65 source, use the git2tarxz.sh +script included in the SlackBuild directory. For instance, to build a +package of the 2.17 release: + +# sh git2tarxz.sh V2.17 + +You could use a commit hash instead: + +# sh git2tarxz.sh 8e75906 + +The last lines of output from git2tarxz.sh show the filename of +the created tarball and the VERSION you should set in the script's +environment. For the above example: + +Created tarball: cc65-2.17_20180307.tar.xz +VERSION=2.17_20180307 + +So you'd this this command to build the package: + +# VERSION=2.17_20180307 sh ./cc65.SlackBuild + +Notes: + +- Obviously I haven't tested every single commit. There are thousands + of them. If the SlackBuild fails, either use a different commit, + or contact me on IRC (user Urchlay on FreeNode ##slackbuilds or the + email address in the .info file) and I'll try to help. + +- git2tarxz.sh will probably fail on Slackware-current. Use 14.2 to + prepare the source, even if you're going to build on -current. See + the comments in the script about linuxdoc-tools for details. + +- The output of "cc65 --version" will always include the git commit that + was used to build it. This might be useful to know, if you're messing + around with different revisions. diff --git a/development/cc65/cc65.SlackBuild b/development/cc65/cc65.SlackBuild index 0cf38ce354..b14c8fd4d1 100644 --- a/development/cc65/cc65.SlackBuild +++ b/development/cc65/cc65.SlackBuild @@ -6,6 +6,12 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20180907 bkw: +# - Update for 2.17_20180906, git commit b6ccd4d. +# - Rename git2targz.sh => git2tarxz.sh. +# - Add option to git2tarxz.sh to use a specific tag/commit. +# - Add README_SBo.txt documenting the use of git2tarxz.sh. + # 20180103 bkw: # - Update for 2.16_20180102, git commit 040134e7. # - "prefix" renamed to "PREFIX" in src/Makefile. For now, set both in @@ -28,7 +34,7 @@ # reason. Source is created from a git checkout, see git2targz.sh. PRGNAM=cc65 -VERSION=${VERSION:-2.16_20180102} +VERSION=${VERSION:-2.17_20180906} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} diff --git a/development/cc65/cc65.info b/development/cc65/cc65.info index a2abd4e7ac..dd8bf99520 100644 --- a/development/cc65/cc65.info +++ b/development/cc65/cc65.info @@ -1,8 +1,8 @@ PRGNAM="cc65" -VERSION="2.16_20180102" +VERSION="2.17_20180906" HOMEPAGE="http://cc65.github.io/cc65/" -DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/cc65-2.16_20180102.tar.xz" -MD5SUM="afa1bbaf50aa47d132f719782198cdb4" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/cc65-2.17_20180906.tar.xz" +MD5SUM="d7dc9291c44251b018b271dd1c653bb5" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/development/cc65/git2targz.sh b/development/cc65/git2targz.sh deleted file mode 100644 index 68c19ebad6..0000000000 --- a/development/cc65/git2targz.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/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 - -# DIRTY HACK ALERT: -# -current's linuxdoc-tools hates upstream's sgml docs, and it's not -# obvious what's wrong (bug/regression in linuxdoc-tools? 14.2's worked -# fine). I'm not interested in trying to fix the problem because I -# fucking hate XML, and I especially hate the mess that's the Slackware -# linuxdoc-tools (28 source tarballs, interdependent). So I'll just -# include pre-generated (on 14.2) HTML docs in my self-hosted source -# tarball. -make -C doc html - -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/git2tarxz.sh b/development/cc65/git2tarxz.sh new file mode 100644 index 0000000000..cef2f1f557 --- /dev/null +++ b/development/cc65/git2tarxz.sh @@ -0,0 +1,66 @@ +#!/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. + +# Takes one optional argument, which is the commit or tag to create +# a tarball of. With no arg, HEAD is used. + +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 + +if [ "$1" != "" ]; then + git reset --hard "$1" || exit 1 +fi + +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 + +# DIRTY HACK ALERT: +# -current's linuxdoc-tools hates upstream's sgml docs, and it's not +# obvious what's wrong (bug/regression in linuxdoc-tools? 14.2's worked +# fine). I'm not interested in trying to fix the problem because I +# fucking hate XML, and I especially hate the mess that's the Slackware +# linuxdoc-tools (28 source tarballs, interdependent). So I'll just +# include pre-generated (on 14.2) HTML docs in my self-hosted source +# tarball. +make -C doc html + +cd "$CWD" +rm -rf $PRGNAM-$VERSION $PRGNAM-$VERSION.tar.xz +mv $GITDIR $PRGNAM-$VERSION +tar cvfJ $PRGNAM-$VERSION.tar.xz $PRGNAM-$VERSION + +echo +echo "Created tarball: $PRGNAM-$VERSION.tar.xz" +echo "VERSION=$VERSION" -- cgit v1.2.3