[Libreoffice-commits] .: Branch 'libreoffice-3-5-4' - 2 commits - jpeg/makefile.mk jpeg/struct_alignment.patch

Petr Mladek pmladek at kemper.freedesktop.org
Mon May 21 07:28:13 PDT 2012


 jpeg/makefile.mk            |    9 +++++---
 jpeg/struct_alignment.patch |   48 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 3 deletions(-)

New commits:
commit d4f45305ecdb38d3c2b5f91ec4f29cb89e29f770
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat May 19 14:05:10 2012 +0200

    fdo#47035: Fix saving of jpeg files on Mac/PPC
    
    jpeg_compress_struct gets padded with the same effect as the
    jpeg_decompress_struct, so needs some reordering as well to make Mac/PPC
    happy (a27a399)
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Signed-off-by: Tor Lillqvist <tml at iki.fi>
    Signed-off-by: Fridrich Strba <fridrich.strba at graduateinstitute.ch>

diff --git a/jpeg/struct_alignment.patch b/jpeg/struct_alignment.patch
index 2eb41bf..09966c3 100644
--- a/jpeg/struct_alignment.patch
+++ b/jpeg/struct_alignment.patch
@@ -1,8 +1,38 @@
-without this patch, the jpeg_decompress_struct will be padded, this in turn
+without this patch, the jpeg_decompress_struct & jpec_compress_struct will be padded, this in turn
 results in a mismatch when the jpeg filter in svtools is built, where no
 padding is assumed. Only affects Mac/PPC apparenlty, see fdo#47035
 --- misc/jpeg-8c/jpeglib.h	2010-11-17 22:01:56.000000000 +0100
-+++ misc/build/jpeg-8c/jpeglib.h	2012-05-19 03:38:44.000000000 +0200
++++ misc/build/jpeg-8c/jpeglib.h	2012-05-19 13:58:31.000000000 +0200
+@@ -288,9 +288,9 @@
+   JDIMENSION image_width;	/* input image width */
+   JDIMENSION image_height;	/* input image height */
+   int input_components;		/* # of color components in input image */
+-  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
+ 
+   double input_gamma;		/* image gamma of input image */
++  J_COLOR_SPACE in_color_space;	/* colorspace of input image */
+ 
+   /* Compression parameters --- these fields must be set before calling
+    * jpeg_start_compress().  We recommend calling jpeg_set_defaults() to
+@@ -359,16 +359,16 @@
+   /* Parameters controlling emission of special markers. */
+ 
+   boolean write_JFIF_header;	/* should a JFIF marker be written? */
++  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
+   UINT8 JFIF_major_version;	/* What to write for the JFIF version number */
+   UINT8 JFIF_minor_version;
+   /* These three values are not used by the JPEG code, merely copied */
+   /* into the JFIF APP0 marker.  density_unit can be 0 for unknown, */
+   /* 1 for dots/inch, or 2 for dots/cm.  Note that the pixel aspect */
+   /* ratio is defined by X_density/Y_density even when density_unit=0. */
+-  UINT8 density_unit;		/* JFIF code for pixel size units */
+   UINT16 X_density;		/* Horizontal pixel density */
+   UINT16 Y_density;		/* Vertical pixel density */
+-  boolean write_Adobe_marker;	/* should an Adobe marker be written? */
++  UINT8 density_unit;		/* JFIF code for pixel size units */
+   
+   /* State variable: index of next scanline to be written to
+    * jpeg_write_scanlines().  Application may use this to control its
 @@ -583,11 +583,11 @@
    /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
    UINT8 JFIF_major_version;	/* JFIF version number */
commit 20987a1d0ec675f3a23a4be58eb7309f60fc62de
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Sat May 19 04:02:42 2012 +0200

    fdo#47035: Fix loading of jpeg files on Mac/PPC
    
    jpeg_decompress_struct gets padded when compiling libjpeg, but the
    jpeg filter in svtools assume non-padded size, resulting in a mismatch
    that makes libjpeg refuse to do its work.
    
    Signed-off-by: Petr Mladek <pmladek at suse.cz>
    Signed-off-by: Tor Lillqvist <tml at iki.fi>
    Signed-off-by: Fridrich Strba <fridrich.strba at graduateinstitute.ch>

diff --git a/jpeg/makefile.mk b/jpeg/makefile.mk
index adc0c66..3c6cf49 100644
--- a/jpeg/makefile.mk
+++ b/jpeg/makefile.mk
@@ -36,8 +36,8 @@ TARGET=jpeg
 
 .IF "$(SYSTEM_JPEG)" == "YES"
 all:
-    @echo "An already available installation of libjpeg should exist on your system."
-    @echo "Therefore the version provided here does not need to be built in addition."
+	@echo "An already available installation of libjpeg should exist on your system."
+	@echo "Therefore the version provided here does not need to be built in addition."
 .ENDIF
 
 # --- Files --------------------------------------------------------
@@ -50,6 +50,9 @@ TARFILE_MD5=a2c10c04f396a9ce72894beb18b4e1f9
 
 #PATCH_FILES=jpeg-6b.patch
 PATCH_FILES=jpeg-8c.patch
+.IF "$(OS)$(CPU)"=="MACOSXP"
+PATCH_FILES+=struct_alignment.patch
+.ENDIF
 
 ADDITIONAL_FILES=makefile.mk jconfig.h	
 
@@ -58,7 +61,7 @@ ADDITIONAL_FILES=makefile.mk jconfig.h
 BUILD_DIR=$(CONFIGURE_DIR)
 BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
 
-OUT2INC=	jconfig.h	\
+OUT2INC=    jconfig.h	\
             jerror.h	\
             jmorecfg.h	\
             jpegint.h	\
diff --git a/jpeg/struct_alignment.patch b/jpeg/struct_alignment.patch
new file mode 100644
index 0000000..2eb41bf
--- /dev/null
+++ b/jpeg/struct_alignment.patch
@@ -0,0 +1,18 @@
+without this patch, the jpeg_decompress_struct will be padded, this in turn
+results in a mismatch when the jpeg filter in svtools is built, where no
+padding is assumed. Only affects Mac/PPC apparenlty, see fdo#47035
+--- misc/jpeg-8c/jpeglib.h	2010-11-17 22:01:56.000000000 +0100
++++ misc/build/jpeg-8c/jpeglib.h	2012-05-19 03:38:44.000000000 +0200
+@@ -583,11 +583,11 @@
+   /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */
+   UINT8 JFIF_major_version;	/* JFIF version number */
+   UINT8 JFIF_minor_version;
++  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
+   UINT8 density_unit;		/* JFIF code for pixel size units */
+   UINT16 X_density;		/* Horizontal pixel density */
+   UINT16 Y_density;		/* Vertical pixel density */
+   boolean saw_Adobe_marker;	/* TRUE iff an Adobe APP14 marker was found */
+-  UINT8 Adobe_transform;	/* Color transform code from Adobe marker */
+ 
+   boolean CCIR601_sampling;	/* TRUE=first samples are cosited */
+ 


More information about the Libreoffice-commits mailing list