Accepting request 688504 from electronics

OBS-URL: https://build.opensuse.org/request/show/688504
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gerbv?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2019-03-26 21:33:26 +00:00 committed by Git OBS Bridge
commit 61e8ae7815
8 changed files with 38 additions and 249 deletions

View File

@ -1,20 +0,0 @@
Index: gerbv-2.6.1/man/Makefile.am
===================================================================
--- gerbv-2.6.1.orig/man/Makefile.am
+++ gerbv-2.6.1/man/Makefile.am
@@ -19,8 +19,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
-man_MANS = gerbv.1 gerbv.ru.1
-PO_FILES= gerbv.ru.1.in.po
+man_MANS = gerbv.1
MOSTLYCLEANFILES = *~
CLEANFILES = *~ *.pot $(man_MANS)
Index: gerbv-2.6.1/po/LINGUAS
===================================================================
--- gerbv-2.6.1.orig/po/LINGUAS
+++ /dev/null
@@ -1 +0,0 @@
-ru

View File

@ -1,163 +0,0 @@
diff -ur gerbv-2.6.1/src/callbacks.c gerbv-2.6.1.mod/src/callbacks.c
--- a/src/callbacks.c 2013-07-22 21:09:16.000000000 +0200
+++ b/src/callbacks.c 2015-03-01 02:41:55.775350761 +0100
@@ -89,13 +89,6 @@
#define SAVE_AS_PROJECT 1
#define OPEN_PROJECT 2
-/**Global variable to keep track of what's happening on the screen.
- Declared extern in gerbv_screen.h
- */
-extern gerbv_screen_t screen;
-extern gerbv_render_info_t screenRenderInfo;
-
-
/* These are the names of the valid apertures. These
* values are used in several places in this file.
* Please keep this in sync with the gerbv_aperture_type_t
diff -ur gerbv-2.6.1/src/exportimage.c gerbv-2.6.1.mod/src/exportimage.c
--- a/src/exportimage.c 2013-07-22 21:09:16.000000000 +0200
+++ b/src/exportimage.c 2015-03-01 02:43:23.249446752 +0100
@@ -28,19 +28,14 @@
\ingroup libgerbv
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#include "gerbv.h"
+#include "common.h"
#include <math.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <png.h>
-#include "gerbv.h"
+#include "render.h"
#include "draw.h"
#include <cairo.h>
@@ -48,8 +43,6 @@
#include <cairo-ps.h>
#include <cairo-svg.h>
-extern gerbv_render_info_t screenRenderInfo;
-
void exportimage_render_to_surface_and_destroy (gerbv_project_t *gerbvProject,
cairo_surface_t *cSurface, gerbv_render_info_t *renderInfo, gchar const* filename) {
cairo_t *cairoTarget = cairo_create (cSurface);
diff -ur gerbv-2.6.1/src/interface.c gerbv-2.6.1.mod/src/interface.c
--- a/src/interface.c 2013-07-22 21:09:16.000000000 +0200
+++ b/src/interface.c 2015-03-01 02:43:32.812566655 +0100
@@ -52,7 +52,6 @@
#include "gerbv_icon.h"
#include "icons.h"
-extern gerbv_render_info_t screenRenderInfo;
#define WIN_TITLE N_("Gerbv -- gEDA's Gerber Viewer")
diff -ur gerbv-2.6.1/src/main.c gerbv-2.6.1.mod/src/main.c
--- a/src/main.c 2013-07-22 21:09:16.000000000 +0200
+++ b/src/main.c 2015-03-01 02:43:50.698790955 +0100
@@ -160,7 +160,7 @@
const char *opt_options = "VadhB:D:O:W:b:f:r:m:l:o:p:t:T:w:x:";
/**Global state variable to keep track of what's happening on the screen.
- Declared extern in gerbv_screen.h
+ Declared extern in main.h
*/
gerbv_project_t *mainProject;
gerbv_screen_t screen;
diff -ur gerbv-2.6.1/src/render.c gerbv-2.6.1.mod/src/render.c
--- a/src/render.c 2013-07-22 21:09:16.000000000 +0200
+++ b/src/render.c 2015-03-01 02:44:39.142398742 +0100
@@ -69,17 +69,7 @@
#define dprintf if(DEBUG) printf
-/**Global variable to keep track of what's happening on the screen.
- Declared extern in gerbv_screen.h
- */
-extern gerbv_screen_t screen;
-
-extern gerbv_render_info_t screenRenderInfo;
-
-/*
-static void
-render_layer_to_cairo_target_without_transforming(cairo_t *cr, gerbv_fileinfo_t *fileInfo, gerbv_render_info_t *renderInfo );
-*/
+gerbv_render_info_t screenRenderInfo;
gboolean
render_check_scale_factor_limits (void) {
diff -ur gerbv-2.6.1/src/render.h gerbv-2.6.1.mod/src/render.h
--- a/src/render.h 2013-07-22 21:09:16.000000000 +0200
+++ b/src/render.h 2015-03-01 02:45:20.823922017 +0100
@@ -71,8 +71,4 @@
render_fill_selection_buffer_from_mouse_drag (gint corner1X, gint corner1Y,
gint corner2X, gint corner2Y, gint activeFileIndex, gboolean eraseOldSelection);
-gerbv_render_info_t screenRenderInfo;
-
-
-
-
+extern gerbv_render_info_t screenRenderInfo;
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;

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7aa6a2c622dc9ff7acd88411dddf95ae25ae3b5d97020f3ea91e97d82bf0d96c
size 4432481

3
gerbv-2.7.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c5ee808c4230ce6be3ad10ab63c547098386d43022704de25ddb9378e62053b4
size 5691407

View File

@ -1,15 +0,0 @@
Index: gerbv-2.6.1/configure.ac
===================================================================
--- gerbv-2.6.1.orig/configure.ac
+++ gerbv-2.6.1/configure.ac
@@ -24,9 +24,9 @@ dnl Foundation, Inc., 59 Temple Place,
AC_INIT([gerbv], [2.6.1])
AC_CONFIG_SRCDIR([src/gerbv.c])
-AC_GNU_SOURCE
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.9])
+AC_GNU_SOURCE
dnl Create a configuration header
AM_CONFIG_HEADER([config.h])

