Fix build for rust 1.29

This commit is contained in:
Figue 2018-09-15 23:10:48 +02:00
parent d4911bb556
commit dfa7cd96e5
3 changed files with 49 additions and 10 deletions

View file

@ -1,7 +1,7 @@
pkgbase = icecat
pkgdesc = GNU version of the Firefox browser.
pkgver = 60.2.0
pkgrel = 1
pkgrel = 2
url = http://www.gnu.org/software/gnuzilla/
arch = i686
arch = x86_64
@ -41,15 +41,18 @@ pkgbase = icecat
optdepends = libnotify: Notification integration
optdepends = pulseaudio: Audio support
optdepends = speech-dispatcher: Text-to-Speech
optdepends = clang
source = http://alpha.gnu.org/gnu/gnuzilla/60.2.0/icecat-60.2.0-gnu1.tar.bz2
source = http://alpha.gnu.org/gnu/gnuzilla/60.2.0/icecat-60.2.0-gnu1.tar.bz2.sig
source = icecat.desktop
source = icecat-safe.desktop
source = 0000-rust-1.29.patch
validpgpkeys = A57369A8BABC2542B5A0368C3C76EED7D7E04784
sha256sums = f40746f1c44b4ae3e5ae6da9d30efbdb78abb9d37864097320a9849ece3b1d53
sha256sums = SKIP
sha256sums = c44eab35f71dd3028a74632463710d674b2e8a0682e5e887535e3233a3b7bbb3
sha256sums = 190577ad917bccfc89a9bcafbc331521f551b6f54e190bb6216eada48dcb1303
sha256sums = ce243b1e835651723d2186709fcd5218ad050ff56550c3ef25e23c718a69497b
pkgname = icecat

36
0000-rust-1.29.patch Normal file
View file

@ -0,0 +1,36 @@
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -587,17 +587,26 @@ option('--target', nargs=1,
@imports(_from='__builtin__', _import='KeyError')
@imports(_from='__builtin__', _import='ValueError')
def split_triplet(triplet, allow_unknown=False):
# The standard triplet is defined as
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# There is also a quartet form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# But we can consider the "KERNEL-OPERATING_SYSTEM" as one.
- cpu, manufacturer, os = triplet.split('-', 2)
+ # Additionally, some may omit "unknown" when the manufacturer
+ # is not specified and emit
+ # CPU_TYPE-OPERATING_SYSTEM
+ parts = triplet.split('-', 2)
+ if len(parts) == 3:
+ cpu, _, os = parts
+ elif len(parts) == 2:
+ cpu, os = parts
+ else:
+ die("Unexpected triplet string: %s" % triplet)
# Autoconf uses config.sub to validate and canonicalize those triplets,
# but the granularity of its results has never been satisfying to our
# use, so we've had our own, different, canonicalization. We've also
# historically not been very consistent with how we use the canonicalized
# values. Hopefully, this will help us make things better.
# The tests are inherited from our decades-old autoconf-based configure,
# which can probably be improved/cleaned up because they are based on a

View file

@ -9,7 +9,7 @@ pkgname=icecat
pkgver=60.2.0
_pkgver=${pkgver}-gnu1
_pkgverbase=${pkgver%%.*}
pkgrel=1
pkgrel=2
pkgdesc="GNU version of the Firefox browser."
arch=(i686 x86_64)
url="http://www.gnu.org/software/gnuzilla/"
@ -24,7 +24,7 @@ optdepends=('networkmanager: Location detection via available WiFi networks'
'speech-dispatcher: Text-to-Speech')
## Set this variable to 1 if you want to build with clang compiler ##
_CLANG=0
#_CLANG=0
if [ "$_CLANG" -eq "1" ]; then
optdepends+=(clang)
@ -35,12 +35,14 @@ fi
#source=(https://mirrors.kernel.org/gnu/gnuzilla/${pkgver}/${pkgname}-${_pkgver}.tar.bz2 ## Good mirror
#source=(http://jenkins.trisquel.info/icecat/${pkgname}-${_pkgver}.tar.bz2 ## Official developer (Ruben Rodriguez) site. Probably only has developer releases.
source=(http://alpha.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${_pkgver}.tar.bz2{,.sig}
icecat.desktop icecat-safe.desktop)
icecat.desktop icecat-safe.desktop
0000-rust-1.29.patch)
sha256sums=('f40746f1c44b4ae3e5ae6da9d30efbdb78abb9d37864097320a9849ece3b1d53'
'SKIP'
'c44eab35f71dd3028a74632463710d674b2e8a0682e5e887535e3233a3b7bbb3'
'190577ad917bccfc89a9bcafbc331521f551b6f54e190bb6216eada48dcb1303')
'190577ad917bccfc89a9bcafbc331521f551b6f54e190bb6216eada48dcb1303'
'ce243b1e835651723d2186709fcd5218ad050ff56550c3ef25e23c718a69497b')
validpgpkeys=(A57369A8BABC2542B5A0368C3C76EED7D7E04784) # Ruben Rodriguez (GNU IceCat releases key) <ruben@gnu.org>
@ -52,6 +54,9 @@ prepare() {
sed -e 's;$(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME);g' -i config/baseconfig.mk
sed -e 's;$(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION);$(libdir)/$(MOZ_APP_NAME)-devel;g' -i config/baseconfig.mk
# Bug 1479540 - Accept "triplet" strings with only two parts in moz.configure
# https://hg.mozilla.org/mozreview/gecko/rev/e820a3a4ce2284ecd2992dc827fedc357b75eeb7#index_header
patch -Np1 -i ../0000-rust-1.29.patch
msg2 "Starting build..."
@ -98,11 +103,6 @@ build() {
cd "${srcdir}/${pkgname}-${pkgver}"
ICECATDIR="/usr/lib/${pkgname}" && export ICECATDIR
# _FORTIFY_SOURCE causes configure failures
#CPPFLAGS+=" -O2"
# export PATH="$srcdir/path:$PATH"
# Build with clang
if [ "$_CLANG" -eq "1" ]; then
export CC=clang