public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libafterimage/, media-libs/libafterimage/files/
@ 2016-05-02 15:52 Andrew Savchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Savchenko @ 2016-05-02 15:52 UTC (permalink / raw
  To: gentoo-commits

commit:     3d5b16d3365e80c281e9131e011a6d88ddf61167
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Mon May  2 15:51:22 2016 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Mon May  2 15:51:43 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d5b16d3

media-libs/libafterimage-1.20-r1: fix bug 571654

- port to giflib-5 API;
- update ebuild to EAPI 6;
- add new USE flags and deps for previously ignored dependencies.

Package-Manager: portage-2.2.28
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 .../files/libafterimage-giflib5.patch              | 382 +++++++++++++++++++++
 .../libafterimage/libafterimage-1.20-r1.ebuild     | 108 ++++++
 media-libs/libafterimage/metadata.xml              |   4 +
 3 files changed, 494 insertions(+)

diff --git a/media-libs/libafterimage/files/libafterimage-giflib5.patch b/media-libs/libafterimage/files/libafterimage-giflib5.patch
new file mode 100644
index 0000000..32037d9
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-giflib5.patch
@@ -0,0 +1,382 @@
+diff -Naurd libAfterImage-1.20.orig/export.c libAfterImage-1.20/export.c
+--- libAfterImage-1.20.orig/export.c	2016-05-01 11:44:19.000000000 +0300
++++ libAfterImage-1.20/export.c	2016-05-02 10:57:59.688984491 +0300
+@@ -1048,6 +1048,9 @@
+ 	Bool new_image = True ;
+ 	START_TIME(started);
+ 	int cmap_size = 1;
++#if (GIFLIB_MAJOR>=5)
++	int errcode;
++#endif
+ #define GIF_NETSCAPE_EXT_BYTES 3
+ 	unsigned char netscape_ext_bytes[GIF_NETSCAPE_EXT_BYTES] = { 0x1, 0x0, 0x0};
+ #define GIF_GCE_BYTES 4	
+@@ -1086,10 +1089,18 @@
+ 
+ 	while( cmap_size < 256 && cmap_size < (int)cmap.count+(gce_bytes[0]&0x01) )
+ 		cmap_size = cmap_size<<1 ;
++#if (GIFLIB_MAJOR>=5)
++	if( (gif_cmap = GifMakeMapObject(cmap_size, NULL )) == NULL )
++#else
+ 	if( (gif_cmap = MakeMapObject(cmap_size, NULL )) == NULL )
++#endif
+ 	{
+ 		free( mapped_im );
++#if (GIFLIB_MAJOR>=5)
++		ASIM_PrintGifError(E_GIF_ERR_NOT_ENOUGH_MEM);
++#else
+ 		ASIM_PrintGifError();
++#endif
+ 		return False;
+ 	}
+ 	memcpy( &(gif_cmap->Colors[0]), &(cmap.entries[0]), MIN(cmap.count,(unsigned int)cmap_size)*3 );
+@@ -1101,13 +1112,25 @@
+ 		SavedImage *images = NULL ;
+ 		int count = 0 ;
+ 		/* TODO: do something about multiimage files !!! */
++#if (GIFLIB_MAJOR>=5)
++		gif = open_gif_read(infile, &errcode);
++#else
+ 		gif = open_gif_read(infile);
++#endif
+ 		if( gif == NULL || get_gif_saved_images(gif, -1, &images, &count) == GIF_ERROR)
+ 		{
++#if (GIFLIB_MAJOR>=5)
++			ASIM_PrintGifError(errcode);
++#else
+ 			ASIM_PrintGifError();
++#endif
+ 			if( gif )
+ 			{
++#if (GIFLIB_MAJOR>=5)
++				DGifCloseFile(gif, &errcode);
++#else
+ 				DGifCloseFile(gif);
++#endif
+ 				gif = NULL ;
+ 			}
+ 			if (infile)
+@@ -1123,14 +1146,22 @@
+ 			gif_src = *gif ;
+ 			gif->SColorMap = NULL ;
+ 			gif->Image.ColorMap = NULL ;
++#if (GIFLIB_MAJOR>=5)
++            DGifCloseFile(gif, &errcode);
++#else
+ 			DGifCloseFile(gif);
++#endif
+ 			gif = NULL;
+ 			fclose (infile);
+ 			infile = NULL;
+ 			outfile = open_writeable_image_file( path );
+ 
+ 			if (outfile)
++#if (GIFLIB_MAJOR>=5)
++				gif = EGifOpenFileHandle(fileno(outfile), &errcode);
++#else
+ 				gif = EGifOpenFileHandle(fileno(outfile));
++#endif
+ 				
+ 			if (gif)
+ 			{
+@@ -1141,26 +1172,46 @@
+ 									   gif_src.SColorMap )) == GIF_OK )
+ 					status = write_gif_saved_images( gif, images, count );
+ 				if( status != GIF_OK )
++#if (GIFLIB_MAJOR>=5)
++					ASIM_PrintGifError(status);
++#else
+ 					ASIM_PrintGifError();
++#endif
+ 			}
+ 			if (gif_src.SColorMap)
+ 			{  /* we only want to save private colormap if it is any different from
+ 			    * screen colormap ( saves us  768 bytes per image ) */
+ 				if( gif_cmap->ColorCount == gif_src.SColorMap->ColorCount )
+ 					dont_save_cmap = ( memcmp( gif_cmap->Colors, gif_src.SColorMap->Colors, gif_cmap->ColorCount*sizeof(GifColorType)) == 0 );
++#if (GIFLIB_MAJOR>=5)
++				GifFreeMapObject(gif_src.SColorMap);
++#else
+ 				FreeMapObject(gif_src.SColorMap);
++#endif
+ 			}
+ 			if (gif)
+ 			{
+ 				EGifPutExtension(gif, GRAPHICS_EXT_FUNC_CODE, GIF_GCE_BYTES, &(gce_bytes[0]));
+ 				if( get_flags( params->gif.flags, EXPORT_ANIMATION_REPEATS ) )
+ 				{
++#if (GIFLIB_MAJOR>=5)
++					EGifPutExtensionLeader(gif, APPLICATION_EXT_FUNC_CODE);
++					EGifPutExtensionBlock(gif, 11, "NETSCAPE2.0");
++					EGifPutExtensionBlock(gif, GIF_NETSCAPE_EXT_BYTES, &(netscape_ext_bytes[0]));
++					EGifPutExtensionTrailer(gif);
++#else
+ 					EGifPutExtensionFirst(gif, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0");
+ 					EGifPutExtensionLast(gif, 0, GIF_NETSCAPE_EXT_BYTES, &(netscape_ext_bytes[0]));
++#endif
+ 				}
+ 				
++#if (GIFLIB_MAJOR>=5)
++				if( (errcode = EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, (dont_save_cmap)?NULL:gif_cmap )) == GIF_ERROR )
++					ASIM_PrintGifError(errcode);
++#else
+ 				if( EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, (dont_save_cmap)?NULL:gif_cmap ) == GIF_ERROR )
+ 					ASIM_PrintGifError();
++#endif
+ 			}
+ 		}
+ 		free_gif_saved_images( images, count );
+@@ -1172,24 +1223,46 @@
+ 			outfile = open_writeable_image_file(path);
+ 			
+ 		if (outfile)
++        {
++#if (GIFLIB_MAJOR>=5)
++			gif = EGifOpenFileHandle(fileno(outfile), &errcode);
++			if (errcode != E_GIF_SUCCEEDED)
++				ASIM_PrintGifError(errcode);
++#else
+ 			if ((gif = EGifOpenFileHandle(fileno(outfile))) == NULL)
+ 				ASIM_PrintGifError();
++#endif
++        }
+ 	}
+ 
+ 	if( new_image && gif )
+ 	{
++#if (GIFLIB_MAJOR>=5)
++		if( (errcode = EGifPutScreenDesc(gif, im->width, im->height, cmap_size, 0, gif_cmap )) == GIF_ERROR )
++			ASIM_PrintGifError(errcode);
++#else
+ 		if( EGifPutScreenDesc(gif, im->width, im->height, cmap_size, 0, gif_cmap ) == GIF_ERROR )
+ 			ASIM_PrintGifError();
++#endif
+ 	
+ 		EGifPutExtension(gif, 0xf9, GIF_GCE_BYTES, &(gce_bytes[0]));
+ 	
++#if (GIFLIB_MAJOR>=5)
++		if( (errcode = EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, NULL )) == GIF_ERROR )
++			ASIM_PrintGifError(errcode);
++#else
+ 		if( EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, NULL ) == GIF_ERROR )
+ 			ASIM_PrintGifError();
++#endif
+ 	}
+ 
+ 	if( gif_cmap )
+ 	{
++#if (GIFLIB_MAJOR>=5)
++		GifFreeMapObject(gif_cmap);
++#else
+ 		FreeMapObject(gif_cmap);
++#endif
+ 		gif_cmap = NULL ;
+ 	}
+ 	if( gif )
+@@ -1203,12 +1276,23 @@
+ 			register int *src = mapped_im + x*y;
+ 	  	    while( --x >= 0 )
+ 	  			row_pointer[x] = src[x] ;
++#if (GIFLIB_MAJOR>=5)
++			if( (errcode = EGifPutLine(gif, row_pointer, im->width))  == GIF_ERROR)
++				ASIM_PrintGifError(errcode);
++#else
+ 			if( EGifPutLine(gif, row_pointer, im->width)  == GIF_ERROR)
+ 				ASIM_PrintGifError();
++#endif
+ 		}
+ 		free( row_pointer );
++#if (GIFLIB_MAJOR>=5)
++		EGifCloseFile(gif, &errcode);
++		if (errcode != E_GIF_SUCCEEDED)
++			ASIM_PrintGifError(errcode);
++#else
+ 		if (EGifCloseFile(gif) == GIF_ERROR)
+ 			ASIM_PrintGifError();
++#endif
+ 		gif = NULL;
+ 	}
+ 	free( mapped_im );
+diff -Naurd libAfterImage-1.20.orig/import.c libAfterImage-1.20/import.c
+--- libAfterImage-1.20.orig/import.c	2016-05-01 11:44:19.000000000 +0300
++++ libAfterImage-1.20/import.c	2016-05-02 11:01:58.979496755 +0300
+@@ -2178,6 +2178,9 @@
+ 	int  		transparent = -1 ;
+ 	unsigned int  		y;
+ 	unsigned int		width = 0, height = 0;
++#if (GIFLIB_MAJOR>=5)
++	int errcode;
++#endif
+ 	ColorMapObject     *cmap = NULL ;
+ 
+ 	START_TIME(started);
+@@ -2186,7 +2189,11 @@
+ 	
+ 	if ((fp = open_image_file(path)) == NULL)
+ 		return NULL;
++#if (GIFLIB_MAJOR>=5)
++	if( (gif = open_gif_read(fp, &errcode)) != NULL )
++#else
+ 	if( (gif = open_gif_read(fp)) != NULL )
++#endif
+ 	{
+ 		SavedImage	*sp = NULL ;
+ 		int count = 0 ;
+@@ -2289,13 +2296,21 @@
+ 			}
+ 			free_gif_saved_images( sp, count );
+ 		}else if( status != GIF_OK ) 
++#if (GIFLIB_MAJOR>=5)
++			ASIM_PrintGifError(status);
++#else
+ 			ASIM_PrintGifError();
++#endif
+ 		else if( params->subimage == -1 )
+ 			show_error( "Image file \"%s\" does not have any valid image information.", path );
+ 		else
+ 			show_error( "Image file \"%s\" does not have subimage %d.", path, params->subimage );
+ 
++#if (GIFLIB_MAJOR>=5)
++		DGifCloseFile(gif, &errcode);
++#else
+ 		DGifCloseFile(gif);
++#endif
+ 		fclose( fp );
+ 	}
+ 	SHOW_TIME("image loading",started);
+diff -Naurd libAfterImage-1.20.orig/ungif.c libAfterImage-1.20/ungif.c
+--- libAfterImage-1.20.orig/ungif.c	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/ungif.c	2016-05-02 16:03:57.590148737 +0300
+@@ -75,13 +75,21 @@
+ 	if( sp )
+ 	{
+ 		if (sp->ImageDesc.ColorMap)
++#if (GIFLIB_MAJOR>=5)
++	    	GifFreeMapObject(sp->ImageDesc.ColorMap);
++#else
+ 	    	FreeMapObject(sp->ImageDesc.ColorMap);
++#endif
+ 
+ 		if (sp->RasterBits)
+ 		    free((char *)sp->RasterBits);
+ 
+ 		if (sp->ExtensionBlocks)
++#if (GIFLIB_MAJOR>=5)
++		    GifFreeExtensions(sp->ExtensionBlockCount, sp->ExtensionBlocks);
++#else
+ 		    FreeExtension(sp);
++#endif
+ 
+ 		if( !reusable )
+ 			free( sp );
+@@ -119,11 +127,19 @@
+ 	return ret;
+ }
+ 
++#if (GIFLIB_MAJOR>=5)
++GifFileType*
++open_gif_read( FILE *in_stream, int *errcode )
++{
++	return DGifOpen(in_stream, fread_gif, errcode);
++}
++#else
+ GifFileType*
+ open_gif_read( FILE *in_stream )
+ {
+ 	return DGifOpen(in_stream, fread_gif);
+ }
++#endif
+ 
+ int
+ get_gif_image_desc( GifFileType *gif, SavedImage *im )
+@@ -151,7 +167,11 @@
+ 		memcpy( &(im->ImageDesc), &(gif->Image), sizeof(GifImageDesc));
+ 		if( gif->Image.ColorMap )
+ 		{
++#if (GIFLIB_MAJOR>=5)
++			im->ImageDesc.ColorMap = GifMakeMapObject(gif->Image.ColorMap->ColorCount, NULL);
++#else
+ 			im->ImageDesc.ColorMap = MakeMapObject(gif->Image.ColorMap->ColorCount, NULL);
++#endif
+ 			fseek( gif->UserData, start_pos+9, SEEK_SET ); 
+ 			fread( im->ImageDesc.ColorMap->Colors, 1, gif->Image.ColorMap->ColorCount*3, gif->UserData);
+ 			fseek( gif->UserData, end_pos, SEEK_SET );
+@@ -166,6 +186,9 @@
+ {
+     GifRecordType RecordType;
+     GifByteType *ExtData;
++#if (GIFLIB_MAJOR>=5)
++    int ExtCode;
++#endif
+     SavedImage temp_save;
+ 	int curr_image = 0, ret_count = *ret_images ;
+ 	int status = GIF_OK;
+@@ -197,13 +220,23 @@
+ 				break;
+ 
+ 	    	case EXTENSION_RECORD_TYPE:
++#if (GIFLIB_MAJOR>=5)
++				status = DGifGetExtension(gif,&ExtCode,&ExtData);
++#else
+ 				status = DGifGetExtension(gif,&temp_save.Function,&ExtData);
++#endif
+ 				while (ExtData != NULL && status == GIF_OK )
+ 				{
+             		/* Create an extension block with our data */
++#if (GIFLIB_MAJOR>=5)
++            		if ((status = GifAddExtensionBlock(&temp_save.ExtensionBlockCount, &temp_save.ExtensionBlocks,
++                            ExtCode, sizeof(ExtData), ExtData)) == GIF_OK)
++                    status = DGifGetExtension(gif,&ExtCode,&ExtData);
++#else
+             		if ((status = AddExtensionBlock(&temp_save, ExtData[0], (char*)&(ExtData[1]))) == GIF_OK)
+ 				    	status = DGifGetExtensionNext(gif, &ExtData);
+             		temp_save.Function = 0;
++#endif
+ 				}
+ 				break;
+ 
+diff -Naurd libAfterImage-1.20.orig/ungif.h libAfterImage-1.20/ungif.h
+--- libAfterImage-1.20.orig/ungif.h	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/ungif.h	2016-05-02 10:57:59.715983533 +0300
+@@ -7,11 +7,29 @@
+ extern "C" {
+ #endif
+ 
++#if ((GIFLIB_MAJOR==4) && (GIFLIB_MINOR>=2)) 
++static inline void PrintGifError(void) {
++    fprintf(stderr, "%s\n", GifErrorString());
++}
++#elif (GIFLIB_MAJOR>=5)
++static inline void PrintGifError(int code) {
++    fprintf(stderr, "%s\n", GifErrorString(code));
++}
++#endif
++
++#if (GIFLIB_MAJOR>=5)
++#ifdef __GNUC__
++#define ASIM_PrintGifError(code) do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(code); }while(0)
++#else
++#define ASIM_PrintGifError(code) do{ PrintGifError(code); }while(0)
++#endif
++#else // (GIFLIB_MAJOR>=5)
+ #ifdef __GNUC__
+ #define ASIM_PrintGifError() do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(); }while(0)
+ #else
+ #define ASIM_PrintGifError() do{ PrintGifError(); }while(0)
+ #endif
++#endif // (GIFLIB_MAJOR>=5)
+ 
+ #define GIF_GCE_DELAY_BYTE_LOW	1
+ #define GIF_GCE_DELAY_BYTE_HIGH	2
+@@ -24,7 +42,11 @@
+ 
+ 
+ int fread_gif( GifFileType *gif, GifByteType* buf, int len );
++#if (GIFLIB_MAJOR>=5)
++GifFileType* open_gif_read( FILE *in_stream, int *errcode );
++#else
+ GifFileType* open_gif_read( FILE *in_stream );
++#endif
+ 
+ int get_gif_image_desc( GifFileType *gif, SavedImage *im );
+ 

diff --git a/media-libs/libafterimage/libafterimage-1.20-r1.ebuild b/media-libs/libafterimage/libafterimage-1.20-r1.ebuild
new file mode 100644
index 0000000..8d289c3
--- /dev/null
+++ b/media-libs/libafterimage/libafterimage-1.20-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit autotools
+
+MY_PN=libAfterImage
+
+DESCRIPTION="Afterstep's standalone generic image manipulation library"
+HOMEPAGE="http://www.afterstep.org/afterimage/index.php"
+SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE="+X cpu_flags_x86_mmx examples gif jpeg nls opengl png static-libs shm +shaping svg tiff truetype"
+
+RDEPEND="
+	X?		( x11-libs/libSM
+			  x11-libs/libXext
+			  x11-libs/libXrender )
+	gif?	( media-libs/giflib )
+	jpeg?	( virtual/jpeg:= )
+	opengl?	( virtual/opengl )
+	png?	( >=media-libs/libpng-1.4:0 )
+	svg?	( gnome-base/librsvg )
+	tiff?	( media-libs/tiff:0 )
+	truetype? ( media-libs/freetype )"
+DEPEND="${RDEPEND}
+	X?		( x11-proto/xextproto )
+	virtual/pkgconfig
+	!!x11-wm/afterstep"
+REQUIRED_USE="
+	opengl?	 ( X )
+	shaping? ( X )
+	shm?	 ( X )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+	default
+
+	# fix some ldconfig problem in makefile.in
+	eapply -p0 "${FILESDIR}"/${PN}-makefile.in.patch
+	# fix lib paths in afterimage-config
+	eapply -p0 "${FILESDIR}"/${PN}-config.patch
+	# fix gif unbundle
+	eapply -p0 "${FILESDIR}"/${PN}-gif.patch
+	# fix for libpng15 compability
+	eapply -p0 "${FILESDIR}"/${PN}-libpng15.patch
+	# add giflib-5 API support, bug 571654
+	eapply "${FILESDIR}"/${PN}-giflib5.patch
+	# do not build examples
+	use examples || sed -i \
+		-e '/^all:/s/apps//' \
+		-e '/^install:/s/install.apps//' \
+		Makefile.in || die "sed failed"
+	# remove forced flags
+	sed -i \
+		-e 's/CFLAGS="-O3"//' \
+		-e 's/ -rdynamic//' \
+		configure.in || die "sed failed"
+
+	mv configure.in configure.ac || die
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_enable cpu_flags_x86_mmx mmx-optimization) \
+		$(use_enable opengl glx) \
+		$(use_enable nls i18n) \
+		$(use_enable shaping) \
+		$(use_enable shm shmimage ) \
+		$(use_enable static-libs staticlibs) \
+		$(use_with X x) \
+		$(use_with gif) \
+		$(use_with jpeg) \
+		$(use_with png) \
+		$(use_with svg) \
+		$(use_with tiff) \
+		$(use_with truetype ttf) \
+		--enable-sharedlibs \
+		--with-xpm \
+		--without-builtin-gif \
+		--without-builtin-jpeg \
+		--without-builtin-png \
+		--without-builtin-zlib \
+		--without-afterbase
+}
+
+src_install() {
+	emake \
+		DESTDIR="${D}" \
+		AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \
+		install
+	dodoc ChangeLog README
+	if use examples; then
+		cd apps || die
+		mv ascompose.man ascompose.1 || die
+		doman ascompose.1
+		emake clean
+		rm Makefile* ascompose.1 || die
+		insinto /usr/share/doc/${PF}/examples
+		doins *
+	fi
+}

diff --git a/media-libs/libafterimage/metadata.xml b/media-libs/libafterimage/metadata.xml
index 8f9405d..2366dac 100644
--- a/media-libs/libafterimage/metadata.xml
+++ b/media-libs/libafterimage/metadata.xml
@@ -16,4 +16,8 @@
   included, providing support for TrueType fonts using FreeType library,
   and anti-aliasing of standard fonts from X window system.
 </longdescription>
+<use>
+	<flag name="shaping">Use MIT shaped X windows extention.</flag>
+	<flag name="shm">Use MIT shared memory extention for X image transfer.</flag>
+</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libafterimage/, media-libs/libafterimage/files/
@ 2017-01-29 21:59 Jeroen Roovers
  0 siblings, 0 replies; 3+ messages in thread
From: Jeroen Roovers @ 2017-01-29 21:59 UTC (permalink / raw
  To: gentoo-commits

commit:     9cb83c1e90f21cfa14c10b66a530071cce27bf37
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 29 21:54:26 2017 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jan 29 21:59:14 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cb83c1e

media-libs/libafterimage: Old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/libafterimage-giflib42.patch             |  19 -
 .../files/libafterimage-giflib5.patch              | 382 ---------------------
 .../libafterimage/libafterimage-1.20-r1.ebuild     | 108 ------
 media-libs/libafterimage/libafterimage-1.20.ebuild |  95 -----
 4 files changed, 604 deletions(-)

diff --git a/media-libs/libafterimage/files/libafterimage-giflib42.patch b/media-libs/libafterimage/files/libafterimage-giflib42.patch
deleted file mode 100644
index b1b1f72..00000000
--- a/media-libs/libafterimage/files/libafterimage-giflib42.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Fix build failure with giflib 4.2.
-Patch by Andrew Savchenko <bircoph@gmail.com>.
-https://bugs.gentoo.org/486804
-
---- libAfterImage-1.20/ungif.h.orig
-+++ libAfterImage-1.20/ungif.h
-@@ -7,6 +7,12 @@
- extern "C" {
- #endif
- 
-+#if (GIFLIB_MAJOR>4) || ((GIFLIB_MAJOR==4) && (GIFLIB_MINOR>=2)) 
-+static inline void PrintGifError(void) {
-+    fprintf(stderr, "%s\n", GifErrorString());
-+}
-+#endif
-+
- #ifdef __GNUC__
- #define ASIM_PrintGifError() do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(); }while(0)
- #else

diff --git a/media-libs/libafterimage/files/libafterimage-giflib5.patch b/media-libs/libafterimage/files/libafterimage-giflib5.patch
deleted file mode 100644
index b650b24..00000000
--- a/media-libs/libafterimage/files/libafterimage-giflib5.patch
+++ /dev/null
@@ -1,382 +0,0 @@
-diff -Naurd libAfterImage-1.20.orig/export.c libAfterImage-1.20/export.c
---- libAfterImage-1.20.orig/export.c	2016-05-01 11:44:19.000000000 +0300
-+++ libAfterImage-1.20/export.c	2016-05-02 10:57:59.688984491 +0300
-@@ -1048,6 +1048,9 @@
- 	Bool new_image = True ;
- 	START_TIME(started);
- 	int cmap_size = 1;
-+#if (GIFLIB_MAJOR>=5)
-+	int errcode;
-+#endif
- #define GIF_NETSCAPE_EXT_BYTES 3
- 	unsigned char netscape_ext_bytes[GIF_NETSCAPE_EXT_BYTES] = { 0x1, 0x0, 0x0};
- #define GIF_GCE_BYTES 4	
-@@ -1086,10 +1089,18 @@
- 
- 	while( cmap_size < 256 && cmap_size < (int)cmap.count+(gce_bytes[0]&0x01) )
- 		cmap_size = cmap_size<<1 ;
-+#if (GIFLIB_MAJOR>=5)
-+	if( (gif_cmap = GifMakeMapObject(cmap_size, NULL )) == NULL )
-+#else
- 	if( (gif_cmap = MakeMapObject(cmap_size, NULL )) == NULL )
-+#endif
- 	{
- 		free( mapped_im );
-+#if (GIFLIB_MAJOR>=5)
-+		ASIM_PrintGifError(E_GIF_ERR_NOT_ENOUGH_MEM);
-+#else
- 		ASIM_PrintGifError();
-+#endif
- 		return False;
- 	}
- 	memcpy( &(gif_cmap->Colors[0]), &(cmap.entries[0]), MIN(cmap.count,(unsigned int)cmap_size)*3 );
-@@ -1101,13 +1112,25 @@
- 		SavedImage *images = NULL ;
- 		int count = 0 ;
- 		/* TODO: do something about multiimage files !!! */
-+#if (GIFLIB_MAJOR>=5)
-+		gif = open_gif_read(infile, &errcode);
-+#else
- 		gif = open_gif_read(infile);
-+#endif
- 		if( gif == NULL || get_gif_saved_images(gif, -1, &images, &count) == GIF_ERROR)
- 		{
-+#if (GIFLIB_MAJOR>=5)
-+			ASIM_PrintGifError(errcode);
-+#else
- 			ASIM_PrintGifError();
-+#endif
- 			if( gif )
- 			{
-+#if (GIFLIB_MAJOR>=5)
-+				DGifCloseFile(gif, &errcode);
-+#else
- 				DGifCloseFile(gif);
-+#endif
- 				gif = NULL ;
- 			}
- 			if (infile)
-@@ -1123,14 +1146,22 @@
- 			gif_src = *gif ;
- 			gif->SColorMap = NULL ;
- 			gif->Image.ColorMap = NULL ;
-+#if (GIFLIB_MAJOR>=5)
-+            DGifCloseFile(gif, &errcode);
-+#else
- 			DGifCloseFile(gif);
-+#endif
- 			gif = NULL;
- 			fclose (infile);
- 			infile = NULL;
- 			outfile = open_writeable_image_file( path );
- 
- 			if (outfile)
-+#if (GIFLIB_MAJOR>=5)
-+				gif = EGifOpenFileHandle(fileno(outfile), &errcode);
-+#else
- 				gif = EGifOpenFileHandle(fileno(outfile));
-+#endif
- 				
- 			if (gif)
- 			{
-@@ -1141,26 +1172,46 @@
- 									   gif_src.SColorMap )) == GIF_OK )
- 					status = write_gif_saved_images( gif, images, count );
- 				if( status != GIF_OK )
-+#if (GIFLIB_MAJOR>=5)
-+					ASIM_PrintGifError(status);
-+#else
- 					ASIM_PrintGifError();
-+#endif
- 			}
- 			if (gif_src.SColorMap)
- 			{  /* we only want to save private colormap if it is any different from
- 			    * screen colormap ( saves us  768 bytes per image ) */
- 				if( gif_cmap->ColorCount == gif_src.SColorMap->ColorCount )
- 					dont_save_cmap = ( memcmp( gif_cmap->Colors, gif_src.SColorMap->Colors, gif_cmap->ColorCount*sizeof(GifColorType)) == 0 );
-+#if (GIFLIB_MAJOR>=5)
-+				GifFreeMapObject(gif_src.SColorMap);
-+#else
- 				FreeMapObject(gif_src.SColorMap);
-+#endif
- 			}
- 			if (gif)
- 			{
- 				EGifPutExtension(gif, GRAPHICS_EXT_FUNC_CODE, GIF_GCE_BYTES, &(gce_bytes[0]));
- 				if( get_flags( params->gif.flags, EXPORT_ANIMATION_REPEATS ) )
- 				{
-+#if (GIFLIB_MAJOR>=5)
-+					EGifPutExtensionLeader(gif, APPLICATION_EXT_FUNC_CODE);
-+					EGifPutExtensionBlock(gif, 11, "NETSCAPE2.0");
-+					EGifPutExtensionBlock(gif, GIF_NETSCAPE_EXT_BYTES, &(netscape_ext_bytes[0]));
-+					EGifPutExtensionTrailer(gif);
-+#else
- 					EGifPutExtensionFirst(gif, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0");
- 					EGifPutExtensionLast(gif, 0, GIF_NETSCAPE_EXT_BYTES, &(netscape_ext_bytes[0]));
-+#endif
- 				}
- 				
-+#if (GIFLIB_MAJOR>=5)
-+				if( (errcode = EGifPutImageDesc(gif, 0, 0, im->width, im->height, false, (dont_save_cmap)?NULL:gif_cmap )) == GIF_ERROR )
-+					ASIM_PrintGifError(errcode);
-+#else
- 				if( EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, (dont_save_cmap)?NULL:gif_cmap ) == GIF_ERROR )
- 					ASIM_PrintGifError();
-+#endif
- 			}
- 		}
- 		free_gif_saved_images( images, count );
-@@ -1172,24 +1223,46 @@
- 			outfile = open_writeable_image_file(path);
- 			
- 		if (outfile)
-+        {
-+#if (GIFLIB_MAJOR>=5)
-+			gif = EGifOpenFileHandle(fileno(outfile), &errcode);
-+			if (errcode != E_GIF_SUCCEEDED)
-+				ASIM_PrintGifError(errcode);
-+#else
- 			if ((gif = EGifOpenFileHandle(fileno(outfile))) == NULL)
- 				ASIM_PrintGifError();
-+#endif
-+        }
- 	}
- 
- 	if( new_image && gif )
- 	{
-+#if (GIFLIB_MAJOR>=5)
-+		if( (errcode = EGifPutScreenDesc(gif, im->width, im->height, cmap_size, 0, gif_cmap )) == GIF_ERROR )
-+			ASIM_PrintGifError(errcode);
-+#else
- 		if( EGifPutScreenDesc(gif, im->width, im->height, cmap_size, 0, gif_cmap ) == GIF_ERROR )
- 			ASIM_PrintGifError();
-+#endif
- 	
- 		EGifPutExtension(gif, 0xf9, GIF_GCE_BYTES, &(gce_bytes[0]));
- 	
-+#if (GIFLIB_MAJOR>=5)
-+		if( (errcode = EGifPutImageDesc(gif, 0, 0, im->width, im->height, false, NULL )) == GIF_ERROR )
-+			ASIM_PrintGifError(errcode);
-+#else
- 		if( EGifPutImageDesc(gif, 0, 0, im->width, im->height, FALSE, NULL ) == GIF_ERROR )
- 			ASIM_PrintGifError();
-+#endif
- 	}
- 
- 	if( gif_cmap )
- 	{
-+#if (GIFLIB_MAJOR>=5)
-+		GifFreeMapObject(gif_cmap);
-+#else
- 		FreeMapObject(gif_cmap);
-+#endif
- 		gif_cmap = NULL ;
- 	}
- 	if( gif )
-@@ -1203,12 +1276,23 @@
- 			register int *src = mapped_im + x*y;
- 	  	    while( --x >= 0 )
- 	  			row_pointer[x] = src[x] ;
-+#if (GIFLIB_MAJOR>=5)
-+			if( (errcode = EGifPutLine(gif, row_pointer, im->width))  == GIF_ERROR)
-+				ASIM_PrintGifError(errcode);
-+#else
- 			if( EGifPutLine(gif, row_pointer, im->width)  == GIF_ERROR)
- 				ASIM_PrintGifError();
-+#endif
- 		}
- 		free( row_pointer );
-+#if (GIFLIB_MAJOR>=5)
-+		EGifCloseFile(gif, &errcode);
-+		if (errcode != E_GIF_SUCCEEDED)
-+			ASIM_PrintGifError(errcode);
-+#else
- 		if (EGifCloseFile(gif) == GIF_ERROR)
- 			ASIM_PrintGifError();
-+#endif
- 		gif = NULL;
- 	}
- 	free( mapped_im );
-diff -Naurd libAfterImage-1.20.orig/import.c libAfterImage-1.20/import.c
---- libAfterImage-1.20.orig/import.c	2016-05-01 11:44:19.000000000 +0300
-+++ libAfterImage-1.20/import.c	2016-05-02 11:01:58.979496755 +0300
-@@ -2178,6 +2178,9 @@
- 	int  		transparent = -1 ;
- 	unsigned int  		y;
- 	unsigned int		width = 0, height = 0;
-+#if (GIFLIB_MAJOR>=5)
-+	int errcode;
-+#endif
- 	ColorMapObject     *cmap = NULL ;
- 
- 	START_TIME(started);
-@@ -2186,7 +2189,11 @@
- 	
- 	if ((fp = open_image_file(path)) == NULL)
- 		return NULL;
-+#if (GIFLIB_MAJOR>=5)
-+	if( (gif = open_gif_read(fp, &errcode)) != NULL )
-+#else
- 	if( (gif = open_gif_read(fp)) != NULL )
-+#endif
- 	{
- 		SavedImage	*sp = NULL ;
- 		int count = 0 ;
-@@ -2289,13 +2296,21 @@
- 			}
- 			free_gif_saved_images( sp, count );
- 		}else if( status != GIF_OK ) 
-+#if (GIFLIB_MAJOR>=5)
-+			ASIM_PrintGifError(status);
-+#else
- 			ASIM_PrintGifError();
-+#endif
- 		else if( params->subimage == -1 )
- 			show_error( "Image file \"%s\" does not have any valid image information.", path );
- 		else
- 			show_error( "Image file \"%s\" does not have subimage %d.", path, params->subimage );
- 
-+#if (GIFLIB_MAJOR>=5)
-+		DGifCloseFile(gif, &errcode);
-+#else
- 		DGifCloseFile(gif);
-+#endif
- 		fclose( fp );
- 	}
- 	SHOW_TIME("image loading",started);
-diff -Naurd libAfterImage-1.20.orig/ungif.c libAfterImage-1.20/ungif.c
---- libAfterImage-1.20.orig/ungif.c	2011-01-15 08:52:22.000000000 +0300
-+++ libAfterImage-1.20/ungif.c	2016-05-02 16:03:57.590148737 +0300
-@@ -75,13 +75,21 @@
- 	if( sp )
- 	{
- 		if (sp->ImageDesc.ColorMap)
-+#if (GIFLIB_MAJOR>=5)
-+	    	GifFreeMapObject(sp->ImageDesc.ColorMap);
-+#else
- 	    	FreeMapObject(sp->ImageDesc.ColorMap);
-+#endif
- 
- 		if (sp->RasterBits)
- 		    free((char *)sp->RasterBits);
- 
- 		if (sp->ExtensionBlocks)
-+#if (GIFLIB_MAJOR>=5)
-+		    GifFreeExtensions(sp->ExtensionBlockCount, sp->ExtensionBlocks);
-+#else
- 		    FreeExtension(sp);
-+#endif
- 
- 		if( !reusable )
- 			free( sp );
-@@ -119,11 +127,19 @@
- 	return ret;
- }
- 
-+#if (GIFLIB_MAJOR>=5)
-+GifFileType*
-+open_gif_read( FILE *in_stream, int *errcode )
-+{
-+	return DGifOpen(in_stream, fread_gif, errcode);
-+}
-+#else
- GifFileType*
- open_gif_read( FILE *in_stream )
- {
- 	return DGifOpen(in_stream, fread_gif);
- }
-+#endif
- 
- int
- get_gif_image_desc( GifFileType *gif, SavedImage *im )
-@@ -151,7 +167,11 @@
- 		memcpy( &(im->ImageDesc), &(gif->Image), sizeof(GifImageDesc));
- 		if( gif->Image.ColorMap )
- 		{
-+#if (GIFLIB_MAJOR>=5)
-+			im->ImageDesc.ColorMap = GifMakeMapObject(gif->Image.ColorMap->ColorCount, NULL);
-+#else
- 			im->ImageDesc.ColorMap = MakeMapObject(gif->Image.ColorMap->ColorCount, NULL);
-+#endif
- 			fseek( gif->UserData, start_pos+9, SEEK_SET ); 
- 			fread( im->ImageDesc.ColorMap->Colors, 1, gif->Image.ColorMap->ColorCount*3, gif->UserData);
- 			fseek( gif->UserData, end_pos, SEEK_SET );
-@@ -166,6 +186,9 @@
- {
-     GifRecordType RecordType;
-     GifByteType *ExtData;
-+#if (GIFLIB_MAJOR>=5)
-+    int ExtCode;
-+#endif
-     SavedImage temp_save;
- 	int curr_image = 0, ret_count = *ret_images ;
- 	int status = GIF_OK;
-@@ -197,13 +220,23 @@
- 				break;
- 
- 	    	case EXTENSION_RECORD_TYPE:
-+#if (GIFLIB_MAJOR>=5)
-+				status = DGifGetExtension(gif,&ExtCode,&ExtData);
-+#else
- 				status = DGifGetExtension(gif,&temp_save.Function,&ExtData);
-+#endif
- 				while (ExtData != NULL && status == GIF_OK )
- 				{
-             		/* Create an extension block with our data */
-+#if (GIFLIB_MAJOR>=5)
-+            		if ((status = GifAddExtensionBlock(&temp_save.ExtensionBlockCount, &temp_save.ExtensionBlocks,
-+                            ExtCode, sizeof(ExtData), ExtData)) == GIF_OK)
-+                    status = DGifGetExtension(gif,&ExtCode,&ExtData);
-+#else
-             		if ((status = AddExtensionBlock(&temp_save, ExtData[0], (char*)&(ExtData[1]))) == GIF_OK)
- 				    	status = DGifGetExtensionNext(gif, &ExtData);
-             		temp_save.Function = 0;
-+#endif
- 				}
- 				break;
- 
-diff -Naurd libAfterImage-1.20.orig/ungif.h libAfterImage-1.20/ungif.h
---- libAfterImage-1.20.orig/ungif.h	2011-01-15 08:52:22.000000000 +0300
-+++ libAfterImage-1.20/ungif.h	2016-05-02 10:57:59.715983533 +0300
-@@ -7,11 +7,29 @@
- extern "C" {
- #endif
- 
-+#if ((GIFLIB_MAJOR==4) && (GIFLIB_MINOR>=2)) 
-+static inline void PrintGifError(void) {
-+    fprintf(stderr, "%s\n", GifErrorString());
-+}
-+#elif (GIFLIB_MAJOR>=5)
-+static inline void PrintGifError(int code) {
-+    fprintf(stderr, "%s\n", GifErrorString(code));
-+}
-+#endif
-+
-+#if (GIFLIB_MAJOR>=5)
-+#ifdef __GNUC__
-+#define ASIM_PrintGifError(code) do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(code); }while(0)
-+#else
-+#define ASIM_PrintGifError(code) do{ PrintGifError(code); }while(0)
-+#endif
-+#else // (GIFLIB_MAJOR>=5)
- #ifdef __GNUC__
- #define ASIM_PrintGifError() do{ fprintf( stderr, "%s():%d:<%s> ",__FUNCTION__, __LINE__, path?path:"null" ); PrintGifError(); }while(0)
- #else
- #define ASIM_PrintGifError() do{ PrintGifError(); }while(0)
- #endif
-+#endif // (GIFLIB_MAJOR>=5)
- 
- #define GIF_GCE_DELAY_BYTE_LOW	1
- #define GIF_GCE_DELAY_BYTE_HIGH	2
-@@ -24,7 +42,11 @@
- 
- 
- int fread_gif( GifFileType *gif, GifByteType* buf, int len );
-+#if (GIFLIB_MAJOR>=5)
-+GifFileType* open_gif_read( FILE *in_stream, int *errcode );
-+#else
- GifFileType* open_gif_read( FILE *in_stream );
-+#endif
- 
- int get_gif_image_desc( GifFileType *gif, SavedImage *im );
- 

diff --git a/media-libs/libafterimage/libafterimage-1.20-r1.ebuild b/media-libs/libafterimage/libafterimage-1.20-r1.ebuild
deleted file mode 100644
index a737b89..00000000
--- a/media-libs/libafterimage/libafterimage-1.20-r1.ebuild
+++ /dev/null
@@ -1,108 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-inherit autotools
-
-MY_PN=libAfterImage
-
-DESCRIPTION="Afterstep's standalone generic image manipulation library"
-HOMEPAGE="http://www.afterstep.org/afterimage/index.php"
-SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="alpha amd64 ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="+X cpu_flags_x86_mmx examples gif jpeg nls opengl png static-libs shm +shaping svg tiff truetype"
-
-RDEPEND="
-	X?		( x11-libs/libSM
-			  x11-libs/libXext
-			  x11-libs/libXrender )
-	gif?	( media-libs/giflib:0= )
-	jpeg?	( virtual/jpeg:0 )
-	opengl?	( virtual/opengl )
-	png?	( >=media-libs/libpng-1.4:0= )
-	svg?	( gnome-base/librsvg:2 )
-	tiff?	( media-libs/tiff:0 )
-	truetype? ( media-libs/freetype )"
-DEPEND="${RDEPEND}
-	X?		( x11-proto/xextproto )
-	virtual/pkgconfig
-	!!x11-wm/afterstep"
-REQUIRED_USE="
-	opengl?	 ( X )
-	shaping? ( X )
-	shm?	 ( X )"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-src_prepare() {
-	default
-
-	# fix some ldconfig problem in makefile.in
-	eapply -p0 "${FILESDIR}"/${PN}-makefile.in.patch
-	# fix lib paths in afterimage-config
-	eapply -p0 "${FILESDIR}"/${PN}-config.patch
-	# fix gif unbundle
-	eapply -p0 "${FILESDIR}"/${PN}-gif.patch
-	# fix for libpng15 compability
-	eapply -p0 "${FILESDIR}"/${PN}-libpng15.patch
-	# add giflib-5 API support, bug 571654
-	eapply "${FILESDIR}"/${PN}-giflib5.patch
-	# do not build examples
-	use examples || sed -i \
-		-e '/^all:/s/apps//' \
-		-e '/^install:/s/install.apps//' \
-		Makefile.in || die "sed failed"
-	# remove forced flags
-	sed -i \
-		-e 's/CFLAGS="-O3"//' \
-		-e 's/ -rdynamic//' \
-		configure.in || die "sed failed"
-
-	mv configure.in configure.ac || die
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_enable cpu_flags_x86_mmx mmx-optimization) \
-		$(use_enable opengl glx) \
-		$(use_enable nls i18n) \
-		$(use_enable shaping) \
-		$(use_enable shm shmimage ) \
-		$(use_enable static-libs staticlibs) \
-		$(use_with X x) \
-		$(use_with gif) \
-		$(use_with jpeg) \
-		$(use_with png) \
-		$(use_with svg) \
-		$(use_with tiff) \
-		$(use_with truetype ttf) \
-		--enable-sharedlibs \
-		--with-xpm \
-		--without-builtin-gif \
-		--without-builtin-jpeg \
-		--without-builtin-png \
-		--without-builtin-zlib \
-		--without-afterbase
-}
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \
-		install
-	dodoc ChangeLog README
-	if use examples; then
-		cd apps || die
-		mv ascompose.man ascompose.1 || die
-		doman ascompose.1
-		emake clean
-		rm Makefile* ascompose.1 || die
-		insinto /usr/share/doc/${PF}/examples
-		doins *
-	fi
-}

