updated on Mon Jan 16 20:00:43 UTC 2012
[aur-mirror.git] / mingw32-gtest / PKGBUILD
bloba2426685dfdbbf6f9155a2d01c2eeb4ac3bf51c1
1 # Maintainer: Alexandre Bique <bique.alexandre@gmail.com>
2 pkgname=mingw32-gtest
3 pkgver=1.6.0
4 pkgrel=2
5 pkgdesc="Google Test - C++ testing utility based on the xUnit framework (like JUnit) (mingw32)"
6 arch=('any')
7 url="http://code.google.com/p/googletest/"
8 license=('BSD')
9 makedepends=('mingw32-gcc' 'cmake')
10 depends=('mingw32-runtime')
11 options=('!strip' '!buildflags')
12 source=("http://googletest.googlecode.com/files/gtest-$pkgver.zip"
13         "cmake-toolchain.cmake")
14 sha256sums=('5ec97df8e75b4ee796604e74716d1b50582beba22c5502edd055a7e67a3965d8'
15             '271d6ae06f0a40a7ef572468eb4546490e59cd993f321f9a8b6c2a7dc8d86e32')
17 build() {
18   cd "${srcdir}/gtest-$pkgver"
20   unset LDFLAGS
22   rm -rf build && mkdir build && cd build
23   cmake .. \
24     -DCMAKE_INSTALL_PREFIX=/usr/i486-mingw32/ \
25     -DCMAKE_TOOLCHAIN_FILE="${srcdir}/cmake-toolchain.cmake" \
26     -DBUILD_SHARED_LIBS=OFF \
27     -DCMAKE_BUILD_TYPE=release \
28     -Dgtest_disable_pthreads=ON
29   make
32 package() {
33   cd "${srcdir}/gtest-$pkgver"
35   mkdir -pm 0755 "$pkgdir"/usr/i486-mingw32/{lib,include/gtest/internal}
36   install -m 0644 build/libgtest{,_main}.a "$pkgdir"/usr/i486-mingw32/lib/
37   install -m 0644 include/gtest/*.h "$pkgdir"/usr/i486-mingw32/include/gtest/
38   install -m 0644 include/gtest/internal/*.h "$pkgdir"/usr/i486-mingw32/include/gtest/internal/