summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-p2p/vuze/files')
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch11
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-osx.patch60
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-shared-plugins.patch33
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-disable-updaters.patch45
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-invalid-characters.patch24
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-java5.patch11
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-remove-classpath.patch10
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-unbundle-commons.patch110
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-unbundle-json.patch42
-rw-r--r--net-p2p/vuze/files/vuze-5.3.0.0-use-jdk-cipher-only.patch41
10 files changed, 387 insertions, 0 deletions
diff --git a/net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch b/net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch
new file mode 100644
index 000000000000..16f9ffa7374d
--- /dev/null
+++ b/net-p2p/vuze/files/vuze-5.3.0.0-cache-size.patch
@@ -0,0 +1,11 @@
+--- a/org/gudy/azureus2/core3/config/COConfigurationManager.java
++++ b/org/gudy/azureus2/core3/config/COConfigurationManager.java
+@@ -52,7 +52,7 @@ COConfigurationManager
+ public static final int CONFIG_CACHE_SIZE_MAX_MB;
+
+ static{
+- long max_mem_bytes = Runtime.getRuntime().maxMemory();
++ long max_mem_bytes = Math.min (Runtime.getRuntime().maxMemory(), 64*1024*1024);
+ long mb_1 = 1*1024*1024;
+ long mb_32 = 32*mb_1;
+ int size = (int)(( max_mem_bytes - mb_32 )/mb_1);
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..9b19015f3b36
--- /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..607b84a46d51
--- /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();