diff options
Diffstat (limited to 'dev-tcltk/tkimg')
-rw-r--r-- | dev-tcltk/tkimg/Manifest | 6 | ||||
-rw-r--r-- | dev-tcltk/tkimg/files/tkimg-1.4-jpeg-9.patch | 18 | ||||
-rw-r--r-- | dev-tcltk/tkimg/files/tkimg-1.4-png2.patch | 36 | ||||
-rw-r--r-- | dev-tcltk/tkimg/metadata.xml | 14 | ||||
-rw-r--r-- | dev-tcltk/tkimg/tkimg-1.4-r9.ebuild | 90 |
5 files changed, 164 insertions, 0 deletions
diff --git a/dev-tcltk/tkimg/Manifest b/dev-tcltk/tkimg/Manifest new file mode 100644 index 000000000000..a4912066dee0 --- /dev/null +++ b/dev-tcltk/tkimg/Manifest @@ -0,0 +1,6 @@ +AUX tkimg-1.4-jpeg-9.patch 364 BLAKE2B bc9b3e4e404b49a9909d7198929033ebee4ab839f1f2ec71aea9435637bdcb6a3f0dd9c2ed379d9e0f7215853b0e693337876ac0842a37b32533151ef4d9b739 SHA512 4bb6cf0b7774700d607bccfb1590660344754749c40acefcba23046333b1029006acede784177473c629ab63247402bbbc4ab172946485af950c5e8ec6abb8c9 +AUX tkimg-1.4-png2.patch 1044 BLAKE2B 236e5fa637b4b1cc6c74dd85d4fe73520941af360873b0455ab146c443d844470d6afb67071976cd1850a79e0906b7374947d2c802c8ba85f83682c6ae0f77a5 SHA512 fbf982af5446fc54212745eee8338d5dc4b169f79045963be23a84c7a0ef9e68f54d895156b4f040f6585499f1ead9967ac0ce57106e3ca3615fbaa9adcd1fb7 +DIST tkimg-1.4-patchset-1.tar.xz 17956 BLAKE2B f6d3e5e5f258434bd02e21271357f2e2013ce7c90f2d1862e8e7ac0f1cf235d39b1713434a00261ec442c1843a70194b4d14081a5d4cec07c8ad6bf45bbf1db3 SHA512 bd20e0beaa224c42e856e6d44d86c2a5f04c28d096c561f44c4afcf8c821bf859c602156a9be60f23f906e8da2f43c89ca358d32e8f9497296e7c5a5bf23ed69 +DIST tkimg1.4.tar.bz2 4912894 BLAKE2B 630ce6b95f42f0883373970ff919493d34cf4a61119af9520702079c6272f9b6ddbc6241197b39ac509d9b2c76c6f3d3bd29944acea4cdc1c82134cba473818a SHA512 b03aba6e21e35b8733dbc4fa66fae67284a05e68248e5afb2a85c1520c74d0c6c5091860a3ab682f4a662a318c562339e9b7b82f050e63bbf48d1b4757d379a1 +EBUILD tkimg-1.4-r9.ebuild 1842 BLAKE2B 470dcd82e9d64a0e809c39679ce8fa602f14d085eba6a665fbb112f0810a216378688a5fdec79e8bd16a6a06f4fa0a6efdac8e6742aa90449e2d674c38debc9d SHA512 35c3e79accf91eb48d577eb019c65125ca4ced5add2c2130599b3d92a8f4970ad1238df0dcf6cc22dadadb51d624338515933a522918b0b3cd1cd39e1f8d1e89 +MISC metadata.xml 436 BLAKE2B 264c09c99797be5f1a242a1146d8552ab4cf632ad404d950829d102b2f3f8a40c5542ff04e9770a4870153843e462298af802e6caaff9e5bbb37abdb32697155 SHA512 d0401ca91110d4ffb90190d7135d3a5e6ef1aa0d3106cd7a84e72e64f3f565ee2ef30ac19aa2f119838a50d9c926132b93f2723a763d25b819db42fc57c16adf diff --git a/dev-tcltk/tkimg/files/tkimg-1.4-jpeg-9.patch b/dev-tcltk/tkimg/files/tkimg-1.4-jpeg-9.patch new file mode 100644 index 000000000000..23000ac7922c --- /dev/null +++ b/dev-tcltk/tkimg/files/tkimg-1.4-jpeg-9.patch @@ -0,0 +1,18 @@ +Fix build with jpeg-9, bug #520886 + +--- a/jpeg/jpeg.c 2010-06-17 15:40:24.000000000 +0200 ++++ b/jpeg/jpeg.c 2018-02-07 23:26:38.050073397 +0100 +@@ -53,6 +53,13 @@ + */ + + #include "tkimg.h" ++#ifndef FALSE ++#define FALSE 0 ++#endif ++#ifndef TRUE ++#define TRUE 1 ++#endif ++#define HAVE_BOOLEAN + #include "jpegtcl.h" + + static int SetupJPegLibrary(Tcl_Interp *interp); diff --git a/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch new file mode 100644 index 000000000000..195e9be43fa7 --- /dev/null +++ b/dev-tcltk/tkimg/files/tkimg-1.4-png2.patch @@ -0,0 +1,36 @@ +--- png/png.c.orig 2010-06-17 06:40:24.000000000 -0700 ++++ png/png.c 2013-04-23 20:57:32.000000000 -0700 +@@ -332,6 +332,16 @@ + png_set_expand(png_ptr); + } + ++ if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) { ++ png_set_sRGB(png_ptr, info_ptr, intent); ++ } else if (png_get_gAMA) { ++ double gamma; ++ if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) { ++ gamma = 0.45455; ++ } ++ png_set_gamma(png_ptr, 1.0, gamma); ++ } ++ + png_read_update_info(png_ptr,info_ptr); + block.pixelSize = png_get_channels(png_ptr, info_ptr); + block.pitch = png_get_rowbytes(png_ptr, info_ptr); +@@ -353,16 +363,6 @@ + block.offset[3] = 0; + } + +- if (png_get_sRGB && png_get_sRGB(png_ptr, info_ptr, &intent)) { +- png_set_sRGB(png_ptr, info_ptr, intent); +- } else if (png_get_gAMA) { +- double gamma; +- if (!png_get_gAMA(png_ptr, info_ptr, &gamma)) { +- gamma = 0.45455; +- } +- png_set_gamma(png_ptr, 1.0, gamma); +- } +- + png_data= (char **) ckalloc(sizeof(char *) * info_height + + info_height * block.pitch); + diff --git a/dev-tcltk/tkimg/metadata.xml b/dev-tcltk/tkimg/metadata.xml new file mode 100644 index 000000000000..b1e9347d617c --- /dev/null +++ b/dev-tcltk/tkimg/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>tcltk@gentoo.org</email> + <name>Gentoo Tcltk Project</name> + </maintainer> + <longdescription lang="en"> + The "Img" package adds a lot of image formats to Tcl/Tk. + </longdescription> + <upstream> + <remote-id type="sourceforge">tkimg</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild b/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild new file mode 100644 index 000000000000..155c4483e327 --- /dev/null +++ b/dev-tcltk/tkimg/tkimg-1.4-r9.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils multilib prefix toolchain-funcs virtualx + +MYP="${PN}${PV}" + +DESCRIPTION="Adds a lot of image formats to Tcl/Tk" +HOMEPAGE="http://tkimg.sourceforge.net/" +SRC_URI=" + https://dev.gentoo.org/~jlec/distfiles/${P}-patchset-1.tar.xz + mirror://sourceforge/${PN}/${PV}/${MYP}.tar.bz2" + +SLOT="0" +LICENSE="BSD" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" +IUSE="doc test static-libs" + +RDEPEND=" + dev-lang/tk:= + >=dev-tcltk/tcllib-1.11 + media-libs/tiff:0= + >=media-libs/libpng-1.6:0= + >=sys-libs/zlib-1.2.7:= + x11-libs/libX11 + virtual/jpeg:=" +DEPEND="${RDEPEND} + test? ( + x11-apps/xhost + media-fonts/font-misc-misc + media-fonts/font-cursor-misc )" + +# Fails with jpeg-turbo silently, #386253 +#RESTRICT="test" + +S="${WORKDIR}/${MYP}" + +src_prepare() { + epatch \ + "${WORKDIR}"/${P}-jpeg.patch \ + "${FILESDIR}"/${P}-jpeg-9.patch \ + "${WORKDIR}"/${P}-tiff.patch \ + "${WORKDIR}"/${P}-png.patch \ + "${FILESDIR}"/${P}-png2.patch \ + "${WORKDIR}"/${P}-zlib.patch + + find compat/{libjpeg,libpng,zlib,libtiff} -delete + + sed \ + -e 's:-O2 -fomit-frame-pointer::g' \ + -e 's: -pipe::g' \ + -i */configure || die + + eprefixify */*.h + tc-export AR +} + +src_test() { + Xemake test || die "Xmake failed" +} + +src_install() { + local l bl + + emake \ + DESTDIR="${D}" \ + INSTALL_ROOT="${D}" \ + install + + if ! use static-libs; then + find "${ED}"/usr/$(get_libdir)/ -type f -name "*\.a" -delete || die + fi + + # Make library links + for l in "${ED}"/usr/lib*/Img*/*tcl*.so; do + bl=$(basename $l) + dosym Img1.4/${bl} /usr/$(get_libdir)/${bl} + done + + dodoc ChangeLog README Reorganization.Notes.txt changes ANNOUNCE + + if use doc; then + insinto /usr/share/doc/${PF} + doins demo.tcl + insinto /usr/share/doc/${PF}/html + doins -r doc/* + fi +} |