From nobody Thu Aug 01 17:50:10 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WZc1Z4DVRz5R8Yb; Thu, 01 Aug 2024 17:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZc1Z3zPGz3x9S; Thu, 1 Aug 2024 17:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzjLdc8DyxhRtHPZ3WiK4C+KbBZeFuPO8uWJh6T1yLQ=; b=aI6ButW+Ii6JmiZ0SqWiZnb0z9TVbL8VClIfOyA1iNjgKS6g4cOCAVa7KbWVce2K+xYyRq YN1qEQ4lGTDO78STOo929NIV5wwIgAtYJqLaDbTZ3Eh00R7wvK3ryuT/tQG9Sd/0pY4PAj /O8NqWTRKrGgBe3YvLE+1oBh4kSBltv2Vn47trQM/MA8rY0PxYaKNXsJ6Y6t7tuKOc3bKc UruD89lraKUAlfR2zemFwP1jCoJbQQpPxojUZYgVYcIMGZMiKpKKDJFub0AcsQXSoKxQVn GEm2C08Kh2QBSiR+zY0TFPzpl8xWgZnmUqeSaE3VmqUJn0HD5iFBCe6JNjLpDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722534610; a=rsa-sha256; cv=none; b=CbMLGL96AUNJ8zAHnZXKtlzN5aPuRK7kKBIFng2Qi/4c0IJ3MK6jLqLe/pgnq9Yd2HnDc/ Q2BtnJyCBT2nkmpyxwVKc3cChKI3sFpKILaZoV9iYe2G7GgS5CkKCqwDTZjnrnGnRUKQMC qmcS1Y4YUBSdHHPCb1KTZuA4I4QSWCD2ACindi2AQXRWxpyHWjBwEzr3cRYT5e+JHbt6bn pF94Pnr22CinJeh01/o30xIURhBL7xbFiVb9cMx7mlA8bzCxsVAtx8EoP9Kp3HeOZnrQzQ WlHoZHtjL1OwOdZXW6Yhvi+/SMxNmh2arIpro10un+birsMq2UpqLM8yH8Bl6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722534610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzjLdc8DyxhRtHPZ3WiK4C+KbBZeFuPO8uWJh6T1yLQ=; b=BaQR/XCNf8p6PcFXJ2yJnIgD8nH489fMM+GSVJUa+R9OOtu++F4tRq6m4GIz9/zj0UcgpE Rc0Wj/N8tFUZDFsUBSD9ZSbmvdXwWY/WUG+6XMhGjTA7EMJMgX7/ItYOoegvrhYlsaOUxI ES+iIlav3b0leyQCTPmfdtw+++1K0FlRE8CUypuunkxJLIbjhFOQryo9PsFFy8y12vj0pH WaA2vHfaX9yP/DPkA7j8uKTP5X2lwutKqj5lfef+yLECFvx+abGnE8xSWIh7vOnLISyZgA bpUJu1eqFBnkfEZOR3wbjFRGfXIYZszYLDYO1wwVH/I6oQzMEEBKoupVsVFpUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WZc1Z3Zcrztmh; Thu, 1 Aug 2024 17:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471HoAN7053333; Thu, 1 Aug 2024 17:50:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471HoAED053319; Thu, 1 Aug 2024 17:50:10 GMT (envelope-from git) Date: Thu, 1 Aug 2024 17:50:10 GMT Message-Id: <202408011750.471HoAED053319@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: 2bf3f54aafa6 - main - devel/ghidra: fix permissions be able to run ghidra from the command line List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bf3f54aafa6470ebedc2f048ea28453afc76005 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=2bf3f54aafa6470ebedc2f048ea28453afc76005 commit 2bf3f54aafa6470ebedc2f048ea28453afc76005 Author: gatekeeper AuthorDate: 2024-08-01 17:41:53 +0000 Commit: Vladimir Druzenko CommitDate: 2024-08-01 17:41:53 +0000 devel/ghidra: fix permissions be able to run ghidra from the command line Also: - remove from SHEBANG_FILES those that are related with debugging - add a desktop file + icon from: https://github.com/NationalSecurityAgency/ghidra/discussions/3709 - add a pkg-message - configure JAVA_HOME using the default installed java version PR: 280494 Fixes: e2b8d2a61766 (update 9.1 → 11.1.2, take maintainership) MFH: 2024Q3 --- devel/ghidra/Makefile | 49 +++++++++++++++++++++++++++--------- devel/ghidra/files/ghidra.desktop.in | 9 +++++++ devel/ghidra/files/ghidra.svg | 1 + devel/ghidra/pkg-message | 5 ++++ devel/ghidra/pkg-plist | 3 ++- 5 files changed, 54 insertions(+), 13 deletions(-) diff --git a/devel/ghidra/Makefile b/devel/ghidra/Makefile index 45e56d86d861..ef0a0324d949 100644 --- a/devel/ghidra/Makefile +++ b/devel/ghidra/Makefile @@ -23,14 +23,28 @@ CPE_VENDOR= nsa USE_JAVA= yes JAVA_VERSION= 17+ -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 \ +SHEBANG_FILES= Ghidra/Features/BSim/make-postgres.sh \ + ghidraRun \ + server/ghidraSvr \ server/jaas_external_program.example.sh \ - support/GhidraGo/ghidraGo + server/svrAdmin \ + server/svrInstall \ + server/svrUninstall \ + support/analyzeHeadless \ + support/bsim \ + support/bsim_ctl \ + support/buildGhidraJar \ + support/buildNatives \ + support/convertStorage \ + support/gdbGADPServerRun \ + support/ghidraClean \ + support/ghidraDebug \ + support/GhidraGo/ghidraGo \ + support/launch.sh \ + support/pythonRun \ + support/sleigh + +SUB_FILES= ghidra.desktop WRKSRC= ${WRKDIR}/${PORTNAME}_${DISTVERSION}_PUBLIC @@ -43,9 +57,10 @@ 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 + GPL/DemanglerGnu/build/objs GPL/DemanglerGnu/build/tmp \ + GPL/nativeBuildProperties.gradle.orig -STRIP_FILES= Ghidra/Features/FileFormats/${BUILD_SUBDIR}/lzfse \ +PROGRAM_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 \ @@ -55,15 +70,25 @@ do-build: @cd ${WRKSRC}/Ghidra && ${GRADLE_RUN} buildNatives @cd ${WRKSRC}/GPL/DemanglerGnu && ${GRADLE_RUN} build +pre-install: + ${REINPLACE_CMD} '1s|bash$$|bash\n\nexport JAVA_HOME="${JAVA_HOME}"|g' ${WRKSRC}/ghidraRun + do-install: .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} +.for F in ${SHEBANG_FILES} + ${RM} ${STAGEDIR}${DATADIR}/${F} + ${INSTALL_SCRIPT} ${WRKSRC}/${F} ${STAGEDIR}${DATADIR}/${F} .endfor +.for F in ${PROGRAM_FILES} + ${RM} ${STAGEDIR}${DATADIR}/${F} + ${INSTALL_PROGRAM} ${WRKSRC}/${F} ${STAGEDIR}${DATADIR}/${F} +.endfor + ${INSTALL_DATA} ${WRKDIR}/ghidra.desktop ${STAGEDIR}/${PREFIX}/share/applications + ${INSTALL_DATA} ${FILESDIR}/ghidra.svg ${STAGEDIR}${DATADIR}/ghidra.svg + ${RLN} ${STAGEDIR}${DATADIR}/ghidraRun ${STAGEDIR}/${PREFIX}/bin/ghidra cd ${STAGEDIR}${DATADIR}/support && ${MV} launch.properties launch.properties.sample .include diff --git a/devel/ghidra/files/ghidra.desktop.in b/devel/ghidra/files/ghidra.desktop.in new file mode 100644 index 000000000000..cf3a38569a48 --- /dev/null +++ b/devel/ghidra/files/ghidra.desktop.in @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=ghidra +GenericName=ghidra +Comment=Software reverse engineering framework +Exec=%%DATADIR%%/ghidraRun +Icon=%%DATADIR%%/ghidra.svg +Terminal=false +Type=Application +Categories=Development diff --git a/devel/ghidra/files/ghidra.svg b/devel/ghidra/files/ghidra.svg new file mode 100644 index 000000000000..0b96661b9b37 --- /dev/null +++ b/devel/ghidra/files/ghidra.svg @@ -0,0 +1 @@ +GHIDRA_FAV150 diff --git a/devel/ghidra/pkg-message b/devel/ghidra/pkg-message new file mode 100644 index 000000000000..18827c4bb854 --- /dev/null +++ b/devel/ghidra/pkg-message @@ -0,0 +1,5 @@ +[ +{ type: install + message: "NOTE: ** Currently debugging support is not working in FreeBSD **" +} +] diff --git a/devel/ghidra/pkg-plist b/devel/ghidra/pkg-plist index 60d4fcbf3239..019ce4d48835 100644 --- a/devel/ghidra/pkg-plist +++ b/devel/ghidra/pkg-plist @@ -1,4 +1,5 @@ bin/ghidra +share/applications/ghidra.desktop %%DATADIR%%/Extensions/Eclipse/GhidraDev/GhidraDev-3.1.0.zip %%DATADIR%%/Extensions/Eclipse/GhidraDev/GhidraDev_README.html %%DATADIR%%/Extensions/Eclipse/GhidraSleighEditor/GhidraSleighEditor-1.0.2.zip @@ -181,7 +182,6 @@ bin/ghidra %%DATADIR%%/GPL/licenses/Modified_Nuvola_Icons_-_LGPL_2.1.txt %%DATADIR%%/GPL/licenses/Public_Domain.txt %%DATADIR%%/GPL/nativeBuildProperties.gradle -%%DATADIR%%/GPL/nativeBuildProperties.gradle.orig %%DATADIR%%/GPL/nativePlatforms.gradle %%DATADIR%%/GPL/settings.gradle %%DATADIR%%/GPL/utils.gradle @@ -4569,6 +4569,7 @@ bin/ghidra %%DATADIR%%/docs/languages/index.html %%DATADIR%%/docs/languages/manual_index.txt %%DATADIR%%/docs/languages/versioning.html +%%DATADIR%%/ghidra.svg %%DATADIR%%/ghidraRun %%DATADIR%%/ghidraRun.bat %%DATADIR%%/licenses/Apache_License_2.0.txt