diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-09-02 05:11:33 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-09-02 07:08:09 -0300 |
commit | 5edc2cfd6f82b69c9815b38d25098c6dfbd1d66e (patch) | |
tree | b977d17b5b7d0eb87a8673d1729fbec5fd19e773 /community/capstone | |
parent | ce014327e540db5f9c68b25d886f24a237c1732d (diff) | |
download | aports-5edc2cfd6f82b69c9815b38d25098c6dfbd1d66e.tar.bz2 aports-5edc2cfd6f82b69c9815b38d25098c6dfbd1d66e.tar.xz |
community/capstone: upgrade to 4.0.1
Diffstat (limited to 'community/capstone')
-rw-r--r-- | community/capstone/APKBUILD | 67 | ||||
-rw-r--r-- | community/capstone/capstone.pc | 8 |
2 files changed, 25 insertions, 50 deletions
diff --git a/community/capstone/APKBUILD b/community/capstone/APKBUILD index 1369e2a17b..94d5a382e3 100644 --- a/community/capstone/APKBUILD +++ b/community/capstone/APKBUILD @@ -1,63 +1,46 @@ # Contributor: Valery Kartel <valery.kartel@gmail.com> # Maintainer: Valery Kartel <valery.kartel@gmail.com> pkgname=capstone -pkgver=3.0.4 -pkgrel=4 +pkgver=4.0.1 +pkgrel=0 pkgdesc="The Ultimate Disassembler" -url="http://www.capstone-engine.org" +options="!check" # Testsuite fails +url="https://www.capstone-engine.org" arch="all" license="BSD-3-Clause-Clear" -depends="" depends_dev="$pkgname" -makedepends="cmake python2-dev python3-dev py-setuptools" -install="" -subpackages="$pkgname-dev py2-${pkgname}:_py2:noarch py3-${pkgname}:_py3:noarch" -source="$pkgname-$pkgver.tar.gz::https://github.com/aquynh/$pkgname/archive/$pkgver.tar.gz - $pkgname.pc" -builddir="$srcdir"/$pkgname-$pkgver +makedepends="bash py3-setuptools cython3 python3-dev" +subpackages="$pkgname-dev py3-${pkgname}:_py3 cstool" +source="$pkgname-$pkgver.tar.gz::https://github.com/aquynh/capstone/archive/$pkgver.tar.gz" build() { - cd "$builddir" - cmake \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_INSTALL_LIBDIR=lib \ - -DBUILD_SHARED_LIBS=True \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ - -DCMAKE_C_FLAGS="$CFLAGS" \ - -DCAPSTONE_BUILD_STATIC=OFF - make + CFLAGS="$CFLAGS -O2" make } -package() { - cd "$builddir" - make DESTDIR="$pkgdir" install - install -Dm644 "$srcdir"/$pkgname.pc \ - "$pkgdir"/usr/lib/pkgconfig/$pkgname.pc - - sed -i \ - -e "s/#pkgname/$pkgname/" \ - -e "s/#pkgdesc/$pkgdesc/" \ - -e "s/#pkgver/$pkgver/" \ - "$pkgdir"/usr/lib/pkgconfig/$pkgname.pc +check() { + make check } -_py2() { - _py python2 +package() { + make PREFIX=/usr DESTDIR="$pkgdir" install } _py3() { - _py python3 + pkgdesc="$pkgdesc (for python3)" + install_if="$pkgname=$pkgver-r$pkgrel python3" + + cd "$builddir"/bindings/python + python3 setup_cython.py install --prefix=/usr --root="$subpkgdir" + + rm -rf "$subpkgdir"/usr/lib/python3*/site-packages/capstone/lib + rm -rf "$subpkgdir"/usr/lib/python3*/site-packages/capstone/include } -_py() { - local python="$1" - pkgdesc="$pkgdesc (for $python)" - install_if="$pkgname=$pkgver-r$pkgrel $python" +cstool() { + pkgdesc="cstool for capstone disassembler" - cd "$builddir/bindings/python" - $python setup.py install --prefix=/usr --root="$subpkgdir" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/cstool "$subpkgdir"/usr/bin } -sha512sums="a5c29e7c559b5391d6a4ec9a7f766699ea6d321aa2f1fc57fdcec893107fa3ef2f5f6323629971c1129f1ca087df4f3ad03d0a8234d2eae368c8ccfec04dbf4d capstone-3.0.4.tar.gz -87eacef80df36be18fe86f540a452b7e290c9dfc85d01c7926d263f2e5060f6d5fd6a6c68c350caf532f4926902a77fba24e59cb5e9b606be9706980ae4c8235 capstone.pc" +sha512sums="43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36 capstone-4.0.1.tar.gz" diff --git a/community/capstone/capstone.pc b/community/capstone/capstone.pc deleted file mode 100644 index d6c5d1ecde..0000000000 --- a/community/capstone/capstone.pc +++ /dev/null @@ -1,8 +0,0 @@ -libdir=/usr/lib -includedir=/usr/include - -Name: #pkgname -Version: #pkgver -Description: #pkgdesc -Libs: -L${libdir} -l#pkgname -Cflags: -I${includedir} |