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
6917N/ABUILD_BITS= 32
6917N/ACOMPILER= gcc
5253N/Ainclude ../../../make-rules/shared-macros.mk
5253N/A
6917N/A# gcc 5.3 can't compile this version of firefox yet, so keep using 4.9 for now.
6917N/AGCC_ROOT = /usr/gcc/4.9
5786N/A
5253N/ACOMPONENT_NAME = firefox
7307N/ACOMPONENT_VERSION = 45.5.0esr
5253N/ACOMPONENT_PROJECT_URL = http://www.mozilla.com/firefox
5253N/ACOMPONENT_SRC_NAME = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
6917N/ACOMPONENT_SRC = $(COMPONENT_SRC_NAME)
6917N/ACOMPONENT_ARCHIVE = $(COMPONENT_SRC_NAME).source.tar.xz
5253N/ACOMPONENT_ARCHIVE_HASH = \
7307N/A sha256:3e843ca257bf64e11e547e9afdbce797838eb6e01449d2f313c0d1d3117450f1
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
7307N/ATPNO= 32479
5253N/A
7307N/AIPS_COMPONENT_VERSION = 45.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 = \
7307N/A sha256:dacc2bdd239e120c3903ef302164e71a1e76f1fca5be571f1005e0c8137f2777
6973N/ACOMPONENT_ARCHIVE_URL_1 = $(INTERNAL_ARCHIVE_MIRROR)/$(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
6917N/A# Alignment issues on sparc: do not publish until resolved.
6917N/Ainclude $(WS_MAKE_RULES)/no-evaluation.mk
5578N/A
6917N/Ainclude $(WS_MAKE_RULES)/common.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.
5784N/APATH = $(dirname $(CC)):/usr/gnu/bin:/usr/bin:/usr/sbin
5253N/A
5253N/ACLEAN_PATHS += $(COMPONENT_SRC)
6917N/ACLEAN_PATHS += $(COMPONENT_DIR)/xpi
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-zlib" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
6917N/A echo "ac_add_options --with-system-libevent" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-ffi" >> $(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) ; \
6917N/A echo "ac_add_options --with-intl-api" >> $(MOZCONFIG) ; \
5305N/A echo "ac_add_options --enable-system-libffi" >> $(MOZCONFIG) ; \
6917N/A echo "ac_add_options --enable-system-sqlite" >> $(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
6917N/A# Currently, GCC 4.9 incorrectly forces all 32-bit compilation to use lf64(7)
6917N/A# interfaces.
6917N/ACFLAGS += -U_FILE_OFFSET_BITS
6917N/ACXXFLAGS += -U_FILE_OFFSET_BITS
6917N/A
5253N/ACONFIGURE_ENV += PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
5253N/ACONFIGURE_ENV += OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
5525N/A# -L.../dist/lib needs to be set otherwise it will report missing libnss3.so,
5525N/A# libssl3.so, etc, while linking.
6917N/ACONFIGURE_ENV += LDFLAGS="-z ignore -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib -L$(BUILD_DIR_32)/dist/bin"
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
6917N/AFF_XPI = $(MOZILLA_FTP)/linux-i686/xpi
6917N/A
6917N/A# Run gmake download-xpis to download a tarball for xpi locally.
6917N/A# The resulting archive should be uploaded to userland internal archive.
6917N/Adownload-xpis:
6917N/A @echo "download-xpis"
6917N/A $(RM) -r $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1)
6917N/A $(MKDIR) $(COMPONENT_DIR)/xpi
6917N/A @echo "downloading firefox xpis"
6917N/A list1='$(LANG_LIST)' ; for f in $$list1 ; do \
6917N/A echo $$f; \
6917N/A /usr/bin/curl -s -o $(COMPONENT_DIR)/xpi/$$f.xpi \
6917N/A $(FF_XPI)/$$f.xpi; \
6917N/A done
6917N/A (cd $(COMPONENT_DIR); \
6917N/A $(TAR) czvf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1) xpi )
6917N/A /usr/bin/sha256sum $(COMPONENT_ARCHIVE_1)
6917N/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/ACOMPONENT_TEST_DIR = $(@D)/js/src
5253N/ACOMPONENT_TEST_TARGETS=check-jit-test
6973N/ACOMPONENT_TEST_TRANSFORMS = \
7097N/A '-e "/^PASSED ALL/,/Failed:/p" ' \
6973N/A '-e "/.*/d" '
5253N/A
6918N/AREQUIRED_PACKAGES += codec/libogg
6918N/AREQUIRED_PACKAGES += codec/libvorbis
6918N/AREQUIRED_PACKAGES += codec/ogg-vorbis
5253N/AREQUIRED_PACKAGES += database/sqlite-3
7011N/AREQUIRED_PACKAGES += developer/gcc-49
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
7185N/AREQUIRED_PACKAGES += library/desktop/startup-notification
5253N/AREQUIRED_PACKAGES += library/glib2
7185N/A# Remove once all build machines have library/desktop/startup-notification:
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
6918N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt