Compare commits

..

4 commits

Author SHA1 Message Date
Jiri
d5f5162b64 Built by javac instead of gradle 2019-01-18 18:52:16 +01:00
Jiri
30e74764f9 Adapted br/r/provides to el7 2019-01-18 18:22:22 +01:00
Jiri
9f6a613b6d Removed javadoc and srcs to target build by javac 2019-01-18 18:17:06 +01:00
Jiri
6507994c19 - removed fat jar, as epel have no gradle 2019-01-18 18:10:48 +01:00
7 changed files with 224 additions and 69 deletions

4
.gitignore vendored
View file

@ -1,5 +1 @@
/mstrobel-procyon-ee404caa9a29.zip
/v0.5.36.tar.gz
/procyon-1.0~SNAPSHOT.tar.gz
/procyon-92ba3f44b8f2b755a21efcdc05dec347ab4df552.tar.gz
/procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz

View file

@ -0,0 +1,12 @@
--- 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" },

28
disableFatJar.patch Normal file
View file

@ -0,0 +1,28 @@
diff -r ee404caa9a29 Procyon.Decompiler/build.gradle
--- a/Procyon.Decompiler/build.gradle
+++ b/Procyon.Decompiler/build.gradle.nw
@@ -3,23 +3,10 @@
jcenter()
}
- dependencies {
- classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
- }
}
jar.enabled = true
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
- }
-}
dependencies {
compile 'com.beust:jcommander:1.30'

View file

@ -1,23 +0,0 @@
#!/bin/bash
set -ex
name=procyon
version=`cat procyon.spec | grep "%global commit " | sed "s/.*commit //"`
# RETRIEVE
rm -rf procyon
git clone "https://github.com/mstrobel/procyon.git"
# CLEAN TARBALL
pushd procyon
git checkout "$version"
rm -rf .git .idea docs
rm -rf gradle*
popd
rm -rf "${name}-${version}"
mv procyon "${name}-${version}"
tar -czf "${name}-${version}.tar.gz" "${name}-${version}"
rm -rf "${name}-${version}"

View file

@ -2,39 +2,37 @@
%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: 0.6.0
Release: 0.11.%{commitdate}.git%{shortcommit}%{?dist}
Version: 0.5.33
Release: 0.1.pre03%{?dist}
Summary: procyon java decompiler and other tools
# 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}-%{commit}.tar.gz
Group: Development/Tools
License: ASL 2.0
URL: https://bitbucket.org/mstrobel/procyon/
#Source0: https://bitbucket.org/mstrobel/procyon/get/ee404caa9a29.zip
Source0: mstrobel-procyon-ee404caa9a29.zip
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
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
BuildRequires: javapackages-tools
BuildRequires: java-25-devel
BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: dos2unix
BuildRequires: beust-jcommander
Requires: java-25-headless
Requires: javapackages-tools
# main package is just meta package for all subprojects and their artifacts
Recommends: %{name}-compilertools = %{version}-%{release}
Recommends: %{name}-core = %{version}-%{release}
Recommends: %{name}-expressions = %{version}-%{release}
Recommends: %{name}-reflection = %{version}-%{release}
Recommends: %{name}-decompiler = %{version}-%{release}
Requires: java-headless
Requires: jpackage-utils
# main package is just meta package for all subprojects andtheirs artifacts
Requires: %{name}-compilertools = %{version}-%{release}
Requires: %{name}-core = %{version}-%{release}
Requires: %{name}-expressions = %{version}-%{release}
Requires: %{name}-reflection = %{version}-%{release}
Requires: %{name}-decompiler = %{version}-%{release}
%description
Procyon is a suite of Java metaprogramming tools focused on code generation and analysis.
@ -44,8 +42,8 @@ The Procyon libraries are available from Maven Central under group ID org.bitbuc
%package compilertools
Summary: The procyon-compilertools project
Group: Development/Tools
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Requires: javapackages-tools
%description compilertools
@ -56,8 +54,8 @@ The Compiler Toolset is still early in development and subject to change.
%package core
Summary: The procyon-core framework contains common support classes
Group: Development/Tools
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Requires: javapackages-tools
%description core
@ -68,8 +66,8 @@ and some runtime type helpers.
%package expressions
Summary: The procyon-expressions framework provides a more natural form of Linq-like code generation
Group: Development/Tools
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Requires: javapackages-tools
%description expressions
@ -83,8 +81,8 @@ 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
Group: Development/Tools
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Requires: %{name}-core
Requires: %{name}-compilertools
Requires: beust-jcommander
@ -97,8 +95,8 @@ https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler
%package reflection
Summary: The procyon-reflection framework provides a rich reflection and code generation API
Group: Development/Tools
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
Requires: javapackages-tools
%description reflection
@ -108,8 +106,9 @@ Emit APIs and is meant to address many of the shortcomings of the core Java refl
limited and cumbersome support for generic type inspection. Its code generation facilities include a TypeBuilder,
MethodBuilder, and a bytecode emitter.
%prep
%setup -q -n %{name}-%{commit}
%setup -q -n mstrobel-procyon-ee404caa9a29
%if %{remove_tests}
find | grep "\\.class$"
#find | grep "\\.jar$"
@ -121,22 +120,25 @@ 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
%patch -P3 -p1
%patch3 -p1
%build
mkdir -p build/Procyon.CompilerTools/{libs,classes}
mkdir -p build/Procyon.Core/{libs,classes}
mkdir -p build/Procyon.Decompiler/{libs,classes}
mkdir -p build/Procyon.Expressions/{libs,classes}
mkdir -p build/Procyon.Reflection/{libs,classes}
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"`
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"`
# pack the jars
for x in Procyon.CompilerTools Procyon.Core Procyon.Reflection Procyon.Expressions ; do
@ -149,7 +151,7 @@ done
# create just launcher jar to be used in fedora
mkdir build/launcher-minimal
mkdir build/launcher-minimal/classes
javac -source 8 -target 8 -cp build/Procyon.Core/classes/:build/Procyon.CompilerTools/classes/:%{_javadir}/beust-jcommander.jar -d build/launcher-minimal/classes ` find Procyon.Decompiler/src/main/java -type f | grep "\.java"`
javac -cp build/Procyon.Core/classes/:build/Procyon.CompilerTools/classes/:%{_javadir}/beust-jcommander.jar -d build/launcher-minimal/classes ` find Procyon.Decompiler/src/main/java -type f | grep "\.java"`
# pack the minimal jar
pushd build/launcher-minimal/classes/
jar -cf ../../../build/Procyon.Decompiler/libs/%{name}-decompiler-%{version}.jar com
@ -173,6 +175,7 @@ ln -s %{name}-expressions-%{version}.jar %{name}-expressions.jar
ln -s %{name}-reflection-%{version}.jar %{name}-reflection.jar
popd
%files
%license License.txt
%doc README.md
@ -213,5 +216,17 @@ popd
%license License.txt
%doc README.md
%changelog
%autochangelog
* Fri Jan 18 2019 Jiri Vanek <jvanek@redhat.com> 0.5.33-0.1.pre03
- removed fat jar, as epel have no gradle
- removed javadoc and srcs artifacts. will eb building by javac
- adapted br/r/provides to epel7
- buit by javac instead of gradle
* 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

View file

@ -0,0 +1,127 @@
diff -r ee404caa9a29 Procyon.Decompiler/build.gradle
--- a/Procyon.Decompiler/build.gradle Thu Jul 26 07:08:30 2018 -0400
+++ b/Procyon.Decompiler/build.gradle Fri Dec 21 17:02:23 2018 +0100
@@ -8,7 +8,7 @@
}
}
-jar.enabled = false
+jar.enabled = true
uploadArchives.enabled = false
apply plugin: 'eu.appsatori.fatjar'
@@ -17,7 +17,7 @@
// from rootProject.allprojects.collect({ it.sourceSets.main.allSource })
manifest {
- attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': version, 'Main-Class' : 'com.strobel.decompiler.DecompilerDriver'
+ attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': version
}
}
@@ -25,4 +25,4 @@
compile 'com.beust:jcommander:1.30'
compile project(':Procyon.Core')
compile project(':Procyon.CompilerTools')
-}
\ No newline at end of file
+}
diff -r ee404caa9a29 build.gradle
--- a/build.gradle Thu Jul 26 07:08:30 2018 -0400
+++ b/build.gradle Fri Dec 21 17:02:23 2018 +0100
@@ -59,7 +59,6 @@
subprojects {
apply plugin: 'maven'
- apply plugin: 'signing'
archivesBaseName = 'procyon-' + it.name.split("\\.")[1].toLowerCase()
@@ -80,7 +79,7 @@
from sourceSets.main.allSource
}
- if (project.name != "Procyon.Decompiler") {
+
javadoc {
options.encoding = 'UTF-8'
}
@@ -91,78 +90,6 @@
archives sourcesJar
}
- signing {
- sign configurations.archives
- }
- uploadArchives {
- repositories.mavenDeployer {
- beforeDeployment { MavenDeployment deployment ->
- signing.signPom(deployment)
- }
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
- authentication(userName: project.properties.get("sonatypeUsername"), password: project.properties.get("sonatypePassword"))
- }
-
- repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
- authentication(userName: project.properties.get("sonatypeUsername"), password: project.properties.get("sonatypePassword"))
- }
-
- 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
- }
- }
- }
- }
- }
- }
- }
}

View file

@ -1 +1 @@
SHA512 (procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz) = 69c782cb8648f5c8f6ed1999d301df2318f64a3d3479a16ef340891deaef7a1b161d4d2808d98e70372381626dbe5488d9d0dc9b6c17feacc8e0d38f1747985e
SHA512 (mstrobel-procyon-ee404caa9a29.zip) = f47a9539509ac380e5fc1cb694a8f5f17a9b925726f937c92cffcce4490ed6e4773f9cf265fc28c8a4eb51da6b0257730a4ae3a8e343e17c1dfe9eeee4fcadb0