Various cleanups :

- use SUBST_CMD instead of perl -pi -e
- use ${LOCALBASE}/${TRUEPREFIX}/${X11BASE} instead of the handpatched
  _XXX_ ones
- harmonize default systemwide plugins/extensions search path to
  lib/mozilla/{plugins,extensions} as done in other mozilla ports, but
keep lib/mozilla-plugins added to MOZ_PLUGIN_PATH atm.
This commit is contained in:
landry 2010-04-28 06:50:23 +00:00
parent a786f77c4d
commit b524d07986
8 changed files with 38 additions and 21 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.37 2010/03/31 15:56:44 naddy Exp $
# $OpenBSD: Makefile,v 1.38 2010/04/28 06:50:23 landry Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= alpha amd64 arm i386 powerpc sparc sparc64
@ -7,7 +7,7 @@ COMMENT= redesign of Mozilla's browser component
VER= 3.5.9
DISTNAME= mozilla-1.9.1
PKGNAME= firefox35-${VER}
PKGNAME= firefox35-${VER}p0
SO_VERSION= 22.0
# NOTE: Must bump minor version if any shlib's are removed from the
# components dir to avoid pkg_add -r issues.
@ -130,7 +130,7 @@ post-extract:
pre-configure:
cd ${WRKSRC}/js/src && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF}
cd ${WRKSRC}/nsprpub && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF}
perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|g; s|_X11BASE_|${X11BASE}|g' \
${SUBST_CMD} ${WRKSRC}/xpcom/io/nsAppFileLocationProvider.cpp \
${WRKSRC}/build/unix/mozilla.in \
${WRKSRC}/extensions/spellcheck/hunspell/src/mozHunspell.cpp \
${WRKSRC}/js/src/xpconnect/shell/Makefile.in \
@ -149,10 +149,10 @@ do-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
${INSTALL_DATA} ${FILESDIR}/firefox.desktop \
${PREFIX}/share/applications/firefox35.desktop
perl -pi -e 's,!!PREFIX!!,${TRUEPREFIX},g; \
s,!!LOCALBASE!!,${LOCALBASE},g; s,!!VERSION!!,${VER},g' \
${MOZ}/README.OpenBSD \
${SUBST_CMD} ${MOZ}/README.OpenBSD \
${PREFIX}/share/applications/firefox35.desktop
rm -f ${MOZ}/README.OpenBSD.beforesubst \
${PREFIX}/share/applications/firefox35.desktop.beforesubst
${INSTALL_SCRIPT} ${MOB}/firefox ${PREFIX}/bin/firefox35
${INSTALL_SCRIPT} ${MOB}/run-mozilla.sh ${MOZ}
${INSTALL_PROGRAM} ${MOB}/mozilla-xremote-client ${MOB}/regxpcom ${MOZ}

View File

