devel/ghidra: update 9.1 → 11.1.2, take maintainership

Port was FORBIDDEN, updated last time in 2019, maintainer is innactive.
Tamas Szakaly <sghctoma@gmail.com>, thanks for you work, hope you come
back to FreeBSD porters team!

Install share/ghidra/support/launch.properties as a @sample file.

Changelogs:
https://htmlpreview.github.io/?https://raw.githubusercontent.com/NationalSecurityAgency/ghidra/Ghidra_11.1.2_build/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html

PR:	280378 275383 244345
MFH:	2024Q3
This commit is contained in:
gatekeeper 2024-07-26 23:31:11 +03:00 committed by Vladimir Druzenko
parent 0d6d385a02
commit e2b8d2a617
23 changed files with 4731 additions and 528 deletions

View file

@ -1,118 +1,69 @@
PORTNAME= ghidra
DISTVERSIONPREFIX= Ghidra_
DISTVERSION= 9.1
DISTVERSIONSUFFIX= _build
DISTVERSION= 11.1.2
CATEGORIES= devel security java
MASTER_SITES= SF/yajsw/yajsw/yajsw-stable-12.12/:yajsw \
SF/catacombae/HFSExplorer/0.21/:hfsexplorer \
https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/android4me/:axml2printer \
https://github.com/pxb1988/dex2jar/releases/download/2.0/:dex2jar
DISTFILES= yajsw-stable-12.12.zip:yajsw \
hfsexplorer-0_21-bin.zip:hfsexplorer \
AXMLPrinter2.jar:axml2printer \
dex-tools-2.0.zip:dex2jar
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MASTER_SITES= https://github.com/NationalSecurityAgency/${PORTNAME}/releases/download/Ghidra_${DISTVERSION}_build/
DISTNAME= ${PORTNAME}_${DISTVERSION}_PUBLIC_20240709
MAINTAINER= sghctoma@gmail.com
MAINTAINER= tiago.gasiba@gmail.com
COMMENT= Software reverse engineering (SRE) framework
WWW= https://ghidra-sre.org/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
FORBIDDEN= outdated and contains a remote code injection
ONLY_FOR_ARCHS= amd64
EXTRACT_DEPENDS= ${UNZIP_CMD}:archivers/unzip
BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
bash:shells/bash \
flex:textproc/flex \
fop:textproc/fop \
gradle5>=5.0:devel/gradle5
RUN_DEPENDS= bash:shells/bash
BUILD_DEPENDS= bash:shells/bash \
gradle>=8.5:devel/gradle
RUN_DEPENDS= bash:shells/bash
USES= bison cpe shebangfix
USES= cpe shebangfix zip
CPE_VENDOR= nsa
USE_GITHUB= yes
GH_ACCOUNT= NationalSecurityAgency
USE_JAVA= yes
JAVA_VERSION= 11+
JAVA_BUILD= yes
JAVA_RUN= yes
JAVA_VERSION= 17+
SHEBANG_FILES= Ghidra/RuntimeScripts/Common/server/jaas_external_program.example.sh \
Ghidra/RuntimeScripts/Linux/* \
Ghidra/RuntimeScripts/Linux/server/* \
Ghidra/RuntimeScripts/Linux/support/*
SHEBANG_FILES= Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/local-gdb.sh \
Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/qemu-gdb.sh \
Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdb.sh \
Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/ssh-gdbserver.sh \
Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers/wine-gdb.sh \
Ghidra/Features/BSim/make-postgres.sh \
server/jaas_external_program.example.sh \
support/GhidraGo/ghidraGo
WRKSRC= ${WRKDIR}/${PORTNAME}_${DISTVERSION}_PUBLIC
# Gradle cache path must be absolute (see https://github.com/gradle/gradle/issues/1338)
GRADLE_HOME_BASE= /tmp
GRADLE_RUN= ${SETENV} ${MAKE_ENV} gradle5 --gradle-user-home \
GRADLE_RUN= ${SETENV} ${MAKE_ENV} gradle --gradle-user-home \
${GRADLE_HOME_BASE}/gradle-${PORTNAME} --no-daemon
# to rebuild the deps archive:
# 1. set DEV_UPDATE_MODE=yes
# 2. make makesum build
# 3. upload the *-deps archive
# 4. set DEV_UPDATE_MODE=no
# 5. make clean makesum
BUILD_SUBDIR= build/os/freebsd_x86_64
TMP_DIRS= Ghidra/Ghidra/.gradle Ghidra/Features/Decompiler/build/objs \
Ghidra/Features/Decompiler/build/tmp \
Ghidra/Features/FileFormats/build/objs \
Ghidra/Features/FileFormats/build/tmp GPL/.gradle \
GPL/DemanglerGnu/build/objs GPL/DemanglerGnu/build/tmp
DEV_UPDATE_MODE= no
.if (${DEV_UPDATE_MODE} == "no")
MASTER_SITES+= https://github.com/sghctoma/ghidra-deps/raw/master/:gradle
DISTFILES+= ${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}:gradle
EXTRACT_ONLY+= ${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}
GRADLE_RUN+= --offline
.endif
post-extract:
@${MKDIR} ${WRKDIR}/flatrepo
@${MKDIR} ${WRKDIR}/dummy.home
@${CP} ${DISTDIR}/${DIST_SUBDIR}/AXMLPrinter2.jar ${WRKDIR}/flatrepo
@${UNZIP_CMD} -j -d ${WRKDIR}/flatrepo ${DISTDIR}/${DIST_SUBDIR}/hfsexplorer-0_21-bin.zip \
lib/csframework.jar lib/hfsx_dmglib.jar lib/hfsx.jar lib/iharder-base64.jar
@${UNZIP_CMD} -j -d ${WRKDIR}/flatrepo ${DISTDIR}/${DIST_SUBDIR}/dex-tools-2.0.zip "dex2jar-2.0/lib/dex-*.jar"
@${MKDIR} ${WRKDIR}/ghidra.bin/Ghidra/Features/GhidraServer/
@${CP} ${DISTDIR}/${DIST_SUBDIR}/yajsw-stable-12.12.zip ${WRKDIR}/ghidra.bin/Ghidra/Features/GhidraServer/
.if (${DEV_UPDATE_MODE} == "no")
@${LN} -sf ${WRKDIR}/gradle-${PORTNAME} ${GRADLE_HOME_BASE}
.endif
post-patch:
@${REINPLACE_CMD} -e "s|/usr/share/sgml/docbook/xsl-stylesheets|${LOCALBASE}/share/xsl/docbook/|g" \
${WRKSRC}/Ghidra/Features/Decompiler/src/main/doc/*.xsl \
${WRKSRC}/Ghidra/Features/FunctionID/src/main/doc/*.xsl
@${REINPLACE_CMD} -e "s|JAVA_HOME_PLACEHOLDER|${JAVA_HOME}|" \
${WRKSRC}/Ghidra/RuntimeScripts/Linux/support/launch.sh
@${ECHO_CMD} "org.gradle.java.home=${JAVA_HOME}" > ${WRKSRC}/gradle.properties
STRIP_FILES= Ghidra/Features/FileFormats/${BUILD_SUBDIR}/lzfse \
Ghidra/Features/Decompiler/${BUILD_SUBDIR}/decompile \
Ghidra/Features/Decompiler/${BUILD_SUBDIR}/sleigh \
GPL/DemanglerGnu/${BUILD_SUBDIR}/demangler_gnu_v2_24 \
GPL/DemanglerGnu/${BUILD_SUBDIR}/demangler_gnu_v2_41
do-build:
@cd ${WRKSRC} && ${GRADLE_RUN} yajswDevUnpack buildGhidra
.if (${DEV_UPDATE_MODE} == "yes")
post-build:
cd ${GRADLE_HOME_BASE} && ${TAR} czf ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX} gradle-${PORTNAME}
@${ECHO} "(!!!) Please upload the Gradle deps archive: ${DISTDIR}/${DIST_SUBDIR}/${PORTNAME}-${DISTVERSION}-deps${EXTRACT_SUFX}"
@${RM} -r ${GRADLE_HOME_BASE}/gradle-${PORTNAME}
.endif
@cd ${WRKSRC}/Ghidra && ${GRADLE_RUN} buildNatives
@cd ${WRKSRC}/GPL/DemanglerGnu && ${GRADLE_RUN} build
do-install:
@${UNZIP_CMD} -d ${STAGEDIR} ${WRKSRC}/build/dist/*.zip
@${MV} ${STAGEDIR}/ghidra* ${STAGEDIR}${DATADIR}
@${RLN} ${STAGEDIR}/${DATADIR}/ghidraRun ${STAGEDIR}${PREFIX}/bin/ghidra
@${RLN} ${STAGEDIR}/${DATADIR}/server/ghidraSvr ${STAGEDIR}${PREFIX}/bin/ghidra-server
@${STRIP_CMD} ${STAGEDIR}/${DATADIR}/GPL/DemanglerGnu/os/freebsd64/demangler_gnu
@${STRIP_CMD} ${STAGEDIR}/${DATADIR}/Ghidra/Features/Decompiler/os/freebsd64/decompile
@${STRIP_CMD} ${STAGEDIR}/${DATADIR}/Ghidra/Features/Decompiler/os/freebsd64/sleigh
post-install:
@${FIND} ${STAGEDIR} ! -type d | \
${SED} 's,${STAGEDIR}${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} -ds ${STAGEDIR}${DATADIR} -type d -empty | \
${SED} 's,${STAGEDIR}${PREFIX}/,, ; s,^,@dir ,' >> ${TMPPLIST}
.for F in ${TMP_DIRS}
${RM} -r ${WRKSRC}/${F}
.endfor
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}
${RLN} ${STAGEDIR}${DATADIR}/ghidraRun ${STAGEDIR}/${PREFIX}/bin/ghidra
.for F in ${STRIP_FILES}
${STRIP_CMD} ${STAGEDIR}${DATADIR}/${F}
.endfor
cd ${STAGEDIR}${DATADIR}/support && ${MV} launch.properties launch.properties.sample
.include <bsd.port.mk>

View file

@ -1,13 +1,3 @@
TIMESTAMP = 1572919336
SHA256 (ghidra/yajsw-stable-12.12.zip) = 1398fcb1e93abb19992c4fa06d7fe5758aabb4c45781d7ef306c6f57ca7a7321
SIZE (ghidra/yajsw-stable-12.12.zip) = 25051676
SHA256 (ghidra/hfsexplorer-0_21-bin.zip) = 90c9b54798abca5b12f4a678db7d0a4c970f4702cb153c11919536d0014dedbf
SIZE (ghidra/hfsexplorer-0_21-bin.zip) = 1473278
SHA256 (ghidra/AXMLPrinter2.jar) = 00ed038eb6abaf6ddec8d202a3ed7a81b521458f4cd459948115cfd02ff59d6d
SIZE (ghidra/AXMLPrinter2.jar) = 24552
SHA256 (ghidra/dex-tools-2.0.zip) = 7907eb4d6e9280b6e17ddce7ee0507eae2ef161ee29f70a10dbc6944fdca75bc
SIZE (ghidra/dex-tools-2.0.zip) = 2362460
SHA256 (ghidra/ghidra-9.1-deps.tar.gz) = 8ba91101c365bbd180884721a9e329a804d4e12c5cec51e7fa275c88d8e8ba02
SIZE (ghidra/ghidra-9.1-deps.tar.gz) = 57584763
SHA256 (ghidra/NationalSecurityAgency-ghidra-Ghidra_9.1_build_GH0.tar.gz) = 1cead115fce1e06ce3646ba3df7eb06a221405322ba2cda6197a6a5ae45dd0e0
SIZE (ghidra/NationalSecurityAgency-ghidra-Ghidra_9.1_build_GH0.tar.gz) = 59599279
TIMESTAMP = 1721402829
SHA256 (ghidra_11.1.2_PUBLIC_20240709.zip) = 219ec130b901645779948feeb7cc86f131dd2da6c36284cf538c3a7f3d44b588
SIZE (ghidra_11.1.2_PUBLIC_20240709.zip) = 422385730

View file

@ -1,18 +0,0 @@
--- GPL/CabExtract/build.gradle.orig 2019-11-04 12:59:19 UTC
+++ GPL/CabExtract/build.gradle
@@ -58,7 +58,7 @@ task configureCabExtract (type: Exec) {
* The cabextract tool requires that its 'configure' script is called before make.
*********************************************************************************/
def currentPlatform = getCurrentPlatformName()
-if (['linux64', 'osx64'].contains(currentPlatform)) {
+if (['linux64', 'osx64', 'freebsd64'].contains(currentPlatform)) {
def makeName = "${currentPlatform}CabExtractMake" // native Make task found automatically
@@ -75,4 +75,4 @@ if (['linux64', 'osx64'].contains(currentPlatform)) {
delete file("build/unpack/${cabextract}")
}
}
-}
\ No newline at end of file
+}

