[arch-commits] Commit in unicorn/repos/community-x86_64 (PKGBUILD PKGBUILD)
Levente Polyak
anthraxx at gemini.archlinux.org
Thu Aug 18 19:32:04 UTC 2022
Date: Thursday, August 18, 2022 @ 19:32:03
Author: anthraxx
Revision: 1268504
archrelease: copy trunk to community-x86_64
Added:
unicorn/repos/community-x86_64/PKGBUILD
(from rev 1268503, unicorn/trunk/PKGBUILD)
Deleted:
unicorn/repos/community-x86_64/PKGBUILD
----------+
PKGBUILD | 172 +++++++++++++++++++++++++++++++------------------------------
1 file changed, 88 insertions(+), 84 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-18 19:31:57 UTC (rev 1268503)
+++ PKGBUILD 2022-08-18 19:32:03 UTC (rev 1268504)
@@ -1,84 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-
-pkgbase=unicorn
-pkgname=('unicorn' 'python-unicorn' 'ruby-unicorn-engine')
-pkgver=1.0.3
-pkgrel=5
-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')
-checkdepends=('cmocka')
-options=('staticlibs' '!emptydirs')
-source=(https://github.com/unicorn-engine/unicorn/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
-sha512sums=('10f1b5194358c65bc94723eaafd7b4167fee18f96a4810f46f8c78ed1ef5584546e66e8c910fa4eeadd791fcd73edea68f898e337081409fd188b4090b78a7ca')
-b2sums=('130d494d03aa9aa1b27e6806856eb36c1871af6e8b89aef9136baa6ca8b726ba2eab778488185e96c47bf3771dd8bce19bf4fd5090888d28433a6129c827d88c')
-
-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
- (cd bindings
- python const_generator.py python
- python const_generator.py ruby
- )
- (cd bindings/python
- python setup.py build
- )
- (cd bindings/ruby/unicorn_gem
- gem build unicorn-engine.gemspec
- )
-}
-
-check() {
- cd ${pkgbase}-${pkgver}
- # Tests are not supported right now, hope they get some love soon
- # make test
-}
-
-package_unicorn() {
- depends=('glibc')
- provides=('libunicorn.so')
- cd ${pkgbase}-${pkgver}
- make DESTDIR="${pkgdir}" install
- install -Dm 644 samples/*.c -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
-}
-
-package_python-unicorn() {
- depends=('python' 'unicorn')
- cd ${pkgbase}-${pkgver}/bindings/python
- python setup.py install --root="${pkgdir}" -O1 --skip-build
- rm -r "${pkgdir}"/usr/lib/python*/site-packages/unicorn/lib
- install -Dm 644 sample* shellcode.py -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
-}
-
-package_ruby-unicorn-engine() {
- depends=('ruby' 'unicorn')
- replaces=('ruby-unicorn')
- 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 -- \
- --with-opt-include="${srcdir}/${pkgbase}-${pkgver}/include" \
- --with-opt-lib="${srcdir}/${pkgbase}-${pkgver}"
-
- install -Dm 644 ../sample* -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
-
- cd "${pkgdir}/${_gemdir}"
- rm -r cache gems/unicorn-engine-${pkgver}/ext \
- extensions/*/*/unicorn-engine-${pkgver}/{mkmf.log,gem_make.out} \
- "${pkgdir}/${_gemdir}/doc/unicorn-engine-${pkgver}/ri/ext/"
-}
-
-# vim: ts=2 sw=2 et:
Copied: unicorn/repos/community-x86_64/PKGBUILD (from rev 1268503, unicorn/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-08-18 19:32:03 UTC (rev 1268504)
@@ -0,0 +1,88 @@
+# 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=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=('cmake' 'python' 'python-setuptools' 'ruby' 'ruby-rdoc')
+checkdepends=('cmocka')
+options=('!emptydirs' 'debug')
+source=(https://github.com/unicorn-engine/unicorn/archive/${pkgver}/${pkgbase}-${pkgver}.tar.gz)
+sha512sums=('3996f19755ccdaac6e92a7455160e1c90a592ffb789d55ddc9d1bdcf1e68e8a6150bcfa1025a322780c04878be8de28e0ad5fdd79a7b25887ed2793b769f6789')
+b2sums=('c16252a8a4af77c1c76c80101c30b92536d1677f93898acf4711e910dbbe1072715b83b4564c015592465eb51d00333e55849c3e06b07726ea3522286d8429bf')
+
+build() {
+ cd ${pkgbase}-${pkgver}
+ export UNICORN_CFLAGS="${CFLAGS} -ffat-lto-objects"
+ export UNICORN_QEMU_FLAGS="--extra-ldflags=\"$LDFLAGS\""
+ 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
+ )
+ (cd bindings/python
+ python setup.py build
+ )
+ (cd bindings/ruby/unicorn_gem
+ gem build unicorn-engine.gemspec
+ )
+}
+
+check() {
+ cd ${pkgbase}-${pkgver}
+ ctest --test-dir build --output-on-failure
+}
+
+package_unicorn() {
+ depends=('glibc')
+ provides=('libunicorn.so')
+ cd ${pkgbase}-${pkgver}
+ DESTDIR="${pkgdir}" cmake --install build
+ install -Dm 644 samples/*.c -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+}
+
+package_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
+ install -Dm 644 sample* shellcode.py -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+}
+
+package_ruby-unicorn-engine() {
+ depends=('ruby' 'unicorn')
+ replaces=('ruby-unicorn')
+ cd ${pkgbase}-${pkgver}/bindings/ruby/unicorn_gem
+
+ local _gemdir="$(gem env gemdir)"
+ 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}/build"
+
+ install -Dm 644 ../sample* -t "${pkgdir}/usr/share/doc/${pkgname}/samples"
+
+ cd "${pkgdir}/${_gemdir}"
+ rm -r cache gems/unicorn-engine-${pkgver}/ext \
+ extensions/*/*/unicorn-engine-${pkgver}/{mkmf.log,gem_make.out} \
+ "${pkgdir}/${_gemdir}/doc/unicorn-engine-${pkgver}/ri/ext/"
+}
+
+# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list