aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tolua/APKBUILD
blob: b7349f68126b55d46c6e507865d1e4ee7a40feda (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=tolua
pkgver=5.1.4
pkgrel=0
pkgdesc="Tool to integrace C/C++ code in lua"
url="http://www.tecgraf.puc-rio.br/~celes/tolua/"
arch="all"
license="MIT"
depends=""
depends_dev="lua-dev"
makedepends="$depends_dev"
install=""
subpackages="$pkgname-dev"
source="http://www.tecgraf.puc-rio.br/~celes/tolua/tolua-$pkgver.tar.gz"

_builddir="$srcdir"/tolua-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i -e '/^CC=/d' \
		-e 's/^CCPP *=.*/CCPP=$(CXX)/' \
		-e 's/^CFLAGS *=/CFLAGS+=/' \
		-e 's/^CPPFLAGS *=/CPPFLAGS+=/' \
		config || return 1
	# clean up some stuff that probably not was supposed to be there
	find \( -name '.*DS_Store' -o -name '._*' \) -delete
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	install -d "$pkgdir"/usr
	cp -r bin lib include "$pkgdir"/usr/
}

md5sums="46d67c3b9b4b983368a9ff0baa2139f9  tolua-5.1.4.tar.gz"