From ebd4e81a1fe92d7ca8521c10f34b28cef2c70dcb Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 12 Mar 2024 21:35:43 -0400 Subject: [PATCH] development/cosmocc: Updated for version 3.3.2. Signed-off-by: B. Watson Signed-off-by: Willy Sudiarto Raharjo --- development/cosmocc/cosmocc.SlackBuild | 27 +++++++++++++++++--------- development/cosmocc/cosmocc.info | 6 +++--- development/cosmocc/wrapper.sh | 3 +++ 3 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 development/cosmocc/wrapper.sh diff --git a/development/cosmocc/cosmocc.SlackBuild b/development/cosmocc/cosmocc.SlackBuild index bfb1b259ca..b8f92c53b3 100644 --- a/development/cosmocc/cosmocc.SlackBuild +++ b/development/cosmocc/cosmocc.SlackBuild @@ -7,6 +7,11 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20240312 bkw: +# - update for v3.3.2. +# - use wrapper script rather than symlinks for /usr/bin/* since the +# symlinks didn't actually work. + # 20240219 bkw: BUILD=3 # - Take over maintenance. # - Relicense as WTFPL. @@ -16,8 +21,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=cosmocc -VERSION=${VERSION:-3.2.4} -BUILD=${BUILD:-3} +VERSION=${VERSION:-3.3.2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -58,15 +63,19 @@ for i in bin include x86_64-linux-cosmo aarch64-linux-cosmo libexec; do mv $i $PKG/opt/$PRGNAM done -$(cd $PKG/usr/bin/; - for i in mktemper march-native zipcopy apelink cosmocross cosmoar \ - assimilate zipobj cosmoaddr2line cosmocc mkdeps cosmoc++ \ - cosmoinstall pecheck; do - ln -s ../../opt/$PRGNAM/bin/$i $i; - done;); +install -oroot -groot -m0755 $CWD/wrapper.sh $PKG/opt/$PRGNAM/bin/wrapper.sh + +# 20240312 bkw: can't use symlinks for these, or else we get: +# /usr/bin/cosmocc: line 327: /usr/bin/x86_64-linux-cosmo-gcc: No such file or directory +for i in mktemper march-native zipcopy apelink cosmocross cosmoar \ + assimilate zipobj cosmoaddr2line cosmocc mkdeps cosmoc++ \ + cosmoinstall pecheck +do + ln -s ../../opt/$PRGNAM/bin/wrapper.sh $PKG/usr/bin/$i +done # remove empty directories: -rmdir $PKG/opt/cosmocc/libexec/gcc/{x86_64,aarch64}-linux-cosmo/11.2.0/install-tools +rmdir $PKG/opt/cosmocc/libexec/gcc/{x86_64,aarch64}-linux-cosmo/*/install-tools || true PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKGDOC diff --git a/development/cosmocc/cosmocc.info b/development/cosmocc/cosmocc.info index 0f56d7f645..61866f46d4 100644 --- a/development/cosmocc/cosmocc.info +++ b/development/cosmocc/cosmocc.info @@ -1,10 +1,10 @@ PRGNAM="cosmocc" -VERSION="3.2.4" +VERSION="3.3.2" HOMEPAGE="https://github.com/jart/cosmopolitan" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="https://cosmo.zip/pub/cosmocc/cosmocc-3.2.4.zip" -MD5SUM_x86_64="77388a5964416aaa65ac60e400e3569a" +DOWNLOAD_x86_64="https://cosmo.zip/pub/cosmocc/cosmocc-3.3.2.zip" +MD5SUM_x86_64="5a6be78d383795581c74a8854cd9d284" REQUIRES="" MAINTAINER="B. Watson" EMAIL="urchlay@slackware.uk" diff --git a/development/cosmocc/wrapper.sh b/development/cosmocc/wrapper.sh new file mode 100644 index 0000000000..09cfb295d1 --- /dev/null +++ b/development/cosmocc/wrapper.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +exec /opt/cosmocc/bin/$( basename $0 ) "$@"