[jsurf-alggeo] 03/03: Imported Debian patch 0.3.0+ds-1

Jerome Benoit calculus-guest at moszumanska.debian.org
Thu Nov 26 21:32:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

calculus-guest pushed a commit to branch master
in repository jsurf-alggeo.

commit f22fbc0735064a75a9aa305e69ee614ec2dedc9e
Author: Jerome Benoit <calculus at rezozer.net>
Date:   Thu Nov 26 03:24:12 2015 +0100

    Imported Debian patch 0.3.0+ds-1
---
 debian/adhoc/Makefile                              |   4 +-
 debian/changelog                                   |  12 ++
 debian/control                                     |   3 +-
 debian/patches/debianization.patch                 |  15 +--
 debian/patches/series                              |   2 +-
 debian/patches/upstream-java2help2man.patch        |  21 ---
 .../patches/upstream-revisit-option_machnery.patch | 150 +++++++++++++++++++++
 debian/rules                                       |   2 +-
 8 files changed, 170 insertions(+), 39 deletions(-)

diff --git a/debian/adhoc/Makefile b/debian/adhoc/Makefile
index 6719080..289b841 100644
--- a/debian/adhoc/Makefile
+++ b/debian/adhoc/Makefile
@@ -1,11 +1,11 @@
 TOP_BUILDDIR ?= $(CURDIR)
 
-jsurf_alggeo_DESCRIPTION = "Java based renderer for real ALGebraic GEOmetric SURFaces"
+jsurf_alggeo_DESCRIPTION = "Java based renderer for real SURFaces (ALGebraic GEOmetry dedicated tool)"
 
 HELP2MAN = help2man
 
 H2MFLAGS = \
-	--manual="IMAGINARY" \
+	--manual="IMAGINARY.org" \
 	--no-info
 
 default:
