pkgsrc/www/mozilla-bin/Makefile.common
2004-01-22 10:55:46 +00:00

172 lines
5.6 KiB
Text

# $NetBSD: Makefile.common,v 1.7 2004/01/22 10:55:46 grant Exp $
#
DISTNAME= # see Makefile.${OPSYS}.${ARCH}
PKGNAME= ${MOZILLA}${MOZ_EXTRA}-bin-${MOZ_VER}
CATEGORIES= www
.if ${MOZILLA} == "MozillaFirebird"
MOZILLA_SHORT= firebird
MOZ_DIR= ${MOZ_VER}
.else
MOZILLA_SHORT= ${MOZILLA}
MOZ_DIR= mozilla${MOZ_VER}
.endif
MASTER_SITES?= http://ftp.mozilla.org/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/${MOZ_CONTRIB} \
ftp://ftp.mozilla.org/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/${MOZ_CONTRIB} \
http://public.planetmirror.com.au/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/${MOZ_CONTRIB} \
ftp://public.planetmirror.com.au/pub/mozilla.org/${MOZILLA_SHORT}/releases/${MOZ_DIR}/${MOZ_CONTRIB}
MAINTAINER= grant@NetBSD.org
HOMEPAGE?= http://www.mozilla.org/
WRKSRC= ${WRKDIR}/${MOZILLA}
NO_CONFIGURE= # defined
FILESDIR= ${.CURDIR}/../../www/mozilla-bin/files
USE_PKGINSTALL= YES
.include "../../mk/bsd.prefs.mk"
# everything specific to your OS/Arch goes into its own Makefile
# group together i386, i486, i586 and i686 (for Linux)
ARCH=${MACHINE_ARCH:C/i[3-6]86/i386/g}
.if exists(${.CURDIR}/Makefile.${OPSYS}.${ARCH})
. include "${.CURDIR}/Makefile.${OPSYS}.${ARCH}"
.endif
# suffix gtk2 builds with -gtk2
.if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
MOZ_EXTRA?= -gtk2
.else
MOZ_EXTRA?= # empty
.endif
MOZILLA_LIB= ${PREFIX}/lib/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
FILES_SUBST+= MOZILLA=${MOZILLA}
FILES_SUBST+= MOZ_EXTRA=${MOZ_EXTRA}
FILES_SUBST+= MOZ_PLATFORM=${MOZ_PLATFORM}
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
# protect against MOZ_PLATFORM being undefined so we don't bomb, but
# instead use the result of ONLY_FOR_PLATFORM.
.if defined(MOZ_PLATFORM)
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
MESSAGE_SRC+= ${.CURDIR}/../../www/mozilla-bin/MESSAGE.compat_linux
. endif
# non-linux builds are "unofficial" and in contrib/
MOZ_CONTRIB?= contrib/
. if defined(MOZ_PLATFORM) && ${MOZ_PLATFORM} == "linux"
MOZ_CONTRIB= # empty
. endif
# Linux builds on NetBSD
. if ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "linux"
. include "../../emulators/suse_linux/Makefile.application"
DEPENDS+= suse_compat>=7.3:../../emulators/${SUSE_DIR_PREFIX}_compat
DEPENDS+= suse_x11>=7.3:../../emulators/${SUSE_DIR_PREFIX}_x11
DEPENDS+= suse_gtk>=7.3:../../emulators/${SUSE_DIR_PREFIX}_gtk
CONFLICTS+= suse_libc5-[0-9]*
# NetBSD native builds are built with gtk-1.2.10nb5.
. elif ${OPSYS} == "NetBSD" && ${MOZ_PLATFORM} == "netbsd"
DEPENDS+= gtk+>=1.2.10nb5:../../x11/gtk
# we need libstdc++.so.4 on -current.
. if !exists(/usr/lib/libstdc++.so.4)
DEPENDS+= compat16>=1.6.0:../../emulators/compat16
_COMPAT16_LIBSTDCXX= YES
. endif
. else
# gtk2 builds.
. if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
DEPENDS+= gtk2+>=2.2:../../x11/gtk2
. else
# default to at least gtk-1.2.
DEPENDS+= gtk+>=1.2:../../x11/gtk
. endif
. endif
.endif # defined(MOZ_PLATFORM)
# we don't want libnullplugin.
post-extract:
@${RM} -f ${WRKSRC}/plugins/libnullplugin.so
do-build:
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/mozilla.sh > ${WRKDIR}/${MOZILLA}.sh
do-install:
${INSTALL_DATA_DIR} ${MOZILLA_LIB}
cd ${WRKSRC} && ${PAX} -rw -pm . ${MOZILLA_LIB}
${INSTALL_SCRIPT} ${WRKDIR}/${MOZILLA}.sh ${PREFIX}/bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM}
@${FIND} ${MOZILLA_LIB} -type f -print \
| ${XARGS} ${CHMOD} a+r
@${FIND} ${MOZILLA_LIB} \( -type f -o -perm -u+x \) -print \
| ${XARGS} ${CHMOD} a+rx
@${FIND} ${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 ${OPSYS} != "NetBSD"
. if defined(MOZ_GTK2) && ${MOZ_GTK2} == "YES"
@cd ${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 ${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
.if defined(_COMPAT16_LIBSTDCXX) && ${_COMPAT16_LIBSTDCXX} == "YES"
@cd ${MOZILLA_LIB} && \
${LN} -s ${PREFIX}/emul/netbsd16/usr/lib/libstdc++.so* .
.endif
@${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
@${ECHO} bin/${MOZILLA}${MOZ_EXTRA}-${MOZ_PLATFORM} >> ${PLIST_SRC}
@${FIND} ${MOZILLA_LIB} \( -type f -o -type l \) -print \
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
>> ${PLIST_SRC}
@${FIND} ${MOZILLA_LIB} -type d -print \
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
>> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"