Makefile revision 6918
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# CDDL HEADER START
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# CDDL HEADER END
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# parfait is a bit unhappy (22527218)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# gcc 5.3 can't compile this version of firefox yet, so keep using 4.9 for now.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_PROJECT_URL = http://www.mozilla.com/firefox
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_SRC_NAME = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCOMPONENT_ARCHIVE = $(COMPONENT_SRC_NAME).source.tar.xz
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sha256:a27e36aa1ccebddfe5a113f7f15b09a61e35644be58029b00b0d996a00d04562
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinMOZILLA_FTP = http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCOMPONENT_ARCHIVE_URL = $(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# There are a set of .xpi files (as given in the LANG_LIST definition below)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# that we need. These are available under:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/31.8.0esr/linux-i686/xpi/
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# We could download and unpack them individually, but instead I've created
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# a compressed tarball of them, and made that available locally for download.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Downloading them individually can be a problem because firefox/thunderbird
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# collide due to different files with identical .xpi names.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_ARCHIVE_1 = $(COMPONENT_SRC_NAME)-xpi.tar.gz
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User sha256:d80142e7b64b3b61baaf7631e6ad0bf7c4a44d962dc3611bf6dba2dde33aacea
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark AndrewsCOMPONENT_ARCHIVE_URL_1 = $(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_1)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinLANG_LIST = ar be bg ca cs da de el es-AR es-CL es-ES et fi \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User fr he hi-IN hr hu id is it ja kk ko lt lv mk nb-NO nl nn-NO \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User pl pt-BR pt-PT ro ru sk sl sq sr sv-SE th tr uk vi zh-CN zh-TW
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Alignment issues on sparc: do not publish until resolved.
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson# /usr/gnu/bin needed to pick up the GNU version of tail and readelf.
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson# /usr/sbin needed for dtrace.
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonPATH = $(dirname $(CC)):/usr/gnu/bin:/usr/bin:/usr/sbin
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "mk_add_options BUILD_OFFICIAL=1" > $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "mk_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --prefix=/usr" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --libdir=/usr/lib" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --mandir=/usr/share/man" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-official-branding" >> $(MOZCONFIG) ; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User echo "ac_add_options --disable-updater" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-debug-symbols=no" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-update-packaging" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-update-channel=esr" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --disable-tests" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --with-system-zlib" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "ac_add_options --with-system-libevent" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-system-ffi" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-jemalloc" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-xinerama" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --disable-crashreporter" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --disable-pulseaudio" >> $(MOZCONFIG) ; \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson echo "ac_add_options --enable-gstreamer" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --with-intl-api" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-system-libffi" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-system-sqlite" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-ipc" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-system-pixman" >> $(MOZCONFIG) ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein echo "ac_add_options --enable-startup-notification" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-dtrace" >> $(MOZCONFIG) ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "ac_add_options --enable-replace-malloc" >> $(MOZCONFIG) ;
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Currently, GCC 4.9 incorrectly forces all 32-bit compilation to use lf64(7)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# interfaces.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCONFIGURE_ENV += OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# -L.../dist/lib needs to be set otherwise it will report missing libnss3.so,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libssl3.so, etc, while linking.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += LDFLAGS="-z ignore -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib -L$(BUILD_DIR_32)/dist/bin"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If the configure options are not explicitly set, then configure fails with:
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# invalid host type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# configure: warning: CXX=/usr/gcc/4.8/bin/g++: invalid host type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# invalid host type
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# configure: error: can only configure for one host and one target at a time
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein (cd $(@D)/browser/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(CP) $(BUILD_DIR_32)/dist/firefox/precomplete \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/precomplete ;
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein /usr/bin/tar xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/browser/extensions/langpack-$$f@firefox.mozilla.org.xpi ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Run gmake download-xpis to download a tarball for xpi locally.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The resulting archive should be uploaded to userland internal archive.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @echo "download-xpis"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(RM) -r $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein @echo "downloading firefox xpis"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein /usr/bin/curl -s -o $(COMPONENT_DIR)/xpi/$$f.xpi \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(TAR) czvf $(COMPONENT_DIR)/$(COMPONENT_ARCHIVE_1) xpi )
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinSIGNED_LIST.i386 = libsoftokn3.so libnssdbm3.so libfreebl3.so
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserSIGNED_LIST.sparc = libsoftokn3.so libnssdbm3.so libfreebl_32int_3.so libfreebl_32int64_3.so
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein slist='$(SIGNED_LIST)' ; for f in $$slist ; do \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein mcs -d $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein LD_LIBRARY_PATH=$(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION) $(BUILD_DIR_32)/dist/bin/shlibsign -v -i $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH).master
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein '-e "/\(^TEST-PASS\).*/d" '
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonREQUIRED_PACKAGES += library/graphics/pixman
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += system/library/fontconfig
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += system/library/freetype-2
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime