57 lines
1.7 KiB
Bash
57 lines
1.7 KiB
Bash
# Maintainer: Jesus E. <heckyel@riseup.net>
|
|
|
|
pkgname=assimp
|
|
pkgver=5.0.1
|
|
_debver=5.0.1~ds0
|
|
_debrel=2
|
|
pkgrel=1
|
|
pkgdesc='Library to import various well-known 3D model formats in an uniform manner'
|
|
arch=('i686' 'x86_64')
|
|
license=('Modified-BSD')
|
|
depends=('zlib' 'gcc-libs')
|
|
makedepends=('cmake' 'ninja' 'quilt')
|
|
url='https://assimp.org/'
|
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/assimp/assimp/archive/v${pkgver}.tar.gz"
|
|
"https://deb.debian.org/debian/pool/main/a/assimp/assimp_${_debver}-${_debrel}.debian.tar.xz")
|
|
sha512sums=('51b704ffea778638b9e228578650f62691c56ee1a90337f8bbbee37e807455466d818234be24852334e5806260e5690932c9bd8e00f055c5c26782e0636538f0'
|
|
'331d7b41d53a76adcc2cdda28b3c546b25f2f69e002b3ef46a50da1544377f307fbc4fe670e3f79fdaa09bcfdf0745e9b43b600b33b471a3b7387964f8894591')
|
|
|
|
prepare() {
|
|
cd $pkgname-$pkgver
|
|
|
|
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
|
# Debian patches
|
|
export QUILT_PATCHES=debian/patches
|
|
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
|
export QUILT_DIFF_ARGS='--no-timestamps'
|
|
|
|
mv "$srcdir"/debian .
|
|
|
|
# Doesn't apply
|
|
rm -v debian/patches/use-system-stb_image.patch || true
|
|
rm -v debian/patches/use-system-utf8cpp.patch || true
|
|
|
|
quilt push -av
|
|
fi
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
cmake . \
|
|
-Bbuild \
|
|
-GNinja \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DASSIMP_BUILD_SAMPLES=OFF
|
|
ninja -C build
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}-${pkgver}
|
|
|
|
DESTDIR="$pkgdir" ninja -C build install
|
|
install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}
|
|
sed -i "s|includedir=.*|includedir=/usr/include/assimp|" "${pkgdir}"/usr/lib/pkgconfig/assimp.pc
|
|
}
|