Patch to remove rsyntaxtextarea, as rhel does not provide this package

This commit is contained in:
pmikova 2018-12-03 14:20:00 +01:00
commit 8061ac7bb1
3 changed files with 72 additions and 3 deletions

View file

@ -41,7 +41,7 @@ _set_java_home
set_jvm
# all dependencies must be on classpath
set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson
set_classpath java-runtime-decompiler byteman google-gson
CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar
# set path to agent automatically

View file

@ -1,17 +1,20 @@
Summary: Application for extraction and decompilation of JVM byte code
Name: java-runtime-decompiler
Version: 2.0
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3
URL: https://github.com/pmikova/java-runtime-decompiler
Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz
Source1: java-runtime-decompiler
Source2: java-runtime-decompiler.1
Source3: jrd.desktop
# Remove RSyntaxTextArea library from the sources and dependencies, as it is not packaged for epel
Patch1: remove_rsyntaxtextarea.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: byteman
BuildRequires: rsyntaxtextarea
# RHEL does not have this package
# BuildRequires: rsyntaxtextarea
# depends on devel, not runtime (needs tools.jar)
BuildRequires: java-devel = 1:1.8.0
BuildRequires: google-gson
@ -30,6 +33,7 @@ This package contains the API documentation for %{name}.
%prep
%setup -q -n %{name}-%{name}-%{version}
%patch1 -p1
%build
pushd runtime-decompiler
@ -73,6 +77,10 @@ desktop-file-install --vendor="fedora" \
%license LICENSE
%changelog
* Mon Dec 3 2018 Petra Mikova <petra.alice.mikova@gmail.com> - 2.0-3
- patch to remove rsyntaxtextarea, because rhel does not have the package
- removed from spec and runscript accordingly
* Wed Nov 28 2018 Petra Mikova <petra.alice.mikova@gmail.com> - 2.0-2
- fixed changelog

View file

@ -0,0 +1,61 @@
diff --git a/runtime-decompiler/pom.xml b/runtime-decompiler/pom.xml
index 26a416e..e6e2425 100644
--- a/runtime-decompiler/pom.xml
+++ b/runtime-decompiler/pom.xml
@@ -100,11 +100,11 @@
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
- <dependency>
+<!-- <dependency>
<groupId>com.fifesoft</groupId>
<artifactId>rsyntaxtextarea</artifactId>
<version>2.6.1</version>
- </dependency>
+ </dependency>-->
<dependency>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-install</artifactId>
diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java
index 9c19e2c..8d17775 100644
--- a/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java
+++ b/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java
@@ -2,9 +2,9 @@ package org.jrd.frontend.MainFrame;
import org.jrd.backend.core.OutputController;
import org.jrd.backend.decompiling.DecompilerWrapperInformation;
-import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
-import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
-import org.fife.ui.rtextarea.RTextScrollPane;
+//import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
+//import org.fife.ui.rsyntaxtextarea.SyntaxConstants;
+//import org.fife.ui.rtextarea.RTextScrollPane;
import javax.swing.*;
import javax.swing.border.EtchedBorder;
@@ -30,8 +30,8 @@ public class BytecodeDecompilerView {
private JPanel rightMainPanel;
private JScrollPane leftScrollPanel;
private JList<String> filteredClassesJlist;
- private RTextScrollPane bytecodeScrollPane;
- private RSyntaxTextArea bytecodeSyntaxTextArea;
+ private JScrollPane bytecodeScrollPane;
+ private JTextArea bytecodeSyntaxTextArea;
private ActionListener bytesActionListener;
private ActionListener classesActionListener;
private String[] classes;
@@ -120,10 +120,10 @@ public class BytecodeDecompilerView {
topComboBox = new JComboBox<DecompilerWrapperInformation>();
- bytecodeSyntaxTextArea = new RSyntaxTextArea();
- bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
- bytecodeSyntaxTextArea.setCodeFoldingEnabled(true);
- bytecodeScrollPane = new RTextScrollPane(bytecodeSyntaxTextArea);
+ bytecodeSyntaxTextArea = new JTextArea();
+ //bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
+ //bytecodeSyntaxTextArea.setCodeFoldingEnabled(true);
+ bytecodeScrollPane = new JScrollPane(bytecodeSyntaxTextArea);
leftMainPanel = new JPanel();
leftMainPanel.setLayout(new BorderLayout());