From 68c94d9a3841d7b023e3f79cf3b3cdcdd8b5bc4a Mon Sep 17 00:00:00 2001
From: Petteri Räty <betelgeuse@gentoo.org>
Date: Sat, 9 Sep 2006 16:50:10 +0000
Subject: The UI and JAVA_OPTIONS settings in the gentoo.config configuration
 file work again. Fixes bug #146788. (Portage version: 2.1.1)

---
 net-p2p/azureus/ChangeLog                       |   9 +-
 net-p2p/azureus/azureus-2.5.0.0-r1.ebuild       | 120 ++++++++++++++++++++++++
 net-p2p/azureus/files/azureus-2.5.0.0-pre       |  65 +++++++++++++
 net-p2p/azureus/files/digest-azureus-2.5.0.0-r1 |   3 +
 4 files changed, 196 insertions(+), 1 deletion(-)
 create mode 100644 net-p2p/azureus/azureus-2.5.0.0-r1.ebuild
 create mode 100644 net-p2p/azureus/files/azureus-2.5.0.0-pre
 create mode 100644 net-p2p/azureus/files/digest-azureus-2.5.0.0-r1

diff --git a/net-p2p/azureus/ChangeLog b/net-p2p/azureus/ChangeLog
index 72f22eaa22fa..f769c7fe6a42 100644
--- a/net-p2p/azureus/ChangeLog
+++ b/net-p2p/azureus/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for net-p2p/azureus
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/azureus/ChangeLog,v 1.28 2006/08/27 17:58:00 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/azureus/ChangeLog,v 1.29 2006/09/09 16:50:10 betelgeuse Exp $
+
+*azureus-2.5.0.0-r1 (09 Sep 2006)
+
+  09 Sep 2006; Petteri Räty <betelgeuse@gentoo.org>
+  +files/azureus-2.5.0.0-pre, +azureus-2.5.0.0-r1.ebuild:
+  The UI and JAVA_OPTIONS settings in the gentoo.config configuration file
+  work again. Fixes bug #146788.
 
   27 Aug 2006; Petteri Räty <betelgeuse@gentoo.org> azureus-2.5.0.0.ebuild:
   Changed to depend on >=dev-java/swt-3.2-r1 to fix bug #140778.
diff --git a/net-p2p/azureus/azureus-2.5.0.0-r1.ebuild b/net-p2p/azureus/azureus-2.5.0.0-r1.ebuild
new file mode 100644
index 000000000000..cd8bb3bdbd77
--- /dev/null
+++ b/net-p2p/azureus/azureus-2.5.0.0-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/azureus/azureus-2.5.0.0-r1.ebuild,v 1.1 2006/09/09 16:50:10 betelgeuse Exp $
+
+inherit eutils fdo-mime java-pkg-2 java-ant-2
+
+DESCRIPTION="Azureus - Java BitTorrent Client"
+HOMEPAGE="http://azureus.sourceforge.net/"
+SRC_URI="mirror://sourceforge/azureus/Azureus_${PV}_source.zip"
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+IUSE="source"
+
+# >=swt-3.2 for bug 
+# https://bugs.gentoo.org/show_bug.cgi?id=135835
+
+RDEPEND="
+	>=virtual/jre-1.4
+	>=dev-java/swt-3.2-r1
+	>=dev-java/log4j-1.2.8
+	>=dev-java/commons-cli-1.0
+	>=dev-java/bcprov-1.31
+	!net-p2p/azureus-bin"
+DEPEND="${RDEPEND}
+	>=virtual/jdk-1.4
+	dev-util/desktop-file-utils
+	>=dev-java/ant-core-1.6.2
+	|| ( =dev-java/eclipse-ecj-3.2* =dev-java/eclipse-ecj-3.1* )
+	source? ( app-arch/zip )
+	>=app-arch/unzip-5.0"
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+	mkdir ${S}
+	cd ${S}
+	unpack ${A}
+
+	EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" \
+		epatch ${FILESDIR}/fedora-${PV}/
+
+	#removing osx files and entries
+	rm -fr org/gudy/azureus2/ui/swt/osx org/gudy/azureus2/platform/macosx
+	#removing windows files
+	rm -fr org/gudy/azureus2/platform/win32
+	#removing test files
+	rm -fr org/gudy/azureus2/ui/swt/test
+	rm -f org/gudy/azureus2/ui/console/multiuser/TestUserManager.java
+	#removing bouncycastle
+	rm -fr org/bouncycastle
+
+	mkdir -p build/libs
+	cd build/libs
+	java-pkg_jar-from log4j
+	java-pkg_jar-from commons-cli-1
+	java-pkg_jar-from swt-3
+	java-pkg_jar-from bcprov
+}
+
+src_compile() {
+	# javac likes to run out of memory during build... use ecj instead
+	java-pkg_force-compiler ecj-3.2 ecj-3.1
+
+	eant ${ant_extra_opts} jar
+}
+
+src_install() {
+	java-pkg_dojar dist/Azureus2.jar || die "dojar failed"
+
+
+	java-pkg_dolauncher ${PN} \
+		--main org.gudy.azureus2.ui.common.Main \
+		-pre ${FILESDIR}/${P}-pre \
+		--pkg_args '--ui=${UI}' \
+		--java_args '${JAVA_OPTIONS}'
+
+	doicon "${FILESDIR}/azureus.png"
+	domenu "${FILESDIR}/azureus.desktop"
+	use source && java-pkg_dosrc ${S}/{com,org}
+}
+
+pkg_postinst() {
+	echo
+	elog "Due to the nature of the portage system, we recommend"
+	elog "that users check portage for new versions of Azureus"
+	elog "instead of attempting to use the auto-update feature."
+	elog "You can disable auto-update in"
+	elog "Tools->Options...->Interface->Start"
+	echo
+	elog "After running azureus for the first time, configuration"
+	elog "options will be placed in ~/.azureus/gentoo.config"
+	elog "It is recommended that you modify this file rather than"
+	elog "the azureus startup script directly."
+	echo
+	elog "As of this version, the new ui type 'console' is supported,"
+	elog "and this may be set in ~/.azureus/gentoo.config."
+	echo
+	elog "If you have problems starting azureus, try starting it"
+	elog "from the command line to look at debugging output."
+	echo
+	ewarn "If you are upgrading, and the menu in azureus has entries like"
+	ewarn "\"!MainWindow.menu.transfers!\" then you have a stray"
+	ewarn "MessageBundle.properties file,"
+	ewarn "and you may safely delete ~/.azureus/MessagesBundle.properties"
+	echo
+	elog "It's recommended to use Sun's Java version 1.5 or later."
+	elog "If you're experiencing problems running azureus and you've"
+	elog "using an older version of Java, try to upgrading to a new version. "
+	echo
+	ewarn "Please, do not run azureus as root!"
+	ewarn "Azureus has not been developed for multi-user environments!"
+
+	fdo-mime_desktop_database_update
+}
+
+pkg_prerm() {
+	fdo-mime_desktop_database_update
+}
diff --git a/net-p2p/azureus/files/azureus-2.5.0.0-pre b/net-p2p/azureus/files/azureus-2.5.0.0-pre
new file mode 100644
index 000000000000..5278c094f80c
--- /dev/null
+++ b/net-p2p/azureus/files/azureus-2.5.0.0-pre
@@ -0,0 +1,65 @@
+#
+# Copyright (c) 2005, Petteri Räty <betelgeuse@gentoo.org>
+# Copyright (c) 2004, Jochen Maes <sejo@gentoo.org>
+# Copyright (c) 2004, Karl Trygve Kalleberg <karltk@gentoo.org>
+# Copyright (c) 2004, Gentoo Foundation
+#
+# Licensed under the GNU General Public License, v2
+
+# The Azureus config dir has moved
+olddotazudir="${HOME}/.Azureus"
+oldgentoocfg="${olddotazudir}/gentoo.config"
+dotazudir="${HOME}/.azureus"
+gentoocfg="${dotazudir}/gentoo.config"
+
+if [[ -f "${oldgentoocfg}" && -f "${gentoocfg}" ]]; then
+	cat > /dev/stderr <<END
+You have gentoo.config files in both 
+${dotazudir} and
+${olddotazudir}
+${olddotazudir} is deprecated and you can delete this directory.
+
+END
+fi
+
+if [[ -f "${gentoocfg}" ]] ; then
+	. "${gentoocfg}"
+	echo "using ${gentoocfg}"
+elif [[ -f "${oldgentoocfg}" ]]; then
+	. "${oldgentoocfg}"
+	echo "using ${oldgentoocfg}"
+else
+	if [[ ! -e "${dotazudir}" ]] ; then
+		mkdir "${dotazudir}"
+		echo "Creating ${dotazudir}" 
+	fi
+
+	# Setup defaults
+	UI="swt"
+
+	echo "Creating ${gentoocfg}"
+
+	# Create the config file
+	cat > "${gentoocfg}" <<END
+# User Interface options:
+# console   - console based
+# swt       - swt (GUI) based
+UI="${UI}"
+
+# Options you want to pass to the java binary
+JAVA_OPTIONS=""
+END
+
+fi
+
+if [[ -n "${UI_OPTIONS}" ]]; then
+	echo '${UI_OPTIONS} is no longer supported. ${UI} should be used instead instead' > /dev/stderr
+	echo 'Unsetting ${UI_OPTIONS}'
+	unset UI_OPTIONS
+fi
+
+if [[ -z "${UI}" ]]; then
+	echo '$UI not set adding UI="swt" to your ' ${gentoocfg}
+	echo 'UI="swt"' >> ${gentoocfg}
+fi
+
diff --git a/net-p2p/azureus/files/digest-azureus-2.5.0.0-r1 b/net-p2p/azureus/files/digest-azureus-2.5.0.0-r1
new file mode 100644
index 000000000000..9e923fb8c6d3
--- /dev/null
+++ b/net-p2p/azureus/files/digest-azureus-2.5.0.0-r1
@@ -0,0 +1,3 @@
+MD5 f487f75f37674820bd3b2cc6af97ce57 Azureus_2.5.0.0_source.zip 5856328
+RMD160 7ec7e6ccb570651a655f6077d4b323a4d3b8fcb0 Azureus_2.5.0.0_source.zip 5856328
+SHA256 64aa4150bb8036f11e5207a602253431d46578ce9cd3b62732b0ae0f555a08c4 Azureus_2.5.0.0_source.zip 5856328
-- 
cgit v1.2.3-65-gdbad