diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-java/swt/files | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
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/as-needed-and-flag-fixes.patch | 238 | ||||
-rw-r--r-- | dev-java/swt/files/build.xml | 17 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.3-callback-pointer-dereferencing.patch | 23 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.4-manifest | 16 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.4-xulrunner-1.9.1-amd64.patch | 325 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.4-xulrunner-1.9.1.patch | 325 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.5-manifest | 17 | ||||
-rw-r--r-- | dev-java/swt/files/swt-3.6-manifest | 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 |
17 files changed, 2043 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/as-needed-and-flag-fixes.patch b/dev-java/swt/files/as-needed-and-flag-fixes.patch new file mode 100644 index 000000000000..4cacaf61d671 --- /dev/null +++ b/dev-java/swt/files/as-needed-and-flag-fixes.patch @@ -0,0 +1,238 @@ +--- make_linux.mak 2009-05-24 18:38:39.000000000 +0300 ++++ make_linux.mak.fixed 2009-05-24 19:38:51.000000000 +0300 +@@ -64,7 +64,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS = $(CXXFLAGS) \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -92,15 +92,14 @@ + 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 \ +- -DSWT_VERSION=$(SWT_VERSION) \ ++CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DLINUX -DGTK \ + -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/linux \ + -fPIC \ + ${SWT_PTR_CFLAGS} +-LIBS = -shared -fPIC ++LIBS = -shared -fPIC $(LDFLAGS) + + ifndef NO_STRIP + AWT_LIBS := $(AWT_LIBS) -s +@@ -122,7 +121,7 @@ + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) ++ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -141,7 +140,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) ++ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -157,7 +156,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) ++ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -165,7 +164,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS) ++ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -173,7 +172,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS) ++ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -190,7 +189,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) ++ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -207,7 +206,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) $(MOZILLAEXCLUDES) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -227,7 +226,7 @@ + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -247,7 +246,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -264,7 +263,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS) ++ $(CC) $(LIBS) -o $(GLX_LIB) $(GLX_OBJECTS) $(GLXLIBS) + + glx.o: glx.c + $(CC) $(CFLAGS) $(GLXCFLAGS) -c glx.c +--- make_freebsd.mak 2009-05-24 20:09:55.000000000 +0300 ++++ make_freebsd.mak.fixed 2009-05-24 20:15:03.000000000 +0300 +@@ -64,7 +64,7 @@ + # Uncomment for Native Stats tool + #NATIVE_STATS = -DNATIVE_STATS + +-MOZILLACFLAGS = -O \ ++MOZILLACFLAGS = $(CXXFLAGS) \ + -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DMOZILLA_STRICT_API=1 \ +@@ -91,15 +91,14 @@ + 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 \ +- -DSWT_VERSION=$(SWT_VERSION) \ ++CFLAGS += -DSWT_VERSION=$(SWT_VERSION) \ + $(NATIVE_STATS) \ + -DFREEBSD -DGTK \ + -I$(JAVA_HOME)/include \ + -I$(JAVA_HOME)/include/freebsd \ + -fPIC \ + ${SWT_PTR_CFLAGS} +-LIBS = -shared -fPIC ++LIBS = -shared -fPIC $(LDFLAGS) + + ifndef NO_STRIP + AWT_LIBS := $(AWT_LIBS) -s +@@ -121,7 +120,7 @@ + $(CC) $(CFLAGS) -DUSE_ASSEMBLER -c callback.c + + $(SWTPI_LIB): $(SWTPI_OBJECTS) +- $(CC) $(LIBS) $(GTKLIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) ++ $(CC) $(LIBS) -o $(SWTPI_LIB) $(SWTPI_OBJECTS) $(GTKLIBS) + + swt.o: swt.c swt.h + $(CC) $(CFLAGS) -c swt.c +@@ -140,7 +139,7 @@ + make_cairo: $(CAIRO_LIB) + + $(CAIRO_LIB): $(CAIRO_OBJECTS) +- $(CC) $(LIBS) $(CAIROLIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) ++ $(CC) $(LIBS) -o $(CAIRO_LIB) $(CAIRO_OBJECTS) $(CAIROLIBS) + + cairo.o: cairo.c cairo.h swt.h + $(CC) $(CFLAGS) $(CAIROCFLAGS) -c cairo.c +@@ -156,7 +155,7 @@ + make_cde: $(CDE_LIB) + + $(CDE_LIB): $(CDE_OBJECTS) +- $(CC) $(LIBS) $(CDE_LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) ++ $(CC) $(LIBS) -o $(CDE_LIB) $(CDE_OBJECTS) $(CDE_LIBS) + + # + # AWT lib +@@ -164,7 +163,7 @@ + make_awt:$(AWT_LIB) + + $(AWT_LIB): $(AWT_OBJECTS) +- $(CC) $(AWT_LIBS) -o $(AWT_LIB) $(AWT_OBJECTS) ++ $(CC) $(LDFLAGS) -o $(AWT_LIB) $(AWT_OBJECTS) $(AWT_LIBS) + + # + # Atk lib +@@ -172,7 +171,7 @@ + make_atk: $(ATK_LIB) + + $(ATK_LIB): $(ATK_OBJECTS) +- $(CC) $(LIBS) $(ATKLIBS) -o $(ATK_LIB) $(ATK_OBJECTS) ++ $(CC) $(LIBS) -o $(ATK_LIB) $(ATK_OBJECTS) $(ATKLIBS) + + atk.o: atk.c atk.h + $(CC) $(CFLAGS) $(ATKCFLAGS) -c atk.c +@@ -189,7 +188,7 @@ + make_gnome: $(GNOME_LIB) + + $(GNOME_LIB): $(GNOME_OBJECTS) +- $(CC) $(LIBS) $(GNOMELIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) ++ $(CC) $(LIBS) -o $(GNOME_LIB) $(GNOME_OBJECTS) $(GNOMELIBS) + + gnome.o: gnome.c + $(CC) $(CFLAGS) $(GNOMECFLAGS) -c gnome.c +@@ -206,7 +205,7 @@ + make_mozilla:$(MOZILLA_LIB) + + $(MOZILLA_LIB): $(MOZILLA_OBJECTS) +- $(CXX) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS} ++ $(CXX) $(LDFLAGS) -o $(MOZILLA_LIB) $(MOZILLA_OBJECTS) $(MOZILLALIBS) ${MOZILLA_LIBS} + + xpcom.o: xpcom.cpp + $(CXX) $(MOZILLACFLAGS) ${MOZILLA_INCLUDES} -c xpcom.cpp +@@ -226,7 +225,7 @@ + make_xulrunner:$(XULRUNNER_LIB) + + $(XULRUNNER_LIB): $(XULRUNNER_OBJECTS) +- $(CXX) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XULRUNNER_LIB) $(XULRUNNER_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + + xpcomxul.o: xpcom.cpp + $(CXX) -o xpcomxul.o $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcom.cpp +@@ -252,7 +251,7 @@ + make_xpcominit:$(XPCOMINIT_LIB) + + $(XPCOMINIT_LIB): $(XPCOMINIT_OBJECTS) +- $(CXX) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} ++ $(CXX) $(LDFLAGS) -o $(XPCOMINIT_LIB) $(XPCOMINIT_OBJECTS) $(MOZILLALIBS) ${XULRUNNER_LIBS} + + xpcominit.o: xpcominit.cpp + $(CXX) $(MOZILLACFLAGS) ${XULRUNNER_INCLUDES} -c xpcominit.cpp +@@ -269,7 +268,7 @@ + make_glx: $(GLX_LIB) + + $(GLX_LIB): $(GLX_OBJECTS) +- $(CC) $(LIBS) $(GLXLIBS) -o $(GLX_LIB) $(GLX_OBJECTS) ++ $(CC) $(LIBS) -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.3-callback-pointer-dereferencing.patch b/dev-java/swt/files/swt-3.3-callback-pointer-dereferencing.patch new file mode 100644 index 000000000000..92fbab779d1c --- /dev/null +++ b/dev-java/swt/files/swt-3.3-callback-pointer-dereferencing.patch @@ -0,0 +1,23 @@ +# patch from gcj-overlay, not sure if by geki himself +# removes QA warning about strict-aliasing +--- callback.c.orig 2006-12-12 17:25:26.000000000 +0100 ++++ callback.c 2006-12-12 18:11:34.000000000 +0100 +@@ -250,12 +250,16 @@ + + #ifdef JNI_VERSION_1_2 + if (IS_JNI_1_2) { +- (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_2); ++ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */ ++ /* jint GetEnv(JavaVM *vm, void **env, jint version); */ ++ (*jvm)->GetEnv(jvm, (void *)&env, JNI_VERSION_1_2); + } + #endif + + if (env == NULL) { +- (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); ++ /* http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/invocation.html */ ++ /* jint AttachCurrentThread(JavaVM *vm, JNIEnv **p_env, void *thr_args); */ ++ (*jvm)->AttachCurrentThread(jvm, (void *)&env, NULL); + if (IS_JNI_1_2) detach = 1; + } + diff --git a/dev-java/swt/files/swt-3.4-manifest b/dev-java/swt/files/swt-3.4-manifest new file mode 100644 index 000000000000..c11c42ab7199 --- /dev/null +++ b/dev-java/swt/files/swt-3.4-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="[3.0.0,4.0.0)" +Bundle-SymbolicName: org.eclipse.swt.gtk.linux.SWT_ARCH; singleton:=true +Bundle-Version: 3.4.0 +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.mozilla; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true diff --git a/dev-java/swt/files/swt-3.4-xulrunner-1.9.1-amd64.patch b/dev-java/swt/files/swt-3.4-xulrunner-1.9.1-amd64.patch new file mode 100644 index 000000000000..db2536bab3ac --- /dev/null +++ b/dev-java/swt/files/swt-3.4-xulrunner-1.9.1-amd64.patch @@ -0,0 +1,325 @@ +# Patch by Grant Gayed +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=268651#c18 +# https://bugs.eclipse.org/bugs/attachment.cgi?id=130751 +Index: Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java,v +retrieving revision 1.105.2.3 +diff -u -r1.105.2.3 Mozilla.java +--- src/org/eclipse/swt/browser/Mozilla.java 21 Aug 2008 16:02:30 -00001.105.2.3 ++++ src/org/eclipse/swt/browser/Mozilla.java 2 Apr 2009 19:15:06 -0000 +@@ -47,6 +47,7 @@ + Shell tip = null; + Listener listener; + Vector unhookedDOMWindows = new Vector (); ++ byte[] htmlBytes; + + static nsIAppShell AppShell; + static AppFileLocProvider LocationProvider; +@@ -1130,21 +1131,21 @@ + * Once the client does a proper navigate with either setUrl() or setText() then resume as + * normal. The Mozilla bug for this is https://bugzilla.mozilla.org/show_bug.cgi?id=415789. + */ +- awaitingNavigate = true; +- rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); +- if (rc != XPCOM.NS_OK) { +- browser.dispose (); +- error (rc); +- } +- if (result[0] == 0) { +- browser.dispose (); +- error (XPCOM.NS_ERROR_NO_INTERFACE); +- } +- nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); +- char[] uri = new char[ABOUT_BLANK.length () + 1]; +- ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0); +- rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); +- webNavigation.Release (); ++// awaitingNavigate = true; ++// rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); ++// if (rc != XPCOM.NS_OK) { ++// browser.dispose (); ++// error (rc); ++// } ++// if (result[0] == 0) { ++// browser.dispose (); ++// error (XPCOM.NS_ERROR_NO_INTERFACE); ++// } ++// nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); ++// char[] uri = new char[ABOUT_BLANK.length () + 1]; ++// ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0); ++// rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); ++// webNavigation.Release (); + } + } + result[0] = 0; +@@ -1223,6 +1224,7 @@ + } + + public boolean back () { ++ htmlBytes = null; + if (awaitingNavigate) return false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1425,6 +1427,7 @@ + } + + public boolean forward () { ++ htmlBytes = null; + if (awaitingNavigate) return false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1635,6 +1638,7 @@ + webBrowser.Release (); + webBrowser = null; + webBrowserObject = null; ++ htmlBytes = null; + + if (tip != null && !tip.isDisposed ()) tip.dispose (); + tip = null; +@@ -1696,6 +1700,7 @@ + } + + public void refresh () { ++ htmlBytes = null; + if (awaitingNavigate) return; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1817,11 +1822,45 @@ + } else { + result[0] = 0; + rc = interfaceRequestor.GetInterface (nsIDocShell.NS_IDOCSHELL_IID, result); +- if (rc != XPCOM.NS_OK) error (rc); +- if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); +- nsIDocShell docShell = new nsIDocShell (result[0]); +- rc = docShell.LoadStream (inputStream.getAddress (), uri.getAddress (), aContentType, aContentCharset, 0); +- docShell.Release (); ++ if (rc == XPCOM.NS_OK) { ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIDocShell docShell = new nsIDocShell (result[0]); ++ rc = docShell.LoadStream (inputStream.getAddress (), uri.getAddress (), aContentType, aContentCharset, 0); ++ docShell.Release (); ++ } else { ++ result[0] = 0; ++ rc = webBrowser.QueryInterface (nsIWebBrowserStream.NS_IWEBBROWSERSTREAM_IID, result); ++ if (rc == XPCOM.NS_OK) { ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ /* ++ * Setting mozilla's content through nsIWebBrowserStream does not cause a page ++ * load to occur, so the events that usually accompany a page change are not ++ * fired. To make this behave as expected, navigate to about:blank first and ++ * then set the html content once the page has loaded. ++ */ ++ new nsISupports (result[0]).Release (); ++ result[0] = 0; ++ ++ /* ++ * If htmlBytes is not null then the about:blank page is already being loaded, ++ * so no Navigate is required. Just set the html that is to be shown. ++ */ ++ boolean blankLoading = htmlBytes != null; ++ htmlBytes = data; ++ if (blankLoading) return true; ++ ++ /* navigate to about:blank */ ++ rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); ++ result[0] = 0; ++ char[] uriChars = new char[ABOUT_BLANK.length () + 1]; ++ ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uriChars, 0); ++ rc = webNavigation.LoadURI (uriChars, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); ++ webNavigation.Release (); ++ } ++ } + } + } + if (rc != XPCOM.NS_OK) error (rc); +@@ -1836,6 +1875,7 @@ + } + + public boolean setUrl (String url) { ++ htmlBytes = null; + awaitingNavigate = false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1852,6 +1892,7 @@ + } + + public void stop () { ++ htmlBytes = null; + if (awaitingNavigate) return; + + long /*int*/[] result = new long /*int*/[1]; +@@ -2174,6 +2215,108 @@ + unhookedDOMWindows.remove (ptrObject); + new nsISupports (ptrObject.value).Release (); + } ++ ++ /* ++ * If htmlBytes is not null then there is html from a previous setText() call ++ * waiting to be set into the about:blank page once it has completed loading. ++ */ ++ if (htmlBytes != null) { ++ nsIRequest req = new nsIRequest (aRequest); ++ long /*int*/ name = XPCOM.nsEmbedCString_new (); ++ rc = req.GetName (name); ++ if (rc != XPCOM.NS_OK) error (rc); ++ int length = XPCOM.nsEmbedCString_Length (name); ++ long /*int*/ buffer = XPCOM.nsEmbedCString_get (name); ++ byte[] dest = new byte[length]; ++ XPCOM.memmove (dest, buffer, length); ++ String url = new String (dest); ++ XPCOM.nsEmbedCString_delete (name); ++ ++ if (url.startsWith (ABOUT_BLANK)) { ++ /* ++ * Setting mozilla's content with nsIWebBrowserStream invalidates the ++ * DOM listeners that were hooked on it (about:blank), so remove them and ++ * add new ones after the content has been set. ++ */ ++ unhookDOMListeners (); ++ ++ rc = XPCOM.NS_GetServiceManager (result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ ++ nsIServiceManager serviceManager = new nsIServiceManager (result[0]); ++ result[0] = 0; ++ rc = serviceManager.GetService (XPCOM.NS_IOSERVICE_CID, nsIIOService.NS_IIOSERVICE_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ serviceManager.Release (); ++ ++ nsIIOService ioService = new nsIIOService (result[0]); ++ result[0] = 0; ++ /* ++ * Note. Mozilla ignores LINK tags used to load CSS stylesheets ++ * when the URI protocol for the nsInputStreamChannel ++ * is about:blank. The fix is to specify the file protocol. ++ */ ++ byte[] aString = MozillaDelegate.wcsToMbcs (null, URI_FROMMEMORY, false); ++ long /*int*/ aSpec = XPCOM.nsEmbedCString_new (aString, aString.length); ++ rc = ioService.NewURI (aSpec, null, 0, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ XPCOM.nsEmbedCString_delete (aSpec); ++ ioService.Release (); ++ ++ nsIURI uri = new nsIURI (result[0]); ++ result[0] = 0; ++ ++ rc = webBrowser.QueryInterface (nsIWebBrowserStream.NS_IWEBBROWSERSTREAM_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ ++ nsIWebBrowserStream stream = new nsIWebBrowserStream (result[0]); ++ result[0] = 0; ++ ++ byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", true); // $NON-NLS-1$ ++ long /*int*/ aContentType = XPCOM.nsEmbedCString_new (contentTypeBuffer, contentTypeBuffer.length); ++ ++ rc = stream.OpenStream (uri.getAddress (), aContentType); ++ if (rc != XPCOM.NS_OK) error (rc); ++ long /*int*/ ptr = C.malloc (htmlBytes.length); ++ XPCOM.memmove (ptr, htmlBytes, htmlBytes.length); ++ int pageSize = 8192; ++ int pageCount = htmlBytes.length / pageSize + 1; ++ long /*int*/ current = ptr; ++ for (int i = 0; i < pageCount; i++) { ++ length = i == pageCount - 1 ? htmlBytes.length % pageSize : pageSize; ++ if (length > 0) { ++ rc = stream.AppendToStream (current, length); ++ if (rc != XPCOM.NS_OK) error (rc); ++ } ++ current += pageSize; ++ } ++ rc = stream.CloseStream (); ++ if (rc != XPCOM.NS_OK) error (rc); ++ C.free (ptr); ++ XPCOM.nsEmbedCString_delete (aContentType); ++ stream.Release (); ++ uri.Release (); ++ htmlBytes = null; ++ ++ rc = webBrowser.GetContentDOMWindow (result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ boolean isTop = result[0] == domWindow.getAddress (); ++ new nsISupports (result[0]).Release (); ++ result[0] = 0; ++ rc = domWindow.QueryInterface (nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIDOMEventTarget target = new nsIDOMEventTarget (result[0]); ++ result[0] = 0; ++ hookDOMListeners (target, isTop); ++ target.Release (); ++ } ++ } + domWindow.Release (); + + /* +Index: Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +=================================================================== +RCS file: Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +diff -N Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ src/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java 1 Jan 1970 00:00:00 -0000 +@@ -0,0 +1,55 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla Communicator client code, released March 31, 1998. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by Netscape are Copyright (C) 1998-1999 ++ * Netscape Communications Corporation. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * IBM ++ * - Binding to permit interfacing between Mozilla and SWT ++ * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++package org.eclipse.swt.internal.mozilla; ++ ++public class nsIWebBrowserStream extends nsISupports { ++ ++ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3; ++ ++ public static final String NS_IWEBBROWSERSTREAM_IID_STR = ++ "86d02f0e-219b-4cfc-9c88-bd98d2cce0b8"; ++ ++ public static final nsID NS_IWEBBROWSERSTREAM_IID = ++ new nsID(NS_IWEBBROWSERSTREAM_IID_STR); ++ ++ public nsIWebBrowserStream(long /*int*/ address) { ++ super(address); ++ } ++ ++ public int OpenStream(long /*int*/ aBaseURI, long /*int*/ aContentType) { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aBaseURI, aContentType); ++ } ++ ++ public int AppendToStream(long /*int*/ aData, int aLen) { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aData, aLen); ++ } ++ ++ public int CloseStream() { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress()); ++ } ++} diff --git a/dev-java/swt/files/swt-3.4-xulrunner-1.9.1.patch b/dev-java/swt/files/swt-3.4-xulrunner-1.9.1.patch new file mode 100644 index 000000000000..8e829943e325 --- /dev/null +++ b/dev-java/swt/files/swt-3.4-xulrunner-1.9.1.patch @@ -0,0 +1,325 @@ +# Patch by Grant Gayed +# https://bugs.eclipse.org/bugs/show_bug.cgi?id=268651#c18 +# https://bugs.eclipse.org/bugs/attachment.cgi?id=130751 +Index: Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java,v +retrieving revision 1.105.2.3 +diff -u -r1.105.2.3 Mozilla.java +--- src/org/eclipse/swt/browser/Mozilla.java 21 Aug 2008 16:02:30 -00001.105.2.3 ++++ src/org/eclipse/swt/browser/Mozilla.java 2 Apr 2009 19:15:06 -0000 +@@ -47,6 +47,7 @@ + Shell tip = null; + Listener listener; + Vector unhookedDOMWindows = new Vector (); ++ byte[] htmlBytes; + + static nsIAppShell AppShell; + static AppFileLocProvider LocationProvider; +@@ -1130,21 +1131,21 @@ + * Once the client does a proper navigate with either setUrl() or setText() then resume as + * normal. The Mozilla bug for this is https://bugzilla.mozilla.org/show_bug.cgi?id=415789. + */ +- awaitingNavigate = true; +- rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); +- if (rc != XPCOM.NS_OK) { +- browser.dispose (); +- error (rc); +- } +- if (result[0] == 0) { +- browser.dispose (); +- error (XPCOM.NS_ERROR_NO_INTERFACE); +- } +- nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); +- char[] uri = new char[ABOUT_BLANK.length () + 1]; +- ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0); +- rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); +- webNavigation.Release (); ++// awaitingNavigate = true; ++// rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); ++// if (rc != XPCOM.NS_OK) { ++// browser.dispose (); ++// error (rc); ++// } ++// if (result[0] == 0) { ++// browser.dispose (); ++// error (XPCOM.NS_ERROR_NO_INTERFACE); ++// } ++// nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); ++// char[] uri = new char[ABOUT_BLANK.length () + 1]; ++// ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uri, 0); ++// rc = webNavigation.LoadURI (uri, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); ++// webNavigation.Release (); + } + } + result[0] = 0; +@@ -1223,6 +1224,7 @@ + } + + public boolean back () { ++ htmlBytes = null; + if (awaitingNavigate) return false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1425,6 +1427,7 @@ + } + + public boolean forward () { ++ htmlBytes = null; + if (awaitingNavigate) return false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1635,6 +1638,7 @@ + webBrowser.Release (); + webBrowser = null; + webBrowserObject = null; ++ htmlBytes = null; + + if (tip != null && !tip.isDisposed ()) tip.dispose (); + tip = null; +@@ -1696,6 +1700,7 @@ + } + + public void refresh () { ++ htmlBytes = null; + if (awaitingNavigate) return; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1817,11 +1822,45 @@ + } else { + result[0] = 0; + rc = interfaceRequestor.GetInterface (nsIDocShell.NS_IDOCSHELL_IID, result); +- if (rc != XPCOM.NS_OK) error (rc); +- if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); +- nsIDocShell docShell = new nsIDocShell (result[0]); +- rc = docShell.LoadStream (inputStream.getAddress (), uri.getAddress (), aContentType, aContentCharset, 0); +- docShell.Release (); ++ if (rc == XPCOM.NS_OK) { ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIDocShell docShell = new nsIDocShell (result[0]); ++ rc = docShell.LoadStream (inputStream.getAddress (), uri.getAddress (), aContentType, aContentCharset, 0); ++ docShell.Release (); ++ } else { ++ result[0] = 0; ++ rc = webBrowser.QueryInterface (nsIWebBrowserStream.NS_IWEBBROWSERSTREAM_IID, result); ++ if (rc == XPCOM.NS_OK) { ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ /* ++ * Setting mozilla's content through nsIWebBrowserStream does not cause a page ++ * load to occur, so the events that usually accompany a page change are not ++ * fired. To make this behave as expected, navigate to about:blank first and ++ * then set the html content once the page has loaded. ++ */ ++ new nsISupports (result[0]).Release (); ++ result[0] = 0; ++ ++ /* ++ * If htmlBytes is not null then the about:blank page is already being loaded, ++ * so no Navigate is required. Just set the html that is to be shown. ++ */ ++ boolean blankLoading = htmlBytes != null; ++ htmlBytes = data; ++ if (blankLoading) return true; ++ ++ /* navigate to about:blank */ ++ rc = webBrowser.QueryInterface (nsIWebNavigation.NS_IWEBNAVIGATION_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIWebNavigation webNavigation = new nsIWebNavigation (result[0]); ++ result[0] = 0; ++ char[] uriChars = new char[ABOUT_BLANK.length () + 1]; ++ ABOUT_BLANK.getChars (0, ABOUT_BLANK.length (), uriChars, 0); ++ rc = webNavigation.LoadURI (uriChars, nsIWebNavigation.LOAD_FLAGS_NONE, 0, 0, 0); ++ webNavigation.Release (); ++ } ++ } + } + } + if (rc != XPCOM.NS_OK) error (rc); +@@ -1836,6 +1875,7 @@ + } + + public boolean setUrl (String url) { ++ htmlBytes = null; + awaitingNavigate = false; + + long /*int*/[] result = new long /*int*/[1]; +@@ -1852,6 +1892,7 @@ + } + + public void stop () { ++ htmlBytes = null; + if (awaitingNavigate) return; + + long /*int*/[] result = new long /*int*/[1]; +@@ -2174,6 +2215,108 @@ + unhookedDOMWindows.remove (ptrObject); + new nsISupports (ptrObject.value).Release (); + } ++ ++ /* ++ * If htmlBytes is not null then there is html from a previous setText() call ++ * waiting to be set into the about:blank page once it has completed loading. ++ */ ++ if (htmlBytes != null) { ++ nsIRequest req = new nsIRequest (aRequest); ++ int /*long*/ name = XPCOM.nsEmbedCString_new (); ++ rc = req.GetName (name); ++ if (rc != XPCOM.NS_OK) error (rc); ++ int length = XPCOM.nsEmbedCString_Length (name); ++ int /*long*/ buffer = XPCOM.nsEmbedCString_get (name); ++ byte[] dest = new byte[length]; ++ XPCOM.memmove (dest, buffer, length); ++ String url = new String (dest); ++ XPCOM.nsEmbedCString_delete (name); ++ ++ if (url.startsWith (ABOUT_BLANK)) { ++ /* ++ * Setting mozilla's content with nsIWebBrowserStream invalidates the ++ * DOM listeners that were hooked on it (about:blank), so remove them and ++ * add new ones after the content has been set. ++ */ ++ unhookDOMListeners (); ++ ++ rc = XPCOM.NS_GetServiceManager (result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ ++ nsIServiceManager serviceManager = new nsIServiceManager (result[0]); ++ result[0] = 0; ++ rc = serviceManager.GetService (XPCOM.NS_IOSERVICE_CID, nsIIOService.NS_IIOSERVICE_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ serviceManager.Release (); ++ ++ nsIIOService ioService = new nsIIOService (result[0]); ++ result[0] = 0; ++ /* ++ * Note. Mozilla ignores LINK tags used to load CSS stylesheets ++ * when the URI protocol for the nsInputStreamChannel ++ * is about:blank. The fix is to specify the file protocol. ++ */ ++ byte[] aString = MozillaDelegate.wcsToMbcs (null, URI_FROMMEMORY, false); ++ int /*long*/ aSpec = XPCOM.nsEmbedCString_new (aString, aString.length); ++ rc = ioService.NewURI (aSpec, null, 0, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ XPCOM.nsEmbedCString_delete (aSpec); ++ ioService.Release (); ++ ++ nsIURI uri = new nsIURI (result[0]); ++ result[0] = 0; ++ ++ rc = webBrowser.QueryInterface (nsIWebBrowserStream.NS_IWEBBROWSERSTREAM_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_NOINTERFACE); ++ ++ nsIWebBrowserStream stream = new nsIWebBrowserStream (result[0]); ++ result[0] = 0; ++ ++ byte[] contentTypeBuffer = MozillaDelegate.wcsToMbcs (null, "text/html", true); // $NON-NLS-1$ ++ int /*long*/ aContentType = XPCOM.nsEmbedCString_new (contentTypeBuffer, contentTypeBuffer.length); ++ ++ rc = stream.OpenStream (uri.getAddress (), aContentType); ++ if (rc != XPCOM.NS_OK) error (rc); ++ int /*long*/ ptr = C.malloc (htmlBytes.length); ++ XPCOM.memmove (ptr, htmlBytes, htmlBytes.length); ++ int pageSize = 8192; ++ int pageCount = htmlBytes.length / pageSize + 1; ++ int /*long*/ current = ptr; ++ for (int i = 0; i < pageCount; i++) { ++ length = i == pageCount - 1 ? htmlBytes.length % pageSize : pageSize; ++ if (length > 0) { ++ rc = stream.AppendToStream (current, length); ++ if (rc != XPCOM.NS_OK) error (rc); ++ } ++ current += pageSize; ++ } ++ rc = stream.CloseStream (); ++ if (rc != XPCOM.NS_OK) error (rc); ++ C.free (ptr); ++ XPCOM.nsEmbedCString_delete (aContentType); ++ stream.Release (); ++ uri.Release (); ++ htmlBytes = null; ++ ++ rc = webBrowser.GetContentDOMWindow (result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ boolean isTop = result[0] == domWindow.getAddress (); ++ new nsISupports (result[0]).Release (); ++ result[0] = 0; ++ rc = domWindow.QueryInterface (nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID, result); ++ if (rc != XPCOM.NS_OK) error (rc); ++ if (result[0] == 0) error (XPCOM.NS_ERROR_NO_INTERFACE); ++ nsIDOMEventTarget target = new nsIDOMEventTarget (result[0]); ++ result[0] = 0; ++ hookDOMListeners (target, isTop); ++ target.Release (); ++ } ++ } + domWindow.Release (); + + /* +Index: Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +=================================================================== +RCS file: Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +diff -N Eclipse SWT Mozilla/common/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ src/org/eclipse/swt/internal/mozilla/nsIWebBrowserStream.java 1 Jan 1970 00:00:00 -0000 +@@ -0,0 +1,55 @@ ++/* ***** BEGIN LICENSE BLOCK ***** ++ * Version: MPL 1.1 ++ * ++ * The contents of this file are subject to the Mozilla Public License Version ++ * 1.1 (the "License"); you may not use this file except in compliance with ++ * the License. You may obtain a copy of the License at ++ * http://www.mozilla.org/MPL/ ++ * ++ * Software distributed under the License is distributed on an "AS IS" basis, ++ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License ++ * for the specific language governing rights and limitations under the ++ * License. ++ * ++ * The Original Code is Mozilla Communicator client code, released March 31, 1998. ++ * ++ * The Initial Developer of the Original Code is ++ * Netscape Communications Corporation. ++ * Portions created by Netscape are Copyright (C) 1998-1999 ++ * Netscape Communications Corporation. All Rights Reserved. ++ * ++ * Contributor(s): ++ * ++ * IBM ++ * - Binding to permit interfacing between Mozilla and SWT ++ * - Copyright (C) 2003, 2009 IBM Corp. All Rights Reserved. ++ * ++ * ***** END LICENSE BLOCK ***** */ ++package org.eclipse.swt.internal.mozilla; ++ ++public class nsIWebBrowserStream extends nsISupports { ++ ++ static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 3; ++ ++ public static final String NS_IWEBBROWSERSTREAM_IID_STR = ++ "86d02f0e-219b-4cfc-9c88-bd98d2cce0b8"; ++ ++ public static final nsID NS_IWEBBROWSERSTREAM_IID = ++ new nsID(NS_IWEBBROWSERSTREAM_IID_STR); ++ ++ public nsIWebBrowserStream(int /*long*/ address) { ++ super(address); ++ } ++ ++ public int OpenStream(int /*long*/ aBaseURI, int /*long*/ aContentType) { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aBaseURI, aContentType); ++ } ++ ++ public int AppendToStream(int /*long*/ aData, int aLen) { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aData, aLen); ++ } ++ ++ public int CloseStream() { ++ return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress()); ++ } ++} diff --git a/dev-java/swt/files/swt-3.5-manifest b/dev-java/swt/files/swt-3.5-manifest new file mode 100644 index 000000000000..70be33fb8ef8 --- /dev/null +++ b/dev-java/swt/files/swt-3.5-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.5 +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.mozilla; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true + diff --git a/dev-java/swt/files/swt-3.6-manifest b/dev-java/swt/files/swt-3.6-manifest new file mode 100644 index 000000000000..cf217b0d0602 --- /dev/null +++ b/dev-java/swt/files/swt-3.6-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.6 +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.mozilla; x-internal:=true, + org.eclipse.swt.internal.opengl.glx; x-internal:=true + 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 |