@ -1,4 +1,4 @@
$OpenBSD: README.OpenBSD,v 1.1.1.1 2009/06/21 01:31:23 martynas Exp $
$OpenBSD: README.OpenBSD,v 1.2 2010/04/28 06:50:23 landry Exp $
If you encounter strange problems relating to bookmarks, downloads,
window placement, toolbars, history, or other settings, it is
@ -20,7 +20,7 @@ in Firefox's URL text field. Type "mailto" in the filter. If there
is a string called "network.protocol-handler.app.mailto", its value
names the application for mailto URLs. If present, right click,
choose Modify, and enter the path to your mail program, e.g.,
"!!LOCALBASE!!/bin/thunderbird" or "!!LOCALBASE!!/bin/kmail" (other
"${LOCALBASE}/bin/thunderbird" or "${LOCALBASE}/bin/kmail" (other
programs may work, but these two have been tested). If absent,
right click, choose New String. Set the name to
"network.protocol-handler.app.mailto" and the value to the path to
@ -29,7 +29,7 @@ your mailer.
Plugins
Firefox looks for plugins in ~/.mozilla/plugins,
!!PREFIX!!/lib/mozilla-plugins, and !!PREFIX!!/mozilla-firefox/plugins.
${TRUEPREFIX}/lib/mozilla/plugins, and ${TRUEPREFIX}/firefox35/plugins.
If the environment variable MOZ_PLUGIN_PATH is specified, this
location will be overridden.
@ -40,7 +40,7 @@ libjavaplugin_oji.so into one of the directories listed above.
This might be done like the following:
$ cd ~/.mozilla/plugins
$ ln -s !!LOCALBASE!!/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so .
$ ln -s ${LOCALBASE}/jdk-1.5.0/jre/plugin/i386/ns7/libjavaplugin_oji.so .
$
Information on building Java (on some platforms) can be found in

View File

@ -184,7 +184,7 @@ Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox35 %u
Icon=!!PREFIX!!/firefox35/icons/mozicon50.xpm
Icon=${TRUEPREFIX}/firefox35/icons/mozicon50.xpm
StartupNotify=false
Terminal=false
Type=Application

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-build_unix_mozilla_in,v 1.1.1.1 2009/06/21 01:31:26 martynas Exp $
$OpenBSD: patch-build_unix_mozilla_in,v 1.2 2010/04/28 06:50:23 landry Exp $
--- build/unix/mozilla.in.orig Thu Mar 5 23:31:44 2009
+++ build/unix/mozilla.in Fri Mar 13 17:36:45 2009
@@ -50,6 +50,11 @@
@ -18,11 +18,11 @@ $OpenBSD: patch-build_unix_mozilla_in,v 1.1.1.1 2009/06/21 01:31:26 martynas Exp
esac
done
+
+if [ `_X11BASE_/bin/fc-list | wc -l` -eq 0 ]; then
+if [ `${X11BASE}/bin/fc-list | wc -l` -eq 0 ]; then
+ export GDK_USE_XFT=0
+fi
+
+export MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH:=_LOCALBASE_/lib/mozilla-plugins}
+export MOZ_PLUGIN_PATH=${MOZ_PLUGIN_PATH:=${LOCALBASE}/lib/mozilla-plugins}
if [ $debugging = 1 ]
then

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.1.1.1 2009/06/21 01:31:24 martynas Exp $
$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.2 2010/04/28 06:50:23 landry Exp $
--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig Fri Oct 5 22:13:18 2007
+++ extensions/spellcheck/hunspell/src/mozHunspell.cpp Thu Sep 25 01:30:45 2008
@@ -63,6 +63,7 @@
@ -19,7 +19,7 @@ $OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.1.1.1 200
+ nsCOMPtr<nsIFile> mozillaDir;
+ nsCOMPtr<nsILocalFile> localFile;
+ rv = NS_NewNativeLocalFile(nsDependentCString(
+ "_LOCALBASE_/share/mozilla-dicts"), PR_TRUE, getter_AddRefs(localFile));
+ "${LOCALBASE}/share/mozilla-dicts"), PR_TRUE, getter_AddRefs(localFile));
+ if (localFile && NS_SUCCEEDED(rv)) {
+ localFile->QueryInterface(NS_GET_IID(nsIFile), getter_AddRefs(mozillaDir));
+ LoadDictionariesFromDir(mozillaDir);

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-js_src_xpconnect_shell_Makefile_in,v 1.2 2009/06/23 17:55:57 martynas Exp $
$OpenBSD: patch-js_src_xpconnect_shell_Makefile_in,v 1.3 2010/04/28 06:50:23 landry Exp $
--- js/src/xpconnect/shell/Makefile.in.orig Wed Jun 17 07:21:48 2009
+++ js/src/xpconnect/shell/Makefile.in Sat Jun 20 22:09:10 2009
@@ -60,6 +60,8 @@ CMMSRCS += xpcshellMacUtils.mm
endif
LIBS = \
+ -Wl,-rpath-link,_LOCALBASE_/lib \
+ -Wl,-rpath-link,_X11BASE_/lib \
+ -Wl,-rpath-link,${LOCALBASE}/lib \
+ -Wl,-rpath-link,${X11BASE}/lib \
$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(LIBXUL_LIBS) \
$(MOZ_JS_LIBS) \

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.2 2009/08/03 21:27:00 martynas Exp $
$OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.3 2010/04/28 06:50:23 landry Exp $
--- toolkit/xre/nsXREDirProvider.cpp.orig Thu Jul 30 18:30:33 2009
+++ toolkit/xre/nsXREDirProvider.cpp Mon Aug 3 22:47:28 2009
@@ -1144,11 +1144,7 @@ nsXREDirProvider::GetSystemExtensionsDirectory(nsILoca
@ -10,7 +10,7 @@ $OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.2 2009/08/03 21:27:00 marty
-#else
- "/usr/lib/mozilla/extensions";
-#endif
+ "_LOCALBASE_/lib/mozilla-extensions";
+ "${LOCALBASE}/lib/mozilla/extensions";
rv = NS_NewNativeLocalFile(nsDependentCString(sysSExtDir), PR_FALSE,
getter_AddRefs(localDir));

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-xpcom_io_nsAppFileLocationProvider_cpp,v 1.1 2010/04/28 06:50:23 landry Exp $
--- xpcom/io/nsAppFileLocationProvider.cpp.orig Sat Apr 24 15:39:05 2010
+++ xpcom/io/nsAppFileLocationProvider.cpp Sat Apr 24 15:40:22 2010
@@ -254,12 +254,7 @@ nsAppFileLocationProvider::GetFile(const char *prop, P
}
#ifdef XP_UNIX
else if (nsCRT::strcmp(prop, NS_SYSTEM_PLUGINS_DIR) == 0) {
- static const char *const sysLPlgDir =
-#if defined(HAVE_USR_LIB64_DIR) && defined(__LP64__)
- "/usr/lib64/mozilla/plugins";
-#else
- "/usr/lib/mozilla/plugins";
-#endif
+ static const char *const sysLPlgDir = "${LOCALBASE}/lib/mozilla/plugins";
rv = NS_NewNativeLocalFile(nsDependentCString(sysLPlgDir),
PR_FALSE, getter_AddRefs(localFile));
}