diff options
-rw-r--r-- | .SRCINFO | 35 | ||||
-rw-r--r-- | PKGBUILD | 126 | ||||
-rw-r--r-- | fix-wifi-scanner.diff | 16 | ||||
-rw-r--r-- | no-crmf.diff | 39 | ||||
-rw-r--r-- | rust-i686.patch | 16 | ||||
-rw-r--r-- | thunderbird-hg.desktop | 8 | ||||
-rw-r--r-- | thunderbird-install-dir.patch | 12 |
7 files changed, 167 insertions, 85 deletions
@@ -19,17 +19,11 @@ pkgbase = thunderbird-hg makedepends = gconf makedepends = libpulse makedepends = inetutils - makedepends = mercurial - makedepends = rustup - makedepends = python2-appdirs - makedepends = python2-packaging - makedepends = python2-pyparsing - makedepends = python2-six - makedepends = autoconf2.13 - makedepends = python2-setuptools - makedepends = gst-libav makedepends = xorg-server-xvfb - makedepends = uuid + makedepends = autoconf2.13 + makedepends = cargo + makedepends = mercurial + depends = gtk3 depends = gtk2 depends = mozilla-common depends = libxt @@ -37,25 +31,28 @@ pkgbase = thunderbird-hg depends = mime-types depends = dbus-glib depends = alsa-lib - depends = libvpx - depends = libevent - depends = nss>=3.30 + depends = ffmpeg + depends = nss depends = hunspell depends = sqlite depends = ttf-font depends = icu - depends = gtk3 - depends = gst-libav - depends = gst-plugins-base-libs - depends = gst-plugins-good - depends = networkmanager + depends = libvpx optdepends = libcanberra: for sound support options = !emptydirs options = !makeflags source = hg+http://hg.mozilla.org/comm-central source = thunderbird-hg.desktop + source = thunderbird-install-dir.patch + source = no-crmf.diff + source = rust-i686.patch + source = fix-wifi-scanner.diff sha512sums = SKIP - sha512sums = 52d5706996e6a511fc7bc15cdf2d68888c1ddd674719dacdc10a0604dc97f159a203a051b9c2ba98536486f108fa0b74c319300ad26d5e1312bdb1f456aed788 + sha512sums = 5d17bcbda0ca96133f7241a3fb371ba2863f3e67b12d770803e0bc7bb4b3254fc9dc6f78bd8310303abf9b2c62eb1321e63610eb9328c1b9a7b73fde671bc34a + sha512sums = 8100fd3ea37d998905498d41c8504bfdd6d86766542d6b93107c92382a7525da7f75a83f8ff1e15ad95039d51da2add7e6b18af76d45516a41cdfd1e9f98f262 + sha512sums = 08572139508d4fd4e2b855d294ebee3286151da80dfeae656ae29b49ce6d72185f4cfa73dfb827c1bcce6bc8c544d0cf4a00164c9059dff316351901601fb6ea + sha512sums = b38d8a2cb1719d652d93160bfbdfa7cbeca36fbee84b217ca0f5b0b4074b6e151c582b1e0f62901c418fb68a5018f6e21d734d6775836da5b0b44593071c3351 + sha512sums = 1bd2804bea1fe8c85b602f8c5f8777f4ba470c9e767ad284cb3d0287c6d6e1b126e760738d7c671f38933ee3ec6b8931186df8e978995b5109797ae86dfdd85a pkgname = thunderbird-hg @@ -8,21 +8,25 @@ pkgdesc="Standalone mail and news reader from mozilla.org - Mercurial version" arch=(i686 x86_64) license=(MPL GPL LGPL) url="https://www.mozilla.org/thunderbird/" -depends=(gtk2 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib - libvpx libevent 'nss>=3.30' hunspell sqlite ttf-font icu gtk3 gst-libav - gst-plugins-base-libs gst-plugins-good networkmanager) -makedepends=(unzip zip diffutils python2 yasm mesa imake gconf libpulse inetutils - mercurial rustup python2-appdirs python2-packaging python2-pyparsing - python2-six autoconf2.13 python2-setuptools gst-libav xorg-server-xvfb - uuid) +depends=(gtk3 gtk2 mozilla-common libxt startup-notification mime-types dbus-glib alsa-lib ffmpeg + nss hunspell sqlite ttf-font icu libvpx) +makedepends=(unzip zip diffutils python2 yasm mesa imake gconf libpulse inetutils xorg-server-xvfb + autoconf2.13 cargo mercurial) optdepends=('libcanberra: for sound support') options=(!emptydirs !makeflags) install=$pkgname.install -options=('!emptydirs' '!makeflags') source=(hg+http://hg.mozilla.org/comm-central - thunderbird-hg.desktop) + $pkgname.desktop + thunderbird-install-dir.patch + no-crmf.diff + rust-i686.patch + fix-wifi-scanner.diff) sha512sums=('SKIP' - '52d5706996e6a511fc7bc15cdf2d68888c1ddd674719dacdc10a0604dc97f159a203a051b9c2ba98536486f108fa0b74c319300ad26d5e1312bdb1f456aed788') + '5d17bcbda0ca96133f7241a3fb371ba2863f3e67b12d770803e0bc7bb4b3254fc9dc6f78bd8310303abf9b2c62eb1321e63610eb9328c1b9a7b73fde671bc34a' + '8100fd3ea37d998905498d41c8504bfdd6d86766542d6b93107c92382a7525da7f75a83f8ff1e15ad95039d51da2add7e6b18af76d45516a41cdfd1e9f98f262' + '08572139508d4fd4e2b855d294ebee3286151da80dfeae656ae29b49ce6d72185f4cfa73dfb827c1bcce6bc8c544d0cf4a00164c9059dff316351901601fb6ea' + 'b38d8a2cb1719d652d93160bfbdfa7cbeca36fbee84b217ca0f5b0b4074b6e151c582b1e0f62901c418fb68a5018f6e21d734d6775836da5b0b44593071c3351' + '1bd2804bea1fe8c85b602f8c5f8777f4ba470c9e767ad284cb3d0287c6d6e1b126e760738d7c671f38933ee3ec6b8931186df8e978995b5109797ae86dfdd85a') _hgrepo="comm-central" # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) @@ -48,22 +52,39 @@ prepare() { msg2 "Syncing local copy..." python2 client.py checkout + msg2 "thunderbird-install-dir.patch" + patch -Np1 -i ../thunderbird-install-dir.patch + + msg2 "no-crmf.diff: https://bugzilla.mozilla.org/show_bug.cgi?id=1371991" + patch -Np1 -i ../no-crmf.diff + + msg2 "fix-wifi-scanner.diff: https://bugzilla.mozilla.org/show_bug.cgi?id=1314968" + patch -d mozilla -Np1 < ../fix-wifi-scanner.diff + + msg2 "Build with the rust targets we actually ship" + patch -d mozilla -Np1 < ../rust-i686.patch + # API keys - echo -n "$_google_api_key" > google-api-key - echo -n "$_mozilla_api_key" > mozilla-api-key + echo -n "$_google_api_key" >google-api-key + echo -n "$_mozilla_api_key" >mozilla-api-key # mozconfig - cat >.mozconfig <<END + cat > .mozconfig <<END ac_add_options --enable-application=mail +ac_add_options --enable-calendar -ac_add_options --prefix=/usr -ac_add_options --libdir=/opt/ +ac_add_options --prefix=/opt +ac_add_options --libdir=/opt ac_add_options --enable-release ac_add_options --enable-gold ac_add_options --enable-pie +ac_add_options --enable-optimize="-O2" +ac_add_options --enable-rust # Branding ac_add_options --enable-official-branding +ac_add_options --enable-update-channel=nightly +ac_add_options --with-distribution-id=org.archlinux # Keys ac_add_options --with-google-api-keyfile=${PWD@Q}/google-api-key @@ -76,7 +97,6 @@ ac_add_options --with-system-icu ac_add_options --with-system-jpeg ac_add_options --with-system-zlib ac_add_options --with-system-bz2 -ac_add_options --with-system-libevent ac_add_options --with-system-libvpx ac_add_options --enable-system-hunspell ac_add_options --enable-system-sqlite @@ -86,6 +106,7 @@ ac_add_options --enable-system-pixman # Features ac_add_options --enable-startup-notification ac_add_options --disable-crashreporter +ac_add_options --enable-alsa ac_add_options --disable-updater ac_add_options --disable-tests ### ac_add_options --disable-debug-symbols ### @@ -109,58 +130,27 @@ build() { # Hardening LDFLAGS+=" -Wl,-z,now" - # GCC 6 - CXXFLAGS+=" -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2" - # Export build path export PATH="$srcdir/path:$PATH" - # Set up Rust - if [[ $(rustup show) =~ "no active toolchain" ]]; then - msg2 "Setting default Rust Toolchain (stable)" - rustup default stable - fi + # Do PGO + #xvfb-run -a -n 95 -s "-extension GLX -screen 0 1280x1024x24" \ + # make -f client.mk build MOZ_PGO=1 # Build msg2 "Running make -f client.mk build.." - # make -f client.mk profiledbuild make -f client.mk build - -# msg2 "Running mach bootstrap.." -# mozilla/mach bootstrap -# -# msg2 "Running mach build.." -# mozilla/mach build - #obj-.../dist/bin/thunderbird } package() { - # cd $_hgrepo/obj-* - - # # Put together - # msg2 "Running make package.." - # make package - - # # Install - # msg2 "Moving stuff in place..." - # cd dist - # tar -xf thunderbird-*.tar.bz2 - # cp -r thunderbird/ "$pkgdir"/opt/$pkgname-r$pkgver/ - - # # /usr/bin symlink - # ln -sf /opt/$pkgname-r$pkgver/thunderbird "$pkgdir"/usr/bin/$pkgname - cd $_hgrepo # Install msg2 "Running make -f client.mk install.." make -f client.mk DESTDIR="$pkgdir" INSTALL_SDK= install - # Rename dir - mv "$pkgdir"/opt/thunderbird/ "$pkgdir"/opt/thunderbird-hg/ - # vendor.js - _vendorjs="$pkgdir/opt/thunderbird-hg/defaults/preferences/vendor.js" + _vendorjs="$pkgdir/opt/$pkgname/defaults/preferences/vendor.js" install -Dm644 /dev/stdin "$_vendorjs" <<END // Use LANG environment variable to choose locale pref("intl.locale.matchOS", true); @@ -173,29 +163,41 @@ pref("extensions.autoDisableScopes", 11); pref("extensions.shownSelectionUI", true); END + _distini="$pkgdir/usr/lib/$pkgname/distribution/distribution.ini" + install -Dm644 /dev/stdin "$_distini" <<END +[Global] +id=archlinux +version=1.0 +about=Mozilla Thunderbird for Arch Linux + +[Preferences] +app.distributor=archlinux +app.distributor.channel=$pkgname +app.partner.archlinux=archlinux +END + # Icons for i in 16 22 24 32 48 256; do install -Dm644 other-licenses/branding/thunderbird/mailicon$i.png \ - "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird-hg.png" + "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/$pkgname.png" done - # Desktop - install -Dm644 ../thunderbird-hg.desktop \ - "$pkgdir/usr/share/applications/thunderbird-hg.desktop" + install -Dm644 ../$pkgname.desktop \ + "$pkgdir/usr/share/applications/$pkgname.desktop" # Use system-provided dictionaries - rm -r "$pkgdir"/opt/thunderbird-hg/dictionaries - ln -Ts /usr/share/hunspell "$pkgdir/opt/thunderbird-hg/dictionaries" - ln -Ts /usr/share/hyphen "$pkgdir/opt/thunderbird-hg/hyphenation" + rm -r "$pkgdir"/opt/$pkgname/dictionaries + ln -Ts /usr/share/hunspell "$pkgdir/opt/$pkgname/dictionaries" + ln -Ts /usr/share/hyphen "$pkgdir/opt/$pkgname/hyphenation" # Install a wrapper to avoid confusion about binary path - install -Dm755 /dev/stdin "$pkgdir/usr/bin/thunderbird-hg" <<END + install -Dm755 /dev/stdin "$pkgdir/usr/bin/$pkgname" <<END #!/bin/sh -exec /opt/thunderbird-hg/thunderbird "\$@" +exec /opt/$pkgname/thunderbird "\$@" END # Replace duplicate binary with wrapper # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 - ln -srf "$pkgdir/usr/bin/thunderbird-hg" \ - "$pkgdir/opt/thunderbird-hg/thunderbird-bin" + ln -srf "$pkgdir/usr/bin/$pkgname" \ + "$pkgdir/opt/$pkgname/thunderbird-bin" } diff --git a/fix-wifi-scanner.diff b/fix-wifi-scanner.diff new file mode 100644 index 000000000000..f8fdd6c42142 --- /dev/null +++ b/fix-wifi-scanner.diff @@ -0,0 +1,16 @@ + netwerk/wifi/nsWifiScannerDBus.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git c/netwerk/wifi/nsWifiScannerDBus.cpp i/netwerk/wifi/nsWifiScannerDBus.cpp +index 182553e18fa6e104..6fa0a0b023d3e45f 100644 +--- c/netwerk/wifi/nsWifiScannerDBus.cpp ++++ i/netwerk/wifi/nsWifiScannerDBus.cpp +@@ -62,7 +62,7 @@ nsWifiScannerDBus::SendMessage(const char* aInterface, + return NS_ERROR_FAILURE; + } + } else if (!strcmp(aFuncCall, "GetAll")) { +- const char* param = ""; ++ const char* param = "org.freedesktop.NetworkManager.AccessPoint"; + if (!dbus_message_iter_append_basic(&argsIter, DBUS_TYPE_STRING, ¶m)) { + return NS_ERROR_FAILURE; + } diff --git a/no-crmf.diff b/no-crmf.diff new file mode 100644 index 000000000000..73e545de0eed --- /dev/null +++ b/no-crmf.diff @@ -0,0 +1,39 @@ +diff -u -rN thunderbird-52.1.1/mozilla/config/external/nss/crmf/moz.build thunderbird-52.1.1-nocrmf/mozilla/config/external/nss/crmf/moz.build +--- thunderbird-52.1.1/mozilla/config/external/nss/crmf/moz.build 2017-05-09 23:35:13.000000000 +0200 ++++ thunderbird-52.1.1-nocrmf/mozilla/config/external/nss/crmf/moz.build 2017-06-14 01:51:36.686773132 +0200 +@@ -8,7 +8,6 @@ + + if CONFIG['MOZ_SYSTEM_NSS']: + OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')] +- OS_LIBS += ['-lcrmf'] + else: + USE_LIBS += [ + # The dependency on nss is not real, but is required to force the +diff -u -rN thunderbird-52.1.1/mozilla/old-configure thunderbird-52.1.1-nocrmf/mozilla/old-configure +--- thunderbird-52.1.1/mozilla/old-configure 2017-05-09 23:35:35.000000000 +0200 ++++ thunderbird-52.1.1-nocrmf/mozilla/old-configure 2017-06-14 01:50:28.726873231 +0200 +@@ -10692,9 +10692,7 @@ + + fi + +-if test -n "$MOZ_SYSTEM_NSS"; then +- NSS_LIBS="$NSS_LIBS -lcrmf" +-else ++if test -z "$MOZ_SYSTEM_NSS"; then + NSS_CFLAGS="-I${DIST}/include/nss" + fi + +diff -u -rN thunderbird-52.1.1/mozilla/old-configure.in thunderbird-52.1.1-nocrmf/mozilla/old-configure.in +--- thunderbird-52.1.1/mozilla/old-configure.in 2017-05-09 23:35:22.000000000 +0200 ++++ thunderbird-52.1.1-nocrmf/mozilla/old-configure.in 2017-06-14 01:50:50.953507079 +0200 +@@ -2126,9 +2126,7 @@ + AM_PATH_NSS(3.28.4, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])]) + fi + +-if test -n "$MOZ_SYSTEM_NSS"; then +- NSS_LIBS="$NSS_LIBS -lcrmf" +-else ++if test -z "$MOZ_SYSTEM_NSS"; then + NSS_CFLAGS="-I${DIST}/include/nss" + fi + diff --git a/rust-i686.patch b/rust-i686.patch new file mode 100644 index 000000000000..85512e1436b8 --- /dev/null +++ b/rust-i686.patch @@ -0,0 +1,16 @@ + build/moz.configure/rust.configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git c/build/moz.configure/rust.configure i/build/moz.configure/rust.configure +index cd86b24153debb1b..44911715e25d95e3 100644 +--- c/build/moz.configure/rust.configure ++++ i/build/moz.configure/rust.configure +@@ -81,7 +81,7 @@ def rust_target(rust_compiler, rustc, target, cross_compiling): + # OpenBSD + ('x86_64', 'OpenBSD'): 'x86_64-unknown-openbsd', + # Linux +- ('x86', 'Linux'): 'i586-unknown-linux-gnu', ++ ('x86', 'Linux'): 'i686-unknown-linux-gnu', + # Linux + ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', + # OS X and iOS diff --git a/thunderbird-hg.desktop b/thunderbird-hg.desktop index 744242f7f4a1..05db7e3cc947 100644 --- a/thunderbird-hg.desktop +++ b/thunderbird-hg.desktop @@ -28,7 +28,7 @@ Comment[uk]=Читання та написання листів Comment[vi]=Đọc và soạn thư điện tử Comment[zh_CN]=阅读邮件或新闻 Comment[zh_TW]=以 Mozilla Thunderbird 讀寫郵件或新聞 -GenericName=Mail Client +GenericName=Mail Client (Mercurial version) GenericName[ast]=Client de correu GenericName[ca]=Client de correu GenericName[cs]=Poštovní klient @@ -55,7 +55,7 @@ GenericName[uk]=Поштова програма GenericName[vi]=Phần mềm khách quản lý thư điện tử GenericName[zh_CN]=邮件新闻客户端 GenericName[zh_TW]=郵件用戶端 -Exec=thunderbird-hg %u +Exec=/opt/thunderbird-hg/thunderbird %u Terminal=false Type=Application Icon=thunderbird-hg @@ -116,7 +116,7 @@ Name[uk]=Написати нового листа Name[vi]=Viết thư mới Name[zh_CN]=编写新消息 Name[zh_TW]=寫一封新訊息 -Exec=thunderbird-hg -compose +Exec=/opt/thunderbird-hg/thunderbird -compose [Desktop Action OpenAddressBook] Name=Open address book @@ -170,4 +170,4 @@ Name[uk]=Відкрити адресну книгу Name[vi]=Mở sổ địa chỉ Name[zh_CN]=打开通讯录 Name[zh_TW]=開啟通訊錄 -Exec=thunderbird-hg -addressbook +Exec=/opt/thunderbird-hg/thunderbird -addressbook diff --git a/thunderbird-install-dir.patch b/thunderbird-install-dir.patch new file mode 100644 index 000000000000..f8ebdc1ff924 --- /dev/null +++ b/thunderbird-install-dir.patch @@ -0,0 +1,12 @@ +diff -upr comm-esr31.orig/mozilla/config/baseconfig.mk comm-esr31/mozilla/config/baseconfig.mk +--- comm-esr31.orig/mozilla/config/baseconfig.mk 2014-07-22 09:44:22.000000000 +0300 ++++ comm-esr31/mozilla/config/baseconfig.mk 2014-07-22 09:46:45.000000000 +0300 +@@ -4,7 +4,7 @@ + # whether a normal build is happening or whether the check is running. + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME)-beta + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + ifndef TOP_DIST + TOP_DIST = dist |