[Libreoffice-commits] .: config_host.mk.in configure.ac lcms2/ExternalPackage_lcms2.mk lcms2/ExternalProject_lcms2.mk lcms2/Makefile lcms2/makefile.mk lcms2/Module_lcms2.mk lcms2/prj lcms2/UnpackedTarball_lcms2.mk Makefile.top Module_tail_build.mk ooo.lst.in RepositoryExternal.mk RepositoryModule_ooo.mk tail_build/prj

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Nov 4 06:02:28 PST 2012


 Makefile.top                   |    2 
 Module_tail_build.mk           |    1 
 RepositoryExternal.mk          |    6 +-
 RepositoryModule_ooo.mk        |    1 
 config_host.mk.in              |    1 
 configure.ac                   |    7 --
 lcms2/ExternalPackage_lcms2.mk |   28 +++++++++
 lcms2/ExternalProject_lcms2.mk |   45 ++++++++++++++++
 lcms2/Makefile                 |    7 ++
 lcms2/Module_lcms2.mk          |   20 +++++++
 lcms2/UnpackedTarball_lcms2.mk |   20 +++++++
 lcms2/makefile.mk              |  115 -----------------------------------------
 lcms2/prj/d.lst                |   11 ---
 ooo.lst.in                     |    2 
 tail_build/prj/build.lst       |    2 
 15 files changed, 132 insertions(+), 136 deletions(-)

New commits:
commit 433b43bcd2dbd146a9d6342fab0704d653c50d29
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Sun Nov 4 08:46:44 2012 -0500

    convert lcms2 to gbuild
    
    Change-Id: I96de6b20b2a68f0982a30d33359e9e9cda9e642c

diff --git a/Makefile.top b/Makefile.top
index bcb8ab0..d8fee07 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -105,6 +105,7 @@ jvmaccess\
 jvmfwk\
 l10ntools\
 languagetool\
+lcms2\
 libcdr\
 libcmis\
 libmspub\
@@ -232,7 +233,6 @@ liblangtag\
 libxml2\
 libxmlsec\
 libxslt\
-lcms2\
 migrationanalysis\
 moz\
 mysqlc\
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 7027f34..fe270c3 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
 	jvmaccess \
 	jvmfwk \
 	$(call gb_Helper_optional,LANGUAGETOOL,languagetool) \
+	$(call gb_Helper_optional,LCMS2,lcms2) \
 	libcdr \
 	libcmis \
 	libmspub \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 24b66c6..5db629b 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1234,8 +1234,9 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 ))
 
 define gb_LinkTarget__use_lcms2
+$(call gb_LinkTarget_use_external_project,$(1),lcms2)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/lcms2 \
+	-I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -1251,8 +1252,9 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 ))
 
 define gb_LinkTarget__use_lcms2
+$(call gb_LinkTarget_use_external_project,$(1),lcms2)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/lcms2 \
+	-I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_libraries,$(1),\
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index 0e63a2d..c9b7b9f 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -102,6 +102,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
 	jvmfwk \
 	$(call gb_Helper_optional,DESKTOP,l10ntools) \
 	$(call gb_Helper_optional,LANGUAGETOOL,languagetool) \
+	$(call gb_Helper_optional,LCMS2,lcms2) \
 	libcdr \
 	libcmis \
 	libmspub \
diff --git a/config_host.mk.in b/config_host.mk.in
index ec66656..3b2d42e 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -311,6 +311,7 @@ export LANGUAGETOOL_TARBALL=@LANGUAGETOOL_TARBALL@
 export L10N_MODULE=@L10N_MODULE@
 export LCMS2_CFLAGS=@LCMS2_CFLAGS@
 export LCMS2_LIBS=@LCMS2_LIBS@
+export LCMS2_TARBALL=@LCMS2_TARBALL@
 ifneq ($(strip @LDFLAGS@),)
 export LDFLAGS=@LDFLAGS@
 endif
diff --git a/configure.ac b/configure.ac
index 90948d9..d206c3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7042,15 +7042,12 @@ if test "$with_system_lcms2" = "yes"; then
 else
     AC_MSG_RESULT([internal])
     SYSTEM_LCMS2=NO
+    LCMS2_TARBALL="861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz"
     BUILD_TYPE="$BUILD_TYPE LCMS2"
-    LCMS2_CFLAGS="-I${OUTDIR}/inc/lcms2"
-    if test $_os = Darwin; then
-        LCMS2_CFLAGS="$LCMS2_CFLAGS -Wno-long-long"
-    fi
-    LCMS2_LIBS="-L${OUTDIR}/lib -llcms2"
 fi
 AC_SUBST(SYSTEM_LCMS2)
 AC_SUBST(LCMS2_CFLAGS)
+AC_SUBST(LCMS2_TARBALL)
 AC_SUBST(LCMS2_LIBS)
 AC_SUBST([MINGW_LCMS2_DLL])
 
