[libgap/f20] Initial import (#919703)
pcpa
pcpa at fedoraproject.org
Wed Oct 9 16:15:54 UTC 2013
commit ace75ed2dd04c64448374d3b8a886cec1c47af0d
Author: pcpa <paulo.cesar.pereira.de.andrade at gmail.com>
Date: Wed Oct 9 13:15:29 2013 -0300
Initial import (#919703)
.gitignore | 1 +
libgap-arch.patch | 16 ++++++++++
libgap-nogmp.patch | 51 ++++++++++++++++++++++++++++++++
libgap.spec | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 150 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..13cdb6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libgap-4.6.5.tar.gz
diff --git a/libgap-arch.patch b/libgap-arch.patch
new file mode 100644
index 0000000..7501daa
--- /dev/null
+++ b/libgap-arch.patch
@@ -0,0 +1,16 @@
+diff -up libgap-4.6.5/test/shell.c.orig libgap-4.6.5/test/shell.c
+--- libgap-4.6.5/test/shell.c.orig 2013-10-05 15:38:25.000000000 -0300
++++ libgap-4.6.5/test/shell.c 2013-10-08 13:58:30.693530447 -0300
+@@ -20,10 +20,12 @@ extern char **environ;
+
+ void print_stack_start()
+ {
++#if defined(__i386__) || defined(__x86_64__)
+ register void* ebp asm("ebp");
+ int i;
+ printf("ebp = %p\n", ebp);
+ printf("&i = %p\n", &i);
++#endif
+ printf("frame addres = %p\n", __builtin_frame_address(0));
+ }
+
diff --git a/libgap-nogmp.patch b/libgap-nogmp.patch
new file mode 100644
index 0000000..fb29c46
--- /dev/null
+++ b/libgap-nogmp.patch
@@ -0,0 +1,51 @@
+diff -up libgap-4.6.5/configure.ac.orig libgap-4.6.5/configure.ac
+--- libgap-4.6.5/configure.ac.orig 2013-10-08 14:17:30.690574102 -0300
++++ libgap-4.6.5/configure.ac 2013-10-08 14:17:41.199574504 -0300
+@@ -28,14 +28,16 @@ AC_ARG_WITH(gmp,
+ This tells configure where to find the GMP library and headers.
+ e.g. --with-gmp=/usr/local or --with-gmp=/usr]))]
+ )
+-if test "x$GMP_PREFIX" != x ; then
+- GMP_LIBS=" -L${GMP_PREFIX}/lib"
+- GMP_CFLAGS=" -I${GMP_PREFIX}/include"
+-else
+- GMP_LIBS=""
+- GMP_CFLAGS=""
++if test "x$GMP_PREFIX" != xno ; then
++ if test "x$GMP_PREFIX" != x ; then
++ GMP_LIBS=" -L${GMP_PREFIX}/lib"
++ GMP_CFLAGS=" -I${GMP_PREFIX}/include"
++ else
++ GMP_LIBS=""
++ GMP_CFLAGS=""
++ fi
++ GMP_LIBS="${GMP_LIBS} -lgmp"
+ fi
+-GMP_LIBS="${GMP_LIBS} -lgmp"
+ AC_SUBST(GMP_LIBS)
+ AC_SUBST(GMP_CFLAGS)
+
+diff -up libgap-4.6.5/test/Makefile.am.orig libgap-4.6.5/test/Makefile.am
+--- libgap-4.6.5/test/Makefile.am.orig 2013-10-08 14:17:19.256573664 -0300
++++ libgap-4.6.5/test/Makefile.am 2013-10-08 14:17:53.477574974 -0300
+@@ -7,17 +7,17 @@ check_PROGRAMS = test shell error_handle
+ test_SOURCES = test.c
+ test_CFLAGS = @GMP_CFLAGS@
+ test_LDADD = @top_builddir@/src/libgap.la
+-test_LDFLAGS = -lgmp -lm
++test_LDFLAGS = @GMP_LIBS@ -lm
+
+ shell_SOURCES = shell.c
+ shell_CFLAGS = @GMP_CFLAGS@
+ shell_LDADD = @top_builddir@/src/libgap.la
+-shell_LDFLAGS = -lgmp -lm
++shell_LDFLAGS = @GMP_LIBS@ -lm
+
+ error_handler_SOURCES = error_handler.c
+ error_handler_CFLAGS = @GMP_CFLAGS@
+ error_handler_LDADD = @top_builddir@/src/libgap.la
+-error_handler_LDFLAGS = -lgmp -lm
++error_handler_LDFLAGS = @GMP_LIBS@ -lm
+
+ dist-hook:
+ echo '*** /test dist-hook *******************************'
diff --git a/libgap.spec b/libgap.spec
new file mode 100644
index 0000000..bc66c15
--- /dev/null
+++ b/libgap.spec
@@ -0,0 +1,81 @@
+Name: libgap
+Version: 4.6.5
+Release: 3%{?dist}
+License: GPLv2+
+Group: Applications/Engineering
+Summary: C library version of the GAP kernel
+URL: https://bitbucket.org/vbraun/libgap
+Source0: https://bitbucket.org/vbraun/libgap/downloads/%{name}-%{version}.tar.gz
+BuildRequires: libtool
+BuildRequires: gap-devel
+BuildRequires: gap-libs
+Patch0: %{name}-arch.patch
+Patch1: %{name}-nogmp.patch
+
+%description
+LibGAP -- a C library version of the GAP kernel (http://www.gap-system.org)
+
+LibGAP is essentially a fork of the upstream GAP kernel. It is developed
+in its own repository at https://bitbucket.org/vbraun/libgap. This is
+also where the spkg metadata is tracked.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the header files and development documentation
+for %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+# due to patching configure.ac in patch1
+autoreconf -ifs
+
+%build
+export CFLAGS='%{optflags} -DSYS_DEFAULT_PATHS=\"%{_gap_dir}\"'
+%configure --enable-shared --disable-static --without-gmp
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR=%{buildroot}
+rm %{buildroot}%{_libdir}/*.la
+
+%check
+make check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%doc AUTHORS
+%doc COPYING
+%doc README
+%{_libdir}/%{name}.so.0*
+
+%files devel
+%{_includedir}/gap
+%{_libdir}/%{name}.so
+
+%changelog
+* Tue Oct 8 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 4.6.5-3
+- Only run x86 specific asm code on x86 (#919703#c17)
+- Do not link to gmp as gmp interface is disabled (#919703#c17)
+
+* Sat Oct 5 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 4.6.5-2
+- Make CFLAGS an environment variable (#919703#c12)
+- Add gap-libs to build requires (#919703#c12)
+- Make package exclusive arch x86.
+
+* Sat Oct 5 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 4.6.5-1
+- Update to version matching rawhide gap (#919703#c8)
+
+* Sat Sep 14 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 4.6.4.p0-1
+- Update to latest version in bz (#919703#c4)
+
+* Fri Feb 22 2013 pcpa <paulo.cesar.pereira.de.andrade at gmail.com> - 4.5.7-1
+- Initial libgap spec.
diff --git a/sources b/sources
index e69de29..042e16f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+d7b7ffe563d5ef2490d5712900b76456 libgap-4.6.5.tar.gz
More information about the scm-commits
mailing list