diff options
-rwxr-xr-x | make/gluegen-cpptasks-base.xml | 24 | ||||
-rwxr-xr-x | make/jogamp-env.xml | 2 | ||||
-rw-r--r-- | make/stub_includes/jni/macosx/jawt_md.h | 68 | ||||
-rw-r--r-- | make/stub_includes/jni/macosx/jni_md.h | 47 |
4 files changed, 137 insertions, 4 deletions
diff --git a/make/gluegen-cpptasks-base.xml b/make/gluegen-cpptasks-base.xml index 4319bcf..fcb382a 100755 --- a/make/gluegen-cpptasks-base.xml +++ b/make/gluegen-cpptasks-base.xml @@ -6,11 +6,14 @@ - by other projects which use GlueGen to generate native code and - need to compile that native code. - - - Before importing this file, the property "gluegen.root" must be - - defined; this is the relative path from the current working + - Before importing this file, the properties "gluegen.root" must be defined; + - this is the relative path from the current working - directory (e.g., from which the parent project's build.xml is being - executed) to the top of the checked-out GlueGen workspace. - + - The property "gluegen.root.abs-path" must be defined as well; + - this is the absolute path of "gluegen.root", see above. + - - The gluegen.cpptasks.detect.os target sets the following - properties appropriately. They are only set to "true" if the OS/CPU - configuration is exactly as specified. @@ -184,8 +187,16 @@ <!-- NOTE: the values of the macos<arch> attributes will not be overridden if already set externally --> <property name="macosppc" value="false" /> - <property name="macosx32" value="true" /> <property name="macosx64" value="true" /> + <!-- No 32bit binaries on OSX since Java7 --> + <condition property="macosx32" value="false" else="true"> + <or> + <contains string="${ant.java.version}" substring="1.7" casesensitive="false" /> + <contains string="${ant.java.version}" substring="1.8" casesensitive="false" /> + <contains string="${ant.java.version}" substring="1.9" casesensitive="false" /> + <contains string="${ant.java.version}" substring="2.0" casesensitive="false" /> + </or> + </condition> <!-- Need a way to be able to disable the macosx64 property specification in a build.xml --> <condition property="use.macosppc"> @@ -1428,8 +1439,13 @@ <property name="compiler.cfg.id.base" value="compiler.cfg.macosx" /> <property name="linker.cfg.id.base" value="linker.cfg.macosx" /> <!-- Java7 std location --> - <condition property="java.includes.dir.platform" + <!-- Temporary workaround: + Provided darwin/jawt_md.h from Oracle for OSX / Java7 + has X11 dependencies and does not define JAWT_SurfaceLayers. value="${java.includes.dir}/darwin"> + --> + <condition property="java.includes.dir.platform" + value="${gluegen.root.abs-path}/make/stub_includes/jni/macosx"> <available file="${java.includes.dir}/darwin/jawt_md.h"/> </condition> <condition property="java.lib.dir.platform" diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml index f02901e..d6ff239 100755 --- a/make/jogamp-env.xml +++ b/make/jogamp-env.xml @@ -42,6 +42,8 @@ <contains string="${ant.java.version}" substring="1.6" casesensitive="false" /> <contains string="${ant.java.version}" substring="1.7" casesensitive="false" /> <contains string="${ant.java.version}" substring="1.8" casesensitive="false" /> + <contains string="${ant.java.version}" substring="1.9" casesensitive="false" /> + <contains string="${ant.java.version}" substring="2.0" casesensitive="false" /> </or> </not> </condition> diff --git a/make/stub_includes/jni/macosx/jawt_md.h b/make/stub_includes/jni/macosx/jawt_md.h new file mode 100644 index 0000000..e65474b --- /dev/null +++ b/make/stub_includes/jni/macosx/jawt_md.h @@ -0,0 +1,68 @@ +/** + * Temporary workaround! + * + * Provided darwin/jawt_md.h from Oracle for OSX / Java7 + * has X11 dependencies and does not define JAWT_SurfaceLayers. + * + * This C header file is derived from Apple's Java SDK provided C header file + * with the following copyright notice: + * + * Copyright (c) 2002 Apple computer Inc. All rights reserved. + * + * This version has complex comments removed and does not contain inlined algorithms etc, if any existed. + * + * The original C header file was included to JOGL on Mon Jun 15 22:57:38 2009 + * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. + * + * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol. + * They are processed by GlueGen to create a Java binding for JAWT invocation only. + * + * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36) + * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") + * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, + * and is thus excluded from the scope of any copyright.")." + * + * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF + * L 111/17 (10) and (15) + */ + +#ifndef _JAVASOFT_JAWT_MD_H_ +#define _JAVASOFT_JAWT_MD_H_ + +#include <jawt.h> +#include <AppKit/NSView.h> +#include <QuartzCore/CALayer.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * JAWT_DrawingSurfaceInfo.getPlatformInfo() + * + * Only if not JAWT_SurfaceLayers, see below! + */ +typedef struct JAWT_MacOSXDrawingSurfaceInfo +{ + /** the view is guaranteed to be valid only for the duration of Component.paint method */ + NSView *cocoaViewRef; +} +JAWT_MacOSXDrawingSurfaceInfo; + +#ifndef __GLUEGEN__ + + #define JAWT_MACOSX_USE_CALAYER 0x80000000 + + /** Java7 and Java6 (OSX >= 10.6.4) CALayer surface if provided (Bit JAWT_MACOSX_USE_CALAYER set in the JAWT version) */ + @protocol JAWT_SurfaceLayers + @property (readwrite, retain) CALayer *layer; + @property (readonly) CALayer *windowLayer; + @end + +#endif __GLUEGEN__ + +#ifdef __cplusplus +} +#endif + +#endif /* !_JAVASOFT_JAWT_MD_H_ */ diff --git a/make/stub_includes/jni/macosx/jni_md.h b/make/stub_includes/jni/macosx/jni_md.h new file mode 100644 index 0000000..7f52704 --- /dev/null +++ b/make/stub_includes/jni/macosx/jni_md.h @@ -0,0 +1,47 @@ +/* + * Temporary workaround! + * + * Provided darwin/jawt_md.h from Oracle for OSX / Java7 + * has X11 dependencies and does not define JAWT_SurfaceLayers. + * + * @(#)jni_md.h 1.18 03/12/19 + * + * This C header file is derived from Sun Microsystem's Java SDK provided C header file + * with the following copyright notice: + * + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + * + * This version has complex comments removed and does not contain inlined algorithms etc, if any existed. + * + * The original C header file was included to JOGL on Sat Jun 21 02:10:30 2008 + * (commit cbc45e816f4ee81031bffce19a99550681462a24) by Sun Microsystem's staff and were approved. + * + * This C header file is included due to ensure compatibility with - and invocation of the JAWT protocol. + * They are processed by GlueGen to create a Java binding for JAWT invocation only. + * + * http://ftp.resource.org/courts.gov/c/F3/387/387.F3d.522.03-5400.html (36) + * "Atari Games Corp. v. Nintendo of Am., Inc., Nos. 88-4805 & 89-0027, 1993 WL 207548, at *1 (N.D.Cal. May 18, 1993) ("Atari III") + * ("Program code that is strictly necessary to achieve current compatibility presents a merger problem, almost by definition, + * and is thus excluded from the scope of any copyright.")." + * + * http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:111:0016:0022:EN:PDF + * L 111/17 (10) and (15) + */ + +#ifndef _JAVASOFT_JNI_MD_H_ +#define _JAVASOFT_JNI_MD_H_ + +#define JNIEXPORT __attribute__((visibility("default"))) +#define JNIIMPORT +#define JNICALL + +#if __LP64__ +typedef int jint; +#else +typedef long jint; +#endif +typedef long long jlong; +typedef signed char jbyte; + +#endif /* !_JAVASOFT_JNI_MD_H_ */ |