diff --git a/lcms2/ExternalPackage_lcms2.mk b/lcms2/ExternalPackage_lcms2.mk
new file mode 100644
index 0000000..be08157
--- /dev/null
+++ b/lcms2/ExternalPackage_lcms2.mk
@@ -0,0 +1,28 @@
+# -*- 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_ExternalPackage_ExternalPackage,lcms2,lcms2))
+$(eval $(call gb_ExternalPackage_use_external_project,lcms2,lcms2))
+
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,lcms2,lib/liblcms2.4.dylib,src/.libs/liblcms2.4.dylib))
+else ifeq ($(filter-out IOS ANDROID,$(OS)),)
+$(eval $(call gb_ExternalPackage_add_file,lcms2,lib/liblcms2.a,src/.libs/liblcms2.a))
+else ifeq ($(OS),WNT)
+ifeq ($(COM),GCC)
+$(eval $(call gb_ExternalPackage_add_file,lcms2,lib/liblcms2.dll.a,src/.libs/liblcms2.dll.a))
+$(eval $(call gb_ExternalPackage_add_file,lcms2,bin/liblcms2.dll,src/.libs/liblcms2.dll))
+else ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_file,lcms2,lib/lcms2.lib,bin/lcms2.lib))
+$(eval $(call gb_ExternalPackage_add_file,lcms2,bin/lcms2.dll,bin/lcms2.dll))
+endif
+else
+$(eval $(call gb_ExternalPackage_add_file,lcms2,lib/liblcms2.so,src/.libs/liblcms2.so.2.0.4))
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/lcms2/ExternalProject_lcms2.mk b/lcms2/ExternalProject_lcms2.mk
new file mode 100644
index 0000000..ef677f2
--- /dev/null
+++ b/lcms2/ExternalProject_lcms2.mk
@@ -0,0 +1,45 @@
+# -*- 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,lcms2))
+
+$(eval $(call gb_ExternalProject_use_unpacked,lcms2,lcms2))
+
+$(eval $(call gb_ExternalProject_use_package,lcms2,hunspell))
+
+$(eval $(call gb_ExternalProject_register_targets,lcms2,\
+	build \
+))
+
+ifeq ($(COM),MSC)
+
+ifeq ($(filter-out 14 13,$(COMEX)),)
+$(call gb_ExternalProject_get_state_target,lcms2,build):
+	cd $(EXTERNAL_WORKDIR)/Projects/VC2010/lcms2_DLL \
+	&& MSBuild.exe lcms2_DLL.vcxproj /p:Configuration=Release /p:Platform=Win32 /p:TargetName=lcms2 \
+	$(if $(filter 14,$(COMEX)),/p:PlatformToolset=v110) \
+	&& touch $@
+else
+$(call gb_ExternalProject_get_state_target,lcms2,build):
+	cd $(EXTERNAL_WORKDIR)/VC2008/lcms2_DLL \
+	&& $(COMPATH)/vcpackages/vcbuild.exe lcms2_DLL.vcproj "Release|Win32" \
+	&& touch $@
+endif
+else
+$(call gb_ExternalProject_get_state_target,lcms2,build):
+	cd $(EXTERNAL_WORKDIR) \
+	&& ./configure --without-jpeg --without-tiff --with-pic \
+	$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+	CPPFLAGS=" $(SOLARINC)" \
+	$(if $(filter IOS ANDROID,$(OS)),--disable-shared, --enable-shared --disable-static) \
+	&& cd src \
+	&& $(MAKE) \
+	&& touch $@
+endif
+# vim: set noet sw=4 ts=4:
diff --git a/lcms2/Makefile b/lcms2/Makefile
new file mode 100644
index 0000000..ccb1c85
--- /dev/null
+++ b/lcms2/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/lcms2/Module_lcms2.mk b/lcms2/Module_lcms2.mk
new file mode 100644
index 0000000..898af93
--- /dev/null
+++ b/lcms2/Module_lcms2.mk
@@ -0,0 +1,20 @@
+# -*- 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_Module_Module,lcms2))
+
+ifeq ($(SYSTEM_LCMS2),NO)
+$(eval $(call gb_Module_add_targets,lcms2,\
+	UnpackedTarball_lcms2 \
+	ExternalPackage_lcms2 \
+	ExternalProject_lcms2 \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/lcms2/UnpackedTarball_lcms2.mk b/lcms2/UnpackedTarball_lcms2.mk
new file mode 100644
index 0000000..4d6cfda
--- /dev/null
+++ b/lcms2/UnpackedTarball_lcms2.mk
@@ -0,0 +1,20 @@
+# -*- 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_UnpackedTarball_UnpackedTarball,lcms2))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,lcms2,$(LCMS2_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,lcms2,3))
+
+$(eval $(call gb_UnpackedTarball_add_patches,lcms2,\
+	lcms2/lcms2.patch \
+	lcms2/lcms2-2.4-windows.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/lcms2/makefile.mk b/lcms2/makefile.mk
deleted file mode 100644
index 01011f2..0000000
--- a/lcms2/makefile.mk
+++ /dev/null
@@ -1,115 +0,0 @@
-#*************************************************************************
-#
-# 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.4
-TARFILE_MD5=861ef15fa0bc018f9ddc932c4ad8b6dd
-
-PATCH_FILES = lcms2.patch
-
-.IF "$(SYSTEM_LCMS2)" == "YES"
- at all:
-    @echo "Using system littlecms2..."
-.ENDIF
-
-.IF "$(GUI)$(COM)"=="WNTMSC"
-
-PATCH_FILES += lcms2-2.4-windows.patch
-
-CONFIGURE_DIR=.
-
-CONFIGURE_ACTION =
-
-.IF "$(CCNUMVER)" >= "001700000000"
-BUILD_DIR=Projects/VC2010/lcms2_DLL
-BUILD_ACTION=MSBuild.exe lcms2_DLL.vcxproj /p:Configuration=Release /p:Platform=Win32 /p:TargetName=lcms2 /p:PlatformToolset=v110
-.ELIF "$(CCNUMVER)" >= "001600000000"
-BUILD_DIR=Projects/VC2010/lcms2_DLL
-BUILD_ACTION=MSBuild.exe lcms2_DLL.vcxproj /p:Configuration=Release /p:Platform=Win32 /p:TargetName=lcms2
-.ELSE
-BUILD_DIR=Projects/VC2008/lcms2_DLL
-BUILD_ACTION=$(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
-
-.IF "$(OS)" == "MACOSX"
-CONFIGURE_FLAGS += \
-    --prefix=/@.__________________________________________________$(EXTRPATH)
-.END
-
-.IF "$(OS)" == "IOS" || "$(OS)" == "ANDROID" 
-CONFIGURE_ACTION += --disable-shared
-.ENDIF
-
-BUILD_ACTION = $(GNUMAKE) -j$(PARALLELISM)
-
-.ENDIF # "$(GUI)$(COM)"=="WNTMSC"
-
-OUT2INC+=include$/lcms2*.h
-
-.IF "$(OS)"=="MACOSX"
-OUT2LIB+=src$/.libs$/liblcms2.*.dylib
-.ELIF "$(OS)"=="IOS" || "$(OS)" == "ANDROID" 
-OUT2LIB+=src$/.libs$/liblcms2.a
-.ELIF "$(OS)"=="WNT"
-.IF "$(COM)"=="GCC"
-OUT2LIB+=src$/.libs$/liblcms2.dll.a
-OUT2BIN+=src$/.libs$/*.dll
-.ELSE
-OUT2LIB+=bin$/lcms2.lib
-OUT2BIN+=bin$/lcms2.dll
-.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/d.lst b/lcms2/prj/d.lst
index b79227e..e69de29 100644
--- a/lcms2/prj/d.lst
+++ b/lcms2/prj/d.lst
@@ -1,11 +0,0 @@
-mkdir: %_DEST%\inc\lcms2
-..\%__SRC%\inc\*.h %_DEST%\inc\lcms2\*.h
-..\%__SRC%\lib\liblcms2.so.2 %_DEST%\lib\liblcms2.so.2
-..\%__SRC%\lib\liblcms2.a %_DEST%\lib\liblcms2.a
-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/lcms2/prj/dmake b/lcms2/prj/dmake
deleted file mode 100644
index e69de29..0000000
diff --git a/ooo.lst.in b/ooo.lst.in
index 57bd3a3..c9ecb9e 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -31,7 +31,6 @@ a7d6c5f2fe2d481149ed3ba807b5c043-gdk-pixbuf-2.23.0.tar.gz
 7c53f83e0327343f4060c0eb83842daf-icu4c-49_1_1-src.tgz
 0f63ee487fda8f21fafa767b3c447ac9-ixion-0.2.0.tar.gz
 a0a861f539f0e7a91d05e6b9457e4db1-nss-3.13.5-with-nspr-4.9.1.tar.gz
-861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
 fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
 @AFMS_TARBALL@
 @APACHE_COMMONS_CODEC_TARBALL@
@@ -72,6 +71,7 @@ fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
 @JFREEREPORT_SAC_TARBALL@
 @JPEG_TARBALL@
 @LANGUAGETOOL_TARBALL@
+ at LCMS2_TARBALL@
 @LIBRSVG_TARBALL@
 @LPSOLVE_TARBALL@
 @MDDS_TARBALL@
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index ba67a5e..10c423a 100644
--- a/tail_build/prj/build.lst
+++ b/tail_build/prj/build.lst
@@ -1,2 +1,2 @@
-tb      tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
+tb      tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf ICU:icu JPEG:jpeg LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
 tb tail_build\prj nmake - all tb_prj   NULL


More information about the Libreoffice-commits mailing list