aboutsummaryrefslogtreecommitdiffstats
path: root/community/irrlicht/APKBUILD
blob: 2cdae3e60e6b9d8d7915a02333b86725be58220c (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Contributor: <xmingske@gmail.com>
# Maintainer: Jeff Bilyk <jbilyk@alpinelinux.org>
pkgname=irrlicht
pkgver=1.8.4
pkgrel=2
pkgdesc="High performance realtime 3D engine written in C++"
url="http://irrlicht.sourceforge.net"
arch="all"
license="zlib"
depends=""
makedepends="mesa-dev libjpeg-turbo-dev bzip2 libpng-dev zlib-dev bzip2-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="https://downloads.sourceforge.net/irrlicht/irrlicht-$pkgver.zip
	irrlicht-1.8.3-mesa-10.x.patch
	irrlicht-1.8.3-sysctl.patch
	irrlicht-1.8-optflags.patch
	"

#irrlicht-1.8.3-config.patch
builddir="$srcdir"/$pkgname-$pkgver/
prepare() {
	default_prepare
	cd "$builddir"
	# use system libs
	rm -r \
		source/Irrlicht/jpeglib \
		source/Irrlicht/libpng \
		source/Irrlicht/zlib \
		source/Irrlicht/bzip2
}

build() {
       cd "$builddir"/source/Irrlicht/
       export CXXFLAGS="$CXXFLAGS -std=gnu++98"
       make sharedlib

       #from arch pkgbuild: example build helper
       ln -s libIrrlicht.so.$pkgver "$srcdir"/$pkgname-$pkgver/lib/Linux/libIrrlicht.so
}

package() {
       cd "$builddir"

       mkdir -p "$pkgdir"/usr/lib
       mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
       mkdir -p "$pkgdir"/usr/share/doc/$pkgname
       mkdir -p "$pkgdir"/usr/include/$pkgname

       install -m644 readme.txt "$pkgdir"/usr/share/licenses/$pkgname

       #from arch pkgbuild: install docs
       cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname

       install -m755 "$builddir"/lib/Linux/libIrrlicht.so.$pkgver "$pkgdir"/usr/lib
       cd "$pkgdir"/usr/lib
       ln -s libIrrlicht.so.$pkgver libIrrlicht.so
       ln -s libIrrlicht.so.$pkgver libIrrlicht.so.1.8

       install -m644 "$builddir"/include/* "$pkgdir"/usr/include/$pkgname
}

sha512sums="de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1  irrlicht-1.8.4.zip
44c16419c07597ba6d06d66057fbe2ab86e7b02b5dcdf458678b4ea87f6f721840da951ae4df59c983e1da83abdbe45f82e44a6a311bd42eb94d93dfd5aa437c  irrlicht-1.8.3-mesa-10.x.patch
a25887c46990620271168f3c1ff42e3ff7bd577d5e986803f067942b7f43d63428ebbbf29d3956765b3199da731b151a39d3ee6b8e5bdab189710ef8fb9595e5  irrlicht-1.8.3-sysctl.patch
6d7447dcc92265ac4d9b3a9337d8d8ace6babf3c4ee6cb565629a58b11004ca569293da9d2aca09dba4c9d3dd1ac2888fd1a9eed30da0abe1515b4ebda614982  irrlicht-1.8-optflags.patch"