aboutsummaryrefslogtreecommitdiffstats
path: root/main/tolua++/APKBUILD
blob: 0d850f1867350afeffa225a339a999dc11f9de9c (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tolua++
pkgver=1.0.93
pkgrel=2
pkgdesc="a tool to integrate C/C++ code with Lua"
url="http://www.codenix.com/~tolua/"
arch="all"
license="MIT"
depends=
makedepends="lua-dev"
install=
subpackages=
source="$pkgname-$pkgver.tar.gz::https://github.com/LuaDist/toluapp/archive/$pkgver.tar.gz"

_builddir="$srcdir"/toluapp-$pkgver

prepare() {
	cd "$_builddir"
}

build() {
	cd "$_builddir"/src
	# see http://lua-users.org/wiki/CompilingToluappWithoutScons
	gcc -fPIC -c lib/*.c  -I../include
	ar rcsv libtolua++.a *.o
	gcc bin/tolua.c bin/toluabind.c -I../include -L. -llua -ltolua++ \
		-o tolua++
}

package() {
	cd "$_builddir"/src
	install -d "$pkgdir"/usr/lib/ "$pkgdir"/usr/bin "$pkgdir"/usr/include
	install libtolua++.a "$pkgdir"/usr/lib/
	install tolua++ "$pkgdir"/usr/bin/
	install ../include/tolua++.h "$pkgdir"/usr/include/
}

md5sums="689d952034e55d4333fa240f7516e68a  tolua++-1.0.93.tar.gz"
sha256sums="0a1ff87cb74e7531aec57e2a7cfdf282116647dea3b46223e3cc7c362b55b5bb  tolua++-1.0.93.tar.gz"
sha512sums="68f169244f1b37fdeb1a72b0f8fc61a30329c0a828f46af718021c8cfa120fe15379b4b2bc10f0995de90e34735564afd6d302fa1865be60272e52e276e1114f  tolua++-1.0.93.tar.gz"