From a2c4df8f1a2a3467bad37fa31d604439ec9b3970288e2594fc0f4c9024c7d95b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 18 Jun 2014 17:23:18 +0000 Subject: [PATCH] - Added incl.diff to resolve build failure OBS-URL: https://build.opensuse.org/package/show/science/gap-float?expand=0&rev=4 --- gap-float.changes | 1 + gap-float.spec | 21 +++---------- incl.diff | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 16 deletions(-) create mode 100644 incl.diff diff --git a/gap-float.changes b/gap-float.changes index 45f2cd3..488749e 100644 --- a/gap-float.changes +++ b/gap-float.changes @@ -3,6 +3,7 @@ Wed Jun 18 16:59:55 UTC 2014 - jengelh@inai.de - Update to new upstream release 0.5.18 * No changelog was provided +- Added incl.diff to resolve build failure ------------------------------------------------------------------- Fri Apr 18 10:20:23 UTC 2014 - jengelh@inai.de diff --git a/gap-float.spec b/gap-float.spec index e8de0af..92f77b9 100644 --- a/gap-float.spec +++ b/gap-float.spec @@ -26,6 +26,7 @@ Url: http://laurentbartholdi.github.com/float/ #Git-Clone: git://github.com/laurentbartholdi/float/ Source: ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages/Float-%version.tar.bz2 +Patch1: incl.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -48,23 +49,10 @@ FPLLL. %prep %setup -qn float-%version +%patch -P 1 -p1 %build -# autoconf needs to be rerun, because upstream failed to do so after -# applying changes to configure.in -# -# configure:17420: checking for lllReduction in -lfplll -# configure:17433: g++ -o conftest -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include -L/usr/lib -lfplll -lgmp conftest.cpp >&5 -# /tmp/ccbQMiJi.o: In function `~Z_NR': -# /usr/include/fplll/nr.cpp:485: undefined reference to `__gmpz_clear' -# -# The correct line after autoconf is: -# configure:17464: g++ -o conftest -fomit-frame-pointer -fmessage-length=0 -grecord-gcc-switches -fstack-protector -O2 -Wall -D_FORTIFY_SOURCE=2 -funwind-tables -fasynchronous-unwind-tables -g -I/usr/include -L/usr/lib conftest.cpp -lfplll -lgmp >&5 - -pushd cnf/ -autoconf -cp configure .. -popd +autoreconf -fi %configure --with-gaproot="%gapdir" --with-cxsc-include="%_includedir/cxsc" \ --with-fplll="%_prefix"; make %{?_smp_mflags} @@ -72,8 +60,9 @@ make %{?_smp_mflags} %install rm -Rf bin/*/.libs find bin -type f ! -name float.so -delete +rm -Rf {aclocal.m4,autom4*,build-aux,config.*,configu*,libtool*,m4,src} +find . -type f -name "Makefile*" -delete %gappkg_simple_install -rm -Rf "%buildroot/$moddir"/{cnf,configu*,src} %files -f %name.files %defattr(-,root,root) diff --git a/incl.diff b/incl.diff new file mode 100644 index 0000000..42138f3 --- /dev/null +++ b/incl.diff @@ -0,0 +1,79 @@ +From: Jan Engelhardt +Date: 2014-06-18 19:13:44.267333132 +0200 + +The project builds C++ files, but _CFLAGS only applies to .c files. +The flags must go into _CPPFLAGS for all languages' preprocessor. +--- + m4/ac_check_cxsc.m4 | 12 ++++++------ + src/Makefile.am | 2 +- + 2 files changed, 7 insertions(+), 7 deletions(-) + +Index: float-0.5.18/m4/ac_check_cxsc.m4 +=================================================================== +--- float-0.5.18.orig/m4/ac_check_cxsc.m4 ++++ float-0.5.18/m4/ac_check_cxsc.m4 +@@ -1,5 +1,5 @@ + # check for cxsc library +-# sets CXSC_CFLAGS, CXSC_LDFLAGS, CXSC_MAKELIB and CXSC_LIBS, ++# sets CXSC_CPPFLAGS, CXSC_LDFLAGS, CXSC_MAKELIB and CXSC_LIBS, + # and CXSC_WITH, CXSC_DEPEND, + # and CXSC=yes/no/extern + +@@ -28,7 +28,7 @@ AC_ARG_WITH(cxsc, + else + CXSC_WITH="$CXSC_WITH --with-cxsc=$withval" + CXSC=yes +- CXSC_CFLAGS="-I$withval/include"; CXSC_LDFLAGS="-L$withval/lib" ++ CXSC_CPPFLAGS="-I$withval/include"; CXSC_LDFLAGS="-L$withval/lib" + fi] + ) + +@@ -37,7 +37,7 @@ AC_ARG_WITH(cxsc-include, + Location at which the cxsc include files were installed.], + [CXSC=yes + CXSC_WITH="$CXSC_WITH --with-cxsc-include=$withval" +- CXSC_CFLAGS="-I$withval"] ++ CXSC_CPPFLAGS="-I$withval"] + ) + + AC_ARG_WITH(cxsc-lib, +@@ -57,7 +57,7 @@ if test "$CXSC" != extern; then + + AC_LANG_PUSH([C++]) + temp_status=true +-CPPFLAGS="$CPPFLAGS $CXSC_CFLAGS" ++CPPFLAGS="$CPPFLAGS $CXSC_CPPFLAGS" + AC_CHECK_HEADER(real.hpp,,[temp_status=false]) + LDFLAGS="$LDFLAGS $CXSC_LDFLAGS" + AC_CHECK_LIB(cxsc,z_zadd,,[temp_status=false]) +@@ -93,7 +93,7 @@ CXSC_MAKELIB=`printf 'cxsc: $(CXSCLIB).t + fi\n'` + + MAKE_LIBTARGETS="$MAKE_LIBTARGETS cxsc" +-CXSC_CFLAGS='-I$(EXTERN)/include' ++CXSC_CPPFLAGS='-I$(EXTERN)/include' + CXSC_LDFLAGS='-L$(EXTERN)/lib' + + CXSC_WITH='--with-cxsc=$(EXTERN)' +@@ -110,7 +110,7 @@ LIBS="$temp_LIBS" + if test "$CXSC" != no; then + AC_DEFINE([USE_CXSC],1,[use CXSC library]) + fi +-AC_SUBST(CXSC_CFLAGS) ++AC_SUBST([CXSC_CPPFLAGS]) + AC_SUBST(CXSC_LDFLAGS) + AC_SUBST(CXSC_LIBS) + AC_SUBST(CXSC_MAKELIB) +Index: float-0.5.18/src/Makefile.am +=================================================================== +--- float-0.5.18.orig/src/Makefile.am ++++ float-0.5.18/src/Makefile.am +@@ -44,7 +44,7 @@ endif ## WITH_MPFR_IS_YES + + if WITH_CXSC_IS_YES + float_la_SOURCES += cxsc.C cxsc_poly.C +-float_la_CFLAGS += $(CXSC_CFLAGS) ++float_la_CPPFLAGS += $(CXSC_CPPFLAGS) + float_la_LDFLAGS += $(CXSC_LDFLAGS) + float_la_LIBADD += $(CXSC_LIBS) + endif