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