diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-p2p/vuze | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-p2p/vuze')
19 files changed, 1054 insertions, 0 deletions
diff --git a/net-p2p/vuze/Manifest b/net-p2p/vuze/Manifest new file mode 100644 index 000000000000..09f88fb4c27d --- /dev/null +++ b/net-p2p/vuze/Manifest @@ -0,0 +1,4 @@ +DIST Vuze_4812_source.zip 9530217 SHA256 8ad02ae61ac1c515cb3226b95b34d4fe036faa64e725b64fdcb5ef7d1cb9633d SHA512 7007c91f829c57d0f08b9da4ea3fcc8820efe14aeec7286cf764e5ac2d7d165f3a14abc6b0e92a617e21b45803f7c121fb00ddd8c5e8d9664509eb3337fc65bf WHIRLPOOL bc8823e053fa2f86161234c77f4873f2035a111361d60ee8c75937710774defec577651a10acf909bb170e600dc2775a5dbe2cf626649729e86f4a04e02a46d9 +DIST Vuze_5300_source.zip 10015198 SHA256 556149f09f48c533a37d80526ac655f0bc067f3a6bf3f3c4483f5273ac74ebc7 SHA512 44bad9f04707ae37acb66f16ae94afd7ad24d245f0371f60241442f460277c5b8dd29476640eb1e04b468b3ebd0100a159d1027764445ab526e3e0c0c544296d WHIRLPOOL 801e398eaf8b8457dc02336039bc8a64e535544ff1ea99ff100b623f734a499147e9abd8ce3031ebb0f1e5bb0e04a9c160e06fe5c0b16f12b31caf920f711d4a +DIST Vuze_5600_source.zip 10398501 SHA256 1aa6148311969ce6c51333b7ef51bcc8713e222fa5d14b2448e97aebbd25ea5e SHA512 dfe557cb1f50be935c78ee4431bc14db5f0107eebab8545cf925de8b0d48bb91ca77f7feab54a5fd91aaaf50bd3c68c1519cf49c2eb4d145ff7794bf9f22cfd7 WHIRLPOOL 62b637b5fc8145c31bdfb0ca2f63bdd9ee9c70d3afde3cb693ede66c0ab6db593f412ab124ac1230f1bbf33ff9ce635e29a0cea7556f013fcb7144aacb98c0d0 +DIST vuze-4.5.0.2-gentoo-patches.tar.bz2 3143 SHA256 972cf16d88d8605f93b77a84770b6512d54ae8281a0d4c06b66890a69deb6c49 SHA512 aacaeb404d9b7dbb40d89b04f9ad26caf447202b1fcb63d532f5e01dc611152adbc38804563f1a35227a080b2eadec0e2e42d0baa163d1d5489eec65cd28f83d WHIRLPOOL a7dd533676c428a00caddc2d4d4c008feec1a1201bb9aef7b7ed9c25d41405344d89bc9f70d442f043beb7aaf6db7d73582cc46edfa3665d599b2635e51b1ee7 diff --git a/net-p2p/vuze/files/build.xml b/net-p2p/vuze/files/build.xml new file mode 100644 index 000000000000..7b060c14b2f2 --- /dev/null +++ b/net-p2p/vuze/files/build.xml @@ -0,0 +1,68 @@ +<?xml version="1.0"?> + +<!-- + +NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compile this project successfully. + +--> + + +<project default="jar" name="Azureus" basedir="."> + + <property name="root.dir" value="." /> <!-- REMINDER: this needs to be "." for public source --> + <property name="libs.dir" value="build/libs" /> + <property name="dist.dir" value="dist" /> + + <property name="generic.excludes" value="**/*.jar **/*.txt **/*.jardesc **/.classpath **/.project **/aereg.lib **/aereg.dll" /> + <property name="dist.jar.excludes" value="${generic.excludes} **/*.java " /> + <!-- <property name="dist.source.excludes" value="${generic.excludes} **/*.class" /> --> + + + <target name="init" > + <echo message="Building Azureus2.jar..." /> + + <tstamp/> + + <!-- <condition property="libs.dir" value="build/libs"> + <not> <isset property="libs.dir" /> </not> + </condition> --> + + <mkdir dir="${root.dir}/${dist.dir}" /> + </target> + + + <target name="compile" depends="init" > + <path id="libs.classpath"> + <fileset dir="${root.dir}/${libs.dir}" includes="**/*.jar" /> + </path> + + <javac srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" source="1.4" target="1.4" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" > + <classpath refid="libs.classpath" /> + </javac> + </target> + + + <target name="jar" depends="compile" > + <jar destfile="${root.dir}/${dist.dir}/Azureus2.jar" basedir="${root.dir}" excludes="${dist.jar.excludes}" > + <manifest> + <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" /> + <attribute name="Class-Path" value="Azureus2.jar apple-extensions.jar commons-cli.jar log4j.jar swt.jar swt-win32.jar swt-osx.jar" /> + </manifest> + </jar> + + <!-- <zip destfile="${dist.dir}/Azureus2_source.zip" basedir="." excludes="${dist.source.excludes}" /> --> + + </target> + + + <target name="clean" > + <delete quiet="true" > + <fileset dir="${root.dir}/com" includes="**/*.class"/> + <fileset dir="${root.dir}/org" includes="**/*.class"/> + </delete> + + <delete dir="${root.dir}/${dist.dir}" /> + </target> + +</project> + diff --git a/net-p2p/vuze/files/vuze-4.1.0.0-pre b/net-p2p/vuze/files/vuze-4.1.0.0-pre new file mode 100644 index 000000000000..505a7e704df3 --- /dev/null +++ b/net-p2p/vuze/files/vuze-4.1.0.0-pre @@ -0,0 +1,75 @@ +# +# 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 + +create_initial_config() { + if [[ ! -e "${dotazudir}" ]] ; then + mkdir "${dotazudir}" + echo "Creating ${dotazudir}" + fi + + [[ ${UI} ]] && 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 +} + +if [[ -f "${gentoocfg}" ]] ; then + . "${gentoocfg}" + echo "using ${gentoocfg}" +elif [[ -f "${oldgentoocfg}" ]]; then + . "${oldgentoocfg}" + echo "using ${oldgentoocfg}" +else + create_initial_config +fi + +if [[ -z "${UI}" && -n "${UI_OPTIONS}" ]]; then + echo '${UI_OPTIONS} is no longer supported. ${UI} should be used instead instead' > /dev/stderr + echo 'Unsetting ${UI_OPTIONS} and trying to migrate to ${UI}' > /dev/stderr + if [[ ${UI_OPTIONS} = *--ui=console* ]]; then + UI=console + elif [[ ${UI_OPTIONS} = *--ui=swt* ]]; then + UI=swt + else + echo 'Could not make $UI from $UI_OPTIONS' > /dev/stderr + fi + unset UI_OPTIONS +fi + +if [[ -z "${UI}" ]]; then + echo '$UI not set defaulting to swt' > /dev/stderr + UI="swt" +fi + +[[ ! -e "${dotazudir}" ]] && create_initial_config diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch new file mode 100644 index 000000000000..070dae2d7562 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch @@ -0,0 +1,60 @@ +--- a/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java ++++ b/org/gudy/azureus2/ui/swt/mainwindow/SWTThread.java +@@ -229,57 +229,6 @@ public class SWTThread { + } + }); + +- if (Constants.isOSX) { +- +- // On Cocoa, we get a Close trigger on display. Need to check if all +- // platforms send this. +- display.addListener(SWT.Close, new Listener() { +- public void handleEvent(Event event) { +- event.doit = UIFunctionsManager.getUIFunctions().dispose(false, false); +- } +- }); +- +- String platform = SWT.getPlatform(); +- // use reflection here so we decouple generic SWT from OSX specific stuff to an extent +- +- if (platform.equals("carbon")) { +- try { +- +- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CarbonUIEnhancer"); +- +- Constructor<?> constructor = ehancerClass.getConstructor(new Class[] {}); +- +- constructor.newInstance(new Object[] {}); +- +- } catch (Throwable e) { +- +- Debug.printStackTrace(e); +- } +- } else if (platform.equals("cocoa")) { +- try { +- +- Class<?> ehancerClass = Class.forName("org.gudy.azureus2.ui.swt.osx.CocoaUIEnhancer"); +- +- Method mGetInstance = ehancerClass.getMethod("getInstance", new Class[0]); +- Object claObj = mGetInstance.invoke(null, new Object[0] ); +- +- Method mHookAppMenu = claObj.getClass().getMethod("hookApplicationMenu", new Class[] {}); +- if (mHookAppMenu != null) { +- mHookAppMenu.invoke(claObj, new Object[0]); +- } +- +- Method mHookDocOpen = claObj.getClass().getMethod("hookDocumentOpen", new Class[] {}); +- if (mHookDocOpen != null) { +- mHookDocOpen.invoke(claObj, new Object[0]); +- } +- +- } catch (Throwable e) { +- +- Debug.printStackTrace(e); +- } +- } +- } +- + if (app != null) { + app.runInSWTThread(); + runner = new Thread(new AERunnable() { diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch new file mode 100644 index 000000000000..b459c8b38308 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch @@ -0,0 +1,33 @@ +Disallow users to install into the shared plugin directory, +which they won't have write access to. This doesn't disable +shared plugins, just removes the installation UI. + + +--- a/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java ++++ b/org/gudy/azureus2/ui/swt/pluginsinstaller/IPWListPanel.java +@@ -234,13 +234,13 @@ public class IPWListPanel extends AbstractWizardPanel<InstallPluginWizard> { + } + + public boolean +- isNextEnabled() ++ isFinishEnabled() + { + return(((InstallPluginWizard)wizard).getPluginList().size() > 0 ); + } + +- public IWizardPanel<InstallPluginWizard> getNextPanel() { +- return new IPWInstallModePanel(wizard,this); ++ public IWizardPanel<InstallPluginWizard> getFinishPanel() { ++ return new IPWFinishPanel(wizard,this); + } + + public void updateList() { +@@ -252,7 +252,7 @@ public class IPWListPanel extends AbstractWizardPanel<InstallPluginWizard> { + } + } + wizard.setPluginList( list ); +- wizard.setNextEnabled( isNextEnabled() ); ++ wizard.setFinishEnabled( isFinishEnabled() ); + + } + } diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch b/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch new file mode 100644 index 000000000000..1bf78cf1009d --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch @@ -0,0 +1,45 @@ +--- a/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java ++++ b/org/gudy/azureus2/pluginsimpl/local/PluginInitializer.java +@@ -130,18 +130,6 @@ PluginInitializer + "Magnet URI Handler", + "true", + "false"}, +- { PluginManagerDefaults.PID_CORE_UPDATE_CHECKER, +- "org.gudy.azureus2.update.CoreUpdateChecker", +- "azbpcoreupdater", +- "CoreUpdater", +- "true", +- "true"}, +- { PluginManagerDefaults.PID_CORE_PATCH_CHECKER, +- "org.gudy.azureus2.update.CorePatchChecker", +- "azbpcorepatcher", +- "CorePatcher", +- "true", +- "true"}, + { PluginManagerDefaults.PID_PLATFORM_CHECKER, + "org.gudy.azureus2.platform.PlatformManagerPluginDelegate", + "azplatform2", +--- a/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java ++++ b/org/gudy/azureus2/pluginsimpl/update/PluginUpdatePlugin.java +@@ -562,6 +562,10 @@ PluginUpdatePlugin + } + } + ++ if ( pi.getPluginState().isShared()) { ++ continue; ++ } ++ + String mand = pi.getPluginProperties().getProperty( "plugin.mandatory"); + + boolean pi_mandatory = mand != null && mand.trim().toLowerCase().equals("true"); +--- a/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java ++++ b/org/gudy/azureus2/ui/swt/updater2/SWTUpdateChecker.java +@@ -64,7 +64,7 @@ public class SWTUpdateChecker implements UpdatableComponent + public static void + initialize() + { +- PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new SWTUpdateChecker(),true); ++// PluginInitializer.getDefaultInterface().getUpdateManager().registerUpdatableComponent(new SWTUpdateChecker(),true); + } + + public SWTUpdateChecker() { diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch b/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch new file mode 100644 index 000000000000..3ef4d808ad77 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch @@ -0,0 +1,24 @@ +--- a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java ++++ b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java +@@ -50,17 +50,17 @@ public class DateParserRegex extends DateParser { + + private static final String[] MONTHS_LIST = new String[] { + " january janvier enero januar", +- " february fevrier fŽvrier febrero februar", +- " march mars marzo marz marz mŠrz" , ++ " february fevrier febrero februar", ++ " march mars marzo marz marz" , + " april avril abril april ", + " may mai mayo mai", + " june juin junio juni", + " july juillet julio juli", +- " august aout aožt agosto august", ++ " august aout agosto august", + " september septembre septiembre september", + " october octobre octubre oktober", + " november novembre noviembre november", +- " december decembre dŽcembre diciembre dezember"}; ++ " december decembre diciembre dezember"}; + + public DateParserRegex() { + this("GMT-7",true,null); diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch b/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch new file mode 100644 index 000000000000..b6d2a59c43a2 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-java5.patch @@ -0,0 +1,11 @@ +--- a/build.xml ++++ b/build.xml +@@ -36,7 +36,7 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compil + <fileset dir="${root.dir}/${libs.dir}" includes="**/*.jar" /> + </path> + +- <javac srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" source="1.4" target="1.4" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" > ++ <javac encoding="8859_1" srcdir="${root.dir}" destdir="${root.dir}" nowarn="yes" includeAntRuntime="no" debug="true" debuglevel="lines,vars,source" > + <classpath refid="libs.classpath" /> + </javac> + </target> diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch b/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch new file mode 100644 index 000000000000..290b902203a8 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch @@ -0,0 +1,10 @@ +--- a/build.xml ++++ b/build.xml +@@ -46,7 +46,6 @@ NOTE: You may need to set the ANT_OPTS="-Xmx512m" env prop in order to compil + <jar destfile="${root.dir}/${dist.dir}/Azureus2.jar" basedir="${root.dir}" excludes="${dist.jar.excludes}" > + <manifest> + <attribute name="Main-Class" value="org.gudy.azureus2.ui.common.Main" /> +- <attribute name="Class-Path" value="Azureus2.jar apple-extensions.jar commons-cli.jar log4j.jar swt.jar swt-win32.jar swt-osx.jar" /> + </manifest> + </jar> + diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch new file mode 100644 index 000000000000..deed0af9c7b2 --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch @@ -0,0 +1,110 @@ +--- a/com/aelitis/azureus/core/metasearch/Result.java ++++ b/com/aelitis/azureus/core/metasearch/Result.java +@@ -27,7 +27,7 @@ import java.util.Locale; + import java.util.Map; + import java.util.Random; + +-import org.apache.commons.lang.Entities; ++import org.apache.commons.lang.StringEscapeUtils; + import org.gudy.azureus2.core3.util.DisplayFormatters; + import org.json.simple.JSONObject; + +@@ -372,6 +372,6 @@ public abstract class Result { + if ( input == null ){ + return( null ); + } +- return( Entities.HTML40.unescape( input )); ++ return( StringEscapeUtils.unescapeHtml( input )); + } + } +--- a/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java ++++ b/com/aelitis/azureus/core/metasearch/impl/web/WebResult.java +@@ -88,14 +88,14 @@ public class WebResult extends Result { + public void setNameFromHTML(String name) { + if(name != null) { + name = removeHTMLTags(name); +- this.name = Entities.HTML40.unescape(name); ++ this.name = StringEscapeUtils.unescapeHtml(name); + } + } + + public void setCommentsFromHTML(String comments) { + if(comments != null) { + comments = removeHTMLTags(comments); +- comments = Entities.HTML40.unescape(comments); ++ comments = StringEscapeUtils.unescapeHtml(comments); + comments = comments.replaceAll(",", ""); + comments = comments.replaceAll(" ", ""); + try{ +@@ -108,7 +108,7 @@ public class WebResult extends Result { + public void setCategoryFromHTML(String category) { + if(category != null) { + category = removeHTMLTags(category); +- this.category = Entities.HTML40.unescape(category).trim(); ++ this.category = StringEscapeUtils.unescapeHtml(category).trim(); + /*int separator = this.category.indexOf(">"); + + if(separator != -1) { +@@ -133,7 +133,7 @@ public class WebResult extends Result { + public void setNbPeersFromHTML(String nbPeers) { + if(nbPeers != null) { + nbPeers = removeHTMLTags(nbPeers); +- String nbPeersS = Entities.HTML40.unescape(nbPeers); ++ String nbPeersS = StringEscapeUtils.unescapeHtml(nbPeers); + nbPeersS = nbPeersS.replaceAll(",", ""); + nbPeersS = nbPeersS.replaceAll(" ", ""); + try { +@@ -148,7 +148,7 @@ public class WebResult extends Result { + public void setNbSeedsFromHTML(String nbSeeds) { + if(nbSeeds != null) { + nbSeeds = removeHTMLTags(nbSeeds); +- String nbSeedsS = Entities.HTML40.unescape(nbSeeds); ++ String nbSeedsS = StringEscapeUtils.unescapeHtml(nbSeeds); + nbSeedsS = nbSeedsS.replaceAll(",", ""); + nbSeedsS = nbSeedsS.replaceAll(" ", ""); + try { +@@ -163,7 +163,7 @@ public class WebResult extends Result { + public void setNbSuperSeedsFromHTML(String nbSuperSeeds) { + if(nbSuperSeeds != null) { + nbSuperSeeds = removeHTMLTags(nbSuperSeeds); +- String nbSuperSeedsS = Entities.HTML40.unescape(nbSuperSeeds); ++ String nbSuperSeedsS = StringEscapeUtils.unescapeHtml(nbSuperSeeds); + nbSuperSeedsS = nbSuperSeedsS.replaceAll(",", ""); + nbSuperSeedsS = nbSuperSeedsS.replaceAll(" ", ""); + try { +@@ -230,7 +230,7 @@ public class WebResult extends Result { + public void setPublishedDateFromHTML(String publishedDate) { + if(publishedDate != null) { + publishedDate = removeHTMLTags(publishedDate); +- String publishedDateS = Entities.HTML40.unescape(publishedDate).replace((char)160,(char)32); ++ String publishedDateS = StringEscapeUtils.unescapeHtml(publishedDate).replace((char)160,(char)32); + this.publishedDate = dateParser.parseDate(publishedDateS); + } + } +@@ -239,7 +239,7 @@ public class WebResult extends Result { + public void setSizeFromHTML(String size) { + if(size != null) { + size = removeHTMLTags(size); +- String sizeS = Entities.HTML40.unescape(size).replace((char)160,(char)32); ++ String sizeS = StringEscapeUtils.unescapeHtml(size).replace((char)160,(char)32); + sizeS = sizeS.replaceAll("<[^>]+>", " "); + //Add a space between the digits and unit if there is none + sizeS = sizeS.replaceFirst("(\\d)([a-zA-Z])", "$1 $2"); +@@ -285,7 +285,7 @@ public class WebResult extends Result { + public void setVotesFromHTML(String votes_str) { + if(votes_str != null) { + votes_str = removeHTMLTags(votes_str); +- votes_str = Entities.HTML40.unescape(votes_str); ++ votes_str = StringEscapeUtils.unescapeHtml(votes_str); + votes_str = votes_str.replaceAll(",", ""); + votes_str = votes_str.replaceAll(" ", ""); + try { +@@ -299,7 +299,7 @@ public class WebResult extends Result { + public void setVotesDownFromHTML(String votes_str) { + if(votes_str != null) { + votes_str = removeHTMLTags(votes_str); +- votes_str = Entities.HTML40.unescape(votes_str); ++ votes_str = StringEscapeUtils.unescapeHtml(votes_str); + votes_str = votes_str.replaceAll(",", ""); + votes_str = votes_str.replaceAll(" ", ""); + try { diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch new file mode 100644 index 000000000000..18d5ac7670ff --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch @@ -0,0 +1,42 @@ +--- a/com/aelitis/azureus/util/ImportExportUtils.java ++++ b/com/aelitis/azureus/util/ImportExportUtils.java +@@ -360,7 +360,7 @@ public final class ImportExportUtils { + + throws IOException + { +- List l = new JSONArray(data.length); ++ List l = new JSONArray(); + + map.put( key, l ); + +--- a/com/aelitis/azureus/util/JSONUtils.java ++++ b/com/aelitis/azureus/util/JSONUtils.java +@@ -74,7 +74,7 @@ public class JSONUtils + * @since 3.0.1.5 + */ + public static JSONObject encodeToJSONObject(Map map) { +- JSONObject newMap = new JSONObject((int)(map.size()*1.5)); ++ JSONObject newMap = new JSONObject(); + + for (Map.Entry<String, Object> entry: ((Map<String,Object>)map).entrySet()){ + String key = entry.getKey(); +@@ -105,9 +105,7 @@ public class JSONUtils + */ + public static String encodeToJSON(Map map) { + JSONObject jobj = encodeToJSONObject(map); +- StringBuilder sb = new StringBuilder(8192); +- jobj.toString( sb ); +- return( sb.toString()); ++ return( jobj.toString()); + } + + public static String encodeToJSON(Collection list) { +@@ -138,7 +136,7 @@ public class JSONUtils + * @since 3.0.1.5 + */ + private static JSONArray encodeToJSONArray(Collection list) { +- JSONArray newList = new JSONArray(list.size()); ++ JSONArray newList = new JSONArray(); + + for ( Object value: list ){ + diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch b/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch new file mode 100644 index 000000000000..596bd825f98d --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch @@ -0,0 +1,41 @@ +--- a/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java ++++ b/com/aelitis/azureus/core/clientmessageservice/secure/impl/SecureMessageServiceClientHelper.java +@@ -36,7 +36,6 @@ import org.bouncycastle.crypto.CipherParameters; + import org.bouncycastle.crypto.encodings.PKCS1Encoding; + import org.bouncycastle.crypto.engines.RSAEngine; + import org.bouncycastle.crypto.params.ParametersWithRandom; +-import org.bouncycastle.jce.provider.RSAUtil; + import org.gudy.azureus2.core3.util.Debug; + import org.gudy.azureus2.core3.util.RandomUtils; + import org.gudy.azureus2.plugins.utils.StaticUtilities; +@@ -83,30 +82,12 @@ SecureMessageServiceClientHelper + + byte[] secret_bytes = session_key.getEncoded(); + +- try{ + Cipher rsa_cipher = Cipher.getInstance( "RSA" ); + + rsa_cipher.init( Cipher.ENCRYPT_MODE, public_key ); + + encryped_session_key = rsa_cipher.doFinal( secret_bytes ); + +- }catch( Throwable e ){ +- +- // fallback to the BC implementation for jdk1.4.2 as JCE RSA not available +- +- RSAEngine eng = new RSAEngine(); +- +- PKCS1Encoding padded_eng = new PKCS1Encoding( eng ); +- +- CipherParameters param = RSAUtil.generatePublicKeyParameter(public_key); +- +- param = new ParametersWithRandom(param, RandomUtils.SECURE_RANDOM); +- +- padded_eng.init( true, param ); +- +- encryped_session_key = padded_eng.processBlock(secret_bytes, 0, secret_bytes.length); +- } +- + }catch( Throwable e ){ + + e.printStackTrace(); diff --git a/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch b/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch new file mode 100644 index 000000000000..c58d475995ee --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.6.0.0-commons-lang-entities.patch @@ -0,0 +1,51 @@ +diff --git a/org/gudy/azureus2/core3/util/AddressUtils.java b/org/gudy/azureus2/core3/util/AddressUtils.java +index 6691951..38f14ee 100644 +--- a/org/gudy/azureus2/core3/util/AddressUtils.java ++++ b/org/gudy/azureus2/core3/util/AddressUtils.java +@@ -494,11 +494,11 @@ AddressUtils + try{ + // unfortunately we have an incompatible base64 standard in i2p, they replaced / with ~ and + with - + +- char[] encoded = to_decode.toCharArray(); ++ byte[] encoded = to_decode.getBytes(); + + for ( int i=0;i<encoded.length;i++){ + +- char c = encoded[i]; ++ byte c = encoded[i]; + + if ( c == '~' ){ + encoded[i] = '/'; +diff --git a/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java b/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java +index a67a8a2..da4a46c 100644 +--- a/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java ++++ b/org/gudy/azureus2/pluginsimpl/local/utils/xml/simpleparser/SimpleXMLParserDocumentImpl.java +@@ -25,7 +25,7 @@ package org.gudy.azureus2.pluginsimpl.local.utils.xml.simpleparser; + import javax.xml.parsers.*; + + import org.xml.sax.*; +-import org.apache.commons.lang.Entities; ++import org.apache.commons.lang.StringEscapeUtils; + import org.gudy.azureus2.core3.util.AENetworkClassifier; + import org.gudy.azureus2.core3.util.Constants; + import org.gudy.azureus2.core3.util.Debug; +@@ -656,17 +656,8 @@ SimpleXMLParserDocumentImpl + replacement = new String( buffer, 0, buffer_pos ); + + }else{ +- +- int num = Entities.HTML40.entityValue( ref ); +- +- if ( num != -1 ){ +- +- replacement = "&#" + num + ";"; +- +- }else{ +- +- replacement = new String( buffer, 0, buffer_pos ); +- } ++ ++ replacement = StringEscapeUtils.escapeHtml(ref); + } + + char[] chars = replacement.toCharArray(); diff --git a/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch b/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch new file mode 100644 index 000000000000..ee3b07047eca --- /dev/null +++ b/net-p2p/vuze/files/vuze-5.6.0.0-invalid-characters.patch @@ -0,0 +1,26 @@ +diff --git a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java +index 34e898c..2e5bcaa 100644 +--- a/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java ++++ b/com/aelitis/azureus/core/metasearch/impl/DateParserRegex.java +@@ -49,17 +49,17 @@ public class DateParserRegex extends DateParser { + + private static final String[] MONTHS_LIST = new String[] { + " january janvier enero januar", +- " february fevrier f�vrier febrero februar", +- " march mars marzo marz marz m�rz" , ++ " february fevrier febrero februar", ++ " march mars marzo marz marz", + " april avril abril april ", + " may mai mayo mai", + " june juin junio juni", + " july juillet julio juli", +- " august aout ao�t agosto august", ++ " august aout agosto august", + " september septembre septiembre september", + " october octobre octubre oktober", + " november novembre noviembre november", +- " december decembre d�cembre diciembre dezember"}; ++ " december decembre diciembre dezember"}; + + public DateParserRegex() { + this("GMT-7",true,null); diff --git a/net-p2p/vuze/files/vuze.desktop b/net-p2p/vuze/files/vuze.desktop new file mode 100644 index 000000000000..cee9fcae3824 --- /dev/null +++ b/net-p2p/vuze/files/vuze.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Vuze +Comment=Vuze BitTorrent Client +Exec=vuze +Icon=vuze +Terminal=false +Categories=Network; +Type=Application +MimeType=application/x-bittorrent; diff --git a/net-p2p/vuze/metadata.xml b/net-p2p/vuze/metadata.xml new file mode 100644 index 000000000000..432ebc5fe730 --- /dev/null +++ b/net-p2p/vuze/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <maintainer> + <email>rhill@gentoo.org</email> + <name>Ryan Hill</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">azureus</remote-id> + </upstream> +</pkgmetadata> diff --git a/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild b/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild new file mode 100644 index 000000000000..f146132b2044 --- /dev/null +++ b/net-p2p/vuze/vuze-4.8.1.2-r1.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +JAVA_PKG_IUSE="source" + +inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator + +MY_PV=$(replace_all_version_separators "") + +PATCHSET_VER="4.5.0.2" +PATCHSET_DIR="${PN}-${PATCHSET_VER}-gentoo-patches" +PATCHSET="${PATCHSET_DIR}.tar.bz2" +SRC_TARBALL="Vuze_${MY_PV}_source.zip" + +DESCRIPTION="BitTorrent client in Java, formerly called Azureus" +HOMEPAGE="http://www.vuze.com/" +SRC_URI="mirror://sourceforge/azureus/${PN}/Vuze_${MY_PV}/${SRC_TARBALL} + mirror://gentoo/${PATCHSET}" +LICENSE="GPL-2 BSD" + +SLOT="0" +KEYWORDS="amd64 ppc ppc64 x86" +IUSE="" + +# bundles parts of commons-lang, but modified +# bundles parts of http://www.programmers-friend.org/ +RDEPEND=" + dev-java/json-simple:0 + dev-java/bcprov:1.40 + >=dev-java/commons-cli-1.0:1 + >=dev-java/log4j-1.2.8:0 + >=dev-java/swt-3.7.2-r1:3.7[cairo] + >=virtual/jre-1.5" + +DEPEND="${RDEPEND} + app-arch/unzip + dev-util/desktop-file-utils + >=virtual/jdk-1.5" + +PDEPEND="~net-p2p/vuze-coreplugins-${PV}" + +src_unpack() { + unpack ${PATCHSET} + mkdir "${S}" && cd "${S}" || die + unpack ${SRC_TARBALL} + # this is no longer needed + rm "${WORKDIR}"/${PATCHSET_DIR}/0006-Remove-the-use-of-windows-only-Tree2-widget.patch || die +} + +java_prepare() { + # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4 + # hopefully that's just a packaging mistake + [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite" + cp "${FILESDIR}"/build.xml . || die "failed to copy build.xml" + + EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PATCHSET_DIR}/ + + ### Removes OS X files and entries. + rm -rf "org/gudy/azureus2/platform/macosx" \ + "org/gudy/azureus2/ui/swt/osx" || die + + ### Removes Windows files. + rm -rf ./org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java || die + + ### Removes test files. + rm -rf org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die + + ### Removes bouncycastle (we use our own bcprov). + rm -rf "org/bouncycastle" || die + + ### Removes bundled json + rm -rf "org/json" || die + + ### The Tree2 file does not compile against Linux SWT and is used only on Windows. + ### It's runtime-conditional use is thus patched out in the patchset. + rm -rf "org/eclipse" || die + + mkdir -p build/libs || die +} + +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="swt-3.7,bcprov-1.40,json-simple,log4j,commons-cli-1" + +src_compile() { + local mem + use amd64 && mem="320" + use x86 && mem="192" + use ppc && mem="192" + use ppc64 && mem="256" + use sparc && mem="320" + export ANT_OPTS="-Xmx${mem}m" + java-pkg-2_src_compile + + # bug #302058 - build.xml excludes .txt but upstream jar has it... + jar uf dist/Azureus2.jar ChangeLog.txt || die +} + +src_install() { + java-pkg_dojar dist/Azureus2.jar + dodoc ChangeLog.txt + + java-pkg_dolauncher "${PN}" \ + --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \ + --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \ + --pkg_args '--ui=${UI}' + dosym vuze /usr/bin/azureus + + # https://bugs.gentoo.org/show_bug.cgi?id=204132 + java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins + + newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png + domenu "${FILESDIR}"/${PN}.desktop + + use source && java-pkg_dosrc "${S}"/{com,edu,org} +} + +pkg_postinst() { + ewarn "Running Vuze as root is not supported and may result in untracked" + ewarn "updates to shared components and then collisions on updates via ebuilds" + + elog "Vuze has been formerly called Azureus and many references to the old name remain." + elog + elog "After running Vuze for the first time, configuration" + elog "options will be placed in '~/.azureus/gentoo.config'." + elog "If you need to change some startup options, you should" + elog "modify this file, rather than the startup script." + elog "Using this config file you can start the console UI." + elog + + if ! has_version dev-java/swt:3.7[webkit]; then + elog + elog "Your dev-java/swt:3.7 was built without webkit support. Features such as Vuze HD Network will not work." + elog "Rebuild swt with USE=webkit (needs net-libs/webkit-gtk:2) to use these features." + fi + + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/net-p2p/vuze/vuze-5.3.0.0.ebuild b/net-p2p/vuze/vuze-5.3.0.0.ebuild new file mode 100644 index 000000000000..041e5e9a1574 --- /dev/null +++ b/net-p2p/vuze/vuze-5.3.0.0.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +JAVA_PKG_IUSE="source" + +inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator + +MY_PV=$(replace_all_version_separators "") +MY_SRC="Vuze_${MY_PV}" + +DESCRIPTION="BitTorrent client in Java, formerly called Azureus" +HOMEPAGE="http://www.vuze.com/" +SRC_URI="mirror://sourceforge/azureus/${PN}/${MY_SRC}/${MY_SRC}_source.zip" +LICENSE="GPL-2 BSD" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" + +# bundles parts of http://www.programmers-friend.org/ +# bundles bcprov - 1.37 required but not in the tree +RDEPEND=" + dev-java/commons-cli:1 + dev-java/commons-lang:2.1 + dev-java/json-simple:0 + dev-java/log4j:0 + dev-java/swt:3.8[cairo] + >=virtual/jre-1.6:*" + +DEPEND="${RDEPEND} + app-arch/unzip + dev-util/desktop-file-utils + >=virtual/jdk-1.6:*" + +PDEPEND="~net-p2p/vuze-coreplugins-${PV}" + +pkg_pretend() { + if ! has_version dev-java/swt:3.8[webkit]; then + echo + ewarn "dev-java/swt:3.8 was built without webkit support." + ewarn "Web features such as Vuze HD Network will be disabled." + fi +} + +src_unpack() { + mkdir -p "${S}" && cd "${S}" + unpack ${A} + + # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4 + [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite" + cp "${FILESDIR}"/build.xml "${S}" || die "failed to copy build.xml" +} + +java_prepare() { + # upstream likes randomly changing a subset of files to CRLF every release + edos2unix $(find "${S}" -type f -name "*.java") + + epatch "${FILESDIR}"/${P}-java5.patch + epatch "${FILESDIR}"/${P}-remove-classpath.patch + epatch "${FILESDIR}"/${P}-disable-shared-plugins.patch + epatch "${FILESDIR}"/${P}-disable-osx.patch + epatch "${FILESDIR}"/${P}-disable-updaters.patch + epatch "${FILESDIR}"/${P}-invalid-characters.patch + epatch "${FILESDIR}"/${P}-unbundle-commons.patch + epatch "${FILESDIR}"/${P}-unbundle-json.patch +# epatch "${FILESDIR}"/${P}-use-jdk-cipher-only.patch # bcprov + + # OSX / Windows + rm "${S}"/org/gudy/azureus2/ui/swt/osx/CarbonUIEnhancer.java + rm "${S}"/org/gudy/azureus2/ui/swt/osx/Start.java + rm "${S}"/org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java + + # Tree2 file does not compile on linux + rm -rf "${S}"/org/eclipse || die + # Bundled apache + rm -rf "${S}"/org/apache || die + # Bundled json + rm -rf "${S}"/org/json || die + # Bundled bcprov + # currently disabled - requires bcprov 1.37 + #rm -rf "${S}"/org/bouncycastle || die + + rm -rf "${S}"/org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die + mkdir -p "${S}"/build/libs || die +} + +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="swt-3.8,json-simple,log4j,commons-cli-1 commons-lang-2.1" + +src_compile() { + local mem + use amd64 && mem="320" + use x86 && mem="192" + use ppc && mem="192" + use ppc64 && mem="256" + use sparc && mem="320" + export ANT_OPTS="-Xmx${mem}m" + java-pkg-2_src_compile + + # bug #302058 - build.xml excludes .txt but upstream jar has it... + jar uf dist/Azureus2.jar ChangeLog.txt || die +} + +src_install() { + java-pkg_dojar dist/Azureus2.jar + dodoc ChangeLog.txt + + java-pkg_dolauncher "${PN}" \ + --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \ + --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \ + --pkg_args '--ui=${UI}' + dosym vuze /usr/bin/azureus + + # https://bugs.gentoo.org/show_bug.cgi?id=204132 + java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins + + newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png + domenu "${FILESDIR}"/${PN}.desktop + + use source && java-pkg_dosrc "${S}"/{com,edu,org} +} + +pkg_postinst() { + ewarn "Running Vuze as root is not supported and may result in untracked" + ewarn "updates to shared components and then collisions on updates" + echo + elog "Vuze was formerly called Azureus and many references to the old name remain." + elog + elog "After running Vuze for the first time, configuration options will be" + elog "placed in '~/.azureus/gentoo.config'." + elog + elog "If you need to change some startup options, you should modify this file" + elog "rather than the startup script. You can enable the console UI by" + elog "editing this config file." + echo + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} diff --git a/net-p2p/vuze/vuze-5.6.0.0.ebuild b/net-p2p/vuze/vuze-5.6.0.0.ebuild new file mode 100644 index 000000000000..9ebddd2dc54d --- /dev/null +++ b/net-p2p/vuze/vuze-5.6.0.0.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +JAVA_PKG_IUSE="source" + +inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator + +MY_PV=$(replace_all_version_separators "") +MY_SRC="Vuze_${MY_PV}" + +DESCRIPTION="BitTorrent client in Java, formerly called Azureus" +HOMEPAGE="http://www.vuze.com/" +SRC_URI="mirror://sourceforge/azureus/${PN}/${MY_SRC}/${MY_SRC}_source.zip" +LICENSE="GPL-2 BSD" + +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" + +# bundles parts of http://www.programmers-friend.org/ +# bundles bcprov - 1.37 required but not in the tree +RDEPEND=" + dev-java/commons-cli:1 + dev-java/commons-lang:2.1 + dev-java/json-simple:0 + dev-java/log4j:0 + dev-java/swt:3.8[cairo] + >=virtual/jre-1.6:*" + +DEPEND="${RDEPEND} + app-arch/unzip + dev-util/desktop-file-utils + >=virtual/jdk-1.6:*" + +PDEPEND="~net-p2p/vuze-coreplugins-${PV}" + +pkg_pretend() { + if ! has_version dev-java/swt:3.8[webkit]; then + echo + ewarn "dev-java/swt:3.8 was built without webkit support." + ewarn "Web features such as Vuze HD Network will be disabled." + fi +} + +src_unpack() { + mkdir -p "${S}" && cd "${S}" + unpack ${A} + + # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4 + [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite" + cp "${FILESDIR}"/build.xml "${S}" || die "failed to copy build.xml" +} + +java_prepare() { + # upstream likes randomly changing a subset of files to CRLF every release + edos2unix $(find "${S}" -type f -name "*.java") + + epatch "${FILESDIR}"/${PN}-5.3.0.0-java5.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-remove-classpath.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-shared-plugins.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-osx.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-disable-updaters.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-commons.patch + epatch "${FILESDIR}"/${PN}-5.3.0.0-unbundle-json.patch + epatch "${FILESDIR}"/${PN}-5.6.0.0-commons-lang-entities.patch + epatch "${FILESDIR}"/${PN}-5.6.0.0-invalid-characters.patch +# epatch "${FILESDIR}"/${P}-use-jdk-cipher-only.patch # bcprov + + # OSX / Windows + rm "${S}"/org/gudy/azureus2/ui/swt/osx/CarbonUIEnhancer.java + rm "${S}"/org/gudy/azureus2/ui/swt/osx/Start.java + rm "${S}"/org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java + + # Tree2 file does not compile on linux + rm -rf "${S}"/org/eclipse || die + # Bundled apache + rm -rf "${S}"/org/apache || die + # Bundled json + rm -rf "${S}"/org/json || die + # Bundled bcprov + # currently disabled - requires bcprov 1.37 + #rm -rf "${S}"/org/bouncycastle || die + + rm -rf "${S}"/org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die + mkdir -p "${S}"/build/libs || die +} + +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="swt-3.8,json-simple,log4j,commons-cli-1 commons-lang-2.1" + +src_compile() { + local mem + use amd64 && mem="320" + use x86 && mem="192" + use ppc && mem="192" + use ppc64 && mem="256" + use sparc && mem="320" + export ANT_OPTS="-Xmx${mem}m" + java-pkg-2_src_compile + + # bug #302058 - build.xml excludes .txt but upstream jar has it... + jar uf dist/Azureus2.jar ChangeLog.txt || die +} + +src_install() { + java-pkg_dojar dist/Azureus2.jar + dodoc ChangeLog.txt + + java-pkg_dolauncher "${PN}" \ + --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \ + --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \ + --pkg_args '--ui=${UI}' + dosym vuze /usr/bin/azureus + + # https://bugs.gentoo.org/show_bug.cgi?id=204132 + java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins + + newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png + domenu "${FILESDIR}"/${PN}.desktop + + use source && java-pkg_dosrc "${S}"/{com,edu,org} +} + +pkg_postinst() { + ewarn "Running Vuze as root is not supported and may result in untracked" + ewarn "updates to shared components and then collisions on updates" + echo + elog "Vuze was formerly called Azureus and many references to the old name remain." + elog + elog "After running Vuze for the first time, configuration options will be" + elog "placed in '~/.azureus/gentoo.config'." + elog + elog "If you need to change some startup options, you should modify this file" + elog "rather than the startup script. You can enable the console UI by" + elog "editing this config file." + echo + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} |