Skip to content

Commit

Permalink
[fex-emu] add package
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed Dec 4, 2024
1 parent a115608 commit 19a1b67
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 0 deletions.
106 changes: 106 additions & 0 deletions alarmcn/fex-emu/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Maintainer: Eric Engestrom <[email protected]>

pkgname=fex-emu
pkgver=2412
pkgrel=1
pkgdesc='Fast usermode x86 and x86-64 emulator for Arm64'
url=https://fex-emu.com
arch=(aarch64)
license=(MIT)
makedepends=(git cmake ninja clang llvm python-setuptools)
depends=(qt5-declarative qt5-quickcontrols squashfs-tools squashfuse erofs-utils)
source=("git+https://github.com/FEX-Emu/FEX#tag=FEX-$pkgver"
"git+https://github.com/catchorg/Catch2"
"git+https://github.com/KhronosGroup/Vulkan-Headers"
"git+https://github.com/Sonicadvance1/cpp-optparse"
"git+https://github.com/FEX-Emu/drm-headers"
"git+https://github.com/FEX-Emu/fex-gcc-target-tests-bins"
"git+https://github.com/FEX-Emu/fex-gvisor-tests-bins"
"git+https://github.com/FEX-Emu/fex-posixtest-bins"
"git+https://github.com/fmtlib/fmt"
"git+https://github.com/Sonicadvance1/imgui"
"git+https://github.com/FEX-Emu/jemalloc"
"git+https://github.com/FEX-Emu/robin-map"
"git+https://github.com/FEX-Emu/vixl"
"git+https://github.com/herumi/xbyak"
"git+https://github.com/Cyan4973/xxhash"
)
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'SKIP')

prepare() {
cd FEX
git submodule init
for f in \
Catch2 \
Vulkan-Headers \
drm-headers \
fex-gcc-target-tests-bins \
fex-gvisor-tests-bins \
fex-posixtest-bins \
fmt \
imgui \
jemalloc \
robin-map \
vixl \
xbyak \
xxhash \
;
do
git config submodule."External/$f".url "$srcdir/$f"
done

git config submodule."External/jemalloc_glibc".url "$srcdir/jemalloc"

for f in \
cpp-optparse \
;
do
git config submodule."Source/Common/$f".url "$srcdir/$f"
done

git -c protocol.file.allow=always submodule update
}

build() {
FEX_OPTIONS=()
FEX_OPTIONS+=(-D ENABLE_LTO=True)
FEX_OPTIONS+=(-D BUILD_TESTS=False)

if command -V ld.mold &>/dev/null
then
FEX_OPTIONS+=(-D USE_LINKER=True)
elif command -V ld.lld &>/dev/null
then
FEX_OPTIONS+=(-D USE_LINKER=lld)
fi

CC=clang \
CXX=clang++ \
cmake \
-S FEX -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_BUILD_TYPE=Release \
-D FMT_INSTALL=False \
"${FEX_OPTIONS[@]}"
ninja -C build
}

package() {
DESTDIR="$pkgdir" ninja -C build install

install -Dm644 "$srcdir"/FEX/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
14 changes: 14 additions & 0 deletions alarmcn/fex-emu/lilac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
maintainers:
- github: yuyichao

pre_build_script: update_pkgver_and_pkgrel(_G.newver.lstrip('FEX-'))

post_build: git_pkgbuild_commit

update_on:
- source: github
github: FEX-Emu/FEX
use_max_tag: true
include_regex: FEX-\d*
- source: manual
manual: 1

0 comments on commit 19a1b67

Please sign in to comment.