update Fri Apr 16 00:37:00 PDT 2010
[pkgsrc.git] / devel / xulrunner / mozilla-common.mk
1 # $NetBSD: mozilla-common.mk,v 1.13 2010/03/16 10:56:36 tnn Exp $
2 #
3 # common Makefile fragment for mozilla packages based on gecko 1.9.1.
4
5 # used by devel/xulrunner/Makefile
6 # used by mail/thunderbird/Makefile
7 # used by www/firefox/Makefile
8 # used by www/seamonkey/Makefile
9
10 GNU_CONFIGURE=          yes
11 USE_TOOLS+=             pkg-config perl gmake autoconf213
12 USE_LANGUAGES+=         c99 c++
13 UNLIMIT_RESOURCES+=     datasize
14
15 BUILD_DEPENDS+=         zip>=2.3:../../archivers/zip
16
17 PKG_DESTDIR_SUPPORT=    user-destdir
18 CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/libpkix/libpkix.sh
19 CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/multinit/multinit.sh
20 PRIVILEGED_STAGES+=     clean
21
22 CONFIGURE_ARGS+=        --disable-tests --disable-pedantic
23 CONFIGURE_ARGS+=        --enable-crypto
24 CONFIGURE_ARGS+=        --enable-optimize=-O2 --with-pthreads
25 CONFIGURE_ARGS+=        --disable-javaxpcom
26 CONFIGURE_ARGS+=        --enable-default-toolkit=cairo-gtk2
27 CONFIGURE_ARGS+=        --enable-svg --enable-mathml
28 CONFIGURE_ARGS+=        --enable-system-cairo
29 CONFIGURE_ARGS+=        --with-system-jpeg
30 CONFIGURE_ARGS+=        --with-system-zlib --with-system-bz2
31 CONFIGURE_ARGS+=        --enable-system-sqlite
32 CONFIGURE_ARGS+=        --disable-crashreporter
33 CONFIGURE_ARGS+=        --disable-libnotify
34 CONFIGURE_ARGS+=        --disable-necko-wifi
35
36 SUBST_CLASSES+=                 fix-paths
37 SUBST_STAGE.fix-paths=          pre-configure
38 SUBST_MESSAGE.fix-paths=        Fixing absolute paths.
39 SUBST_FILES.fix-paths=          ${MOZILLA_DIR}xpcom/build/nsXPCOMPrivate.h
40 SUBST_FILES.fix-paths+=         ${MOZILLA_DIR}xulrunner/app/nsRegisterGREUnix.cpp
41 SUBST_FILES.fix-paths+=         ${MOZILLA_DIR}xulrunner/installer/Makefile.in
42 SUBST_FILES.fix-paths+=         ${MOZILLA_DIR}extensions/java/xpcom/interfaces/org/mozilla/xpcom/Mozilla.java
43 SUBST_FILES.fix-paths+=         ${MOZILLA_DIR}xpcom/io/nsAppFileLocationProvider.cpp
44 SUBST_SED.fix-paths=            -e 's,/etc/gre.d,${PREFIX}/lib/xulrunner/gre.d,g'
45 SUBST_SED.fix-paths+=           -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g'
46
47 CONFIG_GUESS_OVERRIDE+=         ${MOZILLA_DIR}build/autoconf/config.guess
48 CONFIG_GUESS_OVERRIDE+=         ${MOZILLA_DIR}js/src/build/autoconf/config.guess
49 CONFIG_GUESS_OVERRIDE+=         ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess
50 CONFIG_GUESS_OVERRIDE+=         ${MOZILLA_DIR}/js/ctypes/libffi/config.guess
51 CONFIG_SUB_OVERRIDE+=           ${MOZILLA_DIR}build/autoconf/config.sub
52 CONFIG_SUB_OVERRIDE+=           ${MOZILLA_DIR}js/src/build/autoconf/config.sub
53 CONFIG_SUB_OVERRIDE+=           ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub
54 CONFIG_SUB_OVERRIDE+=           ${MOZILLA_DIR}/js/ctypes/libffi/config.sub
55
56 PYTHON_FOR_BUILD_ONLY=          yes
57 .include "../../lang/python/application.mk"
58 CONFIGURE_ENV+=         PYTHON=${PYTHONBIN:Q}
59
60 # Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
61 .PHONY: create-rm-wrapper
62 pre-configure: create-rm-wrapper
63 create-rm-wrapper:
64         printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
65           ${WRAPPER_DIR}/bin/rm
66         chmod +x ${WRAPPER_DIR}/bin/rm
67
68 .include "../../mk/bsd.prefs.mk"
69
70 .if ${OPSYS} == "NetBSD"
71 # The configure test for __thread succeeds, but later we end up with:
72 # dist/bin/libxul.so: undefined reference to `__tls_get_addr'
73 CONFIGURE_ENV+= ac_cv_thread_keyword=no
74 .endif
75
76 .if ${OPSYS} == "SunOS"
77 # native libbz2.so hides BZ2_crc32Table
78 PREFER.bzip2?=  pkgsrc
79 .endif
80
81 .if ${OPSYS} == "Linux"
82 .include "../../audio/alsa-lib/buildlink3.mk"
83 .endif
84 .include "../../archivers/bzip2/buildlink3.mk"
85 BUILDLINK_API_DEPENDS.sqlite3+= sqlite3>=3.6.22
86 .include "../../databases/sqlite3/buildlink3.mk"
87 .include "../../devel/zlib/buildlink3.mk"
88 .include "../../graphics/jpeg/buildlink3.mk"
89 .include "../../net/libIDL/buildlink3.mk"
90 BUILDLINK_API_DEPENDS.gtk2+=    gtk2+>=2.18.3nb1
91 .include "../../x11/gtk2/buildlink3.mk"
92 .include "../../x11/libXt/buildlink3.mk"