Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s2e: add package #4386

Merged
merged 3 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
s2e
61 changes: 61 additions & 0 deletions packages/s2e/PKGBUILD
Original file line number Diff line number Diff line change
@@ -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
}