diff --git a/media-libs/libafterimage/libafterimage-1.20.ebuild b/media-libs/libafterimage/libafterimage-1.20.ebuild
deleted file mode 100644
index 16418da..00000000
--- a/media-libs/libafterimage/libafterimage-1.20.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils autotools
-
-MY_PN=libAfterImage
-
-DESCRIPTION="Afterstep's standalone generic image manipulation library"
-HOMEPAGE="http://www.afterstep.org/afterimage/index.php"
-SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-IUSE="examples gif jpeg cpu_flags_x86_mmx nls png static-libs svg tiff truetype"
-
-RDEPEND="
-	x11-libs/libSM
-	x11-libs/libXext
-	x11-libs/libXrender
-	png?  ( >=media-libs/libpng-1.4:0 )
-	jpeg? ( virtual/jpeg:= )
-	gif?  ( <media-libs/giflib-5 )
-	svg? ( gnome-base/librsvg )
-	tiff? ( media-libs/tiff:0 )
-	truetype? ( media-libs/freetype )"
-DEPEND="${RDEPEND}
-	virtual/pkgconfig
-	x11-proto/xextproto
-	!!x11-wm/afterstep"
-
-S="${WORKDIR}/${MY_PN}-${PV}"
-
-src_prepare() {
-	# fix some ldconfig problem in makefile.in
-	epatch "${FILESDIR}"/${PN}-makefile.in.patch
-	# fix lib paths in afterimage-config
-	epatch "${FILESDIR}"/${PN}-config.patch
-	# fix gif unbundle
-	epatch "${FILESDIR}"/${PN}-gif.patch
-	# fix for libpng15 compability
-	epatch "${FILESDIR}"/${PN}-libpng15.patch
-	# fix for gif library bug  #486804
-	epatch "${FILESDIR}"/${PN}-giflib42.patch
-	# do not build examples
-	sed -i \
-		-e '/^all:/s/apps//' \
-		-e '/^install:/s/install.apps//' \
-		Makefile.in || die
-	# remove forced flags
-	sed -i \
-		-e 's/CFLAGS="-O3"//' \
-		-e 's/ -rdynamic//' \
-		configure.in || die "sed failed"
-	eautoreconf
-}
-
-src_configure() {
-	econf \
-		$(use_enable static-libs staticlibs) \
-		$(use_enable nls i18n) \
-		$(use_enable cpu_flags_x86_mmx mmx-optimization) \
-		$(use_with png) \
-		$(use_with jpeg) \
-		$(use_with gif) \
-		$(use_with svg) \
-		$(use_with tiff) \
-		$(use_with truetype ttf) \
-		--enable-glx \
-		--enable-sharedlibs \
-		--with-x \
-		--with-xpm \
-		--without-builtin-gif \
-		--without-builtin-jpeg \
-		--without-builtin-png \
-		--without-builtin-zlib \
-		--without-afterbase
-}
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \
-		install
-	dodoc ChangeLog README
-	if use examples; then
-		cd apps || die
-		emake clean
-		rm Makefile* || die
-		insinto /usr/share/doc/${PF}/examples
-		doins *
-	fi
-}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: media-libs/libafterimage/, media-libs/libafterimage/files/
@ 2021-05-19 21:13 Andrew Savchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Savchenko @ 2021-05-19 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     b22db36af30264f2cde7c55e627cae4a125c0af9
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Wed May 19 21:04:23 2021 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Wed May 19 21:13:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b22db36a

