summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: afa3c8ff8f9f8bf630165a76c14f47dee9cc0c27 (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
39
40
41
42
43
44
45
46
47
48
# $Id$
# Maintainer: Sergej Pupykin <arch+pub@sergej.pp.ru>
# Maintainer: Ido Rosen <ido@kernel.org>
# Contributor: Ross Whitfield <whitfieldre@ornl.gov>
# Contributor: Mateusz Paluszkiewcz <aifam96 at gmail dot com>
# Contributor: Christopher Reimer <vdr4arch at creimer dot net>

pkgname=mingw-w64-poco
pkgver=1.9.2
_pkgver=${pkgver/_/}
pkgrel=1
pkgdesc="C++ class libraries for network-centric, portable applications, complete edition with debug libraries (mingw-w64)"
arch=('any')
url="http://www.pocoproject.org/"
license=('custom:boost')
depends=('mingw-w64-libmariadbclient' 'mingw-w64-openssl' 'mingw-w64-unixodbc')
makedepends=('mingw-w64-cmake')
source=("https://pocoproject.org/releases/poco-${_pkgver%p?}/poco-${_pkgver}-all.tar.bz2")
sha256sums=('74f117e2c6c0f2de1e4ffd6fc5b8053a7bc05d331e7a7c606d0fcc3917f827a4')
options=(!strip staticlibs !buildflags)

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "${srcdir}/poco-${_pkgver}-all"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake \
      -DCMAKE_INSTALL_PREFIX=/usr/${_arch} \
      -DCMAKE_BUILD_TYPE=Release \
      -DENABLE_PAGECOMPILER=FALSE \
      -DENABLE_PAGECOMPILER_FILE2PAGE=FALSE \
      ..
    make
    popd
  done
}

package() {
  cd "${srcdir}/poco-${_pkgver}-all"
  install -Dm644 'LICENSE' "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
  for _arch in ${_architectures}; do
    cd "${srcdir}/poco-${_pkgver}-all/build-${_arch}"
    make DESTDIR="${pkgdir}" install
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}