From e2a6cb7016c780e2e0abb47f12eb9a9f03dda831 Mon Sep 17 00:00:00 2001 From: John Zimmermann Date: Mon, 19 Jul 2021 06:34:12 -0500 Subject: [PATCH] ghidra: update to 10.0.1. --- srcpkgs/ghidra/patches/protoc.patch | 43 +++++++++++++++++++++++++++++ srcpkgs/ghidra/template | 14 +++++----- 2 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/ghidra/patches/protoc.patch diff --git a/srcpkgs/ghidra/patches/protoc.patch b/srcpkgs/ghidra/patches/protoc.patch new file mode 100644 index 000000000000..a3ab960346e3 --- /dev/null +++ b/srcpkgs/ghidra/patches/protoc.patch @@ -0,0 +1,43 @@ +--- ghidra-10.0.1/ghidra-Ghidra_10.0.1_build/Ghidra/Debug/Debugger-gadp/build.gradle 2021-07-08 12:16:19.000000000 -0500 ++++ - 2021-07-19 04:53:54.446268239 -0500 +@@ -27,7 +27,6 @@ + + configurations { + allProtocArtifacts +- protocArtifact + } + + def os = org.gradle.internal.os.OperatingSystem.current() +@@ -37,16 +36,6 @@ + allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe' + allProtocArtifacts 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe' + +- if (os.isWindows()) { +- protocArtifact 'com.google.protobuf:protoc:3.11.1:windows-x86_64@exe' +- } +- if (os.isLinux()) { +- protocArtifact 'com.google.protobuf:protoc:3.11.1:linux-x86_64@exe' +- } +- if (os.isMacOsX()) { +- protocArtifact 'com.google.protobuf:protoc:3.11.1:osx-x86_64@exe' +- } +- + api 'com.google.protobuf:protobuf-java:3.11.1' + api project(':Framework-AsyncComm') + api project(':Framework-Debugging') +@@ -70,14 +59,9 @@ + ext.outdir = file("build/generated/source/proto/main/java") + outputs.dir(outdir) + inputs.files(src) +- dependsOn(configurations.protocArtifact) + doLast { +- def exe = configurations.protocArtifact.first() +- if (!os.isWindows()) { +- exe.setExecutable(true) +- } + exec { +- commandLine exe, "--java_out=$outdir", "-I$srcdir" ++ commandLine '/usr/bin/protoc', "--java_out=$outdir", "-I$srcdir" + args src + } + } diff --git a/srcpkgs/ghidra/template b/srcpkgs/ghidra/template index 1ce08b9e2f28..7f4182f3730a 100644 --- a/srcpkgs/ghidra/template +++ b/srcpkgs/ghidra/template @@ -1,10 +1,10 @@ # Template file for 'ghidra' pkgname=ghidra -version=9.2.4 +version=10.0.1 revision=1 archs="x86_64*" create_wrksrc=yes -hostmakedepends="gradle openjdk11 flex unzip" +hostmakedepends="gradle openjdk11 flex unzip protobuf" depends="openjdk11" short_desc="Software reverse engineering (SRE) framework" maintainer="Andrew Benson " @@ -15,7 +15,7 @@ distfiles="https://github.com/NationalSecurityAgency/ghidra/archive/Ghidra_${ver https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.21/hfsexplorer-0_21-bin.zip https://sourceforge.net/projects/yajsw/files/yajsw/yajsw-stable-12.12/yajsw-stable-12.12.zip https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/AXMLPrinter2.jar" -checksum="d4cf5f8569a4bcdabd67a836e0a77eb8f1fdad3a1e25876502e07dd8415127f7 +checksum="37c5d0cb8d016860eb6dd3ec3aa1b81d22b7d2d42dd7d40cf4f2fcab2b0e0b43 7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc 90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf 1398fcb1e93abb19992c4fa06d7fe5758aabb4c45781d7ef306c6f57ca7a7321 @@ -45,12 +45,12 @@ python_version=2 #unverified do_configure() { cd ghidra-Ghidra_${version}_build - mkdir -p flatRepo - cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar flatRepo + mkdir -p dependencies/flatRepo + cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/AXMLPrinter2.jar dependencies/flatRepo for lib in csframework.jar hfsx_dmglib.jar hfsx.jar iharder-base64.jar; do - cp -f ../lib/$lib flatRepo + cp -f ../lib/$lib dependencies/flatRepo done - cp -f ../dex2jar-2.0/lib/dex-*.jar flatRepo + cp -f ../dex2jar-2.0/lib/dex-*.jar dependencies/flatRepo mkdir -p ${wrksrc}/ghidra.bin/Ghidra/Features/GhidraServer/ cp -f ${XBPS_SRCDISTDIR}/${pkgname}-${version}/yajsw-stable-12.12.zip ${wrksrc}/ghidra.bin/Ghidra/Features/GhidraServer/ gradle yajswDevUnpack