Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be7ad1b428 | ||
|
|
c7e1cf24ff | ||
|
|
eec9e10016 | ||
|
|
75ebafd594 | ||
|
|
4c1e5ca290 | ||
|
|
edfc778439 | ||
|
|
4d21205f01 | ||
|
|
c3684204ee | ||
|
|
c8306f2990 | ||
|
|
dd66f936e6 | ||
|
|
70384ae6e6 | ||
|
|
434dd52be6 | ||
|
|
a8de1c6cb6 | ||
|
|
6b7999d26a | ||
|
|
dfe48a0a23 | ||
|
|
3eff6c8e82 | ||
|
|
96b04f279a | ||
|
|
b50dc0234c |
9 changed files with 34 additions and 259 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
/mstrobel-procyon-ee404caa9a29.zip
|
||||
/v0.5.36.tar.gz
|
||||
/procyon-1.0~SNAPSHOT.tar.gz
|
||||
/procyon-92ba3f44b8f2b755a21efcdc05dec347ab4df552.tar.gz
|
||||
/procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
--- a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/CommandLineOptions.java_nw
|
||||
+++ b/Procyon.Decompiler/src/main/java/com/strobel/decompiler/CommandLineOptions.java
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
public class CommandLineOptions {
|
||||
@Parameter(description = "<type names or class/jar files>")
|
||||
- private final List<String> _inputs = new ArrayList<>();
|
||||
+ private List<String> _inputs = new ArrayList<>();
|
||||
|
||||
@Parameter(
|
||||
names = { "-?", "--help" },
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
diff --git a/Procyon.Decompiler/build.gradle b/Procyon.Decompiler/build.gradle
|
||||
index 7377956..388de1e 100644
|
||||
--- a/Procyon.Decompiler/build.gradle
|
||||
+++ b/Procyon.Decompiler/build.gradle
|
||||
@@ -2,27 +2,13 @@ buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
-
|
||||
- dependencies {
|
||||
- classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
|
||||
- }
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
uploadArchives.enabled = false
|
||||
|
||||
-apply plugin: 'eu.appsatori.fatjar'
|
||||
-
|
||||
-fatJar {
|
||||
-// from rootProject.allprojects.collect({ it.sourceSets.main.allSource })
|
||||
-
|
||||
- manifest {
|
||||
- attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': version, 'Main-Class' : 'com.strobel.decompiler.DecompilerDriver'
|
||||
- }
|
||||
-}
|
||||
-
|
||||
dependencies {
|
||||
compile 'com.beust:jcommander:1.30'
|
||||
compile project(':Procyon.Core')
|
||||
compile project(':Procyon.CompilerTools')
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
name=procyon
|
||||
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
version=`cat procyon.spec | grep "%global commit " | sed "s/.*commit //"`
|
||||
|
||||
# RETRIEVE
|
||||
rm -rf procyon
|
||||
git clone "https://github.com/slowcoders/procyon.git"
|
||||
git clone "https://github.com/mstrobel/procyon.git"
|
||||
|
||||
# CLEAN TARBALL
|
||||
pushd procyon
|
||||
git checkout "f6568b3ffbb61af8166f678190f2dc0775fd47fd"
|
||||
git checkout "$version"
|
||||
|
||||
rm -rf .git .idea docs
|
||||
rm -rf gradle*
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
--- Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
+++ Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
@@ -34,6 +34,7 @@
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
+import java.lang.invoke.MethodHandles;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.security.ProtectionDomain;
|
||||
@@ -1231,14 +1232,10 @@
|
||||
|
||||
_hasBeenCreated = true;
|
||||
|
||||
- _generatedClass = (Class<T>) getUnsafeInstance().defineClass(
|
||||
- fullName,
|
||||
- classBytes,
|
||||
- 0,
|
||||
- classBytes.length,
|
||||
- Thread.currentThread().getContextClassLoader(),
|
||||
- _protectionDomain
|
||||
- );
|
||||
+ MethodHandles.Lookup lookup = MethodHandles.lookup();
|
||||
+ MethodHandles.Lookup privateLookup = MethodHandles.privateLookupIn(Class.forName(fullName), lookup);
|
||||
+ _generatedClass = (Class<T>)privateLookup.defineClass(classBytes);
|
||||
+
|
||||
|
||||
RuntimeHelpers.ensureClassInitialized(_generatedClass);
|
||||
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
--- a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/DecompilerDriver.java
|
||||
+++ a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/DecompilerDriver.java
|
||||
@@ -64,7 +64,7 @@
|
||||
final boolean decompileJar = !StringUtilities.isNullOrWhitespace(jarFile);
|
||||
|
||||
if (options.getPrintVersion()) {
|
||||
- JCommander.getConsole().println(Procyon.version());
|
||||
+ jCommander.getConsole().println(Procyon.version());
|
||||
if (options.getPrintUsage()) {
|
||||
jCommander.usage();
|
||||
}
|
||||
|
||||
92
procyon.spec
92
procyon.spec
|
|
@ -2,35 +2,32 @@
|
|||
%define debug_package %{nil}
|
||||
%global remove_tests 1
|
||||
|
||||
%global commit 88a95fa93c58322393174f84543edc7a0a2ca44d
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20220221
|
||||
|
||||
Name: procyon
|
||||
Version: 1.0~SNAPSHOT
|
||||
Release: 1%{?dist}
|
||||
Version: 0.6.0
|
||||
Release: 0.11.%{commitdate}.git%{shortcommit}%{?dist}
|
||||
Summary: procyon java decompiler and other tools
|
||||
License: ASL 2.0
|
||||
# Automatically converted from old format: ASL 2.0 - review is highly recommended.
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/mstrobel/procyon
|
||||
# ./generate-tarball.sh
|
||||
# This script uses a fork of the original project
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source0: %{name}-%{commit}.tar.gz
|
||||
Source1: procyon-decompiler
|
||||
|
||||
# main removal is not upstream-able, and is enforced by fedora policy
|
||||
# signature is touching online world, necessary for packaging, not usptream able
|
||||
Patch0: removeSigningAndIfDecompilerAndMain.patch
|
||||
# fat jar do not have much sense for fedora packagin. not upstream-able
|
||||
Patch1: disableFatJar.patch
|
||||
# patch should be proposed to upstream.
|
||||
Patch2: adaptToNewerJcommander.patch
|
||||
Patch3: madeToPasXlint.patch
|
||||
Patch4: newJcommander.patch
|
||||
Patch5: lookupPatch.patch
|
||||
|
||||
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: java-25-devel
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: beust-jcommander
|
||||
Requires: java-headless
|
||||
Requires: java-25-headless
|
||||
Requires: javapackages-tools
|
||||
# main package is just meta package for all subprojects and their artifacts
|
||||
Recommends: %{name}-compilertools = %{version}-%{release}
|
||||
|
|
@ -48,6 +45,7 @@ The Procyon libraries are available from Maven Central under group ID org.bitbuc
|
|||
%package compilertools
|
||||
Summary: The procyon-compilertools project
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description compilertools
|
||||
|
|
@ -59,6 +57,7 @@ The Compiler Toolset is still early in development and subject to change.
|
|||
%package core
|
||||
Summary: The procyon-core framework contains common support classes
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description core
|
||||
|
|
@ -70,6 +69,7 @@ and some runtime type helpers.
|
|||
%package expressions
|
||||
Summary: The procyon-expressions framework provides a more natural form of Linq-like code generation
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description expressions
|
||||
|
|
@ -84,6 +84,7 @@ minus the dynamic callsite support (and with more relaxed rules regarding type c
|
|||
%package decompiler
|
||||
Summary: procyon-decompiler is a front-end for the Java decompiler
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: %{name}-core
|
||||
Requires: %{name}-compilertools
|
||||
Requires: beust-jcommander
|
||||
|
|
@ -97,6 +98,7 @@ https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler
|
|||
%package reflection
|
||||
Summary: The procyon-reflection framework provides a rich reflection and code generation API
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description reflection
|
||||
|
|
@ -107,7 +109,7 @@ limited and cumbersome support for generic type inspection. Its code generation
|
|||
MethodBuilder, and a bytecode emitter.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n %{name}-%{commit}
|
||||
%if %{remove_tests}
|
||||
find | grep "\\.class$"
|
||||
#find | grep "\\.jar$"
|
||||
|
|
@ -119,15 +121,8 @@ find | grep "\\.jar$" && exit 1
|
|||
dos2unix Procyon.Decompiler/build.gradle
|
||||
dos2unix build.gradle
|
||||
dos2unix README.md
|
||||
# also removing main method from enter point jar
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
dos2unix Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/MethodBinder.java
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
dos2unix Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
%patch5 -p0
|
||||
%patch -P3 -p1
|
||||
|
||||
%build
|
||||
mkdir -p build/Procyon.CompilerTools/{libs,classes}
|
||||
|
|
@ -136,10 +131,12 @@ mkdir -p build/Procyon.Decompiler/{libs,classes}
|
|||
mkdir -p build/Procyon.Expressions/{libs,classes}
|
||||
mkdir -p build/Procyon.Reflection/{libs,classes}
|
||||
|
||||
javac -d build/Procyon.Core/classes/ ` find Procyon.Core/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.Reflection/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.Reflection/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.Expressions/classes/ -cp build/Procyon.Core/classes/:build/Procyon.Reflection/classes/ ` find Procyon.Expressions/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.CompilerTools/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.CompilerTools/src/main/java -type f | grep "\.java"`
|
||||
sourceVersion="-source 8 -target 8 -g"
|
||||
|
||||
javac $sourceVersion -d build/Procyon.Core/classes/ ` find Procyon.Core/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.Reflection/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.Reflection/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.Expressions/classes/ -cp build/Procyon.Core/classes/:build/Procyon.Reflection/classes/ ` find Procyon.Expressions/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.CompilerTools/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.CompilerTools/src/main/java -type f | grep "\.java"`
|
||||
|
||||
# pack the jars
|
||||
for x in Procyon.CompilerTools Procyon.Core Procyon.Reflection Procyon.Expressions ; do
|
||||
|
|
@ -217,39 +214,4 @@ popd
|
|||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Thu Jun 03 2021 Marian Koncek <mkoncek@redhat.com> - 1.0~SNAPSHOT-1
|
||||
- Update to upstream version 1.0~SNAPSHOT
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.36-0.5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Dec 10 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.4
|
||||
- set source/target of 8
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.36-0.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.2
|
||||
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||
|
||||
* Tue Feb 18 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.1
|
||||
- bumped to latest tagged forest 0.5.36
|
||||
- fixed bug in usage of newer jcommander
|
||||
|
||||
* Tue Feb 18 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.33-0.5.pre02
|
||||
- removed fat jar, as gradle is gone
|
||||
- removed javadoc and srcs artifacts. will eb building by javac
|
||||
- buit by javac instead of gradle
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.33-0.3.pre02
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.33-0.2.pre02
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> 0.5.33-0.1.pre02
|
||||
- created special package for assembled fat jar
|
||||
- adapted rest of package to include and cooperate with minimal decompiler frontend
|
||||
|
||||
* Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> 0.5.33-0.1.pre01
|
||||
- inital load
|
||||
%autochangelog
|
||||
|
|
|
|||
|
|
@ -1,101 +0,0 @@
|
|||
diff --git a/build.gradle b/build.gradle
|
||||
index f521868..3168766 100644
|
||||
--- a/build.gradle
|
||||
+++ b/build.gradle
|
||||
@@ -62,9 +62,6 @@ rootProject.uploadArchives.enabled = false
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'maven'
|
||||
- apply plugin: 'signing'
|
||||
-
|
||||
- final boolean shouldSign = "true".equalsIgnoreCase(System.properties.getProperty("procyon.signing.enabled"))
|
||||
|
||||
archivesBaseName = "procyon-${(it.name as String).split('\\.')[1].toLowerCase()}"
|
||||
|
||||
@@ -131,86 +128,6 @@ subprojects {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
}
|
||||
-
|
||||
- if (shouldSign) {
|
||||
- signing {
|
||||
- sign configurations.archives
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- uploadArchives {
|
||||
- repositories.mavenDeployer {
|
||||
- if (shouldSign) {
|
||||
- beforeDeployment { MavenDeployment deployment ->
|
||||
- signing.signPom(deployment)
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
|
||||
- authentication(userName: project.properties.get("procyon.sonatype.username"),
|
||||
- password: project.properties.get("procyon.sonatype.password"))
|
||||
- }
|
||||
-
|
||||
- repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
|
||||
- authentication(userName: project.properties.get("procyon.sonatype.username"),
|
||||
- password: project.properties.get("procyon.sonatype.password"))
|
||||
- }
|
||||
-
|
||||
- pom {
|
||||
- groupId = project.group
|
||||
- version = project.version
|
||||
- artifactId = project.archivesBaseName
|
||||
-
|
||||
- project {
|
||||
- name project.archivesBaseName
|
||||
- packaging 'jar'
|
||||
- description 'Procyon'
|
||||
- url 'https://bitbucket.org/mstrobel/procyon'
|
||||
-
|
||||
- scm {
|
||||
- url 'https://bitbucket.org/mstrobel/procyon'
|
||||
- connection 'scm:hg:https://hg@bitbucket.org/mstrobel/procyon'
|
||||
- developerConnection 'scm:hg:https://mstrobel@bitbucket.org/mstrobel/procyon'
|
||||
- }
|
||||
-
|
||||
- issueManagement {
|
||||
- system 'jira'
|
||||
- url 'https://bitbucket.org/mstrobel/procyon/issues'
|
||||
- }
|
||||
-
|
||||
- licenses {
|
||||
- license {
|
||||
- name 'The Apache Software License, Version 2.0'
|
||||
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
- distribution 'repo'
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- developers {
|
||||
- developer {
|
||||
- id 'mstrobel'
|
||||
- name 'Mike Strobel'
|
||||
- roles {
|
||||
- role 'owner'
|
||||
- role 'packager'
|
||||
- role 'developer'
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- dependencies {
|
||||
- dependency {
|
||||
- groupId 'junit'
|
||||
- artifactId 'junit'
|
||||
- version '4.11'
|
||||
- scope 'test'
|
||||
-// optional = true
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (procyon-1.0~SNAPSHOT.tar.gz) = d19f5fc282facf0756a363844c38e98ea33d8488fd512b33a63057371e8ed31358ff47cb44b273a3687b09588342f25258a168ffba436380bd22d25b85ca3b07
|
||||
SHA512 (procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz) = 69c782cb8648f5c8f6ed1999d301df2318f64a3d3479a16ef340891deaef7a1b161d4d2808d98e70372381626dbe5488d9d0dc9b6c17feacc8e0d38f1747985e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue