Various cleanups, as done in www/firefox35 :
- 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
This commit is contained in:
parent
b524d07986
commit
bcce369765
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.135 2010/04/26 22:14:37 landry Exp $
|
||||
# $OpenBSD: Makefile,v 1.136 2010/04/28 06:56:38 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.6.3
|
||||
DISTNAME= mozilla-1.9.2
|
||||
PKGNAME= mozilla-firefox-${VER}p0
|
||||
PKGNAME= mozilla-firefox-${VER}p1
|
||||
SO_VERSION= 21.0
|
||||
# NOTE: Must bump minor version if any shlib's are removed from the
|
||||
# components dir to avoid pkg_add -r issues.
|
||||
@ -117,6 +117,8 @@ MOZ= ${PREFIX}/mozilla-firefox
|
||||
DATADIRS= chrome components defaults dictionaries extensions \
|
||||
greprefs icons modules plugins res searchplugins
|
||||
|
||||
SUBST_VARS+= VER
|
||||
|
||||
post-extract:
|
||||
@find ${WRKSRC} -name "*.orig" -exec rm -f {} \;
|
||||
@cp -f ${FILESDIR}/nsSound.cpp ${WRKSRC}/widget/src/gtk2/
|
||||
@ -126,7 +128,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 \
|
||||
@ -145,10 +147,11 @@ do-install:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/share/applications
|
||||
${INSTALL_DATA} ${FILESDIR}/firefox.desktop ${PREFIX}/share/applications
|
||||
${INSTALL_MAN} ${FILESDIR}/mozilla-firefox.1 ${PREFIX}/man/man1
|
||||
perl -pi -e 's,!!PREFIX!!,${TRUEPREFIX},g; \
|
||||
s,!!LOCALBASE!!,${LOCALBASE},g; s,!!VERSION!!,${VER},g' \
|
||||
${MOZ}/README.OpenBSD ${PREFIX}/man/man1/mozilla-firefox.1 \
|
||||
${SUBST_CMD} ${MOZ}/README.OpenBSD ${PREFIX}/man/man1/mozilla-firefox.1 \
|
||||
${PREFIX}/share/applications/firefox.desktop
|
||||
rm -f ${MOZ}/README.OpenBSD.beforesubst \
|
||||
${PREFIX}/man/man1/mozilla-firefox.1.beforesubst \
|
||||
${PREFIX}/share/applications/firefox.desktop.beforesubst
|
||||
ln -f ${PREFIX}/man/man1/mozilla-firefox.1 ${PREFIX}/man/man1/firefox.1
|
||||
${INSTALL_SCRIPT} ${MOB}/firefox ${PREFIX}/bin
|
||||
ln -f ${PREFIX}/bin/firefox ${PREFIX}/bin/mozilla-firefox
|
||||
@ -159,11 +162,9 @@ do-install:
|
||||
# create an xpm icon from the png one as nsWindow::SetWindowIconList
|
||||
# fails to load png icons : confuses the png pixbuf loader from gtk, which
|
||||
# differs from the libpng bundled in firefox
|
||||
cd ${WRKSRC} && \
|
||||
${LOCALBASE}/bin/pngtopnm -alpha ${MOZ}/icons/mozicon128.png > alpha.pgm
|
||||
cd ${WRKSRC} && \
|
||||
${LOCALBASE}/bin/pngtopnm ${MOZ}/icons/mozicon128.png | \
|
||||
${LOCALBASE}/bin/ppmtoxpm -alphamask=alpha.pgm > \
|
||||
${MOZ}/chrome/icons/default/default.xpm
|
||||
cd ${MOZ}/chrome/icons/default/ && \
|
||||
${LOCALBASE}/bin/pngtopnm -alpha default48.png > ${WRKSRC}/alpha.pgm && \
|
||||
${LOCALBASE}/bin/pngtopnm default48.png | \
|
||||
${LOCALBASE}/bin/ppmtoxpm -alphamask=${WRKSRC}/alpha.pgm > default.xpm
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: README.OpenBSD,v 1.10 2010/04/26 19:55:58 landry Exp $
|
||||
$OpenBSD: README.OpenBSD,v 1.11 2010/04/28 06:56:38 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}/mozilla-firefox/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
|
||||
|
@ -184,7 +184,7 @@ Comment[wa]=Naivyî avå les waibes
|
||||
Comment[zh_CN]=浏览 Web
|
||||
Comment[zh_TW]=瀏覽網頁
|
||||
Exec=firefox %u
|
||||
Icon=!!PREFIX!!/mozilla-firefox/icons/mozicon128.png
|
||||
Icon=${TRUEPREFIX}/mozilla-firefox/icons/mozicon128.png
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
@ -99,12 +99,12 @@ Open a browser window.
|
||||
Set \fBfirefox\fR as the default browser.
|
||||
|
||||
.SH FILES
|
||||
\fI!!PREFIX!!/bin/firefox\fR - shell script wrapping \fBfirefox\fR
|
||||
\fI${TRUEPREFIX}/bin/firefox\fR - shell script wrapping \fBfirefox\fR
|
||||
.br
|
||||
\fI!!PREFIX!!/mozilla-firefox/firefox-bin\fR - \fBfirefox\fR executable
|
||||
\fI${TRUEPREFIX}/mozilla-firefox/firefox-bin\fR - \fBfirefox\fR executable
|
||||
|
||||
.SH VERSION
|
||||
!!VERSION!!
|
||||
${VER}
|
||||
|
||||
.SH BUGS
|
||||
To report a bug, please visit \fIhttps://bugzilla.mozilla.org/\fR
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-build_unix_mozilla_in,v 1.1 2010/04/26 19:55:58 landry Exp $
|
||||
$OpenBSD: patch-build_unix_mozilla_in,v 1.2 2010/04/28 06:56:38 landry Exp $
|
||||
--- build/unix/mozilla.in.orig Wed Jan 6 05:35:11 2010
|
||||
+++ build/unix/mozilla.in Sun Jan 10 17:47:23 2010
|
||||
@@ -50,6 +50,11 @@
|
||||
@ -18,11 +18,11 @@ $OpenBSD: patch-build_unix_mozilla_in,v 1.1 2010/04/26 19:55:58 landry 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.2 2010/04/26 19:55:58 landry Exp $
|
||||
$OpenBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell_cpp,v 1.3 2010/04/28 06:56:38 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.2 2010/04
|
||||
+ 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);
|
||||
|
@ -1,12 +1,12 @@
|
||||
$OpenBSD: patch-js_src_xpconnect_shell_Makefile_in,v 1.3 2010/04/26 19:55:58 landry Exp $
|
||||
$OpenBSD: patch-js_src_xpconnect_shell_Makefile_in,v 1.4 2010/04/28 06:56:38 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) \
|
||||
|
@ -1,4 +1,4 @@
|
||||
$OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.2 2010/04/26 19:55:58 landry Exp $
|
||||
$OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.3 2010/04/28 06:56:38 landry Exp $
|
||||
--- toolkit/xre/nsXREDirProvider.cpp.orig Wed Jan 6 05:35:34 2010
|
||||
+++ toolkit/xre/nsXREDirProvider.cpp Sun Jan 10 17:47:30 2010
|
||||
@@ -1230,11 +1230,7 @@ nsXREDirProvider::GetSystemExtensionsDirectory(nsILoca
|
||||
@ -10,7 +10,7 @@ $OpenBSD: patch-toolkit_xre_nsXREDirProvider_cpp,v 1.2 2010/04/26 19:55:58 landr
|
||||
-#else
|
||||
- "/usr/lib/mozilla/extensions";
|
||||
-#endif
|
||||
+ "_LOCALBASE_/lib/mozilla-extensions";
|
||||
+ "${LOCALBASE}/lib/mozilla/extensions";
|
||||
|
||||
rv = NS_NewNativeLocalFile(nsDependentCString(sysSExtDir), PR_FALSE,
|
||||
getter_AddRefs(localDir));
|
||||
|
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-xpcom_io_nsAppFileLocationProvider_cpp,v 1.1 2010/04/28 06:56:38 landry Exp $
|
||||
--- xpcom/io/nsAppFileLocationProvider.cpp.orig Tue Apr 27 23:13:32 2010
|
||||
+++ xpcom/io/nsAppFileLocationProvider.cpp Tue Apr 27 23:13:56 2010
|
||||
@@ -231,12 +231,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));
|
||||
}
|
Loading…
Reference in New Issue
Block a user