aboutsummaryrefslogtreecommitdiffstats
path: root/testing/assimp/APKBUILD
blob: 5c031b5a4d07bbf04d0a162e08745176e7d92563 (plain) (blame)
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
# Contributor: Russ Webber <russ@rw.id.au>
# Maintainer: Russ Webber <russ@rw.id.au>
pkgname=assimp
pkgver=4.1.0
pkgrel=0
pkgdesc="Open Asset Import Library imports and exports 3D model formats."
url="http://www.assimp.org/"
arch="all"
license="BSD-3-Clause"
makedepends="cmake zlib-dev minizip-dev"
subpackages="$pkgname-dev"
source="assimp-$pkgver.tar.gz::https://github.com/assimp/assimp/archive/v$pkgver.tar.gz
        01-rm-revision-test.patch"

build() {
  if [ "$CBUILD" != "$CHOST" ]; then
    CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
  fi

  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_SHARED_LIBS=True \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
    -DCMAKE_C_FLAGS="$CFLAGS" \
    -DASSIMP_BUILD_TESTS=True \
    ${CMAKE_CROSSOPTS} .
  make
}

check() {
  cd "$builddir"/bin
  ./unit
}

package() {
  make DESTDIR="$pkgdir" install
  rm -vf "$pkgdir"/usr/lib/libIrrXML.a
}

sha512sums="5f1292de873ae16c9921d1d44f2871474d74c0ddfd76cc928a7d9b3e03aa6eca4cc72af0513da20a86d09c55d48646e610fd4a4f2b05364f08ad09cf27cbc67a  assimp-4.1.0.tar.gz
4cbcf0d8c91a5d727de25af2444f9a997e111b8cc3cfb951ec7f1ad4f4d0a1bce5300a853a3788a3da787245fd373bfbf9a0f767ec902343e47c366c070b28f3  01-rm-revision-test.patch"