[111014] trunk/dports/science/nds2-client

aronnax at macports.org aronnax at macports.org
Fri Sep 13 10:56:07 PDT 2013


Revision: 111014
          https://trac.macports.org/changeset/111014
Author:   aronnax at macports.org
Date:     2013-09-13 10:56:07 -0700 (Fri, 13 Sep 2013)
Log Message:
-----------
nds2-client: repair build with some patches from upstream, scheduled to appear in next release

Modified Paths:
--------------
    trunk/dports/science/nds2-client/Portfile

Added Paths:
-----------
    trunk/dports/science/nds2-client/files/
    trunk/dports/science/nds2-client/files/0001-Drop-Jikes-because-it-can-t-compile-Java-1.5-source.patch
    trunk/dports/science/nds2-client/files/0002-Check-default-include-path-for-jni.h-before-resortin.patch
    trunk/dports/science/nds2-client/files/0003-Don-t-use-LINKFORSHARED-it-s-not-for-building-Python.patch

Modified: trunk/dports/science/nds2-client/Portfile
===================================================================
--- trunk/dports/science/nds2-client/Portfile	2013-09-13 17:49:23 UTC (rev 111013)
+++ trunk/dports/science/nds2-client/Portfile	2013-09-13 17:56:07 UTC (rev 111014)
@@ -4,7 +4,7 @@
 
 name              nds2-client
 version           0.10.3
-revision          1
+revision          2
 categories        science
 platforms         darwin
 license           GPL-2
@@ -33,6 +33,14 @@
                   --without-sasl \
                   --without-gssapi
 
+# Upstream build-related patches
+patchfiles        0001-Drop-Jikes-because-it-can-t-compile-Java-1.5-source.patch \
+                  0002-Check-default-include-path-for-jni.h-before-resortin.patch \
+                  0003-Don-t-use-LINKFORSHARED-it-s-not-for-building-Python.patch
+
+# Need autoreconf because patches affect configure.ac
+use_autoreconf    yes
+
 set pythons_suffixes {25 26 27 31 32}
 
 set pythons_ports {}
@@ -72,7 +80,6 @@
             depends_build-append    port:swig-python
             depends_lib-append      port:${p} port:py${s}-numpy
             configure.args-strsed   s/--disable-swig-python/--enable-swig-python/
-            configure.args-append   PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error -F${frameworks_dir} -framework Python"
             destroot.args-append    pythondir="${d}" pyexecdir="${d}"
 
         }
@@ -89,9 +96,10 @@
 
 }
 
