# $NetBSD: Makefile.common,v 1.16 2009/01/04 18:48:47 shattered Exp $ DISTNAME= ${MOZILLA}${MOX_EXTRA}-bin # overridden below PKGNAME= ${MOZILLA}${MOZ_EXTRA}-bin-${MOZ_VER} CATEGORIES= www MAINTAINER?= pkgsrc-users@NetBSD.org HOMEPAGE?= http://www.mozilla.org/ WRKSRC?= ${WRKDIR}/${MOZILLA} BUILD_DIRS?= # empty USE_LANGUAGES= # empty USE_TOOLS+= pax FILESDIR= ${.CURDIR}/../../www/seamonkey-bin/files MOZILLA_SCRIPT?= ${FILESDIR}/mozilla.sh .include "../../mk/bsd.prefs.mk" # Include Makefile.${EMUL_PLATFORM} to get definitions for DISTNAME, # MOZ_PLATFORM and MOZ_GTK2. # .sinclude "${.CURDIR}/Makefile.${EMUL_PLATFORM}" .if defined(MOZ_GTK2) && !empty(MOZ_GTK2:M[Yy][Ee][Ss]) EMUL_MODULES.linux= compat gtk2 locale alsa resmgr EMUL_REQD= suse>=9.1 .else EMUL_MODULES.linux= compat gtk EMUL_REQD= suse>=7.3 .endif .if defined(EMUL_IS_NATIVE) . if defined(MOZ_GTK2) && !empty(MOZ_GTK2:M[Yy][Ee][Ss]) DEPENDS+= gtk2+>=2.2:../../x11/gtk2 . else DEPENDS+= gtk+>=1.2:../../x11/gtk . endif .endif MOZILLA_SHORT= ${MOZILLA} MOZ_DIR?= ${MOZ_VER} MOZ_PLATFORM?= ${LOWER_OPSYS} MASTER_SITES?= ${MASTER_SITE_MOZILLA:=${MOZILLA_SHORT}/releases/${MOZ_DIR}/} MOZILLA_LIB= ${PREFIX}/lib/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM} FILES_SUBST+= MOZILLA=${MOZILLA:Q} FILES_SUBST+= MOZ_EXTRA=${MOZ_EXTRA:Q} FILES_SUBST+= MOZ_PLATFORM=${MOZ_PLATFORM:Q} INSTALLATION_DIRS= bin SUBST_CLASSES+= paths SUBST_FILES.paths= ${WRKDIR}/${MOZILLA}.sh SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' SUBST_SED.paths+= -e 's,@SH@,${SH},g' SUBST_SED.paths+= -e 's,@MOZILLA@,${MOZILLA},g' SUBST_SED.paths+= -e 's,@MOZ_EXTRA@,${MOZ_EXTRA},g' SUBST_SED.paths+= -e 's,@MOZ_PLATFORM@,${MOZ_PLATFORM},g' SUBST_STAGE.paths= post-patch # we don't want libnullplugin. post-extract: @${RM} -f ${WRKSRC}/plugins/libnullplugin.so ${CP} ${MOZILLA_SCRIPT} ${WRKDIR}/${MOZILLA}.sh do-install: ${INSTALL_DATA_DIR} ${DESTDIR}${MOZILLA_LIB} cd ${WRKSRC} && pax -rw -pm . ${DESTDIR}${MOZILLA_LIB} ${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA}.sh \ ${DESTDIR}${PREFIX}/bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM} @${FIND} ${DESTDIR}${MOZILLA_LIB} -type f -print \ | ${XARGS} ${CHMOD} a+r @${FIND} ${DESTDIR}${MOZILLA_LIB} \( -type f -o -perm -u+x \) -print \ | ${XARGS} ${CHMOD} a+rx @${FIND} ${DESTDIR}${MOZILLA_LIB} -type d -print \ | ${XARGS} ${CHMOD} a+rx # builds typically want exactly 'libgtk-1.2.so.0', etc. symlink them # into the mozilla directory. post-install: .if defined(EMUL_IS_NATIVE) . if defined(MOZ_GTK2) && !empty(MOZ_GTK2:M[Yy][Ee][Ss]) @cd ${DESTDIR}${MOZILLA_LIB} && \ ${LN} -s ${PREFIX}/lib/libatk-1.0.*so* .; \ ${LN} -s ${X11PREFIX}/lib/libgdk-x11-2.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libgdk_pixbuf-2.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libglib-2.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libgmodule-2.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libgobject-2.0.*so* .; \ ${LN} -s ${X11PREFIX}/lib/libgtk-x11-2.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libpango-1.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libpangox-1.0.*so* .; \ ${LN} -s ${PREFIX}/lib/libpangoxft-1.0.*so* .; \ \ ${LN} -s libatk-1.0.so libatk-1.0.so.0; \ ${LN} -s libgdk-x11-2.0.so libgdk-x11-2.0.so.0; \ ${LN} -s libgdk_pixbuf-2.0.so libgdk_pixbuf-2.0.so.0; \ ${LN} -s libglib-2.0.so libglib-2.0.so.0; \ ${LN} -s libgmodule-2.0.so libgmodule-2.0.so.0; \ ${LN} -s libgobject-2.0.so libgobject-2.0.so.0; \ ${LN} -s libgtk-x11-2.0.so libgtk-x11-2.0.so.0; \ ${LN} -s libpango-1.0.so libpango-1.0.so.0; \ ${LN} -s libpangox-1.0.so libpangox-1.0.so.0; \ ${LN} -s libpangoxft-1.0.so libpangoxft-1.0.so.0 . else @cd ${DESTDIR}${MOZILLA_LIB} && \ ${LN} -s ${PREFIX}/lib/libglib.*so* .; \ ${LN} -s ${PREFIX}/lib/libgmodule.*so* .; \ ${LN} -s ${X11PREFIX}/lib/libgdk.*so* .; \ ${LN} -s ${X11PREFIX}/lib/libgtk.*so* .; \ ${LN} -s libgtk.so libgtk-1.2.so.0; \ ${LN} -s libgdk.so libgdk-1.2.so.0; \ ${LN} -s libglib.so libglib-1.2.so.0; \ ${LN} -s libgmodule.so libgmodule-1.2.so.0 . endif .endif @${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/mozilla-linux/plugins GENERATE_PLIST+= \ ${ECHO} bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}; \ ${FIND} ${DESTDIR}${MOZILLA_LIB} \( -type f -o -type l \) -print\ | ${SORT} | ${SED} -e "s,${DESTDIR}${PREFIX}/,,g"; \ ${FIND} ${DESTDIR}${MOZILLA_LIB} -type d -print \ | ${SORT} -r | ${SED} -e "s,${DESTDIR}${PREFIX}/,@dirrm ,g"; \ ${ECHO} "@exec ${MKDIR} %D/lib/mozilla-linux/plugins"; .include "../../mk/bsd.pkg.mk"