archrelease: copy trunk to community-any
[ArchLinux/community.git] / wvstreams / repos / community-x86_64 / PKGBUILD
blob76ded2bab0c0f92a2943a5526c47e5b5eebf8ede
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Andrea Scarpino <andrea@archlinux.org>
3 # Contributor: dorphell <dorphell@archlinux.org>
5 pkgname=wvstreams
6 pkgver=4.6.1
7 pkgrel=20
8 pkgdesc="A network programming library written in C++"
9 arch=('x86_64')
10 url="https://github.com/apenwarr/wvstreams/"
11 license=('LGPL')
12 depends=('zlib' 'pam' 'xplc' 'openssl' 'readline')
13 source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/wvstreams/wvstreams-$pkgver.tar.gz
14         wvstreams-4.6.1-glibc212.patch
15         wvstreams-4.6.1-gcc47.patch
16         wvstreams-4.6.1-gcc10.patch
17         wvstreams_openssl1.1.patch
18         openssl-buildfix.patch
19         gcc-6.patch)
20 sha256sums=('8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633'
21             '278c73140b963daa8aae85dfbba4917e2963e72c187bbb97b6252a5a70f54bc2'
22             '7b83dad8e3931686962823a7008af0034a430f35e1eb617f5c8137141e14ccdd'
23             '25aa17989936479a095837a354e0f0727f7a6fa393967a86f2e67e310a72e944'
24             'e1294644eb44c3d58789f2aca51fa28d15af799bd1b7bc2ff2583c41c74efae5'
25             '57b55ed6a2a6aa8abef00711d9e03bed664f2c4357404cd38ae778f8b3b97482'
26             '1f750516825dc8c3ef7de980b90dadf22c5132eab828a5dd634fa2a88624b6d9')
27 options=('!makeflags')
29 prepare() {
30   cd ${pkgname}-${pkgver}
32   patch -p0 -i "$srcdir/wvstreams-4.6.1-glibc212.patch"
33   patch -p0 -i "$srcdir/wvstreams-4.6.1-gcc47.patch"
34   patch -p1 -i "$srcdir/openssl-buildfix.patch"
35   patch -p1 -i "$srcdir/gcc-6.patch"
36   patch -p1 -i "$srcdir/wvstreams-4.6.1-gcc10.patch" # Gentoo patch
37   patch -p1 -i "$srcdir/wvstreams_openssl1.1.patch" # Debian patch
40 build() {
41   cd ${pkgname}-${pkgver}
43   ./configure --prefix=/usr \
44      --sbin=/usr/bin \
45      --sysconfdir=/etc \
46      --localstatedir=/var \
47      --without-dbus \
48      --with-pam \
49      --with-openssl \
50      --without-tcl \
51      --without-qt
52   make COPTS="$CFLAGS -ffat-lto-objects -fPIC" CXXOPTS="$CXXFLAGS -ffat-lto-objects -fPIC -fpermissive -fno-tree-dce -fno-optimize-sibling-calls" VERBOSE=1
55 package() {
56   cd ${pkgname}-${pkgver}
57   make DESTDIR="${pkgdir}" install
59   # FS#15974
60   # --without-dbus still installs the pkg-config file
61   rm "${pkgdir}/usr/lib/pkgconfig/libwvdbus.pc"
62   # --without-qt still installs the pkg-config file
63   rm "${pkgdir}/usr/lib/pkgconfig/libwvqt.pc"