1 # $NetBSD: Makefile,v 1.17 2009/09/13 12:19:26 tnn Exp $
4 DISTNAME= xulrunner-${XULRUNNER_VER}-source
5 PKGNAME= ${DISTNAME:S/-source//}
9 MASTER_SITES= ${MASTER_SITE_MOZILLA:=xulrunner/releases/${XULRUNNER_VER}/source/}
10 EXTRACT_SUFX= .tar.bz2
12 MAINTAINER= pkgsrc-users@NetBSD.org
13 HOMEPAGE= http://developer.mozilla.org/en/docs/XULRunner
14 COMMENT= XML User Interface Language runtime environment
16 WRKSRC= ${WRKDIR}/mozilla-1.9.1
18 USE_TOOLS+= pkg-config perl gmake autoconf213
21 BUILD_DEPENDS+= zip>=2.3:../../archivers/zip
23 PKG_DESTDIR_SUPPORT= user-destdir
24 CHECK_PORTABILITY_SKIP= security/nss/tests/libpkix/libpkix.sh
26 PKGCONFIG_OVERRIDE+= xulrunner/installer/libxul-embedding-unstable.pc.in
27 PKGCONFIG_OVERRIDE+= xulrunner/installer/libxul-embedding.pc.in
28 PKGCONFIG_OVERRIDE+= xulrunner/installer/libxul-unstable.pc.in
29 PKGCONFIG_OVERRIDE+= xulrunner/installer/libxul.pc.in
30 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-gtkmozembed-embedding.pc.in
31 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-gtkmozembed.pc.in
32 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-js.pc.in
33 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-nspr.pc.in
34 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-nss.pc.in
35 PKGCONFIG_OVERRIDE+= xulrunner/installer/mozilla-plugin.pc.in
37 PRIVILEGED_STAGES= clean
39 CONFIG_GUESS_OVERRIDE= build/autoconf/config.guess
40 CONFIG_GUESS_OVERRIDE+= js/src/build/autoconf/config.guess
41 CONFIG_GUESS_OVERRIDE+= nsprpub/build/autoconf/config.guess
42 CONFIG_SUB_OVERRIDE= build/autoconf/config.sub
43 CONFIG_SUB_OVERRIDE+= js/src/build/autoconf/config.sub
44 CONFIG_SUB_OVERRIDE+= nsprpub/build/autoconf/config.sub
46 CONFIGURE_ARGS+= --enable-application=xulrunner
47 CONFIGURE_ARGS+= --enable-libxul
48 CONFIGURE_ARGS+= --disable-tests --disable-pedantic
49 CONFIGURE_ARGS+= --enable-crypto
50 CONFIGURE_ARGS+= --enable-optimize=-O2 --with-pthreads
51 CONFIGURE_ARGS+= --disable-gnomevfs --disable-gnomeui
52 CONFIGURE_ARGS+= --disable-dbus --disable-javaxpcom
53 CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
54 CONFIGURE_ARGS+= --enable-svg --enable-mathml
55 CONFIGURE_ARGS+= --enable-system-cairo --enable-system-lcms
56 CONFIGURE_ARGS+= --with-system-jpeg
57 CONFIGURE_ARGS+= --with-system-zlib --with-system-bz2
58 CONFIGURE_ARGS+= --enable-system-sqlite
59 CONFIGURE_ARGS+= --disable-crashreporter
61 ALL_ENV+= MOZILLA_PKG_NAME=xulrunner
63 SUBST_CLASSES+= fix-paths
64 SUBST_STAGE.fix-paths= pre-configure
65 SUBST_MESSAGE.fix-paths= Fixing absolute paths.
66 SUBST_FILES.fix-paths= xpcom/build/nsXPCOMPrivate.h
67 SUBST_FILES.fix-paths+= xulrunner/app/nsRegisterGREUnix.cpp
68 SUBST_FILES.fix-paths+= xulrunner/installer/Makefile.in
69 SUBST_FILES.fix-paths+= extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java
70 SUBST_SED.fix-paths= -e 's,/etc/gre.d,${PREFIX}/lib/xulrunner/gre.d,g'
72 PYTHON_FOR_BUILD_ONLY= yes
73 .include "../../lang/python/application.mk"
74 CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
77 .include "../../mk/bsd.prefs.mk"
80 cd ${WRKSRC} && autoconf
81 cd ${WRKSRC}/js/src && autoconf
82 cd ${WRKSRC}/nsprpub && autoconf
84 # Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
85 .PHONY: create-rm-wrapper
86 pre-configure: create-rm-wrapper
88 printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
90 chmod +x ${WRAPPER_DIR}/bin/rm
93 caps chardet commandhandler content cookie docshell dom \
94 downloads embedcomponents exthandler fastfind find gfx \
95 gtkembedmoz htmlparser imglib2 intl java js layout libreg \
96 locale loginmgr mimetype necko nkcache nspr oji pipboot pipnss \
97 places pref profdirserviceprovider rdf shistory spellchecker \
98 string thebes toolkitcomps uconv uriloader webbrowserpersist \
99 webbrwsr webshell widget windowwatcher xpcom xpconnect xulapp
102 # XXX fix the pkg-config files instead
103 rm -f ${DESTDIR}${PREFIX}/lib/xulrunner/libxpcomglue.a
104 ln -s ${PREFIX}/lib/xulrunner-sdk/sdk/lib/libxpcomglue.a \
105 ${DESTDIR}${PREFIX}/lib/xulrunner/libxpcomglue.a
106 rm -f ${DESTDIR}${PREFIX}/lib/xulrunner/libxpcomglue_s.a
107 ln -s ${PREFIX}/lib/xulrunner-sdk/sdk/lib/libxpcomglue_s.a \
108 ${DESTDIR}${PREFIX}/lib/xulrunner/libxpcomglue_s.a
109 ${INSTALL_LIB} ${WRKSRC}/dist/lib/libunicharutil_external_s.a \
110 ${DESTDIR}${PREFIX}/lib/xulrunner
111 cd ${WRKSRC}/dist/include && \
112 ${INSTALL_DATA} `find ${INCLUDE_SUBDIRS} -name "*.h" -print` \
113 js/jsproto.tbl mozilla-config.h gtkembedmoz/gtkmozembed_glue.cpp \
114 ${DESTDIR}${PREFIX}/include/xulrunner/unstable
115 ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/include/xulrunner/unstable/obsolete
116 cd ${WRKSRC}/dist/include/nspr/obsolete && ${INSTALL_DATA} protypes.h \
117 ${DESTDIR}${PREFIX}/include/xulrunner/unstable/obsolete
119 .if ${OPSYS} == "Linux"
120 .include "../../audio/alsa-lib/buildlink3.mk"
122 .include "../../archivers/bzip2/buildlink3.mk"
123 .include "../../databases/sqlite3/buildlink3.mk"
124 .include "../../devel/zlib/buildlink3.mk"
125 .include "../../graphics/lcms/buildlink3.mk"
126 .include "../../net/libIDL/buildlink3.mk"
127 .include "../../x11/gtk2/buildlink3.mk"
128 .include "../../x11/libXt/buildlink3.mk"
129 .include "../../mk/bsd.pkg.mk"