From 360cf2492ea031149a82bff8bc8a906adc4c2568 Mon Sep 17 00:00:00 2001 From: Toyam Cox Date: Wed, 6 Sep 2017 03:00:31 -0400 Subject: [PATCH] gsl-ucg: enable cross and clean patches --- .../gsl-ucg/patches/detect_gcc_better.patch | 41 +++---------------- srcpkgs/gsl-ucg/patches/permit-cross.patch | 10 +++++ srcpkgs/gsl-ucg/template | 1 - 3 files changed, 15 insertions(+), 37 deletions(-) create mode 100644 srcpkgs/gsl-ucg/patches/permit-cross.patch diff --git a/srcpkgs/gsl-ucg/patches/detect_gcc_better.patch b/srcpkgs/gsl-ucg/patches/detect_gcc_better.patch index d286a2e5d44..460bd65929d 100644 --- a/srcpkgs/gsl-ucg/patches/detect_gcc_better.patch +++ b/srcpkgs/gsl-ucg/patches/detect_gcc_better.patch @@ -1,44 +1,13 @@ ---- src/c.orig 2017-09-04 21:17:26.180830076 -0400 -+++ src/c 2017-09-04 21:34:22.561799357 -0400 -@@ -154,8 +154,7 @@ +--- src/c ++++ src/c +@@ -154,8 +154,8 @@ fi # # Generic modern GCC system # -case "$CCNAME" in -*gcc*) -+if [ "$(${CCNAME} --version | grep -c \(GCC\))" -gt 0 ]; then ++case "$($CCNAME --version)" in ++*gcc*|*GCC*) [ -z "$BOOM_MODEL_NOOPT" ] && CCDEBUG="-O2" [ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="$CCNODEBUG -O2" CCOPTS="-D_REENTRANT -D_GNU_SOURCE -Wall -Wno-unused -fno-strict-aliasing" -@@ -212,20 +211,18 @@ - STDLIBS="-lapr $STDLIBS" - fi - fi -- ;; --*) --# --# AIX with xlc --# --if [ "$UTYPE" = "AIX" -a "$CCNAME" = "xlc_r" ]; then -- [ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="-O" -- CCNAME="xlc_r" # Use VAC Threaded Mode -- CCPLUS="xlC_r" # Use VAC Threaded Mode -- CCOPTS="$CCOPTS -D_REENTRANT" -- STDLIBS="-lpthread" -+else -+ # -+ # AIX with xlc -+ # -+ if [ "$UTYPE" = "AIX" -a "$CCNAME" = "xlc_r" ]; then -+ [ -z "$BOOM_MODEL_NOOPT" ] && CCNODEBUG="-O" -+ CCNAME="xlc_r" # Use VAC Threaded Mode -+ CCPLUS="xlC_r" # Use VAC Threaded Mode -+ CCOPTS="$CCOPTS -D_REENTRANT" -+ STDLIBS="-lpthread" -+ fi - fi --;; --esac - - # Patch together the CC options and defines into one variable - CCOPTS="$CCOPTS $CCDEFINES" diff --git a/srcpkgs/gsl-ucg/patches/permit-cross.patch b/srcpkgs/gsl-ucg/patches/permit-cross.patch new file mode 100644 index 00000000000..03e2dc6679e --- /dev/null +++ b/srcpkgs/gsl-ucg/patches/permit-cross.patch @@ -0,0 +1,10 @@ +--- src/Makefile.bck 2017-09-06 02:54:04.375680332 -0400 ++++ src/Makefile 2017-09-06 02:54:16.048706017 -0400 +@@ -185,7 +185,6 @@ + smtxlog$(OBJ): smtxlog.c + + everything: libgsl$(LIB) gsl$(EXE) +- ./gsl$(EXE) -v + + code: + ./gsl$(EXE) -q ggconv.gxl ggdiag.gxl ggenvt.gxl ggfile.gxl gggsl.gxl ggmath.gxl ggpcre.gxl ggproc.gxl ggscrp.gxl ggsock.gxl ggstrn.gxl ggsymb.gxl ggthrd.gxl ggtime.gxl ggxml.gxl diff --git a/srcpkgs/gsl-ucg/template b/srcpkgs/gsl-ucg/template index 93158334875..ded438242f3 100644 --- a/srcpkgs/gsl-ucg/template +++ b/srcpkgs/gsl-ucg/template @@ -12,7 +12,6 @@ license="GPL-3" homepage="https://github.com/zeromq/gsl" distfiles="https://github.com/zeromq/gsl/archive/v${version}.tar.gz" checksum=12c81cf0ede5cf7d16bb91ffb7ee5310ab4adfc438b495960cdf086974e9c8d2 -nocross="Tries to execute built binary to confirm it works" pre_build() { export CC="CCNAME='$CC' ./c -q"