media-libs/libafterimage: fix multiple bugs

- Update to EAPI 7
- Use $(AR) if any, fallback to direct ar, bug 731044
- Drop non-standard 'l' from ar args, bug 784182
- Properly detect freetype: use pkg-config, bug 783375

Bug: https://bugs.gentoo.org/784182
Bug: https://bugs.gentoo.org/731044
Bug: https://bugs.gentoo.org/783375
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 .../libafterimage/files/libafterimage-ar.patch     |  39 ++++++++
 .../files/libafterimage-freetype.patch             |  23 +++++
 .../libafterimage/libafterimage-1.20-r4.ebuild     | 110 +++++++++++++++++++++
 3 files changed, 172 insertions(+)

diff --git a/media-libs/libafterimage/files/libafterimage-ar.patch b/media-libs/libafterimage/files/libafterimage-ar.patch
new file mode 100644
index 00000000000..6e8d0bb8cd4
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-ar.patch
@@ -0,0 +1,39 @@
+diff '--color=auto' -Naurd libAfterImage-1.20.orig/Makefile.in libAfterImage-1.20/Makefile.in
+--- libAfterImage-1.20.orig/Makefile.in	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/Makefile.in	2021-05-19 23:32:32.793826120 +0300
+@@ -78,7 +78,8 @@
+ EXTRA_DEFINES	= @DEFINE_XLOCALE@
+ 
+ RANLIB		= @RANLIB@
+-AR		= ar clq
++AR		?= ar
++AR		+= cq
+ CP		= @CP@
+ MV		= @MV@
+ RM		= @RM@
+diff '--color=auto' -Naurd libAfterImage-1.20.orig/aftershow/Makefile.in libAfterImage-1.20/aftershow/Makefile.in
+--- libAfterImage-1.20.orig/aftershow/Makefile.in	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/aftershow/Makefile.in	2021-05-19 23:32:53.158905472 +0300
+@@ -11,7 +11,8 @@
+ EXTRA_DEFINES	= @DEFINE_XLOCALE@
+ 
+ RANLIB		= @RANLIB@
+-AR		= ar clq
++AR		?= ar
++AR		+= cq
+ CP		= @CP@
+ MV		= @MV@
+ RM		= @RM@
+diff '--color=auto' -Naurd libAfterImage-1.20.orig/apps/Makefile.in libAfterImage-1.20/apps/Makefile.in
+--- libAfterImage-1.20.orig/apps/Makefile.in	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/apps/Makefile.in	2021-05-19 23:33:15.769993568 +0300
+@@ -8,7 +8,8 @@
+ EXTRA_DEFINES	= @DEFINE_XLOCALE@
+ 
+ RANLIB		= @RANLIB@
+-AR		= ar clq
++AR		?= ar
++AR		+= cq
+ CP		= @CP@
+ MV		= @MV@
+ RM		= @RM@

