diff options
author | Gilles Dartiguelongue <eva@gentoo.org> | 2010-11-08 22:27:28 +0000 |
---|---|---|
committer | Gilles Dartiguelongue <eva@gentoo.org> | 2010-11-08 22:27:28 +0000 |
commit | 877009ab3a0bc4e0bfd1d61b64bdac5e359be181 (patch) | |
tree | 4217d085d99f5e56f84f3bbd1464a996ad78a563 /media-gfx/gthumb/files | |
parent | add die check (diff) | |
download | gentoo-2-877009ab3a0bc4e0bfd1d61b64bdac5e359be181.tar.gz gentoo-2-877009ab3a0bc4e0bfd1d61b64bdac5e359be181.tar.bz2 gentoo-2-877009ab3a0bc4e0bfd1d61b64bdac5e359be181.zip |
Allow use of alternate jpeg implementation.
(Portage version: 2.2.0_alpha3/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/gthumb/files')
4 files changed, 0 insertions, 395 deletions
diff --git a/media-gfx/gthumb/files/gthumb-2.11.2.1-configure.patch b/media-gfx/gthumb/files/gthumb-2.11.2.1-configure.patch deleted file mode 100644 index 6eee22d09722..000000000000 --- a/media-gfx/gthumb/files/gthumb-2.11.2.1-configure.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 62639364a104859e693cfe3a52f1555db646c08e Mon Sep 17 00:00:00 2001 -From: Gilles Dartiguelongue <eva@gentoo.org> -Date: Mon, 8 Mar 2010 22:49:04 +0100 -Subject: [PATCH] Revert "fix build problems with libunique and -DGTK_DISABLE_SINGLE_INCLUDES compiler flag" - -Gentoo: This is not a problem as we do not compile with deprecated code -directives. - -This reverts commit e494be096231cc676cebf23cc4f28dddda6e8d1a. ---- - configure.ac | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 8aaddb1..cd956ea 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -51,7 +51,6 @@ CLUTTER_REQUIRED=1.0.0 - CLUTTER_GTK_REQUIRED=0.10.0 - GSTREAMER_REQUIRED=0.10 - OPENRAW_REQUIRED=0.0.8 --UNIQUE_REQUIRED=1.1.2 - LIBSOUP_REQUIRED=2.26 - GNOME_KEYRING_REQUIRED=2.28 - -@@ -120,7 +119,7 @@ PKG_CHECK_MODULES(GTHUMB, [ - gio-unix-2.0 - gtk+-2.0 >= $GTK_REQUIRED - gconf-2.0 >= $GCONF_REQUIRED -- unique-1.0 >= $UNIQUE_REQUIRED -+ unique-1.0 - ]) - AC_SUBST(GTHUMB_LIBS) - AC_SUBST(GTHUMB_CFLAGS) --- -1.7.0 - diff --git a/media-gfx/gthumb/files/gthumb-2.11.5-configure-exiv2.patch b/media-gfx/gthumb/files/gthumb-2.11.5-configure-exiv2.patch deleted file mode 100644 index 37319e490af3..000000000000 --- a/media-gfx/gthumb/files/gthumb-2.11.5-configure-exiv2.patch +++ /dev/null @@ -1,38 +0,0 @@ -From a61e394d59e96267c6cef12be796f6832d212c39 Mon Sep 17 00:00:00 2001 -From: Paolo Bacchilega <paobac@src.gnome.org> -Date: Wed, 14 Jul 2010 11:51:57 +0000 -Subject: do not link to the exiv2 extension if it's not built - -[bug #624326] ---- -diff --git a/extensions/exiv2_tools/Makefile.am b/extensions/exiv2_tools/Makefile.am -index 7bf5ae6..26a127f 100644 ---- a/extensions/exiv2_tools/Makefile.am -+++ b/extensions/exiv2_tools/Makefile.am -@@ -5,7 +5,7 @@ SUBDIRS = data - extensiondir = $(pkglibdir)/extensions - extension_LTLIBRARIES = libexiv2_tools.la - --libexiv2_tools_la_SOURCES = \ -+libexiv2_tools_la_SOURCES = \ - exiv2-utils.h \ - exiv2-utils.cpp \ - gth-edit-exiv2-page.c \ -diff --git a/extensions/importer/Makefile.am b/extensions/importer/Makefile.am -index de5095c..87b2d06 100644 ---- a/extensions/importer/Makefile.am -+++ b/extensions/importer/Makefile.am -@@ -45,7 +45,10 @@ libimporter_la_SOURCES = \ - - libimporter_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb - libimporter_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS) --libimporter_la_LIBADD = $(GTHUMB_LIBS) ../catalogs/libcatalogs.la ../exiv2_tools/libexiv2_tools.la ../image_rotation/libimage_rotation.la -+libimporter_la_LIBADD = $(GTHUMB_LIBS) ../catalogs/libcatalogs.la ../image_rotation/libimage_rotation.la -+if ENABLE_EXIV2 -+libimporter_la_LIBADD += ../exiv2_tools/libexiv2_tools.la -+endif - libimporter_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT) - - extensioninidir = $(extensiondir) --- -cgit v0.8.3.1 diff --git a/media-gfx/gthumb/files/gthumb-2.11.5-exif-rotation.patch b/media-gfx/gthumb/files/gthumb-2.11.5-exif-rotation.patch deleted file mode 100644 index aa49ab47282b..000000000000 --- a/media-gfx/gthumb/files/gthumb-2.11.5-exif-rotation.patch +++ /dev/null @@ -1,143 +0,0 @@ -From c200cbf310109cba991bafa38d521c7a1af31360 Mon Sep 17 00:00:00 2001 -From: Paolo Bacchilega <paobac@src.gnome.org> -Date: Fri, 16 Jul 2010 13:52:54 +0000 -Subject: preserve the exif data after a lossless rotation - -read the exif data from the input buffer to make sure that they are -read correctly, instead of reading them from the output buffer after -the transformation. ---- -diff --git a/extensions/exiv2_tools/main.c b/extensions/exiv2_tools/main.c -index a8dcf74..87dd411 100644 ---- a/extensions/exiv2_tools/main.c -+++ b/extensions/exiv2_tools/main.c -@@ -24,6 +24,7 @@ - #include <config.h> - #include <gtk/gtk.h> - #include <gthumb.h> -+#include <extensions/jpeg_utils/jpegtran.h> - #include "gth-edit-exiv2-page.h" - #include "gth-metadata-provider-exiv2.h" - #include "exiv2-utils.h" -@@ -167,21 +168,19 @@ update_exif_dimensions (GFileInfo *info, - - - static void --exiv2_jpeg_tran_cb (void **out_buffer, -- gsize *out_buffer_size, -- GthTransform *transform) -+exiv2_jpeg_tran_cb (JpegTranInfo *tran_info) - { - GFileInfo *info; - - info = g_file_info_new (); -- if (exiv2_read_metadata_from_buffer (*out_buffer, *out_buffer_size, info, NULL)) { -+ if (exiv2_read_metadata_from_buffer (tran_info->in_buffer, tran_info->in_buffer_size, info, NULL)) { - GthMetadata *metadata; - -- update_exif_dimensions (info, *transform); -+ update_exif_dimensions (info, tran_info->transformation); - - metadata = g_object_new (GTH_TYPE_METADATA, "raw", "1", NULL); - g_file_info_set_attribute_object (info, "Exif::Image::Orientation", G_OBJECT (metadata)); -- exiv2_write_metadata_to_buffer (out_buffer, out_buffer_size, info, NULL, NULL); -+ exiv2_write_metadata_to_buffer (tran_info->out_buffer, tran_info->out_buffer_size, info, NULL, NULL); - - g_object_unref (metadata); - } -diff --git a/extensions/image_rotation/main.c b/extensions/image_rotation/main.c -index 321ce7e..6a1195c 100644 ---- a/extensions/image_rotation/main.c -+++ b/extensions/image_rotation/main.c -@@ -33,11 +33,10 @@ gthumb_extension_activate (void) - /** - * Called after successfully rotating a jpeg image - * -- * @out_buffer (void **): pointer to file data -- * @out_buffer_size (gsize *): pointer to file data size -- * @tranform (GthTransform *): the transformation applied to the file -+ * @info (JpegTranInfo *): the transformation info as described in -+ * extensions/jpeg_utils/jpegtran.h - **/ -- gth_hook_register ("jpegtran-after", 3); -+ gth_hook_register ("jpegtran-after", 1); - - gth_hook_add_callback ("gth-browser-construct", 10, G_CALLBACK (ir__gth_browser_construct_cb), NULL); - gth_hook_add_callback ("gth-browser-update-sensitivity", 10, G_CALLBACK (ir__gth_browser_update_sensitivity_cb), NULL); -diff --git a/extensions/jpeg_utils/jpegtran.c b/extensions/jpeg_utils/jpegtran.c -index 1aa302d..5484983 100644 ---- a/extensions/jpeg_utils/jpegtran.c -+++ b/extensions/jpeg_utils/jpegtran.c -@@ -222,7 +222,6 @@ jpegtran_internal (struct jpeg_decompress_struct *srcinfo, - /* Initialize destination compression parameters from source values */ - jpeg_copy_critical_parameters (srcinfo, dstinfo); - -- - /* Do not output a JFIF marker for EXIF thumbnails. - * This is not the optimal way to detect the difference - * between a thumbnail and a normal image, but it works -@@ -230,13 +229,6 @@ jpegtran_internal (struct jpeg_decompress_struct *srcinfo, - if (option == JCOPYOPT_NONE) - dstinfo->write_JFIF_header = FALSE; - --#if JPEG_LIB_VERSION < 80 -- /* Adjust the markers to create a standard EXIF file if an EXIF marker -- * is present in the input. By default, libjpeg creates a JFIF file, -- * which is incompatible with the EXIF standard. */ -- jcopy_markers_exif (srcinfo, dstinfo, option); --#endif -- - /* Adjust destination parameters if required by transform options; - * also find out which set of coefficient arrays will hold the output. - */ -@@ -336,7 +328,14 @@ jpegtran (void *in_buffer, - jpeg_destroy_decompress (&srcinfo); - - if (success) { -- gth_hook_invoke ("jpegtran-after", out_buffer, out_buffer_size, &transformation); -+ JpegTranInfo info; -+ -+ info.in_buffer = in_buffer; -+ info.in_buffer_size = in_buffer_size; -+ info.out_buffer = out_buffer; -+ info.out_buffer_size = out_buffer_size; -+ info.transformation = transformation; -+ gth_hook_invoke ("jpegtran-after", &info); - } - else { - g_free (*out_buffer); -diff --git a/extensions/jpeg_utils/jpegtran.h b/extensions/jpeg_utils/jpegtran.h -index 6c26139..80bafbe 100644 ---- a/extensions/jpeg_utils/jpegtran.h -+++ b/extensions/jpeg_utils/jpegtran.h -@@ -46,6 +46,15 @@ typedef enum { - } JpegMcuAction; - - -+typedef struct { -+ void *in_buffer; -+ gsize in_buffer_size; -+ void **out_buffer; -+ gsize *out_buffer_size; -+ GthTransform transformation; -+} JpegTranInfo; -+ -+ - gboolean jpegtran (void *in_buffer, - gsize in_buffer_size, - void **out_buffer, -diff --git a/extensions/jpeg_utils/transupp.h b/extensions/jpeg_utils/transupp.h -index 104fa2e..5f0f69b 100644 ---- a/extensions/jpeg_utils/transupp.h -+++ b/extensions/jpeg_utils/transupp.h -@@ -20,6 +20,8 @@ - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - */ - -+#include <config.h> -+ - #ifdef HAVE_LIBJPEG - - #include <jpeglib.h> --- -cgit v0.8.3.1 diff --git a/media-gfx/gthumb/files/gthumb-2.11.5-jpeg8-rotation.patch b/media-gfx/gthumb/files/gthumb-2.11.5-jpeg8-rotation.patch deleted file mode 100644 index 12a6ab52452f..000000000000 --- a/media-gfx/gthumb/files/gthumb-2.11.5-jpeg8-rotation.patch +++ /dev/null @@ -1,177 +0,0 @@ -From 607d43534519c2fcb7ad079b634d47e4ba22376e Mon Sep 17 00:00:00 2001 -From: Paolo Bacchilega <paobac@src.gnome.org> -Date: Fri, 16 Jul 2010 13:49:43 +0000 -Subject: fixed lossless rotation with libjpeg8 - -Simplified the jpeg memory source implementation. Copied the -from the libjpeg8 source. This fixes a bug with the -skip_input_data function implementation as well. - -[bug #612809] ---- -diff --git a/extensions/jpeg_utils/jmemorysrc.c b/extensions/jpeg_utils/jmemorysrc.c -index f6dc7a8..b8c2ca6 100644 ---- a/extensions/jpeg_utils/jmemorysrc.c -+++ b/extensions/jpeg_utils/jmemorysrc.c -@@ -29,73 +29,62 @@ - #include <gio/gio.h> - - --#define TMP_BUF_SIZE 4096 - #define JPEG_ERROR(cinfo,code) \ - ((cinfo)->err->msg_code = (code), \ - (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) - - --typedef struct { -- struct jpeg_source_mgr pub; -- -- JOCTET *in_buffer; -- gsize in_buffer_size; -- goffset bytes_read; -- JOCTET *tmp_buffer; --} mem_source_mgr; -- --typedef mem_source_mgr * mem_src_ptr; -- -- - static void - init_source (j_decompress_ptr cinfo) - { -- mem_src_ptr src = (mem_src_ptr) cinfo->src; -- src->bytes_read = 0; -+ /* void */ - } - - - static gboolean - fill_input_buffer (j_decompress_ptr cinfo) - { -- mem_src_ptr src = (mem_src_ptr) cinfo->src; -- size_t nbytes; -- -- if (src->bytes_read + TMP_BUF_SIZE > src->in_buffer_size) -- nbytes = src->in_buffer_size - src->bytes_read; -- else -- nbytes = TMP_BUF_SIZE; -- -- if (nbytes <= 0) { -- if (src->bytes_read == 0) -- JPEG_ERROR (cinfo, G_IO_ERROR_NOT_FOUND); -- -- /* Insert a fake EOI marker */ -- src->tmp_buffer[0] = (JOCTET) 0xFF; -- src->tmp_buffer[1] = (JOCTET) JPEG_EOI; -- nbytes = 2; -- } -- else -- memcpy (src->tmp_buffer, src->in_buffer + src->bytes_read, nbytes); -+ static JOCTET mybuffer[4]; -+ -+ /* The whole JPEG data is expected to reside in the supplied memory -+ * buffer, so any request for more data beyond the given buffer size -+ * is treated as an error. -+ */ -+ -+ JPEG_ERROR (cinfo, G_IO_ERROR_NOT_FOUND); - -- src->pub.next_input_byte = src->tmp_buffer; -- src->pub.bytes_in_buffer = nbytes; -- src->bytes_read += nbytes; -+ /* Insert a fake EOI marker */ -+ mybuffer[0] = (JOCTET) 0xFF; -+ mybuffer[1] = (JOCTET) JPEG_EOI; -+ -+ cinfo->src->next_input_byte = mybuffer; -+ cinfo->src->bytes_in_buffer = 2; - - return TRUE; - } - - --static void -+void - skip_input_data (j_decompress_ptr cinfo, - long num_bytes) - { -- mem_src_ptr src = (mem_src_ptr) cinfo->src; -- -- src->bytes_read += num_bytes; -- if (src->bytes_read < 0) -- src->bytes_read = 0; -- fill_input_buffer (cinfo); -+ struct jpeg_source_mgr * src = cinfo->src; -+ -+ /* Just a dumb implementation for now. Could use fseek() except -+ * it doesn't work on pipes. Not clear that being smart is worth -+ * any trouble anyway --- large skips are infrequent. -+ */ -+ if (num_bytes > 0) { -+ while (num_bytes > (long) src->bytes_in_buffer) { -+ num_bytes -= (long) src->bytes_in_buffer; -+ (void) fill_input_buffer (cinfo); -+ /* note we assume that fill_input_buffer will never return FALSE, -+ * so suspension need not be handled. -+ */ -+ } -+ src->next_input_byte += (size_t) num_bytes; -+ src->bytes_in_buffer -= (size_t) num_bytes; -+ } - } - - -@@ -111,28 +100,21 @@ _jpeg_memory_src (j_decompress_ptr cinfo, - void *in_buffer, - gsize in_buffer_size) - { -- mem_src_ptr src; -+ struct jpeg_source_mgr *src; - - if (cinfo->src == NULL) { - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, - JPOOL_PERMANENT, -- sizeof (mem_source_mgr)); -- src = (mem_src_ptr) cinfo->src; -- src->tmp_buffer = (JOCTET *) -- (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, -- JPOOL_PERMANENT, -- TMP_BUF_SIZE * sizeof(JOCTET)); -+ sizeof (struct jpeg_source_mgr)); - } - -- src = (mem_src_ptr) cinfo->src; -- src->pub.init_source = init_source; -- src->pub.fill_input_buffer = fill_input_buffer; -- src->pub.skip_input_data = skip_input_data; -- src->pub.resync_to_restart = jpeg_resync_to_restart; -- src->pub.term_source = term_source; -- src->in_buffer = (JOCTET *) in_buffer; -- src->in_buffer_size = in_buffer_size; -- src->pub.bytes_in_buffer = 0; -- src->pub.next_input_byte = NULL; -+ src = cinfo->src; -+ src->init_source = init_source; -+ src->fill_input_buffer = fill_input_buffer; -+ src->skip_input_data = skip_input_data; -+ src->resync_to_restart = jpeg_resync_to_restart; -+ src->term_source = term_source; -+ src->bytes_in_buffer = (size_t) in_buffer_size; -+ src->next_input_byte = (JOCTET *) in_buffer; - } -diff --git a/extensions/jpeg_utils/jpegtran.c b/extensions/jpeg_utils/jpegtran.c -index 8a1721b..1aa302d 100644 ---- a/extensions/jpeg_utils/jpegtran.c -+++ b/extensions/jpeg_utils/jpegtran.c -@@ -188,6 +188,9 @@ jpegtran_internal (struct jpeg_decompress_struct *srcinfo, - transformoption.transform = transform; - transformoption.trim = (mcu_action == JPEG_MCU_ACTION_TRIM); - transformoption.force_grayscale = FALSE; -+#if JPEG_LIB_VERSION >= 80 -+ transformoption.crop = 0; -+#endif - - /* Enable saving of extra markers that we want to copy */ - jcopy_markers_setup (srcinfo, option); --- -cgit v0.8.3.1 |