summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d70a1f4d67ec6c610c229fa25bf77d5e08f6d045 (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
pkgname=mingw-w64-openmesh
pkgver=11.0.0
pkgrel=1
pkgdesc="A generic and efficient data structure for representing and manipulating polygonal meshes (mingw-w64)"
arch=('any')
url="http://www.openmesh.org"
license=('BSD')
depends=('mingw-w64-crt')
makedepends=('mingw-w64-cmake')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-${pkgver}.tar.bz2")
sha256sums=('9d22e65bdd6a125ac2043350a019ec4346ea83922cafdf47e125a03c16f6fa07')

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

prepare () {
  cd "$srcdir"/OpenMesh-${pkgver}
  sed -i "s|libdata|lib|g" CMakeLists.txt
}

build() {
  cd "$srcdir"/OpenMesh-${pkgver}
  for _arch in ${_architectures}; do
    ${_arch}-cmake -DOPENMESH_BUILD_SHARED=ON \
      -DBUILD_APPS=OFF -DOPENMESH_DOCS=OFF \
      -B build-${_arch} .
    make -C build-${_arch}
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "$srcdir"/OpenMesh-${pkgver}/build-${_arch}
    make DESTDIR="${pkgdir}" install
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}