diff --git a/media-libs/libafterimage/files/libafterimage-freetype.patch b/media-libs/libafterimage/files/libafterimage-freetype.patch
new file mode 100644
index 00000000000..575a68fd7ca
--- /dev/null
+++ b/media-libs/libafterimage/files/libafterimage-freetype.patch
@@ -0,0 +1,23 @@
+--- libAfterImage-1.20.orig/configure.in	2011-01-15 08:52:22.000000000 +0300
++++ libAfterImage-1.20/configure.in	2021-05-19 23:40:50.359764859 +0300
+@@ -561,9 +561,9 @@
+ else
+   if test "x$ttf_includes" = "xno"; then
+     AC_MSG_CHECKING(headers required by TTF support)
+-    if freetype-config --cflags >/dev/null  ;then
++    if pkg-config freetype2 --cflags >/dev/null  ;then
+ 	  present_incs="$CCFLAGS $x_includes";
+-	  for l in `freetype-config --cflags` ;	do
++	  for l in `pkg-config freetype2 --cflags` ;	do
+ 	    inc_found=no
+ 	    for p in `echo "$present_incs"` ; do
+ 		if test "x$l" = "x$p" ; then
+@@ -636,7 +636,7 @@
+     have_ttf=yes
+   fi
+   if test "$have_ttf" = yes; then
+-	  AFTERIMAGE_LIBS="`freetype-config --libs` $AFTERIMAGE_LIBS"
++	  AFTERIMAGE_LIBS="`pkg-config freetype2 --libs` $AFTERIMAGE_LIBS"
+   fi
+ fi;
+ AC_SUBST(TTF_INCLUDES)

