Package Details: ghidra-darcula 10.2.2-1

Git Clone URL: https://aur.archlinux.org/ghidra-darcula.git (read-only, click to copy)
Package Base: ghidra-darcula
Description: Software reverse engineering framework (with dark theme)
Upstream URL: https://ghidra-sre.org
Licenses: Apache
Conflicts: ghidra, ghidra-desktop, ghidra-dev
Provides: ghidra
Submitter: encounter
Maintainer: encounter
Last Packager: encounter
Votes: 2
Popularity: 0.000001
First Submitted: 2019-12-01 06:26 (UTC)
Last Updated: 2022-11-18 04:41 (UTC)

Dependencies (7)

Sources (6)

Pinned Comments

encounter commented on 2020-10-01 07:53 (UTC) (edited on 2022-11-05 15:56 (UTC) by encounter)

All packages for Ghidra require Java 17. (package jdk17-openjdk)

You can set the active Java version using archlinux-java set java-17-openjdk

Latest Comments

sramey40 commented on 2022-07-20 21:08 (UTC)

Ghidra from the official arch community repository does not require java 11. It works perfectly fine with the latest openjdk (java 18 currently). Can you fix it so that this package also doesn't need java 11?

encounter commented on 2021-06-25 14:44 (UTC)

Thanks @Escher!

Escher commented on 2021-06-24 22:00 (UTC) (edited on 2021-06-24 22:09 (UTC) by Escher)

Patch for Ghidra 10.0

diff --git a/PKGBUILD b/PKGBUILD
index 7137b02..44de427 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,32 @@
 # Maintainer: Luke Street <luke@street.dev>
+# Contributor: Daniel Brodsky <danbrodsky@pm.me>
 # Based on AUR ghidra-git
 # Original Darcula patch from https://digmi.org/2019/03/26/ghidracula/

 pkgname=ghidra-darcula
 _darcula=08c13c5f1a12624f4d8df8723b39061e11c93241
 _darcula_version=2019.09
-pkgver=9.2.3
-pkgrel=2
+pkgver=10.0
+pkgrel=1
 pkgdesc='Software reverse engineering framework (with dark theme)'
 arch=('x86_64')
 url='https://ghidra-sre.org'
 license=(Apache)
