components/desktop/thunderbird/Makefile
changeset 6431 e4667e7df088
parent 5786 5754dc3ac5eb
child 6454 dfa9a292557b
equal deleted inserted replaced
6430:74bc7531ae5a 6431:e4667e7df088
    24 #
    24 #
    25 
    25 
    26 # parfait is a bit unhappy (22527218)
    26 # parfait is a bit unhappy (22527218)
    27 export PARFAIT_BUILD=no
    27 export PARFAIT_BUILD=no
    28 
    28 
    29 COMPILER =	gcc
    29 BUILD_BITS = 32
       
    30 COMPILER = gcc
    30 
    31 
    31 include ../../../make-rules/shared-macros.mk
    32 include ../../../make-rules/shared-macros.mk
       
    33 GCC_ROOT = /usr/gcc/4.8
       
    34 
    32 
    35 
    33 COMPONENT_NAME=		thunderbird
    36 COMPONENT_NAME=		thunderbird
    34 COMPONENT_VERSION=	38.5.0
    37 COMPONENT_VERSION=	45.1.0
    35 COMPONENT_PROJECT_URL=	http://www.mozilla.com/thunderbird
    38 COMPONENT_PROJECT_URL=	http://www.mozilla.com/thunderbird
    36 COMPONENT_SRC=		comm-esr38
    39 COMPONENT_ARCHIVE = 	$(COMPONENT_SRC).source.tar.xz
    37 COMPONENT_SRC_NAME =	$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    38 COMPONENT_ARCHIVE=	$(COMPONENT_SRC_NAME).source.tar.bz2
       
    39 COMPONENT_ARCHIVE_HASH= \
    40 COMPONENT_ARCHIVE_HASH= \
    40 	sha256:7da187d4d5df17b1457bd93b584f78f5e41d2094f87c14e74ee9d8064de25d0d
    41     sha256:8ae9ebe536895d69d99f412f2b3aba645b7dd839e520959330da13892d672309
    41 MOZILLA_FTP = 		http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
    42 MOZILLA_FTP = 		http://ftp.mozilla.org/pub/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
    42 COMPONENT_ARCHIVE_URL=	$(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
    43 COMPONENT_ARCHIVE_URL=	$(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
    43 COMPONENT_BUGDB=	tbird/mailer
    44 COMPONENT_BUGDB=	tbird/mailer
    44 
    45 
    45 TPNO=			26829
    46 TPNO=			27834	
    46 
    47 
    47 LIGHTNING_VERSION=	lightning-4.0.5
    48 LIGHTNING_VERSION=	lightning-4.7.1
    48 
    49 
    49 # There are a set of .xpi files (as given in the LANG_LIST definition below)
    50 # There are a set of .xpi files (as given in the LANG_LIST definition below)
    50 # that we need. These are available under:
    51 # that we need. These are available under:
    51 # http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/31.6.0/linux-i686/xpi/
    52 # http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/31.6.0/linux-i686/xpi/
    52 # https://ftp.mozilla.org/pub/calendar/lightning/candidates/4.0.5-candidates/build1/linux-i686/
    53 # https://ftp.mozilla.org/pub/calendar/lightning/candidates/4.0.5-candidates/build1/linux-i686/
    53 # We could download and unpack them individually, but instead I've created
    54 # We could download and unpack them individually, but instead I've created
    54 # a compressed tarball of them, and made that available locally for download.
    55 # a compressed tarball of them, and made them available from the internal
       
    56 # Userland mirror. So these need to be re-created by hand each time we rev.
    55 # Downloading them individually can be a problem because firefox/thunderbird 
    57 # Downloading them individually can be a problem because firefox/thunderbird 
    56 # collide due to different files with identical .xpi names. 
    58 # collide due to different files with identical .xpi names. 
    57 COMPONENT_ARCHIVE_1 =   	$(COMPONENT_SRC_NAME)-xpi.tar.gz
    59 COMPONENT_ARCHIVE_1 =   	$(COMPONENT_SRC)-xpi.tar.gz
    58 COMPONENT_ARCHIVE_HASH_1 = \
    60 COMPONENT_ARCHIVE_HASH_1 = \
    59     sha256:eeb85b3e5ef7a97abff831f3aa895c2034cb8f039bb3383dba3a5f495e1fe93f
    61     sha256:04269456df31de93e5af4b3ee14faf108278e8a885330e3c5c3504ccfb3a6381
    60 COMPONENT_ARCHIVE_URL_1 =       $(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_1)
    62 COMPONENT_ARCHIVE_URL_1 =       $(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_1)
    61 
    63 
    62 COMPONENT_ARCHIVE_2 =		$(LIGHTNING_VERSION)-xpi.tar.gz
    64 COMPONENT_ARCHIVE_2 =		$(LIGHTNING_VERSION)-xpi.tar.gz
    63 COMPONENT_ARCHIVE_HASH_2 = \
    65 COMPONENT_ARCHIVE_HASH_2 = \
    64     sha256:96f263984b1e939215a614dea21fda479eb4babf1574141728b9dbf273067893
    66     sha256:5bab9f0f879bdae9a312c5612b089c932c0400db89346c9c38b5c41623410e75
    65 COMPONENT_ARCHIVE_URL_2 = 	$(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_2)
    67 COMPONENT_ARCHIVE_URL_2 = 	$(INTERNAL_ARCHIVE_MIRROR)/source-archives/$(COMPONENT_ARCHIVE_2)
    66 
    68 
    67 LANG_LIST = ar bg ca cs da de el es-AR es-ES et eu fi \
    69 LANG_LIST = ar bg ca cs da de el es-AR es-ES et eu fi \
    68 	fr gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl \
    70 	fr gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl \
    69 	pt-BR pt-PT ro ru sk sl sq sv-SE tr uk zh-CN zh-TW
    71 	pt-BR pt-PT ro ru sk sl sq sv-SE tr uk zh-CN zh-TW
    70 
    72 
       
    73 # Do not use Firefox patches until Firefox is updated to 45.1.1. 
       
    74 
    71 # Firefox and Thunderbird share the same firefox*.patch patches. Copy these 
    75 # Firefox and Thunderbird share the same firefox*.patch patches. Copy these 
    72 # patches from the Firefox patches directory and the Thunderbird patches to a 
    76 # patches from the Firefox patches directory and the Thunderbird patches to a 
    73 # directory of all files (patches-all), except for Firefox patches 42 and 46, 
    77 # directory of all files (patches-all), except for Firefox patches 42 and 46, 
    74 # which don't get applied in Thunderbird.
    78 # which don't get applied in Thunderbird. (libxul and dtrace patches)
    75 PATCH_DIR=patches-all
    79 #PATCH_DIR=patches-all
    76 CLEAN_PATHS += $(PATCH_DIR)
    80 #CLEAN_PATHS += $(PATCH_DIR)
    77 COPY_COMMON_FILES_1:= $(shell mkdir -p $(PATCH_DIR))
    81 #COPY_COMMON_FILES_1:= $(shell mkdir -p $(PATCH_DIR))
    78 COPY_COMMON_FILES_2:=  \
    82 #COPY_COMMON_FILES_2:=  \
    79     $(shell /usr/bin/rsync -ac patches/* ../firefox/patches/* $(PATCH_DIR))
    83 #    $(shell /usr/bin/rsync -ac patches/* ../firefox/patches/* $(PATCH_DIR))
    80 COPY_COMMON_FILES_3:= \
    84 #COPY_COMMON_FILES_3:= \
    81     $(shell /usr/bin/rm -f $(PATCH_DIR)/firefox*42*.patch $(PATCH_DIR)/firefox*46*.patch)
    85 #    $(shell /usr/bin/rm -f $(PATCH_DIR)/firefox*42*.patch $(PATCH_DIR)/firefox*46*.patch)
    82 
    86 
    83 include $(WS_MAKE_RULES)/prep.mk
    87 include $(WS_MAKE_RULES)/common.mk
    84 include $(WS_MAKE_RULES)/configure.mk
       
    85 
    88 
    86 # Depends on libsmbclient but samba is on the do-not-publish list, so this
    89 # Depends on libsmbclient but samba is on the do-not-publish list, so this
    87 # must be too.
    90 # must be too.
    88 ifeq ($(BUILD_TYPE), evaluation)
    91 ifeq ($(BUILD_TYPE), evaluation)
    89 BUILD_32=
    92 BUILD_32=
    90 INSTALL_32=
    93 INSTALL_32=
    91 PUBLISH_STAMP=
    94 PUBLISH_STAMP=
    92 endif
    95 endif
    93 
       
    94 include $(WS_MAKE_RULES)/ips.mk
       
    95 
    96 
    96 # /usr/sbin needed for dtrace.
    97 # /usr/sbin needed for dtrace.
    97 PATH =         $(dirname $(CC)):/usr/gnu/bin:/usr/bin:/usr/sbin
    98 PATH =         $(dirname $(CC)):/usr/gnu/bin:/usr/bin:/usr/sbin
    98 
    99 
    99 MOZCONFIG =	$(BUILD_DIR_32)/mozconfig
   100 MOZCONFIG =	$(BUILD_DIR_32)/mozconfig
   136 
   137 
   137 CONFIGURE_ENV +=	PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
   138 CONFIGURE_ENV +=	PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
   138 CONFIGURE_ENV +=	OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
   139 CONFIGURE_ENV +=	OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
   139 # -L.../dist/bin needs to be set otherwise it will report missing libnss3.so, 
   140 # -L.../dist/bin needs to be set otherwise it will report missing libnss3.so, 
   140 # libssl3.so, etc, while linking.
   141 # libssl3.so, etc, while linking.
   141 CONFIGURE_ENV +=	LDFLAGS="$(LD_Z_IGNORE) -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib"
   142 CONFIGURE_ENV +=	LDFLAGS="$(LD_Z_IGNORE) -z interpose -B nodirect -L$(BUILD_DIR_32)/dist/lib -L$(BUILD_DIR_32)/dist/bin"
   142 
   143 
   143 CONFIGURE_ENV +=	MOZCONFIG=$(MOZCONFIG)
   144 CONFIGURE_ENV +=	MOZCONFIG=$(MOZCONFIG)
   144 CONFIGURE_ENV +=	"CC=$(CC)"
   145 CONFIGURE_ENV +=	"CC=$(CC)"
   145 CONFIGURE_ENV +=	"CXX=$(CXX)"
   146 CONFIGURE_ENV +=	"CXX=$(CXX)"
   146 CONFIGURE_ENV += 	"CFLAGS=$(CFLAGS)"
   147 CONFIGURE_ENV += 	"CFLAGS=$(CFLAGS)"
   162         (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
   163         (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
   163                 $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
   164                 $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
   164 
   165 
   165 # Path to lightning extension directory
   166 # Path to lightning extension directory
   166 LIGHTNING_EXT_DIR = \
   167 LIGHTNING_EXT_DIR = \
   167 	$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
   168 	$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}
   168 
   169 
   169 COMPONENT_POST_INSTALL_ACTION += \
   170 COMPONENT_POST_INSTALL_ACTION += \
   170 	$(CP) -r $(BUILD_DIR_32)/dist/bin/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
   171 	$(CP) -r $(BUILD_DIR_32)/dist/bin/distribution/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/* \
   171 		$(LIGHTNING_EXT_DIR) ;
   172 		$(LIGHTNING_EXT_DIR) ;
   172 
   173 
   173 COMPONENT_POST_INSTALL_ACTION += \
   174 COMPONENT_POST_INSTALL_ACTION += \
   174         $(RM) -rf xpi ; \
   175         $(RM) -rf xpi ; \
   175         /usr/bin/tar xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
   176         $(TAR) xvf $(COMPONENT_ARCHIVE_1) > /dev/null 2>&1 ; \
   176 	/usr/bin/tar xvf $(COMPONENT_ARCHIVE_2) > /dev/null 2>&1 ; \
   177 	$(TAR) xvf $(COMPONENT_ARCHIVE_2) > /dev/null 2>&1 ; \
   177         list1='$(LANG_LIST)' ; for f in $$list1 ; do \
   178         list1='$(LANG_LIST)' ; for f in $$list1 ; do \
   178             $(CP) xpi/$$f.xpi \
   179             $(CP) xpi/$$f.xpi \
   179                 $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/[email protected] ; \
   180                 $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/distribution/extensions/[email protected] ; \
   180 	    unzip xpi-lightning/$(LIGHTNING_VERSION).$$f.linux-i686.xpi \
   181 	    unzip xpi-lightning/$(LIGHTNING_VERSION).$$f.linux-i686.xpi \
   181 		chrome/calendar-$$f/\* chrome/lightning-$$f/\* -d \
   182 		chrome/calendar-$$f/\* chrome/lightning-$$f/\* -d \
   182 		    $(LIGHTNING_EXT_DIR)/ ; \
   183 		    $(LIGHTNING_EXT_DIR)/ ; \
   183 	    echo 'locale calendar '$$f' chrome/calendar-'$$f'/locale/'$$f'/calendar/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
   184 	    echo 'locale calendar '$$f' chrome/calendar-'$$f'/locale/'$$f'/calendar/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
   184 	    echo 'locale lightning '$$f' chrome/lightning-'$$f'/locale/'$$f'/lightning/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
   185 	    echo 'locale lightning '$$f' chrome/lightning-'$$f'/locale/'$$f'/lightning/' >> $(LIGHTNING_EXT_DIR)/chrome.manifest ; \
   199 COMPONENT_TEST_DIR =    $(@D)/js/src
   200 COMPONENT_TEST_DIR =    $(@D)/js/src
   200 COMPONENT_TEST_TARGETS=check-jit-test
   201 COMPONENT_TEST_TARGETS=check-jit-test
   201 COMPONENT_TEST_TRANSFORMS += \
   202 COMPONENT_TEST_TRANSFORMS += \
   202         '-e "/\(^TEST-PASS\).*/d" '
   203         '-e "/\(^TEST-PASS\).*/d" '
   203 
   204 
       
   205 # Do not use firefox patches until firefox is update to 45.1.1.
   204 $(SOURCE_DIR)/.patched-firefox-%: GPATCH_FLAGS += -d $(@D)/mozilla
   206 $(SOURCE_DIR)/.patched-firefox-%: GPATCH_FLAGS += -d $(@D)/mozilla
   205 
       
   206 configure:	$(CONFIGURE_32)
       
   207 
       
   208 build:          $(BUILD_32)
       
   209 
       
   210 install:        $(INSTALL_32)
       
   211 
       
   212 test:           $(TEST_32)
       
   213 
       
   214 system-test:    $(NO_TESTS)
       
   215 
   207 
   216 REQUIRED_PACKAGES += compress/bzip2
   208 REQUIRED_PACKAGES += compress/bzip2
   217 REQUIRED_PACKAGES += database/sqlite-3
   209 REQUIRED_PACKAGES += database/sqlite-3
   218 REQUIRED_PACKAGES += library/desktop/atk
   210 REQUIRED_PACKAGES += library/desktop/atk
   219 REQUIRED_PACKAGES += library/desktop/cairo
   211 REQUIRED_PACKAGES += library/desktop/cairo