PKGBUILDs/community/tachyon/PKGBUILD

61 lines
1.9 KiB
Bash
Raw Normal View History

2015-01-09 01:56:57 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Rémy Oudompheng <remy@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2015-10-28 01:16:51 +00:00
# - set ARM architectures to use linux-thr profile, AArch64 to linux-64-thr
# - sed to remove -m32 and -m64 from CFLAGS
2015-01-09 01:56:57 +00:00
pkgname=tachyon
2022-03-07 20:49:10 +00:00
pkgver=0.99.3
2022-03-06 21:44:51 +00:00
pkgrel=1
2015-01-09 01:56:57 +00:00
pkgdesc="Multithreaded ray tracing software"
2018-11-13 19:45:03 +00:00
arch=(x86_64)
2015-01-09 01:56:57 +00:00
url="http://jedi.ks.uiuc.edu/~johns/raytracer/"
2017-07-11 00:21:44 +00:00
license=(BSD)
depends=(libjpeg-turbo libpng)
2015-01-09 01:56:57 +00:00
makedepends=()
2019-09-17 03:51:36 +00:00
source=("http://jedi.ks.uiuc.edu/~johns/raytracer/files/$pkgver/$pkgname-$pkgver.tar.gz"
enable-jpeg-png.patch
tachyon-system-cflags.patch)
2022-03-07 20:49:10 +00:00
sha256sums=('c725913bb9b7e1c4e282e0980bf5a3066ac0dcaaccd97b071a6d6d25e6e72492'
'10d96a951c38e3a3a3b2854ad5e0da3fd24ee32446f604baae1a6b1ad6e6dad6'
'5d81b5487d231f46eaa05eb3c1dfcc84a961b58d71a8c36d6feee0dce713dc6d')
2015-01-09 01:56:57 +00:00
case "$CARCH" in
arm*) _target=linux-thr ;;
2015-10-28 01:16:51 +00:00
"aarch64") _target=linux-64-thr ;;
2015-01-09 01:56:57 +00:00
"i686") _target=linux-thr ;;
"x86_64") _target=linux-64-thr ;;
esac
prepare(){
2019-09-17 03:51:36 +00:00
cd $pkgname
2015-01-09 01:56:57 +00:00
# enable JPEG and PNG support
2019-08-24 23:59:39 +00:00
patch -p0 -i ../enable-jpeg-png.patch
# use system build flags
patch -p1 -i ../tachyon-system-cflags.patch
sed -e 's|${CC} ${CFLAGS}|${CC} ${CFLAGS} ${LDFLAGS}|g' -i unix/Makefile
2015-01-09 01:56:57 +00:00
2015-10-28 01:16:51 +00:00
# remove -m32 and -m64 for ARM
2015-01-09 01:56:57 +00:00
sed -i 's/-m32//g' unix/Make-arch
2015-10-28 01:16:51 +00:00
sed -i 's/-m64//g' unix/Make-arch
2015-01-09 01:56:57 +00:00
}
build() {
2019-09-17 03:51:36 +00:00
cd $pkgname/unix
2019-08-24 23:59:39 +00:00
make $_target CC="gcc ${CFLAGS} ${LDFLAGS}"
2015-01-09 01:56:57 +00:00
}
package() {
2019-09-17 03:51:36 +00:00
cd $pkgname/compile/$_target
2020-07-10 01:24:03 +00:00
install -D -m 755 tachyon "$pkgdir"/usr/bin/tachyon
install -D -m 644 libtachyon.a "$pkgdir"/usr/lib/libtachyon.a
2015-01-09 01:56:57 +00:00
2019-09-17 03:51:36 +00:00
cd "$srcdir"/$pkgname/scenes
install -d "$pkgdir"/usr/share/tachyon/scenes/imaps
install -m 644 README *.dat *.cam *.ac "$pkgdir"/usr/share/tachyon/scenes
2015-01-09 01:56:57 +00:00
install -d "$pkgdir"/usr/share/licenses/tachyon
2019-09-17 03:51:36 +00:00
install "$srcdir"/$pkgname/Copyright "$pkgdir"/usr/share/licenses/tachyon
2015-01-09 01:56:57 +00:00
}