summarylogtreecommitdiffstats
path: root/compat32-libnghttp2.patch
blob: ba0ed8cca2f2868085ec59ceb54ffe2d77c95baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
diff --git a/PKGBUILD b/PKGBUILD
index b87a7d7..11e39f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,6 +11,7 @@ license=('MIT')
 depends=('lib32-glibc' 'libnghttp2')
 provides=('libnghttp2.so')
 makedepends=('git')
+options=(staticlibs '!lto')
 validpgpkeys=('F4F3B91474D1EB29889BD0EF7E8403D5D673C366') # Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
 source=("git+https://github.com/nghttp2/nghttp2.git?signed#tag=v${pkgver}"
         'git+https://github.com/ngtcp2/munit.git'
@@ -38,13 +39,17 @@ build() {
   cd nghttp2
   export CC='gcc -m32'
   export CXX='g++ -m32'
-  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
+  export CFLAGS+=" -fPIC"
+  export CXXFLAGS+=" -fPIC"
+  export PKG_CONFIG_PATH=''

   ./configure \
     --prefix=/usr \
     --disable-examples \
     --disable-python-bindings \
     --enable-lib-only \
+    --disable-shared \
+    --enable-static \
     --libdir=/usr/lib32
   make
 }
@@ -58,6 +63,5 @@ package() {
   cd nghttp2/lib

   make DESTDIR="$pkgdir" install
-  rm -r "$pkgdir"/usr/include
   install -Dm644 ../COPYING -t "$pkgdir"/usr/share/licenses/$pkgname
 }