From df6917ceb9b0ceb352a05788ab938d3775b5526a Mon Sep 17 00:00:00 2001 From: Antonio Date: Sun, 29 Dec 2024 12:34:48 +0100 Subject: [PATCH] s2e: add package (#4386) * s2e: add package * Update to-release * Update PKGBUILD --- lists/to-release | 1 + packages/s2e/PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 packages/s2e/PKGBUILD diff --git a/lists/to-release b/lists/to-release index e69de29bb2d..093a62105a1 100644 --- a/lists/to-release +++ b/lists/to-release @@ -0,0 +1 @@ +s2e diff --git a/packages/s2e/PKGBUILD b/packages/s2e/PKGBUILD new file mode 100644 index 00000000000..f9e9dfbdac5 --- /dev/null +++ b/packages/s2e/PKGBUILD @@ -0,0 +1,61 @@ +# This file is part of BlackArch Linux ( https://www.blackarch.org/ ). +# See COPYING for license details. + +pkgname=s2e +pkgver=v2.0.0.r540.g799ad0b +pkgrel=1 +pkgdesc='A platform for multi-path program analysis with selective symbolic execution.' +arch=('x86_64' 'aarch64') +groups=('blackarch' 'blackarch-binary') +url='https://github.com/S2E/s2e' +license=('custom:cyberhaven') +makedepends=('git' 'repo' 'ca-certificates' 'cmake' 'curl' 'wget' +'python' 'python-pip' 'python-virtualenv' 'mingw-w64-gcc' 'lsb-release' +'autoconf' 'libtool' 'protobuf' 'protobuf-c' 'libdwarf' 'libelf' 'boost' +'zlib' 'jemalloc' 'nasm' 'pkgconf' 'memcached' 'postgresql-libs' 'glibc' +'binutils' 'boost-libs' 'pixman' 'glib2' 'gcc-multilib' 'gtest' 'rapidjson' +'capstone' 'unzip' 'zstd' 'python-sphinx_rtd_theme') +source=("git+https://github.com/S2E/$pkgname.git") +sha512sums=('SKIP') + +pkgver() { + cd $pkgname + + ( set -o pipefail + git describe --long --tags --abbrev=7 2>/dev/null | + sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "%s.%s" "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short=7 HEAD)" + ) +} + +prepare() { + cd $pkgname + + git config --global color.ui false + repo init -u https://github.com/s2e/manifest.git + repo sync --fail-fast +} + +build() { + cd $pkgname + + mkdir -p build + cd build + make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/llvm-release-make + export USE_Z3_BINARY=yes + make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/z3 + make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname stamps/libdwarf-make + + cd .. + + cd docs/sphinx + ./build.sh +} + +package() { + cd $pkgname + + make -f ../s2e/Makefile S2E_PREFIX=$pkgdir/usr/share/$pkgname install +} +