summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-tcltk/tkimg/ChangeLog12
-rw-r--r--dev-tcltk/tkimg/Manifest8
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.3-m4.patch311
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.3-makedeps.patch176
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.3-syslibs.patch441
-rw-r--r--dev-tcltk/tkimg/files/tkimg-1.3-warnings.patch35
-rw-r--r--dev-tcltk/tkimg/metadata.xml13
-rw-r--r--dev-tcltk/tkimg/tkimg-1.3.ebuild47
8 files changed, 1043 insertions, 0 deletions
diff --git a/dev-tcltk/tkimg/ChangeLog b/dev-tcltk/tkimg/ChangeLog
new file mode 100644
index 000000000000..b9b1376d7d65
--- /dev/null
+++ b/dev-tcltk/tkimg/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-tcltk/tkimg
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/tkimg/ChangeLog,v 1.1 2008/04/11 11:26:20 bicatali Exp $
+
+*tkimg-1.3 (11 Apr 2008)
+
+ 11 Apr 2008; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/tkimg-1.3-m4.patch, +files/tkimg-1.3-makedeps.patch,
+ +files/tkimg-1.3-syslibs.patch, +files/tkimg-1.3-warnings.patch,
+ +metadata.xml, +tkimg-1.3.ebuild:
+ Initial import. Needed for sci-astronomy/skycat
+
diff --git a/dev-tcltk/tkimg/Manifest b/dev-tcltk/tkimg/Manifest
new file mode 100644
index 000000000000..fd084d9b9e05
--- /dev/null
+++ b/dev-tcltk/tkimg/Manifest
@@ -0,0 +1,8 @@
+AUX tkimg-1.3-m4.patch 9543 RMD160 e3a156f8a87a6f6f7967b81e73a0bb98a78176c3 SHA1 d66f86b79101765e2f9a7fd072011638a0ddbad6 SHA256 409b9877daf172113052a689a7eeb9a9226965356a8b9ddfa0947bca0d8f08d9
+AUX tkimg-1.3-makedeps.patch 3022 RMD160 f04e0912380e2669f0221e6eae1372b886dd3c9b SHA1 229b69285bb035e4bc0dc8b4d9d059cf139668ff SHA256 5b359d562d793e65791ae6dceb7eeae0d740b471b8362bc02515c9fa0ad19bd6
+AUX tkimg-1.3-syslibs.patch 12672 RMD160 c5f5f9a8275d92afaeb40f1a7584a0102d12ee08 SHA1 fde468d011e576854354a805ff5603df53a4042e SHA256 fcac1bf27bfb7e1adb8bbdb503c7449533c29de91bf5cfe1333dbea7017936a0
+AUX tkimg-1.3-warnings.patch 833 RMD160 80f45f8d830a3b69dfd983a098ec000d48bbedf9 SHA1 fdb6f263416d0cefccbc5c2c5f3067c1753efd52 SHA256 51b907379959ccf6d474300ba801c722b0d316e88bf5b1c033049b554b3700c1
+DIST tkimg1.3.tar.bz2 2924740 RMD160 fb0992c72faeb80fc6aaa2ccb1f632087235ea9d SHA1 b2d97cf80f9cd457a194b0d2c4bd549a66783895 SHA256 3daebe7c4a3d15e175a0203ada94adc2b78403d164d9fe9797e274e6256fcf33
+EBUILD tkimg-1.3.ebuild 1057 RMD160 4ec402e0e5cd571f4372c3ffbfde290e72787393 SHA1 6beaa4a80523cf0a803d8099c51c5184bb2552c8 SHA256 2580b3b5da5dc30bbdab95787ebfee4d9ea91fe3d94861f2248f9d4d7f179df9
+MISC ChangeLog 413 RMD160 f702f0580439dd6c58999b5153564bde174aa36c SHA1 36a26f147df3b45bcc24c799e6ba0c6616373692 SHA256 49c315b04760d2f5aa1e2a67e4d6f8452868e665a18848bed8d90f0f62f1001b
+MISC metadata.xml 413 RMD160 1ac848d3c3c9bdc181eb74296bed320a04939230 SHA1 b87cf6e1539c38b9d47206b3de300d4d1b015e19 SHA256 e4be7858b69d8be49bd900961e05825edcacfb4c81b6f20ebc6afd65fb3b2fc8
diff --git a/dev-tcltk/tkimg/files/tkimg-1.3-m4.patch b/dev-tcltk/tkimg/files/tkimg-1.3-m4.patch
new file mode 100644
index 000000000000..d1814b6498c1
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.3-m4.patch
@@ -0,0 +1,311 @@
+--- Makefile.in
++++ Makefile.in
+@@ -117,12 +117,14 @@
+ here=`pwd` ; \
+ cd $$sub ; \
+ $(MAKE) install \
++ DESTDIR="" INSTALL_ROOT="" \
++ libdir=$$here/Img/exec_prefix/lib \
+ exec_prefix=$$here/Img/exec_prefix \
+ prefix=$$here/Img/prefix \
+ pkglibdir=$$here/Img/exec_prefix/lib/Img \
+ ; \
+ cd $$here ; \
+- cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
++ cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl || :; \
+ done
+ mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl
+
+--- base/tclconfig/tcl.m4
++++ base/tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- base/tkimg.h
++++ base/tkimg.h
+@@ -22,6 +22,7 @@
+ #define __TKIMG_H__
+
+ #include <stdio.h> /* stdout, and other definitions */
++#include <string.h>
+ #include "tk.h"
+
+ /*
+--- libjpeg/tcl/configure
++++ libjpeg/tcl/configure
+@@ -5319,14 +5319,14 @@
+
+ case "$srcdir" in
+ .) # No --srcdir option. We are building in place.
+- jpegdir=$srcdir/.. ;;
++ jpegdir=`pwd`/.. ;;
+ /*) # Absolute path.
+ jpegdir=$srcdir/.. ;;
+ *) # Relative path.
+ jpegdir=../$ac_dots$srcdir/.. ;;
+ esac
+
+-mkdir libjpeg
++mkdir -p libjpeg
+ cd libjpeg
+ env CC="$JPEG_CC" CFLAGS="$JPEG_CFLAGS" $jpegdir/configure
+ cd ..
+--- libjpeg/tcl/tclconfig/tcl.m4
++++ libjpeg/tcl/tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- libpng/tcl/tclconfig/tcl.m4
++++ libpng/tcl/tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- libtiff/tcl/tclconfig/tcl.m4
++++ libtiff/tcl/tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- libz/tcl/tclconfig/tcl.m4
++++ libz/tcl/tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- tclconfig/tcl.m4
++++ tclconfig/tcl.m4
+@@ -759,7 +759,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
+@@ -1143,7 +1143,7 @@
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+- if test x"${LIBOBJS}" != x ; then
++ if test x"${LIB@&t@OBJS}" != x ; then
+ EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
+ fi
+
+@@ -2026,7 +2026,7 @@
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+- system=MP-RAS-`awk '{print $3}' /etc/.relid'`
++ system=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ system=AIX-`uname -v`.`uname -r`
diff --git a/dev-tcltk/tkimg/files/tkimg-1.3-makedeps.patch b/dev-tcltk/tkimg/files/tkimg-1.3-makedeps.patch
new file mode 100644
index 000000000000..ef669667632b
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.3-makedeps.patch
@@ -0,0 +1,176 @@
+--- bmp/Makefile.in
++++ bmp/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- gif/Makefile.in
++++ gif/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- ico/Makefile.in
++++ ico/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- jpeg/Makefile.in
++++ jpeg/Makefile.in
+@@ -322,7 +322,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- pcx/Makefile.in
++++ pcx/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- pixmap/Makefile.in
++++ pixmap/Makefile.in
+@@ -324,7 +324,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- png/Makefile.in
++++ png/Makefile.in
+@@ -322,7 +322,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- ppm/Makefile.in
++++ ppm/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- ps/Makefile.in
++++ ps/Makefile.in
+@@ -320,7 +320,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- sgi/Makefile.in
++++ sgi/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- sun/Makefile.in
++++ sun/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- tga/Makefile.in
++++ tga/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- tiff/Makefile.in
++++ tiff/Makefile.in
+@@ -322,7 +322,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- window/Makefile.in
++++ window/Makefile.in
+@@ -323,7 +323,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- xbm/Makefile.in
++++ xbm/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
+--- xpm/Makefile.in
++++ xpm/Makefile.in
+@@ -318,7 +318,7 @@
+
+ VPATH = $(srcdir)
+
+-.c.$(OBJEXT):
++.c.$(OBJEXT): init.c
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+ init.c: $(srcdir)/../init.c
diff --git a/dev-tcltk/tkimg/files/tkimg-1.3-syslibs.patch b/dev-tcltk/tkimg/files/tkimg-1.3-syslibs.patch
new file mode 100644
index 000000000000..9ff0b5774d52
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.3-syslibs.patch
@@ -0,0 +1,441 @@
+--- configure.in
++++ configure.in
+@@ -43,24 +43,20 @@
+ CC=`echo $CC | sed -e 's/ .*$//'`
+
+ TEA_CONFIG_COLLECT
+-TEA_CONFIG_SUBDIR(libz/tcl, [])
+-TEA_CONFIG_SUBDIR(libpng/tcl, [--with-zlibtcl=`pwd`/libz/tcl])
+-TEA_CONFIG_SUBDIR(libtiff/tcl,[])
+-TEA_CONFIG_SUBDIR(libjpeg/tcl,[])
+ TEA_CONFIG_SUBDIR(base, [])
+ TEA_CONFIG_SUBDIR(bmp, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(gif, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(ico, [--with-tkimg=`pwd`/base])
+-TEA_CONFIG_SUBDIR(jpeg, [--with-tkimg=`pwd`/base --with-jpegtcl=`pwd`/libjpeg/tcl])
++TEA_CONFIG_SUBDIR(jpeg, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(pcx, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(pixmap, [--with-tkimg=`pwd`/base])
+-TEA_CONFIG_SUBDIR(png, [--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng/tcl --with-zlibtcl=`pwd`/libz/tcl])
++TEA_CONFIG_SUBDIR(png, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(ppm, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(ps, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(sgi, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(sun, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(tga, [--with-tkimg=`pwd`/base])
+-TEA_CONFIG_SUBDIR(tiff, [--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff/tcl --with-zlibtcl=`pwd`/libz/tcl --with-jpegtcl=`pwd`/libjpeg/tcl])
++TEA_CONFIG_SUBDIR(tiff, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(window, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(xbm, [--with-tkimg=`pwd`/base])
+ TEA_CONFIG_SUBDIR(xpm, [--with-tkimg=`pwd`/base])
+--- jpeg/Makefile.in
++++ jpeg/Makefile.in
+@@ -51,10 +51,6 @@
+ ## tkimgjpegstub_OBJECTS = tkimgjpegStubLib.$(OBJEXT)
+ ## tkimgjpegstub_LIB_FILE= @tkimgjpegstub_LIB_FILE@
+
+-jpegtcl_SRC_PATH = @jpegtcl_SRC_PATH@
+-jpegtcl_BUILD_PATH = @jpegtcl_BUILD_PATH@
+-jpegtcl_VERSION = @jpegtcl_VERSION@
+-
+ tkimg_SRC_PATH = @tkimg_SRC_PATH@
+ tkimg_BUILD_PATH = @tkimg_BUILD_PATH@
+ tkimg_VERSION = @tkimg_VERSION@
+@@ -189,8 +185,6 @@
+
+ INCLUDES = \
+ -I$(tkimg_SRC_PATH) \
+- -I$(jpegtcl_SRC_PATH) \
+- -I$(jpegtcl_BUILD_PATH)/libjpeg \
+ -I. -I$(srcdir) \
+ @TCL_INCLUDES@ \
+ @TK_INCLUDES@ \
+@@ -202,8 +196,7 @@
+
+ CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
+
+-CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\" \
+- -DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\" \
++CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
+
+ LIBS = @LIBS@
+ AR = ar
+--- jpeg/configure.in
++++ jpeg/configure.in
+@@ -95,11 +95,6 @@
+ TEA_PATH_CONFIG(tkimg)
+ TEA_LOAD_CONFIG(tkimg)
+
+-TEA_PATH_CONFIG(jpegtcl)
+-TEA_LOAD_CONFIG(jpegtcl)
+-AC_SUBST(jpegtcl_VERSION)
+-
+-IMG_SRCPATH(jpegtcl)
+ IMG_SRCPATH(tkimg)
+
+ #--------------------------------------------------------------------
+@@ -186,7 +181,6 @@
+ AC_DEFINE(USE_TCL_STUBS)
+ AC_DEFINE(USE_TK_STUBS)
+ AC_DEFINE(USE_TKIMG_STUBS)
+-AC_DEFINE(USE_JPEGTCL_STUBS)
+
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library. It
+@@ -203,13 +197,11 @@
+
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
+ else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
+ fi
+
+-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
++SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -ljpeg \${TK_LIBS}"
+
+ #--------------------------------------------------------------------
+ # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
+--- jpeg/jpeg.c
++++ jpeg/jpeg.c
+@@ -53,9 +53,10 @@
+ */
+
+ #include <stdio.h>
+-
+-#include <tcl.h>
+-#include <jpegtcl.h>
++#include <sys/types.h>
++#include <jpeglib.h>
++#include <jerror.h>
++#include <tk.h>
+
+ static int SetupJPegLibrary _ANSI_ARGS_ ((Tcl_Interp *interp));
+
+@@ -145,10 +146,6 @@
+ struct my_error_mgr jerror; /* for controlling libjpeg error handling */
+ int i;
+
+- if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
+- return TCL_ERROR;
+- }
+-
+ /* The followin code tries to determine if the JPEG library is
+ valid at all. The library might be configured differently,
+ which will produce core dumps. Also it might be that
+--- png/Makefile.in
++++ png/Makefile.in
+@@ -51,14 +51,6 @@
+ ## tkimgpngstub_OBJECTS = tkimgpngStubLib.$(OBJEXT)
+ ## tkimgpngstub_LIB_FILE= @tkimgpngstub_LIB_FILE@
+
+-pngtcl_SRC_PATH = @pngtcl_SRC_PATH@
+-pngtcl_BUILD_PATH = @pngtcl_BUILD_PATH@
+-pngtcl_VERSION = @pngtcl_VERSION@
+-
+-zlibtcl_SRC_PATH = @zlibtcl_SRC_PATH@
+-zlibtcl_BUILD_PATH = @zlibtcl_BUILD_PATH@
+-zlibtcl_VERSION = @zlibtcl_VERSION@
+-
+ tkimg_SRC_PATH = @tkimg_SRC_PATH@
+ tkimg_BUILD_PATH = @tkimg_BUILD_PATH@
+ tkimg_VERSION = @tkimg_VERSION@
+@@ -193,10 +185,6 @@
+
+ INCLUDES = \
+ -I$(tkimg_SRC_PATH) \
+- -I$(pngtcl_SRC_PATH) \
+- -I$(pngtcl_BUILD_PATH) \
+- -I$(zlibtcl_SRC_PATH) \
+- -I$(zlibtcl_BUILD_PATH) \
+ -I. -I$(srcdir) \
+ @TCL_INCLUDES@ \
+ @TK_INCLUDES@ \
+@@ -208,9 +196,7 @@
+
+ CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
+
+-CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\" \
+- -DPNGTCL_VERSION=\"$(pngtcl_VERSION)\" \
+- -DPNGTCL_VERSION=\"$(zlibtcl_VERSION)\"
++CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
+
+ LIBS = @LIBS@
+ AR = ar
+--- png/configure.in
++++ png/configure.in
+@@ -95,17 +95,7 @@
+ TEA_PATH_CONFIG(tkimg)
+ TEA_LOAD_CONFIG(tkimg)
+
+-TEA_PATH_CONFIG(pngtcl)
+-TEA_LOAD_CONFIG(pngtcl)
+-AC_SUBST(pngtcl_VERSION)
+-
+-TEA_PATH_CONFIG(zlibtcl)
+-TEA_LOAD_CONFIG(zlibtcl)
+-AC_SUBST(zlibtcl_VERSION)
+-
+ IMG_SRCPATH(tkimg)
+-IMG_SRCPATH(pngtcl)
+-IMG_SRCPATH(zlibtcl)
+
+ #--------------------------------------------------------------------
+ # __CHANGE__
+@@ -191,8 +181,6 @@
+ AC_DEFINE(USE_TCL_STUBS)
+ AC_DEFINE(USE_TK_STUBS)
+ AC_DEFINE(USE_TKIMG_STUBS)
+-AC_DEFINE(USE_PNGTCL_STUBS)
+-AC_DEFINE(USE_ZLIBTCL_STUBS)
+
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library. It
+@@ -209,13 +197,11 @@
+
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${pngtcl_STUB_LIB_PATH}`\""
+ else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${pngtcl_STUB_LIB_SPEC}"
+ fi
+
+-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
++SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -lpng \${TK_LIBS}"
+
+ #--------------------------------------------------------------------
+ # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
+--- png/png.c
++++ png/png.c
+@@ -21,7 +21,7 @@
+ */
+
+ #include <tcl.h>
+-#include <pngtcl.h>
++#include <png.h>
+ #include <string.h>
+ #include <stdlib.h>
+
+@@ -108,9 +108,6 @@
+ SetupPngLibrary (interp)
+ Tcl_Interp *interp;
+ {
+- if (Pngtcl_InitStubs(interp, PNGTCL_VERSION, 0) == NULL) {
+- return TCL_ERROR;
+- }
+ return TCL_OK;
+ }
+
+--- tclconfig/tcl.m4
++++ tclconfig/tcl.m4
+@@ -912,7 +912,7 @@
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+- LIBOBJS="$LIBOBJS tclLoadAix.o"
++ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+@@ -2178,7 +2178,7 @@
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_RESULT([buggy])
+- LIBOBJS="$LIBOBJS fixstrtod.o"
++ AC_LIBOBJ([fixstrtod])
+ AC_DEFINE(strtod, fixstrtod)
+ fi
+ fi
+--- tiff/Makefile.in
++++ tiff/Makefile.in
+@@ -28,9 +28,6 @@
+
+ tkimgtiff_SOURCES = \
+ tiff.c \
+- tiffZip.c \
+- tiffJpeg.c \
+- tiffPixar.c \
+ @EXTRA_SOURCES@
+
+ WIN_SOURCES =
+@@ -54,18 +51,6 @@
+ ## tkimgtiffstub_OBJECTS = tkimgtiffStubLib.$(OBJEXT)
+ ## tkimgtiffstub_LIB_FILE= @tkimgtiffstub_LIB_FILE@
+
+-tifftcl_SRC_PATH = @tifftcl_SRC_PATH@
+-tifftcl_BUILD_PATH = @tifftcl_BUILD_PATH@
+-tifftcl_VERSION = @tifftcl_VERSION@
+-
+-jpegtcl_SRC_PATH = @jpegtcl_SRC_PATH@
+-jpegtcl_BUILD_PATH = @jpegtcl_BUILD_PATH@
+-jpegtcl_VERSION = @jpegtcl_VERSION@
+-
+-zlibtcl_SRC_PATH = @zlibtcl_SRC_PATH@
+-zlibtcl_BUILD_PATH = @zlibtcl_BUILD_PATH@
+-zlibtcl_VERSION = @zlibtcl_VERSION@
+-
+ tkimg_SRC_PATH = @tkimg_SRC_PATH@
+ tkimg_BUILD_PATH = @tkimg_BUILD_PATH@
+ tkimg_VERSION = @tkimg_VERSION@
+@@ -200,12 +185,6 @@
+
+ INCLUDES = \
+ -I$(tkimg_SRC_PATH) \
+- -I$(tifftcl_SRC_PATH) \
+- -I$(tifftcl_BUILD_PATH)/libtiff \
+- -I$(jpegtcl_SRC_PATH) \
+- -I$(jpegtcl_BUILD_PATH)/libjpeg \
+- -I$(zlibtcl_SRC_PATH) \
+- -I$(zlibtcl_BUILD_PATH) \
+ -I. -I$(srcdir) \
+ @TCL_INCLUDES@ \
+ @TK_INCLUDES@ \
+@@ -217,10 +196,7 @@
+
+ CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
+
+-CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\" \
+- -DTIFFTCL_VERSION=\"$(tifftcl_VERSION)\" \
+- -DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\" \
+- -DZLIBTCL_VERSION=\"$(zlibtcl_VERSION)\"
++CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\"
+
+ LIBS = @LIBS@
+ AR = ar
+--- tiff/configure.in
++++ tiff/configure.in
+@@ -95,22 +95,7 @@
+ TEA_PATH_CONFIG(tkimg)
+ TEA_LOAD_CONFIG(tkimg)
+
+-TEA_PATH_CONFIG(tifftcl)
+-TEA_LOAD_CONFIG(tifftcl)
+-AC_SUBST(tifftcl_VERSION)
+-
+-TEA_PATH_CONFIG(jpegtcl)
+-TEA_LOAD_CONFIG(jpegtcl)
+-AC_SUBST(jpegtcl_VERSION)
+-
+-TEA_PATH_CONFIG(zlibtcl)
+-TEA_LOAD_CONFIG(zlibtcl)
+-AC_SUBST(zlibtcl_VERSION)
+-
+ IMG_SRCPATH(tkimg)
+-IMG_SRCPATH(tifftcl)
+-IMG_SRCPATH(jpegtcl)
+-IMG_SRCPATH(zlibtcl)
+
+ #--------------------------------------------------------------------
+ # __CHANGE__
+@@ -196,9 +181,6 @@
+ AC_DEFINE(USE_TCL_STUBS)
+ AC_DEFINE(USE_TK_STUBS)
+ AC_DEFINE(USE_TKIMG_STUBS)
+-AC_DEFINE(USE_TIFFTCL_STUBS)
+-AC_DEFINE(USE_JPEGTCL_STUBS)
+-AC_DEFINE(USE_ZLIBTCL_STUBS)
+
+ #--------------------------------------------------------------------
+ # This macro generates a line to use when building a library. It
+@@ -215,17 +197,11 @@
+
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\""
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\""
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\""
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\""
+ else
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}"
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tifftcl_STUB_LIB_SPEC}"
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}"
+- SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}"
+ fi
+
+-SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}"
++SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -ltiff \${TK_LIBS}"
+
+ #--------------------------------------------------------------------
+ # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
+--- tiff/tiff.c
++++ tiff/tiff.c
+@@ -14,10 +14,7 @@
+ * Generic initialization code, parameterized via CPACKAGE and PACKAGE.
+ */
+
+-#include <tcl.h>
+-#include <tifftcl.h>
+-#include <jpegtcl.h>
+-#include <zlibtcl.h>
++#include <tk.h>
+
+ static int SetupTiffLibrary _ANSI_ARGS_ ((Tcl_Interp *interp));
+
+@@ -26,6 +23,8 @@
+
+ #include "init.c"
+
++#include <tiff.h>
++#include <tiffio.h>
+ #include <tiffInt.h>
+
+
+@@ -81,10 +80,6 @@
+ {
+ static int initialized = 0;
+
+- if (Tifftcl_InitStubs(interp, TIFFTCL_VERSION, 0) == NULL) {
+- return TCL_ERROR;
+- }
+-
+ if (errorMessage) {
+ ckfree(errorMessage);
+ errorMessage = NULL;
+@@ -96,35 +91,8 @@
+ TIFFSetWarningHandler(_TIFFwarn);
+ }
+
+- /*
+- * Initialize jpeg and zlib too, for use by the CODEC's we register
+- * with the base TIFF library in this package.
+- */
+-
+- if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
+- return TCL_ERROR;
+- }
+-
+ if (!initialized) {
+ initialized = 1;
+- if (
+- TIFFRegisterCODEC && TIFFError && TIFFPredictorInit &&
+- TIFFMergeFieldInfo && TIFFFlushData1 && _TIFFNoPostDecode &&
+- TIFFTileRowSize && TIFFScanlineSize && _TIFFsetByteArray &&
+- TIFFVSetField && TIFFSwabArrayOfShort
+- ) {
+-
+- if (Zlibtcl_InitStubs(interp, "1.0", 0) == NULL) {
+- return TCL_ERROR;
+- }
+- TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip);
+-
+- if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) {
+- return TCL_ERROR;
+- }
+- TIFFRegisterCODEC (COMPRESSION_JPEG, "JPEG", TkimgTIFFInitJpeg);
+- TIFFRegisterCODEC (COMPRESSION_PIXARLOG, "PixarLog", TkimgTIFFInitPixar);
+- }
+ }
+ return TCL_OK;
+ }
+--- tiff/tiffInt.h
++++ tiff/tiffInt.h
+@@ -2,7 +2,7 @@
+ * tiffInit.h --
+ */
+
+-#include <tifftcl.h>
++#include <tiff.h>
+
+ /*
+ * Declarations shared between the .c files of the TIFF format handler.
diff --git a/dev-tcltk/tkimg/files/tkimg-1.3-warnings.patch b/dev-tcltk/tkimg/files/tkimg-1.3-warnings.patch
new file mode 100644
index 000000000000..5151b84f29ea
--- /dev/null
+++ b/dev-tcltk/tkimg/files/tkimg-1.3-warnings.patch
@@ -0,0 +1,35 @@
+--- bmp/bmp.c
++++ bmp/bmp.c
+@@ -446,9 +446,7 @@
+ }
+ if ((rleBuf[0]==0) && (rleBuf[1]==2)) {
+ /* Deltarecord */
+- /* printf ("Deltarecord\n"); fflush (stdout); */
+- x += rleBuf[2];
+- y += rleBuf[3];
++ Tcl_AppendResult(interp, "Delta records not supported.", (char *)NULL);
+ }
+ }
+ }
+--- ps/ps.c
++++ ps/ps.c
+@@ -171,7 +171,7 @@
+ (tkimg_Read(handle, (char *) buf, 40) == 40))) {
+ int w, h, zoomx, zoomy;
+ char *p = buf;
+- buf[41] = 0;
++ buf[40] = 0;
+ w = - (int) strtoul(p, &p, 0);
+ h = - (int) strtoul(p, &p, 0);
+ w += strtoul(p, &p, 0);
+--- tiff/tiff.c
++++ tiff/tiff.c
+@@ -561,7 +561,7 @@
+ int srcX, srcY;
+ {
+ myblock bl;
+- unsigned char *pixelPtr = block.pixelPtr;
++ unsigned char *pixelPtr;
+ uint32 w, h;
+ size_t npixels;
+ uint32 *raster;
diff --git a/dev-tcltk/tkimg/metadata.xml b/dev-tcltk/tkimg/metadata.xml
new file mode 100644
index 000000000000..efad7846fd5d
--- /dev/null
+++ b/dev-tcltk/tkimg/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>tcltk</herd>
+<maintainer>
+ <email>bicatali@gentoo.org</email>
+ <name>Sébastien Fabbro</name>
+ <description>Feel free to take over</description>
+</maintainer>
+<longdescription lang="en">
+ The "Img" package adds a lot of image formats to Tcl/Tk.
+</longdescription>
+</pkgmetadata>
diff --git a/dev-tcltk/tkimg/tkimg-1.3.ebuild b/dev-tcltk/tkimg/tkimg-1.3.ebuild
new file mode 100644
index 000000000000..863767fd72a9
--- /dev/null
+++ b/dev-tcltk/tkimg/tkimg-1.3.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-tcltk/tkimg/tkimg-1.3.ebuild,v 1.1 2008/04/11 11:26:20 bicatali Exp $
+
+inherit eutils autotools
+
+MY_P=${PN}${PV}
+DESCRIPTION="Adds a lot of image formats to Tcl/Tk"
+HOMEPAGE="http://sourceforge.net/projects/tkimg/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"
+
+IUSE=""
+SLOT="0"
+LICENSE="BSD"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="dev-lang/tk
+ media-libs/libpng
+ media-libs/tiff"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-m4.patch
+ epatch "${FILESDIR}"/${P}-syslibs.patch
+ epatch "${FILESDIR}"/${P}-makedeps.patch
+ epatch "${FILESDIR}"/${P}-warnings.patch
+ rm -f $(find . -name configure)
+ for i in $(find -type d); do
+ cd "${S}"/${i}
+ [[ -f configure.in ]] && eautoreconf
+ done
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ INSTALL_ROOT="${D}" \
+ install || die "emake install failed"
+ doman doc/man/*
+ dodoc ChangeLog README Reorganization.Notes.txt changes ANNOUNCE || die
+ insinto /usr/share/doc/${PF}
+ doins -r demo
+ use doc && dohtml doc/html
+}