Accepting request 870850 from home:dirkmueller:branches:graphics

- update to 3.2.8:
  o Shift + Wheel Up pans left, Shift + Wheel Down pans right.
    Alt or Meta + Wheel Up pops up the edit panel, Alt or Meta + Wheel
    Down pops up the drawing panel. Previously, Shift + Wheel Up or Down
    popped up the edit or drawing panel, respectively, and panning
    sideways could only be achieved by moving the wheel sideways.
  o To display gif image files, either giftopnm and ppmtopcx from the
    netpbm package, imagemagick, or graphicsmagick must be installed.
  o Obey the resolution given in embedded png, tiff and jpeg image files.
  o Embedded image files are displayed in full color, not reduced to
    a maximum of 256 colors.
  o Display embedded pdf files.
  o Read version 1.3 fig files.
  o The default resolution of embedded raster images is changed
    from 80 dpi to 72 dpi.
  o Read compressed files, but do not silently uncompress them.
  o Get correct bounding box (/MediaBox) of embedded pdf files.
- remove xfig.3.2.5b-preview.dif, xfig.3.2.5b-pspdftex.dif,
  xfig.3.2.5-xim.dif: obsolete
- remove X11R6 ifdefs from spec file, this is obsolete

OBS-URL: https://build.opensuse.org/request/show/870850
OBS-URL: https://build.opensuse.org/package/show/graphics/xfig?expand=0&rev=72
This commit is contained in:
Dr. Werner Fink 2021-02-11 08:49:35 +00:00 committed by Git OBS Bridge
parent 10d36783f1
commit 33b8b3241f
9 changed files with 105 additions and 195 deletions

View File

