summaryrefslogblamecommitdiff
path: root/user/thunderbird/APKBUILD
blob: ec73faaddde6258d8a62d17ba0ee57f482e818fb (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                 
              
        
                                   
                                  
                       

                                  




                        

                                                                     
 
                                                                         
                                                                  
 



                                                                
         
                                                                                                             
                 
 
                             
                      
                              
                             
                             

                       
                               
                            
                                
                       

                                           
                        
                             
                          
                               
                                    
                       
 




                           




                               
 

              
                      



                     

                     





                     





                      
 

                       



                                                                                    


                                                                                 
                               

                                                                                         


                                                                                             
            


         


                                 
                                  
                                       


                                                                              






                                                               




                                                          





                                          


                                                                                          


           
                                       



                                                         
 





                                                                                        
 



                                                                                 

 

                                                                                                                                                                               
                                                                                                                                                       
                                                                                                                                                
                                                                                                                                                        

                                                                                                                                                       

                                                                                                                                                 
                                                                                                                                                         
                                                                                                                                                      
                                                                                                                                                          
                                                                                                                                                 

                                                                                                                                                                     
                                                                                                                                                  
                                                                                                                                                       
                                                                                                                                                    
                                                                                                                                                         
                                                                                                                                                              
                                                                                                                                                 
                                                                                                                                                      
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=thunderbird
pkgver=91.13.0
pkgrel=2
pkgdesc="Email client from Mozilla"
url="https://www.thunderbird.net/"
arch="all !ppc"  # #837
options="!check"  # Tests disabled
license="MPL-2.0"
depends=""
# moz build system stuff
# system-libs
# actual deps
makedepends="
	autoconf2.13 cargo cbindgen clang llvm14-dev node ncurses-dev
	perl python3 rust cmd:which

	alsa-lib-dev bzip2-dev icu-dev libevent-dev libffi-dev libpng-dev
	libjpeg-turbo-dev nspr-dev nss-dev pulseaudio-dev zlib-dev

	dbus-glib-dev fts-dev gconf-dev gtk+3.0-dev hunspell-dev
	libnotify-dev libsm-dev libxcomposite-dev libxdamage-dev
	libxrender-dev libxt-dev nasm nss-static sqlite-dev
	startup-notification-dev unzip yasm zip gtk+2.0-dev
	"
source="https://archive.mozilla.org/pub/thunderbird/releases/$pkgver/source/thunderbird-$pkgver.source.tar.xz
	mozconfig

	bad-google-code.patch
	BTS-1074.patch
	disable-arm-flac.patch
	fix-mutex-build.patch
	fix-seccomp-bpf.patch
	gcc89074.patch
	jpeg-link.patch
	mozilla-build-arm.patch
	newer-cbindgen.patch
	pmmx-double-format.patch
	ppc32-fix.patch
	python3.11-open-U.patch
	python3.11-regex-inline-flags.patch
	rust-32bit.patch
	shut-up-warning.patch
	skia-unified.patch
	stackwalk-x86-ppc.patch
	triplet-vendor-support.patch
	webrender.patch

	thunderbird.desktop
	"
somask="liblgpllibs.so
	libmozgtk.so
	libmozsandbox.so
	libmozsqlite3.so
	libxul.so
	"
_mozappdir=/usr/lib/thunderbird
ldpath="$_mozappdir"

# secfixes:
#   68.6.0-r0:
#     - CVE-2019-20503
#     - CVE-2020-6805
#     - CVE-2020-6806
#     - CVE-2020-6807
#     - CVE-2020-6811
#     - CVE-2020-6812
#     - CVE-2020-6814
#   68.7.0-r0:
#     - CVE-2020-6819
#     - CVE-2020-6820
#     - CVE-2020-6821
#     - CVE-2020-6822
#     - CVE-2020-6825
#   68.9.0-r0:
#     - CVE-2020-6831
#     - CVE-2020-12387
#     - CVE-2020-12392
#     - CVE-2020-12395
#     - CVE-2020-12397

prepare() {
	default_prepare
	cp "$srcdir"/mozconfig "$builddir"/mozconfig
	echo "ac_add_options --enable-optimize=\"$CFLAGS\"" >> "$builddir"/mozconfig
	echo "ac_add_options --host=\"$CHOST\"" >> "$builddir"/mozconfig
	echo "ac_add_options --target=\"$CTARGET\"" >> "$builddir"/mozconfig
	echo "mk_add_options MOZ_MAKE_FLAGS=\"-j$JOBS\"" >> "$builddir"/mozconfig

	case "$CARCH" in
		pmmx|x86*|arm*)
			echo "ac_add_options --disable-elf-hack" >> "$builddir"/mozconfig
			;;
		s390x)
			echo "ac_add_options --disable-startupcache" >> "$builddir"/mozconfig
			;;
	esac
}

