summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--RepositoryExternal.mk27
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.in22
-rw-r--r--lcms2/makefile.mk97
-rw-r--r--lcms2/prj/build.lst3
-rw-r--r--lcms2/prj/d.lst10
-rw-r--r--ooo.lst.in1
8 files changed, 162 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1739a1043d05..bad1cee80df9 100644
--- a/Makefile
+++ b/Makefile
@@ -191,6 +191,7 @@ libwps\
libxml2\
libxmlsec\
libxslt\
+lcms2\
lpsolve\
lucene\
mdds\
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 138a15b8005f..103c1c628871 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -787,6 +787,33 @@ endef
endif # SYSTEM_LIBWPS
+ifeq ($(SYSTEM_LCMS2),YES)
+
+define gb_LinkTarget__use_lcms2
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(LCMS2_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(LCMS2_LIBS))
+
+endef
+
+else # !SYSTEM_LCMS2
+
+$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
+ lcms2 \
+))
+
+define gb_LinkTarget__use_lcms2
+$(call gb_LinkTarget_add_linked_libs,$(1),\
+ lcms2 \
+)
+
+endef
+
+endif # SYSTEM_LCMS2
+
+
ifeq ($(SYSTEM_LPSOLVE),YES)
define gb_LinkTarget__use_lpsolve55
diff --git a/config_host.mk.in b/config_host.mk.in
index d206cb5c88b3..2eed3c1bb3ca 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -415,6 +415,7 @@ export SYSTEM_HYPH=@SYSTEM_HYPH@
export SYSTEM_ICU=@SYSTEM_ICU@
export SYSTEM_JFREEREPORT=@SYSTEM_JFREEREPORT@
export SYSTEM_JPEG=@SYSTEM_JPEG@
+export SYSTEM_LCMS2=@SYSTEM_LCMS2@
export SYSTEM_LIBC=@SYSTEM_LIBC@
export SYSTEM_LIBCDR=@SYSTEM_LIBCDR@
export SYSTEM_LIBCMIS=@SYSTEM_LIBCMIS@
diff --git a/configure.in b/configure.in
index b0e9ce892619..eef6de426463 100644
--- a/configure.in
+++ b/configure.in
@@ -1137,6 +1137,11 @@ AC_ARG_WITH(system-libcmis,
[Use libcmis already on system.]),,
[with_system_libcmis="$with_system_libs"])
+AC_ARG_WITH(system-lcms2,
+ AS_HELP_STRING([--with-system-lcms2],
+ [Use littlecms v2 already on system.]),,
+ [with_system_lcms2="$with_system_libs"])
+
AC_ARG_WITH(system-libcdr,
AS_HELP_STRING([--with-system-libcdr],
[Use libcdr already on system.]),,
@@ -5801,6 +5806,23 @@ AC_SUBST(WPD_CFLAGS)
AC_SUBST(WPD_LIBS)
dnl ===================================================================
+dnl Check for system lcms2
+dnl ===================================================================
+AC_MSG_CHECKING([which littlecms v2 to use])
+if test "$with_system_lcms2" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LCMS2=YES
+ PKG_CHECK_MODULES( LCMS2, lcms2 )
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LCMS2=NO
+ BUILD_TYPE="$BUILD_TYPE LCMS2"
+fi
+AC_SUBST(SYSTEM_LCMS2)
+AC_SUBST(LCMS2_CFLAGS)
+AC_SUBST(LCMS2_LIBS)
+
+dnl ===================================================================
dnl Check for system cppunit
dnl ===================================================================
AC_MSG_CHECKING([which cppunit to use])
diff --git a/lcms2/makefile.mk b/lcms2/makefile.mk
new file mode 100644
index 000000000000..d39ae5873b61
--- /dev/null
+++ b/lcms2/makefile.mk
@@ -0,0 +1,97 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=.
+
+PRJNAME=lcms2
+TARGET=so_lcms2
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+TARFILE_NAME=lcms2-2.3
+TARFILE_MD5=327348d67c979c88c2dec59a23a17d85
+
+.IF "$(SYSTEM_LCMS2)" == "YES"
+@all:
+ @echo "Using system littlecms2..."
+.ENDIF
+
+.IF "$(GUI)$(COM)"=="WNTMSC"
+CONFIGURE_DIR=.
+BUILD_DIR=Projects/VC2010/lcms2_DLL
+
+CONFIGURE_ACTION =
+
+.IF "$(CCNUMVER)" >= "001600000000"
+BUILD_DIR=Projects/VC2008/lcms2_DLL
+BUILD_ACTION=cd allinone && MSBuild.exe lcms2_DLL.vcxproj /p:Configuration=Release /p:Platform=Win32
+.ELSE
+BUILD_ACTION=cd allinone && $(COMPATH)$/vcpackages$/vcbuild.exe lcms2_DLL.vcproj "Release|Win32"
+.ENDIF
+
+.ELSE #"$(GUI)$(COM)"!="WNTMSC"
+
+CONFIGURE_DIR=.
+BUILD_DIR=src
+
+CONFIGURE_ACTION = CPPFLAGS="$(SOLARINC)" ./configure --without-jpeg --without-tiff --with-pic --enable-shared --disable-static
+
+.IF "$(CROSS_COMPILING)" == "YES"
+CONFIGURE_ACTION += --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
+.ENDIF
+
+BUILD_ACTION = make -j$(GMAKE_MODULE_PARALLELISM)
+
+.ENDIF # "$(GUI)$(COM)"=="WNTMSC"
+
+OUT2INC+=include$/lcms2*.h
+
+.IF "$(OS)"=="MACOSX"
+EXTRPATH=LOADER
+OUT2LIB+=src$/.libs$/liblcms2.*.dylib
+.ELIF "$(OS)"=="WNT"
+.IF "$(COM)"=="GCC"
+OUT2LIB+=src$/.libs$/liblcms2.dll.a
+OUT2BIN+=src$/.libs$/*.dll
+.ELSE
+OUT2LIB+=
+OUT2BIN+=
+.ENDIF
+.ELSE
+OUT2LIB+=src$/.libs$/liblcms2.so*
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+
diff --git a/lcms2/prj/build.lst b/lcms2/prj/build.lst
new file mode 100644
index 000000000000..551f0f385474
--- /dev/null
+++ b/lcms2/prj/build.lst
@@ -0,0 +1,3 @@
+lcms lcms2 : soltools ZLIB:zlib NULL
+lcms lcms2 usr1 - all lcms_mkout NULL
+lcms lcms2 nmake - all lcms_libwpd NULL
diff --git a/lcms2/prj/d.lst b/lcms2/prj/d.lst
new file mode 100644
index 000000000000..d84eecdc9fdd
--- /dev/null
+++ b/lcms2/prj/d.lst
@@ -0,0 +1,10 @@
+mkdir: %_DEST%\inc\lcms2
+..\%__SRC%\inc\*.h %_DEST%\inc\lcms2\*.h
+..\%__SRC%\lib\liblcms2.so.2 %_DEST%\lib\liblcms2.so.2
+symlink: %_DEST%\lib\liblcms2.so.2 %_DEST%\lib\liblcms2.so
+..\%__SRC%\lib\liblcms2.2.dylib %_DEST%\lib\liblcms2.2.dylib
+symlink: %_DEST%\lib\liblcms2.2.dylib %_DEST%\lib\liblcms2.dylib
+..\%__SRC%\lib\liblcms2.so %_DEST%\lib\liblcms2.so
+..\%__SRC%\lib\*.lib %_DEST%\lib
+..\%__SRC%\lib\liblcms2.dll.a %_DEST%\lib\liblcms2.dll.a
+..\%__SRC%\bin\*.dll %_DEST%\bin
diff --git a/ooo.lst.in b/ooo.lst.in
index 94dbfa0e1b79..81ce0a24876c 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -91,6 +91,7 @@ d28864eb2b59bb57b034c0d4662a3cee-libvisio-0.0.15.tar.bz2
e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
7c2549f6b0a8bb604e6c4c729ffdcfe6-libcmis-0.1.0.tar.gz
e5f1ef00a113d2edfd88af616934f293-libcdr-0.0.3.tar.bz2
+327348d67c979c88c2dec59a23a17d85-lcms2-2.3.tar.gz
@GOOGLE_DOCS_EXTENSION_PACK@
@FREETYPE_TARBALL@
@FONTCONFIG_TARBALL@