Package Details: recaf-git r4478.4ab601528-1

Git Clone URL: https://aur.archlinux.org/recaf-git.git (read-only, click to copy)
Package Base: recaf-git
Description: A modern Java bytecode editor
Upstream URL: https://github.com/Col-E/Recaf
Keywords: agent asm bytecode bytecode-engineering bytecode-manipulation decompile decompiler java javafx javafx-application jvm-bytecode reverse-engineering static-analysis
Licenses: MIT
Conflicts: recaf, recaf-bin
Provides: recaf
Replaces: recaf
Submitter: dreamscached
Maintainer: dreamscached
Last Packager: dreamscached
Votes: 3
Popularity: 0.57
First Submitted: 2021-12-18 09:02 (UTC)
Last Updated: 2024-11-22 11:25 (UTC)

Dependencies (4)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

dreamscached commented on 2024-11-16 21:27 (UTC)

@Metzger100 recaf at the moment doesn't seem to be compatible with Java 23, I have verified that decompilation works as it worked previously on Java 22, but I haven't attempted to recompile code or build bytecode from disassembled code.

Metzger100 commented on 2024-11-16 21:25 (UTC)

The test testJavacUsesVirtualClasspathFromWorkspace fails. I could install it by disabling the gradlew tests in the PKGBUILD: ./gradlew -x test --no-daemon build

Recaf works, but I am not sure if everything is working.

dreamscached commented on 2024-10-03 17:47 (UTC)

@solonovamax thanks, I fixed it. I kept MAVEN_USER_HOME and MAVEN_OPTS to safeguard user from polluting their home dir as Gradle (and previously Maven) used to put their caches and repository .jar's in there. Doesn't seem to be the case now so I removed it, thanks again.

solonovamax commented on 2024-10-03 14:54 (UTC)

@dreamscached, a few things regarding the updated PKGBUILD: - why were MAVEN_USER_HOME and MAVEN_OPTS kept? they don't exactly do anything now that gradle is being used. - I noticed you have some inconsistent formatting in terms of indents in it - noticed you have a typo for the MimeType in the recaf.desktop file (you accidentally added a space) - you also set the JAVA_HOME to be java 11. recaf requires java 22 to build. although gradle will automatically switch to jdk 22, good to just use it by default. additionally, if the user doesn't have openjdk 11 installed, the build will fail.

dreamscached commented on 2024-09-29 14:03 (UTC)

Thank you, I have updated PKGBUILD; your patch was of great help.

solonovamax commented on 2024-09-27 17:29 (UTC) (edited on 2024-09-27 17:31 (UTC) by solonovamax)

The package is currently broken.

Here is a patch for the PKGBUILD that is compatible with the newest 4.x version:

diff --git a/MavenUtil.patch b/MavenUtil.patch
deleted file mode 100644
index d7e9ec2..0000000
--- a/MavenUtil.patch
+++ /dev/null
@@ -1,3 +0,0 @@
-171a172,173
->          if (System.getenv("MAVEN_USER_HOME") != null)
->              return Paths.get(System.getenv("MAVEN_USER_HOME"), "repository");
diff --git a/PKGBUILD b/PKGBUILD
index a4c0e8a..d5662ce 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,19 @@
 # Maintainer: dreamscache.d <dreamscache.d@gmail.com>
 _pkgname=recaf
 pkgname=${_pkgname}-git
-pkgver=r2278.e9765d4e
+pkgver=r4399.16ec6ae25
 pkgrel=1
 pkgdesc="A modern Java bytecode editor"
 arch=("any")
 url="https://github.com/Col-E/Recaf"
 license=("MIT")
-depends=("java-environment-openjdk=21" "ttf-font")
-makedepends=("git" "jdk11-openjdk")
+depends=("java-environment-openjdk=22" "ttf-font")
+makedepends=("git" "jdk22-openjdk")
 provides=("$_pkgname")
 conflicts=("$_pkgname" "$_pkgname-bin")
 replaces=("recaf")
-source=("recaf::git+https://github.com/Col-E/Recaf#branch=master"
-        "MavenUtil.patch"
-        "settings.xml")
-md5sums=("SKIP"
-         "c6d14c04cb3313413e306a9e45cb6757"
-         "4bde901d55aa06e6db09994266f19a3f")
+source=("recaf::git+https://github.com/Col-E/Recaf#branch=master")
+md5sums=("SKIP")

 pkgver() {
    cd "$srcdir/$_pkgname"
@@ -26,20 +22,19 @@ pkgver() {

 prepare() {
     cd "$srcdir/$_pkgname"
-    patch "src/main/java/me/coley/recaf/util/MavenUtil.java" "$srcdir/MavenUtil.patch"
 }

 build() {
    cd "$srcdir/$_pkgname"
-    JAVA_HOME="/usr/lib/jvm/java-11-openjdk" MAVEN_USER_HOME="$srcdir/$_pkgname/.m2" ./mvnw -gs "$srcdir/settings.xml" clean package
+    ./gradlew build
 }

 package() {
    cd "$srcdir/$_pkgname"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
-    install -Dm755 "target/$_pkgname-$(git describe --tags --abbrev=0)-J8-jar-with-dependencies.jar" "$pkgdir/usr/share/java/$_pkgname/$_pkgname.jar"
-    install -Dm644 "src/main/resources/icons/logo.png" "$pkgdir/usr/share/pixmaps/recaf.png"
-    printf '#!/usr/bin/env bash\nexec java -cp "/usr/lib/jvm/java-21-openjdk/lib/*:/usr/share/java/%s/%s.jar" "me.coley.recaf.Recaf" "$@"' "$_pkgname" "$_pkgname" > "recaf"
+    install -Dm755 "recaf-ui/build/libs/recaf-ui-"*"-all.jar" "$pkgdir/usr/share/java/$_pkgname/$_pkgname.jar"
+    install -Dm644 "recaf-ui/src/main/resources/icons/logo-full.png" "$pkgdir/usr/share/pixmaps/recaf.png"
+    printf '#!/usr/bin/env bash\nexec java -cp "/usr/lib/jvm/java-22-openjdk/lib/*" -jar "/usr/share/java/%s/%s.jar" "$@"' "$_pkgname" "$_pkgname" > "recaf"
     printf "[Desktop Entry]\nType=Application\nVersion=1.0\nName=Recaf\nComment=%s\nPath=/usr/bin\nExec=sh -c 'if [ -n \"\$0\" ]; then recaf --input=\"\$0\"; else recaf; fi' %%u\nIcon=recaf\nTerminal=false\nMimeType=application/java-archive\nCategories=Development;Java" "$pkgdesc" > "recaf.desktop"
     install -Dm755 "recaf" "$pkgdir/usr/bin/recaf"
     install -Dm644 "recaf.desktop" "$pkgdir/usr/share/applications/recaf.desktop"
diff --git a/settings.xml b/settings.xml
deleted file mode 100644
index 1c2d8c9..0000000
--- a/settings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
-    <localRepository>${user.dir}/.m2</localRepository>
-</settings>

Score_Under commented on 2023-04-05 13:02 (UTC)

Thanks, it's all building correctly for me now

dreamscached commented on 2023-04-05 09:26 (UTC)

I have updated PKGBUILD with proper path to the patch now. Hopefully works now, now it should reference by $srcdir than absolute path.

Score_Under commented on 2023-04-03 11:58 (UTC)

It still won't build for me because the patch is referenced as if it were above the srcdir, rather than inside the srcdir, which given the exploded directory structure in makechrootpkg doesn't quite work

dreamscached commented on 2023-03-31 15:09 (UTC)

Thank you, I have updated PKGBUILD so it should be working now.