[qd] Build shared library.

Jussi Lehtola jussilehtola at fedoraproject.org
Wed Nov 3 10:23:40 UTC 2010


commit bcbe78d431f56c52f19a1ce014f169189223c955
Author: Jussi Lehtola <jussilehtola at fedoraproject.org>
Date:   Wed Nov 3 12:23:34 2010 +0200

    Build shared library.

 qd-2.3.11-sharedlib.patch |  148 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 148 insertions(+), 0 deletions(-)
---
diff --git a/qd-2.3.11-sharedlib.patch b/qd-2.3.11-sharedlib.patch
new file mode 100644
index 0000000..3200204
--- /dev/null
+++ b/qd-2.3.11-sharedlib.patch
@@ -0,0 +1,148 @@
+diff --git a/qd-2.3.11-libtool.patch b/qd-2.3.11-libtool.patch
+new file mode 100644
+index 0000000..f587d07
+--- /dev/null
++++ b/qd-2.3.11-libtool.patch
+@@ -0,0 +1,45 @@
++diff -u qd-2.3.11/configure.ac\~ qd-2.3.11/configure.ac
++--- qd-2.3.11/configure.ac~	2009-05-12 03:45:05.000000000 +1000
+++++ qd-2.3.11/configure.ac	2010-11-03 10:24:01.000000000 +1000
++@@ -312,7 +312,7 @@
++ 
++ # libtool stuff
++ # AC_DISABLE_SHARED
++-# AC_PROG_LIBTOOL
+++AC_PROG_LIBTOOL
++ AC_PROG_RANLIB
++ 
++ # Output
++diff -u qd-2.3.11/src/Makefile.am\~ qd-2.3.11/src/Makefile.am
++--- qd-2.3.11/src/Makefile.am~	2009-05-12 03:45:05.000000000 +1000
+++++ qd-2.3.11/src/Makefile.am	2010-11-03 13:26:45.000000000 +1000
++@@ -1,9 +1,9 @@
++ SRC = c_dd.cpp c_qd.cpp dd_real.cpp dd_const.cpp \
++       fpu.cpp qd_real.cpp qd_const.cpp util.cpp bits.cpp util.h
++ 
++-lib_LIBRARIES = libqd.a
+++lib_LTLIBRARIES = libqd.la
++ 
++-libqd_a_SOURCES = $(SRC)
+++libqd_la_SOURCES = $(SRC)
++ 
++ AM_CPPFLAGS = -I$(top_builddir) -I$(top_builddir)/include -I$(top_srcdir)/include
++ 
++diff -u qd-2.3.11/tests/Makefile.am\~ qd-2.3.11/tests/Makefile.am
++--- qd-2.3.11/tests/Makefile.am~	2009-05-12 03:45:05.000000000 +1000
+++++ qd-2.3.11/tests/Makefile.am	2010-11-03 13:56:03.000000000 +1000
++@@ -1,4 +1,4 @@
++-LDADD = $(top_builddir)/src/libqd.a
+++LDADD = $(top_builddir)/src/libqd.la
++ AM_CPPFLAGS = -I$(top_builddir) -I$(top_builddir)/include -I$(top_srcdir)/include
++ 
++ TESTS = qd_test pslq_test c_test
++@@ -17,7 +17,7 @@
++ f_test_LINK=$(CXXLINK)
++ f_test_LDADD = $(top_builddir)/fortran/libqdmod.a \
++                $(top_builddir)/fortran/libqd_f_main.a \
++-               $(LDADD) $(top_builddir)/src/libqd.a $(FCLIBS)
+++               $(LDADD) $(top_builddir)/src/libqd.la $(FCLIBS)
++ endif
++ 
++ CLEANFILES=qd_timer quadt_test huge
+diff --git a/qd.spec b/qd.spec
+index cecb71c..5cec3b4 100644
+--- a/qd.spec
++++ b/qd.spec
+@@ -3,7 +3,7 @@
+ 
+ Name:		qd
+ Version:	2.3.11
+-Release:	1%{?dist}
++Release:	2%{?dist}
+ Summary:	Double-Double and Quad-Double Arithmetic
+ Group:		Applications/Engineering
+ License:	BSD
+@@ -13,6 +13,7 @@ BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+ 
+ BuildRequires:	gcc-c++
+ BuildRequires:	gcc-gfortran
++Patch1:		qd-2.3.11-libtool.patch
+ 
+ %description
+ This package provides numeric types of twice the precision of IEEE
+@@ -31,7 +32,7 @@ are also included.
+ %package devel
+ Summary:	Double-Double and Quad-Double Arithmetic
+ Group:		Applications/Engineering
+-Provides:	qd-static = %{name}-%{version}
++Obsoletes:	qd-static < %{name}-%{version}
+ 
+ %description devel
+ This package provides numeric types of twice the precision of IEEE
+@@ -50,13 +51,15 @@ are also included.
+ 
+ %prep
+ %setup -q -n qd-%{version}
++%patch1 -p1 -b .orig
++autoreconf -i
+ 
+ %build
+ export CC=gcc
+ export CXX=g++	
+ export FC=gfortran
+ export FCFLAGS="%{optflags}"
+-%configure --enable-shared --disable-static
++%configure --disable-static
+ make %{?_smp_mflags}
+ 
+ 
+@@ -65,31 +68,45 @@ rm -rf $RPM_BUILD_ROOT
+ make install DESTDIR=$RPM_BUILD_ROOT
+ 
+ # Fix location of documentation
+-mv %{buildroot}/usr/share/doc/qd/* .
+-rm -rf %{buildroot}/usr/share/
++mv %{buildroot}%{_docdir}/qd/* .
++rm -rf %{buildroot}%{_datadir}
+ 
+ # Move Fortran modules to %{_fmoddir}
+ mkdir -p %{buildroot}%{_fmoddir}/%{name}
+ mv %{buildroot}%{_libdir}/%{name}/*.mod %{buildroot}%{_fmoddir}/%{name}
+ 
++rm %{buildroot}%{_libdir}/libqd.la
++
+ %check
+ make check
+ 
+ %clean
+ rm -rf $RPM_BUILD_ROOT
+ 
++%post -p /sbin/ldconfig
++
++%postun -p /sbin/ldconfig
++
++%files
++%defattr(-,root,root,-)
++%doc AUTHORS COPYING
++%{_libdir}/libqd.so.*
++
+ %files devel
+ %defattr(-,root,root,-)
+-%doc AUTHORS COPYING NEWS README qd.pdf TODO
++%doc NEWS README qd.pdf TODO
+ %{_bindir}/qd-config
+ %{_fmoddir}/qd/
+ %{_includedir}/qd/
+-%{_libdir}/libqd.a
++%{_libdir}/libqd.so
+ %{_libdir}/libqd_f_main.a
+ %{_libdir}/libqdmod.a
+ 
+ 
+ %changelog
++* Wed Nov  3 2010 Jens Petersen <petersen at redhat.com> - 2.3.11-2
++- build shared library: qd-2.3.11-libtool.patch ported from debian
++
+ * Tue Nov 02 2010 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.3.11-1
+ - Update to 2.3.11.
+ 


More information about the scm-commits mailing list