Makefile revision 5680
5253N/A#
5253N/A# CDDL HEADER START
5253N/A#
5253N/A# The contents of this file are subject to the terms of the
5253N/A# Common Development and Distribution License (the "License").
5253N/A# You may not use this file except in compliance with the License.
5253N/A#
5253N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5253N/A# or http://www.opensolaris.org/os/licensing.
5253N/A# See the License for the specific language governing permissions
5253N/A# and limitations under the License.
5253N/A#
5253N/A# When distributing Covered Code, include this CDDL HEADER in each
5253N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5253N/A# If applicable, add the following below this CDDL HEADER, with the
5253N/A# fields enclosed by brackets "[]" replaced with your own identifying
5253N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5253N/A#
5253N/A# CDDL HEADER END
5253N/A#
5253N/A
5253N/A#
5343N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
5253N/A#
5253N/A
5254N/A# parfait is a bit unhappy (22527218)
5254N/Aexport PARFAIT_BUILD=no
5254N/A
5253N/ACOMPILER = gcc
5253N/A
5253N/Ainclude ../../../make-rules/shared-macros.mk
5253N/A
5253N/ACOMPONENT_NAME = firefox
5525N/ACOMPONENT_VERSION = 38.5.0esr
5253N/ACOMPONENT_PROJECT_URL = http://www.mozilla.com/firefox
5525N/ACOMPONENT_SRC = mozilla-esr38
5253N/ACOMPONENT_SRC_NAME = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5253N/ACOMPONENT_ARCHIVE = $(COMPONENT_SRC_NAME).source.tar.bz2
5253N/ACOMPONENT_ARCHIVE_HASH = \
5525N/A sha256:2a1f90cfe390ab20be88fed38cb9f61a18281cfbee47505c67e0254d339cdb20
5253N/AMOZILLA_FTP = http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
5253N/ACOMPONENT_ARCHIVE_URL = $(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
5253N/ACOMPONENT_BUGDB = firefox/browser
5253N/A
5525N/ATPNO= 26828
5253N/A
5525N/AIPS_COMPONENT_VERSION = 38.5.0
5253N/A
5253N/A# There are a set of .xpi files (as given in the LANG_LIST definition below)
5253N/A# that we need. These are available under:
5253N/A# http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/31.8.0esr/linux-i686/xpi/
5256N/A# We could download and unpack them individually, but instead I've created
5256N/A# a compressed tarball of them, and made that available locally for download.
5256N/A# Downloading them individually can be a problem because firefox/thunderbird
5256N/A# collide due to different files with identical .xpi names.
5525N/ACOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_NAME)-xpi.tar.gz
5256N/ACOMPONENT_ARCHIVE_HASH_1 = \
5525N/A sha256:1fe09d5540167cbda3029f4e02640498fbb98ad7b47cdb6b8872e6dcf522a3e1
5256N/ACOMPONENT_ARCHIVE_URL_1 = $(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_1)
5253N/A
5253N/ALANG_LIST = ar be bg ca cs da de el es-AR es-CL es-ES et fi \
5253N/A fr he hi-IN hr hu id is it ja kk ko lt lv mk nb-NO nl nn-NO \
5253N/A pl pt-BR pt-PT ro ru sk sl sq sr sv-SE th tr uk vi zh-CN zh-TW
5253N/A
5253N/Ainclude $(WS_MAKE_RULES)/prep.mk
5253N/Ainclude $(WS_MAKE_RULES)/configure.mk
5578N/A
5578N/A# Alignment issues on sparc: do not publish until resolved.
5578N/Aifeq ($(BUILD_TYPE), evaluation)
5578N/ABUILD_32=
5578N/AINSTALL_32=
5578N/APUBLISH_STAMP=
5578N/Aendif
5578N/A
5253N/Ainclude $(WS_MAKE_RULES)/ips.mk
5253N/A
5253N/A# /usr/gnu/bin needed to pick up the GNU version of tail and readelf.
5253N/A# /usr/sbin needed for dtrace.
5253N/APATH = /usr/gnu/bin:/usr/bin:/usr/sbin
5253N/A
5253N/ACLEAN_PATHS += $(COMPONENT_SRC)
5253N/A
5305N/AMOZCONFIG = $(BUILD_DIR_32)/mozconfig
5305N/A
5253N/ACOMPONENT_PRE_CONFIGURE_ACTION += \
5305N/A echo "mk_add_options BUILD_OFFICIAL=1" > $(MOZCONFIG) ; \
5305N/A echo "mk_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --prefix=/usr" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --libdir=/usr/lib" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --mandir=/usr/share/man" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-official-branding" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --disable-updater" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-debug-symbols=no" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-update-packaging" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-update-channel=esr" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --disable-tests" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --with-system-libevent" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --with-system-zlib" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-ffi" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-sqlite" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-jemalloc" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-xinerama" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --disable-crashreporter" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --disable-pulseaudio" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-gstreamer" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --without-intl-api" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-libffi" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-ipc" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-pixman" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-startup-notification" >> $(MOZCONFIG) ; \
5525N/A echo "ac_add_options --enable-dtrace" >> $(MOZCONFIG) ; \
5525N/A echo "ac_add_options --enable-replace-malloc" >> $(MOZCONFIG) ;
5253N/A
5525N/ACXXFLAGS += -Wno-invalid-offsetof -fpermissive
5525N/ACC += $(CC_BITS)
5525N/ACXX += $(CC_BITS)
5253N/A
5253N/ACONFIGURE_ENV += PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
5253N/ACONFIGURE_ENV += OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
5525N/ACONFIGURE_ENV += CXXFLAGS='-xlibmil -xlibmopt -lCrun -lCstd -features=tmplrefstatic,no%except -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -template=no%extdef'
5525N/A# -L.../dist/lib needs to be set otherwise it will report missing libnss3.so,
5525N/A# libssl3.so, etc, while linking.
5680N/ACONFIGURE_ENV += LDFLAGS="$(LD_Z_IGNORE) -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib"
5525N/A
5253N/A
5305N/ACONFIGURE_ENV += MOZCONFIG=$(MOZCONFIG)
5253N/ACONFIGURE_ENV += "CC=$(CC)"
5253N/ACONFIGURE_ENV += "CXX=$(CXX)"
5253N/ACONFIGURE_ENV += "CFLAGS=$(CFLAGS)"
5253N/ACONFIGURE_ENV += "CXXFLAGS=$(CXXFLAGS)"
5253N/A
5253N/A# If the configure options are not explicitly set, then configure fails with:
5253N/A# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
5253N/A# invalid host type
5253N/A# configure: warning: CXX=/usr/gcc/4.8/bin/g++: invalid host type
5253N/A# invalid host type
5253N/A# configure: error: can only configure for one host and one target at a time
5253N/ACONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
5253N/ACONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
5253N/A
5253N/ACOMPONENT_POST_BUILD_ACTION = \
5253N/A (cd $(@D)/browser/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
5253N/A $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
5253N/A
5253N/ACOMPONENT_POST_INSTALL_ACTION += \
5253N/A $(CP) $(BUILD_DIR_32)/dist/firefox/precomplete \
5253N/A $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/precomplete ;
5253N/A
5253N/ACOMPONENT_POST_INSTALL_ACTION += \
5256N/A $(RM) -rf xpi ; \
5256N/A /usr/bin/tar xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
5253N/A list1='$(LANG_LIST)' ; for f in $$list1 ; do \
5253N/A $(CP) xpi/$$f.xpi \
5253N/A $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/browser/extensions/langpack-$$f@firefox.mozilla.org.xpi ; \
5253N/A done ;
5253N/A
5253N/ASIGNED_LIST.i386 = libsoftokn3.so libnssdbm3.so libfreebl3.so
5253N/ASIGNED_LIST.sparc = libsoftokn3.so libnssdbm3.so libfreebl_32int_3.so libfreebl_32int64_3.so
5253N/ASIGNED_LIST = $(SIGNED_LIST.$(MACH))
5253N/A
5253N/ACOMPONENT_POST_INSTALL_ACTION += \
5253N/A slist='$(SIGNED_LIST)' ; for f in $$slist ; do \
5253N/A mcs -d $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
5253N/A LD_LIBRARY_PATH=$(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION) $(BUILD_DIR_32)/dist/bin/shlibsign -v -i $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
5253N/A done ;
5253N/A
5253N/AASLR_MODE = $(ASLR_ENABLE)
5253N/A
5253N/ACOMPONENT_TEST_DIR = $(@D)/js/src
5253N/ACOMPONENT_TEST_TARGETS=check-jit-test
5253N/ACOMPONENT_TEST_TRANSFORMS += \
5253N/A '-e "/\(^TEST-PASS\).*/d" '
5253N/A
5253N/Aconfigure: $(CONFIGURE_32)
5253N/A
5253N/Abuild: $(BUILD_32)
5253N/A
5253N/Ainstall: $(INSTALL_32)
5253N/A
5253N/Atest: $(TEST_32)
5253N/A
5253N/Asystem-test: $(NO_TESTS)
5253N/A
5253N/AREQUIRED_PACKAGES += database/sqlite-3
5253N/AREQUIRED_PACKAGES += library/desktop/atk
5253N/AREQUIRED_PACKAGES += library/desktop/cairo
5253N/AREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
5253N/AREQUIRED_PACKAGES += library/desktop/gtk2
5253N/AREQUIRED_PACKAGES += library/desktop/pango
5253N/AREQUIRED_PACKAGES += library/glib2
5305N/AREQUIRED_PACKAGES += library/gnome/gnome-libs
5253N/AREQUIRED_PACKAGES += library/graphics/pixman
5253N/AREQUIRED_PACKAGES += library/libevent
5253N/AREQUIRED_PACKAGES += library/libffi
5525N/AREQUIRED_PACKAGES += library/nspr
5253N/AREQUIRED_PACKAGES += library/zlib
5253N/AREQUIRED_PACKAGES += system/library
5253N/AREQUIRED_PACKAGES += system/library/fontconfig
5253N/AREQUIRED_PACKAGES += system/library/freetype-2
5253N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
5253N/AREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
5253N/AREQUIRED_PACKAGES += system/library/libdbus
5253N/AREQUIRED_PACKAGES += system/library/libdbus-glib
5253N/AREQUIRED_PACKAGES += system/library/math
5253N/AREQUIRED_PACKAGES += x11/library/libx11
5253N/AREQUIRED_PACKAGES += x11/library/libxext
5253N/AREQUIRED_PACKAGES += x11/library/libxrender
5525N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt