1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/proguard/proguard-4.3.ebuild,v 1.1 2009/02/04 20:08:58 serkan Exp $
5 JAVA_PKG_IUSE
="doc source"
6 inherit java-pkg-2 java-ant-2
8 DESCRIPTION
="Free Java class file shrinker, optimizer, and obfuscator."
9 HOMEPAGE
="http://proguard.sourceforge.net/"
12 SRC_URI
="mirror://sourceforge/proguard/${MY_P}.tar.gz"
14 LICENSE
="GPL-2-with-linking-exception"
16 KEYWORDS
="~amd64 ~x86"
19 DEPEND
=">=virtual/jdk-1.4
20 j2me? ( dev-java/sun-wtk-bin )
22 RDEPEND
=">=virtual/jre-1.4
23 j2me? ( dev-java/sun-wtk-bin )
30 find "${S}" -name "*.jar" |
xargs rm -v
37 einfo
"Compiling ${PN}.jar"
38 mkdir
-p build
/proguard
/classes
39 ejavac
-sourcepath src
-d build
/proguard
/classes src
/proguard
/ProGuard.java || die
"Cannot compile 'proguard'"
40 jar
-cf "${S}"/dist/${PN}.jar -C build/proguard/classes proguard || die "Cannot create ${PN}.jar"
42 einfo
"Compiling ${PN}gui.jar"
43 mkdir
-p build
/proguardgui
/classes
44 ejavac
-sourcepath src
-d build
/proguardgui
/classes src
/proguard
/gui
/ProGuardGUI.java || die
"Cannot compile 'proguardgui'"
45 cp src
/proguard
/gui
/*.gif build
/proguardgui
/classes
/proguard
/gui
/
46 cp src
/proguard
/gui
/*.pro build
/proguardgui
/classes
/proguard
/gui
/
47 cp src
/proguard
/gui
/*.properties build
/proguardgui
/classes
/proguard
/gui
/
48 jar
-cf "${S}"/dist/${PN}gui.jar -C build/proguardgui/classes proguard || die "Cannot create ${PN}gui.jar"
50 einfo
"Compiling retrace.jar"
51 mkdir
-p build
/retrace
/classes
52 ejavac
-sourcepath src
-d build
/retrace
/classes src
/proguard
/retrace
/ReTrace.java || die
"Cannot compile 'retrace'"
53 jar
-cf "${S}"/dist
/retrace.jar
-C build
/retrace
/classes proguard || die
"Cannot create retrace.jar"
55 einfo
"Compiling ${PN}-ant.jar"
56 mkdir
-p build
/ant
/classes
57 ejavac
-sourcepath src
-classpath $
(java-pkg_getjars ant-core
) \
58 -d build
/ant
/classes src
/proguard
/ant
/ProGuardTask.java || die
"Cannot compile 'proguard-ant'"
59 jar
-cf "${S}"/dist/${PN}-ant.jar -C build/ant/classes proguard || die "Cannot create ${PN}-ant.jar"
62 einfo
"Compiling ${PN}-wtk.jar"
63 mkdir
-p build
/wtk
/classes
64 ejavac
-sourcepath src
-classpath $
(java-pkg_getjars sun-wtk-bin
) \
65 -d build
/wtk
/classes src
/proguard
/wtk
/ProGuardObfuscator.java || die
"Cannot compile 'proguard-wtk'"
66 jar
-cf "${S}"/dist/${PN}-wtk.jar -C build/wtk/classes proguard || die "Cannot create ${PN}-wtk.jar"
72 local cp=$
(java-pkg_getjars ant-core
)
73 use j2me
&& cp="${cp}:$(java-pkg_getjars sun-wtk-bin)"
74 javadoc
-d javadoc
-sourcepath src
-classpath $
${cp} -subpackages proguard || die
"Cannot compile javadoc"
80 java-pkg_dolauncher
${PN} --main proguard.ProGuard
81 java-pkg_dolauncher
${PN}gui
--main proguard.gui.ProGuardGUI
82 java-pkg_dolauncher
${PN}_retrace
--main proguard.retrace.ReTrace
86 java-pkg_dojavadoc javadoc
95 elog
"Please see http://proguard.sourceforge.net/GPL_exception.html"
96 elog
"for linking exception information about ${PN}"