summaryrefslogtreecommitdiffstats
path: root/external/jpeg
diff options
context:
space:
mode:
Diffstat (limited to 'external/jpeg')
-rw-r--r--external/jpeg/ExternalProject_jpeg.mk36
-rw-r--r--external/jpeg/Module_jpeg.mk4
-rw-r--r--external/jpeg/StaticLibrary_jpeg.mk70
-rw-r--r--external/jpeg/UnpackedTarball_jpeg.mk4
-rw-r--r--external/jpeg/configs/jconfig.h66
-rw-r--r--external/jpeg/jpeg.build.patch.158
-rw-r--r--external/jpeg/patches/jpeg-8c-jmorecfg.patch18
7 files changed, 97 insertions, 159 deletions
diff --git a/external/jpeg/ExternalProject_jpeg.mk b/external/jpeg/ExternalProject_jpeg.mk
new file mode 100644
index 000000000000..e47fb146f4c2
--- /dev/null
+++ b/external/jpeg/ExternalProject_jpeg.mk
@@ -0,0 +1,36 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,jpeg))
+
+$(eval $(call gb_ExternalProject_use_autoconf,jpeg,configure))
+$(eval $(call gb_ExternalProject_use_autoconf,jpeg,build))
+
+$(eval $(call gb_ExternalProject_register_targets,jpeg,\
+ configure \
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,jpeg,build) : $(call gb_ExternalProject_get_state_target,jpeg,configure)
+ +$(call gb_ExternalProject_run,build,\
+ $(MAKE) \
+ )
+
+$(call gb_ExternalProject_get_state_target,jpeg,configure) :
+ $(call gb_ExternalProject_run,configure,\
+ MAKE=$(MAKE) ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --with-jpeg8 \
+ --without-java \
+ --without-turbojpeg \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/jpeg/Module_jpeg.mk b/external/jpeg/Module_jpeg.mk
index 0b45932d54f3..537223ae6622 100644
--- a/external/jpeg/Module_jpeg.mk
+++ b/external/jpeg/Module_jpeg.mk
@@ -12,8 +12,8 @@ $(eval $(call gb_Module_Module,jpeg))
ifeq ($(SYSTEM_JPEG),)
$(eval $(call gb_Module_add_targets,jpeg,\
- UnpackedTarball_jpeg \
- StaticLibrary_jpeg \
+ ExternalProject_jpeg \
+ UnpackedTarball_jpeg \
))
endif
diff --git a/external/jpeg/StaticLibrary_jpeg.mk b/external/jpeg/StaticLibrary_jpeg.mk
deleted file mode 100644
index c70f81cf834e..000000000000
--- a/external/jpeg/StaticLibrary_jpeg.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_StaticLibrary_StaticLibrary,jpeg))
-
-$(eval $(call gb_StaticLibrary_set_warnings_not_errors,jpeg))
-
-$(eval $(call gb_StaticLibrary_use_unpacked,jpeg,jpeg))
-
-$(eval $(call gb_StaticLibrary_set_include,jpeg,\
- -I$(call gb_UnpackedTarball_get_dir,jpeg) \
- $$(INCLUDE) \
-))
-
-$(eval $(call gb_StaticLibrary_add_generated_cobjects,jpeg,\
- UnpackedTarball/jpeg/jaricom \
- UnpackedTarball/jpeg/jcapimin \
- UnpackedTarball/jpeg/jcapistd \
- UnpackedTarball/jpeg/jcarith \
- UnpackedTarball/jpeg/jccoefct \
- UnpackedTarball/jpeg/jccolor \
- UnpackedTarball/jpeg/jcdctmgr \
- UnpackedTarball/jpeg/jchuff \
- UnpackedTarball/jpeg/jcinit \
- UnpackedTarball/jpeg/jcmainct \
- UnpackedTarball/jpeg/jcmarker \
- UnpackedTarball/jpeg/jcmaster \
- UnpackedTarball/jpeg/jcomapi \
- UnpackedTarball/jpeg/jcparam \
- UnpackedTarball/jpeg/jcprepct \
- UnpackedTarball/jpeg/jcsample \
- UnpackedTarball/jpeg/jctrans \
- UnpackedTarball/jpeg/jdapimin \
- UnpackedTarball/jpeg/jdapistd \
- UnpackedTarball/jpeg/jdarith \
- UnpackedTarball/jpeg/jdatadst \
- UnpackedTarball/jpeg/jdatasrc \
- UnpackedTarball/jpeg/jdcoefct \
- UnpackedTarball/jpeg/jdcolor \
- UnpackedTarball/jpeg/jddctmgr \
- UnpackedTarball/jpeg/jdhuff \
- UnpackedTarball/jpeg/jdinput \
- UnpackedTarball/jpeg/jdmainct \
- UnpackedTarball/jpeg/jdmarker \
- UnpackedTarball/jpeg/jdmaster \
- UnpackedTarball/jpeg/jdmerge \
- UnpackedTarball/jpeg/jdpostct \
- UnpackedTarball/jpeg/jdsample \
- UnpackedTarball/jpeg/jdtrans \
- UnpackedTarball/jpeg/jerror \
- UnpackedTarball/jpeg/jfdctflt \
- UnpackedTarball/jpeg/jfdctfst \
- UnpackedTarball/jpeg/jfdctint \
- UnpackedTarball/jpeg/jidctflt \
- UnpackedTarball/jpeg/jidctfst \
- UnpackedTarball/jpeg/jidctint \
- UnpackedTarball/jpeg/jquant1 \
- UnpackedTarball/jpeg/jquant2 \
- UnpackedTarball/jpeg/jmemmgr \
- UnpackedTarball/jpeg/jmemnobs \
- UnpackedTarball/jpeg/jutils \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/jpeg/UnpackedTarball_jpeg.mk b/external/jpeg/UnpackedTarball_jpeg.mk
index dae63e2ec4f8..fa1999c3c780 100644
--- a/external/jpeg/UnpackedTarball_jpeg.mk
+++ b/external/jpeg/UnpackedTarball_jpeg.mk
@@ -11,10 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,jpeg))
$(eval $(call gb_UnpackedTarball_set_tarball,jpeg,$(JPEG_TARBALL)))
-$(eval $(call gb_UnpackedTarball_add_file,jpeg,jconfig.h,external/jpeg/configs/jconfig.h))
-
$(eval $(call gb_UnpackedTarball_add_patches,jpeg,\
- external/jpeg/patches/jpeg-8c-jmorecfg.patch \
+ external/jpeg/jpeg.build.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jpeg/configs/jconfig.h b/external/jpeg/configs/jconfig.h
deleted file mode 100644
index 0c430518c0e4..000000000000
--- a/external/jpeg/configs/jconfig.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* jconfig.h. Generated from jconfig.cfg by configure. */
-/* jconfig.cfg --- source file edited by configure script */
-/* see jconfig.txt for explanations */
-
-#define HAVE_PROTOTYPES 1
-#define HAVE_UNSIGNED_CHAR 1
-#define HAVE_UNSIGNED_SHORT 1
-/* #undef void */
-/* #undef const */
-/* #undef CHAR_IS_UNSIGNED */
-#define HAVE_STDDEF_H 1
-#define HAVE_STDLIB_H 1
-#define HAVE_LOCALE_H 1
-/* #undef NEED_BSD_STRINGS */
-/* #undef NEED_SYS_TYPES_H */
-/* #undef NEED_FAR_POINTERS */
-/* #undef NEED_SHORT_EXTERNAL_NAMES */
-/* Define this if you get warnings about undefined structures. */
-/* #undef INCOMPLETE_TYPES_BROKEN */
-
-/* Define "boolean" as unsigned char, not enum, on Windows systems. */
-#ifdef _WIN32
-#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
-typedef unsigned char boolean;
-#endif
-#ifndef FALSE /* in case these macros already exist */
-#define FALSE 0 /* values of boolean */
-#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-#endif
-
-#ifdef JPEG_INTERNALS
-
-/* #undef RIGHT_SHIFT_IS_UNSIGNED */
-#ifdef WNT
-#define INLINE __inline
-#elif defined SOLARIS
-#define INLINE
-#else
-#define INLINE inline
-#endif
-/* These are for configuring the JPEG memory manager. */
-/* #undef DEFAULT_MAX_MEM */
-/* #undef NO_MKTEMP */
-
-#endif /* JPEG_INTERNALS */
-
-#ifdef JPEG_CJPEG_DJPEG
-
-#undef BMP_SUPPORTED /* BMP image file format */
-#undef GIF_SUPPORTED /* GIF image file format */
-#undef PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
-/* #undef RLE_SUPPORTED */
-#undef TARGA_SUPPORTED /* Targa image file format */
-
-/* #undef TWO_FILE_COMMANDLINE */
-/* #undef NEED_SIGNAL_CATCHER */
-/* #undef DONT_USE_B_MODE */
-
-/* Define this if you want percent-done progress reports from cjpeg/djpeg. */
-/* #undef PROGRESS_REPORT */
-
-#endif /* JPEG_CJPEG_DJPEG */
diff --git a/external/jpeg/jpeg.build.patch.1 b/external/jpeg/jpeg.build.patch.1
new file mode 100644
index 000000000000..cf4cc2ad7ded
--- /dev/null
+++ b/external/jpeg/jpeg.build.patch.1
@@ -0,0 +1,58 @@
+diff -ur jpeg.org/configure jpeg/configure
+--- jpeg.org/configure 2014-11-14 12:05:43.345386578 +0100
++++ jpeg/configure 2014-11-14 12:08:59.077388882 +0100
+@@ -22977,10 +22977,6 @@
+ else
+ rm -rf conftest*
+ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+- { { echo "$as_me:$LINENO: error: configuration problem: maybe object file format mismatch." >&5
+-echo "$as_me: error: configuration problem: maybe object file format mismatch." >&2;}
+- { (exit 1); exit 1; }; }
+ fi
+
+
+@@ -23179,10 +23175,6 @@
+ else
+ rm -rf conftest*
+ echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+- { { echo "$as_me:$LINENO: error: configuration problem: maybe object file format mismatch." >&5
+-echo "$as_me: error: configuration problem: maybe object file format mismatch." >&2;}
+- { (exit 1); exit 1; }; }
+ fi
+
+
+diff -ur jpeg.org/Makefile.am jpeg/Makefile.am
+--- jpeg.org/Makefile.am 2014-11-14 12:05:43.349386578 +0100
++++ jpeg/Makefile.am 2014-11-14 12:06:21.005387021 +0100
+@@ -160,8 +160,6 @@
+ rm -rf `find $(distdir) -name .svn`
+
+
+-SUBDIRS += md5
+-
+ MD5_JPEG_INT = 9a68f56bc76e466aa7e52f415d0f4a5f
+ MD5_JPEG_FAST = 0e1502e7fa421835e376a314fac2a39f
+ MD5_JPEG_FAST_100 = 7bf72a8e741d64eecb960c97323af77c
+diff -ur jpeg.org/Makefile.in jpeg/Makefile.in
+--- jpeg.org/Makefile.in 2014-11-14 12:05:43.333386578 +0100
++++ jpeg/Makefile.in 2014-11-14 12:20:00.689396668 +0100
+@@ -264,7 +264,7 @@
+ HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
+ ETAGS = etags
+ CTAGS = ctags
+-DIST_SUBDIRS = java simd md5
++DIST_SUBDIRS = java simd
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ distdir = $(PACKAGE)-$(VERSION)
+ top_distdir = $(distdir)
+@@ -442,7 +442,7 @@
+ jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
+ jquant2.c jutils.c jmemmgr.c jmemnobs.c $(am__append_3) \
+ $(am__append_4) $(am__append_5) $(am__append_10)
+-SUBDIRS = java $(am__append_9) md5
++SUBDIRS = java $(am__append_9)
+ @WITH_TURBOJPEG_TRUE@libturbojpeg_la_SOURCES = $(libjpeg_la_SOURCES) \
+ @WITH_TURBOJPEG_TRUE@ turbojpeg.c turbojpeg.h transupp.c \
+ @WITH_TURBOJPEG_TRUE@ transupp.h jdatadst-tj.c jdatasrc-tj.c \
diff --git a/external/jpeg/patches/jpeg-8c-jmorecfg.patch b/external/jpeg/patches/jpeg-8c-jmorecfg.patch
deleted file mode 100644
index eed791fae9a0..000000000000
--- a/external/jpeg/patches/jpeg-8c-jmorecfg.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- misc/jpeg-9a/jmorecfg.h 2009-11-20 09:01:24.000000000 +0100
-+++ misc/build/jpeg-9a/jmorecfg.h 2011-03-24 21:29:02.073761750 +0100
-@@ -210,6 +210,7 @@
- /* INT32 must hold at least signed 32-bit values. */
-
- #ifndef XMD_H /* X11/xmd.h correctly defines INT32 */
-+#ifndef _SOLAR_H
- #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */
- #ifndef _BASETSD_H /* MinGW is slightly different */
- #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */
-@@ -217,6 +218,7 @@
- #endif
- #endif
- #endif
-+#endif
- #endif
-
- /* Datatype used for image dimensions. The JPEG standard only supports