Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214636 - dev-java/proguard-4.2 version bump
Summary: dev-java/proguard-4.2 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-03-25 05:26 UTC by Alex Barker
Modified: 2008-10-22 01:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
proguard-4.2.ebuild (proguard-4.2.ebuild,3.69 KB, text/plain)
2008-03-25 06:37 UTC, Alex Barker
Details
proguard-4.2.ebuild (proguard-4.2.ebuild,3.77 KB, text/plain)
2008-03-27 08:21 UTC, Alex Barker
Details
4.1 -> 4.2 patch (proguard4.1-4.2.patch,5.36 KB, patch)
2008-03-27 17:09 UTC, Alex Barker
Details | Diff
Patch 4.2 to 4.2-r1 (proguard-4.2-r1.ebuild.patch,720 bytes, patch)
2008-05-03 01:54 UTC, Alex Barker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2008-03-25 05:26:53 UTC
new version dev-java/proguard 4.2 is available.

Reproducible: Always
Comment 1 Alex Barker 2008-03-25 06:37:38 UTC
Created attachment 147219 [details]
proguard-4.2.ebuild
Comment 2 Alex Barker 2008-03-25 06:43:17 UTC
ebuild was updated to 4.2.
-Moved java to version >=1.5 (tested 1.6)
-Added copying for properties, pro config, and images into jar file.
-Added ant use flag to control ant installation.
-Modified the docs to only install the manual (Untested)
-Modified examples to dodir (Untested)

I have not found a solution to jar ( ejar ? )
Comment 3 Alex Barker 2008-03-27 08:21:00 UTC
Created attachment 147436 [details]
proguard-4.2.ebuild

-Updated to fix several issues and type-o's.
-Removed useless use flag source.
-Tested all use flags.
-Use ant compiles fine but I have yet to test the actual ant functionality.
-J2ME is still a bit of a mystery #182475
Comment 4 Alistair Bush (RETIRED) gentoo-dev 2008-03-27 08:42:18 UTC
Please provide a diff from proguard-4.1 so we can see what you have actually done. :)
Comment 5 Alex Barker 2008-03-27 17:09:43 UTC
Created attachment 147460 [details, diff]
4.1 -> 4.2 patch

Here is the diff for 4.1 vs 4.2 latest
Comment 6 Alex Barker 2008-03-27 17:11:46 UTC
Comment on attachment 147460 [details, diff]
4.1 -> 4.2 patch

--- /usr/portage/dev-java/proguard/proguard-4.1.ebuild  2008-02-21 03:37:42.000000000 -0800
+++ proguard-4.2.ebuild 2008-03-27 10:05:35.000000000 -0700
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/dev-java/proguard/proguard-4.1.ebuild,v 1.1 2008/02/21 11:37:42 fordfrog Exp $

-JAVA_PKG_IUSE="doc source"
+JAVA_PKG_IUSE="doc"
 inherit java-pkg-2 java-ant-2

 DESCRIPTION="Free Java class file shrinker, optimizer, and obfuscator."
@@ -14,18 +14,23 @@
 LICENSE="GPL-2-with-linking-exception"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="examples j2me"
+IUSE="examples j2me ant"

-DEPEND=">=virtual/jdk-1.4
+DEPEND=">=virtual/jdk-1.5
+       ant? ( dev-java/ant )
        j2me? ( dev-java/sun-j2me-bin )"
