# $NetBSD: mozilla-common.mk,v 1.90 2017/03/20 10:54:46 szptvlfn Exp $ # # common Makefile fragment for mozilla packages based on gecko 2.0. # # used by www/firefox/Makefile # used by www/seamonkey/Makefile .include "../../mk/bsd.prefs.mk" .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" BUILD_DEPENDS+= yasm>=1.1:../../devel/yasm # Enable Google widevine CDM. This requires external libwidevinecdm.so. #CONFIGURE_ARGS+= --enable-eme=widevine .endif HAS_CONFIGURE= yes CONFIGURE_ARGS+= --prefix=${PREFIX} USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip USE_LANGUAGES+= c99 c++ UNLIMIT_RESOURCES+= datasize test: cd ${WRKSRC}/${OBJDIR}/dist/bin && \ ./run-mozilla.sh ${WRKSRC}/mach check-spidermonkey # tar(1) of OpenBSD 5.5 has no --exclude command line option. .if ${OPSYS} == "OpenBSD" TOOLS_PLATFORM.tar= ${TOOLS_PATH.bsdtar} USE_TOOLS+= bsdtar .endif # GCC 4.6 is required to support nullptr. GCC_REQD+= 4.8 .if ${MACHINE_ARCH} == "i386" # Fix for PR pkg/48152. CXXFLAGS+= -march=i586 # This is required for SSE2 code under i386. CXXFLAGS+= -mstackrealign .endif CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/libpkix/libpkix.sh CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}security/nss/tests/multinit/multinit.sh CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}js/src/tests/update-test262.sh CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}intl/icu/source/configure CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/components/loop/run-all-loop-tests.sh CHECK_PORTABILITY_SKIP+=${MOZILLA_DIR}browser/extensions/loop/run-all-loop-tests.sh CONFIGURE_ARGS+= --enable-pie CONFIGURE_ARGS+= --disable-tests CONFIGURE_ARGS+= --with-pthreads CONFIGURE_ARGS+= --enable-system-cairo CONFIGURE_ARGS+= --enable-system-pixman CONFIGURE_ARGS+= --with-system-libvpx CONFIGURE_ARGS+= --enable-system-hunspell CONFIGURE_ARGS+= --enable-system-ffi CONFIGURE_ARGS+= --with-system-icu CONFIGURE_ARGS+= --with-system-nss CONFIGURE_ARGS+= --with-system-nspr CONFIGURE_ARGS+= --with-system-jpeg CONFIGURE_ARGS+= --with-system-zlib CONFIGURE_ARGS+= --with-system-bz2 CONFIGURE_ARGS+= --with-system-libevent=${BUILDLINK_PREFIX.libevent} CONFIGURE_ARGS+= --disable-crashreporter CONFIGURE_ARGS+= --disable-necko-wifi CONFIGURE_ARGS+= --enable-chrome-format=flat CONFIGURE_ARGS+= --disable-libjpeg-turbo CONFIGURE_ARGS+= --disable-elf-hack CONFIGURE_ARGS+= --disable-gconf CONFIGURE_ARGS+= --enable-gio CONFIGURE_ARGS+= --enable-extensions=gio #CONFIGURE_ARGS+= --enable-readline CONFIGURE_ARGS+= --enable-url-classifier CONFIGURE_ARGS+= --disable-icf CONFIGURE_ARGS+= --disable-updater SUBST_CLASSES+= fix-paths SUBST_STAGE.fix-paths= pre-configure SUBST_MESSAGE.fix-paths= Fixing absolute paths. SUBST_FILES.fix-paths+= ${MOZILLA_DIR}xpcom/io/nsAppFileLocationProvider.cpp SUBST_SED.fix-paths+= -e 's,/usr/lib/mozilla/plugins,${PREFIX}/lib/netscape/plugins,g' CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.guess CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.guess CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.guess CONFIG_GUESS_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.guess CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}build/autoconf/config.sub CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}js/src/build/autoconf/config.sub CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}nsprpub/build/autoconf/config.sub CONFIG_SUB_OVERRIDE+= ${MOZILLA_DIR}/js/ctypes/libffi/config.sub CONFIGURE_ENV+= CPP=${CPP} SUBST_CLASSES+= python SUBST_STAGE.python= pre-configure SUBST_MESSAGE.python= Fixing path to python. SUBST_FILES.python+= media/webrtc/trunk/build/common.gypi SUBST_SED.python+= -e 's, \ ${WRAPPER_DIR}/bin/rm chmod +x ${WRAPPER_DIR}/bin/rm # The configure test for __thread succeeds, but later we end up with: # dist/bin/libxul.so: undefined reference to `__tls_get_addr' CONFIGURE_ENV.NetBSD+= ac_cv_thread_keyword=no .if ${OPSYS} == "SunOS" # native libbz2.so hides BZ2_crc32Table PREFER.bzip2?= pkgsrc .endif .if ${OPSYS} == "OpenBSD" PLIST_SUBST+= DLL_SUFFIX=".so.1.0" .elif ${OPSYS} == "Darwin" PLIST_SUBST+= DLL_SUFFIX=".dylib" .else PLIST_SUBST+= DLL_SUFFIX=".so" .endif .include "../../archivers/bzip2/buildlink3.mk" BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1 .include "../../devel/libevent/buildlink3.mk" .include "../../devel/libffi/buildlink3.mk" BUILDLINK_API_DEPENDS.nspr+= nspr>=4.10.10 .include "../../devel/nspr/buildlink3.mk" .include "../../textproc/icu/buildlink3.mk" BUILDLINK_API_DEPENDS.nss+= nss>=3.28.1 .include "../../devel/nss/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" .include "../../mk/jpeg.buildlink3.mk" .include "../../graphics/MesaLib/buildlink3.mk" BUILDLINK_API_DEPENDS.cairo+= cairo>=1.10.2nb4 .include "../../graphics/cairo/buildlink3.mk" BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0 .include "../../multimedia/libvpx/buildlink3.mk" .include "../../net/libIDL/buildlink3.mk" .include "../../textproc/hunspell/buildlink3.mk" .include "../../multimedia/ffmpeg3/buildlink3.mk" .include "../../x11/libXt/buildlink3.mk" BUILDLINK_API_DEPENDS.pixman+= pixman>=0.25.2 .include "../../x11/pixman/buildlink3.mk"