From 28c03f037543db4b27364b7e1bad671cdcad941d Mon Sep 17 00:00:00 2001 From: Jory Pratt Date: Mon, 21 Nov 2005 00:17:58 +0000 Subject: refer to changelog Package-Manager: portage-2.0.53_rc7 --- www-client/mozilla-firefox/ChangeLog | 10 +- www-client/mozilla-firefox/Manifest | 9 +- .../files/digest-mozilla-firefox-1.5_rc3 | 3 - .../files/digest-mozilla-firefox-1.5_rc3-r1 | 4 + .../files/firefox-1.1-uriloader.patch | 459 +++++++++++++++++++++ .../files/firefox-gentoo-pkgconfig.patch | 57 +++ .../mozilla-firefox/files/firefox-pkgconfig.patch | 44 -- .../mozilla-firefox-1.5_rc3-r1.ebuild | 273 ++++++++++++ .../mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild | 274 ------------ 9 files changed, 807 insertions(+), 326 deletions(-) delete mode 100644 www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3 create mode 100644 www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3-r1 create mode 100644 www-client/mozilla-firefox/files/firefox-1.1-uriloader.patch create mode 100644 www-client/mozilla-firefox/files/firefox-gentoo-pkgconfig.patch delete mode 100644 www-client/mozilla-firefox/files/firefox-pkgconfig.patch create mode 100644 www-client/mozilla-firefox/mozilla-firefox-1.5_rc3-r1.ebuild delete mode 100644 www-client/mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild (limited to 'www-client/mozilla-firefox') diff --git a/www-client/mozilla-firefox/ChangeLog b/www-client/mozilla-firefox/ChangeLog index e949b63877e7..ed4eaf867427 100644 --- a/www-client/mozilla-firefox/ChangeLog +++ b/www-client/mozilla-firefox/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-client/mozilla-firefox # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.106 2005/11/18 04:00:51 anarchy Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/ChangeLog,v 1.107 2005/11/21 00:17:58 anarchy Exp $ + +*mozilla-firefox-1.5_rc3-r1 (21 Nov 2005) + + 21 Nov 2005; +files/firefox-1.1-uriloader.patch, + +files/firefox-gentoo-pkgconfig.patch, -files/firefox-pkgconfig.patch, + -mozilla-firefox-1.5_rc3.ebuild, +mozilla-firefox-1.5_rc3-r1.ebuild: + add uri patch from fedora, gentoo-pkg config changes, better to patch then + to change after build *mozilla-firefox-1.5_rc3 (18 Nov 2005) diff --git a/www-client/mozilla-firefox/Manifest b/www-client/mozilla-firefox/Manifest index 5b036f18916d..417edec5704f 100644 --- a/www-client/mozilla-firefox/Manifest +++ b/www-client/mozilla-firefox/Manifest @@ -1,4 +1,4 @@ -MD5 d5203707d48dfbdc6907b90cecc00768 ChangeLog 36196 +MD5 f027a27b7b98a6ff8d89e66eb8d83098 ChangeLog 36557 MD5 7847d262e628dcac303586fe02f2e8c4 files/1.5/firefox-cairo-canvas.patch 446 MD5 91661761f2f232b08b74f5adc4f1eff0 files/1.5/firefox-nopangoxft.patch 839 MD5 362f9e0b0f25b964f7120b68fb629ee0 files/1.5/firefox-visibility.patch 689 @@ -8,10 +8,11 @@ MD5 8f8d70da6eb8cf07acbbb85fb0f08636 files/1.5/mozilla-hppa.patch 7863 MD5 1652483bf7e1d08241cd5e0436bea2ae files/10MozillaFirefox 32 MD5 1d1a1fe09e04d58a8d9faa9f14ffd0c6 files/digest-mozilla-firefox-1.0.7-r2 231 MD5 1d1a1fe09e04d58a8d9faa9f14ffd0c6 files/digest-mozilla-firefox-1.0.7-r3 231 -MD5 35b078763516e6b1552ff655f6dc7781 files/digest-mozilla-firefox-1.5_rc3 216 +MD5 be57f8b6663426f9fa2f58ed85f56595 files/digest-mozilla-firefox-1.5_rc3-r1 292 MD5 8e7d6f3220336cd4467d20bbe402e09a files/embedprompter-modal.patch 1548 MD5 48baf2f328e6478812c24e59037ff99c files/firefox-0.9-init.tar.bz2 3322 -MD5 24adc1e2452f01103d41e4d8e970781f files/firefox-pkgconfig.patch 1575 +MD5 2bd0dd9035dcb875b8340be358347e8d files/firefox-1.1-uriloader.patch 15300 +MD5 aa88a21776616e6b98a28d7d043e033c files/firefox-gentoo-pkgconfig.patch 2304 MD5 6a7a2240dc5864e7f8ee444e34e84461 files/firefox.1 2538 MD5 9afab9469fd1d8af3d674a07ab0a0128 files/gentoo-default-prefs.js 281 MD5 3970f49b3f72cec38e126a2a140b524f files/gtk-prompt-service.patch 5520 @@ -40,4 +41,4 @@ MD5 f48be110754a5106f06cd313c22c4337 files/svg-cairo-0.3.0-fix.patch 1063 MD5 ce23390351fe8020387d93ee29e09a3d metadata.xml 160 MD5 7ec6e77c0014718ffae4a55c76acd1db mozilla-firefox-1.0.7-r2.ebuild 8564 MD5 b686423c9050edfcfd7ff72ea4081f09 mozilla-firefox-1.0.7-r3.ebuild 9734 -MD5 28b81e5a671619d49e65f4519870447c mozilla-firefox-1.5_rc3.ebuild 8834 +MD5 699f23f5022ea1b7d3b16ac41cc0fe05 mozilla-firefox-1.5_rc3-r1.ebuild 8788 diff --git a/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3 b/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3 deleted file mode 100644 index f4b51d0f08c2..000000000000 --- a/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 cb90e9f6097b975187892682ed286544 embed-typeaheadfind.patch 41361 -MD5 e93ff413b1cde002a104aeed9050f406 firefox-1.5rc3-source.tar.bz2 34472303 -MD5 7960994910bda4c14a52bc119f9ceefc mozilla-jslibmath-alpha.patch 625 diff --git a/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3-r1 b/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3-r1 new file mode 100644 index 000000000000..4438d69d4fdf --- /dev/null +++ b/www-client/mozilla-firefox/files/digest-mozilla-firefox-1.5_rc3-r1 @@ -0,0 +1,4 @@ +MD5 cb90e9f6097b975187892682ed286544 embed-typeaheadfind.patch 41361 +MD5 e93ff413b1cde002a104aeed9050f406 firefox-1.5rc3-source.tar.bz2 34472303 +MD5 a120cd14ade242622387f76875ca9c39 mozilla-1.7.10-nsplugins-v2.patch 1968 +MD5 7960994910bda4c14a52bc119f9ceefc mozilla-jslibmath-alpha.patch 625 diff --git a/www-client/mozilla-firefox/files/firefox-1.1-uriloader.patch b/www-client/mozilla-firefox/files/firefox-1.1-uriloader.patch new file mode 100644 index 000000000000..08c7e9605e46 --- /dev/null +++ b/www-client/mozilla-firefox/files/firefox-1.1-uriloader.patch @@ -0,0 +1,459 @@ +Index: uriloader/exthandler/Makefile.in +=================================================================== +RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v +retrieving revision 1.60 +diff -d -u -p -r1.60 Makefile.in +--- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60 ++++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000 +@@ -102,7 +102,7 @@ endif + LOCAL_INCLUDES = -I$(srcdir) + + ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) +-OSHELPER += nsGNOMERegistry.cpp ++OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp + endif + + ifeq ($(MOZ_WIDGET_TOOLKIT),beos) +Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp +=================================================================== +RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v +retrieving revision 1.10 +diff -d -u -p -r1.10 nsGNOMERegistry.cpp +--- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10 ++++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000 +@@ -42,7 +42,7 @@ + #include "nsString.h" + #include "nsIComponentManager.h" + #include "nsILocalFile.h" +-#include "nsMIMEInfoImpl.h" ++#include "nsMIMEInfoUnix.h" + #include "nsAutoPtr.h" + + #include +@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient; + typedef struct _GnomeProgram GnomeProgram; + typedef struct _GnomeModuleInfo GnomeModuleInfo; + +-typedef struct { ++struct GnomeVFSMimeApplication { + char *id; + char *name; + char *command; + /* there is more here, but we don't need it */ +-} GnomeVFSMimeApplication; ++}; + + typedef GConfClient * (*_gconf_client_get_default_fn)(); + typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *, +@@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con + } + + +-/* static */ already_AddRefed ++/* static */ already_AddRefed + nsGNOMERegistry::GetFromExtension(const char *aFileExt) + { + if (!gconfLib) +@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const + return GetFromType(mimeType); + } + +-/* static */ already_AddRefed ++/* static */ already_AddRefed + nsGNOMERegistry::GetFromType(const char *aMIMEType) + { + if (!gconfLib) +@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char + if (!handlerApp) + return nsnull; + +- nsRefPtr mimeInfo = new nsMIMEInfoImpl(aMIMEType); ++ nsRefPtr mimeInfo = new nsMIMEInfoUnix(aMIMEType); + NS_ENSURE_TRUE(mimeInfo, nsnull); + ++ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp); ++ + // Get the list of extensions and append then to the mimeInfo. + GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType); + for (GList *extension = extensions; extension; extension = extension->next) +@@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char + return nsnull; + } + +- gchar *commandPath = g_find_program_in_path(nativeCommand); ++ gchar **argv; ++ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL); ++ if (!res) { ++ NS_ERROR("Could not convert helper app command to filesystem encoding"); ++ _gnome_vfs_mime_application_free(handlerApp); ++ return nsnull; ++ } ++ ++ gchar *commandPath = g_find_program_in_path(argv[0]); + + g_free(nativeCommand); ++ g_strfreev(argv); + + if (!commandPath) { ++ NS_WARNING("could not find command in path"); + _gnome_vfs_mime_application_free(handlerApp); + return nsnull; + } +@@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char + + _gnome_vfs_mime_application_free(handlerApp); + +- nsMIMEInfoBase* retval; ++ nsMIMEInfoUnix* retval; + NS_ADDREF((retval = mimeInfo)); + return retval; + } +Index: uriloader/exthandler/unix/nsGNOMERegistry.h +=================================================================== +RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v +retrieving revision 1.3 +diff -d -u -p -r1.3 nsGNOMERegistry.h +--- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3 ++++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000 +@@ -35,10 +35,13 @@ + * + * ***** END LICENSE BLOCK ***** */ + ++#ifndef nsGNOMERegistry_h__ ++#define nsGNOMERegistry_h__ ++ + #include "nsIURI.h" + #include "nsCOMPtr.h" + +-class nsMIMEInfoBase; ++class nsMIMEInfoUnix; + + class nsGNOMERegistry + { +@@ -52,7 +55,9 @@ class nsGNOMERegistry + static void GetAppDescForScheme(const nsACString& aScheme, + nsAString& aDesc); + +- static already_AddRefed GetFromExtension(const char *aFileExt); ++ static already_AddRefed GetFromExtension(const char *aFileExt); + +- static already_AddRefed GetFromType(const char *aMIMEType); ++ static already_AddRefed GetFromType(const char *aMIMEType); + }; ++ ++#endif // nsGNOMERegistry_h__ +Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +=================================================================== +RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000 +@@ -0,0 +1,196 @@ ++/* ***** 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.org Code. ++ * ++ * The Initial Developer of the Original Code is ++ * Red Hat, Inc. ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Aillon (Original author) ++ * ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#include "nsMIMEInfoUnix.h" ++#include "prlink.h" ++#include "prmem.h" ++#include ++#include ++ ++static PRLibrary *gnomeLib; ++static PRLibrary *vfsLib; ++ ++typedef struct _GnomeProgram GnomeProgram; ++typedef struct _GnomeModuleInfo GnomeModuleInfo; ++ ++typedef enum { ++ GNOME_VFS_OK // there's more but we don't care about them. ++} GnomeVFSResult; ++ ++typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn) ++ (GnomeVFSMimeApplication *app, ++ GList *uris); ++typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *); ++typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *); ++typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *, ++ const GnomeModuleInfo *, int, ++ char **, const char *, ...); ++typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *); ++typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)(); ++typedef GnomeProgram * (*_gnome_program_get_fn)(); ++typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *); ++ ++#define DECL_FUNC_PTR(func) static _##func##_fn _##func ++ ++DECL_FUNC_PTR(gnome_vfs_mime_application_launch); ++DECL_FUNC_PTR(gnome_vfs_mime_application_free); ++DECL_FUNC_PTR(gnome_vfs_mime_application_copy); ++DECL_FUNC_PTR(gnome_vfs_mime_application_get_name); ++DECL_FUNC_PTR(gnome_program_init); ++DECL_FUNC_PTR(gnome_program_get); ++DECL_FUNC_PTR(libgnome_module_info_get); ++DECL_FUNC_PTR(gnome_vfs_make_uri_from_input); ++ ++static PRLibrary * ++LoadVersionedLibrary(const char* libName, const char* libVersion) ++{ ++ char *platformLibName = PR_GetLibraryName(nsnull, libName); ++ nsCAutoString versionLibName(platformLibName); ++ versionLibName.Append(libVersion); ++ PR_Free(platformLibName); ++ return PR_LoadLibrary(versionLibName.get()); ++} ++ ++static void ++Cleanup() ++{ ++ // Unload all libraries ++ if (gnomeLib) ++ PR_UnloadLibrary(gnomeLib); ++ if (vfsLib) ++ PR_UnloadLibrary(vfsLib); ++ ++ gnomeLib = vfsLib = nsnull; ++} ++ ++static void ++InitGnomeVFS() ++{ ++ static PRBool initialized = PR_FALSE; ++ ++ if (initialized) ++ return; ++ ++ #define ENSURE_LIB(lib) \ ++ PR_BEGIN_MACRO \ ++ if (!lib) { \ ++ Cleanup(); \ ++ return; \ ++ } \ ++ PR_END_MACRO ++ ++ #define GET_LIB_FUNCTION(lib, func, failure) \ ++ PR_BEGIN_MACRO \ ++ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \ ++ if (!_##func) { \ ++ failure; \ ++ } \ ++ PR_END_MACRO ++ ++ // Attempt to open libgnome ++ gnomeLib = LoadVersionedLibrary("gnome-2", ".0"); ++ ENSURE_LIB(gnomeLib); ++ ++ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup()); ++ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup()); ++ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup()); ++ ++ // Attempt to open libgnomevfs ++ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0"); ++ ENSURE_LIB(vfsLib); ++ ++ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */); ++ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup()); ++ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup()); ++ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup()); ++ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup()); ++ ++ // Initialize GNOME, if it's not already initialized. It's not ++ // necessary to tell GNOME about our actual command line arguments. ++ ++ if (!_gnome_program_get()) { ++ char *argv[1] = { "gecko" }; ++ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(), ++ 1, argv, NULL); ++ } ++ ++ // Note: after GNOME has been initialized, do not ever unload these ++ // libraries. They register atexit handlers, so if they are unloaded, we'll ++ // crash on exit. ++} ++ ++void ++nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app) ++{ ++ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) { ++ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app); ++ ++ mPreferredAction = nsIMIMEInfo::useSystemDefault; ++ ++ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication); ++ if (name) ++ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name); ++ } ++} ++ ++nsMIMEInfoUnix::~nsMIMEInfoUnix() ++{ ++ if (mDefaultVFSApplication) ++ _gnome_vfs_mime_application_free(mDefaultVFSApplication); ++} ++ ++nsresult ++nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile) ++{ ++ NS_ENSURE_ARG_POINTER(aFile); ++ ++ InitGnomeVFS(); ++ ++ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) { ++ nsCAutoString nativePath; ++ aFile->GetNativePath(nativePath); ++ ++ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get()); ++ ++ GList *uris = NULL; ++ uris = g_list_append(uris, uri); ++ ++ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris); ++ ++ g_free(uri); ++ g_list_free(uris); ++ ++ if (result != GNOME_VFS_OK) ++ return NS_ERROR_FAILURE; ++ ++ return NS_OK; ++ } ++ ++ if (!mDefaultApplication) ++ return NS_ERROR_FILE_NOT_FOUND; ++ ++ return LaunchWithIProcess(mDefaultApplication, aFile); ++} +Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h +=================================================================== +RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h +diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000 +@@ -0,0 +1,50 @@ ++/* ***** 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.org Code. ++ * ++ * The Initial Developer of the Original Code is ++ * Red Hat, Inc. ++ * Portions created by the Initial Developer are Copyright (C) 2005 ++ * the Initial Developer. All Rights Reserved. ++ * ++ * Contributor(s): ++ * Christopher Aillon (Original author) ++ * ++ * ++ * ***** END LICENSE BLOCK ***** */ ++ ++#ifndef nsMimeInfoUnix_h__ ++#define nsMimeInfoUnix_h__ ++ ++#include "nsMIMEInfoImpl.h" ++ ++struct GnomeVFSMimeApplication; ++ ++class nsMIMEInfoUnix : public nsMIMEInfoImpl ++{ ++public: ++ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {} ++ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {}; ++ ++ virtual ~nsMIMEInfoUnix(); ++ ++ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app); ++ ++protected: ++ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile); ++ ++ GnomeVFSMimeApplication *mDefaultVFSApplication; ++}; ++ ++#endif // nsMimeInfoUnix_h__ +Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp +=================================================================== +RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v +retrieving revision 1.58 +diff -d -u -p -r1.58 nsOSHelperAppService.cpp +--- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58 ++++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000 +@@ -44,6 +44,7 @@ + #include "nsOSHelperAppService.h" + #ifdef MOZ_WIDGET_GTK2 + #include "nsGNOMERegistry.h" ++#include "nsMIMEInfoUnix.h" + #endif + #include "nsISupports.h" + #include "nsString.h" +@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const + + LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get())); + ++#ifdef MOZ_WIDGET_GTK2 ++ // Look in GNOME registry first since it is the preferred method in GNOME, ++ // should trump the mailcap entry ++ LOG(("Looking in GNOME registry\n")); ++ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get(); ++ if (gnomeInfo) { ++ LOG(("Got MIMEInfo from GNOME registry\n")); ++ return gnomeInfo; ++ } ++#endif ++ + // extract the major and minor types + NS_ConvertASCIItoUTF16 mimeType(aMIMEType); + nsAString::const_iterator start_iter, end_iter, +@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const + mozillaFlags, + PR_TRUE); + +- +- if (handler.IsEmpty() && extensions.IsEmpty() && +- mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) { +- // No useful data yet +- +-#ifdef MOZ_WIDGET_GTK2 +- LOG(("Looking in GNOME registry\n")); +- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get(); +- if (gnomeInfo) { +- LOG(("Got MIMEInfo from GNOME registry\n")); +- return gnomeInfo; +- } +-#endif +- } +- + if (handler.IsEmpty() && mailcap_description.IsEmpty()) { + DoLookUpHandlerAndDescription(majorType, + minorType, diff --git a/www-client/mozilla-firefox/files/firefox-gentoo-pkgconfig.patch b/www-client/mozilla-firefox/files/firefox-gentoo-pkgconfig.patch new file mode 100644 index 000000000000..4dfe90216ec5 --- /dev/null +++ b/www-client/mozilla-firefox/files/firefox-gentoo-pkgconfig.patch @@ -0,0 +1,57 @@ +--- mozilla/config/autoconf.mk.in 2005-08-17 19:17:17.000000000 +0200 ++++ mozilla/config/autoconf.mk.in 2005-11-17 14:23:11.000000000 +0100 +@@ -54,13 +54,13 @@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + bindir = @bindir@ +-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++includedir = $(mozappdir)/include + libdir = @libdir@ + datadir = @datadir@ + mandir = @mandir@ +-idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++idldir = $(mozappdir)/idl + +-mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++mozappdir = $(libdir)/mozilla-$(MOZ_APP_NAME) + mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION) + mrelibdir = $(mredir)/lib + +--- mozilla/build/unix/Makefile.in 2005-07-07 20:24:39.000000000 +0200 ++++ mozilla/build/unix/Makefile.in 2005-11-17 21:41:47.000000000 +0100 +@@ -56,7 +56,7 @@ + NSPR_VERSION=$(shell $(NSPR_CONFIG) --version) + else + FULL_NSPR_CFLAGS=-I$(includedir)/nspr +-FULL_NSPR_LIBS=$(subst -L$(libdir),-L$(mozappdir),$(shell $(DEPTH)/nsprpub/config/nspr-config --libs)) ++FULL_NSPR_LIBS=$(subst -L$(libdir),,$(shell $(DEPTH)/nsprpub/config/nspr-config --libs)) + NSPR_NAME=$(MOZ_APP_NAME)-nspr + NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) + endif +@@ -82,8 +82,9 @@ + -e "s|%idldir%|$(idldir)|" \ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%DEFS%|$(_DEFS)|" \ +- -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ +- -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@ ++ -e "s|%FULL_NSPR_LIBS%|-L$(mozappdir)$(FULL_NSPR_LIBS)|" \ ++ -e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \ ++ -e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@ + + $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk + cat $< | sed \ +@@ -96,10 +97,11 @@ + -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \ + -e "s|%SUPERWIN_LIBS%|$(SUPERWIN_LIBS)|" \ + -e "s|%DEFS%|$(_DEFS)|" \ +- -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \ +- -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \ ++ -e "s|%FULL_NSPR_LIBS%|-L\$$\{libdir}$(FULL_NSPR_LIBS)|" \ ++ -e "s|%FULL_NSPR_CFLAGS%|-I\$$\{includedir}/nspr|" \ + -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \ +- -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@ ++ -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \ ++ -e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@ + + libs:: $(MOZ_APP_NAME)-config + chmod 755 $< diff --git a/www-client/mozilla-firefox/files/firefox-pkgconfig.patch b/www-client/mozilla-firefox/files/firefox-pkgconfig.patch deleted file mode 100644 index 7cf06f30298f..000000000000 --- a/www-client/mozilla-firefox/files/firefox-pkgconfig.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- config/autoconf.mk.in.orig 2005-08-17 17:17:17.000000000 +0000 -+++ config/autoconf.mk.in 2005-11-17 14:36:44.000000000 +0000 -@@ -54,13 +54,14 @@ - prefix = @prefix@ - exec_prefix = @exec_prefix@ - bindir = @bindir@ --includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - libdir = @libdir@ -+mozappdir = $(libdir)/mozilla-$(MOZ_APP_NAME) -+includedir = $(mozappdir)/include - datadir = @datadir@ - mandir = @mandir@ --idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) -+idldir = $(mozappdir)/idl -+ - --mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) - mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION) - mrelibdir = $(mredir)/lib - ---- build/unix/Makefile.in.orig 2005-07-07 18:24:39.000000000 +0000 -+++ build/unix/Makefile.in 2005-11-17 15:47:45.000000000 +0000 -@@ -55,8 +55,7 @@ - NSPR_NAME=nspr - NSPR_VERSION=$(shell $(NSPR_CONFIG) --version) - else --FULL_NSPR_CFLAGS=-I$(includedir)/nspr --FULL_NSPR_LIBS=$(subst -L$(libdir),-L$(mozappdir),$(shell $(DEPTH)/nsprpub/config/nspr-config --libs)) -+FULL_NSPR_LIBS=$(subst -L$(libdir),,$(shell $(DEPTH)/nsprpub/config/nspr-config --libs)) - NSPR_NAME=$(MOZ_APP_NAME)-nspr - NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version) - endif ---- build/unix/mozilla-nspr.pc.in.orig 2005-11-17 15:39:39.000000000 +0000 -+++ build/unix/mozilla-nspr.pc.in 2005-11-17 15:43:50.000000000 +0000 -@@ -6,7 +6,7 @@ - Name: NSPR - Description: The Netscape Portable Runtime - Version: %NSPR_VERSION% --Libs: %FULL_NSPR_LIBS% --Cflags: %FULL_NSPR_CFLAGS% -+Libs: -L${libdir} %FULL_NSPR_LIBS% -+Cflags: -I${includedir}/nspr - - diff --git a/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3-r1.ebuild b/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3-r1.ebuild new file mode 100644 index 000000000000..77c0292004b2 --- /dev/null +++ b/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3-r1.ebuild @@ -0,0 +1,273 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3-r1.ebuild,v 1.1 2005/11/21 00:17:58 anarchy Exp $ + +unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179 +MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig + # when older is removed from tree. +MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig + # when older is removed from tree. + +inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime versionator + +MY_P="$(replace_version_separator 2 '')" +FV=${MY_P/beta/b} + +DESCRIPTION="Firefox Web Browser" +HOMEPAGE="http://www.mozilla.org/projects/firefox/" +SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FV}/source/firefox-${FV}-source.tar.bz2 + mirror://gentoo/mozilla-jslibmath-alpha.patch + mirror://gentoo/embed-typeaheadfind.patch + http://dev.gentoo.org/~agriffis/dist/mozilla-1.7.10-nsplugins-v2.patch" + +KEYWORDS="-*" +SLOT="0" +LICENSE="MPL-1.1 NPL-1.1" +IUSE="java mozdevelop" + +RDEPEND="java? ( virtual/jre ) + >=www-client/mozilla-launcher-1.39" + +DEPEND="${RDEPEND} + java? ( >=dev-java/java-config-0.2.0 )" + +S=${WORKDIR}/mozilla + +# Needed by src_compile() and src_install(). +# Would do in pkg_setup but that loses the export attribute, they +# become pure shell variables. +export MOZ_CO_PROJECT=browser +export BUILD_OFFICIAL=1 +export MOZILLA_OFFICIAL=1 + +src_unpack() { + unpack firefox-${FV}-source.tar.bz2 + cd ${S} || die "cd failed" + + #################################### + # + # architecture patches + # + #################################### + + # alpha stubs patch from lfs project. + # (26 Jun 2003) + use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch + + # amd64 visibility patch + if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -ge 3 ]]; then + epatch ${FILESDIR}/1.5/firefox-visibility.patch + fi + + # hppa patches from Ivar + # (22 Dec 2004) + epatch ${FILESDIR}/1.5/mozilla-hppa.patch + + # patch to solve segfaults on ia64, from Debian, originally from David + # Mosberger + epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch + + # patch to fix math operations on alpha, makes maps.google.com work! + epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch + + # fix pkgconfig files properly to contain gentoo-locations + epatch ${FILESDIR}/firefox-gentoo-pkgconfig.patch + + #################################### + # + # general compilation and run-time fixes + # + #################################### + + # patch from fedora to remove the pangoxft things + epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch + # cairo-canvas patch, only needed to build against system cairo + # epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch + + # fedora patch + epatch ${FILESDIR}/firefox-1.1-uriloader.patch + + #################################### + # + # behavioral fixes + # + #################################### + + # patch to fix typeahead find for browsers which embed Firefox + # http://bugzilla.gnome.org/show_bug.cgi?id=157435 + epatch ${DISTDIR}/embed-typeaheadfind.patch + + # rpath fix + epatch ${FILESDIR}/mozilla-rpath-1.patch + epatch ${DISTDIR}/mozilla-1.7.10-nsplugins-v2.patch + + # Fix scripts that call for /usr/local/bin/perl #51916 + ebegin "Patching smime to call perl from /usr/bin" + sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime + eend $? || die "sed failed" + + echo "" + ewarn "Even tho this is 1.5rc3 I am gonna take bug reports" + ewarn "If you can attach a patch for any problems you may encounter" + ewarn "I will push bugs upstream if I feel it is need, do not take" + ewarn "offense or think I am blowing your bug report off" + ewarn "Thank you! Anarchy." +} + +src_compile() { + declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} + + #################################### + # + # mozconfig, CFLAGS and CXXFLAGS setup + # + #################################### + + mozconfig_init + + mozconfig_annotate '' --enable-extensions=default,typeaheadfind + mozconfig_annotate '' --disable-mailnews + #mozconfig_annotate '' --enable-native-uconv + mozconfig_annotate '' --enable-image-encoder=all + + # Bug 60668: Galeon doesn't build without oji enabled, so enable it + # regardless of java setting. + mozconfig_annotate '' --enable-oji --enable-mathml + + # Other ff-specific settings + mozconfig_use_enable mozdevelop jsd + mozconfig_use_enable mozdevelop xpctools + mozconfig_use_extension mozdevelop venkman + mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} + + # Finalize and report settings + mozconfig_final + + # hardened GCC uses -fstack-protector-all by default, which breaks us + has_hardened && append-flags -fno-stack-protector-all + # remove -fstack-protector because now it borks firefox + CFLAGS=${CFLAGS/-fstack-protector-all/} + CFLAGS=${CFLAGS/-fstack-protector/} + CXXFLAGS=${CXXFLAGS/-fstack-protector-all/} + CXXFLAGS=${CXXFLAGS/-fstack-protector/} + + #################################### + # + # Configure and build + # + #################################### + + CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \ + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ + econf || die + + # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior + # to econf, but the quotes cause configure to fail. + sed -i -e \ + 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \ + ${S}/config/autoconf.mk \ + ${S}/nsprpub/config/autoconf.mk \ + ${S}/xpfe/global/buildconfig.html + + # Fixup the RPATH + sed -i -e \ + 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \ + ${S}/config/rules.mk \ + ${S}/nsprpub/config/rules.mk \ + ${S}/security/coreconf/rules.mk + + # This removes extraneous CFLAGS from the Makefiles to reduce RAM + # requirements while compiling + edit_makefiles + + emake || die +} + +src_install() { + declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} + + # Most of the installation happens here + dodir ${MOZILLA_FIVE_HOME} + cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} + + # Create directory structure to support portage-installed extensions. + # See update_chrome() in mozilla-launcher + keepdir ${MOZILLA_FIVE_HOME}/chrome.d + keepdir ${MOZILLA_FIVE_HOME}/extensions.d + cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \ + ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt + + # Create /usr/bin/firefox + install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME} + + # Install icon and .desktop for menu entry + doicon ${FILESDIR}/icon/firefox-icon.png + domenu ${FILESDIR}/icon/mozillafirefox.desktop + + # Fix icons to look the same everywhere + insinto ${MOZILLA_FIVE_HOME}/icons + doins ${S}/dist/branding/mozicon16.xpm + doins ${S}/dist/branding/mozicon50.xpm + + #################################### + # + # Install files necessary for applications to build against firefox + # + #################################### + + ewarn "Installing includes and idl files..." + dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include + cd ${S}/dist + cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy" + cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy" + + # Dirty hack to get some applications using this header running + dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \ + /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h + + + # Fix pkgconfig files and install them + insinto /usr/$(get_libdir)/pkgconfig + for x in ${S}/build/unix/*.pc; do + doins ${x} + done + + #################################### + # + # Some preferences, probably gentoo.org as start-page also + # + #################################### + + dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs + cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js + dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref + cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js + + # Install docs + dodoc LEGAL LICENSE +} + +pkg_postinst() { + declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} + + # This should be called in the postinst and postrm of all the + # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and + # thunderbird-bin ebuilds. + update_mozilla_launcher_symlinks + + # Update mimedb for the new .desktop file + fdo-mime_desktop_database_update + + echo "" + ewarn "Even tho this is 1.5rc3 I am gonna take bug reports" + ewarn "If you can, attach a patch for any problems you may encounter" + ewarn "I will push bugs upstream if I feel it is need, do not take" + ewarn "offense or think I am blowing your bug report off" + ewarn "Thank you! Anarchy." +} + +pkg_postrm() { + declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} + + update_mozilla_launcher_symlinks +} diff --git a/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild b/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild deleted file mode 100644 index 2a9d55dc6b75..000000000000 --- a/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild +++ /dev/null @@ -1,274 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-1.5_rc3.ebuild,v 1.1 2005/11/18 04:00:51 anarchy Exp $ - -unset ALLOWED_FLAGS # stupid extra-functions.sh ... bug 49179 -MOZ_FREETYPE2="no" # Need to disable for newer .. remove here and in mozconfig - # when older is removed from tree. -MOZ_PANGO="yes" # Need to enable for newer .. remove here and in mozconfig - # when older is removed from tree. - -inherit flag-o-matic toolchain-funcs eutils mozconfig-2 mozilla-launcher makeedit multilib fdo-mime versionator - -MY_P="$(replace_version_separator 2 '')" -FV=${MY_P/beta/b} - -DESCRIPTION="Firefox Web Browser" -HOMEPAGE="http://www.mozilla.org/projects/firefox/" -SRC_URI="http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${FV}/source/firefox-${FV}-source.tar.bz2 - mirror://gentoo/mozilla-jslibmath-alpha.patch - mirror://gentoo/embed-typeaheadfind.patch" - -KEYWORDS="-*" -SLOT="0" -LICENSE="MPL-1.1 NPL-1.1" -IUSE="java mozdevelop" - -RDEPEND="java? ( virtual/jre ) - >=www-client/mozilla-launcher-1.39" - -DEPEND="${RDEPEND} - java? ( >=dev-java/java-config-0.2.0 )" - -S=${WORKDIR}/mozilla - -# Needed by src_compile() and src_install(). -# Would do in pkg_setup but that loses the export attribute, they -# become pure shell variables. -export MOZ_CO_PROJECT=browser -export BUILD_OFFICIAL=1 -export MOZILLA_OFFICIAL=1 - -src_unpack() { - unpack firefox-${FV}-source.tar.bz2 - cd ${S} || die "cd failed" - - #################################### - # - # architecture patches - # - #################################### - - # alpha stubs patch from lfs project. - # (26 Jun 2003) - use alpha && epatch ${FILESDIR}/1.5/mozilla-1.3-alpha-stubs.patch - - # amd64 visibility patch - if [[ ${ARCH} == amd64 ]] && [[ $(gcc-major-version) -ge 3 ]]; then - epatch ${FILESDIR}/1.5/firefox-visibility.patch - fi - - # hppa patches from Ivar - # (22 Dec 2004) - epatch ${FILESDIR}/1.5/mozilla-hppa.patch - - # patch to solve segfaults on ia64, from Debian, originally from David - # Mosberger - epatch ${FILESDIR}/1.5/mozilla-firefox-1.1a2-ia64.patch - - # patch to fix math operations on alpha, makes maps.google.com work! - epatch ${DISTDIR}/mozilla-jslibmath-alpha.patch - - #################################### - # - # general compilation and run-time fixes - # - #################################### - - # patch from fedora to remove the pangoxft things - epatch ${FILESDIR}/1.5/firefox-nopangoxft.patch - # cairo-canvas patch, only needed to build against system cairo - # epatch ${FILESDIR}/1.5/firefox-cairo-canvas.patch - - # fix pkgconfig files properly - epatch ${FILESDIR}/firefox-pkgconfig.patch - - #################################### - # - # behavioral fixes - # - #################################### - - # patch to fix typeahead find for browsers which embed Firefox - # http://bugzilla.gnome.org/show_bug.cgi?id=157435 - epatch ${DISTDIR}/embed-typeaheadfind.patch - - # rpath fix - epatch ${FILESDIR}/mozilla-rpath-1.patch - - # Fix scripts that call for /usr/local/bin/perl #51916 - ebegin "Patching smime to call perl from /usr/bin" - sed -i -e '1s,usr/local/bin,usr/bin,' ${S}/security/nss/cmd/smimetools/smime - eend $? || die "sed failed" - - echo "" - ewarn "Even tho this is 1.5rc3 I am gonna take bug reports" - ewarn "If you can attach a patch for any problems you may encounter" - ewarn "I will push bugs upstream if I feel it is need, do not take" - ewarn "offense or think I am blowing your bug report off" - ewarn "Thank you! Anarchy." -} - -src_compile() { - declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} - - #################################### - # - # mozconfig, CFLAGS and CXXFLAGS setup - # - #################################### - - mozconfig_init - - mozconfig_annotate '' --enable-extensions=default,typeaheadfind - mozconfig_annotate '' --disable-mailnews - #mozconfig_annotate '' --enable-native-uconv - mozconfig_annotate '' --enable-image-encoder=all - - # Bug 60668: Galeon doesn't build without oji enabled, so enable it - # regardless of java setting. - mozconfig_annotate '' --enable-oji --enable-mathml - - # Other ff-specific settings - mozconfig_use_enable mozdevelop jsd - mozconfig_use_enable mozdevelop xpctools - mozconfig_use_extension mozdevelop venkman - mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} - - # Finalize and report settings - mozconfig_final - - # hardened GCC uses -fstack-protector-all by default, which breaks us - has_hardened && append-flags -fno-stack-protector-all - # remove -fstack-protector because now it borks firefox - CFLAGS=${CFLAGS/-fstack-protector-all/} - CFLAGS=${CFLAGS/-fstack-protector/} - CXXFLAGS=${CXXFLAGS/-fstack-protector-all/} - CXXFLAGS=${CXXFLAGS/-fstack-protector/} - - #################################### - # - # Configure and build - # - #################################### - - CPPFLAGS="${CPPFLAGS} -DARON_WAS_HERE" \ - CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \ - econf || die - - # It would be great if we could pass these in via CPPFLAGS or CFLAGS prior - # to econf, but the quotes cause configure to fail. - sed -i -e \ - 's|-DARON_WAS_HERE|-DGENTOO_NSPLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsplugins\\\" -DGENTOO_NSBROWSER_PLUGINS_DIR=\\\"/usr/'"$(get_libdir)"'/nsbrowser/plugins\\\"|' \ - ${S}/config/autoconf.mk \ - ${S}/nsprpub/config/autoconf.mk \ - ${S}/xpfe/global/buildconfig.html - - # Fixup the RPATH - sed -i -e \ - 's|#RPATH_FIXER|'"${MOZILLA_FIVE_HOME}"'|' \ - ${S}/config/rules.mk \ - ${S}/nsprpub/config/rules.mk \ - ${S}/security/coreconf/rules.mk - - # This removes extraneous CFLAGS from the Makefiles to reduce RAM - # requirements while compiling - edit_makefiles - - emake || die -} - -src_install() { - declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} - - # Most of the installation happens here - dodir ${MOZILLA_FIVE_HOME} - cp -RL ${S}/dist/bin/* ${D}${MOZILLA_FIVE_HOME} - - # Create directory structure to support portage-installed extensions. - # See update_chrome() in mozilla-launcher - keepdir ${MOZILLA_FIVE_HOME}/chrome.d - keepdir ${MOZILLA_FIVE_HOME}/extensions.d - cp ${D}${MOZILLA_FIVE_HOME}/chrome/installed-chrome.txt \ - ${D}${MOZILLA_FIVE_HOME}/chrome.d/0_base-chrome.txt - - # Create /usr/bin/firefox - install_mozilla_launcher_stub firefox ${MOZILLA_FIVE_HOME} - - # Install icon and .desktop for menu entry - doicon ${FILESDIR}/icon/firefox-icon.png - domenu ${FILESDIR}/icon/mozillafirefox.desktop - - # Fix icons to look the same everywhere - insinto ${MOZILLA_FIVE_HOME}/icons - doins ${S}/dist/branding/mozicon16.xpm - doins ${S}/dist/branding/mozicon50.xpm - - #################################### - # - # Install files necessary for applications to build against firefox - # - #################################### - - ewarn "Installing includes and idl files..." - dodir ${MOZILLA_FIVE_HOME}/idl ${MOZILLA_FIVE_HOME}/include - cd ${S}/dist - cp -LfR include/* ${D}${MOZILLA_FIVE_HOME}/include || die "failed to copy" - cp -LfR idl/* ${D}${MOZILLA_FIVE_HOME}/idl || die "failed to copy" - - # Dirty hack to get some applications using this header running - dosym ${MOZILLA_FIVE_HOME}/include/necko/nsIURI.h \ - /usr/$(get_libdir)/${MOZILLA_FIVE_HOME##*/}/include/nsIURI.h - - # Fix firefox-config and install it - sed -i -e "s|\(echo -L.*\)\($\)|\1 -Wl,-R${MOZILLA_FIVE_HOME}\2|" \ - ${S}/build/unix/firefox-config - exeinto ${MOZILLA_FIVE_HOME} - doexe ${S}/build/unix/firefox-config - - # Fix pkgconfig files and install them - insinto /usr/$(get_libdir)/pkgconfig - for x in ${S}/build/unix/*.pc; do - sed -i -e "s|\(^Libs: -L.*\)\($\)|\1 -Wl,-R\$\{libdir\}\2|" ${x} - doins ${x} - done - - #################################### - # - # Some preferences, probably gentoo.org as start-page also - # - #################################### - - dodir ${D}/${MOZILLA_FIVE_HOME}/greprefs - cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/greprefs/all-gentoo.js - dodir ${D}/${MOZILLA_FIVE_HOME}/defaults/pref - cp ${FILESDIR}/gentoo-default-prefs.js ${D}/${MOZILLA_FIVE_HOME}/defaults/pref/all-gentoo.js - - # Install docs - dodoc LEGAL LICENSE -} - -pkg_postinst() { - declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} - - # This should be called in the postinst and postrm of all the - # mozilla, mozilla-bin, firefox, firefox-bin, thunderbird and - # thunderbird-bin ebuilds. - update_mozilla_launcher_symlinks - - # Update mimedb for the new .desktop file - fdo-mime_desktop_database_update - - echo "" - ewarn "Even tho this is 1.5rc3 I am gonna take bug reports" - ewarn "If you can, attach a patch for any problems you may encounter" - ewarn "I will push bugs upstream if I feel it is need, do not take" - ewarn "offense or think I am blowing your bug report off" - ewarn "Thank you! Anarchy." -} - -pkg_postrm() { - declare MOZILLA_FIVE_HOME=/usr/$(get_libdir)/${PN} - - update_mozilla_launcher_symlinks -} -- cgit v1.2.3-65-gdbad