[SCM] Positional Astronomy Library branch, debian, updated. 3f44440d26cfd350f83e8f7c08868370bb234673

Ole Streicher debian at liska.ath.cx
Wed Feb 8 22:43:41 UTC 2012


The following commit has been merged in the debian branch:
commit 3f44440d26cfd350f83e8f7c08868370bb234673
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Feb 8 23:42:51 2012 +0100

    Use -frecursive to avoid the locking

diff --git a/debian/patches/enable_locking.patch b/debian/patches/enable_locking.patch
index 496190a..0ea61b9 100644
--- a/debian/patches/enable_locking.patch
+++ b/debian/patches/enable_locking.patch
@@ -1,8 +1,10 @@
 Author: Ole Streicher <debian at liska.ath.cx>
-Description: Since the Fortran code is not thread-save, use pthreads
+Description: If the Fortran code is not thread-save, use pthreads
  mutex to put lock/unlock statements around each Fortran call. This code
  is taken from starlink's /libraries/cnf/cnfLock.c (same copyright as the 
  slalib) to avoid the dependency from this library.
+ However, GNU Fortran supports the "-frecursive" option that actually
+ makes the calls threadsafe.
 --- slalib-2.5.5.orig/sla.c
 +++ slalib-2.5.5/sla.c
 @@ -94,6 +94,11 @@
@@ -61,9 +63,18 @@ Description: Since the Fortran code is not thread-save, use pthreads
  
  /* SLALIB wrapper implementations. */
  /* =============================== */
---- slalib-2.5.5.orig/f77.h.in
-+++ slalib-2.5.5/f77.h.in
-@@ -530,7 +530,10 @@
+--- a/f77.h.in
++++ b/f77.h.in
+@@ -524,13 +524,20 @@
+ /*  ---  Execute code synchronised by the CNF global mutex                  */
+ #include <config.h>
+ 
++#if USE_LOCAL_AUTO
++#define F77_LOCK(code) code
++#else
+ #if USE_CNF
+ #define F77_LOCK(code) \
+    cnfLock(); \
     code \
     cnfUnlock();
  #else
@@ -72,6 +83,7 @@ Description: Since the Fortran code is not thread-save, use pthreads
 +   slaLock(); \
 +   code \
 +   slaUnlock();
++#endif
  #endif
  
  /*  ---  Pass arguments to a FORTRAN routine  ---			    */
diff --git a/debian/rules b/debian/rules
index 713d8b3..70a4f61 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,7 +13,12 @@ override_dh_autoreconf:
 	AUTOMAKE="automake --foreign" dh_autoreconf
 
 override_dh_auto_configure:
-	dh_auto_configure -- --without-cnf --with-pthreads
+	dh_auto_configure -- --without-cnf --without-pthreads
+
+FFLAGS+=-frecursive -DUSE_LOCAL_AUTO
+override_dh_auto_build:
+	echo $$FFLAGS
+	dh_auto_build
 
 debiandir_SQ = $(subst ','\'',$(dir $(lastword $(MAKEFILE_LIST))))
 get-orig-source:

-- 
Positional Astronomy Library



More information about the debian-science-commits mailing list