imlib: various fixes
This commit is contained in:
parent
c84cc324bb
commit
affe0f2fe8
|
@ -1,2 +1,7 @@
|
|||
53b35c928f5d0d1f002595735c6b9b14 imlib-1.9.15.patch
|
||||
e2bad3670e0e3175c140befe992c578f gtk-1-for-imlib.m4.bz2
|
||||
be3a409ee49e0e7bd4d8dc3cb0d151e4 imlib-1.9.15-asneeded.patch
|
||||
7b62bbedef5db2774812923bd55f17f9 imlib-1.9.15-bpp16-CVE-2007-3568.patch
|
||||
89b692ce386215e37cfca86788fd2ea1 imlib-1.9.15-configure.patch
|
||||
5212233a3d01640fbf4feb57a6918e6e imlib-1.9.15-fix-rendering.patch
|
||||
53b35c928f5d0d1f002595735c6b9b14 imlib-1.9.15-security.patch
|
||||
7db987e6c52e4daf70d7d0f471238eae imlib-1.9.15.tar.bz2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Description: An image loading and rendering library for X11R6.
|
||||
# Description: An image loading and rendering library.
|
||||
# URL: http://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/
|
||||
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
||||
# Packager: Daniel Mueller, daniel at danm dot de
|
||||
|
@ -6,19 +6,31 @@
|
|||
|
||||
name=imlib
|
||||
version=1.9.15
|
||||
release=1
|
||||
release=2
|
||||
source=(http://ftp.gnome.org/pub/GNOME/sources/imlib/${version%.*}/imlib-$version.tar.bz2
|
||||
imlib-$version.patch)
|
||||
imlib-1.9.15-configure.patch
|
||||
imlib-1.9.15-security.patch
|
||||
imlib-1.9.15-bpp16-CVE-2007-3568.patch
|
||||
imlib-1.9.15-fix-rendering.patch
|
||||
imlib-1.9.15-asneeded.patch
|
||||
gtk-1-for-imlib.m4.bz2)
|
||||
|
||||
build() {
|
||||
cd imlib-$version
|
||||
|
||||
# Security patch
|
||||
patch -p 1 -i $SRC/imlib-$version.patch
|
||||
patch -p 1 -i $SRC/imlib-1.9.15-configure.patch
|
||||
patch -p 1 -i $SRC/imlib-1.9.15-security.patch
|
||||
patch -p 1 -i $SRC/imlib-1.9.15-bpp16-CVE-2007-3568.patch
|
||||
patch -p 1 -i $SRC/imlib-1.9.15-fix-rendering.patch
|
||||
patch -p 1 -i $SRC/imlib-1.9.15-asneeded.patch
|
||||
|
||||
mkdir m4
|
||||
bzcat $SRC/gtk-1-for-imlib.m4.bz2 > m4/gtk-1-for-imlib.m4
|
||||
autoreconf -i
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-modules
|
||||
--mandir=/usr/man
|
||||
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
|
BIN
imlib/gtk-1-for-imlib.m4.bz2
Normal file
BIN
imlib/gtk-1-for-imlib.m4.bz2
Normal file
Binary file not shown.
38
imlib/imlib-1.9.15-asneeded.patch
Normal file
38
imlib/imlib-1.9.15-asneeded.patch
Normal file
|
@ -0,0 +1,38 @@
|
|||
This code is broken with the newer libtool. Just dropping it is more or less
|
||||
safe as in any case if libtool does not supports shared libraries it'll issue
|
||||
an error...
|
||||
|
||||
Adding include is necessary for gcc-4.3.
|
||||
|
||||
--- imlib-1.9.15.orig/configure.in 2008-07-16 09:18:35 +0000
|
||||
+++ imlib-1.9.15/configure.in 2008-07-16 09:18:43 +0000
|
||||
@@ -61,6 +61,7 @@
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
+#include <stdlib.h>
|
||||
main ()
|
||||
{
|
||||
if (g_module_supported ())
|
||||
@@ -74,21 +74,6 @@
|
||||
CFLAGS="$oCFLAGS"
|
||||
fi
|
||||
|
||||
-dnl Now we check to see if our libtool supports shared lib deps
|
||||
-dnl (in a rather ugly way even)
|
||||
-builddir=`pwd`
|
||||
-if $dynworks; then
|
||||
- imlib_libtool_config="$builddir/libtool --config"
|
||||
- imlib_deplibs_check=`$imlib_libtool_config | \
|
||||
- grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
|
||||
- sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
|
||||
- if test "x$imlib_deplibs_check" = "xnone" || \
|
||||
- test "x$imlib_deplibs_check" = "xunknown" || \
|
||||
- test "x$imlib_deplibs_check" = "x"; then
|
||||
- dynworks=false
|
||||
- fi
|
||||
-fi
|
||||
-
|
||||
if $dynworks; then
|
||||
AC_DEFINE(USE_GMODULE, 1, [ ])
|
||||
GMODULE_LIBS="`glib-config --libs gmodule`"
|
11
imlib/imlib-1.9.15-bpp16-CVE-2007-3568.patch
Normal file
11
imlib/imlib-1.9.15-bpp16-CVE-2007-3568.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- imlib-1.9.15.orig/Imlib/load.c 2007-08-13 23:06:20.000000000 -0300
|
||||
+++ imlib-1.9.15/Imlib/load.c 2007-08-13 23:06:51.000000000 -0300
|
||||
@@ -645,7 +645,7 @@
|
||||
planes = (int)word;
|
||||
fread(&word, 2, 1, file);
|
||||
bpp = (int)word;
|
||||
- if (bpp != 1 && bpp != 4 && bpp != 8 && bpp && 16 && bpp != 24 && bpp != 32)
|
||||
+ if (bpp != 1 && bpp != 4 && bpp != 8 && bpp != 16 && bpp != 24 && bpp != 32)
|
||||
{
|
||||
fprintf(stderr, "IMLIB ERROR: unknown bitdepth in file\n");
|
||||
return NULL;
|
87
imlib/imlib-1.9.15-configure.patch
Normal file
87
imlib/imlib-1.9.15-configure.patch
Normal file
|
@ -0,0 +1,87 @@
|
|||
diff -pruN imlib-1.9.15.orig/configure.in imlib-1.9.15/configure.in
|
||||
--- imlib-1.9.15.orig/configure.in 2008-10-23 21:34:03.904349217 +1100
|
||||
+++ imlib-1.9.15/configure.in 2008-10-23 21:35:56.881224111 +1100
|
||||
@@ -5,6 +5,7 @@ AC_INIT(gdk_imlib/gdk_imlib.h)
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AM_INIT_AUTOMAKE(imlib, 1.9.15)
|
||||
AC_PROG_CC
|
||||
@@ -17,11 +18,26 @@ dnl Give the user an option to compile w
|
||||
dnl incase it is broken for example.
|
||||
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]], echo $enable_shm, enable_shm="yes")
|
||||
|
||||
+AC_ARG_ENABLE(gdk, [ --enable-gdk enable gdk_imlib compilation [default=yes]],[
|
||||
+ if test x$enableval = xyes; then
|
||||
+ disable_gdk="no"
|
||||
+ else
|
||||
+ disable_gdk="yes"
|
||||
+ fi],disable_gdk=no)
|
||||
+
|
||||
+if test x$disable_gdk = xno; then
|
||||
+ AC_MSG_RESULT(no)
|
||||
+
|
||||
AM_PATH_GTK(1.2.1,[
|
||||
GDK_IMLIB="gdk_imlib utils"],[
|
||||
GDK_IMLIB=""
|
||||
AC_MSG_WARN([*** gdk_imlib will not be built ***])])
|
||||
|
||||
+else
|
||||
+ AC_MSG_RESULT(yes)
|
||||
+ GDK_IMLIB=""
|
||||
+fi
|
||||
+
|
||||
AC_MSG_CHECKING(whether to build gmodulized imlib)
|
||||
|
||||
AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
|
||||
diff -pruN imlib-1.9.15.orig/imlib-config.in imlib-1.9.15/imlib-config.in
|
||||
--- imlib-1.9.15.orig/imlib-config.in 2008-10-23 21:34:03.904349217 +1100
|
||||
+++ imlib-1.9.15/imlib-config.in 2008-10-23 21:34:28.226349920 +1100
|
||||
@@ -46,15 +46,9 @@ while test $# -gt 0; do
|
||||
echo @VERSION@
|
||||
;;
|
||||
--cflags)
|
||||
- if test @includedir@ != /usr/include ; then
|
||||
- includes=-I@includedir@
|
||||
- fi
|
||||
echo $includes @X_CFLAGS@
|
||||
;;
|
||||
--cflags-gdk)
|
||||
- if test @includedir@ != /usr/include ; then
|
||||
- includes=-I@includedir@
|
||||
- fi
|
||||
echo `@GTK_CONFIG@ --cflags` $includes @X_CFLAGS@
|
||||
;;
|
||||
--libs)
|
||||
diff -pruN imlib-1.9.15.orig/imlib.m4 imlib-1.9.15/imlib.m4
|
||||
--- imlib-1.9.15.orig/imlib.m4 2008-10-23 21:34:03.901349273 +1100
|
||||
+++ imlib-1.9.15/imlib.m4 2008-10-23 21:34:28.227349890 +1100
|
||||
@@ -6,7 +6,7 @@
|
||||
dnl AM_PATH_IMLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for IMLIB, and define IMLIB_CFLAGS and IMLIB_LIBS
|
||||
dnl
|
||||
-AC_DEFUN(AM_PATH_IMLIB,
|
||||
+AC_DEFUN([AM_PATH_IMLIB],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the imlib-config script
|
||||
dnl
|
||||
@@ -164,7 +164,7 @@ int main ()
|
||||
])
|
||||
|
||||
# Check for gdk-imlib
|
||||
-AC_DEFUN(AM_PATH_GDK_IMLIB,
|
||||
+AC_DEFUN([AM_PATH_GDK_IMLIB],
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the imlib-config script
|
||||
dnl
|
||||
diff -pruN imlib-1.9.15.orig/Makefile.am imlib-1.9.15/Makefile.am
|
||||
--- imlib-1.9.15.orig/Makefile.am 2008-10-23 21:34:03.901349273 +1100
|
||||
+++ imlib-1.9.15/Makefile.am 2008-10-23 21:38:28.168099386 +1100
|
||||
@@ -1,3 +1,5 @@
|
||||
+ACLOCAL_AMFLAGS= -I m4
|
||||
+
|
||||
SUBDIRS = @GDK_IMLIB@ Imlib config doc
|
||||
bin_SCRIPTS = imlib-config
|
||||
|
105
imlib/imlib-1.9.15-fix-rendering.patch
Normal file
105
imlib/imlib-1.9.15-fix-rendering.patch
Normal file
|
@ -0,0 +1,105 @@
|
|||
Michel Dänzer <daenzer AT debian.org>
|
||||
|
||||
* The boolean value returned via the last parameter to XShmQueryVersion()
|
||||
isn't honoured everywhere.
|
||||
* The init functions that take parameters allow the caller to enable shared
|
||||
pixmaps when they aren't supported (or disabled by configuration files).
|
||||
|
||||
|
||||
These result in incorrect rendering when the MIT-SHM extension doesn't support
|
||||
shared pixmaps, e.g. using EXA with current versions of Xorg.
|
||||
|
||||
http://bugs.gentoo.org/show_bug.cgi?id=197489
|
||||
|
||||
diff -up -ru imlib-1.9.15.orig/gdk_imlib/misc.c imlib-1.9.15/gdk_imlib/misc.c
|
||||
--- imlib-1.9.15.orig/gdk_imlib/misc.c 2002-03-04 18:06:32.000000000 +0100
|
||||
+++ imlib-1.9.15/gdk_imlib/misc.c 2007-10-28 14:00:04.000000000 +0100
|
||||
@@ -674,6 +674,10 @@ gdk_imlib_init_params(GdkImlibInitParams
|
||||
visual = gdk_rgb_get_visual();
|
||||
id->x.visual = GDK_VISUAL_XVISUAL(visual); /* the visual type */
|
||||
id->x.depth = visual->depth; /* the depth of the screen in bpp */
|
||||
+
|
||||
+ id->x.shm = 0;
|
||||
+ id->x.shmp = 0;
|
||||
+ id->max_shm = 0;
|
||||
#ifdef HAVE_SHM
|
||||
if (XShmQueryExtension(id->x.disp))
|
||||
{
|
||||
@@ -689,17 +693,14 @@ gdk_imlib_init_params(GdkImlibInitParams
|
||||
id->x.last_xim = NULL;
|
||||
id->x.last_sxim = NULL;
|
||||
id->max_shm = 0x7fffffff;
|
||||
- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
|
||||
+ if ((XShmPixmapFormat(id->x.disp) == ZPixmap) &&
|
||||
+ (pm == True))
|
||||
id->x.shmp = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
- else
|
||||
#endif
|
||||
- {
|
||||
- id->x.shm = 0;
|
||||
- id->x.shmp = 0;
|
||||
- }
|
||||
+
|
||||
id->cache.on_image = 0;
|
||||
id->cache.size_image = 0;
|
||||
id->cache.num_image = 0;
|
||||
@@ -935,8 +936,8 @@ gdk_imlib_init_params(GdkImlibInitParams
|
||||
}
|
||||
if (p->flags & PARAMS_SHAREDPIXMAPS)
|
||||
{
|
||||
- if (id->x.shm)
|
||||
- id->x.shmp = p->sharedpixmaps;
|
||||
+ if (!p->sharedpixmaps)
|
||||
+ id->x.shmp = 0;
|
||||
}
|
||||
if (p->flags & PARAMS_PALETTEOVERRIDE)
|
||||
override = p->paletteoverride;
|
||||
diff -up -ru imlib-1.9.15.orig/Imlib/misc.c imlib-1.9.15/Imlib/misc.c
|
||||
--- imlib-1.9.15.orig/Imlib/misc.c 2004-09-21 02:22:59.000000000 +0200
|
||||
+++ imlib-1.9.15/Imlib/misc.c 2007-10-28 14:00:23.000000000 +0100
|
||||
@@ -675,6 +675,10 @@ Imlib_init_with_params(Display * disp, I
|
||||
id->x.root = DefaultRootWindow(disp); /* the root window id */
|
||||
id->x.visual = DefaultVisual(disp, id->x.screen); /* the visual type */
|
||||
id->x.depth = DefaultDepth(disp, id->x.screen); /* the depth of the screen in bpp */
|
||||
+
|
||||
+ id->x.shm = 0;
|
||||
+ id->x.shmp = 0;
|
||||
+ id->max_shm = 0;
|
||||
#ifdef HAVE_SHM
|
||||
if (XShmQueryExtension(id->x.disp))
|
||||
{
|
||||
@@ -690,17 +694,14 @@ Imlib_init_with_params(Display * disp, I
|
||||
id->x.last_xim = NULL;
|
||||
id->x.last_sxim = NULL;
|
||||
id->max_shm = 0x7fffffff;
|
||||
- if (XShmPixmapFormat(id->x.disp) == ZPixmap)
|
||||
+ if ((XShmPixmapFormat(id->x.disp) == ZPixmap &&
|
||||
+ (pm == True)))
|
||||
id->x.shmp = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
- else
|
||||
#endif
|
||||
- {
|
||||
- id->x.shm = 0;
|
||||
- id->x.shmp = 0;
|
||||
- }
|
||||
+
|
||||
id->cache.on_image = 0;
|
||||
id->cache.size_image = 0;
|
||||
id->cache.num_image = 0;
|
||||
@@ -952,8 +953,8 @@ Imlib_init_with_params(Display * disp, I
|
||||
}
|
||||
if (p->flags & PARAMS_SHAREDPIXMAPS)
|
||||
{
|
||||
- if (id->x.shm)
|
||||
- id->x.shmp = p->sharedpixmaps;
|
||||
+ if (!p->sharedpixmaps)
|
||||
+ id->x.shmp = 0;
|
||||
}
|
||||
if (p->flags & PARAMS_PALETTEOVERRIDE)
|
||||
override = p->paletteoverride;
|
Loading…
Reference in New Issue
Block a user