1
0
forked from pool/gap-float

- Added incl.diff to resolve build failure

OBS-URL: https://build.opensuse.org/package/show/science/gap-float?expand=0&rev=4
This commit is contained in:
Jan Engelhardt 2014-06-18 17:23:18 +00:00 committed by Git OBS Bridge
parent 391845b7de
commit a2c4df8f1a
3 changed files with 85 additions and 16 deletions

View File

@ -3,6 +3,7 @@ Wed Jun 18 16:59:55 UTC 2014 - jengelh@inai.de
- Update to new upstream release 0.5.18 - Update to new upstream release 0.5.18
* No changelog was provided * No changelog was provided
- Added incl.diff to resolve build failure
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Apr 18 10:20:23 UTC 2014 - jengelh@inai.de Fri Apr 18 10:20:23 UTC 2014 - jengelh@inai.de

View File

@ -26,6 +26,7 @@ Url: http://laurentbartholdi.github.com/float/
#Git-Clone: git://github.com/laurentbartholdi/float/ #Git-Clone: git://github.com/laurentbartholdi/float/
Source: ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages/Float-%version.tar.bz2 Source: ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages/Float-%version.tar.bz2
Patch1: incl.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -48,23 +49,10 @@ FPLLL.
%prep %prep
%setup -qn float-%version %setup -qn float-%version
%patch -P 1 -p1
%build %build
# autoconf needs to be rerun, because upstream failed to do so after autoreconf -fi
# 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
%configure --with-gaproot="%gapdir" --with-cxsc-include="%_includedir/cxsc" \ %configure --with-gaproot="%gapdir" --with-cxsc-include="%_includedir/cxsc" \
--with-fplll="%_prefix"; --with-fplll="%_prefix";
make %{?_smp_mflags} make %{?_smp_mflags}
@ -72,8 +60,9 @@ make %{?_smp_mflags}
%install %install
rm -Rf bin/*/.libs rm -Rf bin/*/.libs
find bin -type f ! -name float.so -delete 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 %gappkg_simple_install
rm -Rf "%buildroot/$moddir"/{cnf,configu*,src}
%files -f %name.files %files -f %name.files
%defattr(-,root,root) %defattr(-,root,root)

79
incl.diff Normal file
View File

@ -0,0 +1,79 @@
From: Jan Engelhardt <jengelh@inai.de>
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