From 99f5a8c9c75db57c1bef41aa3be1c2999c41b1cc Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Thu, 5 Oct 2023 07:23:31 -0500 Subject: [PATCH 1/2] New package: jep-4.1.1 --- srcpkgs/jep/template | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 srcpkgs/jep/template diff --git a/srcpkgs/jep/template b/srcpkgs/jep/template new file mode 100644 index 00000000000000..22dcc3a1dfc3e2 --- /dev/null +++ b/srcpkgs/jep/template @@ -0,0 +1,21 @@ +# Template file for 'jep' +pkgname=jep +version=4.1.1 +revision=1 +build_style=python3-module +hostmakedepends="python3-setuptools openjdk17" +makedepends="python3-devel openjdk17" +short_desc="Embed Python in Java" +maintainer="Andrew Benson " +license="Zlib" +homepage="https://github.com/ninia/jep" +changelog="https://github.com/ninia/jep/releases" +distfiles="https://github.com/ninia/jep/archive/v${version}.tar.gz" +checksum=1ce29fbb40a168fa0803f4e325a790421d85262a179f90754395487171dbbb89 + +export JAVA_HOME=/usr/lib/jvm/openjdk17 +export LDFLAGS=-L${XBPS_CROSS_BASE}/usr/lib/jvm/openjdk17/lib/server + +post_install() { + ln -sf jep.so ${DESTDIR}/${py3_sitelib}/jep/libjep.so +} From def4a8865eac76707baaaa9eec2e3ddea456edc3 Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Thu, 5 Oct 2023 07:40:37 -0500 Subject: [PATCH 2/2] New package: Ghidrathon-3.0.1 --- srcpkgs/Ghidrathon/patches/dont-use-pip.patch | 10 ++++++++ srcpkgs/Ghidrathon/template | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 srcpkgs/Ghidrathon/patches/dont-use-pip.patch create mode 100644 srcpkgs/Ghidrathon/template diff --git a/srcpkgs/Ghidrathon/patches/dont-use-pip.patch b/srcpkgs/Ghidrathon/patches/dont-use-pip.patch new file mode 100644 index 00000000000000..88fe8faa9d3ba4 --- /dev/null +++ b/srcpkgs/Ghidrathon/patches/dont-use-pip.patch @@ -0,0 +1,10 @@ +--- a/build.gradle ++++ b/build.gradle +@@ -42,7 +42,6 @@ + // we need to copy the Jep native binaries built in installJep to our extension directory; we use a small + // utility script written in Python + task copyJepNativeBinaries(type: Exec) { +- dependsOn installJep + workingDir "${projectDir}" + commandLine pythonBin, "util${File.separator}configure_jep_native_binaries.py" + } diff --git a/srcpkgs/Ghidrathon/template b/srcpkgs/Ghidrathon/template new file mode 100644 index 00000000000000..6e44507928635c --- /dev/null +++ b/srcpkgs/Ghidrathon/template @@ -0,0 +1,24 @@ +# Template file for 'Ghidrathon' +pkgname=Ghidrathon +version=3.0.1 +revision=1 +hostmakedepends="gradle openjdk17 unzip jep" +makedepends="ghidra python3-devel" +depends="ghidra jep" +short_desc="Ghidra extension for Python3 support" +maintainer="Andrew Benson " +license="Apache-2.0" +homepage="https://github.com/mandiant/Ghidrathon" +changelog="https://github.com/mandiant/Ghidrathon/releases" +distfiles="https://github.com/mandiant/Ghidrathon/archive/v${version}.tar.gz" +checksum=9173f489f4a91569b9b36cf2f78e6b88af2189d742e658829cb492250b238c1f +nocross=yes # ghidra cannot be cross-compiled + +do_build() { + gradle -PGHIDRA_INSTALL_DIR=${XBPS_CROSS_BASE}/usr/libexec/ghidra +} + +do_install() { + vmkdir usr/libexec/ghidra/Ghidra/Extensions + unzip dist/*Ghidrathon*.zip -d ${DESTDIR}/usr/libexec/ghidra/Ghidra/Extensions +}