-RDEPEND=">=virtual/jre-1.4
+RDEPEND=">=virtual/jre-1.5
        j2me? ( dev-java/sun-j2me-bin )"

 S=${WORKDIR}/${MY_P}

 src_unpack() {
        unpack ${A}
-       find "${S}" -name "*.jar" | xargs rm -v
+
+       einfo "Removing precompiled jars"
+       rm ${S}/lib/proguardgui.jar
+       rm ${S}/lib/proguard.jar
+       rm ${S}/lib/retrace.jar
 }

 src_compile() {
@@ -34,39 +39,68 @@

        einfo "Compiling ${PN}.jar"
        mkdir -p build/proguard/classes
-       ejavac -sourcepath src -d build/proguard/classes src/proguard/ProGuard.java || die "Cannot compile 'proguard'"
-       jar -cf "${S}"/dist/${PN}.jar -C build/proguard/classes proguard || die "Cannot create ${PN}.jar"
+       ejavac  -sourcepath src \
+               -d build/proguard/classes src/proguard/ProGuard.java \
+               || die "Cannot compile 'proguard'"
+       jar -cf "${S}"/dist/${PN}.jar \
+               -C build/proguard/classes proguard \
+               || die "Cannot create ${PN}.jar"

        einfo "Compiling ${PN}gui.jar"
        mkdir -p build/proguardgui/classes
-       ejavac -sourcepath src -d build/proguardgui/classes src/proguard/gui/ProGuardGUI.java || "Cannot compile 'proguardgui'"
-       jar -cf "${S}"/dist/${PN}gui.jar -C build/proguardgui/classes proguard || die "Cannot create ${PN}gui.jar"
+       ejavac  -sourcepath src \
+               -d build/proguardgui/classes src/proguard/gui/ProGuardGUI.java \
+               || "Cannot compile 'proguardgui'"
+       cp src/proguard/gui/*.gif build/proguardgui/classes/proguard/gui/
+       cp src/proguard/gui/*.pro build/proguardgui/classes/proguard/gui/
+       cp src/proguard/gui/*.properties build/proguardgui/classes/proguard/gui/
+       jar     -cf "${S}"/dist/${PN}gui.jar \
+               -C build/proguardgui/classes proguard \
+               || die "Cannot create ${PN}gui.jar"

        einfo "Compiling retrace.jar"
        mkdir -p build/retrace/classes
-       ejavac -sourcepath src -d build/retrace/classes src/proguard/retrace/ReTrace.java || die "Cannot compile 'retrace'"
-       jar -cf "${S}"/dist/retrace.jar -C build/retrace/classes proguard || die "Cannot create retrace.jar"
-
-       einfo "Compiling ${PN}-ant.jar"
-       mkdir -p build/ant/classes
-       ejavac -sourcepath src -classpath $(java-pkg_getjars --build-only ant-core) \
-               -d build/ant/classes src/proguard/ant/ProGuardTask.java || die "Cannot compile 'proguard-ant'"
-       jar -cf "${S}"/dist/${PN}-ant.jar -C build/ant/classes proguard || die "Cannot create ${PN}-ant.jar"
-
+       ejavac  -sourcepath src \
+               -d build/retrace/classes src/proguard/retrace/ReTrace.java \
+               || die "Cannot compile 'retrace'"
+       jar     -cf "${S}"/dist/retrace.jar \
+               -C build/retrace/classes proguard \
+               || die "Cannot create retrace.jar"
+
+       if use ant ; then
+               einfo "Compiling ${PN}-ant.jar"
+               mkdir -p build/ant/classes
+               ejavac -sourcepath src -classpath $(java-pkg_getjars \
+                       --build-only ant-core) \
+                       -d build/ant/classes src/proguard/ant/ProGuardTask.java \
+                       || die "Cannot compile 'proguard-ant'"
+               cp src/proguard/ant/*.properties build/ant/classes/proguard/ant/
+               jar     -cf "${S}"/dist/${PN}-ant.jar \
+                       -C build/ant/classes proguard \
+                       || die "Cannot create ${PN}-ant.jar"
+       fi
+
        if use j2me ; then
                einfo "Compiling ${PN}-wtk.jar"
                mkdir -p build/wtk/classes
-               ejavac -sourcepath src -classpath $(java-pkg_getjars sun-j2me-bin) \
-                       -d build/wtk/classes src/proguard/wtk/ProGuardObfuscator.java || die "Cannot compile 'proguard-wtk'"
-               jar -cf "${S}"/dist/${PN}-wtk.jar -C build/wtk/classes proguard || die "Cannot create ${PN}-wtk.jar"
+               ejavac  -sourcepath src \
+                       -classpath $(java-pkg_getjars sun-j2me-bin) \
+                       -d build/wtk/classes src/proguard/wtk/ProGuardObfuscator.java \
+                       || die "Cannot compile 'proguard-wtk'"
+               cp src/proguard/wtk/*.pro build/wtk/classes/proguard/wtk/
+               jar     -cf "${S}"/dist/${PN}-wtk.jar \
+                       -C build/wtk/classes proguard \
+                       || die "Cannot create ${PN}-wtk.jar"
        fi

        # generate javadoc
        if use doc ; then
+               einfo "Generating javadoc"
                mkdir javadoc
                local cp=$(java-pkg_getjars --build-only ant-core)
                use j2me && cp="${cp}:$(java-pkg_getjars sun-j2me-bin)"
-               javadoc -d javadoc -sourcepath src -classpath $${cp} -subpackages proguard || die "Cannot compile javadoc"
+               javadoc -d javadoc -sourcepath src -classpath ${cp} -subpackages proguard \
+                       || die "Could not generate javadoc"
        fi
 }

@@ -75,15 +109,20 @@
        java-pkg_dolauncher ${PN} --main proguard.ProGuard
        java-pkg_dolauncher ${PN}gui --main proguard.gui.ProGuardGUI
        java-pkg_dolauncher ${PN}_retrace --main proguard.retrace.ReTrace
-       java-pkg_register-ant-task

-       if use doc; then
-               dohtml -r docs/*
+       if use ant ; then
+               java-pkg_register-ant-task
+       fi
+
+       if use doc ; then
+               dohtml -r docs/manual/*
                java-pkg_dojavadoc javadoc
        fi

-       if use examples; then
-               dohtml -r examples
+       if use examples ; then
+               #dodir examples
+               insinto /usr/share/doc/${PN}
+               doins -r examples
        fi
 }
Comment 7 Alex Barker 2008-03-27 17:14:47 UTC
sorry i messed up the patch, then i messed up editing it.  Really wish i could delete things or edit time.
Comment 8 Alistair Bush (RETIRED) gentoo-dev 2008-03-29 02:06:32 UTC
question with the patch: Why depending on >=virtual/jdk-1.5?

comment about the patch:

ant? ( dev-java/ant ) should be ant? ( dev-java/ant-core ) this doesn't depend on any ant-tasks.  also you never use the ant package,  you still use ant-core.  Try compiling this with JAVA_PKG_STRICT=1 set.

comment about the package:

why are we even calling java-pkg_register-ant-task.  I can't see anywhere in the upstream doc's where it even says to do it.  it says

<taskdef resource="proguard/ant/task.properties"
         classpath="/usr/local/java/proguard/lib/proguard.jar" />
<proguard configuration="myconfigfile.pro"/>

So will remove that.
Comment 9 Alistair Bush (RETIRED) gentoo-dev 2008-03-29 02:21:53 UTC
Bumped.
Comment 10 Alex Barker 2008-05-02 06:01:58 UTC
We have a few issues.  First and most important when the package was pushed live a few cp cmds where removed for images and config information.  The proguardgui will no work with out that information in the jar.

I will post a patch when I clean it up.
Comment 11 Alex Barker 2008-05-03 01:54:45 UTC
Created attachment 151662 [details, diff]
Patch 4.2 to 4.2-r1

This should fix proguardgui runtime issues.
Comment 12 Miroslav Šulc gentoo-dev 2008-10-22 01:28:19 UTC
proguard-4.2-r1 in tree, reported bug in proguard gui has been fixed.