media-libs/libwmf: drop 0.2.8.4-r9

Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
This commit is contained in:
Petr Vaněk
2024-09-13 17:19:48 +02:00
parent 486be0f000
commit f7f966286b
9 changed files with 0 additions and 457 deletions
-1
View File
@@ -1,2 +1 @@
DIST libwmf-0.2.13.tar.gz 3044235 BLAKE2B 0cfbc94d6e7d52c5ecf09b277cf536f56ec54d3b53845e80afdfe4aa3b397562bffd198fb51726d210f21e3e9e16650f85e9188f4e5303b5c4c8b917ef882040 SHA512 f45a936c9bc98fc1a5f2b0808b497119e4dcd3c132615fdddb7583e5719c7d1d7f85c16ebf313cad453e5b7ae3508bf6b80c4ed2b42322b7dec295d8f4eb86ce
DIST libwmf-0.2.8.4.tar.gz 2169375 BLAKE2B d86de4483201a07639779e024752d5c00a3dbc7399be353879b828850b74612651bbcf1851f322d62352259b73647038790580a9a4aeb43b7aeb4c1affedcabe SHA512 d98df8e76a52245487b13e5ab3d2fbba9d246f97ee04a7344c0e5861bb2d0f990fc6d662dbd849ce621768b06eaebd4270fb34bec4ee004334a98b14ba6044a5
@@ -1,118 +0,0 @@
--- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:24.591876404 +0100
+++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:35.345993247 +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;
}
/*
@@ -1143,8 +1157,18 @@
}
}
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. */
+ {
+ 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");
+ API->err = wmf_E_BadFormat;
+ }
}
if (ERR (API))
--- libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:24.590876393 +0100
+++ libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:35.345993247 +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,56 +0,0 @@
--- libwmf-0.2.8.4/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,23 +0,0 @@
--- libwmf-0.2.8.4/src/player/meta.h
+++ libwmf-0.2.8.4/src/player/meta.h
@@ -2585,6 +2585,8 @@
polyrect.BR[i] = clip->rects[i].BR;
}
+ 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,25 +0,0 @@
diff -urN libwmf-0.2.8.4.old/configure.ac libwmf-0.2.8.4/configure.ac
--- libwmf-0.2.8.4.old/configure.ac 2011-07-01 22:37:57.000000000 +0200
+++ libwmf-0.2.8.4/configure.ac 2011-07-01 22:41:38.000000000 +0200
@@ -744,8 +744,7 @@
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_DIR=`$PKG_CONFIG --variable=gdk_pixbuf_moduledir gdk-pixbuf-2.0`
wmf_gdk_pixbuf=yes
],[ wmf_gdk_pixbuf=no
])
diff -urN libwmf-0.2.8.4.old/src/Makefile.am libwmf-0.2.8.4/src/Makefile.am
--- libwmf-0.2.8.4.old/src/Makefile.am 2011-07-01 22:37:57.000000000 +0200
+++ libwmf-0.2.8.4/src/Makefile.am 2011-07-01 22:40:41.000000000 +0200
@@ -63,7 +63,7 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) -export-dynamic
-loaderdir = $(libdir)/$(GDK_PIXBUF_DIR)
+loaderdir = $(GDK_PIXBUF_DIR)
loader_LTLIBRARIES = $(GDK_PIXBUF_PLUGIN)
@@ -1,27 +0,0 @@
--- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000
+++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100
@@ -42,6 +42,7 @@
#include "player/defaults.h" /* Provides: default settings */
#include "player/record.h" /* Provides: parameter mechanism */
#include "player/meta.h" /* Provides: record interpreters */
+#include <stdint.h>
/**
* @internal
@@ -132,8 +134,14 @@
}
}
-/* 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));
+ if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
+ {
+ API->err = wmf_E_InsMem;
+ WMF_DEBUG (API,"bailing...");
+ return (API->err);
+ }
+
+ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
if (ERR (API))
{ WMF_DEBUG (API,"bailing...");
@@ -1,67 +0,0 @@
From 61655f82224cadb261e81f8bae111eaaa7bdf531 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Wed, 6 Aug 2014 14:53:03 +0200
Subject: [PATCH] configure: use pkg-config for freetype
Upstream-status: Pending
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
configure.ac | 37 ++++++++-----------------------------
1 file changed, 8 insertions(+), 29 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3cfe974..0055a8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,40 +399,19 @@ AC_ARG_WITH(freetype,[ --with-freetype=DIR use freetype2 in DIR],[
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 * * *])
])
--
1.9.0
@@ -1,39 +0,0 @@
diff -urN libwmf-0.2.8.4.old/fonts/Makefile.am libwmf-0.2.8.4/fonts/Makefile.am
--- libwmf-0.2.8.4.old/fonts/Makefile.am 2011-07-01 22:37:57.000000000 +0200
+++ libwmf-0.2.8.4/fonts/Makefile.am 2011-07-01 22:38:37.000000000 +0200
@@ -1,35 +1,3 @@
fontdir = @WMF_FONTDIR@
bin_SCRIPTS = libwmf-fontmap
-
-FONTS = \
- n019003l.afm \
- n019003l.pfb \
- n019004l.afm \
- n019004l.pfb \
- n019023l.afm \
- n019023l.pfb \
- n019024l.afm \
- n019024l.pfb \
- n021003l.afm \
- n021003l.pfb \
- n021004l.afm \
- n021004l.pfb \
- n021023l.afm \
- n021023l.pfb \
- n021024l.afm \
- n021024l.pfb \
- n022003l.afm \
- n022003l.pfb \
- n022004l.afm \
- n022004l.pfb \
- n022023l.afm \
- n022023l.pfb \
- n022024l.afm \
- n022024l.pfb \
- s050000l.afm \
- s050000l.pfb
-
-font_DATA = $(FONTS) fontmap
-
-EXTRA_DIST = libwmf-fontmap.in LICENSE $(FONTS)
-101
View File
@@ -1,101 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools gnome2-utils
DESCRIPTION="A library for reading vector images in Microsoft's Windows Metafile Format (WMF)"
HOMEPAGE="http://wvware.sourceforge.net/"
SRC_URI="https://downloads.sourceforge.net/project/wvware/${PN}/${PV}/${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
LICENSE="LGPL-2"
SLOT="0"
IUSE="debug doc expat X"
RDEPEND="app-text/ghostscript-gpl
media-fonts/urw-fonts
media-libs/freetype:2=
media-libs/libpng:0=
sys-libs/zlib:=
x11-libs/gdk-pixbuf:2
virtual/jpeg:0=
expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2:2= )
X? ( x11-libs/libX11
x11-libs/libXt
x11-libs/libXpm )"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
DOCS=( "AUTHORS" "BUILDING" "ChangeLog" "CREDITS" "INSTALL" "NEWS" "README" "TODO" )
PATCHES=(
"${FILESDIR}"/${P}-build.patch
"${FILESDIR}"/${P}-CVE-2015-0848+CVE-2015-4588.patch
"${FILESDIR}"/${P}-CVE-2015-4695.patch
"${FILESDIR}"/${P}-CVE-2015-4696.patch
"${FILESDIR}"/${P}-gdk-pixbuf.patch
"${FILESDIR}"/${P}-intoverflow.patch
"${FILESDIR}"/${P}-libpng-1.5.patch
"${FILESDIR}"/${P}-pngfix.patch
"${FILESDIR}"/${P}-use-freetype2-pkg-config.patch
"${FILESDIR}"/${P}-use-system-fonts.patch
)
src_prepare() {
default
# Fixes QA warning "This package has a configure.in file which has long been deprecated"
# Since there is already a configure.ac, we don't need the deprecated configure.in
rm configure.in || die
if ! use doc ; then
sed -i -e 's:doc::' Makefile.am || die
fi
eautoreconf
}
src_configure() {
# Support for GD is disabled, since it's never linked, even, when enabled
# See https://bugs.gentoo.org/268161
local myeconfargs=(
--disable-gd
--disable-static
$(use_enable debug)
$(use_with expat)
$(use_with !expat libxml2)
$(use_with X x)
--with-docdir="${EPREFIX}"/usr/share/doc/${PF}
--with-fontdir="${EPREFIX}"/usr/share/fonts/urw-fonts
--with-freetype
--with-gsfontdir="${EPREFIX}"/usr/share/fonts/urw-fonts
--with-gsfontmap="${EPREFIX}"/usr/share/ghostscript/9.21/Resource/Init/Fontmap
--with-jpeg
--with-layers
--with-png
--with-sys-gd
--with-zlib
)
econf "${myeconfargs[@]}"
}
src_install() {
# address parallel build issue, bug 677566
MAKEOPTS=-j1
default
find "${D}" -name '*.la' -delete || die
}
pkg_postinst() {
gnome2_gdk_pixbuf_update
}
pkg_postrm() {
gnome2_gdk_pixbuf_update
}