Browse Source

Initial commit.

All the files needed to build the gsview.
master
Michael Uleysky 7 years ago
commit
31ad9feadc
  1. 3
      .gitignore
  2. 31
      app-text/gsview/files/4.9-gentoo.patch
  3. 12
      app-text/gsview/files/gsview-4.9-libdl.patch
  4. 23
      app-text/gsview/files/gsview-help
  5. 63
      app-text/gsview/gsview-4.9.ebuild
  6. 9
      app-text/gsview/metadata.xml
  7. 23
      dev-libs/glib/files/glib-1.2.10-automake-1.13.patch
  8. 29
      dev-libs/glib/files/glib-1.2.10-automake.patch
  9. 44
      dev-libs/glib/files/glib-1.2.10-configure-LANG.patch
  10. 41
      dev-libs/glib/files/glib-1.2.10-gcc34-fix.patch
  11. 16
      dev-libs/glib/files/glib-1.2.10-inline.patch
  12. 9
      dev-libs/glib/files/glib-1.2.10-m4.patch
  13. 81
      dev-libs/glib/glib-1.2.10-r7.ebuild
  14. 38
      media-libs/imlib/files/imlib-1.9.15-asneeded.patch
  15. 11
      media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch
  16. 105
      media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch
  17. 122
      media-libs/imlib/files/imlib-1.9.15-giflib51-1.patch
  18. 107
      media-libs/imlib/files/imlib-1.9.15-giflib51-2.patch
  19. 80
      media-libs/imlib/files/imlib-1.9.15-iogif.patch
  20. 142
      media-libs/imlib/files/imlib-1.9.15-libpng15.patch
  21. 16
      media-libs/imlib/files/imlib-1.9.15-no-LDFLAGS-in-pc.patch
  22. 10
      media-libs/imlib/files/imlib-1.9.15-underlinking-test.patch
  23. 70
      media-libs/imlib/files/imlib-1.9.15.patch
  24. 510
      media-libs/imlib/files/imlib-security.patch
  25. 73
      media-libs/imlib/imlib-1.9.15-r5.ebuild
  26. 2
      metadata/layout.conf
  27. 1
      profiles/repo_name
  28. 19
      x11-libs/gtk+/files/gtk+-1.2-locale_fix.patch
  29. 696
      x11-libs/gtk+/files/gtk+-1.2.10-as-needed.patch
  30. 16
      x11-libs/gtk+/files/gtk+-1.2.10-automake-1.13.patch
  31. 126
      x11-libs/gtk+/files/gtk+-1.2.10-automake.patch
  32. 13
      x11-libs/gtk+/files/gtk+-1.2.10-cleanup.patch
  33. 9
      x11-libs/gtk+/files/gtk+-1.2.10-m4.patch
  34. 37
      x11-libs/gtk+/files/gtkrc
  35. 103
      x11-libs/gtk+/gtk+-1.2.10-r13.ebuild
  36. 23
      x11-themes/gtk-engines/gtk-engines-0.12.ebuild

3
.gitignore vendored

@ -0,0 +1,3 @@
/profiles/use.local.desc
*/*/ChangeLog
*/*/Manifest

31
app-text/gsview/files/4.9-gentoo.patch

@ -0,0 +1,31 @@
diff --git a/srcunx/unx.mak b/srcunx/unx.mak
index 3bd1769..ee86618 100644
--- a/srcunx/unx.mak
+++ b/srcunx/unx.mak
@@ -39,7 +39,7 @@ GSVIEW_DOCPATH=$(GSVIEW_BASE)/share/doc
GSVIEW_ETCPATH=$(prefix)/etc
MAKE=make
-CC=gcc
+CC ?= gcc
OBJ=o
INSTALL=install -m 644
INSTALL_EXE=install -m 755
@@ -77,7 +77,7 @@ PLINK=-lpthread -lrt
# Other possible options are -Wtraditional
# Compiler flags for C and C++ files.
-CFLAGS=-O -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -Wcast-qual -Wwrite-strings $(CDEBUG) -DX11 -DUNIX -DNONAG $(RPM_OPT_FLAGS) `gtk-config --cflags` $(XINCLUDE) $(PFLAGS)
+CFLAGS += $(CDEBUG) -DX11 -DUNIX -DNONAG $(RPM_OPT_FLAGS) `gtk-config --cflags` $(XINCLUDE) $(PFLAGS)
# Linker flags
LFLAGS=$(LDEBUG) $(PLINK) `gtk-config --libs`
@@ -155,7 +155,7 @@ all: $(BD)gsview$(EXE) html
GSVIEW_DOCDIR=$(GSVIEW_DOCPATH)/gsview-$(GSVIEW_DOT_VERSION)
$(BD)gsview$(EXE): $(OBJS)
- $(COMP) $(CFLAGS) $(FO)$(BD)gsview$(EXE) $(OBJS) $(LFLAGS)
+ $(COMP) $(CFLAGS) $(LDFLAGS) $(FO)$(BD)gsview$(EXE) $(OBJS) $(LFLAGS)
install: all
-mkdir -p $(GSVIEW_BASE)

12
app-text/gsview/files/gsview-4.9-libdl.patch

@ -0,0 +1,12 @@
diff -ruN gsview-4.9.orig/srcunx/unx.mak gsview-4.9/srcunx/unx.mak
--- gsview-4.9.orig/srcunx/unx.mak 2004-11-27 16:51:26.000000000 +0100
+++ gsview-4.9/srcunx/unx.mak 2012-01-31 00:36:50.000000000 +0100
@@ -80,7 +80,7 @@
CFLAGS=-O -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -Wcast-qual -Wwrite-strings $(CDEBUG) -DX11 -DUNIX -DNONAG $(RPM_OPT_FLAGS) `gtk-config --cflags` $(XINCLUDE) $(PFLAGS)
# Linker flags
-LFLAGS=$(LDEBUG) $(PLINK) `gtk-config --libs`
+LFLAGS=$(LDEBUG) $(PLINK) `gtk-config --libs` -ldl
COMP=$(CC) $(CFLAGS) -I. -I$(SRCDIR) -I$(SRCUNXDIR) -I$(OBJDIR)
CCAUX=$(CC) $(CFLAGS) -I$(SRCDIR)

23
app-text/gsview/files/gsview-help