build() {
	export SHELL=/bin/sh
	export BUILD_OFFICIAL=1
	export MOZILLA_OFFICIAL=1
	export USE_SHORT_LIBNAME=1
	export MACH_USE_SYSTEM_PYTHON=1
	# gcc 6
	export CXXFLAGS="-fno-delete-null-pointer-checks -fno-schedule-insns2"

	case "${CARCH}" in
		armv7)
			# 32-bit memory ceiling, #1012
			LDFLAGS="${LDFLAGS} -Wl,--strip-debug";
			;;
	esac

	# set rpath so linker finds the libs
	export LDFLAGS="$LDFLAGS -Wl,-rpath,${_mozappdir}"

	export UNIXCONFDIR="$srcdir"

	./mach build
}

run() {
	cd "$builddir"/obj-$CHOST/dist/bin
	export LD_LIBRARY_PATH=.
	export PROFILE_DIR="$builddir"/obj-$CHOST/tmp/profile-default
	[ -d $PROFILE_DIR ] || ./thunderbird -no-remote -CreateProfile "Test $PROFILE_DIR"
	./thunderbird -no-remote -profile $PROFILE_DIR
}

package() {
	export MACH_USE_SYSTEM_PYTHON=1
	DESTDIR="$pkgdir" ./mach install

	install -m755 -d ${pkgdir}/usr/share/applications
	install -m755 -d ${pkgdir}/usr/share/pixmaps

	for png in comm/mail/branding/thunderbird/default*.png; do
		local i="${_png%.png}"
		i=${i##*/default}
		install -D -m644 "$png" \
			"$pkgdir"/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png
	done

	install -m644 "$builddir"/comm/mail/branding/thunderbird/default256.png \
		${pkgdir}/usr/share/pixmaps/thunderbird.png
	install -m644 ${startdir}/thunderbird.desktop \
		${pkgdir}/usr/share/applications/thunderbird.desktop
}

sha512sums="e73d3db4333ad659ec1ab249bd261e8c28301c125d0c39b473c83f8fccace6d4916a2bfef14fc20c065055ff6bbd3ca618b5aab178241b53509543640dcd541a  thunderbird-91.13.0.source.tar.xz
afc87cdd19500f8b6b0bedabe98339cca9e6af86edb45e673c6ee0a49bdb3a48b1816f6f5f8790cab86cca428ab7f142cbeb6462079fe293f5f13563a7761896  mozconfig
ace7492f4fb0523c7340fdc09c831906f74fddad93822aff367135538dacd3f56288b907f5a04f53f94c76e722ba0bab73e28d83ec12d3e672554712e6b08613  bad-google-code.patch
df76bae9deaaae98afa9e1e853de5d41a4f84db65057bfe70de3ae172515bdef58a5f9ee0b2303493dc67e9a6aad54af4c9931166de1144737a5867f24b51a4f  BTS-1074.patch
b44c55fb38b856791dd6966c5af24b657c0516d4f747fc0595eb470f58aa4b6e28c4304892589c6f9d623daba2e0fadc338303da409c4542a98d369339438ebe  disable-arm-flac.patch
c0b2bf43206c2a5154e560ef30189a1062ae856861b39f52ce69002390ff9972d43e387bfd2bf8d2ab3cac621987bc042c8c0a8b4cf90ae05717ca7705271880  fix-mutex-build.patch
70863b985427b9653ce5e28d6064f078fb6d4ccf43dd1b68e72f97f44868fc0ce063161c39a4e77a0a1a207b7365d5dc7a7ca5e68c726825eba814f2b93e2f5d  fix-seccomp-bpf.patch
6eb7fb134760f5d232710c56f18f14de4f533e41e269531edd01f5650f6d641513e34a8d2294af5ad6fd184736f674c734efb4cc003636a75e14a8fdba2fe3b0  gcc89074.patch
240d6c9290a20e2c9ccfa2d15c9a636fc1b09b62f09285eb688974d888390da2a84271f14c397570b58ccdcf29b99370f7183cc0dbbbe581bf6e7d7ee8dcabd2  jpeg-link.patch
e61664bc93eadce5016a06a4d0684b34a05074f1815e88ef2613380d7b369c6fd305fb34f83b5eb18b9e3138273ea8ddcfdcb1084fdcaa922a1e5b30146a3b18  mozilla-build-arm.patch
eb158bf2e4b9d513ae36f3c977a3b110ea8c4801c3c94841bc3ad4cdca3bdfc96d4a662e5a2e662fe7a01b0f1af097280097b16f5d0e83d29b4a7e6cbb8c7396  newer-cbindgen.patch
573b90c73512d2b9971e466b138ffeea94b28f9a20e11e75ee1121e3f6a14fb4bf1a30622da6d48f67e5ea0bc58b200ba5fc3e930bae52f83b2f25f6c10806dd  pmmx-double-format.patch
06a3f4ee6d3726adf3460952fcbaaf24bb15ef8d15b3357fdd1766c7a62b00bd53a1e943b5df7f4e1a69f4fae0d44b64fae1e027d7812499c77894975969ea10  ppc32-fix.patch
07c311921e50fdb86c587000418306292548117f32a69b78db9d8ebd3a1b08196774a3d284b7e2898a2f1fbb9987b2367092f33957824514fd3d7c7b618a83e2  python3.11-open-U.patch
c9c5610b99e73a1eedd3510e73921cba84f8c6d0c58fc7fe5b4a7ec261bd5fe530560856fba46d6b37f84c6e467d5b43946968dc8230b5491bba976b0b5ae33c  python3.11-regex-inline-flags.patch
153f955169e1489d49867be90f68e8a4722cad8edb3a9d1ddb6161e34399e1b4e9e82dc8d72aaba1d5f585bca7c4852433e8ecb068be1583df7155c7cce0223b  rust-32bit.patch
39ddb15d1453a8412275c36fc8db3befc69dffd4a362e932d280fb7fd1190db595a2af9b468ee49e0714f5e9df6e48eb5794122a64fa9f30d689de8693acbb15  shut-up-warning.patch
961fa1c856e97e4d08da4682f520ecf23075571a532a781c5e14dbec4915130b02a8199caf6602013ea904d347c4f06d086b0fe84a3850dd6910d351232da599  skia-unified.patch
452b47b825294779f98ed46bc1065dad76b79ff453521ef049934a120f349c84a1c863b16af1828fe053059823da9690ec917c055ae02dcc5c80c54cad732448  stackwalk-x86-ppc.patch
8c6160975f181ea0ab257134672e696d895b99c7bb00a260deedb38e3374510e848bf943197e0ab7f684a18496a898175159845b0e7325183c37748183418053  triplet-vendor-support.patch
b7c1ac21cd03b7cdc887e005ed970cf13ff95643c7651decf1e6d42094cda6a0464dc2ba3cded3827f6d0f3682c2c9b081a7667f386133aa6e3072d0464e72e8  webrender.patch
95a2b1deb4f6c90750fdd2bfe8ca0a7879a5b267965091705a6beb0a0a4b1ccad75d11df7b9885543ca4232ff704e975c6946f4c11804cb71c471e06f9576001  thunderbird.desktop"