summaryrefslogtreecommitdiff
path: root/jpeg
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2012-05-19 04:02:42 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2012-05-19 04:02:42 +0200
commita27a3990b8bbfa8924d2b55c38ceab7c9049ea6d (patch)
tree7ca0435baecc816757425fe8d9d2a0591bb57dc1 /jpeg
parentef48b58387fdc04050c3362440ffe3ca0037d8d0 (diff)
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.
Diffstat (limited to 'jpeg')
-rw-r--r--jpeg/makefile.mk9
-rw-r--r--jpeg/struct_alignment.patch18
2 files changed, 24 insertions, 3 deletions
diff --git a/jpeg/makefile.mk b/jpeg/makefile.mk
index 839fbd61644f..f574d89408d1 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 --------------------------------------------------------
@@ -47,6 +47,9 @@ TARFILE_NAME=jpeg-8c
TARFILE_MD5=a2c10c04f396a9ce72894beb18b4e1f9
PATCH_FILES=jpeg-8c.patch
+.IF "$(OS)$(CPU)"=="MACOSXP"
+PATCH_FILES+=struct_alignment.patch
+.ENDIF
ADDITIONAL_FILES=makefile.mk jconfig.h
@@ -55,7 +58,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 000000000000..2eb41bf1ff17
--- /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 */
+