@ -0,0 +1,23 @@
#!/bin/sh
if [ -z "$1" ]
then
echo "Usage: $0 URL [TAG]"
echo " URL: The URL to open"
echo " TAG: The anchor at that url"
exit 1
fi
if [ -z "$2" ]
then
TAG=''
else
TAG="#$2"
fi
if firefox -remote openFile\(file://$1$TAG\) ; then
exit 0
else
firefox file://$1$TAG
fi
exit 0

63
app-text/gsview/gsview-4.9.ebuild

@ -0,0 +1,63 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 2016-2017 Michael Uleysky
# Distributed under the terms of the GNU General Public License v2
EAPI="3"
inherit eutils toolchain-funcs
MY_PV="${PV/.}"
DESCRIPTION="gsView PostScript and PDF viewer"
HOMEPAGE="http://www.cs.wisc.edu/~ghost/gsview/"
SRC_URI="ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/gsview-${PV}.tar.gz ftp://ftp.dvo.ru/pub/Gentoo/distfiles/gsview-${PV}.tar.gz"
IUSE="doc epstool pstotext"
SLOT="0"
LICENSE="Aladdin"
KEYWORDS="amd64 hppa ppc x86 ~amd64-linux ~x86-linux"
RDEPEND="x11-libs/gtk+:1
epstool? ( app-text/epstool )
pstotext? ( app-text/pstotext )
app-text/ghostscript-gpl"
DEPEND="app-arch/unzip
x11-libs/gtk+:1"
src_prepare() {
epatch "${FILESDIR}"/${PV}-gentoo.patch
epatch "${FILESDIR}"/${P}-libdl.patch
tc-export CC
}
src_compile() {
ln -sf srcunx/unx.mak Makefile || die
## respect CFLAGS
sed -i -e "s:^CFLAGS=-O :CFLAGS=${CFLAGS} :g" Makefile || die
sed -i -e "s:GSVIEW_DOCPATH:\"${EPREFIX}/usr/share/doc/${PF}/html/\":" srcunx/gvx.c || die
## run Makefile
# bug #283165
emake -j1 || die "Error compiling files."
}
src_install() {
dobin bin/gsview || die
doman srcunx/gsview.1 || die
dodoc gsview.css cdorder.txt regorder.txt || die
if use doc
then
dobin "${FILESDIR}"/gsview-help || die
dohtml *.htm bin/*.htm || die
fi
insinto /etc/gsview
doins src/printer.ini || die
make_desktop_entry gsview Gsview "" "Office" ||
die "Couldn't make gsview desktop entry"
}

9
app-text/gsview/metadata.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>printing</herd>
<use>
<flag name="epstool">Install app-text/epstool for creating and extracting preview images from EPS files</flag>
<flag name="pstotext">Install app-text/pstotext for extractig text from postscript files</flag>
</use>
</pkgmetadata>

23
dev-libs/glib/files/glib-1.2.10-automake-1.13.patch

@ -0,0 +1,23 @@
Replace macros deprecated in automake-1.13; fixed upstream in glib-2.36
diff --git a/configure.in b/configure.in
index e94cc77..d88d834 100644
--- a/configure.in
+++ b/configure.in
@@ -60,7 +60,7 @@ PACKAGE=glib
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
# Specify a configuration file
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
AC_DEFINE_UNQUOTED(GLIB_MAJOR_VERSION, $GLIB_MAJOR_VERSION)
AC_DEFINE_UNQUOTED(GLIB_MINOR_VERSION, $GLIB_MINOR_VERSION)
@@ -151,7 +151,6 @@ AC_DEFINE_UNQUOTED(G_COMPILED_WITH_DEBUGGING, "${enable_debug}")
# Checks for programs.
AC_PROG_CC
-AM_PROG_CC_STDC
AC_PROG_INSTALL
changequote(,)dnl

29
dev-libs/glib/files/glib-1.2.10-automake.patch

@ -0,0 +1,29 @@
fix errors with newer automake:
gmodule/Makefile.am:44: testgmodule_LDFLAGS must be set with `=' before using `+='
Makefile.am:73: BUILT_SOURCES multiply defined in condition TRUE ...
Makefile.am:11: ... `BUILT_SOURCES' previously defined here
--- Makefile.am
+++ Makefile.am
@@ -70,7 +70,7 @@
CONFIGURE_DEPENDENCIES = acglib.m4
-BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
+BUILT_SOURCES += stamp-gc-h #note: not glibconfig.h
glibconfig.h: stamp-gc-h
@:
stamp-gc-h: config.status
--- gmodule/Makefile.am
+++ gmodule/Makefile.am
@@ -41,7 +41,7 @@
libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ $(libglib)
noinst_PROGRAMS = testgmodule
-testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
+testgmodule_LDFLAGS = @G_MODULE_LDFLAGS@
testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
.PHONY: files release

44
dev-libs/glib/files/glib-1.2.10-configure-LANG.patch

@ -0,0 +1,44 @@
The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
option parsing, it may break.
http://bugs.gentoo.org/133679
--- configure
+++ configure
@@ -54,6 +54,19 @@
infodir='${prefix}/info'
mandir='${prefix}/man'
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ unset $as_var
+ fi
+done
+
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
@@ -452,16 +463,6 @@
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
-
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.

41
dev-libs/glib/files/glib-1.2.10-gcc34-fix.patch

@ -0,0 +1,41 @@
--- glib-1.2.10/gstrfuncs.c.orig 2001-02-27 07:00:22.000000000 +0100
+++ glib-1.2.10/gstrfuncs.c 2004-03-01 13:19:49.531603760 +0100
@@ -867,7 +867,7 @@
/* beware of positional parameters
*/
case '$':
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle positional parameters (%%n$)");
len += 1024; /* try adding some safety padding */
break;
@@ -1034,7 +1034,7 @@
/* n . dddddddddddddddddddddddd E +- eeee */
conv_len += 1 + 1 + MAX (24, spec.precision) + 1 + 1 + 4;
if (spec.mod_extra_long)
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle long double, collecting double only");
#ifdef HAVE_LONG_DOUBLE
#error need to implement special handling for long double
@@ -1077,7 +1077,7 @@
conv_done = TRUE;
if (spec.mod_long)
{
- g_warning (G_GNUC_PRETTY_FUNCTION
+ g_warning ("%s%s", G_GNUC_PRETTY_FUNCTION,
"(): unable to handle wide char strings");
len += 1024; /* try adding some safety padding */
}
@@ -1108,9 +1108,8 @@
conv_len += format - spec_start;
break;
default:
- g_warning (G_GNUC_PRETTY_FUNCTION
- "(): unable to handle `%c' while parsing format",
- c);
+ g_warning ("%s(): unable to handle `%c' while parsing format",
+ G_GNUC_PRETTY_FUNCTION, c);
break;
}
conv_done |= conv_len > 0;

16
dev-libs/glib/files/glib-1.2.10-inline.patch

@ -0,0 +1,16 @@
diff -urNd glib_old-1.2.10/glib.h glib_old-1.2.10-michael/glib.h
--- glib_old-1.2.10/glib.h 2001-02-27 13:44:38.000000000 +1000
+++ glib_old-1.2.10-michael/glib.h 2011-03-12 00:56:12.825106280 +1000
@@ -204,7 +204,11 @@
#ifndef G_INLINE_FUNC
# ifdef __GNUC__
# ifdef __OPTIMIZE__
-# define G_INLINE_FUNC extern inline
+# if __GNUC_PREREQ (4,2) && defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+# define G_INLINE_FUNC extern inline __attribute__ ((__gnu_inline__))
+# else
+# define G_INLINE_FUNC extern inline
+# endif
# else
# undef G_CAN_INLINE
# define G_INLINE_FUNC extern

9
dev-libs/glib/files/glib-1.2.10-m4.patch

@ -0,0 +1,9 @@
Fix aclocal warning:
/usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
--- glib-1.2.10/glib.m4
+++ glib-1.2.10/glib.m4
@@ -7,3 +7,3 @@
dnl
-AC_DEFUN(AM_PATH_GLIB,
+AC_DEFUN([AM_PATH_GLIB],
[dnl

81
dev-libs/glib/glib-1.2.10-r7.ebuild

@ -0,0 +1,81 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 2016-2017 Michael Uleysky
# Distributed under the terms of the GNU General Public License v2
EAPI=5
GNOME_TARBALL_SUFFIX="gz"
GNOME2_LA_PUNT="yes"
inherit autotools eutils gnome2 libtool flag-o-matic portability multilib-minimal
DESCRIPTION="The GLib library of C routines"
HOMEPAGE="http://www.gtk.org/"
SRC_URI="${SRC_URI}
mirror://gentoo/glib-1.2.10-r1-as-needed.patch.bz2
"
LICENSE="LGPL-2.1+"
SLOT="1"
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd"
IUSE="hardened static-libs"
DEPEND=""
RDEPEND=""
MULTILIB_CHOST_TOOLS=(/usr/bin/glib-config)
src_prepare() {
epatch "${FILESDIR}"/${P}-automake.patch
epatch "${FILESDIR}"/${P}-m4.patch
epatch "${FILESDIR}"/${P}-configure-LANG.patch #133679
# Allow glib to build with gcc-3.4.x #47047
epatch "${FILESDIR}"/${P}-gcc34-fix.patch
# Fix for -Wl,--as-needed (bug #133818)
epatch "${DISTDIR}"/glib-1.2.10-r1-as-needed.patch.bz2
# build failure with automake-1.13
epatch "${FILESDIR}/${P}-automake-1.13.patch"
# fix problem with inline functions
epatch "${FILESDIR}/${P}-inline.patch"
use ppc64 && use hardened && replace-flags -O[2-3] -O1
sed -i "/libglib_la_LDFLAGS/i libglib_la_LIBADD = $(dlopen_lib)" Makefile.am || die
rm -f acinclude.m4 #168198
mv configure.in configure.ac || die
eautoreconf
elibtoolize
gnome2_src_prepare
}
multilib_src_configure() {
# Bug 48839: pam fails to build on ia64
# The problem is that it attempts to link a shared object against
# libglib.a; this library needs to be built with -fPIC. Since
# this package doesn't contain any significant binaries, build the
# whole thing with -fPIC (23 Apr 2004 agriffis)
append-flags -fPIC
append-cflags -std=gnu89
ECONF_SOURCE="${S}" \
gnome2_src_configure \
--with-threads=posix \
--enable-debug=yes \
$(use_enable static-libs static)
}
multilib_src_install() {
gnome2_src_install
chmod 755 "${ED}"/usr/$(get_libdir)/libgmodule-1.2.so.* || die
}
multilib_src_install_all() {
einstalldocs
dohtml -r docs
}

38
media-libs/imlib/files/imlib-1.9.15-asneeded.patch

@ -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.
--- a/configure.in 2008-07-16 09:18:35 +0000
+++ b/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
media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch

@ -0,0 +1,11 @@
--- a/Imlib/load.c.orig 2007-08-13 23:06:20.000000000 -0300
+++ b/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;

105
media-libs/imlib/files/imlib-1.9.15-fix-rendering.patch

@ -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;

122
media-libs/imlib/files/imlib-1.9.15-giflib51-1.patch

@ -0,0 +1,122 @@
diff -Nru imlib-1.9.15.old/gdk_imlib/io-gif.c imlib-1.9.15/gdk_imlib/io-gif.c
--- imlib-1.9.15.old/gdk_imlib/io-gif.c 2014-05-28 13:54:48.860293627 +0100
+++ imlib-1.9.15/gdk_imlib/io-gif.c 2014-05-28 13:58:29.992185729 +0100
@@ -1,8 +1,10 @@
#include <config.h>
#include "gdk_imlib.h"
#include "gdk_imlib_private.h"
+#include <gifutil.h>
#ifndef HAVE_LIBGIF
+/*------------------------*/
unsigned char loader_gif (FILE *f, int *w, int *h, int *t)
{
return NULL;
@@ -43,14 +45,14 @@
{
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
{
- PrintGifError();
+ _PrintGifError(gif);
rec = TERMINATE_RECORD_TYPE;
}
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
{
if (DGifGetImageDesc(gif) == GIF_ERROR)
{
- PrintGifError();
+ _PrintGifError(gif);
rec = TERMINATE_RECORD_TYPE;
}
*w = gif->Image.Width;
diff -Nru imlib-1.9.15.old/gifutil.h imlib-1.9.15/gifutil.h
--- imlib-1.9.15.old/gifutil.h 1970-01-01 01:00:00.000000000 +0100
+++ imlib-1.9.15/gifutil.h 2014-05-28 13:57:45.019424755 +0100
@@ -0,0 +1,26 @@
+#ifndef __GIFUTIL_H__
+#define __GIFUTIL_H__
+
+static void
+_PrintGifError(GifFileType *gif)
+{
+ /* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */
+ /* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */
+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \
+ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
+ /* Static string actually, hence the const char* cast */
+
+#if GIFLIB_MAJOR >= 5
+ const char* gifliberr = (const char*) GifErrorString(gif->Error);
+#else
+ const char* gifliberr = (const char*) GifErrorString();
+#endif
+ if (gifliberr == NULL)
+ gifliberr = "Unknown error";
+ fprintf(stderr, "%s\n", gifliberr);
+#else
+ PrintGifError();
+#endif
+}
+
+#endif
diff -Nru imlib-1.9.15.old/Imlib/load.c imlib-1.9.15/Imlib/load.c
--- imlib-1.9.15.old/Imlib/load.c 2014-05-28 13:54:49.008295568 +0100
+++ imlib-1.9.15/Imlib/load.c 2014-05-28 14:00:21.321983945 +0100
@@ -3,6 +3,7 @@
#include "Imlib.h"
#include "Imlib_private.h"
#include <setjmp.h>
+#include <gifutil.h>
#define G_MAXINT ((int) 0x7fffffff)
@@ -431,6 +432,8 @@
#endif /* HAVE_LIBTIFF */
#ifdef HAVE_LIBGIF
+/*------------------------*/
+/*------------------------*/
unsigned char *
_LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t)
{
@@ -454,22 +457,38 @@
fd = fileno(f);
/* Apparently rewind(f) isn't sufficient */
lseek(fd, (long) 0, 0);
+
+#if GIFLIB_MAJOR >= 5
+ int errCode = 0;
+
+ gif = DGifOpenFileHandle(fd, &errCode);
+ if (!gif)
+ {
+ const char* gifliberr = (const char*) GifErrorString(errCode);
+ if (gifliberr == NULL)
+ gifliberr = "Unknown error";
+ fprintf(stderr, "%s\n", gifliberr);
+ return NULL;
+ }
+#else
gif = DGifOpenFileHandle(fd);
if (!gif)
return NULL;
+#endif
+
do
{
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
{
- PrintGifError();
+ _PrintGifError(gif);
rec = TERMINATE_RECORD_TYPE;
}
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
{
if (DGifGetImageDesc(gif) == GIF_ERROR)
{
- PrintGifError();
+ _PrintGifError(gif);
rec = TERMINATE_RECORD_TYPE;
}
*w = gif->Image.Width;

107
media-libs/imlib/files/imlib-1.9.15-giflib51-2.patch

@ -0,0 +1,107 @@
diff -Nru imlib-1.9.15.old/gifutil.h imlib-1.9.15/gifutil.h
--- imlib-1.9.15.old/gifutil.h 2015-02-03 00:53:09.742075193 +0000
+++ imlib-1.9.15/gifutil.h 2015-02-05 19:24:09.848783163 +0000
@@ -2,7 +2,7 @@
#define __GIFUTIL_H__
static void
-_PrintGifError(GifFileType *gif)
+_PrintGifError(int errorCode)
{
/* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */
/* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */
@@ -11,7 +11,7 @@
/* Static string actually, hence the const char* cast */
#if GIFLIB_MAJOR >= 5
- const char* gifliberr = (const char*) GifErrorString(gif->Error);
+ const char* gifliberr = (const char*) GifErrorString(errorCode);
#else
const char* gifliberr = (const char*) GifErrorString();
#endif
diff -Nru imlib-1.9.15.old/Imlib/load.c imlib-1.9.15/Imlib/load.c
--- imlib-1.9.15.old/Imlib/load.c 2015-02-03 00:53:09.742075193 +0000
+++ imlib-1.9.15/Imlib/load.c 2015-02-05 19:30:12.847147998 +0000
@@ -434,6 +434,19 @@
#ifdef HAVE_LIBGIF
/*------------------------*/
/*------------------------*/
+void
+_CloseGIF(GifFileType *gif)
+{
+#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+ int errCode = 0;
+
+ if (DGifCloseFile(gif, &errCode) != GIF_OK)
+ _PrintGifError(errCode);
+#else
+ DGifCloseFile(gif);
+#endif
+}
+
unsigned char *
_LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t)
{
@@ -464,10 +477,7 @@
gif = DGifOpenFileHandle(fd, &errCode);
if (!gif)
{
- const char* gifliberr = (const char*) GifErrorString(errCode);
- if (gifliberr == NULL)
- gifliberr = "Unknown error";
- fprintf(stderr, "%s\n", gifliberr);
+ _PrintGifError(errCode);
return NULL;
}
#else
@@ -481,14 +491,14 @@
{
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
{
- _PrintGifError(gif);
+ _PrintGifError(gif->Error);
rec = TERMINATE_RECORD_TYPE;
}
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
{
if (DGifGetImageDesc(gif) == GIF_ERROR)
{
- _PrintGifError(gif);
+ _PrintGifError(gif->Error);
rec = TERMINATE_RECORD_TYPE;
}
*w = gif->Image.Width;
@@ -500,13 +510,13 @@
rows = malloc(*h * sizeof(GifRowType *));
if (!rows)
{
- DGifCloseFile(gif);
+ _CloseGIF(gif);
return NULL;
}
data = _imlib_malloc_image(*w, *h);
if (!data)
{
- DGifCloseFile(gif);
+ _CloseGIF(gif);
free(rows);
return NULL;
}
@@ -517,7 +527,7 @@
rows[i] = malloc(*w * sizeof(GifPixelType));
if (!rows[i])
{
- DGifCloseFile(gif);
+ _CloseGIF(gif);
for (i = 0; i < *h; i++)
if (rows[i])
free(rows[i]);
@@ -606,7 +616,7 @@
}
}
}
- DGifCloseFile(gif);
+ _CloseGIF(gif);
for (i = 0; i < *h; i++)
free(rows[i]);
free(rows);

80
media-libs/imlib/files/imlib-1.9.15-iogif.patch

@ -0,0 +1,80 @@
diff -urNd imlib-1.9.15/gdk_imlib/io-gif.c imlib-1.9.15-iogif/gdk_imlib/io-gif.c
--- imlib-1.9.15/gdk_imlib/io-gif.c 2017-01-15 20:00:08.162667145 +1000
+++ imlib-1.9.15-iogif/gdk_imlib/io-gif.c 2017-01-15 19:57:07.000000000 +1000
@@ -1,7 +1,7 @@
#include <config.h>
#include "gdk_imlib.h"
#include "gdk_imlib_private.h"
-#include <gifutil.h>
+
#ifndef HAVE_LIBGIF
/*------------------------*/
@@ -11,6 +11,7 @@
}
#else
#include <gif_lib.h>
+#include <gifutil.h>
unsigned char *
loader_gif(FILE *f, int *w, int *h, int *t)
@@ -32,7 +33,7 @@
fd = fileno(f);
/* Apparently rewind(f) isn't sufficient */
lseek(fd, (long) 0, 0);
- gif = DGifOpenFileHandle(fd);
+ gif = DGifOpenFileHandle(fd,0);
transp = -1;
data = NULL;
@@ -45,14 +46,14 @@
{
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
{
- _PrintGifError(gif);
+ _PrintGifError(gif->Error);
rec = TERMINATE_RECORD_TYPE;
}
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
{
if (DGifGetImageDesc(gif) == GIF_ERROR)
{
- _PrintGifError(gif);
+ _PrintGifError(gif->Error);
rec = TERMINATE_RECORD_TYPE;
}
*w = gif->Image.Width;
@@ -64,13 +65,13 @@
rows = malloc(*h * sizeof(GifRowType *));
if (!rows)
{
- DGifCloseFile(gif);
+ DGifCloseFile(gif,0);
return NULL;
}
data = _gdk_malloc_image(*w, *h);
if (!data)
{
- DGifCloseFile(gif);
+ DGifCloseFile(gif,0);
free(rows);
return NULL;
}
@@ -81,7 +82,7 @@
rows[i] = malloc(*w * sizeof(GifPixelType));
if (!rows[i])
{
- DGifCloseFile(gif);
+ DGifCloseFile(gif,0);
for (i = 0; i < *h; i++)
if (rows[i])
free(rows[i]);
@@ -170,7 +171,7 @@
}
}
}
- DGifCloseFile(gif);
+ DGifCloseFile(gif,0);
for (i = 0; i < *h; i++)
free(rows[i]);
free(rows);

142
media-libs/imlib/files/imlib-1.9.15-libpng15.patch

@ -0,0 +1,142 @@
--- a/gdk_imlib/io-png.c
+++ b/gdk_imlib/io-png.c
@@ -40,13 +40,13 @@
return NULL;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
@@ -275,13 +275,13 @@
return NULL;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
@@ -301,6 +301,9 @@
/* Setup Translators */
if (color_type == PNG_COLOR_TYPE_PALETTE)
png_set_expand(png_ptr);
+ if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+ png_set_expand(png_ptr);
+
png_set_strip_16(png_ptr);
png_set_packing(png_ptr);
if (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))
@@ -440,13 +443,13 @@
return NULL;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
@@ -635,7 +638,7 @@
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
return 0;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
fclose(f);
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
--- a/Imlib/load.c
+++ b/Imlib/load.c
@@ -197,12 +197,12 @@
png_destroy_read_struct(&png_ptr, NULL, NULL);
return NULL;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
@@ -260,7 +260,8 @@
png_read_image(png_ptr, lines);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
ptr = data;
- if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ if (color_type == PNG_COLOR_TYPE_GRAY
+ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
for (y = 0; y < *h; y++)
{
@@ -285,6 +286,7 @@
}
}
}
+#if 0
else if (color_type == PNG_COLOR_TYPE_GRAY)
{
for (y = 0; y < *h; y++)
@@ -300,6 +302,7 @@
}
}
}
+#endif
else
{
for (y = 0; y < *h; y++)
--- a/Imlib/save.c
+++ b/Imlib/save.c
@@ -342,7 +342,7 @@
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
return 0;
}
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
fclose(f);
png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
--- a/Imlib/utils.c
+++ b/Imlib/utils.c
@@ -1981,14 +1981,13 @@
png_destroy_read_struct(&png_ptr, NULL, NULL);
return NULL;
}
-
- if (setjmp(png_ptr->jmpbuf))
+ if (setjmp(png_jmpbuf(png_ptr)))
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
}
- if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;

16
media-libs/imlib/files/imlib-1.9.15-no-LDFLAGS-in-pc.patch

@ -0,0 +1,16 @@
Detected by Gentoo QA check:
* QA Notice: pkg-config files with wrong LDFLAGS detected:
* /usr/lib32/pkgconfig/imlib.pc:Libs: -L${libdir} -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -lImlib -ljpeg -ltiff -lgif -lpng -lz -lm -lXext -lSM -lICE -lXext -lX11
* /usr/lib64/pkgconfig/imlib.pc:Libs: -L${libdir} -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -lImlib -ljpeg -ltiff -lgif -lpng -lz -lm -lXext -lSM -lICE -lXext -lX11
diff --git a/imlib.pc.in b/imlib.pc.in
index 0a6f276..dc1ef7d 100644
--- a/imlib.pc.in
+++ b/imlib.pc.in
@@ -9,5 +9,5 @@ Name: Imlib
Description: An image loading and rendering library for X11R6
Version: @VERSION@
Requires:
-Libs: -L${libdir} @LDFLAGS@ -lImlib @SUPPORT_LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
+Libs: -L${libdir} -lImlib @SUPPORT_LIBS@ @X_LIBS@ @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@
Cflags: -I${includedir} @X_CFLAGS@

10
media-libs/imlib/files/imlib-1.9.15-underlinking-test.patch

@ -0,0 +1,10 @@
https://bugs.gentoo.org/show_bug.cgi?id=367645
by Greg Turner
diff -urpN imlib-1.9.15.orig/Imlib/Makefile.am imlib-1.9.15/Imlib/Makefile.am
--- imlib-1.9.15.orig/Imlib/Makefile.am 2004-09-20 17:22:59.000000000 -0700
+++ imlib-1.9.15/Imlib/Makefile.am 2013-10-08 02:48:53.772197627 -0700
@@ -44,3 +44,3 @@ INCLUDES = -I. -I$(srcdir) -I.. -I$(srcd
check_PROGRAMS = t-load
-t_load_LDADD = libImlib.la
+t_load_LDADD = libImlib.la $(X_PRE_LIBS) $(X_LIBS) -lX11 $(X_EXTRA_LIBS)

70
media-libs/imlib/files/imlib-1.9.15.patch

@ -0,0 +1,70 @@
diff -ur imlib-1.9.15.orig/configure.in imlib-1.9.15/configure.in
--- imlib-1.9.15.orig/configure.in 2004-09-23 04:13:45.000000000 +0300
+++ imlib-1.9.15/configure.in 2007-02-05 23:43:18.000000000 +0200
@@ -17,11 +17,26 @@
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 -ur imlib-1.9.15.orig/imlib-config.in imlib-1.9.15/imlib-config.in
--- imlib-1.9.15.orig/imlib-config.in 2004-08-27 19:03:11.000000000 +0300
+++ imlib-1.9.15/imlib-config.in 2007-02-05 23:46:34.000000000 +0200
@@ -46,15 +46,9 @@
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 -ur imlib-1.9.15.orig/imlib.m4 imlib-1.9.15/imlib.m4
--- imlib-1.9.15.orig/imlib.m4 2004-08-27 19:03:11.000000000 +0300
+++ imlib-1.9.15/imlib.m4 2007-02-05 23:42:57.000000000 +0200
@@ -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 @@
])
# 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

510
media-libs/imlib/files/imlib-security.patch

@ -0,0 +1,510 @@
diff -urN imlib-1.9.13.orig/Imlib/load.c imlib-1.9.13/Imlib/load.c
--- imlib-1.9.13.orig/Imlib/load.c Wed Mar 13 19:06:29 2002
+++ imlib-1.9.13/Imlib/load.c Thu Sep 16 17:21:01 2004
@@ -4,6 +4,8 @@
#include "Imlib_private.h"
#include <setjmp.h>
+#define G_MAXINT ((int) 0x7fffffff)
+
/* Split the ID - damages input */
static char *
@@ -41,13 +43,17 @@
/*
* Make sure we don't wrap on our memory allocations
+ * we check G_MAXINT/4 because rend.c malloc's w * h * bpp
+ * + 3 is safety margin
*/
void * _imlib_malloc_image(unsigned int w, unsigned int h)
{
- if( w > 32767 || h > 32767)
- return NULL;
- return malloc(w * h * 3);
+ if (w <= 0 || w > 32767 ||
+ h <= 0 || h > 32767 ||
+ h >= (G_MAXINT/4 - 1) / w)
+ return NULL;
+ return malloc(w * h * 3 + 3);
}
#ifdef HAVE_LIBJPEG
@@ -360,7 +366,9 @@
npix = ww * hh;
*w = (int)ww;
*h = (int)hh;
- if(ww > 32767 || hh > 32767)
+ if (ww <= 0 || ww > 32767 ||
+ hh <= 0 || hh > 32767 ||
+ hh >= (G_MAXINT/sizeof(uint32)) / ww)
{
TIFFClose(tif);
return NULL;
@@ -463,7 +471,7 @@
}
*w = gif->Image.Width;
*h = gif->Image.Height;
- if (*h > 32767 || *w > 32767)
+ if (*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
{
return NULL;
}
@@ -965,7 +973,12 @@
comment = 0;
quote = 0;
context = 0;
+ memset(lookup, 0, sizeof(lookup));
+
line = malloc(lsz);
+ if (!line)
+ return NULL;
+
while (!done)
{
pc = c;
@@ -994,25 +1007,25 @@
{
/* Header */
sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
- if (ncolors > 32766)
+ if (ncolors <= 0 || ncolors > 32766)
{
fprintf(stderr, "IMLIB ERROR: XPM files wth colors > 32766 not supported\n");
free(line);
return NULL;
}
- if (cpp > 5)
+ if (cpp <= 0 || cpp > 5)
{
fprintf(stderr, "IMLIB ERROR: XPM files with characters per pixel > 5 not supported\n");
free(line);
return NULL;
}
- if (*w > 32767)
+ if (*w <= 0 || *w > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
free(line);
return NULL;
}
- if (*h > 32767)
+ if (*h <= 0 || *h > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
free(line);
@@ -1045,11 +1058,13 @@
{
int slen;
int hascolor, iscolor;
+ int space;
iscolor = 0;
hascolor = 0;
tok[0] = 0;
col[0] = 0;
+ space = sizeof(col) - 1;
s[0] = 0;
len = strlen(line);
strncpy(cmap[j].str, line, cpp);
@@ -1072,10 +1087,10 @@
{
if (k >= len)
{
- if (col[0])
- strcat(col, " ");
- if (strlen(col) + strlen(s) < sizeof(col))
- strcat(col, s);
+ if (col[0] && space > 0)
+ strcat(col, " "), space -= 1;
+ if (slen <= space)
+ strcat(col, s), space -= slen;
}
if (col[0])
{
@@ -1105,14 +1120,17 @@
}
}
}
- strcpy(tok, s);
+ if (slen < sizeof(tok));
+ strcpy(tok, s);
col[0] = 0;
+ space = sizeof(col) - 1;
}
else
{
- if (col[0])
- strcat(col, " ");
- strcat(col, s);
+ if (col[0] && space > 0)
+ strcat(col, " "), space -=1;
+ if (slen <= space)
+ strcat(col, s), space -= slen;
}
}
}
@@ -1341,12 +1359,12 @@
sscanf(s, "%i %i", w, h);
a = *w;
b = *h;
- if (a > 32767)
+ if (a <= 0 || a > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for file\n");
return NULL;
}
- if (b > 32767)
+ if (b <= 0 || b > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for file\n");
return NULL;
diff -urN imlib-1.9.13.orig/Imlib/utils.c imlib-1.9.13/Imlib/utils.c
--- imlib-1.9.13.orig/Imlib/utils.c Mon Mar 4 17:45:28 2002
+++ imlib-1.9.13/Imlib/utils.c Thu Sep 16 17:21:15 2004
@@ -1496,36 +1496,56 @@
context = 0;
ptr = NULL;
end = NULL;
+ memset(lookup, 0, sizeof(lookup));
while (!done)
{
line = data[count++];
+ if (!line)
+ break;
+ line = strdup(line);
+ if (!line)
+ break;
+ len = strlen(line);
+ for (i = 0; i < len; ++i)
+ {
+ c = line[i];
+ if (c < 32)
+ line[i] = 32;
+ else if (c > 127)
+ line[i] = 127;
+ }
+
if (context == 0)
{
/* Header */
sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
- if (ncolors > 32766)
+ if (ncolors <= 0 || ncolors > 32766)
{
fprintf(stderr, "IMLIB ERROR: XPM data wth colors > 32766 not supported\n");
free(im);
+ free(line);
return NULL;
}
- if (cpp > 5)
+ if (cpp <= 0 || cpp > 5)
{
fprintf(stderr, "IMLIB ERROR: XPM data with characters per pixel > 5 not supported\n");
free(im);
+ free(line);
return NULL;
}
- if (w > 32767)
+ if (w <= 0 || w > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image width > 32767 pixels for data\n");
free(im);
+ free(line);
return NULL;
}
- if (h > 32767)
+ if (h <= 0 || h > 32767)
{
fprintf(stderr, "IMLIB ERROR: Image height > 32767 pixels for data\n");
free(im);
+ free(line);
return NULL;
}
cmap = malloc(sizeof(struct _cmap) * ncolors);
@@ -1533,6 +1553,7 @@
if (!cmap)
{
free(im);
+ free(line);
return NULL;
}
im->rgb_width = w;
@@ -1542,6 +1563,7 @@
{
free(cmap);
free(im);
+ free(line);
return NULL;
}
im->alpha_data = NULL;
@@ -1817,6 +1839,7 @@
}
if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
done = 1;
+ free(line);
}
if (!transp)
{
diff -urN imlib-1.9.13.orig/gdk_imlib/io-gif.c imlib-1.9.13/gdk_imlib/io-gif.c
--- imlib-1.9.13.orig/gdk_imlib/io-gif.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/io-gif.c Thu Sep 16 16:11:31 2004
@@ -55,7 +55,7 @@
}
*w = gif->Image.Width;
*h = gif->Image.Height;
- if(*h > 32767 || *w > 32767)
+ if(*h <= 0 || *h > 32767 || *w <= 0 || *w > 32767)
{
return NULL;
}
diff -urN imlib-1.9.13.orig/gdk_imlib/io-ppm.c imlib-1.9.13/gdk_imlib/io-ppm.c
--- imlib-1.9.13.orig/gdk_imlib/io-ppm.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/io-ppm.c Thu Sep 16 16:13:13 2004
@@ -53,12 +53,12 @@
sscanf(s, "%i %i", w, h);
a = *w;
b = *h;
- if (a > 32767)
+ if (a <= 0 || a > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
return NULL;
}
- if (b > 32767)
+ if (b <= 0 || b > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
return NULL;
diff -urN imlib-1.9.13.orig/gdk_imlib/io-tiff.c imlib-1.9.13/gdk_imlib/io-tiff.c
--- imlib-1.9.13.orig/gdk_imlib/io-tiff.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/io-tiff.c Thu Sep 16 16:13:57 2004
@@ -36,7 +36,9 @@
npix = ww * hh;
*w = (int)ww;
*h = (int)hh;
- if(ww > 32767 || hh > 32767)
+ if (ww <= 0 || ww > 32767 ||
+ hh <= 0 || hh > 32767 ||
+ hh >= (G_MAXINT/sizeof(uint32)) / ww)
{
TIFFClose(tif);
return NULL;
diff -urN imlib-1.9.13.orig/gdk_imlib/io-xpm.c imlib-1.9.13/gdk_imlib/io-xpm.c
--- imlib-1.9.13.orig/gdk_imlib/io-xpm.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/io-xpm.c Thu Sep 16 17:08:24 2004
@@ -40,8 +40,12 @@
context = 0;
i = j = 0;
cmap = NULL;
+ memset(lookup, 0, sizeof(lookup));
line = malloc(lsz);
+ if (!line)
+ return NULL;
+
while (!done)
{
pc = c;
@@ -70,25 +74,25 @@
{
/* Header */
sscanf(line, "%i %i %i %i", w, h, &ncolors, &cpp);
- if (ncolors > 32766)
+ if (ncolors <= 0 || ncolors > 32766)
{
fprintf(stderr, "gdk_imlib ERROR: XPM files wth colors > 32766 not supported\n");
free(line);
return NULL;
}
- if (cpp > 5)
+ if (cpp <= 0 || cpp > 5)
{
fprintf(stderr, "gdk_imlib ERROR: XPM files with characters per pixel > 5 not supported\n");
free(line);
return NULL;
}
- if (*w > 32767)
+ if (*w <= 0 || *w > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for file\n");
free(line);
return NULL;
}
- if (*h > 32767)
+ if (*h <= 0 || *h > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for file\n");
free(line);
@@ -120,11 +124,13 @@
{
int slen;
int hascolor, iscolor;
+ int space;
hascolor = 0;
iscolor = 0;
tok[0] = 0;
col[0] = 0;
+ space = sizeof(col) - 1;
s[0] = 0;
len = strlen(line);
strncpy(cmap[j].str, line, cpp);
@@ -147,10 +153,10 @@
{
if (k >= len)
{
- if (col[0])
- strcat(col, " ");
- if (strlen(col) + strlen(s) < sizeof(col))
- strcat(col, s);
+ if (col[0] && space > 0)
+ strncat(col, " ", space), space -= 1;
+ if (slen <= space)
+ strcat(col, s), space -= slen;
}
if (col[0])
{
@@ -180,14 +186,17 @@
}
}
}
- strcpy(tok, s);
+ if (slen < sizeof(tok))
+ strcpy(tok, s);
col[0] = 0;
+ space = sizeof(col) - 1;
}
else
{
- if (col[0])
- strcat(col, " ");
- strcat(col, s);
+ if (col[0] && space > 0)
+ strcat(col, " "), space -= 1;
+ if (slen <= space)
+ strcat(col, s), space -= slen;
}
}
}
diff -urN imlib-1.9.13.orig/gdk_imlib/misc.c imlib-1.9.13/gdk_imlib/misc.c
--- imlib-1.9.13.orig/gdk_imlib/misc.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/misc.c Thu Sep 16 16:35:32 2004
@@ -1355,11 +1355,16 @@
/*
* Make sure we don't wrap on our memory allocations
+ * we check G_MAX_INT/4 because rend.c malloc's w * h * bpp
+ * + 3 is safety margin
*/
void *_gdk_malloc_image(unsigned int w, unsigned int h)
{
- if( w > 32767 || h > 32767)
+ if (w <= 0 || w > 32767 ||
+ h <= 0 || h > 32767 ||
+ h >= (G_MAXINT/4 - 1) / w)
return NULL;
- return malloc(w * h * 3);
+ return malloc(w * h * 3 + 3);
}
+
diff -urN imlib-1.9.13.orig/gdk_imlib/utils.c imlib-1.9.13/gdk_imlib/utils.c
--- imlib-1.9.13.orig/gdk_imlib/utils.c Mon Mar 4 17:26:51 2002
+++ imlib-1.9.13/gdk_imlib/utils.c Thu Sep 16 17:28:35 2004
@@ -1236,36 +1236,56 @@
context = 0;
ptr = NULL;
end = NULL;
+ memset(lookup, 0, sizeof(lookup));
while (!done)
{
line = data[count++];
+ if (!line)
+ break;
+ line = strdup(line);
+ if (!line)
+ break;
+ len = strlen(line);
+ for (i = 0; i < len; ++i)
+ {
+ c = line[i];
+ if (c < 32)
+ line[i] = 32;
+ else if (c > 127)
+ line[i] = 127;
+ }
+
if (context == 0)
{
/* Header */
sscanf(line, "%i %i %i %i", &w, &h, &ncolors, &cpp);
- if (ncolors > 32766)
+ if (ncolors <= 0 || ncolors > 32766)
{
fprintf(stderr, "gdk_imlib ERROR: XPM data wth colors > 32766 not supported\n");
free(im);
+ free(line);
return NULL;
}
- if (cpp > 5)
+ if (cpp <= 0 || cpp > 5)
{
fprintf(stderr, "gdk_imlib ERROR: XPM data with characters per pixel > 5 not supported\n");
free(im);
+ free(line);
return NULL;
}
- if (w > 32767)
+ if (w <= 0 || w > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image width > 32767 pixels for data\n");
free(im);
+ free(line);
return NULL;
}
- if (h > 32767)
+ if (h <= 0 || h > 32767)
{
fprintf(stderr, "gdk_imlib ERROR: Image height > 32767 pixels for data\n");
free(im);
+ free(line);
return NULL;
}
cmap = malloc(sizeof(struct _cmap) * ncolors);
@@ -1273,6 +1293,7 @@
if (!cmap)
{
free(im);
+ free(line);
return NULL;
}
im->rgb_width = w;
@@ -1282,6 +1303,7 @@
{
free(cmap);
free(im);
+ free(line);
return NULL;
}
im->alpha_data = NULL;
@@ -1355,7 +1377,7 @@
strcpy(col + colptr, " ");
colptr++;
}
- if (colptr + ls <= sizeof(col))
+ if (colptr + ls < sizeof(col))
{
strcpy(col + colptr, s);
colptr += ls;
@@ -1558,6 +1580,7 @@
}
if ((ptr) && ((ptr - im->rgb_data) >= w * h * 3))
done = 1;
+ free(line);
}
if (!transp)
{

73
media-libs/imlib/imlib-1.9.15-r5.ebuild

@ -0,0 +1,73 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 2017 Michael Uleysky
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit autotools multilib-minimal
PVP=(${PV//[-\._]/ })
DESCRIPTION="Image loading and rendering library"
HOMEPAGE="http://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/"
SRC_URI="mirror://gnome/sources/${PN}/${PVP[0]}.${PVP[1]}/${P}.tar.bz2
mirror://gentoo/gtk-1-for-imlib.m4.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
IUSE="doc static-libs"
RDEPEND="
>=media-libs/tiff-3.9.7-r1:0[${MULTILIB_USEDEP}]
>=media-libs/giflib-5.1:0=[${MULTILIB_USEDEP}]
>=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}]
>=virtual/jpeg-0-r2:0[${MULTILIB_USEDEP}]
>=x11-libs/libICE-1.0.8-r1[${MULTILIB_USEDEP}]
>=x11-libs/libSM-1.2.1-r1[${MULTILIB_USEDEP}]
>=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
x11-libs/gtk+:1
"
DEPEND="${RDEPEND}"
src_prepare() {
default
# Fix aclocal underquoted definition warnings.
# Conditionalize gdk functions for bug 40453.
# Fix imlib-config for bug 3425.
eapply "${FILESDIR}"/${P}.patch
eapply "${FILESDIR}"/${PN}-security.patch #security #72681
eapply "${FILESDIR}"/${P}-bpp16-CVE-2007-3568.patch # security #201887
eapply "${FILESDIR}"/${P}-fix-rendering.patch #197489
eapply "${FILESDIR}"/${P}-asneeded.patch #207638
eapply "${FILESDIR}"/${P}-libpng15.patch #357167
eapply "${FILESDIR}"/${P}-underlinking-test.patch #367645
eapply "${FILESDIR}"/${P}-no-LDFLAGS-in-pc.patch
eapply "${FILESDIR}"/${P}-giflib51-{1,2}.patch #538976
eapply "${FILESDIR}"/${P}-iogif.patch
mkdir m4 && cp "${WORKDIR}"/gtk-1-for-imlib.m4 m4
AT_M4DIR="m4" eautoreconf
}
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
--sysconfdir=/etc/imlib \
$(use_enable static-libs static)
}
multilib_src_install() {
emake DESTDIR="${D}" install
# fix target=@gdk-target@ in pkgconfig, bug #499268
sed -e '/^target=/d' \
-i "${ED}"usr/$(get_libdir)/pkgconfig/imlib.pc || die
}
multilib_src_install_all() {
einstalldocs
use doc && dohtml doc/*
# Punt unused files
rm -f "${D}"/usr/lib*/pkgconfig/imlibgdk.pc
find "${D}" -name '*.la' -exec rm -f {} + || die
}

2
metadata/layout.conf

@ -0,0 +1,2 @@
repo-name = gsview-overlay
masters = gentoo

1
profiles/repo_name

@ -0,0 +1 @@
gsview-overlay

19
x11-libs/gtk+/files/gtk+-1.2-locale_fix.patch

@ -0,0 +1,19 @@
--- gtk/gtkrc.c.~1.40.2.17.~ 2001-07-10 20:06:35.000000000 +0200
+++ gtk/gtkrc.c 2003-03-05 16:56:10.000000000 +0100
@@ -453,7 +453,7 @@
if (!initted)
{
- char *locale = setlocale (LC_CTYPE, NULL);
+ char *locale = g_strdup (setlocale (LC_CTYPE, NULL));
char *p;
initted = TRUE;
@@ -558,6 +558,7 @@
if (tmp) g_free (tmp);
}
+ g_free (locale);
}
i = 0;

696
x11-libs/gtk+/files/gtk+-1.2.10-as-needed.patch

@ -0,0 +1,696 @@
--- gtk+-1.2.10/acinclude.m4.orig 2006-05-24 23:23:51.000000000 -0700
+++ gtk+-1.2.10/acinclude.m4 2006-05-24 23:23:19.000000000 -0700
@@ -672,7 +672,7 @@
AC_DEFINE(HAVE_STPCPY)
fi
- AM_LC_MESSAGES
+ gt_LC_MESSAGES
AM_GTK_WITH_NLS
if test "x$CATOBJEXT" != "x"; then
--- gtk+-1.2.10/gtk.m4.orig 2006-05-24 23:32:00.000000000 -0700
+++ gtk+-1.2.10/gtk.m4 2006-05-24 23:36:16.000000000 -0700
@@ -1,6 +1,11 @@
# Configure paths for GTK+
# Owen Taylor 97-11-3
-
+AC_DEFUN([GTK_AC_DIVERT_BEFORE_HELP],
+[ifdef([m4_divert_text], [m4_divert_text([NOTICE],[$1])],
+ [ifdef([AC_DIVERT], [AC_DIVERT([NOTICE],[$1])],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+$1
+AC_DIVERT_POP()])])])
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
dnl
--- gtk+-1.2.10/configure.in.orig 2006-05-25 05:45:06.000000000 -0700
+++ gtk+-1.2.10/configure.in 2006-05-25 05:44:08.000000000 -0700
@@ -1,6 +1,8 @@
+builtin(include,gtk.m4)
+
+
# Process this file with autoconf to produce a configure script.
AC_INIT(gdk/gdktypes.h)
-
# In the following, there are a the following variants
# of GLib cflags and libs variables
#
@@ -12,12 +14,11 @@
# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
+AC_CANONICAL_TARGET
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
-dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
-dnl are available for $ac_help expansion (don't we all *love* autoconf?)
-AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+GTK_AC_DIVERT_BEFORE_HELP([
#
# Making releases:
# GTK_MICRO_VERSION += 1;
@@ -32,9 +33,8 @@
GTK_MICRO_VERSION=10
GTK_INTERFACE_AGE=1
GTK_BINARY_AGE=10
-GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
-dnl
-AC_DIVERT_POP()dnl
+GTK_VERSION="$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION"
+])
AC_SUBST(GTK_MAJOR_VERSION)
AC_SUBST(GTK_MINOR_VERSION)
@@ -44,9 +44,9 @@
AC_SUBST(GTK_VERSION)
# libtool versioning
-LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
+LT_RELEASE="$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION"
LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
-LT_REVISION=$GTK_INTERFACE_AGE
+LT_REVISION="$GTK_INTERFACE_AGE"
LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
@@ -54,11 +54,8 @@
AC_SUBST(LT_AGE)
# For automake.
-VERSION=$GTK_VERSION
-PACKAGE=gtk+
-
-# Save this value here, since automake will set cflags later
-cflags_set=${CFLAGS+set}
+VERSION="$GTK_VERSION"
+PACKAGE="gtk+"
dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
@@ -67,42 +64,40 @@
AM_CONFIG_HEADER(config.h)
dnl Initialize libtool
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
-AC_CANONICAL_HOST
-
dnl figure debugging default, prior to $ac_help setup
-dnl
-AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
+
+GTK_AC_DIVERT_BEFORE_HELP([
if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
- debug_default=yes
+ debug_default="yes"
else
- debug_default=minimum
+ debug_default="minimum"
fi
-AC_DIVERT_POP()dnl
-
+])
dnl declare --enable-* args and collect ac_help strings
-AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
+AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,
+ [enable_debug="$debug_default"])
AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
- echo $enable_shm, enable_shm="yes")
-AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
- , enable_ansi=no)
+ [echo "$enable_shm"],[enable_shm="yes"])
+AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],,[enable_ansi="no"])
AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
-AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
- , enable_xim="yes")
-AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
- , enable_xim_inst="maybe")
-AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
+AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],,[enable_xim="yes"])
+AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],,
+ [enable_xim_inst="maybe"])
+AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,
+ [enable_rebuilds="yes"])
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
-
AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
-AC_ARG_WITH(native_locale, [ --with-native-locale=[yes/no] Use native locale support [default=no]],,with_native_locale=no)
+AC_ARG_WITH(native_locale, [ --with-native-locale=[yes/no] Use native locale support [default=no]],,
+ [with_native_locale="no"])
+
if test "x$enable_debug" = "xyes"; then
- test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
+ test "$cflags_set" = "set" || CFLAGS="$CFLAGS -g"
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
@@ -113,16 +108,14 @@
fi
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
-
# Build time sanity check...
AM_SANITY_CHECK
# Checks for programs.
AC_PROG_CC
AC_ISC_POSIX
-AM_PROG_CC_STDC
+AC_PROG_CC_STDC
AC_PROG_INSTALL
-AC_PROG_MAKE_SET
changequote(,)dnl
if test "x$GCC" = "xyes"; then
@@ -144,7 +137,6 @@
fi
fi
changequote([,])dnl
-
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
@@ -158,8 +150,7 @@
AC_CHECK_PROG(INDENT, indent, indent)
REBUILD=\#
-if test "x$enable_rebuilds" = "xyes" && \
- test -n "$PERL" && \
+if test "x$enable_rebuilds" = "xyes" && test -n "$PERL" && \
$PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
test -n "$AWK" ; then
REBUILD=
@@ -194,55 +185,58 @@
dnl Check for nl_langinfo and CODESET
AC_MSG_CHECKING([for nl_langinfo (CODESET)])
-AC_TRY_COMPILE([#include <langinfo.h>],
+AC_TRY_COMPILE([#include <langinfo.h>
+ ],
[char *codeset = nl_langinfo (CODESET);],
AC_DEFINE(HAVE_CODESET,1,[Have nl_langinfo (CODESET)])
- have_codeset=yes,
- have_codeset=no)
+ have_codeset="yes",
+ have_codeset="no"
+)
AC_MSG_RESULT($have_codeset)
dnl The DU4 header files don't provide library prototypes unless
dnl -std1 is given to the native cc.
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
-gtk_save_LIBS=$LIBS
+gtk_save_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(none needed),
- gtk_save_CFLAGS=$CFLAGS
+ [gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -std1"
AC_TRY_RUN([#include <math.h>
int main (void) { return (log(1) != log(1.)); }],
AC_MSG_RESULT(-std1),
AC_MSG_RESULT()
- CFLAGS=$gtk_save_CFLAGS
- AC_MSG_WARN(
- [No ANSI prototypes found in library. (-std1 didn't work.)]),
- true
- ),
+ CFLAGS="$gtk_save_CFLAGS"
+ AC_MSG_WARN([No ANSI prototypes found in library. (-std1 didn't work.)]),
+ true)],
AC_MSG_RESULT(none needed)
)
-LIBS=$gtk_save_LIBS
+LIBS="$gtk_save_LIBS"
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
-AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
+AC_TRY_COMPILE([#include <dirent.h>
+ ],[DIR *dir;],
AC_MSG_RESULT(none needed),
- gtk_save_CFLAGS=$CFLAGS
+ [gtk_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -posix"
- AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
+ AC_TRY_COMPILE([#include <dirent.h>
+ ],[DIR *dir;],
AC_MSG_RESULT(-posix),
AC_MSG_RESULT()
- CFLAGS=$gtk_save_CFLAGS
- AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
+ CFLAGS="$gtk_save_CFLAGS"
+ AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])]))
-if test x$with_glib = xyes ; then
- AC_MSG_ERROR([
-*** Directory must be specified for --with-glib])
+
+
+if test "x$with_glib" = "xyes" ; then
+ AC_MSG_ERROR([*** Directory must be specified for --with-glib])
fi
-if test x$with_glib = x ; then
+if test "x$with_glib" = "x" ; then
# Look for separately installed glib
AM_PATH_GLIB(1.2.8,,
@@ -261,7 +255,7 @@
else
# Use uninstalled glib (assume they got the version right)
- GLIB_CONFIG=$with_glib/glib-config
+ GLIB_CONFIG="$with_glib/glib-config"
if test -x $GLIB_CONFIG ; then
:
else
@@ -277,9 +271,9 @@
glib_release=`$GLIB_CONFIG --version | sed 's%\\.[[0-9]]*$%%'`
# canonicalize relative paths
- case $with_glib in
+ case "$with_glib" in
/*)
- glib_dir=$with_glib
+ glib_dir="$with_glib"
;;
*)
glib_dir="\$(top_builddir)/$with_glib"
@@ -312,61 +306,56 @@
saved_ldflags="$LDFLAGS"
CFLAGS="$CFLAGS $X_CFLAGS"
-LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
+LDFLAGS="$LDFLAGS $X_LDFLAGS"
if test "x$no_x" = "xyes"; then
AC_MSG_ERROR([
*** X libraries or include files not found. Check 'config.log' for
*** more details.])
fi
-
# Checks for libraries.
# Check for the X11 library
-AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
+AC_CHECK_LIB(X11,XOpenDisplay,
+ x_libs="-lX11 $X_EXTRA_LIBS",
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
- $X_EXTRA_LIBS)
-
+ $X_EXTRA_LIBS
+)
if test "x$enable_shm" = "xyes"; then
# Check for the Xext library (needed for XShm extention)
AC_CHECK_LIB(Xext, XShmAttach,
x_libs="-lXext $x_libs",
# On AIX, it is in XextSam instead, but we still need -lXext
- AC_CHECK_LIB(XextSam, XShmAttach,
+ [AC_CHECK_LIB(XextSam, XShmAttach,
x_libs="-lXextSam -lXext $x_libs",
- no_xext_lib=yes, $x_libs),
- $x_libs)
+ no_xext_lib="yes",
+ $x_libs
+ )],
+ $x_libs
+ )
fi
-
# Check for shaped window extension
-
AC_CHECK_LIB(Xext, XShapeCombineMask,
- if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
+ if test -z "`echo $x_libs | grep \-lXext 2> /dev/null`"; then
x_libs="-lXext $x_libs"
fi
- AC_DEFINE(HAVE_SHAPE_EXT),
- ,
- $x_libs)
-
+ AC_DEFINE(HAVE_SHAPE_EXT),,
+ $x_libs
+)
# Check for XConvertCase (X11R6 specific)
-
AC_CHECK_LIB(X11, XConvertCase,
- AC_DEFINE(HAVE_XCONVERTCASE),
- ,
- $x_libs)
-
+ AC_DEFINE(HAVE_XCONVERTCASE),,
+ $x_libs
+)
# Check for XIM support.
-
-AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
- : ,
+AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,,
enable_xim_inst="no",
- $x_libs)
-
+ $x_libs
+)
# On Solaris, calling XRegisterIMInstantiateCallback seems to
# cause an immediate segfault, so we disable it, unless
# the user specifically forces it to be on.
-
-if test x$enable_xim_inst = xmaybe ; then
- case host in
+if test "x$enable_xim_inst" = "xmaybe" ; then
+ case "$host" in
*-*-solaris*)
enable_xim_inst="no"
;;
@@ -384,16 +373,15 @@
fi
x_cflags="$X_CFLAGS"
-x_ldflags="$X_LDFLAGS $X_LIBS"
+x_ldflags="$X_LDFLAGS"
# set up things for XInput
-
if test "x$with_xinput" = "xgxi"; then
AC_MSG_WARN([
*** The generic XInput support has not been tested for several years
*** and is not known to work with any currently available X servers])
AC_DEFINE(XINPUT_GXI)
- xinput_progs=gxid
+ xinput_progs="gxid"
x_libs="-lXi $x_libs"
elif test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
AC_DEFINE(XINPUT_XFREE)
@@ -413,77 +401,72 @@
if test "x$enable_shm" = "xyes"; then
# Check for shared memory
- AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
- AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
+ AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc="yes")
+ AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm="yes")
# Check for the X shared memory extension header file
AC_MSG_CHECKING(X11/extensions/XShm.h)
if test "x$no_xext_lib" = "xyes"; then
AC_MSG_RESULT(no)
- no_xshm=yes
+ no_xshm="yes"
else
if test -f "$x_includes/X11/extensions/XShm.h"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_XSHM_H)
else
AC_MSG_RESULT(no)
- no_xshm=yes
+ no_xshm="yes"
fi
fi
fi
-
# Check if X_LOCALE definition is necessary
-
AC_MSG_CHECKING(need -DX_LOCALE)
AC_TRY_RUN([
#include <stdio.h>
#include <locale.h>
-
-int
-main ()
+ int main ()
{
return setlocale (LC_ALL, "${with_locale}") == NULL;
}],
-need_x_locale=no,
-need_x_locale=yes,
-need_x_locale=no)
+ need_x_locale="no",
+ need_x_locale="yes",
+ need_x_locale="no"
+)
AC_MSG_RESULT($need_x_locale)
-use_native_locale=no
-if test $need_x_locale = yes; then
+use_native_locale="no"
+if test "$need_x_locale" = "yes"; then
GTK_LOCALE_FLAGS="-DX_LOCALE"
else
- if test x$with_native_locale = xyes ; then
+ if test "x$with_native_locale" = "xyes" ; then
AC_MSG_CHECKING(functioning locale support)
- AC_TRY_COMPILE([#include <stdlib.h>],[
- char c;
+ AC_TRY_COMPILE([#include <stdlib.h>],
+ [char c;
if (MB_CUR_MAX == 1) {
wctomb(&c, 42);
- }
- ],use_native_locale=yes,)
-
+ }],
+ use_native_locale="yes"
+ )
AC_MSG_RESULT($use_native_locale)
fi
fi
-if test x$use_native_locale = xyes ; then
+if test "x$use_native_locale" = "xyes" ; then
AC_MSG_CHECKING(if sizeof(wchar_t) == 4)
- AC_TRY_RUN([
- #include <stdlib.h>
-
- int
- main ()
+ AC_TRY_RUN([#include <stdlib.h>
+ int main ()
{
return (sizeof(wchar_t) == 4) ? 0 : 1;
- }],
- ,use_native_locale=no,:)
+ }],,
+ use_native_locale="no"
+ )
AC_MSG_RESULT($use_native_locale)
fi
-if test $use_native_locale = yes ; then
+if test "$use_native_locale" = "yes" ; then
AC_DEFINE(USE_NATIVE_LOCALE)
fi
@@ -502,13 +485,17 @@
# Check if <sys/select.h> needs to be included for fd_set
AC_MSG_CHECKING([for fd_set])
-AC_TRY_COMPILE([#include <sys/types.h>],
- [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
-if test $gtk_ok = yes; then
+AC_TRY_COMPILE([#include <sys/types.h>
+ ],
+ [fd_set readMask, writeMask;],
+ gtk_ok="yes",
+ gtk_ok="no"
+)
+if test "$gtk_ok" = "yes"; then
AC_MSG_RESULT([yes, found in sys/types.h])
else
- AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
- if test $gtk_ok = yes; then
+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok="yes")
+ if test "$gtk_ok" = "yes"; then
AC_DEFINE(HAVE_SYS_SELECT_H)
AC_MSG_RESULT([yes, found in sys/select.h])
else
@@ -520,30 +507,35 @@
# Duplicate `widechar' tests from `glib'.
# Check for wchar.h
AC_MSG_CHECKING(for wchar.h)
-AC_TRY_CPP([#include <wchar.h>], gtk_ok=yes, gtk_ok=no)
-if test $gtk_ok = yes; then
+AC_TRY_CPP([#include <wchar.h>
+ ],
+ gtk_ok="yes",
+ gtk_ok="no"
+)
+if test "$gtk_ok" = "yes"; then
AC_DEFINE(HAVE_WCHAR_H,1,[Define if wchar.h exists])
fi
AC_MSG_RESULT($gtk_ok)
# Check for wctype.h (for iswalnum)
AC_MSG_CHECKING(for wctype.h)
-AC_TRY_CPP([#include <wctype.h>], gtk_ok=yes, gtk_ok=no)
-if test $gtk_ok = yes; then
+AC_TRY_CPP([#include <wctype.h>], gtk_ok="yes", gtk_ok="no")
+if test "$gtk_ok" = "yes"; then
AC_DEFINE(HAVE_WCTYPE_H,1,[Define if wctype.h exists])
fi
AC_MSG_RESULT($gtk_ok)
# in Solaris 2.5, `iswalnum' is in -lw
GDK_WLIBS=
-AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
+AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS="-lw")])
# The following is necessary for Linux libc-5.4.38
oLIBS="$LIBS"
LIBS="$LIBS $GDK_WLIBS"
AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
-AC_TRY_LINK([#include <stdlib.h>],[
-#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
+AC_TRY_LINK([#include <stdlib.h>
+ ],
+ [#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
# ifdef HAVE_WCTYPE_H
# include <wctype.h>
# else
@@ -554,11 +546,13 @@
#else
# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
#endif
-iswalnum((wchar_t) 0);
-], gtk_ok=yes, gtk_ok=no)
+ iswalnum((wchar_t) 0);],
+ gtk_ok="yes",
+ gtk_ok="no"
+)
LIBS="$oLIBS"
-if test $gtk_ok = no; then
+if test "$gtk_ok" = "no"; then
AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Define if the wctype function is broken])
GDK_WLIBS=
fi
@@ -580,5 +574,5 @@
gtk/Makefile
gtk/gtkfeatures.h
gdk.pc
-gtk+.pc
-], [chmod +x gtk-config])
+gtk+.pc],
+[chmod +x gtk-config])
--- gtk+-1.2.10/gdk/Makefile.am.orig 2006-05-19 02:41:18.000000000 -0700
+++ gtk+-1.2.10/gdk/Makefile.am 2006-05-19 02:11:54.000000000 -0700
@@ -21,12 +21,11 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic \
- @GLIB_DEPLIBS@ \
@x_ldflags@ \
- @x_libs@ \
- -lm \
@STRIP_END@
+libgdk_la_LIBADD = @GLIB_DEPLIBS@ @x_libs@ -lm
+
#
# setup source file variables
#
@@ -104,14 +103,13 @@
EXTRA_PROGRAMS = gxid
bin_PROGRAMS = @xinput_progs@
LDADDS = @STRIP_BEGIN@ \
- @x_ldflags@ \
@x_libs@ \
@GLIB_LIBS@ \
-lm \
@STRIP_END@
gxid_SOURCES = gxid.c
gxid_LDADD = $(LDADDS)
-
+gxid_LDFLAGS = @x_ldflags@
.PHONY: files
--- gtk+-1.2.10/gtk/Makefile.am.orig 2006-05-25 07:40:45.000000000 -0700
+++ gtk+-1.2.10/gtk/Makefile.am 2006-05-25 07:43:20.000000000 -0700
@@ -27,13 +27,15 @@
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-release $(LT_RELEASE) \
-export-dynamic \
- @GLIB_DEPLIBS@ \
@x_ldflags@ \
- @x_libs@ \
- -lm \
@STRIP_END@
-# $(top_builddir)/gdk/libgdk.la
-
+libgtk_la_LIBADD = @STRIP_BEGIN@ \
+ $(top_builddir)/gdk/libgdk.la \
+ @x_libs@ \
+ @GDK_WLIBS@ \
+ @GLIB_LIBS@ \
+ -lm \
+ @STRIP_END@
#
# setup source file variables
@@ -374,14 +376,17 @@
gtkconfdir = $(sysconfdir)/gtk
-gtkconf_DATA = gtkrc.az gtkrc.he gtkrc.hy gtkrc.ja \
+# removed references to non-existent gtkrc files - tsh
+gtkconf_DATA = \
+ gtkrc.az gtkrc.he gtkrc.hy gtkrc.ja \
gtkrc.ko gtkrc.ru gtkrc.th gtkrc.uk \
- gtkrc.utf-8 gtkrc.iso-8859-2 \
- gtkrc.iso-8859-3 gtkrc.iso-8859-5 gtkrc.iso-8859-7 \
- gtkrc.iso-8859-9 gtkrc.iso-8859-13 gtkrc.iso-8859-14 \
- gtkrc.iso-8859-15 gtkrc.zh_CN gtkrc.zh_TW.big5 \
- gtkrc.ka_GE.georgianacademy gtkrc.ka_GE.georgianps \
- gtkrc.vi_VN.tcvn gtkrc.vi_VN.viscii gtkrc.cp1251 gtkrc.cp1255
+ gtkrc.iso-8859-2 gtkrc.iso-8859-5 \
+ gtkrc.iso-8859-13 gtkrc.iso-8859-14 \
+ gtkrc.iso-8859-15 gtkrc.zh_TW.big5 \
+ gtkrc.zh_CN gtkrc.cp1251 gtkrc.cp1255 \
+ gtkrc.ka_GE.georgianacademy \
+ gtkrc.ka_GE.georgianps \
+ gtkrc.vi_VN.tcvn gtkrc.vi_VN.viscii
# We create a dummy theme for the default GTK+ theme
install-data-local:
@@ -428,7 +433,6 @@
LDADDS = @STRIP_BEGIN@ \
libgtk.la \
$(top_builddir)/gdk/libgdk.la \
- @x_ldflags@ \
@x_libs@ \
@GDK_WLIBS@ \
@GLIB_LIBS@ \
@@ -441,12 +445,20 @@
testdnd_DEPENDENCIES = $(DEPS)
simple_DEPENDENCIES = $(DEPS)
#testthreads_DEPENDENCIES = $(DEPS)
+
testgtk_LDADD = $(LDADDS)
+testgtk_LDFLAGS=@x_ldflags@
testinput_LDADD = $(LDADDS)
+testinput_LDFLAGS = @x_ldflags@
testselection_LDADD = $(LDADDS)
+testselection_LDFLAGS = @x_ldflags@
testrgb_LDADD = $(LDADDS)
+testrgb_LDFLAGS = @x_ldflags@
testdnd_LDADD = $(LDADDS)
+testdnd_LDFLAGS = @x_ldflags@
simple_LDADD = $(LDADDS)
+simple_LDFLAGS = @x_ldflags@
+
#testthreads_LDADD = $(LDADDS)
.PHONY: files test test-debug

16
x11-libs/gtk+/files/gtk+-1.2.10-automake-1.13.patch

@ -0,0 +1,16 @@
Fix build failure with automake-1.13; fixed upstream in >=2.24.15 and >=3.0
https://bugs.gentoo.org/467520
diff --git a/configure.in b/configure.in
index 27294c8..798a259 100644
--- a/configure.in
+++ b/configure.in
@@ -61,7 +61,7 @@ dnl Initialize automake stuff
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
# Specify a configuration file
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
dnl Initialize libtool
AC_PROG_LIBTOOL

126
x11-libs/gtk+/files/gtk+-1.2.10-automake.patch

@ -0,0 +1,126 @@
--- docs/Makefile.am
+++ docs/Makefile.am
@@ -166,7 +166,7 @@
echo $$p; \
done
-EXTRA_DIST += \
+EXTRA_DIST = \
Changes-1.2.txt \
debugging.txt \
developers.txt \
--- gdk/Makefile.am
+++ gdk/Makefile.am
@@ -30,7 +30,7 @@
# setup source file variables
#
# GDK header files for public installation (non-generated)
-gdk_public_h_sources = @STRIP_BEGIN@ \
+gdk_public_h_sources = \
gdk.h \
gdkcursors.h \
gdkrgb.h \
@@ -38,9 +38,8 @@
gdkkeysyms.h \
gdkprivate.h \
gdktypes.h \
- gdkx.h \
-@STRIP_END@
-gdk_c_sources = @STRIP_BEGIN@ \
+ gdkx.h
+gdk_c_sources = \
gdk.c \
gdkcc.c \
gdkcolor.c \
@@ -71,8 +70,7 @@
MwmUtil.h \
gxid_lib.h \
gxid_proto.h \
- gxid_lib.c \
-@STRIP_END@
+ gxid_lib.c
#
# setup GDK sources and their dependancies
@@ -79,10 +79,6 @@
#
libgdkinclude_HEADERS = $(gdk_public_h_sources)
libgdk_la_SOURCES = $(gdk_c_sources)
-MAINTAINERCLEANFILES +=
-EXTRA_HEADERS +=
-EXTRA_DIST +=
-EXTRA_DIST +=
#
# rules to generate built sources
--- gtk/Makefile.am
+++ gtk/Makefile.am
@@ -41,7 +41,7 @@
# setup source file variables
#
# GTK+ header files for public installation (non-generated)
-gtk_public_h_sources = @STRIP_BEGIN@ \
+gtk_public_h_sources = \
gtk.h \
gtkaccelgroup.h \
gtkaccellabel.h \
@@ -150,13 +150,12 @@
gtkvscrollbar.h \
gtkvseparator.h \
gtkwidget.h \
- gtkwindow.h \
-@STRIP_END@
+ gtkwindow.h
# GTK+ header files that don't get installed
gtk_private_h_sources = @STRIP_BEGIN@ \
@STRIP_END@
# GTK+ C sources to build the library from
-gtk_c_sources = @STRIP_BEGIN@ \
+gtk_c_sources = \
gtkaccelgroup.c \
gtkaccellabel.c \
gtkadjustment.c \
@@ -264,8 +263,7 @@
gtkwidget.c \
gtkwindow.c \
fnmatch.c \
- fnmatch.h \
-@STRIP_END@
+ fnmatch.h
# we use our own built_sources variable rules to avoid automake's
# BUILT_SOURCES oddities
# we generate frequently rebuild files piggyback on a stamp file, so sources
@@ -284,10 +282,9 @@
gtk.defs \
@STRIP_END@
# built sources that get installed with the header files
-gtk_built_public_sources = @STRIP_BEGIN@ \
+gtk_built_public_sources = \
gtkmarshal.h \
- gtktypebuiltins.h \
-@STRIP_END@
+ gtktypebuiltins.h
# non-header sources (headers should be specified in the above variables)
# that don't serve as direct make target sources, i.e. they don't have
# their own .lo rules and don't get publically installed
@@ -313,9 +313,8 @@
#
libgtkinclude_HEADERS = $(gtk_public_h_sources) $(gtk_built_public_sources) gtkfeatures.h
libgtk_la_SOURCES = $(gtk_c_sources)
-MAINTAINERCLEANFILES += $(gtk_built_public_sources) $(gtk_built_sources)
-EXTRA_HEADERS +=
-EXTRA_DIST += $(gtk_private_h_sources)
+MAINTAINERCLEANFILES = $(gtk_built_public_sources) $(gtk_built_sources)
+EXTRA_DIST = $(gtk_private_h_sources)
EXTRA_DIST += $(gtk_built_sources) $(gtk_built_public_sources) $(gtk_extra_sources)
#
@@ -323,7 +322,7 @@
#
# setup autogeneration dependancies
gen_sources = xgen-gdef xgen-gtbh xgen-gtbvc xgen-gtbic xgen-gtbec xgen-gmh xgen-gmc
-CLEANFILES += $(gen_sources)
+CLEANFILES = $(gen_sources)
COPYING: $(gtk_built_public_sources) $(gtk_built_sources)
$(OBJECTS): COPYING # this is our oldest-source-stamp
# initial creation of the real stamp-* files

13
x11-libs/gtk+/files/gtk+-1.2.10-cleanup.patch

@ -0,0 +1,13 @@
pull in string prototypes
--- gdk/gdkinputcommon.h
+++ gdk/gdkinputcommon.h
@@ -24,6 +24,8 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include <string.h>
+
#if defined(XINPUT_GXI) || defined(XINPUT_XFREE)
/* Forward declarations */

9
x11-libs/gtk+/files/gtk+-1.2.10-m4.patch

@ -0,0 +1,9 @@
Fix aclocal warnings:
/usr/share/aclocal/gtk.m4:7: warning: underquoted definition of AM_PATH_GTK
--- gtk+-1.2.10/gtk.m4
+++ gtk+-1.2.10/gtk.m4
@@ -6,3 +6,3 @@
dnl
-AC_DEFUN(AM_PATH_GTK,
+AC_DEFUN([AM_PATH_GTK],
[dnl

37
x11-libs/gtk+/files/gtkrc

@ -0,0 +1,37 @@
style "default"
{
font = "-*-lucida-medium-r-normal-*-*-100-*-*-*-*-*-*"
}
style "button" = "default"
{
bg[PRELIGHT] = { 0.7, 0.7, 0.9 }
}
style "treeitem"
{
bg[ACTIVE] = { 0.7, 0.7, 0.9 }
}
style "scrollbar" = "button"
{
bg[ACTIVE] = {0.6, 0.6, 0.6 }
}
style "status" {
bg[PRELIGHT] = { 0.3, 1.0, 0.3 }
}
style "gtk-tooltips" {
bg[NORMAL] = "#ffff60"
}
class "GtkWidget" style "default"
class "GtkButton" style "button"
class "GtkItem" style "button"
class "GtkProgressBar" style "status"
class "GtkScrollbar" style "scrollbar"
class "GtkTreeItem" style "treeitem"
widget "gtk-tooltips" style "gtk-tooltips"

103
x11-libs/gtk+/gtk+-1.2.10-r13.ebuild

@ -0,0 +1,103 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 2016-2017 Michael Uleysky
# Distributed under the terms of the GNU General Public License v2
EAPI=5
GNOME_TARBALL_SUFFIX="gz"
GNOME2_LA_PUNT="yes"
inherit autotools eutils flag-o-matic gnome2 toolchain-funcs multilib-minimal
DESCRIPTION="The GIMP Toolkit"
HOMEPAGE="http://www.gtk.org/"
SRC_URI="${SRC_URI} http://www.ibiblio.org/gentoo/distfiles/gtk+-1.2.10-r8-gentoo.diff.bz2"
LICENSE="LGPL-2.1+"
SLOT="1"
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~sh sparc x86 ~x86-fbsd"
IUSE="nls debug"
# Supported languages and translated documentation
# Be sure all languages are prefixed with a single space!
MY_AVAILABLE_LINGUAS=" az ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl nn no pl pt_BR pt ro ru sk sl sr sv tr uk vi"
IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
RDEPEND=">=dev-libs/glib-1.2.10-r6:1[${MULTILIB_USEDEP}]
>=x11-libs/libX11-1.5.0-r1[${MULTILIB_USEDEP}]
>=x11-libs/libXext-1.3.1-r1[${MULTILIB_USEDEP}]
>=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
>=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]"
DEPEND="${RDEPEND}
>=x11-proto/inputproto-2.2-r1[${MULTILIB_USEDEP}]
>=x11-proto/xextproto-7.2.1-r1[${MULTILIB_USEDEP}]
nls? ( sys-devel/gettext dev-util/intltool )"
PDEPEND="x11-themes/gtk-engines:1"
MULTILIB_CHOST_TOOLS=(/usr/bin/gtk-config)
src_prepare() {
append-cflags -std=gnu89
epatch "${FILESDIR}"/${P}-m4.patch
epatch "${FILESDIR}"/${P}-automake.patch
epatch "${FILESDIR}"/${P}-cleanup.patch
epatch "${DISTDIR}"/gtk+-1.2.10-r8-gentoo.diff.bz2
epatch "${FILESDIR}"/${PN}-1.2-locale_fix.patch
epatch "${FILESDIR}"/${P}-as-needed.patch
sed -i '/libtool.m4/,/AM_PROG_NM/d' acinclude.m4 #168198
epatch "${FILESDIR}"/${P}-automake-1.13.patch #467520
eautoreconf
gnome2_src_prepare
}
multilib_src_configure() {
local myconf=
use nls || myconf="${myconf} --disable-nls"
strip-linguas ${MY_AVAILABLE_LINGUAS}
if use debug ; then
myconf="${myconf} --enable-debug=yes"
else
myconf="${myconf} --enable-debug=minimum"
fi
ECONF_SOURCE="${S}" \
gnome2_src_configure \
--disable-static \
--sysconfdir="${EPREFIX}"/etc \
--with-xinput=xfree \
--with-x \
${myconf} \
GLIB_CONFIG="/usr/bin/${CHOST}-glib-config"
}
multilib_src_compile() {
emake CC="$(tc-getCC)"
}
multilib_src_install() {
gnome2_src_install
}
multilib_src_install_all() {
einstalldocs
docinto docs
cd docs
dodoc *.txt *.gif text/*
dohtml -r html
#install nice, clean-looking gtk+ style
insinto /usr/share/themes/Gentoo/gtk
doins "${FILESDIR}"/gtkrc
}
pkg_postinst() {
if [[ -e /etc/X11/gtk/gtkrc ]] ; then
ewarn "Older versions added /etc/X11/gtk/gtkrc which changed settings for"
ewarn "all themes it seems. Please remove it manually as it will not due"
ewarn "to /env protection."
fi
echo ""
einfo "The old gtkrc is available through the new Gentoo gtk theme."
}

23
x11-themes/gtk-engines/gtk-engines-0.12.ebuild

@ -0,0 +1,23 @@
# Copyright 1999-2006 Gentoo Foundation
# Copyright 2016-2017 Michael Uleysky
# Distributed under the terms of the GNU General Public License v2
GNOME_TARBALL_SUFFIX="gz"
inherit gnome.org
DESCRIPTION="GTK+1 standard engines and themes"
HOMEPAGE="http://www.gtk.org/"
LICENSE="GPL-2"
SLOT="1"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 sh sparc x86"
IUSE=""
DEPEND="=x11-libs/gtk+-1.2*
>=media-libs/imlib-1.8
!>media-libs/imlib-1.9.15-r5"
src_install() {
make DESTDIR="${D}" install || die "Installation failed"
dodoc AUTHORS ChangeLog README
}
Loading…
Cancel
Save