Codebase list lwjgl / 5eb82a1a-4be6-4704-ae45-810195df16dc/main debian / patches / allarchs.patch
5eb82a1a-4be6-4704-ae45-810195df16dc/main

Tree @5eb82a1a-4be6-4704-ae45-810195df16dc/main (Download .tar.gz)

allarchs.patch @5eb82a1a-4be6-4704-ae45-810195df16dc/mainraw · history · blame

Description: Try to support all Debian architectures
Author: Markus Koschany <apo@debian.org>
Forwarded: no
--- a/platform_build/linux_ant/build.xml
+++ b/platform_build/linux_ant/build.xml
@@ -6,12 +6,14 @@
 	<property name="libname64" value="liblwjgl64.so"/>
 	<property name="libs32" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/i386 -ljawt" />
 	<property name="libs64" value="-L/usr/X11R6/lib64 -L/usr/X11/lib64 -lm -lX11 -lXext -lXcursor -lXrandr -lXxf86vm -lpthread -L${java.home}/lib/amd64 -ljawt" />
+	<property name="libs" value="-L/usr/X11R6/lib -L/usr/X11/lib -lm -lX11 -lXcursor -lXrandr -lXxf86vm -L${java.home}/lib/${os.arch}" />
 	<property name="cflags32" value="-O2 -Wall -c -fPIC -std=c99 -Wunused"/>
 
 	<target name="clean">
 		<delete>
 			<fileset dir="x32"/>
 			<fileset dir="x64"/>
+			<fileset dir="deb"/>
 			<fileset dir="." includes="*.o"/>
 			<fileset dir="." includes="*.so"/>
 		</delete>
@@ -38,6 +40,7 @@
 
 		<property name="linker_flags32" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs32}"/>
 		<property name="linker_flags64" value="${version_script_flags64} -shared -O2 -Wall -o ${libname64} ${libs64}"/>
+		<property name="linker_flagsdeb" value="${version_script_flags32} -shared -O2 -Wall -o ${libname32} ${libs}"/>
 
     	<condition property="build.32bit.only">
     		<not>
@@ -56,8 +59,10 @@
     		</and>
     	</condition>
 
-    	<antcall target="compile32"/>
-    	<antcall target="compile64"/>
+		<condition property="build.debian">
+				<os name="Linux" />
+		</condition>
+		<antcall target="compiledeb" />
     </target>
 
     <target name="compile32" unless="build.64bit.only">
@@ -123,4 +128,31 @@
 			<fileset file="${libname64}"/>
 		</apply>
     </target>
+<target name="compiledeb">    	
+    	<mkdir dir="deb"/>
+    	<apply dir="deb" executable="gcc" skipemptyfilesets="true" failonerror="true">
+			<arg line="${cflags32} ${cflags_pthread} ${cflags_ppc64le}"/>
+			<arg value="-I${java.home}/include"/>
+			<arg value="-I${java.home}/include/linux"/>
+			<arg value="-I${java.home}/../include"/>
+			<arg value="-I${java.home}/../include/linux"/>
+			<arg value="-I${java.home}/../include/solaris"/>
+			<arg value="-I${native}/common"/>
+			<arg value="-I${native}/common/opengl"/>
+			<arg value="-I${native}/linux"/>
+			<arg value="-I${native}/linux/opengl"/>
+			<mapper type="glob" from="*.c" to="*.o"/>
+			<fileset dir="${native}/linux" includes="*.c"/>
+			<fileset dir="${native}/generated" includes="*.c"/>
+			<fileset dir="${native}/common" includes="*.c"/>
+		</apply>
+		<apply dir="." parallel="true" executable="gcc" failonerror="true">
+			<srcfile/>
+			<arg line="${linker_flagsdeb}"/>
+			<fileset dir="deb" includes="*.o"/>
+		</apply>
+		<apply dir="." parallel="true" executable="strip" failonerror="true">
+			<fileset file="${libname32}"/>
+		</apply>
+    </target>
 </project>