[gluegen] add support for s390(x)

Dan Horák sharkcz at fedoraproject.org
Mon Dec 19 08:18:44 UTC 2011


commit 24bef706755c1a1f67fbf1b77ca2de4ccadaf43e
Author: Dan Horák <dan at danny.cz>
Date:   Mon Dec 19 09:18:43 2011 +0100

    add support for s390(x)

 build-s390.patch |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 gluegen.spec     |    7 ++++-
 2 files changed, 84 insertions(+), 1 deletions(-)
---
diff --git a/build-s390.patch b/build-s390.patch
new file mode 100644
index 0000000..d699799
--- /dev/null
+++ b/build-s390.patch
@@ -0,0 +1,78 @@
+diff -up gluegen/make/build.xml.build-s390 gluegen/make/build.xml
+--- gluegen/make/build.xml.build-s390	2011-12-18 17:28:49.000000000 +0100
++++ gluegen/make/build.xml	2011-12-18 17:32:08.000000000 +0100
+@@ -248,7 +248,13 @@
+       <property name="linker.cfg.id"                        value="linker.cfg.linux" /> 
+     </target>
+ 
+-    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.ppc" if="isLinux" >
++    <target name="declare.linux.s390" if="isLinuxS390">
++      <echo message="Linux.s390" />
++      <property name="compiler.cfg.id"                      value="compiler.cfg.linux" /> 
++      <property name="linker.cfg.id"                        value="linker.cfg.linux" /> 
++    </target>
++
++    <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.ppc,declare.linux.s390" if="isLinux" >
+       <property name="c.src.dir"                            value="unix" />
+       <property name="java.includes.dir.platform"           value="${java.includes.dir}/linux" />
+     </target>
+diff -up gluegen/make/gluegen-cpptasks.xml.build-s390 gluegen/make/gluegen-cpptasks.xml
+--- gluegen/make/gluegen-cpptasks.xml.build-s390	2011-12-18 17:29:32.000000000 +0100
++++ gluegen/make/gluegen-cpptasks.xml	2011-12-18 17:31:18.000000000 +0100
+@@ -37,6 +37,7 @@
+    -   isLinuxIA64
+    -   isLinuxX86
+    -   isLinuxPPC
++   -   isLinuxS390
+    -   isOSX
+    -   isOSXPPC
+    -   isOSXUniversal (if macosxfat=true)
+@@ -198,6 +199,15 @@
+             </or>
+       </and>
+     </condition>
++    <condition property="isLinuxS390">
++      <and>
++        <istrue value="${isLinux}" />
++            <or>
++                <equals arg1="${os.arch}" arg2="s390"/>
++                <equals arg1="${os.arch}" arg2="s390x"/>
++            </or>
++      </and>
++    </condition>
+     <condition property="isIA64">
+       <os arch="IA64" />
+     </condition>
+@@ -255,6 +265,7 @@
+     <echo message="LinuxIA64=${isLinuxIA64}" />
+     <echo message="LinuxX86=${isLinuxX86}" />
+     <echo message="LinuxPPC=${isLinuxPPC}" />
++    <echo message="LinuxS390=${isLinuxS390}" />
+     <echo message="OS X=${isOSX}" />
+     <echo message="Solaris=${isSolaris}" />
+     <echo message="Solaris32Bit=${isSolaris32Bit}" />
+@@ -291,7 +302,11 @@
+     <property name="os.and.arch" value="linux-ppc" />
+   </target>
+ 
+-  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.ppc" unless="gluegen.cpptasks.detected.os" />
++  <target name="gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os" if="isLinuxS390">
++    <property name="os.and.arch" value="linux-s390" />
++  </target>
++
++  <target name="gluegen.cpptasks.detect.os.linux" depends="gluegen.cpptasks.detect.os.linux.amd64,gluegen.cpptasks.detect.os.linux.ia64,gluegen.cpptasks.detect.os.linux.x86,gluegen.cpptasks.detect.os.linux.ppc,gluegen.cpptasks.detect.os.linux.s390" unless="gluegen.cpptasks.detected.os" />
+ 
+   <target name="gluegen.cpptasks.detect.os.osx.ppc" unless="gluegen.cpptasks.detected.os" if="isOSXPPC">
+     <property name="os.and.arch" value="macosx-ppc" />
+diff -up gluegen/src/java/com/sun/gluegen/StructLayout.java.build-s390 gluegen/src/java/com/sun/gluegen/StructLayout.java
+--- gluegen/src/java/com/sun/gluegen/StructLayout.java.build-s390	2011-12-18 17:32:56.000000000 +0100
++++ gluegen/src/java/com/sun/gluegen/StructLayout.java	2011-12-18 17:33:18.000000000 +0100
+@@ -134,6 +134,8 @@ public class StructLayout {
+                (os.startsWith("linux") && cpu.equals("ia64")) ||
+                (os.startsWith("linux") && cpu.equals("ppc")) ||
+                (os.startsWith("linux") && cpu.equals("ppc64")) ||
++               (os.startsWith("linux") && cpu.equals("s390")) ||
++               (os.startsWith("linux") && cpu.equals("s390x")) ||
+                (os.startsWith("sunos") && cpu.equals("sparc")) ||
+                (os.startsWith("sunos") && cpu.equals("sparcv9")) ||
+                (os.startsWith("sunos") && cpu.equals("x86")) ||
diff --git a/gluegen.spec b/gluegen.spec
index eb822c4..2382a2d 100644
--- a/gluegen.spec
+++ b/gluegen.spec
@@ -1,6 +1,6 @@
 Name:		gluegen
 Version:	1
-Release:	0.20102503svn13%{?dist}
+Release:	0.20102503svn14%{?dist}
 Summary:	Java/JNI glue code generator to call out to ANSI C
 
 Group:		Development/Libraries
@@ -20,6 +20,7 @@ Patch1:		no-solaris.patch
 Patch2:		debug-on.patch
 Patch3:		build-ppc.patch
 Patch4:     fix-antlr-classpath.patch
+Patch5:		build-s390.patch
 
 BuildRequires:	java-devel >= 1:1.6.0
 BuildRequires:	ant-antlr
@@ -62,6 +63,7 @@ GlueGen's user manual
 %patch2 -p1 -b .debug-on.patch
 %patch3 -p1 -b .build-ppc.patch
 %patch4 -b .fix-antlr-classpath.patch
+%patch5 -p1 -b .build-s390.patch
 
 
 #Remove bundled .jar
@@ -175,6 +177,9 @@ rm -rf %{buildroot}
 %{_docdir}/%{name}/*
 
 %changelog
+* Mon Dec 19 2011 Dan Horák <dan[at]danny.cz> 1-0.20102503svn14
+- add support for s390(x)
+
 * Wed Mar 23 2011 Alexander Kurtakov <akurtako at redhat.com> 1-0.20102503svn13
 - Fix FTBFS.
 


More information about the scm-commits mailing list