blob: fb03046306307b15bc3a2d056d624b78f3b32e35 (
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
|
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
_pkgname=pugixml
pkgname=mingw-w64-${_pkgname}
_majordotminor=1.15
pkgver=${_majordotminor}
pkgrel=1
pkgdesc='Light-weight, simple and fast XML parser for C++ with XPath support (mingw-w64)'
arch=('any')
url='http://pugixml.org/'
license=('MIT')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('!buildflags' 'staticlibs' '!strip')
source=("http://github.com/zeux/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('655ade57fa703fb421c2eb9a0113b5064bddb145d415dd1f88c79353d90d511a')
_srcdir="${_pkgname}-${_majordotminor}"
_architectures='i686-w64-mingw32 x86_64-w64-mingw32'
_flags=( -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE='-DNDEBUG' )
build() {
for _arch in ${_architectures}; do
${_arch}-cmake -S "${_srcdir}" -B "build-${_arch}" "${_flags[@]}" \
-DPUGIXML_BUILD_TESTS=OFF -DPUGIXML_BUILD_SHARED_AND_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
cmake --build "build-${_arch}"
done
}
#check() {
# for _arch in ${_architectures}; do
# ${_arch}-cmake -S "${_srcdir}" -B "build-${_arch}" "${_flags[@]}" -DPUGIXML_BUILD_TESTS=ON
# cmake --build "build-${_arch}"
# cmake --build "build-${_arch}" --target test
# done
#}
package() {
for _arch in ${_architectures}; do
DESTDIR="${pkgdir}" cmake --install "build-${_arch}"
${_arch}-strip --strip-unneeded "${pkgdir}"/usr/${_arch}/bin/*.dll
${_arch}-strip -g "${pkgdir}"/usr/${_arch}/lib/*.a
done
}
|