summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz2018-10-07 01:06:57 -0400
committerEli Schwartz2018-10-07 01:06:57 -0400
commit737b4508196dbb898059003e4d2cf605edc44083 (patch)
tree9bb74d60b369378412eae4120dc34a9bbc252f64
parent1d5b4425b1539598f9ccada1030bb3b03b596be7 (diff)
downloadaur-737b4508196dbb898059003e4d2cf605edc44083.tar.gz
Add arm* support to pacman-static since we expect it to build on arm too.
Should build just fine for obvious reasons there, but as we already set conditional options for the openssl component, there's an expectation that arm will need special flags too... these are the flags archlinuxarm uses to build core/openssl. Reported-by: Luca Weiss <luca@z3ntu.xyz>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD27
2 files changed, 23 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9834d7ae9a55..95f9b8a451bb 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,6 +5,10 @@ pkgbase = pacman-static
url = https://www.archlinux.org/pacman/
arch = i686
arch = x86_64
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
license = GPL
depends = pacman=5.1.1
options = staticlibs
diff --git a/PKGBUILD b/PKGBUILD
index 24680780c721..18235eae54c2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -18,7 +18,7 @@ _gpgmever=1.11.1
_gnupgver=2.2.10
pkgrel=4
pkgdesc="Statically-compiled pacman (to fix or install systems without libc)"
-arch=('i686' 'x86_64')
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://www.archlinux.org/pacman/"
license=('GPL')
depends=("pacman=${pkgver}")
@@ -93,13 +93,24 @@ build() {
# openssl
cd "${srcdir}"/openssl-${_sslver}
- if [[ "${CARCH}" == 'x86_64' ]]; then
- openssltarget='linux-x86_64'
- optflags='enable-ec_nistp_64_gcc_128'
- elif [[ "${CARCH}" == 'i686' ]]; then
- openssltarget='linux-elf'
- optflags=''
- fi
+ case ${CARCH} in
+ x86_64)
+ openssltarget='linux-x86_64'
+ optflags='enable-ec_nistp_64_gcc_128'
+ ;;
+ i686)
+ openssltarget='linux-elf'
+ optflags=''
+ ;;
+ arm|armv6h|armv7h)
+ openssltarget='linux-armv4'
+ optflags=''
+ ;;
+ aarch64)
+ openssltarget='linux-aarch64'
+ optflags='no-afalgeng'
+ ;;
+ esac
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
./Configure --prefix="${srcdir}"/temp/usr \
--openssldir=/etc/ssl \