Adapted decompiler plugins

todo, test them (and a bit more)
This commit is contained in:
Jiri Vanek 2023-03-17 16:31:01 +01:00
commit ff42bdeea2
9 changed files with 139 additions and 4 deletions

View file

@ -9,10 +9,17 @@ Source1: java-runtime-decompiler
Source3: jrd.desktop
Patch1: systemFernflower.patch
Patch2: systemProcyon.patch
Patch21: systemProcyonAssembler.patch
Patch3: rsyntaxVersion.patch
Patch4: systemCfr.patch
Patch5: systemJasm.patch
Patch51: systemJasm7.patch
Patch52: systemJasmG.patch
Patch53: systemJasmG7.patch
Patch6: systemJcoder.patch
Patch61: systemJcoder7.patch
Patch62: systemJcoderG.patch
Patch63: systemJcoderG7.patch
Patch7: removeMultilineSpotbugs.patch
BuildArch: noarch
@ -60,10 +67,17 @@ This package contains the API documentation for %{name}.
%setup -q -n %{name}-%{name}-%{version}
%patch1 -p0
%patch2 -p0
%patch21 -p0
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch51 -p0
%patch52 -p0
%patch53 -p0
%patch6 -p0
%patch61 -p0
%patch62 -p0
%patch63 -p0
%patch7 -p1
%build
@ -101,6 +115,11 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor="fedora" \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3}
#jd is not yet packed and sucks anyway
rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.java
rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json
%files -f .mfiles
%attr(755, root, -) %{_bindir}/java-runtime-decompiler
%{_mandir}/man1/java-runtime-decompiler.1*
@ -111,12 +130,26 @@ desktop-file-install --vendor="fedora" \
%config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.json
%config %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.java
%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.json
%license LICENSE
%dir %{_datadir}/applications
@ -126,10 +159,12 @@ desktop-file-install --vendor="fedora" \
%license LICENSE
%changelog
* Thu Mar 15 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.1-1
* Wed Mar 15 2023 Fedora Release Engineering <releng@fedoraproject.org> - 7.1-1
- moved to jrd 7.1
- todo:asm7/g/procyonassembler wrappers, new launchers, new classpath (diff, cplc api...)
- verify current wrappers
- todo: new launchers, new classpath (diff, cplc api...)
- verify current wrappers
- fixed procyon wrapper
- removed jd wrapper (was new in 7.1)
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

13
systemJasm7.patch Normal file
View file

@ -0,0 +1,13 @@
--- runtime-decompiler/src/plugins/Jasm7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/Jasm7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jasm7",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/Jasm7DecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/Jasm7DecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

13
systemJasmG.patch Normal file
View file

@ -0,0 +1,13 @@
--- runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jasmG",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmGDecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JasmGDecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b02-ea/asmtools-8.0.b02-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools/asmtools.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

13
systemJasmG7.patch Normal file
View file

@ -0,0 +1,13 @@
--- runtime-decompiler/src/plugins/JasmG7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/JasmG7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jasmG7",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmG7DecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JasmG7DecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

14
systemJcoder7.patch Normal file
View file

@ -0,0 +1,14 @@
--- runtime-decompiler/src/plugins/Jcoder7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/Jcoder7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jcoder7",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/Jcoder7DecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/Jcoder7DecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

14
systemJcoderG.patch Normal file
View file

@ -0,0 +1,14 @@
--- runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jcoderG",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderGDecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderGDecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b02-ea/asmtools-8.0.b02-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools/asmtools.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

14
systemJcoderG7.patch Normal file
View file

@ -0,0 +1,14 @@
--- runtime-decompiler/src/plugins/JcoderG7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/JcoderG7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -1,8 +1,8 @@
{
"Name": "jcoderG7",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderG7DecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderG7DecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar"
+ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar"
],
"DecompilerDownloadURL": "https://github.com/openjdk/asmtools"
}

View file

@ -2,7 +2,8 @@
+++ runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -2,9 +2,9 @@
"Name": "Procyon",
"WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar",
- "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar",

View file

@ -0,0 +1,18 @@
--- runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100
+++ runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100
@@ -2,9 +2,9 @@
"Name": "Procyon-Assembler",
- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonAssemblerDecompilerWrapper.java",
+ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonAssemblerDecompilerWrapper.java",
"DependencyURL": [
- "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar",
- "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar",
- "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-decompiler/1.0-SNAPSHOT/procyon-decompiler-1.0-SNAPSHOT.jar"
+ "/usr/share/java/procyon/procyon-core.jar",
+ "/usr/share/java/procyon/procyon-compilertools.jar",
+ "/usr/share/java/procyon/procyon-decompiler.jar"
],
"DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git "
}