diff --git a/media-libs/libafterimage/libafterimage-1.20-r4.ebuild b/media-libs/libafterimage/libafterimage-1.20-r4.ebuild
new file mode 100644
index 00000000000..33cb313ecb7
--- /dev/null
+++ b/media-libs/libafterimage/libafterimage-1.20-r4.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools
+
+MY_PN=libAfterImage
+
+DESCRIPTION="Afterstep's standalone generic image manipulation library"
+HOMEPAGE="http://www.afterstep.org/afterimage/index.php"
+SRC_URI="ftp://ftp.afterstep.org/stable/${MY_PN}/${MY_PN}-${PV}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="+X cpu_flags_x86_mmx examples gif jpeg nls png static-libs shm +shaping svg tiff truetype"
+
+RDEPEND="
+	X?		( x11-libs/libSM
+			  x11-libs/libXext
+			  x11-libs/libXrender )
+	gif?	( media-libs/giflib:0= )
+	jpeg?	( virtual/jpeg:0 )
+	png?	( >=media-libs/libpng-1.4:0= )
+	svg?	( gnome-base/librsvg:2 )
+	tiff?	( media-libs/tiff:0 )
+	truetype? ( media-libs/freetype )"
+DEPEND="${RDEPEND}
+	X?		( x11-base/xorg-proto )
+	!!x11-wm/afterstep"
+BDEPEND="
+	virtual/pkgconfig"
+REQUIRED_USE="
+	shaping? ( X )
+	shm?	 ( X )"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+src_prepare() {
+	default
+
+	# fix some ldconfig problem in makefile.in
+	eapply -p0 "${FILESDIR}"/${PN}-makefile.in.patch
+	# fix lib paths in afterimage-config
+	eapply -p0 "${FILESDIR}"/${PN}-config.patch
+	# fix gif unbundle
+	eapply -p0 "${FILESDIR}"/${PN}-gif.patch
+	# fix for libpng15 compability
+	eapply -p0 "${FILESDIR}"/${PN}-libpng15.patch
+	# add giflib-5 API support, bug 571654
+	eapply "${FILESDIR}"/${PN}-giflib5-v2.patch
+	# fix ar: respect $(AR), bug 731044 and drop 'l' flag, bug 784182 
+	eapply "${FILESDIR}"/${PN}-ar.patch
+	# detect freetype properly, bug 783375
+	eapply "${FILESDIR}"/${PN}-freetype.patch
+	# do not build examples
+	use examples || sed -i \
+		-e '/^all:/s/apps//' \
+		-e '/^install:/s/install.apps//' \
+		Makefile.in || die "sed failed"
+	# remove forced flags
+	sed -i \
+		-e 's/CFLAGS="-O3"//' \
+		-e 's/ -rdynamic//' \
+		configure.in || die "sed failed"
+
+	mv configure.in configure.ac || die
+	eautoreconf
+}
+
+src_configure() {
+	econf \
+		$(use_enable cpu_flags_x86_mmx mmx-optimization) \
+		$(use_enable nls i18n) \
+		$(use_enable shaping) \
+		$(use_enable shm shmimage ) \
+		$(use_enable static-libs staticlibs) \
+		$(use_with X x) \
+		$(use_with gif) \
+		$(use_with jpeg) \
+		$(use_with png) \
+		$(use_with svg) \
+		$(use_with tiff) \
+		$(use_with truetype ttf) \
+		--disable-glx \
+		--enable-sharedlibs \
+		--with-xpm \
+		--without-builtin-gif \
+		--without-builtin-jpeg \
+		--without-builtin-png \
+		--without-builtin-zlib \
+		--without-afterbase
+}
+
+src_install() {
+	emake \
+		DESTDIR="${D}" \
+		AFTER_DOC_DIR="${ED}/usr/share/doc/${PF}" \
+		install
+	dodoc ChangeLog README
+	if use examples; then
+		cd apps || die
+		mv ascompose.man ascompose.1 || die
+		doman ascompose.1
+		emake clean
+		rm Makefile* ascompose.1 || die
+		insinto /usr/share/doc/${PF}/examples
+		doins *
+	fi
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-19 21:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-29 21:59 [gentoo-commits] repo/gentoo:master commit in: media-libs/libafterimage/, media-libs/libafterimage/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2021-05-19 21:13 Andrew Savchenko
2016-05-02 15:52 Andrew Savchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox