Makefile revision 5413
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# CDDL HEADER START
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# The contents of this file are subject to the terms of the
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# Common Development and Distribution License (the "License").
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# You may not use this file except in compliance with the License.
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# or http://www.opensolaris.org/os/licensing.
c1fad183c9a0deeb49586645ec9baa8f3c1bc8beDaniel Beauregard# See the License for the specific language governing permissions
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# and limitations under the License.
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# When distributing Covered Code, include this CDDL HEADER in each
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# If applicable, add the following below this CDDL HEADER, with the
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# fields enclosed by brackets "[]" replaced with your own identifying
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# information: Portions Copyright [yyyy] [name of copyright owner]
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# CDDL HEADER END
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# parfait is a bit unhappy (22527218)
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregardinclude ../../../make-rules/shared-macros.mk
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardCOMPONENT_PROJECT_URL= http://www.mozilla.com/thunderbird
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardCOMPONENT_SRC_NAME = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCOMPONENT_ARCHIVE= $(COMPONENT_SRC_NAME).source.tar.bz2
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard sha256:ccbf8cbb740bc1b30ecf4fe39aab226607f9a41e23a07e994c508a90e8b70508
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardMOZILLA_FTP = http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardCOMPONENT_ARCHIVE_URL= $(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# There are a set of .xpi files (as given in the LANG_LIST definition below)
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# that we need. These are available under:
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/31.6.0/linux-i686/xpi/
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# We could download and unpack them individually, but instead I've created
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# a compressed tarball of them, and made that available locally for download.
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# Downloading them individually can be a problem because firefox/thunderbird
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# collide due to different files with identical .xpi names.
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardCOMPONENT_ARCHIVE_1 = thunderbird-31.6.0-xpi.tar.gz
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard sha256:80e9cc4b152d75f5c3887c01ad1767680aff5ca7c3aee87254bdc1574590b95e
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCOMPONENT_ARCHIVE_URL_1 = $(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_1)
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel BeauregardLANG_LIST = ar bg ca cs da de el es-AR es-ES et eu fi \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard fr gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard pt-BR pt-PT ro ru sk sl sq sv-SE tr uk zh-CN zh-TW
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# Depends on libsmbclient but samba is on the do-not-publish list, so this
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# /usr/sbin needed for dtrace.
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "mk_add_options BUILD_OFFICIAL=1" > $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "mk_add_options MOZILLA_OFFICIAL=1" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --prefix=/usr" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --libdir=/usr/lib" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --mandir=/usr/share/man" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --disable-debug" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-optimize" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --disable-tests" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --with-system-libevent" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --with-system-zlib" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-system-ffi" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-system-sqlite" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-libxul" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-jemalloc" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-official-branding" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --disable-updater" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-update-packaging" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-ipc" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --with-system-zlib" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --with-system-bz2" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-gstreamer" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-system-pixman" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --without-intl-api" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --disable-crashreporter" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-debug-symbols=no" >> $(MOZCONFIG) ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard echo "ac_add_options --enable-calendar" >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo 'ac_add_options --with-rpath="\\\\\\$$\\$$ORIGIN"' >> $(MOZCONFIG) ; \
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard echo "ac_add_options --enable-startup-notification" >> $(MOZCONFIG) ;
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCXXFLAGS += -Wno-invalid-offsetof -fpermissive
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCONFIGURE_ENV += PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
c1fad183c9a0deeb49586645ec9baa8f3c1bc8beDaniel BeauregardCONFIGURE_ENV += OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# If the configure options are not explicitly set, then configure fails with:
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
5dfd244acc8f144280c5bc8f69ed941185fc3cccDaniel Beauregard# invalid host type
c1fad183c9a0deeb49586645ec9baa8f3c1bc8beDaniel Beauregard# configure: warning: CXX=/usr/gcc/4.8/bin/gcc: invalid host type
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# invalid host type
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard# configure: error: can only configure for one host and one target at a time
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardCONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(CP) $(BUILD_DIR_32)/mozilla/dist/thunderbird/precomplete \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/precomplete ;
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(CP) -r $(BUILD_DIR_32)/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} ;
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard /usr/bin/tar xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard list1='$(LANG_LIST)' ; for f in $$list1 ; do \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/langpack-$$f@thunderbird.mozilla.org.xpi ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardLIB_LIST.sparc = $(PROTOUSRLIBDIR)/thunderbird-devel-$(COMPONENT_VERSION)/sdk/lib/cpu/sparcv8plus/libnspr_flt4.so
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard slist='$(LIB_LIST)' ; for f in $$slist ; do \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(MKDIR) $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard $(CP) $$f $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus/libnspr_flt4.so ; \
eb82ff87b34e625264561b2d267577cf9821dab0Daniel Beauregard '-e "/\(^TEST-PASS\).*/d" '
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += library/gnome/gnome-libs
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += library/graphics/pixman
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += library/samba/libsmbclient
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/fontconfig
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/freetype-2
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/libdbus
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += system/library/libdbus-glib
eb82ff87b34e625264561b2d267577cf9821dab0Daniel BeauregardREQUIRED_PACKAGES += x11/library/libxrender