2016-02-17 09:30:53 +01:00
|
|
|
# Template file for 'unicorn'
|
|
|
|
pkgname=unicorn
|
|
|
|
version=0.9
|
2016-04-13 20:07:13 +02:00
|
|
|
revision=2
|
2016-02-17 09:30:53 +01:00
|
|
|
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
|
2016-04-13 20:07:13 +02:00
|
|
|
hostmakedepends="pkg-config python-setuptools python3.4-setuptools"
|
2016-02-17 09:30:53 +01:00
|
|
|
makedepends="glib-devel"
|
|
|
|
short_desc="Lightweight multi-platform, multi-architecture CPU emulator framework"
|
|
|
|
maintainer="Michael Gehring <mg@ebfe.org>"
|
|
|
|
license="GPL-2"
|
|
|
|
homepage="http://www.unicorn-engine.org/"
|
|
|
|
distfiles="https://github.com/unicorn-engine/unicorn/archive/${version}.tar.gz"
|
|
|
|
checksum=1ca03b1c8f6360335567b528210713461e839d47c4eb7c676ba3aa4f72b8cf10
|
|
|
|
|
|
|
|
post_extract() {
|
|
|
|
# don't build the samples
|
|
|
|
echo "clean:" > samples/Makefile
|
|
|
|
# fix unicorn.pc paths
|
|
|
|
sed 's,libdir=$(LIBDIR),libdir=$(PREFIX)/${LIBDIRARCH},g' -i Makefile
|
|
|
|
sed 's,includedir=$(INCDIR),includedir=$(PREFIX)/include,g' -i Makefile
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
make
|
2016-04-13 20:07:13 +02:00
|
|
|
make -C bindings
|
|
|
|
cd bindings/python
|
|
|
|
for pyver in 2.7 3.4; do
|
|
|
|
python${pyver} setup.py build --build-base=build-${pyver}
|
|
|
|
done
|
2016-02-17 09:30:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
make DESTDIR=${PKGDESTDIR} install
|
2016-04-13 20:07:13 +02:00
|
|
|
cd bindings/python
|
|
|
|
for pyver in 2.7 3.4; do
|
|
|
|
python${pyver} setup.py build --build-base=build-${pyver} \
|
|
|
|
install --prefix=/usr --root=${DESTDIR}
|
|
|
|
done
|
2016-02-17 09:30:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
unicorn-devel_package() {
|
|
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
|
|
short_desc+=" - development files"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/include
|
|
|
|
vmove usr/lib/*.a
|
|
|
|
vmove usr/lib/*.so
|
|
|
|
vmove usr/lib/pkgconfig
|
|
|
|
}
|
|
|
|
}
|
2016-04-13 20:07:13 +02:00
|
|
|
|
|
|
|
python-unicorn_package() {
|
|
|
|
depends="${sourcepkg}-devel>=${version}_${revision}"
|
|
|
|
short_desc+=" - Python2 bindings"
|
|
|
|
pycompile_version="2.7"
|
|
|
|
pycompile_module="unicorn"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python2.7
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
python3.4-unicorn_package() {
|
|
|
|
depends="${sourcepkg}-devel>=${version}_${revision}"
|
|
|
|
short_desc+=" - Python3.4 bindings"
|
|
|
|
pycompile_version="3.4"
|
|
|
|
pycompile_module="unicorn"
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/lib/python3.4
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|