[Pkg-electronics-commits] [gerbv] 02/03: Add patch to fix FTBFS.

Dr. Tobias Quathamer toddy at debian.org
Mon Jan 16 09:05:06 UTC 2017


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

toddy pushed a commit to branch master
in repository gerbv.

commit e78c9f0f8aadac4387f6bf3a38a16c6df0ccb30f
Author: Dr. Tobias Quathamer <toddy at debian.org>
Date:   Mon Jan 16 09:45:38 2017 +0100

    Add patch to fix FTBFS.
    
    This is a cherry-pick from upstream's git repository, ID dd8f9fa.
    
    Closes: #851190
---
 .../patches/0004-pnp-can-t-use-screen-units.patch  | 62 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 63 insertions(+)

diff --git a/debian/patches/0004-pnp-can-t-use-screen-units.patch b/debian/patches/0004-pnp-can-t-use-screen-units.patch
new file mode 100644
index 0000000..30bb5e5
--- /dev/null
+++ b/debian/patches/0004-pnp-can-t-use-screen-units.patch
@@ -0,0 +1,62 @@
+From: Sergey Alyoshin <alyoshin.s at gmail.com>
+Date: Sat, 16 Nov 2013 11:31:21 +0000
+Subject: pnp: can't use screen units
+
+Pratially undo commit bb318fbf3a1242eada61af47cec8744823e0645c
+---
+ src/pick-and-place.c | 23 ++++-------------------
+ 1 file changed, 4 insertions(+), 19 deletions(-)
+
+diff --git a/src/pick-and-place.c b/src/pick-and-place.c
+index ab50337..23d1cd1 100644
+--- a/src/pick-and-place.c
++++ b/src/pick-and-place.c
+@@ -56,7 +56,6 @@
+ 
+ #include "gerbv.h"
+ #include "gerber.h"
+-#include "main.h"
+ #ifdef RENDER_USING_GDK
+   #include "draw-gdk.h"
+ #else
+@@ -161,36 +160,22 @@ pick_and_place_reset_bounding_box (gerbv_net_t *net) {
+ }
+ 
+ //! Parses a string representing float number with a unit, default is mil
+-static double 
+-pick_and_place_get_float_unit(char *str)
++static double
++pick_and_place_get_float_unit(const char *str)
+ {
+     double x = 0.0;
+     char unit[41];
+-    extern gerbv_screen_t screen;
+ 
+     /* float, optional space, optional unit mm,cm,in,mil */
+     sscanf(str, "%lf %40s", &x, unit);
+     if(strstr(unit,"in")) {
+ 	;
+-    } else if(strstr(unit, "mil")) {
+-	x /= 1000;
+     } else if(strstr(unit, "cm")) {
+ 	x /= 2.54;
+     } else if(strstr(unit, "mm")) {
+ 	x /= 25.4;
+-    } else { /* default to GUI units */
+-	switch (screen.unit) {
+-	case GERBV_INS:
+-	    break;
+-	case GERBV_MILS:
+-	    x /= 1000;
+-	    break;
+-	case GERBV_MMS:
+-	    x /= 25.4;
+-	    break;
+-	default:
+-	    assert(screen.unit);
+-	}
++    } else { /* default to mils */
++	x /= 1000;
+     }
+ 
+     return x;
diff --git a/debian/patches/series b/debian/patches/series
index cf70794..13b2148 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Desktop-file.patch
 0002-Fix-manpage.patch
 0003-No-translation-available.patch
+0004-pnp-can-t-use-screen-units.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gerbv.git



More information about the Pkg-electronics-commits mailing list