git » coin.git » main » tree

[main] / PKGBUILD

# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Gabriel Souza Franco
# Contributor: Florian Pritz
# Contributor: Christian Hesse <mail@eworm.de>
# Contributor: Thomas Dziedzic <gostrc at gmail>
# Contributor: Mickele
# Contributor: Marcus Fritzsch <fritschy@googlemail.com>

pkgname=coin
pkgver=4.0.2
pkgrel=2
pkgdesc='3D graphics library compatible with Open Inventor'
url='https://github.com/coin3d/coin'
license=(GPL)
arch=(x86_64 'armv7h')
depends=(libgl)
makedepends=(boost cmake doxygen ninja git glu)
optdepends=('fontconfig: dynamic linking support'
            'freetype2: dynamic linking support'
            'openal: audio/dynamic linking support'
            'zlib: dynamic linking support')
source=("git+$url#commit=ebd6e7df89de12200ca56cd62d5d8aeb14177d74")
b2sums=('SKIP')

build() {
  cmake \
    -B build \
    -D CMAKE_BUILD_TYPE=Release \
    -D CMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
    -D CMAKE_CXX_FLAGS="$CXXFLAGS -fPIC -w" \
    -D CMAKE_INSTALL_LIBDIR=lib \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D COIN_BUILD_DOCUMENTATION=ON \
    -D COIN_BUILD_DOCUMENTATION_CHM=OFF \
    -D COIN_BUILD_DOCUMENTATION_MAN=ON \
    -D COIN_THREADSAFE=ON \
    -D USE_EXTERNAL_EXPAT=ON \
    -G Ninja \
    -S coin
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
  # Skip the HTML documentation
  rm -rf "$pkgdir/usr/share/doc"
  # Remove an empty directory
  rmdir "$pkgdir/usr/share/Coin/profiler"
}