Subject: plugins.mk (doh!)
To: None <tech-pkg@NetBSD.org>
From: Juan RP <juan@xtraeme.unixbsd.org>
List: tech-pkg
Date: 11/09/2003 05:42:55
Hi all,
I think we have a problem with packages that contains plugins
for mozilla or MozillaFirebird, because we cannot install for example
moz-flash without install mozilla and use MozillaFirebird if it is already
installed or viceversa.
I suggest to add a new .mk file which contains two new global variables
for mozilla* plugins packages:
This is the patch for graphics/moz-flash with the new plugins.mk file:
--- snip ---
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/moz-flash/Makefile,v
retrieving revision 1.12
diff -b -u -r1.12 Makefile
--- Makefile 2003/07/17 21:41:45 1.12
+++ Makefile 2003/11/09 04:23:41
@@ -4,13 +4,11 @@
.include "../../graphics/libflash/Makefile.common"
PKGNAME= moz-flash-1.0
-PKGREVISION= 4
+PKGREVISION= 5
MAINTAINER= joda@NetBSD.org
-COMMENT= Mozilla open source Flash(tm) plugin
+COMMENT= Mozilla{,Firebird} open source Flash(tm) plugin
-DEPENDS+= mozilla>=0.9.9:../../www/mozilla
-
USE_BUILDLINK2= YES
USE_X11= YES
USE_LIBTOOL= YES
@@ -20,7 +18,8 @@
MAKE_ENV+= SHLIBTOOL="${PKGSHLIBTOOL}"
MAKE_ENV+= MOZ_PLUGDIR="${MOZ_PLUGDIR}"
-MOZ_PLUGDIR= ${PREFIX}/lib/mozilla/plugins
+VALID_BROWSERS= MozillaFirebird mozilla
+WITH_BROWSER?= mozilla
do-install:
${INSTALL_DATA_DIR} ${MOZ_PLUGDIR}
@@ -28,5 +27,5 @@
${INSTALL_PROGRAM} .libs/npflash.so ${MOZ_PLUGDIR}
.include "../../graphics/libflash/buildlink2.mk"
-
+.include "../../www/mozilla/plugins.mk"
.include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/moz-flash/PLIST,v
retrieving revision 1.1.1.1
diff -b -u -r1.1.1.1 PLIST
--- PLIST 2001/12/01 00:30:34 1.1.1.1
+++ PLIST 2003/11/09 04:23:41
@@ -1,2 +1,2 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2001/12/01 00:30:34 hubertf Exp $
-lib/mozilla/plugins/npflash.so
+lib/${WITH_BROWSER}/plugins/npflash.so
--- snip ---
# $NetBSD$
#
# Global variables:
#
# o VALID_BROWSERS (List of valid browsers)
# o WITH_BROWSER (Default browser to use)
.if !defined(PLUGINS_MK)
PLUGINS_MK= # defined
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= VALID_BROWSERS WITH_BROWSER
PLIST_SUBST+= WITH_BROWSER=${WITH_BROWSER}
DEPENDS+= ${WITH_BROWSER}-[0-9]*:../../www/${WITH_BROWSER}
# For now we support mozilla* and MozillaFirebird* packages
.if !empty(WITH_BROWSER:Mmozilla) || !empty(WITH_BROWSER:MMozillaFirebird)
MOZ_PLUGDIR= ${PREFIX}/lib/${WITH_BROWSER}/plugins
.elif !empty(WITH_BROWSER:Mmozilla-bin)
MOZ_PLUGDIR= ${PREFIX}/lib/mozilla-linux/plugins
.elif !empty(WITH_BROWSER:MMozillaFirebird-bin)
MOZ_PLUGDIR= ${PREFIX}/lib/MozillaFirebird-linux/plugins
.else
PKG_FAIL_REASON= "Sorry, ${WITH_BROWSER} not supported for now."
PKG_FAIL_REASON+= "You have to choose one of these: ${VALID_BROWSERS}"
.endif
.endif # PLUGINS_MK
--- snip ---
I think it's very simple, but it can give us a little flexibility when
installing plugins
for Mozilla{,Firebird} packages, this the way to go ... feel free to fix my
comments there,
cause I'm not an English native speaker.
What do you think about that ?
Cheers,
--
Juan Romero Pardines <juan@xtraeme.unixbsd.org>
Noticias BSD en castellano: http://www.UnixBSD.org/
El Proyecto NetBSD: http://www.NetBSD.org/