[cfitsio] Enable multithreading support

Sergio Pascual sergiopr at fedoraproject.org
Thu Nov 24 22:18:20 UTC 2011


commit 29bdddbf8ca5bb604bfa93497685512a92a5d202
Author: Sergio Pascual <sergio.pasra at gmail.com>
Date:   Thu Nov 24 23:17:43 2011 +0100

    Enable multithreading support

 cfitsio-pkgconfig-reentrant.patch |    9 +++++++++
 cfitsio.patch                     |    2 --
 cfitsio.spec                      |   13 ++++++++++---
 makefile.patch                    |   12 ++++++++++++
 4 files changed, 31 insertions(+), 5 deletions(-)
---
diff --git a/cfitsio-pkgconfig-reentrant.patch b/cfitsio-pkgconfig-reentrant.patch
new file mode 100644
index 0000000..b21137d
--- /dev/null
+++ b/cfitsio-pkgconfig-reentrant.patch
@@ -0,0 +1,9 @@
+diff -ur cfitsio/cfitsio.pc.in cfitsio.new/cfitsio.pc.in
+--- cfitsio/cfitsio.pc.in	2011-10-29 16:54:43.081132723 +0200
++++ cfitsio.new/cfitsio.pc.in	2011-10-29 16:56:49.933619756 +0200
+@@ -8,4 +8,4 @@
+ Version: 3.280
+ Libs: -L${libdir} -lcfitsio @LIBS@
+ Libs.private: -lm
+-Cflags: -I${includedir}
++Cflags: -D_REENTRANT -I${includedir}
diff --git a/cfitsio.patch b/cfitsio.patch
index 05ec403..6d83499 100644
--- a/cfitsio.patch
+++ b/cfitsio.patch
@@ -32,5 +32,3 @@ diff -ur cfitsio/Makefile.in cfitsio-fixed/Makefile.in
 +CFITSIO_LIB	= $(DESTDIR)$(exec_prefix)/$(LIBDIR)
 +CFITSIO_INCLUDE	= $(DESTDIR)$(prefix)/$(INCLUDEDIR)
  INSTALL_DIRS	= $(DESTDIR)@INSTALL_ROOT@ ${CFITSIO_LIB} ${CFITSIO_LIB}/pkgconfig ${CFITSIO_INCLUDE}
- 
- 
diff --git a/cfitsio.spec b/cfitsio.spec
index ca6aaf8..88db4b4 100644
--- a/cfitsio.spec
+++ b/cfitsio.spec
@@ -1,6 +1,6 @@
 Name:           cfitsio
 Version:        3.280
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Library for manipulating FITS data files
 
 Group:          Development/Libraries
@@ -11,6 +11,8 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch0:         cfitsio.patch
 Patch1:         cfitsio-pkgconfig.patch
 Patch2:         cfitsio-s390.patch
+Patch3:         makefile.patch
+Patch4:         cfitsio-pkgconfig-reentrant.patch
 
 BuildRequires:     gcc-gfortran
 Requires(post):    /sbin/ldconfig
@@ -30,7 +32,7 @@ community.
 Group:  Development/Libraries
 Summary: Headers required when building programs against cfitsio
 Requires: %{name} = %{version}-%{release}
-Requires: pkgconfig
+Requires: pkgconfig glibc-headers
 
 %description devel
 Headers required when building a program against the cfitsio library.
@@ -78,12 +80,14 @@ compression algorithm.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 FC=f95
 export FC
 export CC=gcc # fixes -O*, -g
-%configure
+%configure --enable-reentrant
 make shared %{?_smp_mflags}
 ln -s libcfitsio.so.0 libcfitsio.so
 make fpack %{?_smp_mflags}
@@ -146,6 +150,9 @@ rm -rf %{buildroot}
 %{_bindir}/funpack
 
 %changelog
+* Sat Oct 29 2011 Sergio Pascual <sergiopr at fedoraproject.org> - 3.280-2
+- Enable multithreading support
+
 * Thu Jun 09 2011 Sergio Pascual <sergiopr at fedoraproject.org> - 3.280-1
 - New upstream version, with improved image compression floating-point FITS
 
diff --git a/makefile.patch b/makefile.patch
new file mode 100644
index 0000000..d630e6c
--- /dev/null
+++ b/makefile.patch
@@ -0,0 +1,12 @@
+diff -ur cfitsio/Makefile.in cfitsio.new/Makefile.in
+--- cfitsio/Makefile.in	2011-10-29 16:54:43.077132582 +0200
++++ cfitsio.new/Makefile.in	2011-10-29 16:55:38.648098260 +0200
+@@ -90,7 +90,7 @@
+ shared: libcfitsio${SHLIB_SUFFIX}
+ 
+ libcfitsio${SHLIB_SUFFIX}: ${OBJECTS}
+-		${SHLIB_LD} ${LDFLAGS} -o $@ ${OBJECTS}
++		${SHLIB_LD} ${LDFLAGS} ${LIBS} -lm -o $@ ${OBJECTS}
+ 
+ install:	libcfitsio.a $(INSTALL_DIRS)
+ 		@if [ -f libcfitsio.a ]; then \


More information about the scm-commits mailing list