@ -3,9 +3,11 @@
src/w_menuentry.c | 2 +-
2 files changed, 31 insertions(+), 3 deletions(-)
--- app-defaults/Fig.in
+++ app-defaults/Fig.in 2016-09-22 08:33:16.879768102 +0000
@@ -14,6 +14,7 @@ Fig.version: 3.2.6
Index: app-defaults/Fig.in
===================================================================
--- app-defaults/Fig.in.orig
+++ app-defaults/Fig.in
@@ -14,6 +14,7 @@ Fig.version: @VERSION@
! with xfig continually resizing itself
Fig*AllowShellResize: false
@ -28,7 +30,7 @@
! Specify a private Compose key database file. If this resource contains a "/"
! then the wired-in name of the xfig global directory won't be prefixed to it.
@@ -661,7 +667,29 @@ Fig*sideruler.background: gray95
@@ -663,7 +669,29 @@ Fig*sideruler.background: gray95
Fig*FigList*background: gray95
Fig*List*background: gray95
@ -59,14 +61,3 @@
Fig*Label.background: gray80
Fig*ind_box.background: gray80
--- src/w_menuentry.c
+++ src/w_menuentry.c 2016-09-22 08:34:54.249950001 +0000
@@ -172,7 +172,7 @@ Redisplay(Widget w, XEvent *event, Regio
gc = entry->sme_bsb.norm_gray_gc;
}
- if (entry->sme_bsb.label != NULL) {
+ if (entry->sme_bsb.label != /* NULL */ XtName((Widget)(entry))) {
int x_loc = entry->sme_bsb.left_margin;
int len = strlen(entry->sme_bsb.label);
char * label = entry->sme_bsb.label;

View File

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

3
xfig-3.2.8.tar.xz Normal file
View File

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

View File

@ -1,18 +0,0 @@
---
src/d_text.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- src/d_text.c
+++ src/d_text.c 2016-09-22 08:46:29.848945840 +0000
@@ -1971,7 +1971,10 @@ xim_initialize(Widget w)
if (xim_style == 0) xim_style = style_root;
}
}
- if (xim_style != preferred_style) {
+ if (xim_style != preferred_style
+ && *modifier_list != '\0'
+ && ! strstr(modifier_list,"@im=local")
+ && ! strstr(modifier_list,"@im=none")) {
fprintf(stderr, "xfig: this input-method doesn't support %s input style\n",
appres.xim_input_style);
if (xim_style == 0) {

View File

@ -3,24 +3,20 @@
src/u_print.c | 1 +
2 files changed, 13 insertions(+), 6 deletions(-)
--- src/main.c
+++ src/main.c 2018-09-06 11:16:21.842867881 +0000
@@ -60,11 +60,13 @@
/* input extensions for an input tablet */
#ifdef USE_TAB
-#include "X11/extensions/XInput.h"
+#include <X11/extensions/XInput.h>
#endif /* USE_TAB */
Index: src/main.c
===================================================================
--- src/main.c.orig
+++ src/main.c
@@ -44,6 +44,8 @@
#include <X11/xpm.h>
#ifdef I18N
#include <X11/keysym.h>
+#include <locale.h>
+#include <langinfo.h>
#endif /* I18N */
#include <X11/IntrinsicP.h>
@@ -782,11 +784,6 @@ void main(int argc, char **argv)
#endif
#ifdef USE_TAB /* input extensions for an input tablet */
#include <X11/extensions/XInput.h>
@@ -831,11 +833,6 @@ main(int argc, char **argv)
}
}
@ -32,7 +28,7 @@
/*
* save the command line arguments
*/
@@ -891,6 +888,10 @@ void main(int argc, char **argv)
@@ -937,6 +934,10 @@ main(int argc, char **argv)
setup_icons_big();
#ifdef I18N
@ -43,7 +39,7 @@
/************************************************************/
/* if the international option has been set, set the locale */
/************************************************************/
@@ -1611,6 +1612,11 @@ setup_visual(int *argc_p, char **argv, A
@@ -1657,6 +1658,11 @@ setup_visual(int *argc_p, char **argv, A
*/
tool = XtAppInitialize (&tool_app, "Fig", options, XtNumber (options), argc_p, argv,
(String *) NULL, args, 0);
@ -55,8 +51,10 @@
/* save important info */
tool_d = XtDisplay(tool);
tool_s = XtScreen(tool);
--- src/u_print.c
+++ src/u_print.c 2018-09-06 09:47:09.839191953 +0000
Index: src/u_print.c
===================================================================
--- src/u_print.c.orig
+++ src/u_print.c
@@ -16,6 +16,7 @@
*
*/

View File

@ -1,26 +0,0 @@
--- src/f_readeps.c
+++ src/f_readeps.c 2013-12-10 13:57:36.222235930 +0000
@@ -257,7 +257,7 @@ bitmap_from_gs(file, filetype, pic, urx,
char buf[300];
FILE *tmpfp, *pixfile, *gsfile;
char *driver;
- int status, wid, ht, nbitmap, fd;
+ int status, wid, ht, nbitmap, fd, len;
char tmpfile[PATH_MAX],
pixnam[PATH_MAX],
errnam[PATH_MAX],
@@ -317,9 +317,13 @@ bitmap_from_gs(file, filetype, pic, urx,
file_msg("Cannot canonicalize %s: %s\n", tmpfile, strerror(errno));
return False;
}
- sprintf(gscom,
+ len = snprintf(gscom, sizeof(gscom) - 1,
"%s -r72x72 -sDEVICE=%s -g%dx%d -sOutputFile=%s -dDELAYSAFER -c '<< /PermitFileReading [ (%s)] >> setuserparams .locksafe' -dSAFER -q - > %s 2>&1",
appres.ghostscript, driver, wid, ht, pixnam, psnam, errnam);
+ if (len >= sizeof(gscom) - 1 || len < 0) {
+ file_msg("Cannot write to buffer, file name to large: %s\n", psnam);
+ return False;
+ }
if (appres.DEBUG)
fprintf(stderr,"calling: %s\n",gscom);
if ((gsfile = popen(gscom, "w")) == 0) {

View File

@ -1,24 +0,0 @@
---
src/u_print.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- src/u_print.c
+++ src/u_print.c 2018-05-07 07:42:00.783930631 +0000
@@ -375,7 +375,7 @@ print_to_file(char *file, int xoff, int
/* make it suitable for pstex. */
strcpy(tmpcmd, prcmd);
strcat(tmpcmd, ".eps");
- (void) exec_prcmd(tmpcmd, "EXPORT of PostScript part");
+ (void) exec_prcmd(tmpcmd, "EXPORT of EPS part");
/* make it suitable for pdftex. */
strsub(prcmd, "ps", "pdf", tmpcmd, 0);
@@ -697,7 +697,7 @@ build_layer_list(char *layers)
{
char list[PATH_MAX], notlist[PATH_MAX], num[10];
int layer, len, notlen;
- int firstyes, lastyes, firstno, lastno;
+ int firstyes, lastyes = 0, firstno, lastno = 0;
layers[0] = '\0';

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Wed Feb 10 12:37:21 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 3.2.8:
o Shift + Wheel Up pans left, Shift + Wheel Down pans right.
Alt or Meta + Wheel Up pops up the edit panel, Alt or Meta + Wheel
Down pops up the drawing panel. Previously, Shift + Wheel Up or Down
popped up the edit or drawing panel, respectively, and panning
sideways could only be achieved by moving the wheel sideways.
o To display gif image files, either giftopnm and ppmtopcx from the
netpbm package, imagemagick, or graphicsmagick must be installed.
o Obey the resolution given in embedded png, tiff and jpeg image files.
o Embedded image files are displayed in full color, not reduced to
a maximum of 256 colors.
o Display embedded pdf files.
o Read version 1.3 fig files.
o The default resolution of embedded raster images is changed
from 80 dpi to 72 dpi.
o Read compressed files, but do not silently uncompress them.
o Get correct bounding box (/MediaBox) of embedded pdf files.
- remove xfig.3.2.5b-preview.dif, xfig.3.2.5b-pspdftex.dif,
xfig.3.2.5-xim.dif: obsolete
- remove X11R6 ifdefs from spec file, this is obsolete
-------------------------------------------------------------------
Tue Oct 29 08:56:06 UTC 2019 - Dr. Werner Fink <werner@suse.de>

147
xfig.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package xfig
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -17,24 +17,44 @@
Name: xfig
Version: 3.2.8
Release: 0
Summary: Facility for Interactive Generation of Figures under the X Window System
License: MIT
Group: Productivity/Graphics/Vector Editors
URL: https://sourceforge.net/projects/mcj/
#
# Remove forbidden files: aircraft.fig
# <uncompess> xfig-3.2.8.tar
# tar -f xfig-3.2.8.tar --delete xfig-3.2.8/Libraries/Examples/aircraft.fig
# <compress> xfig-3.2.8.tar
#
#Source: http://sourceforge.net/projects/mcj/files/xfig-%{version}.tar.xz/download#/xfig-%{version}.tar.xz
Source: xfig-%{version}.tar.xz
Source1: font-test.fig
Source3: xfig.sh
Source4: xfig.desktop
Patch0: xfig-3.2.6.dif
Patch1: xfig.3.2.5-urw-fonts.dif
Patch3: xfig.3.2.3d-international-std-fonts.dif
# PATCH-FIX-UPSTREAM xfig.3.2.5b-mediaboxrealnb.dif [debian#530898]
Patch5: xfig.3.2.5b-null.dif
Patch6: xfig.3.2.5b-locale.dif
Patch7: xfig.3.2.5b-fixes.dif
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: freetype2-devel
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xt)
%if 0%{suse_version} > 1310
BuildRequires: libXaw3d-devel
%else
BuildRequires: xaw3d-devel
%endif
BuildRequires: libXmu-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: netpbm
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
Provides: xfig.3.2.3d
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xaw6)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xt)
Requires: efont-unicode
Requires: ghostscript-fonts-std
Requires: ifnteuro
@ -44,46 +64,11 @@ Requires: netpbm
Requires: transfig
Requires: xorg-x11-fonts
Requires: xorg-x11-fonts-core
Version: 3.2.7b
Release: 0
Summary: Facility for Interactive Generation of Figures under the X Window System
# www.xfig.org is dead
License: MIT
Group: Productivity/Graphics/Vector Editors
Url: http://mcj.sourceforge.net/
#
# Remove forbidden files: aircraft.fig
# <uncompess> xfig-3.2.5c.tar
# tar -f xfig-3.2.5c.tar --delete xfig-3.2.5c/Libraries/Examples/aircraft.fig
# <compress> xfig-3.2.5c.tar
#
#Source: http://sourceforge.net/projects/mcj/files/xfig-%{version}.tar.xz/download#/xfig-%{version}.tar.xz
Source: xfig-%{version}.tar.xz
Source1: font-test.fig
Source3: xfig.sh
Source4: xfig.desktop
#Patch0: xfig-%{version}.dif
Patch0: xfig-3.2.6.dif
Patch1: xfig.3.2.5-urw-fonts.dif
Patch2: xfig.3.2.5-xim.dif
Patch3: xfig.3.2.3d-international-std-fonts.dif
# PATCH-FIX-UPSTREAM xfig.3.2.5b-mediaboxrealnb.dif [debian#530898]
Patch5: xfig.3.2.5b-null.dif
Patch6: xfig.3.2.5b-locale.dif
Patch7: xfig.3.2.5b-fixes.dif
Patch8: xfig.3.2.5b-pspdftex.dif
Patch10: xfig.3.2.5b-preview.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%global _mandir %{_exec_prefix}/man
%define _x11data %{_exec_prefix}/lib/X11
%define _data $(LIBDIR)
%define _appdefdir %{_x11data}/app-defaults
Provides: xfig.3.2.3d
%if 0%{?suse_version} > 1310
BuildRequires: libXaw3d-devel
%else
%define _x11data %{_datadir}/X11
%define _data $(SHAREDIR)
%define _appdefdir %{_x11data}/app-defaults
BuildRequires: xaw3d-devel
%endif
%description
@ -93,20 +78,6 @@ pictures can be saved, printed on PostScript printers, or converted to
a variety of other formats (to allow inclusion in LaTeX documents, for
example).
Documentation: /usr/share/doc/packages/xfig & man xfig
Examples: /usr/share/doc/packages/xfig/TheExamples
Authors:
--------
Anthony Dekker <dekker@ACM.org>
Brian V. Smith <bvsmith@lbl.gov>
Jim Daley <jdaley@cix.compulink.co.uk>
Ross Martin <martin@trcsun3.eas.asu.edu>
Uwe Bonnes <bon@lte.e-technik.uni-erlangen.de>
%prep
%setup -q -n xfig-%{version}
set +x
@ -117,25 +88,22 @@ find -type f | while read file; do
fi
done
set -x
%patch0 -p0
%patch1 -p0 -b .urw-fonts
%patch2 -p0 -b .xim
%patch3 -p0 -b .international-std-fonts
%patch5 -p0 -b .null
%patch6 -p0 -b .locale
%patch7 -p0 -b .fixes
%patch8 -p0 -b .pspdftex
%patch10 -p0 -b .preview
cp %{S:1} .
%patch0
%patch1 -b .urw-fonts
%patch3 -b .international-std-fonts
%patch5 -b .null
%patch6 -b .locale
%patch7 -b .fixes
cp %{SOURCE1} .
test ! -e Libraries/Examples/aircraft.fig || { echo forbidden file found 1>&2; exit 1; }
%build
%if 0%{suse_version} <= 1310
%if 0%{?suse_version} <= 1310
cat > xaw3d.pc <<-'EOF'
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include
prefix=%{_prefix}
exec_prefix=%{_prefix}
libdir=%{_prefix}/lib
includedir=%{_includedir}
Name: Xaw3d
Description: X 3D Athena Widgets Library
Version: 1.5E
@ -144,17 +112,14 @@ cat > xaw3d.pc <<-'EOF'
Cflags: -I${includedir} -DXAW_INTERNATIONALIZATION -DXAW_MULTIPLANE_PIXMAPS -DXAW_GRAY_BLKWHT_STIPPLES -DXAW_ARROW_SCROLLBARS
Libs: -L${libdir} -lXaw3d
EOF
PKG_CONFIG_PATH=/usr/share/pkgconfig:/usr/lib/pkgconfig:${PWD}
PKG_CONFIG_PATH=%{_datadir}/pkgconfig:%{_prefix}/lib/pkgconfig:${PWD}
export PKG_CONFIG_PATH
%endif
CC=gcc
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -w -D_GNU_SOURCE -std=gnu99 -DUSE_XPM -DUSE_SPLASH"
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
CFLAGS="$CFLAGS -DMAXNUMPTS=50000"
CFLAGS="$CFLAGS -DBSDLPR"
CFLAGS="$CFLAGS -DGSBIT"
CFLAGS="%{optflags} -fno-strict-aliasing -w -D_GNU_SOURCE -std=gnu99 -DUSE_XPM -DUSE_SPLASH"
CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DMAXNUMPTS=50000 -DBSDLPR -DGSBIT"
export CC CFLAGS
chmod 755 configure
chmod +x configure
%configure \
--docdir=%{_defaultdocdir}/%{name} \
--enable-cache-size=512 \
@ -164,25 +129,25 @@ chmod 755 configure
--with-xaw3d
touch src/splash.xbm
touch src/splash.xpm
make %{?_smp_mflags} CCOPTIONS="$CFLAGS"
%make_build CCOPTIONS="$CFLAGS"
%install
find -name '*.bak' -exec rm -vf '{}' \+
make DESTDIR=%{buildroot} install
%make_install
mv %{buildroot}%{_mandir}/man1/xfig.1 %{buildroot}%{_mandir}/man1/xfig.1x
gzip -9 %{buildroot}%{_mandir}/man1/xfig.1x
%fdupes %{buildroot}
%suse_update_desktop_file xfig VectorGraphics &> /dev/null
%suse_update_desktop_file xfig VectorGraphics
%files
%defattr(-,root,root,755)
%doc %{_docdir}/%{name}
%dir %{_appdefdir}
%{_appdefdir}/Fig
%dir %{_datadir}/X11/app-defaults
%{_datadir}/X11/app-defaults/Fig
%{_bindir}/xfig*
%{_datadir}/applications/xfig.desktop
%{_datadir}/pixmaps/xfig.png
%{_datadir}/xfig
%doc %{_mandir}/man1/xfig.1*.gz
%{_mandir}/man1/xfig.1*.gz
%changelog