diff options
author | Vlastimil Babka <caster@gentoo.org> | 2009-07-19 10:27:20 +0000 |
---|---|---|
committer | Vlastimil Babka <caster@gentoo.org> | 2009-07-19 10:27:20 +0000 |
commit | c0807926833c9d5a1ac171dee9e9c93a4e08449a (patch) | |
tree | a9ce100f41dcf68e9d5f6cb09c4e954e39b2ac6e /dev-java | |
parent | Version bump (diff) | |
download | historical-c0807926833c9d5a1ac171dee9e9c93a4e08449a.tar.gz historical-c0807926833c9d5a1ac171dee9e9c93a4e08449a.tar.bz2 historical-c0807926833c9d5a1ac171dee9e9c93a4e08449a.zip |
Version bump to 3.5, new slot, bug #277704. Revbump 3.4-r4 fixes missing symbol issue and adds backported upstream patch for xulrunner-1.9.1 support, both discussed in bug #241400. Older 3.4 versions restrict xulrunner dependency to 1.9.0*.
Package-Manager: portage-2.2_rc33/cvs/Linux x86_64
Diffstat (limited to 'dev-java')
-rw-r--r-- | dev-java/swt/ChangeLog | 15 | ||||
-rw-r--r-- | dev-java/swt/Manifest | 24 | ||||
-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/swt-3.4-r2.ebuild | 4 | ||||
-rw-r--r-- | dev-java/swt/swt-3.4-r3.ebuild | 4 | ||||
-rw-r--r-- | dev-java/swt/swt-3.4-r4.ebuild | 216 | ||||
-rw-r--r-- | dev-java/swt/swt-3.5.ebuild | 208 |
9 files changed, 1120 insertions, 18 deletions
diff --git a/dev-java/swt/ChangeLog b/dev-java/swt/ChangeLog index 888e26376a5d..738b3fe1fb95 100644 --- a/dev-java/swt/ChangeLog +++ b/dev-java/swt/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for dev-java/swt # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.105 2009/07/05 20:49:47 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/ChangeLog,v 1.106 2009/07/19 10:27:20 caster Exp $ + +*swt-3.5 (19 Jul 2009) +*swt-3.4-r4 (19 Jul 2009) + + 19 Jul 2009; Vlastimil Babka <caster@gentoo.org> swt-3.4-r2.ebuild, + swt-3.4-r3.ebuild, +swt-3.4-r4.ebuild, + +files/swt-3.4-xulrunner-1.9.1-amd64.patch, + +files/swt-3.4-xulrunner-1.9.1.patch, +swt-3.5.ebuild, + +files/swt-3.5-manifest: + Version bump to 3.5, new slot, bug #277704. Revbump 3.4-r4 fixes missing + symbol issue and adds backported upstream patch for xulrunner-1.9.1 + support, both discussed in bug #241400. Older 3.4 versions restrict + xulrunner dependency to 1.9.0*. 05 Jul 2009; Markus Meier <maekke@gentoo.org> swt-3.3.1.1-r1.ebuild: amd64 stable, bug #275287 diff --git a/dev-java/swt/Manifest b/dev-java/swt/Manifest index dde563534107..c138946433b6 100644 --- a/dev-java/swt/Manifest +++ b/dev-java/swt/Manifest @@ -1,27 +1,25 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - AUX as-needed-and-flag-fixes.patch 7229 RMD160 dcd699249c0a1ecfeecc2f31acf584b6ee0501e1 SHA1 6faadbf3f7a5182f0cd950210794e7634e135e70 SHA256 016a810cc9649235fcab73467a056240b712d5557663b7756d4de64c939256ee AUX build.xml 458 RMD160 a8eb69b723bdd8e5e25df8df26d28f4ea134fa87 SHA1 3d5befea18ba4c5bc20da80ed067488a16be6585 SHA256 bbac0fb3bf9454b81e6d27dae4ebb9538cf62f2be17adcf169538749230dc8e7 AUX swt-3.3-callback-pointer-dereferencing.patch 882 RMD160 dbdd182d3c5093a0a26994fc6cde4a3e597091ea SHA1 d703af14ca2c405304583fead0f06946c1f26a12 SHA256 27c4120bdcc4bb8f5a65d7c85343ee185c6270366c9f9a3cfc530838b5378cab AUX swt-3.3-manifest 752 RMD160 024e2ace2caa4871b3ec07f7adf853fdbaad91c5 SHA1 73a334d10776a77d32b76e63d7bed59b77c0efbb SHA256 f0c98cefd1ddebe0a5a0c15558edba16b00a3ecc910a3fb0a52babb56fd72dae AUX swt-3.4-manifest 753 RMD160 c56ff2fcaf42d35af618a60273c9f6580adc0d79 SHA1 052261ea0c4f6758959fcd4e2718feabbed4273e SHA256 6401f555a867cba47463a36d3c150f7cf5962ac85be53e14c43a88eadf74c94e +AUX swt-3.4-xulrunner-1.9.1-amd64.patch 12209 RMD160 329f773705d7ade1c9129fdf297f94d61635dd71 SHA1 59897d0b9aba895b6b8ef733dc044e3f87a92869 SHA256 485ea48f096c433a951691e087019cbc2c1b2d119a01fef2b57e33d98e9bd1b2 +AUX swt-3.4-xulrunner-1.9.1.patch 12209 RMD160 5ead70a50e586e4343eafff5fe96e64141c18a5e SHA1 68f53ff07faa202113b0748aef2de4b9010af65b SHA256 08e4ed334b37347ad9ea267264b46fb6700d57aef4d7817efbabfcb11de82d9c +AUX swt-3.5-manifest 752 RMD160 7929539d58df2c3655eb640b708e81fa20e70e43 SHA1 1fd24b815a169e52b364a742180e8137ca1add97 SHA256 8ad9d69aa58e533cc03b9ccf3d8e0356505c357aaeb14968bf146f94d8b79be9 DIST swt-3.3.1.1-gtk-linux-ppc.zip 4517854 RMD160 026315045217f20d4a69120c5214003efacdf332 SHA1 4ce9701c75c552e6d7ca2de7563dc44eb51908b7 SHA256 6c1cf5607facd1fd6f684c39d9a99db9739e984c1b4e5d81d9500236d4ff2cdc DIST swt-3.3.1.1-gtk-linux-x86.zip 4451797 RMD160 86a44dd3dd6f38b75a20de4a3fe98db38f163c9d SHA1 411d441ac47b7639b48f6094cb9bfe56f6958943 SHA256 5d4a7a524990aed7180fa954abfa5ed610dbead796e91677ca5274fbcd6b9dac DIST swt-3.3.1.1-gtk-linux-x86_64.zip 4625538 RMD160 3bbece2ca1820ea7a5b3b10dc637b62f69fe0dc8 SHA1 70b5780233fdf7aae7633e4990922405f5a2e2f9 SHA256 8f153de11f84d7259dbaf5425a54d4c92858b981cacbb38d3c28b7ced8c138d5 DIST swt-3.4-gtk-linux-ppc.zip 4616331 RMD160 72104330e6e56db2ed91b37b1b08294c256dd0d8 SHA1 adf491f8abbd6a5fabfea246ed192b28a05ba05f SHA256 227d3bdceba48cd245269cf689731dc3072898c34ed874501532c06ad3c5e9e8 DIST swt-3.4-gtk-linux-x86.zip 4548421 RMD160 b0c575d8d60af272629517f2c833b013fa340f12 SHA1 0eb201d5e9f4bda02555c92571ed54ef2d87bce1 SHA256 c913105c740fe9cbbf7ab49f663acf5640b812995c2f9c716294f6b44a3185c4 DIST swt-3.4-gtk-linux-x86_64.zip 4730884 RMD160 17207c7fda0589c1153867fab73afaa777d39c69 SHA1 f6b5b90c71d7ac1793937c2eecf7fb4f2e2a4045 SHA256 67013b409f21bcad6ba07c36977d526dd0642184d1068158da9cb9d23b95e34d +DIST swt-3.5-gtk-linux-ppc.zip 4900841 RMD160 7a602902fb1b7d96c1c863ccac201b40b811e09f SHA1 387a82b41a35fb0833c37d101b99f5d93ea64818 SHA256 f54d5d1dbd75b2dda52f6143d6155fbf6c898baab0ec7d32161b638eefcdd401 +DIST swt-3.5-gtk-linux-x86.zip 4834113 RMD160 330bcdeca1d183b80017bdd8afefa8bfeabc41db SHA1 b184418f0fcbdbedef19c1fd61094b2d1a88659a SHA256 cf92816555a54e613a8ececc24259f8c6bc1b463be2a6903a87c8278e6cdb337 +DIST swt-3.5-gtk-linux-x86_64.zip 5021592 RMD160 c8488e650d9746d7653f67b036c52da3caf1f212 SHA1 5c8b43c98bde4b170325188540f91702d71acec2 SHA256 96ca4d807ef998c96dfa043a8cc30a36ff358fb4516cdb41bf7cbd71c2c6e3a7 EBUILD swt-3.3.1.1-r1.ebuild 5851 RMD160 2842c0efe5262edcd42035d7cd0c3f76151bec4b SHA1 58c44e6facaf323fe86a12c26891f7f1971da4c1 SHA256 3cb368e9f69aec6a83a97b4564266d18f8f2137fa9ea36724d91c0c5bb349a0d EBUILD swt-3.3.1.1.ebuild 6109 RMD160 daec9f9891b431a63191ebf80e5b7fcfa8a4abb1 SHA1 825c5d80258547bb4d076a8719bfc5f1f2092d21 SHA256 e8d203fef1f129c3a4222e870d8c377729399d0cef45e0bd1c4e6ba87f00b76e -EBUILD swt-3.4-r2.ebuild 6112 RMD160 2d35234ebde341ccdb5b2fe5ab603370723dae5c SHA1 6d598eadf7bc04f429500c121fdc7004a341c2cd SHA256 df6d1fae1db8a9623b6187382dc53ba45b28207adc2921d5776b5fe542e73bbc -EBUILD swt-3.4-r3.ebuild 5922 RMD160 6de7479953d3b665dacbf334f65e6692d39ffbd7 SHA1 03df8113fab5f62ddc8b402099f47a1e1734cee0 SHA256 d955592f44a9598dec6c4358784a428b384ede89a3a4b4acf827e08f5da6cc8f -MISC ChangeLog 18031 RMD160 9061cb06f1987a064722f3cdc872c61a087b4725 SHA1 19135d590d33350f7172034cf020e6a2da6b8067 SHA256 1ff4e1d82c552bdd248e2a559eb75d34ecccb220ad64aa758cd391f1a0a3bbf6 +EBUILD swt-3.4-r2.ebuild 6120 RMD160 6ebeda7ba7a5501cb2bcc6dc9d4399629b4b0c3a SHA1 2feb7e28317486276e61c39c7ae298e07e74bf82 SHA256 c44f60b60d5181d9f5351d521e086ec710dc3478bc8be7458aad007ff6a4673b +EBUILD swt-3.4-r3.ebuild 5930 RMD160 e09df1e97d64cefc809860c46c13a5a132ca1b76 SHA1 3eefc009463203596ecf36972d1fff16d59ca8cb SHA256 3ed2a1ba885c38aa7d44cc640f9fc9e9ce83114037c16c4cd46e062bc50b1171 +EBUILD swt-3.4-r4.ebuild 6202 RMD160 040da5a9927aa845eb6abc086a5238dbc9f51c1a SHA1 74249622ace0254016c37a7fdecb53c9fd08c32f SHA256 1680d529dd3df49bc7d9600abfcc522383f182ec51c631e91812a8e4b9cc639e +EBUILD swt-3.5.ebuild 5926 RMD160 f575a33df1356e69202542c308dc572b29fd30d6 SHA1 a19166de787a2d7e6db36784f2e94b0b53c71564 SHA256 f0e2ce97b5d3c312dabb51e3a6200c0c73eea3bcea93a0465d2b34fa885a4bd4 +MISC ChangeLog 18572 RMD160 ac9bab5dce6333f7681529fc4dae982dc3a9f7eb SHA1 ef0ff80ee85f7f98314711e8641dbbcbbcc5f272 SHA256 c86e2b02d8e95a1a69eba3bbf7075935a8d81940511600fcf5e76e86fbb8a377 MISC metadata.xml 440 RMD160 36ab97c0b5fbe32d4e636e3edb8c4d9e77b2ce34 SHA1 4d2c6b9b3c860ebd97f431ebae1a73773569c0fa SHA256 c09c2804231b54df222f2380cc75d96db4febd9cc5d838e7fb1eb27dc75a53b8 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) - -iEYEARECAAYFAkpREg8ACgkQkKaRLQcq0GJo9gCZAXJMsuztCpTIZKdaV6FY+1wN -iHMAoJ/3A5zhVcW9ZFvSFoi/PTppFoWv -=YR9S ------END PGP SIGNATURE----- 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/swt-3.4-r2.ebuild b/dev-java/swt/swt-3.4-r2.ebuild index bbe874ad8dc3..36ed9392e1a4 100644 --- a/dev-java/swt/swt-3.4-r2.ebuild +++ b/dev-java/swt/swt-3.4-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r2.ebuild,v 1.6 2009/06/22 18:39:14 serkan Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r2.ebuild,v 1.7 2009/07/19 10:27:20 caster Exp $ EAPI="1" @@ -42,7 +42,7 @@ COMMON=">=dev-libs/glib-2.6 =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - xulrunner? ( net-libs/xulrunner:1.9 ) + xulrunner? ( =net-libs/xulrunner-1.9.0*:1.9 ) opengl? ( virtual/opengl virtual/glu diff --git a/dev-java/swt/swt-3.4-r3.ebuild b/dev-java/swt/swt-3.4-r3.ebuild index 8c17540113c3..4366f74e1d66 100644 --- a/dev-java/swt/swt-3.4-r3.ebuild +++ b/dev-java/swt/swt-3.4-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r3.ebuild,v 1.6 2009/07/05 20:47:59 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r3.ebuild,v 1.7 2009/07/19 10:27:20 caster Exp $ EAPI="1" @@ -42,7 +42,7 @@ COMMON=">=dev-libs/glib-2.6 =gnome-base/gnome-vfs-2* =gnome-base/libgnomeui-2* ) - xulrunner? ( net-libs/xulrunner:1.9 ) + xulrunner? ( =net-libs/xulrunner-1.9.0*:1.9 ) opengl? ( virtual/opengl virtual/glu diff --git a/dev-java/swt/swt-3.4-r4.ebuild b/dev-java/swt/swt-3.4-r4.ebuild new file mode 100644 index 000000000000..60f63da3d296 --- /dev/null +++ b/dev-java/swt/swt-3.4-r4.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.4-r4.ebuild,v 1.1 2009/07/19 10:27:20 caster Exp $ + +EAPI="1" + +inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi + +MY_PV="${PV/_pre/M}" +MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200806172000" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="GTK based SWT Library" +HOMEPAGE="http://www.eclipse.org/" +SRC_URI="x86? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip + ) + x86-fbsd? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip + ) + amd64? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip + ) + ppc? ( + http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip + ) + ppc64? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip + )" + +SLOT="3.4" +LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +IUSE="cairo gnome opengl xulrunner" +COMMON=">=dev-libs/glib-2.6 + >=x11-libs/gtk+-2.6.8 + >=dev-libs/atk-1.10.2 + cairo? ( >=x11-libs/cairo-1.4.14 ) + gnome? ( + =gnome-base/libgnome-2* + =gnome-base/gnome-vfs-2* + =gnome-base/libgnomeui-2* + ) + xulrunner? ( net-libs/xulrunner:1.9 ) + opengl? ( + virtual/opengl + virtual/glu + )" + +# Use a blocker to avoid file collisions when upgrading to the slotted version +# We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT +# so this is the only way to prevent collisions + +DEPEND=">=virtual/jdk-1.4 + !=dev-java/swt-3.4*:3 + app-arch/unzip + x11-libs/libX11 + x11-libs/libXrender + x11-libs/libXt + x11-proto/xextproto + x11-proto/inputproto + dev-util/pkgconfig + ${COMMON}" + +RDEPEND=">=virtual/jre-1.4 + x11-libs/libXtst + ${COMMON}" + +S="${WORKDIR}" + +src_unpack() { + local DISTFILE=${A} + unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile" + unpack "./src.zip" + + # Cleanup the redirtied directory structure + rm -rf about_files/ || die + + # Replace the build.xml to allow compilation without Eclipse tasks + cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml" + mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources" + + # Fix Makefiles to respect flags and work with --as-needed + epatch "${FILESDIR}"/as-needed-and-flag-fixes.patch + + # Kill some strict-aliasing warnings + epatch "${FILESDIR}/${PN}-3.3-callback-pointer-dereferencing.patch" + + # bug 241400 + if use amd64 || use ppc64; then + epatch "${FILESDIR}/${PN}-3.4-xulrunner-1.9.1-amd64.patch" + else + epatch "${FILESDIR}/${PN}-3.4-xulrunner-1.9.1.patch" + fi +} + +src_compile() { + # Drop jikes support as it seems to be unfriendly with SWT + java-pkg_filter-compiler jikes + + local AWT_ARCH + local JAWTSO="libjawt.so" + if [[ $(tc-arch) == 'x86' ]] ; then + AWT_ARCH="i386" + elif [[ $(tc-arch) == 'ppc' ]] ; then + AWT_ARCH="ppc" + elif [[ $(tc-arch) == 'ppc64' ]] ; then + AWT_ARCH="ppc64" + else + AWT_ARCH="amd64" + fi + if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then + export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}" + elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then + export AWT_LIB_PATH="${JAVA_HOME}/jre/bin" + elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then + export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)" + else + eerror "${JAWTSO} not found in the JDK being used for compilation!" + die "cannot build AWT library" + fi + + # Fix the pointer size for AMD64 + [[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64 + + local platform="linux" + + use elibc_FreeBSD && platform="freebsd" + + local make="emake -f make_${platform}.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)" + + einfo "Building AWT library" + ${make} make_awt || die "Failed to build AWT support" + + einfo "Building SWT library" + ${make} make_swt || die "Failed to build SWT support" + + einfo "Building JAVA-AT-SPI bridge" + ${make} make_atk || die "Failed to build ATK support" + + if use gnome ; then + einfo "Building GNOME VFS support" + ${make} make_gnome || die "Failed to build GNOME VFS support" + fi + + if use xulrunner ; then + einfo "Building the Mozilla component against xulrunner-1.9" + + export MOZILLA_INCLUDES="$(pkg-config --cflags libxul libxul-embedding)" + # the -R is a workaround for bug #234934 + export MOZILLA_LIBS="-Wl,-R$(pkg-config libxul --variable=sdkdir) $(pkg-config --libs libxul libxul-embedding)" + + ${make} make_mozilla || die "Failed to build Mozilla support" + + # upstream ships libswt-xulrunner*.so even though the build.sh does not + # build it anymore... missing this file leads to another instance + # of bug #234934 so we build it too + einfo "Building the xulrunner component against xulrunner-1.9" + + export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}" + export XULRUNNER_LIBS="${MOZILLA_LIBS}" + + ${make} make_xulrunner || die "Failed to build xulrunner support" + + ${make} make_xpcominit || die "Failed to build xpcominit support" + fi + + if use cairo ; then + einfo "Building CAIRO support" + ${make} make_cairo || die "Unable to build CAIRO support" + fi + + if use opengl ; then + einfo "Building OpenGL component" + ${make} make_glx || die "Unable to build OpenGL component" + fi + + einfo "Building JNI libraries" + eant compile + + einfo "Copying missing files" + cp -i "${S}/version.txt" "${S}/build/version.txt" + cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \ + "${S}/build/org/eclipse/swt/internal/" + + einfo "Packing JNI libraries" + eant jar +} + +src_install() { + swtArch=${ARCH} + use amd64 && swtArch=x86_64 + use x86-fbsd && swtArch=x86 + + sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.4-manifest" > "MANIFEST_TMP.MF" + java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0" + + java-pkg_sointo /usr/$(get_libdir) + java-pkg_doso *.so + + if use xulrunner; then + local gecko_dir="$(pkg-config libxul --variable=sdkdir)" + java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}" + fi + + dohtml about.html || die +} + +pkg_postinst() { + if use xulrunner; then + local gecko_dir="$(pkg-config libxul --variable=sdkdir)" + elog "You built swt with xulrunner support. For your custom applications please set" + elog "MOZILLA_FIVE_HOME environment variable to ${gecko_dir}" + fi +} diff --git a/dev-java/swt/swt-3.5.ebuild b/dev-java/swt/swt-3.5.ebuild new file mode 100644 index 000000000000..6d80be551f2f --- /dev/null +++ b/dev-java/swt/swt-3.5.ebuild @@ -0,0 +1,208 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/swt/swt-3.5.ebuild,v 1.1 2009/07/19 10:27:20 caster Exp $ + +EAPI=2 + +inherit eutils java-pkg-2 java-ant-2 toolchain-funcs java-osgi + +MY_PV="${PV}" +MY_DMF="download.eclipse.org/eclipse/downloads/drops/R-${MY_PV}-200906111540" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="GTK based SWT Library" +HOMEPAGE="http://www.eclipse.org/" +SRC_URI="x86? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip + ) + x86-fbsd? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86.zip + ) + amd64? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip + ) + ppc? ( + http://${MY_DMF}/${MY_P}-gtk-linux-ppc.zip + ) + ppc64? ( + http://${MY_DMF}/${MY_P}-gtk-linux-x86_64.zip + )" + +SLOT="3.5" +LICENSE="CPL-1.0 LGPL-2.1 MPL-1.1" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" + +IUSE="cairo gnome opengl xulrunner" +COMMON=">=dev-libs/glib-2.6 + >=x11-libs/gtk+-2.6.8 + >=dev-libs/atk-1.10.2 + cairo? ( >=x11-libs/cairo-1.4.14 ) + gnome? ( + =gnome-base/libgnome-2* + =gnome-base/gnome-vfs-2* + =gnome-base/libgnomeui-2* + ) + xulrunner? ( net-libs/xulrunner:1.9 ) + opengl? ( + virtual/opengl + virtual/glu + )" + +# Use a blocker to avoid file collisions when upgrading to the slotted version +# We cannot use slotmove, java packages are expected to be in /usr/share/PN-SLOT +# so this is the only way to prevent collisions + +DEPEND=">=virtual/jdk-1.4 + !=dev-java/swt-3.5:*3 + app-arch/unzip + x11-libs/libX11 + x11-libs/libXrender + x11-libs/libXt + x11-proto/xextproto + x11-proto/inputproto + dev-util/pkgconfig + ${COMMON}" + +RDEPEND=">=virtual/jre-1.4 + x11-libs/libXtst + ${COMMON}" + +S="${WORKDIR}" + +src_unpack() { + local DISTFILE=${A} + unzip -jq "${DISTDIR}"/${DISTFILE} "*src.zip" || die "Unable to extract distfile" + unpack "./src.zip" + + # Cleanup the redirtied directory structure + rm -rf about_files/ || die +} + +src_prepare() { + # Replace the build.xml to allow compilation without Eclipse tasks + cp "${FILESDIR}/build.xml" "${S}/build.xml" || die "Unable to update build.xml" + mkdir "${S}/src" && mv "${S}/org" "${S}/src" || die "Unable to restructure SWT sources" + + # Fix Makefiles to respect flags and work with --as-needed + epatch "${FILESDIR}"/as-needed-and-flag-fixes.patch +} + +src_compile() { + # Drop jikes support as it seems to be unfriendly with SWT + java-pkg_filter-compiler jikes + + local AWT_ARCH + local JAWTSO="libjawt.so" + if [[ $(tc-arch) == 'x86' ]] ; then + AWT_ARCH="i386" + elif [[ $(tc-arch) == 'ppc' ]] ; then + AWT_ARCH="ppc" + elif [[ $(tc-arch) == 'ppc64' ]] ; then + AWT_ARCH="ppc64" + else + AWT_ARCH="amd64" + fi + if [[ -f "${JAVA_HOME}/jre/lib/${AWT_ARCH}/${JAWTSO}" ]]; then + export AWT_LIB_PATH="${JAVA_HOME}/jre/lib/${AWT_ARCH}" + elif [[ -f "${JAVA_HOME}/jre/bin/${JAWTSO}" ]]; then + export AWT_LIB_PATH="${JAVA_HOME}/jre/bin" + elif [[ -f "${JAVA_HOME}/$(get_libdir)/${JAWTSO}" ]] ; then + export AWT_LIB_PATH="${JAVA_HOME}/$(get_libdir)" + else + eerror "${JAWTSO} not found in the JDK being used for compilation!" + die "cannot build AWT library" + fi + + # Fix the pointer size for AMD64 + [[ ${ARCH} == "amd64" || ${ARCH} == "ppc64" ]] && export SWT_PTR_CFLAGS=-DSWT_PTR_SIZE_64 + + local platform="linux" + + use elibc_FreeBSD && platform="freebsd" + + local make="emake -f make_${platform}.mak NO_STRIP=y CC=$(tc-getCC) CXX=$(tc-getCXX)" + + einfo "Building AWT library" + ${make} make_awt || die "Failed to build AWT support" + + einfo "Building SWT library" + ${make} make_swt || die "Failed to build SWT support" + + einfo "Building JAVA-AT-SPI bridge" + ${make} make_atk || die "Failed to build ATK support" + + if use gnome ; then + einfo "Building GNOME VFS support" + ${make} make_gnome || die "Failed to build GNOME VFS support" + fi + + if use xulrunner ; then + einfo "Building the Mozilla component against xulrunner-1.9" + + export MOZILLA_INCLUDES="$(pkg-config --cflags libxul libxul-embedding)" + # the -R is a workaround for bug #234934 + export MOZILLA_LIBS="-Wl,-R$(pkg-config libxul --variable=sdkdir) $(pkg-config --libs libxul libxul-embedding)" + + ${make} make_mozilla || die "Failed to build Mozilla support" + + # upstream ships libswt-xulrunner*.so even though the build.sh does not + # build it anymore... missing this file leads to another instance + # of bug #234934 so we build it too + einfo "Building the xulrunner component against xulrunner-1.9" + + export XULRUNNER_INCLUDES="${MOZILLA_INCLUDES}" + export XULRUNNER_LIBS="${MOZILLA_LIBS}" + + ${make} make_xulrunner || die "Failed to build xulrunner support" + + ${make} make_xpcominit || die "Failed to build xpcominit support" + fi + + if use cairo ; then + einfo "Building CAIRO support" + ${make} make_cairo || die "Unable to build CAIRO support" + fi + + if use opengl ; then + einfo "Building OpenGL component" + ${make} make_glx || die "Unable to build OpenGL component" + fi + + einfo "Building JNI libraries" + eant compile + + einfo "Copying missing files" + cp -i "${S}/version.txt" "${S}/build/version.txt" + cp -i "${S}/src/org/eclipse/swt/internal/SWTMessages.properties" \ + "${S}/build/org/eclipse/swt/internal/" + + einfo "Packing JNI libraries" + eant jar +} + +src_install() { + swtArch=${ARCH} + use amd64 && swtArch=x86_64 + use x86-fbsd && swtArch=x86 + + sed "s/SWT_ARCH/${swtArch}/" "${FILESDIR}/${PN}-3.5-manifest" > "MANIFEST_TMP.MF" + java-osgi_newjar-fromfile "swt.jar" "MANIFEST_TMP.MF" "Standard Widget Toolkit for GTK 2.0" + + java-pkg_sointo /usr/$(get_libdir) + java-pkg_doso *.so + + if use xulrunner; then + local gecko_dir="$(pkg-config libxul --variable=sdkdir)" + java-pkg_register-environment-variable MOZILLA_FIVE_HOME "${gecko_dir}" + fi + + dohtml about.html || die +} + +pkg_postinst() { + if use xulrunner; then + local gecko_dir="$(pkg-config libxul --variable=sdkdir)" + elog "You built swt with xulrunner support. For your custom applications please set" + elog "MOZILLA_FIVE_HOME environment variable to ${gecko_dir}" + fi +} |