[cfitsio/el6] Enable multithreading support Fix pkgconfig version number.

Sergio Pascual sergiopr at fedoraproject.org
Sun Dec 4 15:43:24 UTC 2011


commit 27f512f93b324b988257aee1be4662662e1611f7
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date:   Sun Dec 4 16:42:58 2011 +0100

    Enable multithreading support
    Fix pkgconfig version number.

 cfitsio-pkgconfig-reentrant.patch |    9 +++++++++
 cfitsio-s390.patch                |   18 ++++++++++++++++++
 cfitsio.spec                      |   14 ++++++++++++--
 makefile.patch                    |   12 ++++++++++++
 4 files changed, 51 insertions(+), 2 deletions(-)
---
diff --git a/cfitsio-pkgconfig-reentrant.patch b/cfitsio-pkgconfig-reentrant.patch
new file mode 100644
index 0000000..02d57f4
--- /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.240
+ Libs: -L${libdir} -lcfitsio @LIBS@
+ Libs.private: -lm
+-Cflags: -I${includedir}
++Cflags: -D_REENTRANT -I${includedir}
diff --git a/cfitsio-s390.patch b/cfitsio-s390.patch
new file mode 100644
index 0000000..bf7b52d
--- /dev/null
+++ b/cfitsio-s390.patch
@@ -0,0 +1,18 @@
+diff -urN cfitsio/fitsio2.h cfitsio_new/fitsio2.h
+--- cfitsio/fitsio2.h	2010-01-26 18:40:25.000000000 +0100
++++ cfitsio_new/fitsio2.h	2010-06-30 17:24:59.000000000 +0200
+@@ -85,6 +85,14 @@
+ #define MACHINE NATIVE
+ #define LONGSIZE 64   
+ 
++#elif defined(__s390x__)
++#define BYTESWAPPED FALSE
++#define LONGSIZE 64
++
++#elif defined(__s390__)
++#define BYTESWAPPED FALSE
++#define LONGSIZE 32
++
+ #elif defined(__ia64__)  || defined(__x86_64__)
+                   /*  Intel itanium 64-bit PC, or AMD opteron 64-bit PC */
+ #define BYTESWAPPED TRUE
diff --git a/cfitsio.spec b/cfitsio.spec
index d387966..5bf402f 100644
--- a/cfitsio.spec
+++ b/cfitsio.spec
@@ -1,6 +1,6 @@
 Name:           cfitsio
 Version:        3.240
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Library for manipulating FITS data files
 
 Group:          Development/Libraries
@@ -9,6 +9,9 @@ URL:            http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html
 Source0:        ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio3240.tar.gz
 Patch0:         cfitsio.patch
 Patch1:         cfitsio-pkgconfig.patch
+Patch2:         cfitsio-s390.patch
+Patch3:         makefile.patch
+Patch4:         cfitsio-pkgconfig-reentrant.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:     gcc-gfortran
@@ -53,12 +56,15 @@ Stand-alone documentation for cfitsio.
 %setup -q -n cfitsio
 %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}
 unset FC
 # Manually fix pkgconfig .pc file (BZ 436539)
@@ -113,6 +119,10 @@ rm -rf %{buildroot}
 %doc fitsio.doc fitsio.ps cfitsio.doc cfitsio.ps
 
 %changelog
+* Sun Dec 04 2011 Sergio Pascual <sergiopr at fedoraproject.org> - 3.240-3
+- Enable multithreading support
+- Fix pkgconfig version number.
+
 * Sun Feb 21 2010 Matthew Truch <matt at truch.net> - 3.240-2
 - Fix pkgconfig version number.
 
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