/[gentoo-x86]/net-p2p/vuze/vuze-5.6.0.0.ebuild
Gentoo

Contents of /net-p2p/vuze/vuze-5.6.0.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 19 10:03:51 2015 UTC (4 years, 6 months ago) by rhill
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -4 lines
Add SLOTs to java deps. Remove old.

Signed-off-by: Ryan Hill <rhill@gentoo.org>
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 957A8463)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/vuze/vuze-5.6.0.0.ebuild,v 1.1 2015/03/14 09:39:07 rhill Exp $
4
5 EAPI="5"
6
7 JAVA_PKG_IUSE="source"
8
9 inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator
10
11 MY_PV=$(replace_all_version_separators "")
12 MY_SRC="Vuze_${MY_PV}"
13
14 DESCRIPTION="BitTorrent client in Java, formerly called Azureus"
15 HOMEPAGE="http://www.vuze.com/"
16 SRC_URI="mirror://sourceforge/azureus/${PN}/${MY_SRC}/${MY_SRC}_source.zip"
17 LICENSE="GPL-2 BSD"
18
19 SLOT="0"
20 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
21 IUSE=""
22
23 # bundles parts of http://www.programmers-friend.org/
24 # bundles bcprov - 1.37 required but not in the tree
25 RDEPEND="
26 dev-java/commons-cli:1
27 dev-java/commons-lang:2.1
28 dev-java/json-simple:0
29 dev-java/log4j:0
30 dev-java/swt:3.8[cairo]
31 >=virtual/jre-1.6:*"
32
33 DEPEND="${RDEPEND}
34 app-arch/unzip
35 dev-util/desktop-file-utils
36 >=virtual/jdk-1.6:*"
37
38 PDEPEND="~net-p2p/vuze-coreplugins-${PV}"
39
40 pkg_pretend() {
41 if ! has_version dev-java/swt:3.8[webkit]; then
42 echo
43 ewarn "dev-java/swt:3.8 was built without webkit support."
44 ewarn "Web features such as Vuze HD Network will be disabled."
45 fi
46 }
47
48 src_unpack() {
49 mkdir -p "${S}" && cd "${S}"
50 unpack ${A}
51
52 # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4
53 [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite"
54 cp "${FILESDIR}"/build.xml "${S}" || die "failed to copy build.xml"
55 }
56
57 java_prepare() {
58 # upstream likes randomly changing a subset of files to CRLF every release
59 edos2unix $(find "${S}" -type f -name "*.java")
60
61 epatch "${FILESDIR}"/${PN}-5.3.0.0-java5.patch
62 epatch "${FILESDIR}"/${PN}-5.3.0.0-remove-classpath.patch
63 epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-shared-plugins.patch
64 epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-osx.patch
65 epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-updaters.patch
66 epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-commons.patch
67 epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-json.patch
68 epatch "${FILESDIR}"/${PN}-5.6.0.0-commons-lang-entities.patch
69 epatch "${FILESDIR}"/${PN}-5.6.0.0-invalid-characters.patch
70 # epatch "${FILESDIR}"/${P}-use-jdk-cipher-only.patch # bcprov
71
72 # OSX / Windows
73 rm "${S}"/org/gudy/azureus2/ui/swt/osx/CarbonUIEnhancer.java
74 rm "${S}"/org/gudy/azureus2/ui/swt/osx/Start.java
75 rm "${S}"/org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java
76
77 # Tree2 file does not compile on linux
78 rm -rf "${S}"/org/eclipse || die
79 # Bundled apache
80 rm -rf "${S}"/org/apache || die
81 # Bundled json
82 rm -rf "${S}"/org/json || die
83 # Bundled bcprov
84 # currently disabled - requires bcprov 1.37
85 #rm -rf "${S}"/org/bouncycastle || die
86
87 rm -rf "${S}"/org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die
88 mkdir -p "${S}"/build/libs || die
89 }
90
91 JAVA_ANT_REWRITE_CLASSPATH="true"
92 EANT_GENTOO_CLASSPATH="swt-3.8,json-simple,log4j,commons-cli-1 commons-lang-2.1"
93
94 src_compile() {
95 local mem
96 use amd64 && mem="320"
97 use x86 && mem="192"
98 use ppc && mem="192"
99 use ppc64 && mem="256"
100 use sparc && mem="320"
101 export ANT_OPTS="-Xmx${mem}m"
102 java-pkg-2_src_compile
103
104 # bug #302058 - build.xml excludes .txt but upstream jar has it...
105 jar uf dist/Azureus2.jar ChangeLog.txt || die
106 }
107
108 src_install() {
109 java-pkg_dojar dist/Azureus2.jar
110 dodoc ChangeLog.txt
111
112 java-pkg_dolauncher "${PN}" \
113 --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \
114 --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \
115 --pkg_args '--ui=${UI}'
116 dosym vuze /usr/bin/azureus
117
118 # https://bugs.gentoo.org/show_bug.cgi?id=204132
119 java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins
120
121 newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png
122 domenu "${FILESDIR}"/${PN}.desktop
123
124 use source && java-pkg_dosrc "${S}"/{com,edu,org}
125 }
126
127 pkg_postinst() {
128 ewarn "Running Vuze as root is not supported and may result in untracked"
129 ewarn "updates to shared components and then collisions on updates"
130 echo
131 elog "Vuze was formerly called Azureus and many references to the old name remain."
132 elog
133 elog "After running Vuze for the first time, configuration options will be"
134 elog "placed in '~/.azureus/gentoo.config'."
135 elog
136 elog "If you need to change some startup options, you should modify this file"
137 elog "rather than the startup script. You can enable the console UI by"
138 elog "editing this config file."
139 echo
140 fdo-mime_desktop_database_update
141 }
142
143 pkg_postrm() {
144 fdo-mime_desktop_database_update
145 }

  ViewVC Help
Powered by ViewVC 1.1.20