View file

@ -1,31 +0,0 @@
--- GPL/DemanglerGnu/build.gradle.orig 2019-10-23 20:54:54 UTC
+++ GPL/DemanglerGnu/build.gradle
@@ -32,6 +32,10 @@ model {
architecture 'x86_64'
operatingSystem 'osx'
}
+ freebsd64 {
+ architecture 'x86_64'
+ operatingSystem 'freebsd'
+ }
}
}
@@ -72,6 +76,7 @@ model {
targetPlatform "win64"
targetPlatform "linux64"
targetPlatform "osx64"
+ targetPlatform "freebsd64"
sources {
c {
source {
@@ -88,6 +93,9 @@ model {
}
model {
+ toolChains {
+ clang(Clang)
+ }
binaries {
all{ b ->
if (toolChain in Gcc) {

View file

@ -1,32 +0,0 @@
--- GPL/GnuDisassembler/buildGdis.gradle.orig 2019-11-04 13:11:50 UTC
+++ GPL/GnuDisassembler/buildGdis.gradle
@@ -6,7 +6,7 @@
defaultTasks 'assemble'
-ext.supportedPlatforms = ['osx64', 'linux64']
+ext.supportedPlatforms = ['osx64', 'linux64', 'freebsd64']
ext.binutilsResource = new File("${binutilsLocation}/${binutils}.tar.bz2")
@@ -31,6 +31,10 @@ model {
architecture 'x86_64'
operatingSystem 'osx'
}
+ freebsd64 {
+ architecture 'x86_64'
+ operatingSystem 'freebsd'
+ }
}
components {
@@ -65,6 +69,9 @@ model {
}
tasks.compileGdisLinux64ExecutableGdisC {
dependsOn 'copyBinutilsArtifcats_linux64'
+ }
+ tasks.compileGdisFreeBSD64ExecutableGdisC {
+ dependsOn 'copyBinutilsArtifcats_freebsd64'
}
}

View file

@ -1,23 +0,0 @@
--- GPL/gpl.gradle.orig 2019-11-04 13:00:14 UTC
+++ GPL/gpl.gradle
@@ -6,7 +6,7 @@ project.ext.BIN_REPO = file("../../../ghidra.bin").abs
* Create a set containing all the platforms we need when building native
* artifacts.
****************************************************************************/
-project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64"])
+project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64", "freebsd64"])
/****************************************************************************
* Establish Visual Studio configuration environment for Windows native builds
@@ -43,6 +43,11 @@ ext.getCurrentPlatformName = {
return 'osx64'
}
}
+ else if (osName.startsWith("FreeBSD")) {
+ if (isX86_64) {
+ return 'freebsd64'
+ }
+ }
throw new GradleException("Unrecognized current platform -> osName = $osName, archName = $archName")
}
/******************************************************************************************

View file

@ -1,13 +1,22 @@
--- GPL/nativeBuildProperties.gradle.orig 2019-10-23 20:54:54 UTC
--- GPL/nativeBuildProperties.gradle.orig 2024-07-09 10:18:28 UTC
+++ GPL/nativeBuildProperties.gradle
@@ -39,6 +39,10 @@ model {
architecture 'x86_64'
operatingSystem 'osx'
@@ -53,12 +53,16 @@ model {
}
}
if (isCurrentFreeBSD()) {
- gcc(Gcc) {
+ clang(Clang) {
if (isCurrentArm_64()) {
- target("freebsd_arm_64")
+ target("freebsd_arm_64") {
+ cCompiler.executable = 'clang'
+ }
}
else {
- target("freebsd_x86_64")
+ target("freebsd_x86_64") {
+ cCompiler.executable = 'clang'
+ }
}
}
}
+ freebsd64 {
+ architecture 'x86_64'
+ operatingSystem 'freebsd'
+ }
}
}

View file

@ -1,10 +0,0 @@
--- GhidraBuild/Skeleton/certification.manifest.orig 2019-10-23 20:54:54 UTC
+++ GhidraBuild/Skeleton/certification.manifest
@@ -15,6 +15,7 @@ extension.properties||GHIDRA||||END|
ghidra_scripts/README.txt||GHIDRA||||END|
lib/README.txt||GHIDRA||||END|
os/linux64/README.txt||GHIDRA||||END|
+os/freebsd64/README.txt||GHIDRA||||END|
os/osx64/README.txt||GHIDRA||||END|
os/win64/README.txt||GHIDRA||||END|
src/main/help/help/TOC_Source.xml||GHIDRA||||END|

View file

@ -1,6 +0,0 @@
--- GhidraBuild/Skeleton/os/freebsd64/README.txt.orig 2019-04-08 17:58:11 UTC
+++ GhidraBuild/Skeleton/os/freebsd64/README.txt
@@ -0,0 +1,3 @@
+The "os/freebsd64" directory is intended to hold FreeBSD native binaries
+which this module is dependent upon. This directory may be eliminated for a specific
+module if native binaries are not provided for the corresponding platform.

View file

@ -1,28 +0,0 @@
--- Ghidra/Features/Decompiler/build.gradle.orig 2019-10-23 20:54:54 UTC
+++ Ghidra/Features/Decompiler/build.gradle
@@ -210,7 +210,8 @@ task buildDecompilerDocumentationHtml(type: Exec) {
// Check the OS before executing command.
doFirst {
if ( !(org.gradle.internal.os.OperatingSystem.current().isLinux()
- || org.gradle.internal.os.OperatingSystem.current().isMacOsX())) {
+ || org.gradle.internal.os.OperatingSystem.current().isMacOsX()
+ || org.gradle.internal.os.OperatingSystem.current().getName().contains("FreeBSD"))) {
throw new TaskExecutionException( it,
new Exception( "The '$it.name' task only works on Linux or Mac Os X" ))
}
@@ -248,6 +249,7 @@ model {
targetPlatform "win64"
targetPlatform "linux64"
targetPlatform "osx64"
+ targetPlatform "freebsd64"
sources {
cpp {
source {
@@ -345,6 +347,7 @@ model {
targetPlatform "win64"
targetPlatform "linux64"
targetPlatform "osx64"
+ targetPlatform "freebsd64"
sources {
cpp {
source {

View file

@ -1,13 +0,0 @@
--- Ghidra/Features/Decompiler/src/decompile/cpp/Makefile.orig 2019-11-04 12:40:52 UTC
+++ Ghidra/Features/Decompiler/src/decompile/cpp/Makefile
@@ -33,8 +33,8 @@ ifeq ($(OS),Darwin)
OSDIR=osx64
endif
-CC=gcc
-CXX=g++
+CC?=cc
+CXX?=c++
# Debug flags
DBG_CXXFLAGS=-g -Wall -Wno-sign-compare

View file

@ -1,12 +0,0 @@
--- Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_bfd.hh.orig 2019-11-04 12:39:57 UTC
+++ Ghidra/Features/Decompiler/src/decompile/cpp/loadimage_bfd.hh
@@ -21,6 +21,9 @@
#define __LOADIMAGE_BFD__
#include "loadimage.hh"
+
+#define PACKAGE
+#define PACKAGE_VERSION
#include <bfd.h>
struct ImportRecord {

View file

@ -1,39 +0,0 @@
--- Ghidra/Features/Decompiler/src/decompile/cpp/types.h.orig 2019-10-23 20:54:54 UTC
+++ Ghidra/Features/Decompiler/src/decompile/cpp/types.h
@@ -101,6 +101,36 @@ typedef char int1;
typedef uint8 uintp;
#endif
+#if defined (__FreeBSD__) && defined (__i386__)
+#define HOST_ENDIAN 0
+typedef unsigned long uintm;
+typedef long intm;
+typedef unsigned long long uint8;
+typedef long long int8;
+typedef unsigned int uint4;
+typedef int int4;
+typedef unsigned short uint2;
+typedef short int2;
+typedef unsigned char uint1;
+typedef char int1;
+typedef uint4 uintp;
+#endif
+
+#if defined (__FreeBSD__) && defined (__x86_64__)
+#define HOST_ENDIAN 0
+typedef unsigned int uintm;
+typedef int intm;
+typedef unsigned long uint8;
+typedef long int8;
+typedef unsigned int uint4;
+typedef int int4;
+typedef unsigned short uint2;
+typedef short int2;
+typedef unsigned char uint1;
+typedef char int1;
+typedef uint8 uintp;
+#endif
+
#if defined(_WINDOWS)
#if defined(_WIN64)

View file

@ -1,33 +0,0 @@
--- Ghidra/Features/FunctionID/build.gradle.orig 2019-10-23 20:54:54 UTC
+++ Ghidra/Features/FunctionID/build.gradle
@@ -75,7 +75,7 @@ task buildFidDocumentationPdf(type: Exec) {
cp $installPoint/topics/FunctionID/images/*.png $buildDir/images
echo '** Building FunctionID.fo **'
- xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1
+ xsltproc --output $buildDir/fid_withscaling.xml --stringparam profile.condition "withscaling" /usr/local/share/xsl/docbook/profiling/profile.xsl fid.xml 2>&1
xsltproc --output $buildDir/FunctionID.fo fid_pdf.xsl $buildDir/fid_withscaling.xml 2>&1
echo '** Building FunctionID.pdf **'
@@ -98,9 +98,10 @@ task buildFidDocumentationPdf(type: Exec) {
// Check the OS before executing command.
doFirst {
if ( !(org.gradle.internal.os.OperatingSystem.current().isLinux()
- || org.gradle.internal.os.OperatingSystem.current().isMacOsX())) {
+ || org.gradle.internal.os.OperatingSystem.current().isMacOsX()
+ || org.gradle.internal.os.OperatingSystem.current().getName().contains("FreeBSD"))) {
throw new TaskExecutionException( it,
- new Exception( "The '$it.name' task only works on Linux or Mac Os X" ))
+ new Exception( "The '$it.name' task only works on Linux, FreeBSD or Mac Os X" ))
}
}
@@ -142,7 +143,7 @@ task buildFidDocumentationHtml(type: Exec) {
rm -f $installPoint/topics/FunctionID/*.html
echo '** Building html files **'
- xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" /usr/share/sgml/docbook/xsl-stylesheets/profiling/profile.xsl fid.xml 2>&1
+ xsltproc --output $buildDir/fid_noscaling.xml --stringparam profile.condition "noscaling" /usr/local/share/xsl/docbook/profiling/profile.xsl fid.xml 2>&1
xsltproc --stringparam base.dir ${installPoint}/topics/FunctionID/ fid_html.xsl $buildDir/fid_noscaling.xml 2>&1
sed -i -e '/Frontpage.css/ { p; s/Frontpage.css/languages.css/; }' ${installPoint}/topics/FunctionID/*.html

View file

@ -1,36 +0,0 @@
--- Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java.orig 2019-10-23 20:54:54 UTC
+++ Ghidra/Framework/Generic/src/main/java/ghidra/framework/Platform.java
@@ -70,7 +70,17 @@ public enum Platform {
*/
MAC_UNKNOWN(OperatingSystem.MAC_OS_X, Architecture.UNKNOWN, "osx64", ".dylib", ""),
+ /**
+ * Identifies a FreeBSD OS.
+ */
+ FREEBSD_32(OperatingSystem.FREEBSD, Architecture.X86, "freebsd32", ".so", ""),
+
/**
+ * Identifies a FreeBSD OS.
+ */
+ FREEBSD_64(OperatingSystem.FREEBSD, Architecture.X86_64, "freebsd64", ".so", ""),
+
+ /**
* Identifies an unsupported OS.
*/
UNSUPPORTED(OperatingSystem.UNSUPPORTED, Architecture.UNKNOWN, null, null, "");
@@ -144,6 +154,15 @@ public enum Platform {
paths.add("/usr/lib");
paths.add("/usr/X11R6/bin");
paths.add("/usr/X11R6/lib");
+ }
+ else if (operatingSystem == OperatingSystem.FREEBSD) {
+ paths.add("/bin");
+ paths.add("/lib");
+ paths.add("/usr/bin");
+ paths.add("/usr/lib");
+ paths.add("/usr/local/bin");
+ paths.add("/usr/local/lib");
+ paths.add("/usr/local/lib/compat");
}
else if (CURRENT_PLATFORM == WIN_64) {
String windir = System.getenv("SystemRoot");

View file

@ -1,10 +0,0 @@
--- Ghidra/Framework/Utility/src/main/java/ghidra/framework/OperatingSystem.java.orig 2019-10-23 20:54:54 UTC
+++ Ghidra/Framework/Utility/src/main/java/ghidra/framework/OperatingSystem.java
@@ -20,6 +20,7 @@ public enum OperatingSystem {
WINDOWS("Windows"),
LINUX("Linux"),
MAC_OS_X("Mac OS X"),
+ FREEBSD("FreeBSD"),
UNSUPPORTED("Unsupported Operating System");
/**

View file

@ -1,10 +0,0 @@
--- Ghidra/RuntimeScripts/Linux/support/launch.sh.orig 2019-11-05 09:27:57 UTC
+++ Ghidra/RuntimeScripts/Linux/support/launch.sh
@@ -88,6 +88,7 @@ else
DEBUG_LOG4J="${INSTALL_DIR}/Ghidra/RuntimeScripts/Common/support/debug.log4j.xml"
fi
+PATH="JAVA_HOME_PLACEHOLDER/bin:$PATH"
# Make sure some kind of java is on the path. It's required to run the LaunchSupport program.
if ! [ -x "$(command -v java)" ] ; then
echo "Java runtime not found. Please refer to the Ghidra Installation Guide's Troubleshooting section."

View file

@ -1,11 +0,0 @@
--- Ghidra/RuntimeScripts/build.gradle.orig 2019-11-05 09:19:07 UTC
+++ Ghidra/RuntimeScripts/build.gradle
@@ -17,7 +17,7 @@ rootProject.OS_NAMES.each { platform ->
rootProject.tasks.findAll {it.name == "assembleDistribution_$platform"}.each { t ->
def p = this.project
- if (isLinux(platform) || isMac(platform)) {
+ if (isLinux(platform) || isMac(platform) || isFreeBSD(platform)) {
t.from ("${p.projectDir}/Linux/support") {
into "support"
}

View file

@ -1,6 +0,0 @@
--- README.txt.orig 2019-11-04 12:52:32 UTC
+++ README.txt
@@ -0,0 +1,3 @@
+The "os/freebsd64" directory is intended to hold FreeBSD native binaries
+which this module is dependent upon. This directory may be eliminated for a specific
+module if native binaries are not provided for the corresponding platform.

View file

@ -1,74 +0,0 @@
--- build.gradle.orig 2019-10-23 20:54:54 UTC
+++ build.gradle
@@ -42,22 +42,28 @@ project.ext.BIN_REPO_PATH = BIN_REPO // TODO make path
/*********************************************************************************
* Prevent forked Java processes from stealing focus
+ * Prevent writing to the actual home directory
*********************************************************************************/
+ext.DUMMY_HOME = file("${projectDir}/../dummy.home").absolutePath
allprojects {
tasks.withType(JavaForkOptions) {
jvmArgs '-Djava.awt.headless=true'
}
+ tasks.withType(JavaExec) {
+ jvmArgs "-Duser.home=${DUMMY_HOME}"
+ }
}
/*********************************************************************************
* Use flat directory-style repository if flatRepo directory is present.
*********************************************************************************/
-if (file("flatRepo").isDirectory()) {
+ext.FLATREPO = file("${projectDir}/../flatrepo").absolutePath
+if (file("${FLATREPO}").isDirectory()) {
allprojects {
repositories {
mavenCentral()
jcenter()
- flatDir name: "flat", dirs:["$rootProject.projectDir/flatRepo"]
+ flatDir name: "flat", dirs:["${FLATREPO}"]
}
}
}
@@ -77,7 +83,7 @@ else {
* project.OS_NAMES.each {...}
****************************************************************************/
-project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64"])
+project.ext.set("OS_NAMES", ["osx64", "win32", "win64", "linux64", "freebsd64"])
/****************************************************************************
* Establish Visual Studio configuration environment for Windows native builds
@@ -137,6 +143,19 @@ def isWindows(String platformName) {
return platformName.startsWith("win")
}
+/*********************************************************************************
+ * Returns true if the platform is a FreeBSD machine.
+ *********************************************************************************/
+def isFreeBSD(String platformName) {
+
+ if (platformName.startsWith("freebsd")) {
+ return true
+ }
+ else {
+ return false
+ }
+}
+
/******************************************************************************************
* Helper method that returns a file that is the same relative location in the bin repo
* as the given project is in its repo.
@@ -283,6 +302,11 @@ String getCurrentPlatformName() {
return 'osx64'
}
}
+ else if (osName.startsWith("FreeBSD")) {
+ if (isX86_64) {
+ return 'freebsd64'
+ }
+ }
throw new GradleException("Unrecognized current platform -> osName = $osName, archName = $archName")
}

View file

@ -1,10 +0,0 @@
--- gradle/root/distribution.gradle.orig 2019-11-04 13:01:27 UTC
+++ gradle/root/distribution.gradle
@@ -382,6 +382,7 @@ task createInstallationZip(type: Zip) { t ->
dependsOn ":assembleDistribution_win64"
dependsOn ":assembleDistribution_linux64"
dependsOn ":assembleDistribution_osx64"
+ dependsOn ":assembleDistribution_freebsd64"
dependsOn ":assembleSource"
}

View file

@ -1,11 +0,0 @@
--- gradle/support/ip.gradle.orig 2019-11-04 12:56:00 UTC
+++ gradle/support/ip.gradle
@@ -119,6 +119,8 @@ def Map<String, List<String>> getIpForModule(Project p
exclude "**/data/build.xml" // language build file (generated for dev only)
exclude "**/.vs/**"
exclude "**/*.vcxproj.user"
+ exclude "**/*.orig"
+ exclude "**/*.bak"
}
tree.each { file ->
String ip = getIp(p.projectDir, file)

4666
devel/ghidra/pkg-plist Normal file

File diff suppressed because it is too large Load diff