[packages/libwmf] - updated to 0.2.12 from github fork - updated fontmap-pld patch - removed obsolete security patches

qboosh qboosh at pld-linux.org
Wed Apr 24 22:25:32 CEST 2019


commit d62a6f3bdc3ccb105d2f4da7daa63f00b0d1cf65
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Apr 24 22:25:49 2019 +0200

    - updated to 0.2.12 from github fork
    - updated fontmap-pld patch
    - removed obsolete security patches and pixbufloaderdir patch
    - added ah patch (autoheader fixes)

 libwmf-0.2.8.4-CAN-2004-0941.patch | 17 -----------
 libwmf-0.2.8.4-CVE-2007-0455.patch | 11 -------
 libwmf-0.2.8.4-CVE-2007-2756.patch | 16 -----------
 libwmf-0.2.8.4-CVE-2007-3472.patch | 59 --------------------------------------
 libwmf-0.2.8.4-CVE-2007-3473.patch | 13 ---------
 libwmf-0.2.8.4-CVE-2007-3477.patch | 38 ------------------------
 libwmf-0.2.8.4-CVE-2009-3546.patch | 13 ---------
 libwmf-0.2.8.4-useafterfree.patch  | 10 -------
 libwmf-ah.patch                    | 18 ++++++++++++
 libwmf-fontmap-pld.patch           | 49 +++++++++++++++----------------
 libwmf-pixbufloaderdir.patch       | 14 ---------
 libwmf.spec                        | 43 +++++++++------------------
 12 files changed, 57 insertions(+), 244 deletions(-)
---
diff --git a/libwmf.spec b/libwmf.spec
index 54aeff5..53b972a 100644
--- a/libwmf.spec
+++ b/libwmf.spec
@@ -6,32 +6,28 @@
 Summary:	libwmf - library to convert WMF files
 Summary(pl.UTF-8):	libwmf - biblioteka z funkcjami do konwersji plików WMF
 Name:		libwmf
-Version:	0.2.8.4
-Release:	24
+Version:	0.2.12
+Release:	1
 Epoch:		2
 License:	LGPL v2+
 Group:		Applications/Text
-Source0:	http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz
-# Source0-md5:	d1177739bf1ceb07f57421f0cee191e0
+# original project seems dead
+#Source0:	http://downloads.sourceforge.net/wvware/%{name}-%{version}.tar.gz
+# RedHat supported fork
+#Source0Download: https://github.com/caolanm/libwmf/releases
+Source0:	https://github.com/caolanm/libwmf/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	fa5c642447ef6c37737c6ac767d4ba3a
 Patch0:		%{name}-fontmap-pld.patch
 Patch1:		%{name}-includes.patch
 Patch2:		%{name}-segv.patch
 Patch3:		%{name}-png12.patch
-Patch4:		%{name}-0.2.8.4-useafterfree.patch
-Patch5:		%{name}-0.2.8.4-CVE-2007-0455.patch
-Patch6:		%{name}-0.2.8.4-CVE-2007-3472.patch
-Patch7:		%{name}-0.2.8.4-CVE-2007-3473.patch
-Patch8:		%{name}-0.2.8.4-CVE-2007-3477.patch
-Patch9:		%{name}-0.2.8.4-CVE-2007-2756.patch
-Patch10:	%{name}-0.2.8.4-CAN-2004-0941.patch
-Patch11:	%{name}-0.2.8.4-CVE-2009-3546.patch
-Patch12:	%{name}-pixbufloaderdir.patch
+Patch4:		%{name}-ah.patch
 URL:		http://wvware.sourceforge.net/
 BuildRequires:	autoconf >= 2.59-9
 BuildRequires:	automake
 BuildRequires:	expat-devel
 BuildRequires:	freetype-devel >= 2.0
-%{?with_gtk:BuildRequires:	gtk+2-devel >= 1:2.10.0}
+%{?with_gtk:BuildRequires:	gdk-pixbuf2-devel >= 2.1.2}
 BuildRequires:	libjpeg-devel
 BuildRequires:	libpng-devel >= 2:1.4.0
 BuildRequires:	libtool >= 1:1.4.2-9
@@ -114,21 +110,12 @@ Moduł wczytujący WMF dla biblioteki gdk_pixbuf 2.x
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
 
 %build
-%{__rm} configure.in
 %{__libtoolize}
 %{__aclocal}
-%{__autoheader}
 %{__autoconf}
+%{__autoheader}
 %{__automake}
 %configure \
 	%{!?with_static_libs:--disable-static} \
@@ -144,9 +131,6 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -j1 install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} -rf html-doc
-mv -f $RPM_BUILD_ROOT%{_datadir}/doc ./html-doc
-
 # no static modules and *.la for GTK+ loaders - shut up check-files
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/gdk-pixbuf-2.0/*/loaders/*.{a,la}
 
@@ -181,13 +165,14 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc html-doc examples
+%doc doc/caolan doc/html/{*.html,*.css,*.gif,*.png} examples
 %attr(755,root,root) %{_bindir}/libwmf-config
 %attr(755,root,root) %{_libdir}/libwmf.so
 %attr(755,root,root) %{_libdir}/libwmflite.so
 %{_libdir}/libwmf.la
 %{_libdir}/libwmflite.la
 %{_includedir}/libwmf
+%{_pkgconfigdir}/libwmf.pc
 
 %if %{with static_libs}
 %files static
@@ -199,5 +184,5 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with gtk}
 %files gtk-loader
 %defattr(644,root,root,755)
-%{_libdir}/gdk-pixbuf-2.0/*/loaders/io-wmf.so
+%attr(755,root,root) %{_libdir}/gdk-pixbuf-2.0/2.*/loaders/io-wmf.so
 %endif
diff --git a/libwmf-0.2.8.4-CAN-2004-0941.patch b/libwmf-0.2.8.4-CAN-2004-0941.patch
deleted file mode 100644
index 581e4e0..0000000
--- a/libwmf-0.2.8.4-CAN-2004-0941.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd_png.c	2004-11-11 14:02:37.407589824 -0500
-+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c	2004-11-11 14:04:29.672522960 -0500
-@@ -188,6 +188,14 @@
- 
-   png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
- 		&interlace_type, NULL, NULL);
-+  if (overflow2(sizeof (int), width)) 
-+    {
-+      return NULL;
-+    }
-+  if (overflow2(sizeof (int) * width, height)) 
-+    {
-+      return NULL;
-+    }  
-   if ((color_type == PNG_COLOR_TYPE_RGB) ||
-       (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
-     {
diff --git a/libwmf-0.2.8.4-CVE-2007-0455.patch b/libwmf-0.2.8.4-CVE-2007-0455.patch
deleted file mode 100644
index 0cc5abc..0000000
--- a/libwmf-0.2.8.4-CVE-2007-0455.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gdft.c	2010-12-06 11:18:26.000000000 +0000
-+++ libwmf-0.2.8.4/src/extra/gd/gdft.c	2010-12-06 11:21:09.000000000 +0000
-@@ -811,7 +811,7 @@
- 	    {
- 	      ch = c & 0xFF;	/* don't extend sign */
- 	    }
--	  next++;
-+	  if (*next) next++;
- 	}
-       else
- 	{
diff --git a/libwmf-0.2.8.4-CVE-2007-2756.patch b/libwmf-0.2.8.4-CVE-2007-2756.patch
deleted file mode 100644
index eba8fac..0000000
--- a/libwmf-0.2.8.4-CVE-2007-2756.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd_png.c	1 Apr 2007 20:41:01 -0000	1.21.2.1
-+++ libwmf-0.2.8.4/src/extra/gd/gd_png.c	16 May 2007 19:06:11 -0000
-@@ -78,8 +78,11 @@
- gdPngReadData (png_structp png_ptr,
- 	       png_bytep data, png_size_t length)
- {
--  gdGetBuf (data, length, (gdIOCtx *)
--	    png_get_io_ptr (png_ptr));
-+  int check;
-+  check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr));
-+  if (check != length) {
-+    png_error(png_ptr, "Read Error: truncated data");
-+  }
- }
- 
- static void
diff --git a/libwmf-0.2.8.4-CVE-2007-3472.patch b/libwmf-0.2.8.4-CVE-2007-3472.patch
deleted file mode 100644
index 01b56de..0000000
--- a/libwmf-0.2.8.4-CVE-2007-3472.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd.c
-+++ libwmf-0.2.8.4/src/extra/gd/gd.c
-@@ -106,6 +106,18 @@
-   gdImagePtr im;
-   unsigned long cpa_size;
- 
-+  if (overflow2(sx, sy)) {
-+    return NULL;
-+  }
-+
-+  if (overflow2(sizeof (int *), sy)) {
-+    return NULL;
-+  }
-+
-+  if (overflow2(sizeof(int), sx)) {
-+    return NULL;
-+  }
-+
-   im = (gdImage *) gdMalloc (sizeof (gdImage));
-   if (im == 0) return 0;
-   memset (im, 0, sizeof (gdImage));
---- libwmf-0.2.8.4/src/extra/gd/gdhelpers.c	2010-12-06 11:47:31.000000000 +0000
-+++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.c	2010-12-06 11:48:04.000000000 +0000
-@@ -2,6 +2,7 @@
- #include "gdhelpers.h"
- #include <stdlib.h>
- #include <string.h>
-+#include <limits.h>
- 
- /* TBB: gd_strtok_r is not portable; provide an implementation */
- 
-@@ -94,3 +95,18 @@
- {
-   free (ptr);
- }
-+
-+int overflow2(int a, int b)
-+{
-+	if(a < 0 || b < 0) {
-+		fprintf(stderr, "gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n");
-+		return 1;
-+	}
-+	if(b == 0)
-+		return 0;
-+	if(a > INT_MAX / b) {
-+		fprintf(stderr, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n");
-+		return 1;
-+	}
-+	return 0;
-+}
---- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h	2010-12-06 11:47:17.000000000 +0000
-+++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.h	2010-12-06 11:48:36.000000000 +0000
-@@ -15,4 +15,6 @@
- void *gdMalloc(size_t size);
- void *gdRealloc(void *ptr, size_t size);
- 
-+int overflow2(int a, int b);
-+
- #endif /* GDHELPERS_H */
diff --git a/libwmf-0.2.8.4-CVE-2007-3473.patch b/libwmf-0.2.8.4-CVE-2007-3473.patch
deleted file mode 100644
index 5901899..0000000
--- a/libwmf-0.2.8.4-CVE-2007-3473.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd.c
-+++ libwmf-0.2.8.4/src/extra/gd/gd.c
-@@ -2483,6 +2483,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd)
-     }
-   bytes = (w * h / 8) + 1;
-   im = gdImageCreate (w, h);
-+  if (!im) {
-+    return 0;
-+  }
-+
-   gdImageColorAllocate (im, 255, 255, 255);
-   gdImageColorAllocate (im, 0, 0, 0);
-   x = 0;
diff --git a/libwmf-0.2.8.4-CVE-2007-3477.patch b/libwmf-0.2.8.4-CVE-2007-3477.patch
deleted file mode 100644
index 81ac038..0000000
--- a/libwmf-0.2.8.4-CVE-2007-3477.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd.c
-+++ libwmf-0.2.8.4/src/extra/gd/gd.c
-@@ -1335,10 +1335,31 @@
-   int w2, h2;
-   w2 = w / 2;
-   h2 = h / 2;
--  while (e < s)
--    {
--      e += 360;
--    }
-+
-+  if ((s % 360)  == (e % 360)) {
-+         s = 0; e = 360;
-+  } else {
-+         if (s > 360) {
-+                 s = s % 360;
-+         }
-+
-+         if (e > 360) {
-+                 e = e % 360;
-+         }
-+
-+         while (s < 0) {
-+                 s += 360;
-+         }
-+
-+         while (e < s) {
-+                 e += 360;
-+         }
-+
-+         if (s == e) {
-+                 s = 0; e = 360;
-+         }
-+  }
-+
-   for (i = s; (i <= e); i++)
-     {
-       int x, y;
diff --git a/libwmf-0.2.8.4-CVE-2009-3546.patch b/libwmf-0.2.8.4-CVE-2009-3546.patch
deleted file mode 100644
index d718976..0000000
--- a/libwmf-0.2.8.4-CVE-2009-3546.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd_gd.c	2010-12-06 14:56:06.000000000 +0000
-+++ libwmf-0.2.8.4/src/extra/gd/gd_gd.c	2010-12-06 14:57:04.000000000 +0000
-@@ -42,6 +42,10 @@
- 	    {
- 	      goto fail1;
- 	    }
-+	  if (&im->colorsTotal > gdMaxColors)
-+	    {
-+	      goto fail1;
-+	    }
- 	}
-       /* Int to accommodate truecolor single-color transparency */
-       if (!gdGetInt (&im->transparent, in))
diff --git a/libwmf-0.2.8.4-useafterfree.patch b/libwmf-0.2.8.4-useafterfree.patch
deleted file mode 100644
index 328c541..0000000
--- a/libwmf-0.2.8.4-useafterfree.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list	2009-04-24 04:06:44.000000000 -0400
-+++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c	2009-04-24 04:08:30.000000000 -0400
-@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
- 	{	more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
- 		if (more == 0) return;
- 		im->clip->max += 8;
-+                im->clip->list = more;
- 	}
- 	im->clip->list[im->clip->count] = (*rect);
- 	im->clip->count++;
diff --git a/libwmf-ah.patch b/libwmf-ah.patch
new file mode 100644
index 0000000..3d58e94
--- /dev/null
+++ b/libwmf-ah.patch
@@ -0,0 +1,18 @@
+--- libwmf-0.2.12/configure.ac.orig	2019-02-01 18:51:32.000000000 +0100
++++ libwmf-0.2.12/configure.ac	2019-04-24 22:01:22.848914667 +0200
+@@ -143,6 +143,15 @@
+ #end libtool stuff
+ 
+ dnl Checks for header files.
++AH_TEMPLATE([HAVE_EXPAT], [Define if you have expat.])
++AH_TEMPLATE([HAVE_GD], [Define if you have libgd])
++AH_TEMPLATE([HAVE_LIBJPEG], [Define if you have libjpeg.])
++AH_TEMPLATE([HAVE_LIBPLOT], [Define if you have GNU plotutils (libplot) >= 2.4.0.])
++AH_TEMPLATE([HAVE_LIBPNG], [Define if you have libpng.])
++AH_TEMPLATE([HAVE_LIBXML2], [Define if you have libxml2.])
++AH_TEMPLATE([WITHOUT_LAYERS], [defining this will disable egs, fig, svg & foreign layers])
++AH_TEMPLATE([snprintf], [Define to _snprintf if necessary])
++AH_TEMPLATE([vsnprintf], [Define to _vsnprintf if necessary])
+ AC_HEADER_STDC
+ AC_CHECK_HEADERS(time.h)
+ AC_CHECK_HEADER(unistd.h,[
diff --git a/libwmf-fontmap-pld.patch b/libwmf-fontmap-pld.patch
index 7dc9e9c..f1d00cd 100644
--- a/libwmf-fontmap-pld.patch
+++ b/libwmf-fontmap-pld.patch
@@ -1,5 +1,5 @@
---- libwmf-0.2.1/fonts/libwmf-fontmap.in.orig	Sat May 19 14:12:06 2001
-+++ libwmf-0.2.1/fonts/libwmf-fontmap.in	Mon Jun 11 13:24:44 2001
+--- libwmf-0.2.12/fonts/libwmf-fontmap.in.orig	2019-02-01 18:51:32.000000000 +0100
++++ libwmf-0.2.12/fonts/libwmf-fontmap.in	2019-04-24 17:01:09.676500394 +0200
 @@ -33,9 +33,9 @@
  fi
  
@@ -12,31 +12,32 @@
  fi
  
  if test $echo_help = yes; then
-@@ -64,9 +64,9 @@
- 		font_cwd=`pwd`;
- 		echo scanning $i;
+@@ -64,10 +64,10 @@
+ 		font_cwd=$(pwd)
+ 		echo scanning "$i"
  
--		for j in `ls *.afm 2> /dev/null`; do
--			font_root=`echo $j | sed s/.afm//`
+-		for j in *.afm; do
++		for j in *.afm afm/*.afm ; do
+ 			[ -e "$j" ] || continue
+-			font_root=$(echo "$j" | sed s/.afm//)
 -			font_metrics=$font_cwd/$font_root.afm
-+		for j in `ls *.afm afm/*.afm 2> /dev/null`; do
-+			font_root=`echo $j | sed -e 's at .*/@@' -e 's@\.afm@@'`
++			font_root=$(basename "$j" .afm)
 +			font_metrics=$font_cwd/$j
  			font_glyphs=
- 			if test -r $font_cwd/$font_root.pfa; then
- 				font_glyphs=$font_cwd/$font_root.pfa
-@@ -75,10 +75,10 @@
+ 			if test -r "$font_cwd/$font_root.pfa"; then
+ 				font_glyphs="$font_cwd/$font_root.pfa"
+@@ -78,10 +78,10 @@
  			fi
  			if test "x$font_glyphs" != "x"; then
- 				echo font: $font_root
--				FontName=`grep "FontName " $font_metrics | sed "s/FontName //"`
--				FullName=`grep "FullName " $font_metrics | sed "s/FullName //"`
--				FamilyName=`grep "FamilyName " $font_metrics | sed "s/FamilyName //"`
--				Weight=`grep "Weight " $font_metrics | sed "s/Weight //"`
-+				FontName=`grep "FontName " $font_metrics | sed "s/FontName //" | tr -d '\r'`
-+				FullName=`grep "FullName " $font_metrics | sed "s/FullName //" | tr -d '\r'`
-+				FamilyName=`grep "FamilyName " $font_metrics | sed "s/FamilyName //" | tr -d '\r'`
-+				Weight=`grep "Weight " $font_metrics | sed "s/Weight //" | tr -d '\r'`
- 				cd $font_pwd
- 				echo '<font format="type1" metrics="'$font_metrics'" glyphs="'$font_glyphs'" name="'$FontName'" fullname="'$FullName'" familyname="'$FamilyName'" weight="'$Weight'" version="0.1" alias="'$FontName'"/>' >> $font_map
- 				cd $font_cwd
+ 				echo font: "$font_root"
+-				FontName=$(grep "FontName " "$font_metrics" | sed "s/FontName //")
+-				FullName=$(grep "FullName " "$font_metrics" | sed "s/FullName //")
+-				FamilyName=$(grep "FamilyName " "$font_metrics" | sed "s/FamilyName //")
+-				Weight=$(grep "Weight " "$font_metrics" | sed "s/Weight //")
++				FontName=$(grep "FontName " "$font_metrics" | sed "s/FontName //" | tr -d '\r')
++				FullName=$(grep "FullName " "$font_metrics" | sed "s/FullName //" | tr -d '\r')
++				FamilyName=$(grep "FamilyName " "$font_metrics" | sed "s/FamilyName //" | tr -d '\r')
++				Weight=$(grep "Weight " "$font_metrics" | sed "s/Weight //" | tr -d '\r')
+ 				cd "$font_pwd" || continue
+ 				echo '<font format="type1" metrics="'"$font_metrics"'" glyphs="'"$font_glyphs"'" name="'"$FontName"'" fullname="'"$FullName"'" familyname="'"$FamilyName"'" weight="'"$Weight"'" version="0.1" alias="'"$FontName"'"/>' >> $font_map
+ 				cd "$font_cwd" || continue
diff --git a/libwmf-pixbufloaderdir.patch b/libwmf-pixbufloaderdir.patch
deleted file mode 100644
index 5699a4c..0000000
--- a/libwmf-pixbufloaderdir.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -up libwmf-0.2.8.4/configure.in.pixbufloaderdir libwmf-0.2.8.4/configure.in
---- libwmf-0.2.8.4/configure.ac.pixbufloaderdir	2010-06-28 23:35:06.227167269 -0400
-+++ libwmf-0.2.8.4/configure.ac	2010-06-28 23:36:00.948420306 -0400
-@@ -741,8 +741,8 @@
- 
- if test $LIBWMF_BUILDSTYLE != lite; then
- 	PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[
--		GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
--		GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
-+		GDK_PIXBUF_VERSION=`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`
-+		GDK_PIXBUF_DIR="gdk-pixbuf-2.0/$GDK_PIXBUF_VERSION/loaders"
- 		wmf_gdk_pixbuf=yes
- 	],[	wmf_gdk_pixbuf=no
- 	])
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libwmf.git/commitdiff/d62a6f3bdc3ccb105d2f4da7daa63f00b0d1cf65



More information about the pld-cvs-commit mailing list