-provides=(ghidra)
-conflicts=(ghidra)
+provides=('ghidra')
+conflicts=(
+  'ghidra'
+  'ghidra-dev'
+  'ghidra-desktop'
+)
 depends=(
-  'java-runtime-common'
-  'jdk11-openjdk'
+  'bash'
+  'java-environment>=11'
+  'polkit'
 )
 makedepends=(
   'git'
-  'gradle6' # gradle>=7 is currently not supported
+  'gradle'
+  'java-environment=11'
   'unzip'
 )
 source=(
@@ -45,15 +52,23 @@ pkgver() {
   git describe --tags | sed 's#Ghidra_##;s#_build##;s#-#+#g;s#+#+r#'
 }

+
 prepare() {
   cd "$_pkgname"

+  # Check Java version (thanks @ignapk)
+  JDK_VERSION=$(java -version 2>&1)
+  if [[ ! $JDK_VERSION =~ 11\.0 ]]; then
+    echo "FAILURE: You seem to have jdk11 installed correctly but your system defaults to another java version. To enable jdk11 please type: sudo archlinux-java set java-11-openjdk"
+    exit 1
+  fi
+
   echo -e "${_prefix}Setting up the build dependencies"
-  gradle6 --parallel --init-script gradle/support/fetchDependencies.gradle init
+  gradle --parallel --init-script gradle/support/fetchDependencies.gradle init

   echo -e "${_prefix}Applying Darcula patch"
   patch -Np1 -i "$srcdir"/darcula.patch
-  sed -i "/dependencies {/a\\\\tcompile ':darcula-laf:${_darcula_version}'" Ghidra/Framework/Docking/build.gradle
+  sed -i "/dependencies {/a\\\\timplementation ':darcula-laf:${_darcula_version}'" Ghidra/Framework/Docking/build.gradle
   echo "MODULE FILE LICENSE: lib/darcula-laf-${_darcula_version}.jar Apache License 2.0" >> Ghidra/Framework/Docking/Module.manifest

   echo -e "${_prefix}Setting release to PUBLIC"
@@ -66,28 +81,30 @@ prepare() {
   ##

 #  echo -e "${_prefix}Setting up the developers environment"
-#  gradle6 --parallel prepDev
+#  gradle --parallel prepDev
 #
 #  echo -e "${_prefix}Setting up the eclipse configurations"
-#  gradle6 --parallel eclipse
+#  gradle --parallel eclipse
 #
 #  echo -e "${_prefix}Compiling the linux64 native binaries"
-#  gradle6 --parallel buildNatives_linux64
+#  gradle --parallel buildNatives_linux64
 #
 #  echo -e "${_prefix}Compiling the precompile language modules"
-#  gradle6 --parallel sleighCompile
+#  gradle --parallel sleighCompile
 }

 build() {
   cd "$srcdir"/darcula-laf
+  echo -e "${_prefix}Patching darcula-laf for Gradle-7.0"
+  sed -i "s/apply plugin: 'maven'/apply plugin: 'maven-publish'/" build.gradle
   echo -e "${_prefix}Building darcula-laf"
-  gradle6 --parallel jar
+  gradle --parallel jar
   mkdir -p "$srcdir/$_pkgname"/flatRepo
-  cp build/libs/darcula-laf-${_darcula_version}.jar -t "$srcdir/$_pkgname"/flatRepo
+  cp build/libs/darcula-laf-${_darcula_version}.jar -t "$srcdir/$_pkgname"/dependencies/flatRepo

   cd "$srcdir/$_pkgname"
   echo -e "${_prefix}Building Ghidra"
-  gradle6 --parallel buildGhidra
+  gradle --parallel buildGhidra
 }

 package() {

encounter commented on 2020-10-01 07:53 (UTC) (edited on 2022-11-05 15:56 (UTC) by encounter)

All packages for Ghidra require Java 17. (package jdk17-openjdk)

You can set the active Java version using archlinux-java set java-17-openjdk

rageltman commented on 2020-09-30 20:21 (UTC)

Failing to build like many other ghidra packages with:

[2020-09-30T20:13:05.380Z] > Task :Graph:compileJava
[2020-09-30T20:13:05.384Z] Note: Some input files use or override a deprecated API.
[2020-09-30T20:13:05.386Z] Note: Recompile with -Xlint:deprecation for details.
[2020-09-30T20:13:05.389Z] Note: Some input files use unchecked or unsafe operations.
[2020-09-30T20:13:05.391Z] Note: Recompile with -Xlint:unchecked for details.
[2020-09-30T20:13:05.394Z] 
[2020-09-30T20:13:05.394Z] > Task :Graph:processResources
[2020-09-30T20:13:05.397Z] > Task :Graph:classes
[2020-09-30T20:13:05.400Z] > Task :Graph:jar
[2020-09-30T20:13:05.403Z] 
[2020-09-30T20:13:05.403Z] > Task :Project:compileJava
[2020-09-30T20:13:05.406Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:227: error: reference to Record is ambiguous
[2020-09-30T20:13:05.409Z]  private Record getPropertyRecord(String propertyName) {
[2020-09-30T20:13:05.411Z]          ^
[2020-09-30T20:13:05.414Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.417Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:243: error: reference to Record is ambiguous
[2020-09-30T20:13:05.420Z]  private void putRecord(Record rec) {
[2020-09-30T20:13:05.423Z]                         ^
[2020-09-30T20:13:05.426Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.428Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:102: error: reference to Record is ambiguous
[2020-09-30T20:13:05.431Z]      Record rec = iterator.next();
[2020-09-30T20:13:05.434Z]      ^
[2020-09-30T20:13:05.437Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.439Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:111: error: reference to Record is ambiguous
[2020-09-30T20:13:05.442Z]      ArrayList<Record> list = new ArrayList<Record>();
[2020-09-30T20:13:05.445Z]                ^
[2020-09-30T20:13:05.448Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.451Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:111: error: reference to Record is ambiguous
[2020-09-30T20:13:05.453Z]      ArrayList<Record> list = new ArrayList<Record>();
[2020-09-30T20:13:05.456Z]                                             ^
[2020-09-30T20:13:05.459Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.462Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:132: error: reference to Record is ambiguous
[2020-09-30T20:13:05.469Z]      for (Record updatedRec : list) {
[2020-09-30T20:13:05.472Z]           ^
[2020-09-30T20:13:05.475Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.478Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:146: error: reference to Record is ambiguous
[2020-09-30T20:13:05.481Z]          Record rec = iterator.next();
[2020-09-30T20:13:05.483Z]          ^
[2020-09-30T20:13:05.486Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.489Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:191: error: reference to Record is ambiguous
[2020-09-30T20:13:05.492Z]                  Record rec = recIt.next();
[2020-09-30T20:13:05.494Z]                  ^
[2020-09-30T20:13:05.497Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.501Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:213: error: reference to Record is ambiguous
[2020-09-30T20:13:05.503Z]                  Record rec = recIt.next();
[2020-09-30T20:13:05.506Z]                  ^
[2020-09-30T20:13:05.509Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.511Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:278: error: reference to Record is ambiguous
[2020-09-30T20:13:05.514Z]              Record rec = getPropertyRecord(getName());
[2020-09-30T20:13:05.517Z]              ^
[2020-09-30T20:13:05.520Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.523Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:308: error: reference to Record is ambiguous
[2020-09-30T20:13:05.525Z]              Record rec = PROPERTY_SCHEMA.createRecord(new StringField(getName()));
[2020-09-30T20:13:05.528Z]              ^
[2020-09-30T20:13:05.530Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.533Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/OptionsDB.java:334: error: reference to Record is ambiguous
[2020-09-30T20:13:05.536Z]          Record record = getPropertyRecord(optionName);
[2020-09-30T20:13:05.538Z]          ^
[2020-09-30T20:13:05.541Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.543Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/MetadataManager.java:38: error: reference to Record is ambiguous
[2020-09-30T20:13:05.546Z]              Record record = iterator.next();
[2020-09-30T20:13:05.549Z]              ^
[2020-09-30T20:13:05.552Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.554Z] /build/ghidra-darcula/src/ghidra/Ghidra/Framework/Project/src/main/java/ghidra/framework/data/MetadataManager.java:61: error: reference to Record is ambiguous
[2020-09-30T20:13:05.557Z]              Record record = SCHEMA.createRecord(id++);
[2020-09-30T20:13:05.560Z]              ^
[2020-09-30T20:13:05.563Z]   both class db.Record in db and class java.lang.Record in java.lang match
[2020-09-30T20:13:05.565Z] Note: Some input files use or override a deprecated API.
[2020-09-30T20:13:05.568Z] Note: Recompile with -Xlint:deprecation for details.
[2020-09-30T20:13:05.570Z] 14 errors
[2020-09-30T20:13:05.573Z] 
[2020-09-30T20:13:05.573Z] > Task :Project:compileJava FAILED
[2020-09-30T20:13:05.575Z] 
[2020-09-30T20:13:05.575Z] FAILURE: Build failed with an exception.
[2020-09-30T20:13:05.578Z] 
[2020-09-30T20:13:05.578Z] * What went wrong:
[2020-09-30T20:13:05.580Z] Execution failed for task ':Project:compileJava'.
[2020-09-30T20:13:05.583Z] > Compilation failed; see the compiler error output for details.
[2020-09-30T20:13:05.586Z] 
[2020-09-30T20:13:05.586Z] * Try:
[2020-09-30T20:13:05.589Z] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[2020-09-30T20:13:05.591Z] 
[2020-09-30T20:13:05.591Z] * Get more help at https://help.gradle.org
[2020-09-30T20:13:05.593Z] 
[2020-09-30T20:13:05.593Z] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[2020-09-30T20:13:05.596Z] Use '--warning-mode all' to show the individual deprecation warnings.
[2020-09-30T20:13:05.599Z] See https://docs.gradle.org/6.6.1/userguide/command_line_interface.html#sec:command_line_warnings
[2020-09-30T20:13:05.601Z] 
[2020-09-30T20:13:05.601Z] BUILD FAILED in 1m 0s
[2020-09-30T20:13:05.604Z] 25 actionable tasks: 25 executed
[2020-09-30T20:13:05.606Z] ==> ERROR: A failure occurred in build().
[2020-09-30T20:13:05.608Z]     Aborting...
script returned exit code 255

Martmists commented on 2020-05-22 10:32 (UTC)

This patch modifies the version, making many plugins incompatible, as well as ghidra zip exports not being importable by non-darcula clients.

encounter commented on 2019-12-16 19:33 (UTC) (edited on 2019-12-16 19:36 (UTC) by encounter)

Glad it's useful. You can also use https://github.com/elliiot/ghidra_darknight (requires changing the dragon_path) to create a code browser tool with dark color scheme.

I may build this into the default code browser itself but it requires patching options all over the code.

eimis commented on 2019-12-16 18:26 (UTC)

this is awesome I really appreciate it