[arch-commits] Commit in unicorn/trunk (PKGBUILD)

Levente Polyak anthraxx at gemini.archlinux.org
Thu Aug 18 19:31:58 UTC 2022


    Date: Thursday, August 18, 2022 @ 19:31:57
  Author: anthraxx
Revision: 1268503

upgpkg: unicorn 2.0.0-1

Modified:
  unicorn/trunk/PKGBUILD

----------+
 PKGBUILD |   48 ++++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-08-18 19:31:54 UTC (rev 1268502)
+++ PKGBUILD	2022-08-18 19:31:57 UTC (rev 1268503)
@@ -1,33 +1,32 @@
 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
 
 pkgbase=unicorn
 pkgname=('unicorn' 'python-unicorn' 'ruby-unicorn-engine')
-pkgver=1.0.3
-pkgrel=5
+pkgver=2.0.0
+pkgrel=1
 pkgdesc='Lightweight, multi-platform, multi-architecture CPU emulator framework based on QEMU'
 url='https://www.unicorn-engine.org'
 arch=('x86_64')
 license=('GPL2')
-makedepends=('python' 'python-setuptools' 'ruby' 'ruby-rdoc')
+makedepends=('cmake' 'python' 'python-setuptools' 'ruby' 'ruby-rdoc')
 checkdepends=('cmocka')
-options=('staticlibs' '!emptydirs')
+options=('!emptydirs' 'debug')
 source=(https://github.com/unicorn-engine/unicorn/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
-sha512sums=('10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca')
-b2sums=('130d494d03aa9aa1b27e6806856eb36c1871af6e8b89aef9136baa6ca8b726ba2eab778488185e96c47bf3771dd8bce19bf4fd5090888d28433a6129c827d88c')
+sha512sums=('3996f19755ccdaac6e92a7455160e1c90a592ffb789d55ddc9d1bdcf1e68e8a6150bcfa1025a322780c04878be8de28e0ad5fdd79a7b25887ed2793b769f6789')
+b2sums=('c16252a8a4af77c1c76c80101c30b92536d1677f93898acf4711e910dbbe1072715b83b4564c015592465eb51d00333e55849c3e06b07726ea3522286d8429bf')
 
-prepare() {
-  cd ${pkgbase}-${pkgver}
-  sed 's|-g ||g' -i qemu/configure
-  sed 's|UNICORN_DEBUG ?= yes|UNICORN_DEBUG ?= no|g' -i config.mk
-  sed 's|VERSION = "1.0.1"|VERSION = "'${pkgver}'"|' -i bindings/ruby/unicorn_gem/lib/unicorn_engine/version.rb
-}
-
 build() {
   cd ${pkgbase}-${pkgver}
-  export unicorn_LDFLAGS="${LDFLAGS}"
   export UNICORN_CFLAGS="${CFLAGS} -ffat-lto-objects"
   export UNICORN_QEMU_FLAGS="--extra-ldflags=\"$LDFLAGS\""
-  make
+  export QEMU_CXXFLAGS="${CXXFLAGS}"
+  export QEMU_LDFLAGS="${LDFLAGS}"
+  cmake -B build \
+      -DCMAKE_BUILD_TYPE=None \
+      -DCMAKE_INSTALL_PREFIX=/usr \
+      -Wno-dev
+  cmake --build build
   (cd bindings
     python const_generator.py python
     python const_generator.py ruby
@@ -42,8 +41,7 @@
 
 check() {
   cd ${pkgbase}-${pkgver}
-  # Tests are not supported right now, hope they get some love soon
-  # make test
+  ctest --test-dir build --output-on-failure
 }
 
 package_unicorn() {
@@ -50,12 +48,12 @@
   depends=('glibc')
   provides=('libunicorn.so')
   cd ${pkgbase}-${pkgver}
-  make DESTDIR="${pkgdir}" install
+  DESTDIR="${pkgdir}" cmake --install build
   install -Dm 644 samples/*.c -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
 }
 
 package_python-unicorn() {
-  depends=('python' 'unicorn')
+  depends=('python' 'unicorn' 'python-setuptools')
   cd ${pkgbase}-${pkgver}/bindings/python
   python setup.py install --root="${pkgdir}" -O1 --skip-build
   rm -r "${pkgdir}"/usr/lib/python*/site-packages/unicorn/lib
@@ -68,10 +66,16 @@
   cd ${pkgbase}-${pkgver}/bindings/ruby/unicorn_gem
 
   local _gemdir="$(gem env gemdir)"
-  gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
-    -n "${pkgdir}/usr/bin" ${pkgbase}-*.gem -- \
+  gem install \
+    --local \
+    --verbose \
+    --ignore-dependencies \
+    --no-user-install \
+    --install-dir "${pkgdir}${_gemdir}" \
+    --bindir "${pkgdir}/usr/bin" \
+    ${pkgbase}-*.gem -- \
     --with-opt-include="${srcdir}/${pkgbase}-${pkgver}/include" \
-    --with-opt-lib="${srcdir}/${pkgbase}-${pkgver}"
+    --with-opt-lib="${srcdir}/${pkgbase}-${pkgver}/build"
 
   install -Dm 644 ../sample* -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
 



More information about the arch-commits mailing list