void-packages/srcpkgs/unicorn/template
Alessio Sergi ae8f05462f unicorn: rebuild for Python 3.5
Rename python*-unicorn to unicorn-python*.
Convert python3.4-unicorn pkg into dummy pkg.
2016-10-16 20:04:24 +02:00

73 lines
2 KiB
Bash

# Template file for 'unicorn'
pkgname=unicorn
version=0.9
revision=3
only_for_archs="x86_64 x86_64-musl i686 i686-musl"
hostmakedepends="pkg-config python-devel python3-devel"
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
make -C bindings
cd bindings/python
for pyver in $py2_ver $py3_ver; do
python${pyver} setup.py build --build-base=build-${pyver}
done
}
do_install() {
make DESTDIR=${DESTDIR} install
cd bindings/python
for pyver in $py2_ver $py3_ver; do
python${pyver} setup.py build --build-base=build-${pyver} \
install --prefix=/usr --root=${DESTDIR}
done
}
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
}
}
unicorn-python_package() {
replaces="python-unicorn>=0"
depends="${sourcepkg}-devel>=${version}_${revision}"
short_desc+=" - Python2 bindings"
pycompile_module="unicorn"
pkg_install() {
vmove ${py2_sitelib}
}
}
unicorn-python3_package() {
replaces="python3.4-unicorn>=0"
depends="${sourcepkg}-devel>=${version}_${revision}"
short_desc+=" - Python3 bindings"
pycompile_module="unicorn"
pkg_install() {
vmove ${py3_sitelib}
}
}
python3.4-unicorn_package() {
build_style=meta
short_desc+=" - Python3.4 bindings (transitional dummy package)"
depends="unicorn-python3>=${version}_${revision}"
}