diff options
author | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-12-05 23:47:45 -0500 |
---|---|---|
committer | Omar Vega Ramos <ovruni@gnu.org.pe> | 2016-12-05 23:47:45 -0500 |
commit | e5c93e2b2af4984bd264c79c04eb3cc9b69a0117 (patch) | |
tree | a1192b72663c42bf4522bbe246ba45d257a8a64c /libre/ditaa | |
parent | f6ed10b20413ec83fef004e8ec3512dfcc011520 (diff) |
ditaa-0.10-1.parabola1: updating version
Diffstat (limited to 'libre/ditaa')
-rw-r--r-- | libre/ditaa/PKGBUILD | 50 | ||||
-rw-r--r-- | libre/ditaa/ditaa-HTMLConverter.patch | 20 | ||||
-rw-r--r-- | libre/ditaa/ditaa-fix_imports.patch | 12 | ||||
-rw-r--r-- | libre/ditaa/ditaa-usage_message.patch | 63 | ||||
-rw-r--r-- | libre/ditaa/ditaa.sh | 7 |
5 files changed, 97 insertions, 55 deletions
diff --git a/libre/ditaa/PKGBUILD b/libre/ditaa/PKGBUILD index f44854b11..3a290e9ea 100644 --- a/libre/ditaa/PKGBUILD +++ b/libre/ditaa/PKGBUILD @@ -1,31 +1,37 @@ # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe> pkgname=ditaa -pkgver=0.9 -pkgrel=2.parabola2 +pkgver=0.10 +pkgrel=1.parabola1 pkgdesc='Java utility to convert diagrams drawn using ascii art to bitmap' arch=('any') -url='http://ditaa.sf.net/' -license=('GPL') -depends=('java-environment' 'java-commons-cli' 'gsfonts') -makedepends=('apache-ant' 'java-commons-cli' 'java-batik') -source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname${pkgver/./_}-src.zip" - 'ditaa.sh' 'ditaa-fix_imports.patch' 'ditaa-usage_message.patch') -sha256sums=('0c6b92ddbeb435a1b0180b4728284e7d98e1bd94ec4619e73911875026ef63de' - '8640917f1241e26b3104e733b083eb099dc2b5be87e34348479130c3987e7883' - '4c24b233dca2ddd2c9a588f09b2aca421706daab68df3304f6ca4f4cd1a79372' - '0f8f5bb238ff203592e9f0c9b3194556a97fb9351e32beb14988ca7bedff874b') +url='https://github.com/stathissideris/ditaa' +license=('LGPL') +depends=('java-environment' 'java-commons-cli' 'jericho-html' 'gsfonts') +makedepends=('git' 'apache-ant' 'java-commons-cli' 'java-batik' 'jericho-html') +source=("git://github.com/stathissideris/ditaa#tag=v$pkgver" + 'ditaa.sh' 'ditaa-fix_imports.patch' 'ditaa-usage_message.patch' + 'ditaa-HTMLConverter.patch') +sha256sums=('SKIP' + '5372004969ae1449fc5dc8eec55dc6970a383169bf9c26be04f6e3ae277c7038' + '74a0b7df6865499a25792d981106b669cc51874e673dd621761c30c462fe8deb' + '62493fd286d1d80dd96064266bd579c661bbd04409ac448b3ba680e34faeaa56' + '8b44c563d4e2d62806e25c3fa6d91b676f388caeb7f819d8d8fec02153f9aa3d') prepare() { + cd "$srcdir/$pkgname" rm -v lib/*.jar + rm -v web/lib/*.jar mkdir -p bin - patch -Np1 -i "${srcdir}/ditaa-fix_imports.patch" - patch -Np1 -i "${srcdir}/ditaa-usage_message.patch" + patch -Np1 -i "$srcdir/ditaa-fix_imports.patch" + patch -Np1 -i "$srcdir/ditaa-usage_message.patch" + patch -Np1 -i "$srcdir/ditaa-HTMLConverter.patch" } build() { - cd "${srcdir}/build" - ant -f release.xml release-jar \ + cd "$srcdir/$pkgname" + ant -f build/release.xml release-jar \ + -Dversion.string=$pkgver \ -lib "/usr/share/java/batik-anim.jar" \ -lib "/usr/share/java/batik-awt-util.jar" \ -lib "/usr/share/java/batik-bridge.jar" \ @@ -34,12 +40,16 @@ build() { -lib "/usr/share/java/batik-gvt.jar" \ -lib "/usr/share/java/batik-svg-dom.jar" \ -lib "/usr/share/java/commons-cli.jar" \ + -lib "/usr/share/java/jericho-html.jar" \ -lib "/usr/share/java/xml-apis-ext.jar" } package() { - install -Dm644 "${srcdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING" - install -Dm755 "releases/$pkgname${pkgver/./_}.jar" "$pkgdir/usr/share/java/$pkgname/ditaa-${pkgver/./_}.jar" - install -Dm755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname" - sed -i "s:VERSION:${pkgver/./_}:" "$pkgdir/usr/bin/$pkgname" + cd "$srcdir/$pkgname" + install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING" + install -Dm755 "releases/$pkgname$pkgver.jar" \ + "$pkgdir/usr/share/java/$pkgname/$pkgname-$pkgver.jar" + ln -s "/usr/share/java/$pkgname/$pkgname-$pkgver.jar" \ + "$pkgdir/usr/share/java/$pkgname.jar" + install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname" } diff --git a/libre/ditaa/ditaa-HTMLConverter.patch b/libre/ditaa/ditaa-HTMLConverter.patch new file mode 100644 index 000000000..e30644ea0 --- /dev/null +++ b/libre/ditaa/ditaa-HTMLConverter.patch @@ -0,0 +1,20 @@ +--- ditaa.orig/src/org/stathissideris/ascii2image/core/HTMLConverter.java 2016-12-05 23:24:13.155516000 -0500 ++++ ditaa/src/org/stathissideris/ascii2image/core/HTMLConverter.java 2016-12-05 23:41:09.816397101 -0500 +@@ -161,7 +161,7 @@ +
+ System.out.println("Generating diagrams... ");
+
+- File imageDir = new File(new File(targetFilename).getParent() + File.separator + imageDirName);
++ File imageDir = new File(new File(targetFilename).getAbsoluteFile().getParent() + File.separator + imageDirName);
+ if(!imageDir.exists()){
+ if(!imageDir.mkdir()){
+ System.err.println("Could not create directory " + imageDirName);
+@@ -171,7 +171,7 @@ +
+ for(String URL : diagramList.keySet()) {
+ String text = (String) diagramList.get(URL);
+- String imageFilename = new File(targetFilename).getParent() + File.separator + URL;
++ String imageFilename = new File(targetFilename).getAbsoluteFile().getParent() + File.separator + URL;
+ if(new File(imageFilename).exists() && !options.processingOptions.overwriteFiles()){
+ System.out.println("Error: Cannot overwrite file "+URL+", file already exists." +
" Use the --overwrite option if you would like to allow file overwrite.");
+ continue;
diff --git a/libre/ditaa/ditaa-fix_imports.patch b/libre/ditaa/ditaa-fix_imports.patch index 6db2c1e55..6c868103c 100644 --- a/libre/ditaa/ditaa-fix_imports.patch +++ b/libre/ditaa/ditaa-fix_imports.patch @@ -1,6 +1,6 @@ ---- ditaa-0.9.orig/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2009-11-12 22:32:30.000000000 -0500 -+++ ditaa-0.9/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2016-03-05 19:04:12.782829526 -0500 -@@ -43,10 +43,10 @@ +--- ditaa.orig/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2016-12-04 23:55:12.419269000 -0500 ++++ ditaa/src/org/stathissideris/ascii2image/graphics/ImageHandler.java 2016-12-04 23:58:20.550824890 -0500 +@@ -42,10 +42,10 @@ import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.GVTBuilder; import org.apache.batik.bridge.UserAgentAdapter; @@ -14,9 +14,9 @@ import org.apache.batik.gvt.GraphicsNode; import org.apache.batik.gvt.renderer.ConcreteImageRendererFactory; import org.apache.batik.gvt.renderer.ImageRenderer; ---- ditaa-0.9.orig/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2009-11-12 22:32:30.000000000 -0500 -+++ ditaa-0.9/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2016-03-05 19:04:27.829414678 -0500 -@@ -30,7 +30,7 @@ +--- ditaa.orig/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2016-12-04 23:55:12.419269000 -0500 ++++ ditaa/src/org/stathissideris/ascii2image/graphics/OffScreenSVGRenderer.java 2016-12-04 23:58:59.452412093 -0500 +@@ -29,7 +29,7 @@ import org.apache.batik.bridge.BridgeContext; import org.apache.batik.bridge.GVTBuilder; import org.apache.batik.bridge.UserAgentAdapter; diff --git a/libre/ditaa/ditaa-usage_message.patch b/libre/ditaa/ditaa-usage_message.patch index 2918fdfa5..971493cbf 100644 --- a/libre/ditaa/ditaa-usage_message.patch +++ b/libre/ditaa/ditaa-usage_message.patch @@ -1,27 +1,36 @@ ---- ditaa-0.9.orig/src/org/stathissideris/ascii2image/core/CommandLineConverter.java 2009-11-24 23:09:32.000000000 -0500 -+++ ditaa-0.9/src/org/stathissideris/ascii2image/core/CommandLineConverter.java 2016-03-05 21:44:02.817542514 -0500 -@@ -120,13 +120,13 @@ -
- } catch (org.apache.commons.cli.ParseException e) {
- System.err.println(e.getMessage());
-- new HelpFormatter().printHelp("java -jar ditaa.jar <inpfile> [outfile]", cmdLnOptions, true);
-+ new HelpFormatter().printHelp("ditaa <inpfile> [outfile]", cmdLnOptions, true);
- System.exit(2);
- }
-
-
- if(cmdLine.hasOption("help") || args.length == 0 ){
-- new HelpFormatter().printHelp("java -jar ditaa.jar <inpfile> [outfile]", cmdLnOptions, true);
-+ new HelpFormatter().printHelp("ditaa <inpfile> [outfile]", cmdLnOptions, true);
- System.exit(0);
- }
-
-@@ -142,7 +142,7 @@ -
- if(args.length == 0) {
- System.err.println("Error: Please provide the input file filename");
-- new HelpFormatter().printHelp("java -jar ditaa.jar <inpfile> [outfile]", cmdLnOptions, true);
-+ new HelpFormatter().printHelp("ditaa <inpfile> [outfile]", cmdLnOptions, true);
- System.exit(2);
- }
-
+--- ditaa.orig/src/org/stathissideris/ascii2image/core/CommandLineConverter.java 2016-12-04 23:55:12.415936000 -0500 ++++ ditaa/src/org/stathissideris/ascii2image/core/CommandLineConverter.java 2016-12-05 00:05:44.390902762 -0500 +@@ -129,13 +129,13 @@ + + } catch (org.apache.commons.cli.ParseException e) { + System.err.println(e.getMessage()); +- new HelpFormatter().printHelp("java -jar ditaa.jar <INPFILE> [OUTFILE]", cmdLnOptions, true); ++ new HelpFormatter().printHelp("ditaa <INPFILE> [OUTFILE]", cmdLnOptions, true); + System.exit(2); + } + + + if(cmdLine.hasOption("help") || args.length == 0 ){ +- new HelpFormatter().printHelp("java -jar ditaa.jar <INPFILE> [OUTFILE]", cmdLnOptions, true); ++ new HelpFormatter().printHelp("ditaa <INPFILE> [OUTFILE]", cmdLnOptions, true); + System.exit(0); + } + +@@ -147,7 +147,7 @@ + System.exit(2); + } catch (IllegalArgumentException e2) { + System.err.println("Error: " + e2.getMessage()); +- new HelpFormatter().printHelp("java -jar ditaa.jar <INPFILE> [OUTFILE]", cmdLnOptions, true); ++ new HelpFormatter().printHelp("ditaa <INPFILE> [OUTFILE]", cmdLnOptions, true); + System.exit(2); + } + +@@ -155,7 +155,7 @@ + + if(args.length == 0) { + System.err.println("Error: Please provide the input file filename"); +- new HelpFormatter().printHelp("java -jar ditaa.jar <inpfile> [outfile]", cmdLnOptions, true); ++ new HelpFormatter().printHelp("ditaa <inpfile> [outfile]", cmdLnOptions, true); + System.exit(2); + } + diff --git a/libre/ditaa/ditaa.sh b/libre/ditaa/ditaa.sh index c3f3ffad9..b95baf83c 100644 --- a/libre/ditaa/ditaa.sh +++ b/libre/ditaa/ditaa.sh @@ -1,3 +1,6 @@ #!/bin/sh -DIR=/usr/share/java -${JAVA_HOME}/bin/java -cp "$DIR/commons-cli.jar:$DIR/ditaa/ditaa-VERSION.jar" org.stathissideris.ascii2image.core.CommandLineConverter "$@" +COMMONS_CLI=/usr/share/java/commons-cli.jar +JERICHO_HTML=/usr/share/java/jericho-html.jar +DITAA=/usr/share/java/ditaa.jar +${JAVA_HOME}/bin/java -cp "$COMMONS_CLI:$JERICHO_HTML:$DITAA" \ + org.stathissideris.ascii2image.core.CommandLineConverter "$@" |