diff --git a/debian/changelog b/debian/changelog
index 9301415..ec496c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+jsurf-alggeo (0.3.0+ds-1) unstable; urgency=medium
+
+  * New upstream release.
+  * Debianization:
+    - debian/control, revisit;
+    - debian/adhoc/Makefile, refresh;
+    - debian/patches/*:
+      - option machinery, harden and revisit;
+      - refresh;
+
+ -- Jerome Benoit <calculus at rezozer.net>  Thu, 26 Nov 2015 21:17:20 +0000
+
 jsurf-alggeo (0.2.0+ds-2) unstable; urgency=medium
 
   * bug fix release (Closes: #804981):
diff --git a/debian/control b/debian/control
index df151f3..59bf9ae 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,7 @@ Uploaders: Jerome Benoit <calculus at rezozer.net>
 Build-Depends: debhelper (>= 9), javahelper, maven-repo-helper, help2man
 Build-Depends-Indep:
  default-jdk,
-# jarwrapper,
- antlr3, libcommons-cli-java, libvecmath-java,
+ antlr3, libvecmath-java, libcommons-io-java, libcommons-cli-java,
  rdfind, symlinks
 Standards-Version: 3.9.6
 Homepage: http://imaginary.org/program/jsurf
diff --git a/debian/patches/debianization.patch b/debian/patches/debianization.patch
index 09b72b9..ae93dbe 100644
--- a/debian/patches/debianization.patch
+++ b/debian/patches/debianization.patch
@@ -4,25 +4,16 @@ Description: debianization
 Origin: debian
 Forwarded: not-needed
 Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2015-09-07
+Last-Update: 2015-11-26
 
 --- a/src/main/java/de/mfo/jsurf/Main.java
 +++ b/src/main/java/de/mfo/jsurf/Main.java
-@@ -39,7 +39,7 @@
+@@ -40,7 +40,7 @@
  
  public class Main {	
  	
 -    public static final String jsurf_progname = "jsurf";
 +    public static final String jsurf_progname = "jsurf-alggeo";
  
-     static int size = 100;
+     static int size = 512;
      static AntiAliasingMode aam;
-@@ -86,7 +86,7 @@
-     	CommandLineParser parser = new PosixParser();
- 		HelpFormatter formatter = new HelpFormatter();
-     	String cmd_line_syntax = jsurf_progname + " [options] jsurf_file\n\n";
--    	String help_header = jsurf_progname + " is a renderer for real algebraic surfaces.\n" +
-+    	String help_header = jsurf_progname + " is a renderer for real algebraic geometric surfaces.\n" +
-     	    "If - is specified as a filename, the jsurf file is read from standard input.\n\n";
-     	String help_footer = "";
-     	try
diff --git a/debian/patches/series b/debian/patches/series
index 1f9a743..a30a7cf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
-upstream-java2help2man.patch
+upstream-revisit-option_machnery.patch
 debianization.patch
 debianization-documentation.patch
diff --git a/debian/patches/upstream-java2help2man.patch b/debian/patches/upstream-java2help2man.patch
deleted file mode 100644
index 11d0e90..0000000
--- a/debian/patches/upstream-java2help2man.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: format usages and helps
- Attempt to format and harmonize the help message of jsurf-alggeo front-end
- programs wrt UN*X customs in view to employ help2man to generate manpages;
- meant to be submitted to the upstream maintainer.
-Origin: debian
-Author: Jerome Benoit <calculus at rezozer.net>
-Last-Update: 2015-11-10
-
---- a/src/main/java/de/mfo/jsurf/Main.java
-+++ b/src/main/java/de/mfo/jsurf/Main.java
-@@ -207,8 +207,8 @@
-     	}
-     	else
-     	{
--    		// display the image in a window 
--    		final String window_title = "jsurf: " + jsurf_filename;
-+    		// display the image in a window
-+    		final String window_title = jsurf_progname + ": " + jsurf_filename;
-     		final BufferedImage window_image = bi;
-     		SwingUtilities.invokeLater( new Runnable() {
-     			public void run()
diff --git a/debian/patches/upstream-revisit-option_machnery.patch b/debian/patches/upstream-revisit-option_machnery.patch
new file mode 100644
index 0000000..949bb32
--- /dev/null
+++ b/debian/patches/upstream-revisit-option_machnery.patch
@@ -0,0 +1,150 @@
+Description: revisit (and fix) option machniery
+ Attempt to format and harmonize the options, usages, and help messages
+ of jsurf-alggeo front-end programs wrt UN*X customs:
+ reinsert the output option for both backward compatibility and customary
+ usage; render compatible with help2man; ps2pdf(1) has been a source of
+ reference and inspiration in that matter; meant to be submitted to the
+ upstream maintainer.
+Origin: debian
+Author: Jerome Benoit <calculus at rezozer.net>
+Last-Update: 2015-11-26
+
+--- a/src/main/java/de/mfo/jsurf/Main.java
++++ b/src/main/java/de/mfo/jsurf/Main.java
+@@ -30,6 +30,7 @@
+ import javax.swing.JLabel;
+ import javax.swing.SwingUtilities;
+ 
++import org.apache.commons.io.FilenameUtils;
+ import org.apache.commons.cli.*;
+ 
+ import de.mfo.jsurf.rendering.cpu.AntiAliasingPattern;
+@@ -41,7 +42,7 @@
+ 	
+     public static final String jsurf_progname = "jsurf";
+ 
+-    static int size = 100;
++    static int size = 512;
+     static AntiAliasingMode aam;
+     static AntiAliasingPattern aap;
+     
+@@ -72,9 +73,10 @@
+ 	 */
+ 	public static void main(String[] args) {  
+ 		
++    	int helper_width = 103;
+     	String jsurf_filename = null;
+     	String output_filename = null;
+-        boolean show_gui = false;
++      boolean show_gui = false;
+ 
+     	Options options = new Options();
+     	
+@@ -82,22 +84,28 @@
+ 		options.addOption( OptionBuilder.withLongOpt( "version" ).withDescription( "print program version and exit" ).create() );
+     	options.addOption("s","size", true, "image width and height (default: " + size + ")");
+     	options.addOption("q","quality",true,"quality of the rendering: 0 (low), 1 (medium, default), 2 (high), 3 (extreme)");
+-        if( !java.awt.GraphicsEnvironment.isHeadless() )
+-            options.addOption( OptionBuilder.withLongOpt( "gui" ).withDescription( "display the rendering (png_output becomes optional)" ).create() );
++			options.addOption("o","output",true,"output PNG into this file (overrode by the 2nd argument if present)");
++      options.addOption( OptionBuilder.withLongOpt( "gui" ).withDescription( "display rendering (overrides output options)" ).create() );
+ 
+     	CommandLineParser parser = new PosixParser();
+ 		HelpFormatter formatter = new HelpFormatter();
+-    	String cmd_line_syntax = jsurf_progname + " [options] jsurf_input png_output\n\n";
++    	String cmd_line_syntax = jsurf_progname + " [options...] {jsurf_input|-} [png_output|-]\n\n";
+     	String help_header = jsurf_progname + " is a renderer for real algebraic surfaces.\n" +
+-    	    "Specify files as '-' for standard input and output.";
++          jsurf_progname + " translates its own language script files (generally with extension '.jsurf') into Portable Network Graphics (PNG) files; " +
++					"PNG is a raster graphics file format that supports lossless data compression.\n" +
++    	    "If the output filename is not specified, the output is placed in a file of the same basename with a '.png' extension in the current working directory.\n" +
++					"Either the input filename or the output filename can be '-' to request reading from stdin or writing to stdout, respectively. " +
++					"Whenever the Graphic Unit Interface (GUI) is available, the gui option takes precedence over the output options, otherwise it is ignored. " +
++					"That is, whenever the gui option is present (and available), the output is displayed in a window rather than written in a PNG file.\n" +
++					"\n" ;
+     	String help_footer = "";
+     	try
+     	{
+     		CommandLine cmd = parser.parse( options, args );
+-    		
++
+ 			if( cmd.hasOption( "help" ) )
+ 			{
+-    			formatter.printHelp( cmd_line_syntax, help_header, options, help_footer );
++    			formatter.printHelp( helper_width, cmd_line_syntax, help_header, options, help_footer );
+     			return;
+     		}
+ 
+@@ -107,6 +115,9 @@
+     			return;
+     		}
+ 
++    		if( cmd.hasOption( "output" ) )
++    			output_filename = cmd.getOptionValue("output");
++
+     		if( cmd.hasOption("size") )
+     			size = Integer.parseInt( cmd.getOptionValue("size") );
+ 
+@@ -132,19 +143,30 @@
+ 		    	aap = AntiAliasingPattern.QUINCUNX;
+ 			}
+ 
+-            show_gui = cmd.hasOption( "gui" );
++      if( cmd.hasOption( "gui" ) )
++				show_gui = !java.awt.GraphicsEnvironment.isHeadless() ;
+ 
+-			if( cmd.getArgs().length == 0 || ( cmd.getArgs().length == 1 && !show_gui ) || cmd.getArgs().length > 2 )
+-            {
+-    			formatter.printHelp( cmd_line_syntax, help_header, options, help_footer );
++			if( cmd.getArgs().length == 0 || cmd.getArgs().length > 2 )
++				{
++    			formatter.printHelp( helper_width, cmd_line_syntax, help_header, options, help_footer );
+     			System.exit( -1 );
+     		}
+ 			else
+-            {
+-                jsurf_filename = cmd.getArgs()[ 0 ];
+-                if( cmd.getArgs().length > 1 )
+-                    output_filename = cmd.getArgs()[ 1 ];
+-            }
++				{
++          jsurf_filename = cmd.getArgs()[ 0 ];
++					if (!show_gui)
++						{
++          		if( cmd.getArgs().length > 1 ) output_filename = cmd.getArgs()[ 1 ];
++							if( output_filename == null )
++								{
++									output_filename = FilenameUtils.getBaseName( jsurf_filename ) + ".png" ;
++								}
++						}
++					else
++						{
++							output_filename = null ;
++						}
++        }
+     	}
+     	catch( ParseException exp ) {
+     	    System.out.println( "Unexpected exception:" + exp.getMessage() );
+@@ -155,7 +177,7 @@
+     		formatter.printHelp( cmd_line_syntax, help_header, options, help_footer );
+     		System.exit( -1 );
+     	}
+-    	
++
+     	try
+     	{
+     		Properties jsurf = new Properties();
+@@ -214,8 +236,11 @@
+ 
+         if( show_gui )
+     	{
+-    		// display the image in a window 
+-    		final String window_title = "jsurf: " + jsurf_filename;
++    		// display the image in a window
++    		final String window_title =
++					jsurf_progname + ": " +
++					FilenameUtils.getBaseName( jsurf_filename ) +
++					" (" + FilenameUtils.getFullPathNoEndSeparator( jsurf_filename ) + ")" ;
+     		final BufferedImage window_image = bi;
+     		SwingUtilities.invokeLater( new Runnable() {
+     			public void run()
diff --git a/debian/rules b/debian/rules
index 71b3eeb..fe174bd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,7 +4,7 @@ UPS_PKG_VERSION = $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version:
 DEB_PKG_VERSION = $(shell dpkg-parsechangelog | sed -n -e '/^Version:/s/Version: //p')
 
 export JAVA_HOME ?= /usr/lib/jvm/default-java
-export CLASSPATH = /usr/share/java/vecmath.jar:/usr/share/java/antlr3-runtime.jar:/usr/share/java/commons-cli.jar
+export CLASSPATH = /usr/share/java/vecmath.jar:/usr/share/java/antlr3-runtime.jar:/usr/share/java/commons-io.jar:/usr/share/java/commons-cli.jar
 
 export JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF8
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/jsurf-alggeo.git



More information about the debian-science-commits mailing list