summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Pérami2021-11-18 19:52:19 +0000
committerThibaut Pérami2021-11-18 19:52:19 +0000
commitbb9ffd08915310f98d8a23f7ae348282be9d7080 (patch)
tree7e4e064e16c4096a158c1719245c4a020c01e7da
parent24dc5be55c3a941837b36c03a2c15fbc14d42d09 (diff)
downloadaur-bb9ffd08915310f98d8a23f7ae348282be9d7080.tar.gz
Update to 3.2.1 and move to dynamic libraries
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD44
2 files changed, 36 insertions, 19 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 04c9a5d60e7d..463decb9e198 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,16 @@
pkgbase = zydis
pkgdesc = The ultimate, open-source X86 & X86-64 decoder/disassembler library.
- pkgver = 3.1.0
+ pkgver = 3.2.1
pkgrel = 1
url = https://zydis.re
arch = x86_64
license = MIT
makedepends = cmake
- makedepends = git
depends = gcc-libs
- source = zydis::git+https://github.com/zyantific/zydis#tag=v3.1.0
- sha256sums = SKIP
+ provides = libZydis.so
+ source = https://github.com/zyantific/zydis/archive/v3.2.1.tar.gz
+ source = https://github.com/zyantific/zycore-c/archive/6c93d9a38e62d4db82f99bf99159e1ee78341e36.zip
+ sha256sums = 349a2d27270e54499b427051dd45f7b6064811b615588414b096cdeeaeb730ad
+ sha256sums = 8876347e44f4cfdd49b0ce13d150b0715b9cf326d85627f444a4313f4c58be41
pkgname = zydis
-
diff --git a/PKGBUILD b/PKGBUILD
index 960e0242a09e..c1b67090c07e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,48 @@
-# Maintainer: Thibaut Pérami <thibaut.perami@ens.fr>
+# Maintainer: Thibaut Pérami <thibaut.perami@cl.cam.ac.uk>
pkgname=zydis
-pkgver=3.1.0
+pkgver=3.2.1
pkgrel=1
pkgdesc="The ultimate, open-source X86 & X86-64 decoder/disassembler library."
arch=('x86_64')
url="https://zydis.re"
license=('MIT')
depends=('gcc-libs')
-makedepends=('cmake' 'git')
-source=("${pkgname%-git}"::"git+https://github.com/zyantific/zydis#tag=v${pkgver}")
-sha256sums=('SKIP')
+provides=('libZydis.so')
+makedepends=('cmake')
+
+# The released version of ZyCore is not recent enough to compile the released version of ZyDis.
+# The hackish workaround is to download the target commit of version 3.2.1 for ZyCore.
+# This will need to be updated when ZyCore gets officially updated.
+source=("https://github.com/zyantific/zydis/archive/v${pkgver}.tar.gz" "https://github.com/zyantific/zycore-c/archive/6c93d9a38e62d4db82f99bf99159e1ee78341e36.zip")
+sha256sums=('349a2d27270e54499b427051dd45f7b6064811b615588414b096cdeeaeb730ad' '8876347e44f4cfdd49b0ce13d150b0715b9cf326d85627f444a4313f4c58be41')
+zycore=zycore-c-6c93d9a38e62d4db82f99bf99159e1ee78341e36
prepare() {
- cd "${pkgname}"
- git submodule update --init
+ cd "${pkgname}-${pkgver}"
}
build() {
- cd "${pkgname}"
- cmake -DCMAKE_INSTALL_PREFIX=/usr -B build
+ cd ${zycore}
+ cmake -B build -Wno-dev\
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DZYCORE_BUILD_SHARED_LIB=ON
+ cmake --build build
+ cd ..
+
+ cd "${pkgname}-${pkgver}"
+ cmake -B build -Wno-dev\
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DZYDIS_BUILD_SHARED_LIB=ON \
+ -DZYDIS_ZYCORE_PATH=../${zycore} #HACK
cmake --build build
}
package() {
- cd "${pkgname}/build"
- make DESTDIR="${pkgdir}" install
- # Maybe put that in a separate pakage.
- cd "zycore"
- make DESTDIR="${pkgdir}" install
+ cd ${zycore}
+ DESTDIR="${pkgdir}" cmake --install build
+ cd ..
+ cd "${pkgname}-${pkgver}"
+ DESTDIR="${pkgdir}" cmake --install build
+ install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE
}