Hello Sylvestre, At Imagination Technologies (http://imgtec.com/) Dejan Latinovic has found a solution to Debian bugs #750548.
https://bugs.debian.org/750548 My NMU debdiff for gluegen2_2.1.5-1.1 is below, at the end of this message. With the changes in the NMU patch gluegen2 builds successfully on mips, mipsel and amd64. Regards, Aníbal -- Aníbal Monsalve Salazar <anibal.monsalvesala...@imgtec.com> debdiff gluegen2_2.1.5-1.dsc gluegen2_2.1.5-1.1.dsc diff -Nru gluegen2-2.1.5/debian/changelog gluegen2-2.1.5/debian/changelog --- gluegen2-2.1.5/debian/changelog 2014-03-24 13:26:16.000000000 +0000 +++ gluegen2-2.1.5/debian/changelog 2014-06-04 13:19:53.000000000 +0100 @@ -1,3 +1,13 @@ +gluegen2 (2.1.5-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add mips support. + Add add-mips-support.patch. + Patch by Dejan Latinovic <dejan.latino...@imgtec.com>. + Closes: #750548. + + -- Anibal Monsalve Salazar <ani...@debian.org> Wed, 04 Jun 2014 13:17:00 +0100 + gluegen2 (2.1.5-1) unstable; urgency=medium * New upstream release diff -Nru gluegen2-2.1.5/debian/patches/add-mips-support.patch gluegen2-2.1.5/debian/patches/add-mips-support.patch --- gluegen2-2.1.5/debian/patches/add-mips-support.patch 1970-01-01 01:00:00.000000000 +0100 +++ gluegen2-2.1.5/debian/patches/add-mips-support.patch 2014-06-04 13:16:14.000000000 +0100 @@ -0,0 +1,194 @@ +From: Dejan Latinovic <dejan.latino...@imgtec.com> +Subject: mips support for gluegen2 +Date: Wed, 4 Jun 2014 11:34:11 +0000 + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750548 + +Package sivp fails to build on Debian for mips/mipsel arch with an +error: + +> SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 DOCBOOK_ROOT=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh \ +> /usr/bin/scilab -nw -f builder.sce +> Could not create a Scilab main class. Error: +> Exception in thread "main" java.lang.ExceptionInInitializerError +> at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:83) +> at org.scilab.modules.gui.SwingView.<init>(Unknown Source) +> at org.scilab.modules.gui.SwingView.registerSwingView(Unknown Source) +> at org.scilab.modules.core.Scilab.<init>(Unknown Source) +> Caused by: java.lang.RuntimeException: Please port CPU detection to your platform (linux/mipsel) +> at jogamp.common.os.PlatformPropsImpl.getCPUTypeImpl(PlatformPropsImpl.java:302) +> at jogamp.common.os.PlatformPropsImpl.<clinit>(PlatformPropsImpl.java:134) +> ... 4 more +> +> Scilab cannot create Scilab Java Main-Class (we have not been able to find the main Scilab class. Check if the Scilab and thirdparty packages are available). +> debian/rules:9: recipe for target 'build-arch' failed +> + +The reason for this failure is a lack of support for mips/mipsel in +Debian package gluegen2, version 2.1.5. + +Patch add-mips-support.patch that contains support for mips/mipsel is +attached. + +After rebuilding gluegen2 with these changes, I was able to build sivp +successfully. + +diff -uNr a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java +--- a/src/java/com/jogamp/common/os/MachineDescription.java 2014-03-10 13:56:04.000000000 +0000 ++++ b/src/java/com/jogamp/common/os/MachineDescription.java 2014-05-28 14:09:01.000000000 +0000 +@@ -60,7 +60,11 @@ + /** {@link Platform.CPUType#X86_64} Little Endian Windows */ + X86_64_WINDOWS(Platform.CPUType.X86_64), + /** {@link Platform.CPUType#SPARC_32} Big Endian Solaris */ +- SPARC_32_SUNOS(Platform.CPUType.SPARC_32); ++ SPARC_32_SUNOS(Platform.CPUType.SPARC_32), ++ /** {@link Platform.CPUType#MIPS_32} Big Endian Unix */ ++ MIPS_32_UNIX(Platform.CPUType.MIPS_32), ++ /** {@link Platform.CPUType#MIPSEL_32} Little Endian Unix */ ++ MIPSEL_32_UNIX(Platform.CPUType.MIPSEL_32); + + public final Platform.CPUType cpu; + +@@ -77,6 +81,7 @@ + private final static int[] size_x86_64_unix = { 4, 8, 4, 8, 16, 8, 4096 }; + private final static int[] size_x86_64_windows = { 4, 4, 4, 8, 16, 8, 4096 }; + private final static int[] size_sparc_32_sunos = { 4, 4, 4, 8, 16, 4, 8192 }; ++ private final static int[] size_mips_32_unix = { 4, 4, 4, 8, 8, 4, 4096 }; + + /* arch os i8, i16, i32, i64, int, long, float, doubl, ldoubl, ptr */ + private final static int[] align_armeabi = { 1, 2, 4, 8, 4, 4, 4, 8, 8, 4 }; +@@ -86,6 +91,7 @@ + private final static int[] align_x86_64_unix = { 1, 2, 4, 8, 4, 8, 4, 8, 16, 8 }; + private final static int[] align_x86_64_windows = { 1, 2, 4, 8, 4, 4, 4, 8, 16, 8 }; + private final static int[] align_sparc_32_sunos = { 1, 2, 4, 8, 4, 4, 4, 8, 8, 4 }; ++ private final static int[] align_mips_32_unix = { 1, 2, 4, 8, 4, 4, 4, 8, 8, 4 }; + + public enum StaticConfig { + /** {@link MachineDescription.ID#ARMle_EABI } */ +@@ -101,7 +107,11 @@ + /** {@link MachineDescription.ID#X86_64_WINDOWS } */ + X86_64_WINDOWS(ID.X86_64_WINDOWS, true, size_x86_64_windows, align_x86_64_windows), + /** {@link MachineDescription.ID#SPARC_32_SUNOS } */ +- SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos); ++ SPARC_32_SUNOS(ID.SPARC_32_SUNOS, false, size_sparc_32_sunos, align_sparc_32_sunos), ++ /** {@link MachineDescription.ID#MIPS_32_UNIX } */ ++ MIPS_32_UNIX(ID.MIPS_32_UNIX, false, size_mips_32_unix, align_mips_32_unix), ++ /** {@link MachineDescription.ID#MIPSEL_32_UNIX } */ ++ MIPSEL_32_UNIX(ID.MIPSEL_32_UNIX, true, size_mips_32_unix, align_mips_32_unix); + + public final ID id; + public final MachineDescription md; +diff -uNr a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java +--- a/src/java/com/jogamp/common/os/Platform.java 2014-05-26 14:57:41.000000000 +0000 ++++ b/src/java/com/jogamp/common/os/Platform.java 2014-05-28 14:09:01.000000000 +0000 +@@ -113,6 +113,8 @@ + MIPS_32( CPUFamily.MIPS, 0x0001), + /** MIPS 64bit */ + MIPS_64( CPUFamily.MIPS, 0x0002), ++ /** MIPS 32bit LE*/ ++ MIPSEL_32( CPUFamily.MIPS, 0x0004), + /** Itanium default */ + IA64( CPUFamily.IA64, 0x0000), + /** PA_RISC2_0 */ +diff -uNr a/src/java/jogamp/common/os/MachineDescriptionRuntime.java b/src/java/jogamp/common/os/MachineDescriptionRuntime.java +--- a/src/java/jogamp/common/os/MachineDescriptionRuntime.java 2014-03-10 13:56:04.000000000 +0000 ++++ b/src/java/jogamp/common/os/MachineDescriptionRuntime.java 2014-05-28 14:09:01.000000000 +0000 +@@ -78,6 +78,8 @@ + case ARMv5: + case ARMv6: + case ARMv7: ++ case MIPS_32: ++ case MIPSEL_32: + case SPARC_32: + case PPC: + return true; +@@ -95,6 +97,10 @@ + if( isCPUArch32Bit(cpuType) ) { + if( cpuType.getFamily() == Platform.CPUFamily.ARM && littleEndian) { + return StaticConfig.ARMle_EABI; ++ } else if( cpuType == Platform.CPUType.MIPS_32) { ++ return StaticConfig.MIPS_32_UNIX; ++ } else if( cpuType == Platform.CPUType.MIPSEL_32) { ++ return StaticConfig.MIPSEL_32_UNIX; + } else if( osType == Platform.OSType.WINDOWS ) { + return StaticConfig.X86_32_WINDOWS; + } else if( osType == Platform.OSType.MACOS ) { +diff -uNr a/src/java/jogamp/common/os/PlatformPropsImpl.java b/src/java/jogamp/common/os/PlatformPropsImpl.java +--- a/src/java/jogamp/common/os/PlatformPropsImpl.java 2014-03-10 13:56:04.000000000 +0000 ++++ b/src/java/jogamp/common/os/PlatformPropsImpl.java 2014-05-28 14:09:01.000000000 +0000 +@@ -298,6 +298,8 @@ + return CPUType.PPC; + } else if( archLower.equals("mips") ) { // android + return CPUType.MIPS_32; ++ } else if( archLower.equals("mipsel") ) { ++ return CPUType.MIPSEL_32; + } else { + throw new RuntimeException("Please port CPU detection to your platform (" + OS_lower + "/" + archLower + ")"); + } +@@ -406,6 +408,9 @@ + } else if ( eh.isMips() ) { + cpuType[0] = CPUType.MIPS_32; // FIXME + abiType[0] = ABIType.GENERIC_ABI; ++ } else if ( eh.isMipsel() ) { ++ cpuType[0] = CPUType.MIPSEL_32; ++ abiType[0] = ABIType.GENERIC_ABI; + } + res = eh; + } catch(Throwable t) { +@@ -501,6 +506,8 @@ + * <li>linux-i586</li> + * <li>linux-armv6</li> + * <li>linux-armv6hf</li> ++ * <li>linux-mips</li> ++ * <li>linux-mipsel</li> + * <li>android-armv6</li> + * <li>macosx-universal</li> + * <li>solaris-sparc</li> +@@ -525,6 +532,12 @@ + case ARMv7: + _os_and_arch = "armv6"; // TODO: sync with gluegen-cpptasks-base.xml + break; ++ case MIPS_32: ++ _os_and_arch = "mips"; ++ break; ++ case MIPSEL_32: ++ _os_and_arch = "mipsel"; ++ break; + case SPARC_32: + _os_and_arch = "sparc"; + break; +diff -uNr a/src/java/jogamp/common/os/elf/ElfHeader.java b/src/java/jogamp/common/os/elf/ElfHeader.java +--- a/src/java/jogamp/common/os/elf/ElfHeader.java 2014-03-10 13:56:04.000000000 +0000 ++++ b/src/java/jogamp/common/os/elf/ElfHeader.java 2014-05-28 14:10:07.000000000 +0000 +@@ -484,12 +484,19 @@ + + /** + * Returns true if {@link #getMachine() machine} is a 32 or 64 bit MIPS CPU +- * of type {@link #EM_MIPS}, {@link #EM_MIPS_X} or {@link #EM_MIPS_RS3_LE}. */ ++ * of type {@link #EM_MIPS} or {@link #EM_MIPS_X}. */ + public final boolean isMips() { + final short m = getMachine(); + return EM_MIPS == m || +- EM_MIPS_X == m || +- EM_MIPS_RS3_LE == m; ++ EM_MIPS_X == m; ++ } ++ ++ /** ++ * Returns true if {@link #getMachine() machine} is a 32 MIPS CPU ++ * of type {@link #EM_MIPS_RS3_LE}. */ ++ public final boolean isMipsel() { ++ final short m = getMachine(); ++ return EM_MIPS_RS3_LE == m; + } + + /** Returns the processor-specific flags associated with the file. */ +@@ -568,6 +575,8 @@ + machineS=", itanium"; + } else if( isMips() ) { + machineS=", mips"; ++ } else if( isMipsel() ) { ++ machineS=", mipsel"; + } else { + machineS=""; + } diff -Nru gluegen2-2.1.5/debian/patches/series gluegen2-2.1.5/debian/patches/series --- gluegen2-2.1.5/debian/patches/series 2014-03-24 13:29:30.000000000 +0000 +++ gluegen2-2.1.5/debian/patches/series 2014-06-03 13:52:35.000000000 +0100 @@ -18,3 +18,4 @@ fix-alpha-build-config.patch fix-ppc64-build-config.patch missing-arch-symbol.diff +add-mips-support.patch
signature.asc
Description: Digital signature