diff options
Diffstat (limited to 'dev-java/swt/files')
-rw-r--r-- | dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch | 243 | ||||
-rw-r--r-- | dev-java/swt/files/build.xml | 17 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.7-manifest | 17 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.7.2-gio_launch-URI-x86.patch | 121 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch | 121 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.8-as-needed-and-flag-fixes.patch | 243 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.8-manifest | 17 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.8.2-gthread.patch | 44 | ||||
-rw-r--r-- | dev-java/swt/files/swt-4.2-as-needed-and-flag-fixes.patch | 243 | ||||
-rw-r--r-- | dev-java/swt/files/swt-4.2-manifest | 16 |
10 files changed, 1082 insertions, 0 deletions
diff --git a/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch b/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch new file mode 100644 index 000000000000..16194fdc5f51 --- /dev/null +++ b/dev-java/swt/files/as-needed-and-flag-fixes-3.6.patch @@ -0,0 +1,243 @@ +--- make_linux.mak~ 2010-06-08 17:30:58.000000000 +0000 ++++ make_linux.mak 2010-08-09 22:48:01.515433721 +0000 +@@ -66,7 +66,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS = $(CXXFLAGS) \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -107,7 +107,7 @@ + WEBKIT_OBJECTS = swt.o webkit.o webkit_structs.o webkit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DLINUX -DGTK \ +@@ -131,13 +131,13 @@ + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -156,7 +156,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -172,7 +172,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -180,7 +180,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -188,7 +188,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -205,7 +205,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -222,7 +222,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -242,7 +242,7 @@ + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -262,7 +262,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -279,7 +279,7 @@ + make_webkit: $(WEBKIT_LIB) + + $(WEBKIT_LIB): $(WEBKIT_OBJECTS) +- $(CC) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) $(WEBKITLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) $(WEBKITLIBS) + + webkit.o: webkitgtk.c + $(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk.c -o webkit.o +@@ -296,7 +296,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c +--- make_freebsd.mak~ 2010-06-08 17:30:58.000000000 +0000 ++++ make_freebsd.mak 2010-08-09 22:50:26.173246263 +0000 +@@ -64,7 +64,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -91,7 +91,7 @@ + XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DFREEBSD -DGTK \ +@@ -115,13 +115,13 @@ + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -140,7 +140,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -156,7 +156,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -164,7 +164,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -172,7 +172,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -189,7 +189,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -206,7 +206,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -226,7 +226,7 @@ + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -252,7 +252,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -269,7 +269,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c diff --git a/dev-java/swt/files/build.xml b/dev-java/swt/files/build.xml new file mode 100644 index 000000000000..ea775871bf09 --- /dev/null +++ b/dev-java/swt/files/build.xml @@ -0,0 +1,17 @@ +<project name="SWT" default="jar" basedir="."> + <property name="src" location="."/> + <property name="build" location="build"/> + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + </target> + + <target name="compile" depends="init" description="Compile the SWT toolset"> + <javac srcdir="${src}" destdir="${build}"/> + </target> + + <target name="jar"> + <jar destfile="swt.jar" basedir="${build}"/> + </target> +</project> diff --git a/dev-java/swt/files/swt-3.7-manifest b/dev-java/swt/files/swt-3.7-manifest new file mode 100644 index 000000000000..bddcbb48b041 --- /dev/null +++ b/dev-java/swt/files/swt-3.7-manifest @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)" +Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true +Bundle-Version: 3.7 +Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=SWT_ARCH)) +Export-Package: org.eclipse.swt.internal.accessibility.gtk; x-internal:=true, + org.eclipse.swt.internal.cairo; x-internal:=true, + org.eclipse.swt.internal.cde; x-internal:=true, + org.eclipse.swt.internal.gnome; x-internal:=true, + org.eclipse.swt.internal.gtk; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true + org.eclipse.swt.internal.webkit; x-internal:=true + diff --git a/dev-java/swt/files/swt-3.7.2-gio_launch-URI-x86.patch b/dev-java/swt/files/swt-3.7.2-gio_launch-URI-x86.patch new file mode 100644 index 000000000000..cab0e0cdb573 --- /dev/null +++ b/dev-java/swt/files/swt-3.7.2-gio_launch-URI-x86.patch @@ -0,0 +1,121 @@ +Program.launch will first attempt to open files using libgio and then fallback +to gnome-vfs. gio_launch uses g_file_new_for_path which fails when passed a +URI. If swt was built with USE="-gnome" then the fallback fails as well, +making it appear that a package has a dependency on swt[gnome] when it does +not. + +Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: + no swt-gnome-gtk-3740 in java.library.path + no swt-gnome-gtk in java.library.path + Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so + Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so + +Use g_file_new_for_commandline_arg instead. + +https://bugs.gentoo.org/424151 + + +--- a/os.c ++++ b/os.c +@@ -3059,6 +3059,30 @@ fail: + } + #endif + ++#ifndef NO__1g_1file_1new_1for_1commandline_1arg ++JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1commandline_1arg) ++ (JNIEnv *env, jclass that, jbyteArray arg0) ++{ ++ jbyte *lparg0=NULL; ++ jintLong rc = 0; ++ OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC); ++ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; ++/* ++ rc = (jintLong)g_file_new_for_commandline_arg(lparg0); ++*/ ++ { ++ LOAD_FUNCTION(fp, g_file_new_for_commandline_arg) ++ if (fp) { ++ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0); ++ } ++ } ++fail: ++ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); ++ OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC); ++ return rc; ++} ++#endif ++ + #ifndef NO__1g_1file_1new_1for_1path + JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1path) + (JNIEnv *env, jclass that, jbyteArray arg0) +--- a/os_custom.h ++++ b/os_custom.h +@@ -280,6 +280,7 @@ + #define g_file_icon_get_file_LIB LIB_GIO + #define g_file_info_get_content_type_LIB LIB_GIO + #define g_file_info_get_modification_time_LIB LIB_GIO ++#define g_file_new_for_commandline_arg_LIB LIB_GIO + #define g_file_new_for_path_LIB LIB_GIO + #define g_file_new_for_uri_LIB LIB_GIO + #define g_file_read_LIB LIB_GIO +--- a/os_stats.c ++++ b/os_stats.c +@@ -18,8 +18,8 @@ + + #ifdef NATIVE_STATS + +-int OS_nativeFunctionCount = 1396; +-int OS_nativeFunctionCallCount[1396]; ++int OS_nativeFunctionCount = 1397; ++int OS_nativeFunctionCallCount[1397]; + char * OS_nativeFunctionNames[] = { + #ifndef JNI64 + "Call__IIII", +@@ -250,6 +250,7 @@ char * OS_nativeFunctionNames[] = { + "_1g_1file_1icon_1get_1file", + "_1g_1file_1info_1get_1content_1type", + "_1g_1file_1info_1get_1modification_1time", ++ "_1g_1file_1new_1for_1commandline_1arg", + "_1g_1file_1new_1for_1path", + "_1g_1file_1new_1for_1uri", + "_1g_1file_1query_1info", +--- a/os_stats.h ++++ b/os_stats.h +@@ -258,6 +258,7 @@ typedef enum { + _1g_1file_1icon_1get_1file_FUNC, + _1g_1file_1info_1get_1content_1type_FUNC, + _1g_1file_1info_1get_1modification_1time_FUNC, ++ _1g_1file_1new_1for_1commandline_1arg_FUNC, + _1g_1file_1new_1for_1path_FUNC, + _1g_1file_1new_1for_1uri_FUNC, + _1g_1file_1query_1info_FUNC, +--- a/src/org/eclipse/swt/internal/gtk/OS.java ++++ b/src/org/eclipse/swt/internal/gtk/OS.java +@@ -2113,6 +2113,16 @@ public static final int /*long*/ g_file_new_for_path(byte[] fileName) { + } + } + /** @method flags=dynamic */ ++public static final native int /*long*/ _g_file_new_for_commandline_arg(byte[] fileName); ++public static final int /*long*/ g_file_new_for_commandline_arg(byte[] fileName) { ++ lock.lock(); ++ try { ++ return _g_file_new_for_commandline_arg(fileName); ++ } finally { ++ lock.unlock(); ++ } ++} ++/** @method flags=dynamic */ + public static final native int /*long*/ _g_file_new_for_uri(byte[] fileName); + public static final int /*long*/ g_file_new_for_uri(byte[] fileName) { + lock.lock(); +--- a/src/org/eclipse/swt/program/Program.java ++++ b/src/org/eclipse/swt/program/Program.java +@@ -954,7 +954,7 @@ static boolean gio_isExecutable(String fileName) { + static boolean gio_launch(String fileName) { + boolean result = false; + byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true); +- int /*long*/ file = OS.g_file_new_for_path (fileNameBuffer); ++ int /*long*/ file = OS.g_file_new_for_commandline_arg (fileNameBuffer); + if (file != 0) { + int /*long*/ uri = OS.g_file_get_uri (file); + if (uri != 0) { diff --git a/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch b/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch new file mode 100644 index 000000000000..bbb28573072b --- /dev/null +++ b/dev-java/swt/files/swt-3.7.2-gio_launch-URI.patch @@ -0,0 +1,121 @@ +Program.launch will first attempt to open files using libgio and then fallback +to gnome-vfs. gio_launch uses g_file_new_for_path which fails when passed a +URI. If swt was built with USE="-gnome" then the fallback fails as well, +making it appear that a package has a dependency on swt[gnome] when it does +not. + +Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: + no swt-gnome-gtk-3740 in java.library.path + no swt-gnome-gtk in java.library.path + Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk-3740.so + Can't load library: /home/xxx/.swt/lib/linux/x86_64/libswt-gnome-gtk.so + +Use g_file_new_for_commandline_arg instead. + +https://bugs.gentoo.org/424151 + + +--- a/os.c ++++ b/os.c +@@ -3059,6 +3059,30 @@ fail: + } + #endif + ++#ifndef NO__1g_1file_1new_1for_1commandline_1arg ++JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1commandline_1arg) ++ (JNIEnv *env, jclass that, jbyteArray arg0) ++{ ++ jbyte *lparg0=NULL; ++ jintLong rc = 0; ++ OS_NATIVE_ENTER(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC); ++ if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; ++/* ++ rc = (jintLong)g_file_new_for_commandline_arg(lparg0); ++*/ ++ { ++ LOAD_FUNCTION(fp, g_file_new_for_commandline_arg) ++ if (fp) { ++ rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jbyte *))fp)(lparg0); ++ } ++ } ++fail: ++ if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); ++ OS_NATIVE_EXIT(env, that, _1g_1file_1new_1for_1commandline_1arg_FUNC); ++ return rc; ++} ++#endif ++ + #ifndef NO__1g_1file_1new_1for_1path + JNIEXPORT jintLong JNICALL OS_NATIVE(_1g_1file_1new_1for_1path) + (JNIEnv *env, jclass that, jbyteArray arg0) +--- a/os_custom.h ++++ b/os_custom.h +@@ -280,6 +280,7 @@ + #define g_file_icon_get_file_LIB LIB_GIO + #define g_file_info_get_content_type_LIB LIB_GIO + #define g_file_info_get_modification_time_LIB LIB_GIO ++#define g_file_new_for_commandline_arg_LIB LIB_GIO + #define g_file_new_for_path_LIB LIB_GIO + #define g_file_new_for_uri_LIB LIB_GIO + #define g_file_read_LIB LIB_GIO +--- a/os_stats.c ++++ b/os_stats.c +@@ -18,8 +18,8 @@ + + #ifdef NATIVE_STATS + +-int OS_nativeFunctionCount = 1396; +-int OS_nativeFunctionCallCount[1396]; ++int OS_nativeFunctionCount = 1397; ++int OS_nativeFunctionCallCount[1397]; + char * OS_nativeFunctionNames[] = { + #ifndef JNI64 + "Call__IIII", +@@ -250,6 +250,7 @@ char * OS_nativeFunctionNames[] = { + "_1g_1file_1icon_1get_1file", + "_1g_1file_1info_1get_1content_1type", + "_1g_1file_1info_1get_1modification_1time", ++ "_1g_1file_1new_1for_1commandline_1arg", + "_1g_1file_1new_1for_1path", + "_1g_1file_1new_1for_1uri", + "_1g_1file_1query_1info", +--- a/os_stats.h ++++ b/os_stats.h +@@ -258,6 +258,7 @@ typedef enum { + _1g_1file_1icon_1get_1file_FUNC, + _1g_1file_1info_1get_1content_1type_FUNC, + _1g_1file_1info_1get_1modification_1time_FUNC, ++ _1g_1file_1new_1for_1commandline_1arg_FUNC, + _1g_1file_1new_1for_1path_FUNC, + _1g_1file_1new_1for_1uri_FUNC, + _1g_1file_1query_1info_FUNC, +--- a/src/org/eclipse/swt/internal/gtk/OS.java ++++ b/src/org/eclipse/swt/internal/gtk/OS.java +@@ -2113,6 +2113,16 @@ public static final long /*int*/ g_file_new_for_path(byte[] fileName) { + } + } + /** @method flags=dynamic */ ++public static final native long /*int*/ _g_file_new_for_commandline_arg(byte[] fileName); ++public static final long /*int*/ g_file_new_for_commandline_arg(byte[] fileName) { ++ lock.lock(); ++ try { ++ return _g_file_new_for_commandline_arg(fileName); ++ } finally { ++ lock.unlock(); ++ } ++} ++/** @method flags=dynamic */ + public static final native long /*int*/ _g_file_new_for_uri(byte[] fileName); + public static final long /*int*/ g_file_new_for_uri(byte[] fileName) { + lock.lock(); +--- a/src/org/eclipse/swt/program/Program.java ++++ b/src/org/eclipse/swt/program/Program.java +@@ -954,7 +954,7 @@ static boolean gio_isExecutable(String fileName) { + static boolean gio_launch(String fileName) { + boolean result = false; + byte[] fileNameBuffer = Converter.wcsToMbcs (null, fileName, true); +- long /*int*/ file = OS.g_file_new_for_path (fileNameBuffer); ++ long /*int*/ file = OS.g_file_new_for_commandline_arg (fileNameBuffer); + if (file != 0) { + long /*int*/ uri = OS.g_file_get_uri (file); + if (uri != 0) { diff --git a/dev-java/swt/files/swt-3.8-as-needed-and-flag-fixes.patch b/dev-java/swt/files/swt-3.8-as-needed-and-flag-fixes.patch new file mode 100644 index 000000000000..ce5c54e408e2 --- /dev/null +++ b/dev-java/swt/files/swt-3.8-as-needed-and-flag-fixes.patch @@ -0,0 +1,243 @@ +--- a/make_freebsd.mak ++++ b/make_freebsd.mak +@@ -64,7 +64,7 @@ GLXLIBS = -L/usr/X11R6/lib -lGL -lGLU -lm + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -91,7 +91,7 @@ XULRUNNER_OBJECTS = swt.o xpcomxul.o xpcomxul_custom.o xpcomxul_structs.o xpcomx + XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DFREEBSD -DGTK \ +@@ -115,13 +115,13 @@ all: make_swt make_atk make_gnome make_glx + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -140,7 +140,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -156,7 +156,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -164,7 +164,7 @@ $(CDE_LIB): $(CDE_OBJECTS) + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -172,7 +172,7 @@ $(AWT_LIB): $(AWT_OBJECTS) + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -189,7 +189,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -206,7 +206,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -226,7 +226,7 @@ xpcom_stats.o: xpcom_stats.cpp + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -252,7 +252,7 @@ xpcomxulglue_stats.o: xpcomglue_stats.cpp + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -269,7 +269,7 @@ xpcominit_stats.o: xpcominit_stats.cpp + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c +--- a/make_linux.mak ++++ b/make_linux.mak +@@ -66,7 +66,7 @@ GLXLIBS = -lGL -lGLU -lm + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS = $(CXXFLAGS) \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -106,7 +106,7 @@ XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o + WEBKIT_OBJECTS = swt.o webkit.o webkit_structs.o webkit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DLINUX -DGTK \ +@@ -130,13 +130,13 @@ all: make_swt make_atk make_glx make_webkit + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -155,7 +155,7 @@ os_stats.o: os_stats.c os_structs.h os.h os_stats.h swt.h + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -171,7 +171,7 @@ cairo_stats.o: cairo_stats.c cairo_structs.h cairo.h cairo_stats.h swt.h + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -179,7 +179,7 @@ $(CDE_LIB): $(CDE_OBJECTS) + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -187,7 +187,7 @@ $(AWT_LIB): $(AWT_OBJECTS) + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -204,7 +204,7 @@ atk_stats.o: atk_stats.c atk_structs.h atk_stats.h atk.h + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -221,7 +221,7 @@ gnome_stats.o: gnome_stats.c gnome_stats.h + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -242,7 +242,7 @@ make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) + echo -e "#include<stdlib.h>\nsize_t je_malloc_usable_size_in_advance(size_t n) {\nreturn n;\n}" | gcc --shared -xc - -o libswt-xulrunner-fix.so +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -262,7 +262,7 @@ xpcomxul_stats.o: xpcom_stats.cpp + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -279,7 +279,7 @@ xpcominit_stats.o: xpcominit_stats.cpp + make_webkit: $(WEBKIT_LIB) + + $(WEBKIT_LIB): $(WEBKIT_OBJECTS) +- $(CC) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) + + webkit.o: webkitgtk.c + $(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk.c -o webkit.o +@@ -296,7 +296,7 @@ webkit_stats.o: webkitgtk_stats.c webkitgtk_stats.h + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c diff --git a/dev-java/swt/files/swt-3.8-manifest b/dev-java/swt/files/swt-3.8-manifest new file mode 100644 index 000000000000..ee9e31c373d6 --- /dev/null +++ b/dev-java/swt/files/swt-3.8-manifest @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Fragment-Host: org.eclipse.swt; bundle-version="[3.0.0,4.0.0)" +Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true +Bundle-Version: 3.8 +Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=SWT_ARCH)) +Export-Package: org.eclipse.swt.internal.accessibility.gtk; x-internal:=true, + org.eclipse.swt.internal.cairo; x-internal:=true, + org.eclipse.swt.internal.cde; x-internal:=true, + org.eclipse.swt.internal.gnome; x-internal:=true, + org.eclipse.swt.internal.gtk; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true + org.eclipse.swt.internal.webkit; x-internal:=true + diff --git a/dev-java/swt/files/swt-3.8.2-gthread.patch b/dev-java/swt/files/swt-3.8.2-gthread.patch new file mode 100644 index 000000000000..6f99a59382ba --- /dev/null +++ b/dev-java/swt/files/swt-3.8.2-gthread.patch @@ -0,0 +1,44 @@ +From c973b9b9be568ebbce618985bc5ee440babf8ab1 Mon Sep 17 00:00:00 2001 +From: Jakub Adam <jakub.adam@ktknet.cz> +Date: Thu, 27 Jun 2013 10:16:49 +0200 +Subject: [PATCH 1/2] fix-glib-2.35-compatibility + +g_thread_init() and g_thread_supported() are deprecated and don't +have to be used anymore. + +--- + os.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/os.c ++++ b/os.c +@@ -4444,9 +4444,9 @@ fail: + JNIEXPORT void JNICALL OS_NATIVE(_1g_1thread_1init) + (JNIEnv *env, jclass that, jintLong arg0) + { +- OS_NATIVE_ENTER(env, that, _1g_1thread_1init_FUNC); ++ /*OS_NATIVE_ENTER(env, that, _1g_1thread_1init_FUNC); + g_thread_init((GThreadFunctions *)arg0); +- OS_NATIVE_EXIT(env, that, _1g_1thread_1init_FUNC); ++ OS_NATIVE_EXIT(env, that, _1g_1thread_1init_FUNC);*/ + } + #endif + +@@ -4454,11 +4454,12 @@ JNIEXPORT void JNICALL OS_NATIVE(_1g_1thread_1init) + JNIEXPORT jboolean JNICALL OS_NATIVE(_1g_1thread_1supported) + (JNIEnv *env, jclass that) + { +- jboolean rc = 0; ++ /*jboolean rc = 0; + OS_NATIVE_ENTER(env, that, _1g_1thread_1supported_FUNC); + rc = (jboolean)g_thread_supported(); + OS_NATIVE_EXIT(env, that, _1g_1thread_1supported_FUNC); +- return rc; ++ return rc;*/ ++ return 1; + } + #endif + +-- +1.7.10.4 + diff --git a/dev-java/swt/files/swt-4.2-as-needed-and-flag-fixes.patch b/dev-java/swt/files/swt-4.2-as-needed-and-flag-fixes.patch new file mode 100644 index 000000000000..98773c155697 --- /dev/null +++ b/dev-java/swt/files/swt-4.2-as-needed-and-flag-fixes.patch @@ -0,0 +1,243 @@ +--- make_linux.mak- 2012-07-02 00:49:48.729100052 +0000 ++++ make_linux.mak 2012-07-02 00:53:16.753499389 +0000 +@@ -66,7 +66,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS = $(CXXFLAGS) \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -106,7 +106,7 @@ + WEBKIT_OBJECTS = swt.o webkit.o webkit_structs.o webkit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DLINUX -DGTK \ +@@ -130,13 +130,13 @@ + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -155,7 +155,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -171,7 +171,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -179,7 +179,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -187,7 +187,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -204,7 +204,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -221,7 +221,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -242,7 +242,7 @@ + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) + echo -e "#include<stdlib.h>\nsize_t je_malloc_usable_size_in_advance(size_t n) {\nreturn n;\n}" | gcc --shared -xc - -o libswt-xulrunner-fix.so +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) $(XULRUNNEREXCLUDES) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -262,7 +262,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -279,7 +279,7 @@ + make_webkit: $(WEBKIT_LIB) + + $(WEBKIT_LIB): $(WEBKIT_OBJECTS) +- $(CC) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(WEBKIT_LIB) $(WEBKIT_OBJECTS) + + webkit.o: webkitgtk.c + $(CC) $(CFLAGS) $(WEBKITCFLAGS) -c webkitgtk.c -o webkit.o +@@ -296,7 +296,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c +--- make_freebsd.mak- 2012-07-02 00:53:28.553351871 +0000 ++++ make_freebsd.mak 2012-07-02 00:55:37.369741444 +0000 +@@ -64,7 +64,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -91,7 +91,7 @@ + XPCOMINIT_OBJECTS = swt.o xpcominit.o xpcominit_structs.o xpcominit_stats.o + GLX_OBJECTS = swt.o glx.o glx_structs.o glx_stats.o + +-CFLAGS = -O -Wall \ ++CFLAGS += \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DFREEBSD -DGTK \ +@@ -115,13 +115,13 @@ + make_swt: $(SWT_LIB) $(SWTPI_LIB) + + $(SWT_LIB): $(SWT_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWT_LIB) $(SWT_OBJECTS) + + callback.o: callback.c callback.h + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -140,7 +140,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -156,7 +156,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -164,7 +164,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) ++ $(CC) $(LDFLAGS) $(AWT_LFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -172,7 +172,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -189,7 +189,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -206,7 +206,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALFLAGS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -226,7 +226,7 @@ + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -252,7 +252,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALFLAGS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -269,7 +269,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) ++ $(CC) $(LDFLAGS) $(LFLAGS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c diff --git a/dev-java/swt/files/swt-4.2-manifest b/dev-java/swt/files/swt-4.2-manifest new file mode 100644 index 000000000000..36736a0db72d --- /dev/null +++ b/dev-java/swt/files/swt-4.2-manifest @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Fragment-Host: org.eclipse.swt; bundle-version=4.2.0 +Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true +Bundle-Version: 4.2 +Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=SWT_ARCH)) +Export-Package: org.eclipse.swt.internal.accessibility.gtk; x-internal:=true, + org.eclipse.swt.internal.cairo; x-internal:=true, + org.eclipse.swt.internal.cde; x-internal:=true, + org.eclipse.swt.internal.gnome; x-internal:=true, + org.eclipse.swt.internal.gtk; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true + org.eclipse.swt.internal.webkit; x-internal:=true |