diff options
-rw-r--r-- | media-sound/tuxguitar/ChangeLog | 4 | ||||
-rw-r--r-- | media-sound/tuxguitar/Manifest | 5 | ||||
-rw-r--r-- | media-sound/tuxguitar/files/tuxguitar-1.0-ftp.patch | 104 | ||||
-rw-r--r-- | media-sound/tuxguitar/tuxguitar-1.0.ebuild | 6 |
4 files changed, 115 insertions, 4 deletions
diff --git a/media-sound/tuxguitar/ChangeLog b/media-sound/tuxguitar/ChangeLog index e5fe2d8a..1d2b709c 100644 --- a/media-sound/tuxguitar/ChangeLog +++ b/media-sound/tuxguitar/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 31 Aug 2008; Serkan Kaba <serkan@gentoo.org> tuxguitar-1.0.ebuild, + +files/tuxguitar-1.0-ftp.patch: + Backport ftp plugin fix from upstream and reenable ftp plugin. + 13 Jul 2008; Serkan Kaba <serkan@gentoo.org> -tuxguitar-0.9.1.ebuild, -tuxguitar-0.9.1-r1.ebuild, -tuxguitar-0.9.1-r2.ebuild, tuxguitar-1.0.ebuild: diff --git a/media-sound/tuxguitar/Manifest b/media-sound/tuxguitar/Manifest index f3e0fc26..081c2883 100644 --- a/media-sound/tuxguitar/Manifest +++ b/media-sound/tuxguitar/Manifest @@ -1,4 +1,5 @@ +AUX tuxguitar-1.0-ftp.patch 3262 RMD160 5bbd2d3407d3eabc632db0471edf894fb622791e SHA1 002ec8262bf96d35365e36fb6886d37aaa3a270a SHA256 3d6a8a0dc81c175f56d1d282fe6bbbb146ae94bbff14f4bc630551259e4f5622 DIST tuxguitar-src-1.0.tar.gz 2335631 RMD160 512436d255b010551d34aae163a141662d9f9539 SHA1 9b289414f5b7f6bd8dd3dd85c701097c3b798f1f SHA256 422336d69994c5041331ac95fc899e91e929b4a224910f75b4acd7cfd6f85c8a -EBUILD tuxguitar-1.0.ebuild 3665 RMD160 2f336ac72a23ff2a42fcbb5b8cf6566d137fa07c SHA1 0ecb93f42c6a8ea08d807effc176c81b2f7744c9 SHA256 42dfe5271d4a927fcd82a16178546c3bef88d1a65c42503aece1b7e0aafd8aa2 -MISC ChangeLog 1373 RMD160 0723d6f4ba211aff05ab222feb6de95f3f53ce37 SHA1 db7c04ef509f3fa13021d88b1ad5f2ac1d2bfa1e SHA256 eee531b68d5483a1b0e0711f0fc04497c88960ddd40c5fa4bb8c52f1f8db905c +EBUILD tuxguitar-1.0.ebuild 3732 RMD160 731ef154905639ed1b190bfb11ef079e364369bf SHA1 428eb0f0d700cc2b287d577c7afe1c2befbd36fc SHA256 8ece300bfeb7b3f59e3c2ba544071e736bf67eb1fb60666d87dfbf882903e55a +MISC ChangeLog 1542 RMD160 82f374612bd22d2207a2b749ad04e5060bf5099b SHA1 aceeefab19622c513abb04da8be388f7a35c75d7 SHA256 db286019b03c93453b795d4d6e90ac2520b10d322cfebedbadda509ea14fbeb6 MISC metadata.xml 178 RMD160 243fc55bdb409205f2b1fac61222188ede7be6bd SHA1 c1af08bf5613c1355e48537956444b2013769b7e SHA256 dba7bb09845938f9ea24528b23774c7e23a4a55d75ab393da9ceac7400d56f3a diff --git a/media-sound/tuxguitar/files/tuxguitar-1.0-ftp.patch b/media-sound/tuxguitar/files/tuxguitar-1.0-ftp.patch new file mode 100644 index 00000000..5b9ead39 --- /dev/null +++ b/media-sound/tuxguitar/files/tuxguitar-1.0-ftp.patch @@ -0,0 +1,104 @@ +diff -Nur tuxguitar-src-1.0/TuxGuitar-browser-ftp/src/org/herac/tuxguitar/gui/tools/browser/ftp/TGBrowserImpl.java TuxGuitar-browser-ftp/src/org/herac/tuxguitar/gui/tools/browser/ftp/TGBrowserImpl.java +--- tuxguitar-src-1.0/TuxGuitar-browser-ftp/src/org/herac/tuxguitar/gui/tools/browser/ftp/TGBrowserImpl.java 2008-06-17 15:11:49.000000000 +0300 ++++ TuxGuitar-browser-ftp/src/org/herac/tuxguitar/gui/tools/browser/ftp/TGBrowserImpl.java 2008-07-23 16:13:24.000000000 +0300 +@@ -83,26 +83,32 @@ + public List listElements() throws TGBrowserException { + List elements = new ArrayList(); + try { +- this.client.ascii(); ++ this.client.binary(); ++ + String[] names = parseString(this.client.nameList(this.path)).split("\n"); + String[] infos = parseString(this.client.list()).split("\n"); + if(names.length > 0 && infos.length > 0){ + for(int i = 0;i < names.length;i++){ + String name = names[i].trim(); + +- if(name.indexOf(this.path) == 0 && name.length() > (this.path.length() + 2)){ +- name = name.substring(this.path.length() + 1); ++ if(name.indexOf(this.path) == 0 && name.length() > this.path.length()){ ++ name = name.substring(this.path.length()); + } +- +- for(int j = 0;j < infos.length;j++){ +- String info = infos[j].trim(); +- if(info.indexOf(name) > 0){ +- elements.add(new TGBrowserElementImpl(this,name,info,this.path)); +- break; ++ while(name.indexOf("/") == 0){ ++ name = name.substring(1); ++ } ++ if( name.length() > 0 ){ ++ for(int j = 0;j < infos.length;j++){ ++ String info = infos[j].trim(); ++ if(info.indexOf(name) > 0){ ++ elements.add(new TGBrowserElementImpl(this,name,info,this.path)); ++ break; ++ } + } + } + } + } ++ + } catch (Throwable throwable) { + throw new TGBrowserException(throwable); + } +@@ -114,9 +120,7 @@ + this.client.cd(path); + this.client.binary(); + +- byte[] bytes = getByteBuffer( this.client.get(element.getName()) , false ); +- +- this.client.ascii(); ++ byte[] bytes = getByteBuffer( this.client.get(element.getName()) ); + + return new ByteArrayInputStream( bytes ); + } catch (Throwable throwable) { +@@ -126,7 +130,7 @@ + + private String parseString(InputStream in) throws TGBrowserException{ + try { +- byte[] bytes = getByteBuffer(in, true); ++ byte[] bytes = getByteBuffer(in); + + return new String( bytes ); + } catch (Throwable throwable) { +@@ -134,25 +138,20 @@ + } + } + +- private byte[] getByteBuffer(InputStream in, boolean checkAvailable) throws IOException{ +- if(!checkAvailable || in.available() > 0){ +- ByteArrayOutputStream out = new ByteArrayOutputStream(); +- +- int read = 0; +- while((read = in.read()) != -1){ +- out.write(read); +- } +- +- byte[] bytes = out.toByteArray(); +- +- in.close(); +- out.close(); +- out.flush(); +- +- return bytes; ++ private byte[] getByteBuffer(InputStream in) throws IOException{ ++ ByteArrayOutputStream out = new ByteArrayOutputStream(); ++ ++ int read = 0; ++ while((read = in.read()) != -1){ ++ out.write(read); + } ++ ++ byte[] bytes = out.toByteArray(); ++ + in.close(); ++ out.close(); ++ out.flush(); + +- return new byte[0]; ++ return bytes; + } + } + diff --git a/media-sound/tuxguitar/tuxguitar-1.0.ebuild b/media-sound/tuxguitar/tuxguitar-1.0.ebuild index 5b87e248..90025ab7 100644 --- a/media-sound/tuxguitar/tuxguitar-1.0.ebuild +++ b/media-sound/tuxguitar/tuxguitar-1.0.ebuild @@ -45,6 +45,8 @@ pkg_setup() { src_unpack() { unpack ${A} + cd "${S}" || die + epatch "${FILESDIR}"/${P}-ftp.patch cd "${S}"/TuxGuitar/lib || die java-pkg_jar-from swt-3 } @@ -111,8 +113,8 @@ plugin_install() { #Check to see if it's working while bumping. list_plugins() { echo \ - $(usev alsa) ascii compat converter $(usev fluidsynth) gtp \ - jsa lilypond midi musicxml $(usev oss) $(usev pdf) ptb tef tray + $(usev alsa) ascii browser-ftp compat converter $(usev fluidsynth) \ + gtp jsa lilypond midi musicxml $(usev oss) $(usev pdf) ptb tef tray } pkg_postinst() { |