diff options
author | Jurek Bartuszek <jurek@gentoo.org> | 2007-09-24 17:26:38 +0000 |
---|---|---|
committer | Jurek Bartuszek <jurek@gentoo.org> | 2007-09-24 17:26:38 +0000 |
commit | f1842eef02d035f8592508cf04c1b99a1c1a9ddd (patch) | |
tree | 65d9b33da5be63dc7e7e9a14578b31c4e1520ccb /dev-dotnet/libgdiplus | |
parent | Revision bump, pulling in Linux 2.6.20.20. Removing some of the older revisions. (diff) | |
download | gentoo-2-f1842eef02d035f8592508cf04c1b99a1c1a9ddd.tar.gz gentoo-2-f1842eef02d035f8592508cf04c1b99a1c1a9ddd.tar.bz2 gentoo-2-f1842eef02d035f8592508cf04c1b99a1c1a9ddd.zip |
dev-dotnet/libgdiplus-1.2.5-r1: Fix linking against image libraries (bug #192068)
(Portage version: 2.1.3.9)
Diffstat (limited to 'dev-dotnet/libgdiplus')
-rw-r--r-- | dev-dotnet/libgdiplus/ChangeLog | 8 | ||||
-rw-r--r-- | dev-dotnet/libgdiplus/files/digest-libgdiplus-1.2.5-r1 | 3 | ||||
-rw-r--r-- | dev-dotnet/libgdiplus/files/libgdiplus-1.2.5-imglibs.patch | 212 | ||||
-rw-r--r-- | dev-dotnet/libgdiplus/libgdiplus-1.2.5-r1.ebuild | 66 |
4 files changed, 288 insertions, 1 deletions
diff --git a/dev-dotnet/libgdiplus/ChangeLog b/dev-dotnet/libgdiplus/ChangeLog index 2068c90635f6..1628794791c7 100644 --- a/dev-dotnet/libgdiplus/ChangeLog +++ b/dev-dotnet/libgdiplus/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-dotnet/libgdiplus # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/libgdiplus/ChangeLog,v 1.77 2007/09/10 19:03:52 jurek Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/libgdiplus/ChangeLog,v 1.78 2007/09/24 17:26:38 jurek Exp $ + +*libgdiplus-1.2.5-r1 (24 Sep 2007) + + 24 Sep 2007; Jurek Bartuszek <jurek@gentoo.org> + +files/libgdiplus-1.2.5-imglibs.patch, +libgdiplus-1.2.5-r1.ebuild: + Fix linking against image libraries (bug #192068) *libgdiplus-1.2.5 (10 Sep 2007) diff --git a/dev-dotnet/libgdiplus/files/digest-libgdiplus-1.2.5-r1 b/dev-dotnet/libgdiplus/files/digest-libgdiplus-1.2.5-r1 new file mode 100644 index 000000000000..c690dc24f4f3 --- /dev/null +++ b/dev-dotnet/libgdiplus/files/digest-libgdiplus-1.2.5-r1 @@ -0,0 +1,3 @@ +MD5 82bbf6ca86b85e5148a15d8d88c6e548 libgdiplus-1.2.5.tar.bz2 2942165 +RMD160 84ecbb58edea5deb91b140e11461fb6fcf8b0f28 libgdiplus-1.2.5.tar.bz2 2942165 +SHA256 28edc21bc49f3791438ea70b5de944c4118a6daa557425f3209102379042e926 libgdiplus-1.2.5.tar.bz2 2942165 diff --git a/dev-dotnet/libgdiplus/files/libgdiplus-1.2.5-imglibs.patch b/dev-dotnet/libgdiplus/files/libgdiplus-1.2.5-imglibs.patch new file mode 100644 index 000000000000..109d8c5e1342 --- /dev/null +++ b/dev-dotnet/libgdiplus/files/libgdiplus-1.2.5-imglibs.patch @@ -0,0 +1,212 @@ +--- src/image.c 2007-07-24 21:12:28.000000000 +0000 ++++ src/image.c 2007-09-23 17:34:34.000000000 +0000 +@@ -915,18 +915,26 @@ + case BMP: + status = gdip_load_bmp_image_from_file (fp, &result); + break; ++#ifdef HAVE_LIBTIFF + case TIF: + status = gdip_load_tiff_image_from_file (fp, &result); + break; ++#endif ++#ifdef HAVE_LIBGIF + case GIF: + status = gdip_load_gif_image_from_file (fp, &result); + break; ++#endif ++#ifdef HAVE_LIBPNG + case PNG: + status = gdip_load_png_image_from_file (fp, &result); + break; ++#endif ++#ifdef HAVE_LIBJPEG + case JPEG: + status = gdip_load_jpeg_image_from_file (fp, file_name, &result); + break; ++#endif + case ICON: + status = gdip_load_ico_image_from_file (fp, &result); + break; +@@ -1012,18 +1020,22 @@ + file_name = (char *) ucs2_to_utf8 ((const gunichar2 *)file, -1); + if (file_name == NULL) + return InvalidParameter; +- ++ ++#ifdef HAVE_LIBGIF + if (format == GIF) { /* gif library has to open the file itself*/ + status = gdip_save_gif_image_to_file ((BYTE*)file_name, image); + GdipFree (file_name); + return status; +- } else if (format == TIF) { ++ } else ++#endif ++#ifdef HAVE_LIBTIFF ++ if (format == TIF) { + /* tif library has to open the file itself or seeking will fail when saving multi-page images*/ + status = gdip_save_tiff_image_to_file ((BYTE*)file_name, image, params); + GdipFree (file_name); + return status; + } +- ++#endif + if ((fp = fopen(file_name, "wb")) == NULL) { + GdipFree (file_name); + return GenericError; +@@ -1036,12 +1048,16 @@ + case ICON: + status = gdip_save_bmp_image_to_file (fp, image); + break; ++#ifdef HAVE_LIBPNG + case PNG: + status = gdip_save_png_image_to_file (fp, image, params); + break; ++#endif ++#ifdef HAVE_LIBJPEG + case JPEG: + status = gdip_save_jpeg_image_to_file (fp, image, params); + break; ++#endif + default: + status = NotImplemented; + break; +@@ -1945,7 +1961,7 @@ + /* GDI+ doesn't support this for metafiles */ + if (image->type != ImageTypeBitmap) + return NotImplemented; +- ++ /* is it correct if we don't have lib(jpeg,tiff,png) ? */ + switch(image->image_format) { + case TIF: + case JPEG: +@@ -2109,24 +2125,32 @@ + format = get_image_format ((char *)format_peek, format_peek_sz, &public_format); + + switch (format) { ++#ifdef HAVE_LIBJPEG + case JPEG: + loader = dstream_input_new (getBytesFunc, seekFunc); + status = gdip_load_jpeg_image_from_stream_delegate (loader, &result); + break; ++#endif ++#ifdef HAVE_LIBPNG + case PNG: + status = gdip_load_png_image_from_stream_delegate (getBytesFunc, seekFunc, &result); + break; ++#endif + case BMP: + loader = dstream_input_new (getBytesFunc, seekFunc); + status = gdip_load_bmp_image_from_stream_delegate (loader, &result); + break; ++#ifdef HAVE_LIBTIFF + case TIF: + status = gdip_load_tiff_image_from_stream_delegate (getBytesFunc, putBytesFunc, + seekFunc, closeFunc, sizeFunc, &result); + break; ++#endif ++#ifdef HAVE_LIBGIF + case GIF: + status = gdip_load_gif_image_from_stream_delegate (getBytesFunc, seekFunc, &result); + break; ++#endif + case ICON: + loader = dstream_input_new (getBytesFunc, seekFunc); + status = gdip_load_ico_image_from_stream_delegate (loader, &result); +@@ -2172,15 +2196,23 @@ + case ICON: + case BMP: + return gdip_save_bmp_image_to_stream_delegate (putBytesFunc, image); ++#ifdef HAVE_LIBPNG + case PNG: + return gdip_save_png_image_to_stream_delegate (putBytesFunc, image, params); ++#endif ++#ifdef HAVE_LIBJPEG + case JPEG: + return gdip_save_jpeg_image_to_stream_delegate (putBytesFunc, image, params); ++#endif ++#ifdef HAVE_LIBGIF + case GIF: + return gdip_save_gif_image_to_stream_delegate (putBytesFunc, image, params); ++#endif ++#ifdef HAVE_LIBTIFF + case TIF: + return gdip_save_tiff_image_to_stream_delegate (getBytesFunc, putBytesFunc, + seekFunc, closeFunc, sizeFunc, image, params); ++#endif + case INVALID: + return UnknownImageFormat; + default: +@@ -2217,6 +2249,7 @@ + dpos += sizeof (ImageCodecInfo); + g_decoders++; + ++#ifdef HAVE_LIBJPEG + /* JPEG codec (encoder+decoder) */ + if (gdip_getcodecinfo_jpeg ()) { + memcpy (dpos, gdip_getcodecinfo_jpeg(), sizeof (ImageCodecInfo)); +@@ -2226,7 +2259,8 @@ + epos += sizeof (ImageCodecInfo); + g_encoders++; + } +- ++#endif ++#ifdef HAVE_LIBGIF + /* GIF codec (encoder+decoder) */ + if (gdip_getcodecinfo_gif ()) { + memcpy (dpos, gdip_getcodecinfo_gif (), sizeof (ImageCodecInfo)); +@@ -2236,7 +2270,8 @@ + epos += sizeof (ImageCodecInfo); + g_encoders++; + } +- ++#endif ++#ifdef HAVE_LIBTIFF + /* TIFF codec (encoder+decoder) */ + if (gdip_getcodecinfo_tiff ()) { + memcpy (dpos, gdip_getcodecinfo_tiff (), sizeof (ImageCodecInfo)); +@@ -2246,7 +2281,8 @@ + epos += sizeof (ImageCodecInfo); + g_encoders++; + } +- ++#endif ++#ifdef HAVE_LIBPNG + /* PNG codec (encoder+decoder) */ + if (gdip_getcodecinfo_png ()) { + memcpy (dpos, gdip_getcodecinfo_png (), sizeof (ImageCodecInfo)); +@@ -2256,7 +2292,7 @@ + epos += sizeof (ImageCodecInfo); + g_encoders++; + } +- ++#endif + /* WMF codec (decoder-only) */ + if (gdip_getcodecinfo_wmf ()) { + memcpy (dpos, gdip_getcodecinfo_wmf (), sizeof (ImageCodecInfo)); +@@ -2386,9 +2422,11 @@ + fmt = gdip_get_imageformat_from_codec_clsid ((CLSID *) clsidEncoder); + + switch (fmt) { ++#ifdef HAVE_LIBJPEG + case JPEG: + *size = gdip_get_encoder_parameter_list_size_jpeg (); + return Ok; ++#endif + case TIF: + *size = 0; + return NotImplemented; +@@ -2410,10 +2448,14 @@ + fmt = gdip_get_imageformat_from_codec_clsid ((CLSID *) clsidEncoder); + + switch (fmt) { ++#ifdef HAVE_LIBJPEG + case JPEG: + return gdip_fill_encoder_parameter_list_jpeg (buffer, size); ++#endif ++#ifdef HAVE_LIBTIFF + case TIF: + return NotImplemented; ++#endif + default: + break; + } diff --git a/dev-dotnet/libgdiplus/libgdiplus-1.2.5-r1.ebuild b/dev-dotnet/libgdiplus/libgdiplus-1.2.5-r1.ebuild new file mode 100644 index 000000000000..e4cd055c4e7e --- /dev/null +++ b/dev-dotnet/libgdiplus/libgdiplus-1.2.5-r1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-dotnet/libgdiplus/libgdiplus-1.2.5-r1.ebuild,v 1.1 2007/09/24 17:26:38 jurek Exp $ + +inherit eutils flag-o-matic toolchain-funcs autotools + +DESCRIPTION="Library for using System.Drawing with mono" +HOMEPAGE="http://www.go-mono.com/" +SRC_URI="http://www.go-mono.com/sources/${PN}/${P}.tar.bz2" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="exif gif jpeg tiff" + +RDEPEND=">=dev-libs/glib-2.6 + >=media-libs/freetype-2 + >=media-libs/fontconfig-2 + media-libs/libpng + x11-libs/libXrender + x11-libs/libX11 + x11-libs/libXt + exif? ( media-libs/libexif ) + gif? ( >=media-libs/giflib-4.1.3 ) + jpeg? ( media-libs/jpeg ) + tiff? ( media-libs/tiff )" +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.19" + +RESTRICT="test" + +src_unpack() { + unpack ${A} + cd ${S} + + epatch ${FILESDIR}/${PN}-1.1.13-libungif-configure-fix.diff + epatch ${FILESDIR}/${P}-imglibs.patch + eautoreconf +} + +src_compile() { + if [[ "$(gcc-major-version)" -gt "3" ]] || \ + ( [[ "$(gcc-major-version)" -eq "3" ]] && [[ "$(gcc-minor-version)" -gt "3" ]] ) + then + append-flags -fno-inline-functions + fi + + # Disable glitz support as libgdiplus does not use it, and it causes errors + econf --disable-glitz \ + $(use_with exif libexif) \ + $(use_with gif libgif) \ + $(use_with jpeg libjpeg) \ + $(use_with tiff libtiff) || die "configure failed" + + # attribute ((__stdcall__)) generates warnings on ppc + if use ppc ; then + sed -i -e 's:-Werror::g' src/Makefile + fi + + emake || die "compile failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + dodoc AUTHORS ChangeLog NEWS README +} |