-variant swig_java description "Enab SWIG Java interface" {
+variant swig_java description "Enable SWIG Java interface" {
 
-    depends_build-append            bin:javac:jikes bin:jar:jikes port:swig-java
+    # Need GNU Classpath to get jni.h header
+    depends_build-append            bin:javac:gcc48 port:swig-java port:gnu-classpath
     depends_lib-append              bin:java:kaffe
     configure.args-strsed           s/--disable-swig-java/--enable-swig-java/
 

Added: trunk/dports/science/nds2-client/files/0001-Drop-Jikes-because-it-can-t-compile-Java-1.5-source.patch
===================================================================
--- trunk/dports/science/nds2-client/files/0001-Drop-Jikes-because-it-can-t-compile-Java-1.5-source.patch	                        (rev 0)
+++ trunk/dports/science/nds2-client/files/0001-Drop-Jikes-because-it-can-t-compile-Java-1.5-source.patch	2013-09-13 17:56:07 UTC (rev 111014)
@@ -0,0 +1,36 @@
+commit 105f20486c171a3858172e792d341950106999bd
+Author: leo.singer at LIGO.ORG <leo.singer at LIGO.ORG@ac820499-f4a4-4ea9-b4e2-a7172f5148fc>
+Date:   Wed Sep 11 21:05:20 2013 +0000
+
+    Drop Jikes because it can't compile Java 1.5 source
+    
+    Also make build GCJ-compatible while we are at it.
+    
+    git-svn-id: https://svn.ligo.caltech.edu/svn/nds2/trunk@1154 ac820499-f4a4-4ea9-b4e2-a7172f5148fc
+
+diff --git configure.ac configure.ac
+index 6be4af8..e5c388f 100644
+--- configure.ac
++++ configure.ac
+@@ -136,7 +136,7 @@ dnl Numpy
+ AX_PYTHON_MODULE([numpy])
+ 
+ dnl javac
+-AC_CHECK_PROGS([JAVAC], ["gcj -C" guavac jikes javac])
++AC_CHECK_PROGS([JAVAC], ["gcj -C -fsource=1.5 -ftarget=1.5" "javac -source 1.5 -target 1.5"])
+ AC_ARG_VAR([JAVAC], [path to javac tool])
+ 
+ dnl docbook
+diff --git swig/java/Makefile.am swig/java/Makefile.am
+index 64df5a4..f5d022c 100644
+--- swig/java/Makefile.am
++++ swig/java/Makefile.am
+@@ -7,8 +7,6 @@ swig_sources = $(top_srcdir)/swig/nds2.i $(srcdir)/nds2_java.i $(srcdir)/jniload
+ java_classes=$(built_java_sources:%.java=nds2/%.class)
+ CLEANFILES = $(built_sources) nds2Constants.java nds2.java
+ 
+-# Options for javac to generate classes that are compatible with ancient JREs
+-AM_JAVACFLAGS = -source 1.5 -target 1.5
+ JAVAROOT = $(builddir)
+ 
+ if COND_SWIG_JAVA

Added: trunk/dports/science/nds2-client/files/0002-Check-default-include-path-for-jni.h-before-resortin.patch
===================================================================
--- trunk/dports/science/nds2-client/files/0002-Check-default-include-path-for-jni.h-before-resortin.patch	                        (rev 0)
+++ trunk/dports/science/nds2-client/files/0002-Check-default-include-path-for-jni.h-before-resortin.patch	2013-09-13 17:56:07 UTC (rev 111014)
@@ -0,0 +1,36 @@
+commit 2d66928d6180d3422a25e63161b93816574cfa31
+Author: leo.singer at LIGO.ORG <leo.singer at LIGO.ORG@ac820499-f4a4-4ea9-b4e2-a7172f5148fc>
+Date:   Wed Sep 11 21:05:20 2013 +0000
+
+    Check default include path for jni.h before resorting to AX_JNI_INCLUDE_DIR
+    
+    git-svn-id: https://svn.ligo.caltech.edu/svn/nds2/trunk@1155 ac820499-f4a4-4ea9-b4e2-a7172f5148fc
+
+diff --git configure.ac configure.ac
+index e5c388f..4399425 100644
+--- configure.ac
++++ configure.ac
+@@ -496,12 +496,17 @@ dnl java
+ AS_IF(
+ 	[test "x$enable_swig_java" != xno],
+ 	[
+-		AX_JNI_INCLUDE_DIR
+-		for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
+-		do
+-			JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR"
+-		done
+-		AC_SUBST([JNI_CPPFLAGS], [$JNI_CPPFLAGS])
++		dnl Check to see if jni.h is in the default include path.
++		dnl If it isn't, try to guess where it is relative to the Java compiler
++		dnl using AX_JNI_INCLUDE_DIR.
++		AC_CHECK_HEADER([jni.h], , [
++			AX_JNI_INCLUDE_DIR
++			for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
++			do
++				JNI_CPPFLAGS="$JNI_CPPFLAGS -I$JNI_INCLUDE_DIR"
++			done
++			AC_SUBST([JNI_CPPFLAGS], [$JNI_CPPFLAGS])
++		])
+ 		case $target_os in
+ 		darwin*)
+ 		  JAVA_JNI_LIB_PREFIX="lib"

Added: trunk/dports/science/nds2-client/files/0003-Don-t-use-LINKFORSHARED-it-s-not-for-building-Python.patch
===================================================================
--- trunk/dports/science/nds2-client/files/0003-Don-t-use-LINKFORSHARED-it-s-not-for-building-Python.patch	                        (rev 0)
+++ trunk/dports/science/nds2-client/files/0003-Don-t-use-LINKFORSHARED-it-s-not-for-building-Python.patch	2013-09-13 17:56:07 UTC (rev 111014)
@@ -0,0 +1,42 @@
+commit 8f7d3133302354145ed9e4b13eecce48549a90c6
+Author: leo.singer at LIGO.ORG <leo.singer at LIGO.ORG@ac820499-f4a4-4ea9-b4e2-a7172f5148fc>
+Date:   Wed Sep 11 21:39:38 2013 +0000
+
+    Don't use LINKFORSHARED; it's not for building Python extension modules
+    
+    git-svn-id: https://svn.ligo.caltech.edu/svn/nds2/trunk@1156 ac820499-f4a4-4ea9-b4e2-a7172f5148fc
+
+diff --git config/ax_python_devel.m4 config/ax_python_devel.m4
+index cf2163c..469b36b 100644
+--- config/ax_python_devel.m4
++++ config/ax_python_devel.m4
+@@ -41,6 +41,10 @@
+ #   Copyright (c) 2009 Horst Knorr <hk_classes at knoda.org>
+ #   Copyright (c) 2013 Daniel Mullner <muellner at math.stanford.edu>
+ #
++#   MODIFIED 2013-09-11 by Leo Singer <leo.singer at ligo.org>: don't use
++#   LINKFORSHARED; according to <http://trac.macports.org/ticket/39223>,
++#   LINKFORSHARED is not needed for building Python extension modules.
++#
+ #   This program is free software: you can redistribute it and/or modify it
+ #   under the terms of the GNU General Public License as published by the
+ #   Free Software Foundation, either version 3 of the License, or (at your
+@@ -271,18 +275,6 @@ EOD`
+ 	AC_SUBST(PYTHON_EXTRA_LIBS)
+ 
+ 	#
+-	# linking flags needed when embedding
+-	#
+-	AC_MSG_CHECKING(python extra linking flags)
+-	if test -z "$PYTHON_EXTRA_LDFLAGS"; then
+-		PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \
+-			conf = distutils.sysconfig.get_config_var; \
+-			print (conf('LINKFORSHARED'))"`
+-	fi
+-	AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS])
+-	AC_SUBST(PYTHON_EXTRA_LDFLAGS)
+-
+-	#
+ 	# final check to see if everything compiles alright
+ 	#
+ 	AC_MSG_CHECKING([consistency of all components of python development environment])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130913/07916a60/attachment-0001.html>


More information about the macports-changes mailing list