View File

@ -1,20 +0,0 @@
Index: gerbv-2.6.1/src/callbacks.c
===================================================================
--- gerbv-2.6.1.orig/src/callbacks.c
+++ gerbv-2.6.1/src/callbacks.c
@@ -1572,14 +1572,13 @@ callbacks_about_activate
gchar *string = g_strdup_printf(_("gerbv -- a Gerber (RS-274/X) viewer.\n\n"
"This is gerbv version %s\n"
- "Compiled on %s at %s\n"
"\n"
"gerbv is part of the gEDA Project.\n"
"\n"
"For more information see:\n"
" gEDA homepage: http://geda-project.org/\n"
" gEDA Wiki: http://wiki.geda-project.org/"),
- VERSION, __DATE__, __TIME__);
+ VERSION);
#if GTK_CHECK_VERSION(2,6,0)
gchar *license = g_strdup_printf(_("gerbv -- a Gerber (RS-274/X) viewer.\n\n"
"Copyright (C) 2000-2007 Stefan Petersen\n\n"

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Mar 25 22:26:25 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Use correct tarball from upstream
- Remove unused cruft from the specfile
-------------------------------------------------------------------
Wed Feb 27 12:18:11 UTC 2019 - Wojciech Kazubski <wk@ire.pw.edu.pl>
- Update to version 2.7.0
- Translations restored
- Patches:
* gerbv-2.6.1-undefined-symbols.patch upstreamed
* gerbv-fix-install-sh-call.patch upstreamed
* gerbv-2.6.1-no-translation.patch upstreamed
* gerbv-no-build-time.patch removed, build date/time is now set
by OBS
-------------------------------------------------------------------
Tue Mar 3 12:49:46 UTC 2015 - dev@stellardeath.org

View File

@ -1,7 +1,7 @@
#
# spec file for package gerbv
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,36 +12,28 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: gerbv
%define libname lib%{name}
Version: 2.6.1
Version: 2.7.0
Release: 0
%define somajor 1
Summary: Gerber File Viewer that supports the RS-274X Standard
License: GPL-2.0
License: GPL-2.0-only
Group: Productivity/Scientific/Electronics
Url: http://gerbv.geda-project.org/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE gerbv-no-build-time.patch -- fix W: file-contains-date-and-time
Patch1: gerbv-no-build-time.patch
# PATCH-FIX-UPSTREAM gerbv-2.6.1-no-translation.patch -- disable translation due to missed files
Patch2: gerbv-2.6.1-no-translation.patch
# PATCH-FIX-UPSTREAM gerbv-fix-install-sh-call.patch -- Fix calling install-sh not from build dir for automake 1.14
Patch3: gerbv-fix-install-sh-call.patch
Patch4: gerbv-2.6.1-undefined-symbols.patch
BuildRequires: autoconf
BuildRequires: gcc-c++
BuildRequires: gtk2-devel
BuildRequires: libpng-devel
BuildRequires: libtool
BuildRequires: opensp
BuildRequires: pkgconfig
BuildRequires: po4a
BuildRequires: update-desktop-files
# Requires: guile
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Gerber Viewer (gerbv) is a viewer for Gerber files. Gerber files are
@ -73,14 +65,8 @@ that use gerbv library.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
./autogen.sh
export LDFLAGS="$LDFLAGS -ldl"
%configure \
--disable-static \
--enable-unit-mm \
@ -93,28 +79,31 @@ make %{?_smp_mflags}
%suse_update_desktop_file -r %{name} Education Engineering
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
#move translated man page
mkdir -p %{buildroot}/%{_mandir}/ru/man1
mv %{buildroot}/%{_mandir}/man1/%{name}.ru.1 %{buildroot}/%{_mandir}/ru/man1/%{name}.1
%find_lang %{name}
%post -n %{libname}%{somajor} -p /sbin/ldconfig
%postun -n %{libname}%{somajor} -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING NEWS README
%files -f %{name}.lang
%license COPYING
%doc NEWS README
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%{_mandir}/*/man1/%{name}*
%{_datadir}/%{name}/
%{_datadir}/icons/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/glib-2.0/schemas/org.geda-user.%{name}.gschema.xml
%files -n %{libname}%{somajor}
%defattr(-,root,root)
%{_libdir}/%{libname}.so.%{somajor}*
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/%{libname}.so
%{_libdir}/pkgconfig/%{libname}.pc