Skip to content

Instantly share code, notes, and snippets.

@zman0900
Created August 20, 2016 22:12
Show Gist options
  • Save zman0900/261e5103b87a472ed3614faad0454645 to your computer and use it in GitHub Desktop.
Save zman0900/261e5103b87a472ed3614faad0454645 to your computer and use it in GitHub Desktop.
Patch for lib32-libgcrypt15 PKGBUILD to correctly build as 32 bit
diff --git a/PKGBUILD b/PKGBUILD
index a43ce0e..2df703b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,20 +17,16 @@ sha512sums=('8fced63f1bb2f3b60d456df168479ebe77acf2a8963f5dc831a25e839e0930148e2
'SKIP')
validpgpkeys=('D8692123C4065DEA5E0F3AB5249B39D24F25E3B6') # Werner Koch <https://www.gnupg.org/signature_key.html>
-prepare() {
- cd libgcrypt-${pkgver}
- sed 's:path="amd64":path="i586 i386":' -i mpi/config.links
-}
-
build() {
# Modify environment to generate 32-bit ELF. Respects flags defined in makepkg.conf
- export CC='gcc -m32'
- export CXX='g++ -m32'
+ export CFLAGS="-m32 ${CFLAGS}"
+ export CXXFLAGS="-m32 ${CXXFLAGS}"
export LDFLAGS+=' -m32'
- export PKG_CONFIG_LIBDIR='/usr/lib32/pkgconfig'
+ export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
cd libgcrypt-${pkgver}
./configure \
+ --build=i686-pc-linux-gnu \
--prefix='/usr' \
--libdir='/usr/lib32' \
--enable-shared \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment