forked from pool/libwmf
Accepting request 891512 from home:dirkmueller:Factory
- update to 0.2.12: * upstream changed to fork from Fedora: https://github.com/caolanm/libwmf * fix abi * merge in fixes for libgd CVE-2019-6978 * release with coverity, clang and shellcheck fixes * Seeing as wvware.sourceforge.net seems to be dead, but libwmf is still in use and has had a bunch of security bugs reported against, and I've a history with libwmf, I'll call this libwmf 0.2.9 and merge in my (Red Hat) fixes. - drop libwmf-0.2.8.4-ia64.patch, libwmf-0.2.8.4-config.patch: obsolete - drop libwmf-0.2.8.4-overflow-CVE-2006-3376.patch: upstream viab9cc022c8d- drop libwmf-0.2.8.4-CVE-2015-0848.patch: part of879d6bffa6- drop libwmf-0.2.8.4-badrle.patch: part of879d6bffa6- drop libwmf-0.2.8.4-CVE-2015-4696.patch: upstream viaf47cbdf968- drop libwmf-0.2.8.4-CVE-2015-4695.patch: upstream viab5ae5d1f3b- drop reproducible.patch: differently done upstream - drop use-pkg-config-for-freetype.patch: obsolete OBS-URL: https://build.opensuse.org/request/show/891512 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libwmf?expand=0&rev=52
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
--- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-02 11:35:04.072201795 +0100
|
||||
+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-02 11:35:20.647406414 +0100
|
||||
@@ -1145,8 +1143,15 @@
|
||||
}
|
||||
}
|
||||
else
|
||||
- { /* Convert run-length encoded raster pixels. */
|
||||
- DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
|
||||
+ {
|
||||
+ if (bmp_info.bits_per_pixel == 8) /* Convert run-length encoded raster pixels. */
|
||||
+ {
|
||||
+ DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
|
||||
+ }
|
||||
+ else
|
||||
+ { WMF_ERROR (API,"Unexpected pixel depth");
|
||||
+ API->err = wmf_E_BadFormat;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (ERR (API))
|
||||
@@ -1,58 +0,0 @@
|
||||
Index: libwmf-0.2.8.4/src/player/meta.h
|
||||
===================================================================
|
||||
--- libwmf-0.2.8.4.orig/src/player/meta.h
|
||||
+++ libwmf-0.2.8.4/src/player/meta.h
|
||||
@@ -1565,7 +1565,7 @@ static int meta_rgn_create (wmfAPI* API,
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -2142,7 +2142,7 @@ static int meta_dib_brush (wmfAPI* API,w
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -3067,7 +3067,7 @@ static int meta_pen_create (wmfAPI* API,
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -3181,7 +3181,7 @@ static int meta_brush_create (wmfAPI* AP
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -3288,7 +3288,7 @@ static int meta_font_create (wmfAPI* API
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -3396,7 +3396,7 @@ static int meta_palette_create (wmfAPI*
|
||||
objects = P->objects;
|
||||
|
||||
i = 0;
|
||||
- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
|
||||
+ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
|
||||
|
||||
if (i == NUM_OBJECTS (API))
|
||||
{ WMF_ERROR (API,"Object out of range!");
|
||||
@@ -1,20 +0,0 @@
|
||||
--- libwmf-0.2.8.4/src/player/meta.h
|
||||
+++ libwmf-0.2.8.4/src/player/meta.h
|
||||
|
||||
+ if (FR->region_clip) FR->region_clip (API,&polyrect);
|
||||
+
|
||||
wmf_free (API,polyrect.TL);
|
||||
wmf_free (API,polyrect.BR);
|
||||
}
|
||||
@@ -2593,9 +2595,10 @@
|
||||
polyrect.BR = 0;
|
||||
|
||||
polyrect.count = 0;
|
||||
+
|
||||
+ if (FR->region_clip) FR->region_clip (API,&polyrect);
|
||||
}
|
||||
|
||||
- if (FR->region_clip) FR->region_clip (API,&polyrect);
|
||||
|
||||
return (changed);
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
diff -ru libwmf-0.2.8.4/src/ipa/ipa/bmp.h libwmf-0.2.8.4/src/ipa/ipa/bmp.h
|
||||
--- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-03 09:30:59.410501271 +0100
|
||||
+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-03 09:31:05.775572630 +0100
|
||||
@@ -859,7 +859,7 @@
|
||||
%
|
||||
%
|
||||
*/
|
||||
-static void DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
|
||||
+static int DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
|
||||
{ int byte;
|
||||
int count;
|
||||
int i;
|
||||
@@ -870,12 +870,14 @@
|
||||
U32 u;
|
||||
|
||||
unsigned char* q;
|
||||
+ unsigned char* end;
|
||||
|
||||
for (u = 0; u < ((U32) bmp->width * (U32) bmp->height); u++) pixels[u] = 0;
|
||||
|
||||
byte = 0;
|
||||
x = 0;
|
||||
q = pixels;
|
||||
+ end = pixels + bmp->width * bmp->height;
|
||||
|
||||
for (y = 0; y < bmp->height; )
|
||||
{ count = ReadBlobByte (src);
|
||||
@@ -884,7 +886,10 @@
|
||||
{ /* Encoded mode. */
|
||||
byte = ReadBlobByte (src);
|
||||
for (i = 0; i < count; i++)
|
||||
- { if (compression == 1)
|
||||
+ {
|
||||
+ if (q == end)
|
||||
+ return 0;
|
||||
+ if (compression == 1)
|
||||
{ (*(q++)) = (unsigned char) byte;
|
||||
}
|
||||
else
|
||||
@@ -896,13 +901,15 @@
|
||||
else
|
||||
{ /* Escape mode. */
|
||||
count = ReadBlobByte (src);
|
||||
- if (count == 0x01) return;
|
||||
+ if (count == 0x01) return 1;
|
||||
switch (count)
|
||||
{
|
||||
case 0x00:
|
||||
{ /* End of line. */
|
||||
x = 0;
|
||||
y++;
|
||||
+ if (y >= bmp->height)
|
||||
+ return 0;
|
||||
q = pixels + y * bmp->width;
|
||||
break;
|
||||
}
|
||||
@@ -910,13 +917,20 @@
|
||||
{ /* Delta mode. */
|
||||
x += ReadBlobByte (src);
|
||||
y += ReadBlobByte (src);
|
||||
+ if (y >= bmp->height)
|
||||
+ return 0;
|
||||
+ if (x >= bmp->width)
|
||||
+ return 0;
|
||||
q = pixels + y * bmp->width + x;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{ /* Absolute mode. */
|
||||
for (i = 0; i < count; i++)
|
||||
- { if (compression == 1)
|
||||
+ {
|
||||
+ if (q == end)
|
||||
+ return 0;
|
||||
+ if (compression == 1)
|
||||
{ (*(q++)) = ReadBlobByte (src);
|
||||
}
|
||||
else
|
||||
@@ -943,7 +957,7 @@
|
||||
byte = ReadBlobByte (src); /* end of line */
|
||||
byte = ReadBlobByte (src);
|
||||
|
||||
- return;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1146,7 +1160,10 @@
|
||||
{
|
||||
if (bmp_info.bits_per_pixel == 8) /* Convert run-length encoded raster pixels. */
|
||||
{
|
||||
- DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
|
||||
+ if (!DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image))
|
||||
+ { WMF_ERROR (API,"corrupt bmp");
|
||||
+ API->err = wmf_E_BadFormat;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{ WMF_ERROR (API,"Unexpected pixel depth");
|
||||
diff -ru libwmf-0.2.8.4/src/ipa/ipa.h libwmf-0.2.8.4/src/ipa/ipa.h
|
||||
--- libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-03 09:30:59.410501271 +0100
|
||||
+++ libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-03 09:31:08.687605277 +0100
|
||||
@@ -48,7 +48,7 @@
|
||||
static unsigned short ReadBlobLSBShort (BMPSource*);
|
||||
static unsigned long ReadBlobLSBLong (BMPSource*);
|
||||
static long TellBlob (BMPSource*);
|
||||
-static void DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
|
||||
+static int DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
|
||||
static void ReadBMPImage (wmfAPI*,wmfBMP*,BMPSource*);
|
||||
static int ExtractColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned int,unsigned int);
|
||||
static void SetColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned char,unsigned int,unsigned int);
|
||||
@@ -1,10 +1,12 @@
|
||||
--- src/extra/gd/gd_clip.c
|
||||
Index: src/extra/gd/gd_clip.c
|
||||
===================================================================
|
||||
--- src/extra/gd/gd_clip.c.orig
|
||||
+++ src/extra/gd/gd_clip.c
|
||||
@@ -69,6 +69,7 @@
|
||||
@@ -69,6 +69,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
|
||||
if (im->clip->count == im->clip->max)
|
||||
{ more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
|
||||
if (more == 0) return;
|
||||
+ im->clip->list = more;
|
||||
im->clip->max += 8;
|
||||
im->clip->list = more;
|
||||
}
|
||||
im->clip->list[im->clip->count] = (*rect);
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
Index: libwmf-config.in
|
||||
===================================================================
|
||||
--- libwmf-config.in.orig
|
||||
+++ libwmf-config.in
|
||||
@@ -105,7 +105,7 @@ esac
|
||||
|
||||
libwmf_buildstyle=@LIBWMF_BUILDSTYLE@
|
||||
if test $libwmf_buildstyle = heavy; then
|
||||
- wmf_libs="-lwmf -lwmflite $wmf_liblflags"
|
||||
+ wmf_libs="-lwmf -lwmflite -lX11 -lfreetype -lz"
|
||||
else
|
||||
wmf_libs="-lwmflite"
|
||||
fi
|
||||
@@ -115,14 +115,14 @@ if test "$echo_cflags" = "yes"; then
|
||||
if test "$lib_gd" = "yes"; then
|
||||
includes="$includes -I@includedir@/libwmf/gd"
|
||||
fi
|
||||
- if test "$lib_wmf" = "yes"; then
|
||||
+ if test "$lib_wmf" = "yes" && test "${prefix}" != "/usr/include" ; then
|
||||
includes="$includes -I@includedir@"
|
||||
fi
|
||||
echo $includes
|
||||
fi
|
||||
|
||||
if test "$echo_libs" = "yes"; then
|
||||
- libdirs=-L@libdir@
|
||||
+ test "@libdir@" != "/usr/lib" && libdirs=-L@libdir@
|
||||
my_wmf_libs=
|
||||
for i in $wmf_libs ; do
|
||||
if test "x$i" != "x-L@libdir@" ; then
|
||||
@@ -1,6 +1,8 @@
|
||||
--- src/api.c
|
||||
Index: src/api.c
|
||||
===================================================================
|
||||
--- src/api.c.orig
|
||||
+++ src/api.c
|
||||
@@ -156,6 +156,12 @@
|
||||
@@ -156,6 +156,12 @@ wmf_error_t wmf_lite_create (wmfAPI** AP
|
||||
}
|
||||
|
||||
API->write_data = 0;
|
||||
@@ -13,10 +15,11 @@
|
||||
|
||||
API->MetaHeader.pmh = &(API->PlaceableMetaHeader);
|
||||
API->MetaHeader.wmfheader = &(API->Head);
|
||||
|
||||
--- src/extra/gd/gd.c
|
||||
Index: src/extra/gd/gd.c
|
||||
===================================================================
|
||||
--- src/extra/gd/gd.c.orig
|
||||
+++ src/extra/gd/gd.c
|
||||
@@ -784,6 +784,7 @@
|
||||
@@ -810,6 +810,7 @@ gdImageTileApply (gdImagePtr im, int x,
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -24,27 +27,15 @@
|
||||
/* Allow for transparency */
|
||||
if (p != gdImageGetTransparent (im->tile))
|
||||
{
|
||||
|
||||
--- src/extra/gd/gd.h
|
||||
Index: src/extra/gd/gd.h
|
||||
===================================================================
|
||||
--- src/extra/gd/gd.h.orig
|
||||
+++ src/extra/gd/gd.h
|
||||
@@ -21,6 +21,7 @@
|
||||
* documentation. */
|
||||
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
@@ -22,6 +22,7 @@ extern "C" {
|
||||
|
||||
/* stdio is needed for file I/O. */
|
||||
#include <stdio.h>
|
||||
|
||||
--- src/player/record.h
|
||||
+++ src/player/record.h
|
||||
@@ -96,6 +96,7 @@
|
||||
new_record.function = record->function;
|
||||
new_record.size = 0;
|
||||
new_record.parameter = 0;
|
||||
+ new_record.position = 0;
|
||||
+#include <string.h>
|
||||
#include <gd_io.h>
|
||||
#include <gd_clip.h>
|
||||
|
||||
if (index > record->size)
|
||||
{ WMF_ERROR (API,"Bad record - unexpectedly short!");
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
Index: src/extra/gd/gd.h
|
||||
===================================================================
|
||||
--- src/extra/gd/gd.h.orig 2002-12-05 21:09:11.000000000 +0100
|
||||
+++ src/extra/gd/gd.h 2009-12-21 19:28:54.000000000 +0100
|
||||
@@ -20,6 +20,8 @@ extern "C" {
|
||||
* fitness for a particular purpose, with respect to this code and accompanying
|
||||
* documentation. */
|
||||
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
/* stdio is needed for file I/O. */
|
||||
#include <stdio.h>
|
||||
#include <gd_io.h>
|
||||
@@ -1,16 +0,0 @@
|
||||
--- src/player.c
|
||||
+++ src/player.c
|
||||
@@ -132,6 +132,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (MAX_REC_SIZE(API) * 2 / 2 != MAX_REC_SIZE(API))
|
||||
+ {
|
||||
+ WMF_ERROR (API,"wmf_scan: max_rec_size too big!");
|
||||
+ API->err = wmf_E_BadFormat;
|
||||
+ return (API->err);
|
||||
+ }
|
||||
+
|
||||
/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
|
||||
*/ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5b345c69220545d003ad52bfd035d5d6f4f075e65204114a9e875e84895a7cf8
|
||||
size 2169375
|
||||
@@ -1,3 +1,29 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 8 09:25:41 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- update to 0.2.12:
|
||||
* upstream changed to fork from Fedora: https://github.com/caolanm/libwmf
|
||||
* fix abi
|
||||
* merge in fixes for libgd CVE-2019-6978
|
||||
* release with coverity, clang and shellcheck fixes
|
||||
* Seeing as wvware.sourceforge.net seems to be dead, but libwmf is still in
|
||||
use and has had a bunch of security bugs reported against, and I've a
|
||||
history with libwmf, I'll call this libwmf 0.2.9 and merge in my (Red Hat)
|
||||
fixes.
|
||||
- drop libwmf-0.2.8.4-ia64.patch, libwmf-0.2.8.4-config.patch: obsolete
|
||||
- drop libwmf-0.2.8.4-overflow-CVE-2006-3376.patch: upstream via
|
||||
https://github.com/caolanm/libwmf/commit/b9cc022c8d7dd8c557e2dae5681c2d344237b4f9
|
||||
- drop libwmf-0.2.8.4-CVE-2015-0848.patch: part of
|
||||
https://github.com/caolanm/libwmf/commit/879d6bffa6dd21b8c0e9ec3b5aa31b6ae090ef83
|
||||
- drop libwmf-0.2.8.4-badrle.patch: part of
|
||||
https://github.com/caolanm/libwmf/commit/879d6bffa6dd21b8c0e9ec3b5aa31b6ae090ef83
|
||||
- drop libwmf-0.2.8.4-CVE-2015-4696.patch: upstream via
|
||||
https://github.com/caolanm/libwmf/commit/f47cbdf96838c2daa7b8e489f59e62371d33352a
|
||||
- drop libwmf-0.2.8.4-CVE-2015-4695.patch: upstream via
|
||||
https://github.com/caolanm/libwmf/commit/b5ae5d1f3bbddf051a5c9dd01897bd835817f013
|
||||
- drop reproducible.patch: differently done upstream
|
||||
- drop use-pkg-config-for-freetype.patch: obsolete
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 24 14:20:00 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>
|
||||
|
||||
|
||||
86
libwmf.spec
86
libwmf.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libwmf
|
||||
#
|
||||
# Copyright (c) 2018 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
|
||||
@@ -12,47 +12,36 @@
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%define lname libwmf-0_2-7
|
||||
Name: libwmf
|
||||
Version: 0.2.8.4
|
||||
Version: 0.2.12
|
||||
Release: 0
|
||||
Summary: Utilities for Displaying and Converting Metafile Images
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Productivity/Graphics/Other
|
||||
Url: http://wvWare.sourceforge.net/
|
||||
Source: http://downloads.sourceforge.net/project/wvware/%{name}/%{version}/%{name}-%{version}.tar.gz
|
||||
URL: https://github.com/caolanm/libwmf
|
||||
Source: https://github.com/caolanm/libwmf/archive/v%{version}.tar.gz
|
||||
Source2: baselibs.conf
|
||||
Patch0: libwmf-0.2.8.4-ia64.patch
|
||||
Patch1: libwmf-0.2.8.4-fix.patch
|
||||
Patch2: libwmf-0.2.8.4-config.patch
|
||||
Patch3: libwmf-0.2.8.4-overflow-CVE-2006-3376.patch
|
||||
Patch4: libwmf-0.2.8.4-gd_libpng.patch
|
||||
Patch5: libwmf-0.2.8.4-bnc495842.patch
|
||||
Patch6: libwmf-0.2.8.4-CVE-2015-0848.patch
|
||||
Patch7: libwmf-0.2.8.4-badrle.patch
|
||||
Patch8: libwmf-0.2.8.4-CVE-2015-4696.patch
|
||||
Patch9: libwmf-0.2.8.4-CVE-2015-4695.patch
|
||||
Patch10: reproducible.patch
|
||||
Patch11: use-pkg-config-for-freetype.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: gd-devel
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: update-desktop-files
|
||||
BuildRequires: xorg-x11-proto-devel
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
Provides: mswordvw:%{_bindir}/wmftopng
|
||||
Provides: wv:%{_bindir}/wmftopng
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
This library interprets metafile images and can either display them
|
||||
@@ -107,80 +96,47 @@ PNG, JPEG, PS, EPS, and more.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%autopatch -p0
|
||||
|
||||
%build
|
||||
# Patch11 modifies configure.ac
|
||||
autoreconf -fi
|
||||
%configure --disable-static --prefix=%{_prefix} $RPM_ARCH-suse-linux --enable-magick --libdir=%{_libdir}
|
||||
make %{?_smp_mflags}
|
||||
%configure \
|
||||
--disable-static \
|
||||
--enable-magick \
|
||||
$RPM_ARCH-suse-linux
|
||||
%make_build
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_includedir}/libwmf
|
||||
make DESTDIR=%{buildroot} \
|
||||
wmfdocdir=%{_defaultdocdir}/libwmf \
|
||||
wmfonedocdir=%{_defaultdocdir}/libwmf/caolan \
|
||||
install
|
||||
%make_install wmfdocdir=%{_defaultdocdir}/libwmf \
|
||||
wmfonedocdir=%{_defaultdocdir}/libwmf/caolan
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
cp AUTHORS COPYING CREDITS ChangeLog README TODO %{buildroot}/%{_defaultdocdir}/libwmf
|
||||
|
||||
%post -n %{lname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{lname} -p /sbin/ldconfig
|
||||
|
||||
%files tools
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%doc AUTHORS CREDITS README TODO
|
||||
%{_bindir}/libwmf-fontmap
|
||||
%{_bindir}/wmf2eps
|
||||
%{_bindir}/wmf2fig
|
||||
%{_bindir}/wmf2gd
|
||||
#/usr/bin/wmf2magick
|
||||
#/usr/bin/wmf2plot
|
||||
%{_bindir}/wmf2svg
|
||||
%{_bindir}/wmf2x
|
||||
#
|
||||
#
|
||||
%{_datadir}/libwmf
|
||||
#
|
||||
%dir %{_defaultdocdir}/libwmf
|
||||
%doc %{_defaultdocdir}/libwmf/AUTHORS
|
||||
%doc %{_defaultdocdir}/libwmf/COPYING
|
||||
%doc %{_defaultdocdir}/libwmf/CREDITS
|
||||
%doc %{_defaultdocdir}/libwmf/ChangeLog
|
||||
%doc %{_defaultdocdir}/libwmf/README
|
||||
%doc %{_defaultdocdir}/libwmf/TODO
|
||||
|
||||
%files -n %{lname}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libwmf*-0.2.so.7*
|
||||
|
||||
%files gnome
|
||||
%defattr(-,root,root)
|
||||
%dir %{_libdir}/gtk-*/*/loaders
|
||||
%{_libdir}/gtk-*/*/loaders/*.so
|
||||
%{_libdir}/gdk-pixbuf-*/*/loaders/*.so
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%doc doc/caolan
|
||||
%doc doc/html
|
||||
%doc doc/*.{html,png,gif}
|
||||
%{_bindir}/libwmf-config
|
||||
%{_includedir}/libwmf
|
||||
%{_libdir}/libwmf*.so
|
||||
%dir %{_libdir}/gtk-*/*/loaders
|
||||
#
|
||||
%doc %{_defaultdocdir}/libwmf/*.html
|
||||
%doc %{_defaultdocdir}/libwmf/*.png
|
||||
%doc %{_defaultdocdir}/libwmf/*.gif
|
||||
%doc %{_defaultdocdir}/libwmf/caolan
|
||||
%doc %{_defaultdocdir}/libwmf/html
|
||||
%{_libdir}/pkgconfig/libwmf.pc
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From: Bernhard M. Wiedemann <bwiedemann suse.de>
|
||||
Subject: sort .o file lists so libwmf.a is built reproducibly
|
||||
|
||||
Index: libwmf-0.2.8.4/ltmain.sh
|
||||
===================================================================
|
||||
--- libwmf-0.2.8.4.orig/ltmain.sh
|
||||
+++ libwmf-0.2.8.4/ltmain.sh
|
||||
@@ -3734,7 +3734,7 @@ EOF
|
||||
done
|
||||
fi
|
||||
|
||||
- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
|
||||
+ libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
|
||||
done
|
||||
fi
|
||||
fi
|
||||
@@ -4032,7 +4032,7 @@ EOF
|
||||
done
|
||||
fi
|
||||
|
||||
- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
|
||||
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
|
||||
done
|
||||
fi
|
||||
fi
|
||||
@@ -5048,7 +5048,7 @@ fi\
|
||||
done
|
||||
fi
|
||||
|
||||
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
|
||||
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | sort | $NL2SP`
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
Index: libwmf-0.2.8.4/configure.ac
|
||||
===================================================================
|
||||
--- libwmf-0.2.8.4.orig/configure.ac
|
||||
+++ libwmf-0.2.8.4/configure.ac
|
||||
@@ -399,40 +399,19 @@ AC_ARG_WITH(freetype,[ --with-freetype=
|
||||
fi
|
||||
])
|
||||
|
||||
-if [ test -n "$FREETYPE_DIR" ]; then
|
||||
- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config, ,[$FREETYPE_DIR/bin:$PATH])
|
||||
-else
|
||||
- AC_PATH_PROG(FREETYPE_CONFIG,freetype-config)
|
||||
-fi
|
||||
-
|
||||
-if [ test -n "$FREETYPE_CONFIG" ]; then
|
||||
- if [ test -n "$FREETYPE_DIR" ]; then
|
||||
- freetype_cflags="`$FREETYPE_CONFIG --cflags` -I$FREETYPE_DIR/include"
|
||||
- freetype_libs=`$FREETYPE_CONFIG --libs`
|
||||
- else
|
||||
- freetype_cflags=`$FREETYPE_CONFIG --cflags`
|
||||
- freetype_libs=`$FREETYPE_CONFIG --libs`
|
||||
- fi
|
||||
-else
|
||||
- if [ test -n "$FREETYPE_DIR" ]; then
|
||||
- freetype_cflags="-I$FREETYPE_DIR/include/freetype2 -I$FREETYPE_DIR/include"
|
||||
- freetype_libs="-L$FREETYPE_DIR/lib -lfreetype"
|
||||
- else
|
||||
- freetype_cflags=""
|
||||
- freetype_libs="-lfreetype"
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
-CPPFLAGS="$freetype_cflags $CPPFLAGS"
|
||||
-LDFLAGS="$LDFLAGS $freetype_libs"
|
||||
+PKG_CHECK_MODULES(FREETYPE2, freetype2,
|
||||
+ CFLAGS="$CFLAGS $FREETYPE2_CFLAGS"
|
||||
+ LDFLAGS="$LDFLAGS $FREETYPE2_LIBS",
|
||||
+ AC_MSG_ERROR([*** Unable to find FreeType2 library (http://www.freetype.org/)])
|
||||
+)
|
||||
|
||||
AC_CHECK_LIB(freetype,FT_Init_FreeType,[
|
||||
- WMF_FT_LDFLAGS="$freetype_libs"
|
||||
+ WMF_FT_LDFLAGS="$FREETYPE2_LIBS"
|
||||
],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
|
||||
])
|
||||
AC_CHECK_HEADER(ft2build.h,[
|
||||
- WMF_FT_CFLAGS="$freetype_cflags"
|
||||
- WMF_FT_CONFIG_CFLAGS="$freetype_cflags"
|
||||
+ WMF_FT_CFLAGS="$FREETYPE2_CFLAGS"
|
||||
+ WMF_FT_CONFIG_CFLAGS="$FREETYPE2_CFLAGS"
|
||||
],[ AC_MSG_ERROR([* * * freetype(2) is required * * *])
|
||||
])
|
||||
|
||||
3
v0.2.12.tar.gz
Normal file
3
v0.2.12.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:464ff63605d7eaf61a4a12dbd420f7a41a4d854675d8caf37729f5bc744820e2
|
||||
size 3043572
|
||||
Reference in New Issue
Block a user