Kaydet (Commit) 782151a7 authored tarafından Peter Foley's avatar Peter Foley

convert liblangtag to gbuild

Change-Id: Ib019e248b16a39ea058cdebeaa1f37a967a00d6c
üst 49217ff3
......@@ -109,6 +109,7 @@ lcms2\
libcdr\
libcmis\
libexttextcat\
liblangtag\
libmspub\
liborcus\
libpng\
......@@ -224,7 +225,6 @@ external\
helpcontent2 \
icu\
instsetoo_native\
liblangtag\
libxml2\
libxmlsec\
libxslt\
......
......@@ -97,6 +97,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
libcdr \
libcmis \
$(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \
$(call gb_Helper_optional,LIBLANGTAG,liblangtag) \
libmspub \
liborcus \
librelogo \
......
......@@ -620,6 +620,11 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
))
define gb_LinkTarget__use_liblangtag
$(call gb_LinkTarget_use_unpacked,$(1),langtag)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,langtag) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_use_libraries,$(1),\
langtag \
)
......
......@@ -106,6 +106,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
libcdr \
libcmis \
$(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \
$(call gb_Helper_optional,LIBLANGTAG,liblangtag) \
libmspub \
liborcus \
libpng \
......
......@@ -32,6 +32,8 @@ $(eval $(call gb_CppunitTest_add_defs,i18npool_test_languagetag,-DENABLE_LIBLANG
ifeq ($(SYSTEM_LIBLANGTAG),YES)
$(eval $(call gb_CppunitTest_add_defs,i18npool_test_languagetag,-DSYSTEM_LIBLANGTAG))
else
$(eval $(call gb_CppunitTest_use_package,i18npool_test_languagetag,langtag_data))
endif
endif
......
# -*- 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_CustomTarget_CustomTarget,liblangtag/langtag))
$(call gb_CustomTarget_get_target,liblangtag/langtag) : $(call gb_Zip_get_target,liblangtag_data)
rm -rf $(OUTDIR)/share/liblangtag \
&& mkdir -p $(OUTDIR)/share/liblangtag \
&& unzip $< -d $(OUTDIR)/share/liblangtag \
&& touch $(call gb_CustomTarget_get_workdir,liblangtag/langtag)/.dir
# vim: set noet sw=4 ts=4:
# -*- 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,langtag,langtag))
$(eval $(call gb_ExternalPackage_use_external_project,langtag,langtag))
ifeq ($(GUI),WNT)
ifeq ($(COM),GCC)
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag-1.dll,liblangtag/.libs/liblangtag-1.dll))
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.dll.a,liblangtag/.libs/liblangtag.dll.a))
else
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/langtag.lib,liblangtag/.libs/langtag.lib))
endif
else
ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.1.0.0.dylib,liblangtag/.libs/liblangtag.1.0.0.dylib))
else
$(eval $(call gb_ExternalPackage_add_file,langtag,lib/liblangtag.so.1.0.0,liblangtag/.libs/liblangtag.so.1.0.0))
endif
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_ExternalPackage_ExternalPackage,langtag_data,langtag))
$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag,data/language-subtag-registry.xml))
$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag/common/bcp47,\
data/common/bcp47/calendar.xml \
data/common/bcp47/collation.xml \
data/common/bcp47/currency.xml \
data/common/bcp47/number.xml \
data/common/bcp47/timezone.xml \
data/common/bcp47/transform.xml \
data/common/bcp47/transform_ime.xml \
data/common/bcp47/transform_keyboard.xml \
data/common/bcp47/transform_mt.xml \
data/common/bcp47/transform_private_use.xml \
data/common/bcp47/variant.xml \
))
$(eval $(call gb_ExternalPackage_add_files,langtag_data,share/liblangtag/common/supplemental,data/common/supplemental/likelySubtags.xml))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
# -*- 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,langtag))
$(eval $(call gb_ExternalProject_use_unpacked,langtag,langtag))
$(eval $(call gb_ExternalProject_register_targets,langtag,\
build \
))
$(call gb_ExternalProject_get_state_target,langtag,build):
cd $(EXTERNAL_WORKDIR) \
$(if $(filter MSC,$(COM)),&& export LIB="$(ILIB)") \
&& ./configure --disable-modules --disable-test --disable-introspection \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter NO,$(SYSTEM_LIBXML)),LIBXML2_CFLAGS="-I$(OUTDIR)/external" \
$(if $(filter MSC,$(COM)),LIBXML2_LIBS="$(OUTDIR)/lib/libxml2.lib",LIBXML2_LIBS="-L$(OUTDIR)/lib -lxml2"),\
$(if $(filter MACOSX,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)")) \
$(if $(filter MSC,$(COM)),CC="$(CC) -MD -nologo \
$(if $(filter TRUE,$(ENABLE_DEBUG)),-Zi)") \
$(if $(filter MSC,$(COM)),CFLAGS="$(SOLARINC)") \
$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl,-z,origin -Wl,-rpath,$$ORIGIN:$$ORIGIN/../ure-link/lib") \
$(if $(filter-out SOLARIS,$(OS)),,LDFLAGS="-Wl,-z,origin -Wl,-R,$$ORIGIN:$$ORIGIN/../ure-link/lib") \
$(if $(filter-out WNTGCC,$(GUI)$(COM)),,LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2") \
&& $(MAKE) \
&& touch $@
# vim: set noet sw=4 ts=4:
# -*- 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:
# -*- 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,liblangtag))
ifeq ($(ENABLE_LIBLANGTAG),YES)
ifeq ($(SYSTEM_LIBLANGTAG),NO)
$(eval $(call gb_Module_add_targets,liblangtag,\
UnpackedTarball_langtag \
ExternalPackage_langtag \
ExternalPackage_langtag_data \
ExternalProject_langtag \
Zip_liblangtag_data \
))
endif
endif
# vim: set noet sw=4 ts=4:
# -*- 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,langtag))
$(eval $(call gb_UnpackedTarball_set_tarball,langtag,$(LIBLANGTAG_TARBALL)))
ifeq ($(OS),MACOSX)
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-mac.patch \
liblangtag/liblangtag-0.4.0-configure-atomic-cflag-pollution.patch \
))
else
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-msvc-warning.patch \
liblangtag/liblangtag-0.4.0-configure-atomic-cflag-pollution.patch \
liblangtag/liblangtag-0.4.0-windows.patch \
liblangtag/liblangtag-0.4.0-reg2xml-encoding-problem.patch \
liblangtag/liblangtag-0.4.0-windows2.patch \
liblangtag/liblangtag-0.4.0-msvcprojects.patch \
))
endif
ifeq ($(CROSS_COMPILING),YES)
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-cross.patch \
))
endif
ifeq ($(GUI),WNT)
ifeq ($(COM),GCC)
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-mingw.patch \
))
else
$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
liblangtag/liblangtag-0.4.0-msc-configure.patch \
liblangtag/liblangtag-0.4.0-cross.patch \
))
endif
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
# Version: MPL 1.1 / GPLv3+ / LGPLv3+
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License or as specified alternatively below. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# Major Contributor(s):
# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com>
# (initial developer)
#
# All Rights Reserved.
#
# For minor contributions see the git repository.
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
$(eval $(call gb_Zip_Zip,liblangtag_data,$(call gb_UnpackedTarball_get_dir,langtag/data)))
$(eval $(call gb_Zip_use_unpacked,liblangtag_data,langtag))
$(eval $(call gb_Zip_add_files,liblangtag_data,\
language-subtag-registry.xml \
common/bcp47/calendar.xml \
common/bcp47/collation.xml \
common/bcp47/currency.xml \
common/bcp47/number.xml \
common/bcp47/timezone.xml \
common/bcp47/transform.xml \
common/bcp47/transform_ime.xml \
common/bcp47/transform_keyboard.xml \
common/bcp47/transform_mt.xml \
common/bcp47/transform_private_use.xml \
common/bcp47/variant.xml \
common/supplemental/likelySubtags.xml \
))
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
#
# Copyright 2012 LibreOffice contributors.
#
# 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/.
#
PRJ=.
PRJNAME=liblangtag
TARGET=liblangtag
LIBLANGTAG_MAJOR=0
LIBLANGTAG_MINOR=4
LIBLANGTAG_MICRO=0
# Currently liblangtag.so.0.1.0 is generated instead of 0.2.0, presumably a bug?
# For new versions adapt symlink in prj/d.lst
# Version is currently hardcoded in scp2/source/ooo/file_library_ooo.scp
# section gid_File_Lib_Langtag, adapt for new versions, or introduce
# LIBLANGTAG_M* in configure!
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
.IF "$(ENABLE_LIBLANGTAG)" != "YES" || "$(SYSTEM_LIBLANGTAG)" == "YES"
@all:
@echo "Not building liblangtag."
.ENDIF
TARFILE_NAME=liblangtag-$(LIBLANGTAG_MAJOR).$(LIBLANGTAG_MINOR).$(LIBLANGTAG_MICRO)
TARFILE_MD5=54e578c91b1b68e69c72be22adcb2195
ADDITIONAL_FILES=\
msvs2008$/liblangtag.sln msvs2008$/liblangtag.vcproj \
msvs2010$/liblangtag.sln msvs2010$/liblangtag.vcxproj
PATCH_FILES=liblangtag-0.4.0-msvc-warning.patch
PATCH_FILES+=liblangtag-0.4.0-configure-atomic-cflag-pollution.patch
PATCH_FILES+=liblangtag-0.4.0-windows.patch
PATCH_FILES+=liblangtag-0.4.0-reg2xml-encoding-problem.patch
PATCH_FILES+=liblangtag-0.4.0-windows2.patch
PATCH_FILES+=liblangtag-0.4.0-msvcprojects.patch
.IF "$(OS)" == "MACOSX"
PATCH_FILES=liblangtag-0.4.0-mac.patch
PATCH_FILES+=liblangtag-0.4.0-configure-atomic-cflag-pollution.patch
.END
CONFIGURE_DIR=.
BUILD_DIR=$(CONFIGURE_DIR)
CONFIGURE_FLAGS= --disable-modules --disable-test
.IF "$(OS)" == "MACOSX"
my_prefix = @.__________________________________________________$(EXTRPATH)
.ELSE
my_prefix = install-liblangtag
.END
my_misc = $(shell @pwd)/$(MISC)
my_install_sub = install
my_destdir = $(my_misc)/$(my_install_sub)
my_install = $(my_destdir)/$(my_prefix)
# relative to $(MISC)/build/liblangtag/ for OUT2LIB, OUT2INC
my_install_relative = ../../$(my_install_sub)/$(my_prefix)
my_data = $(my_install)/share/liblangtag
CONFIGURE_FLAGS+= --prefix='/$(my_prefix)' --libdir='/$(my_prefix)/lib'
# g-ir-scanner is dumb enough to turn CC=ccache gcc into trying
# to execve an app literal of "ccache gcc" including the space.
CONFIGURE_FLAGS+= --disable-introspection
.IF "$(SYSTEM_LIBXML)"!="YES"
CONFIGURE_FLAGS+= LIBXML2_CFLAGS='-I$(SOLARINCDIR)/external'
.IF "$(GUI)"=="WNT" && "$(COM)"!="GCC"
CONFIGURE_FLAGS+= LIBXML2_LIBS='$(SOLARLIBDIR)/libxml2.lib'
CC!:=$(CC) -MD -nologo
.IF "$(debug)"=="TRUE"
CC!:=$(CC) -Zi
.ENDIF
.ELSE
CONFIGURE_FLAGS+= LIBXML2_LIBS='-L$(SOLARLIBDIR) -lxml2'
.ENDIF
.ELSE
.IF "$(OS)" == "MACOSX"
CONFIGURE_FLAGS+= LIBXML2_CFLAGS='$(LIBXML_CFLAGS)' LIBXML2_LIBS='$(LIBXML_LIBS)' --disable-modules
.ENDIF
.ENDIF
CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure
BUILD_ACTION=$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) $(eq,$(VERBOSE),TRUE V=1) && \
$(AUGMENT_LIBRARY_PATH) $(GNUMAKE) install DESTDIR=$(my_destdir)
.IF "$(SYSTEM_LIBXML)"!="YES"
.IF "$(OS)"=="FREEBSD" || "$(OS)"=="LINUX"
CONFIGURE_FLAGS+= \
LDFLAGS=-Wl,-z,origin\ -Wl,-rpath,\'\$$\$$ORIGIN:\$$\$$ORIGIN/../ure-link/lib\'
.ELIF "$(OS)"=="SOLARIS"
CONFIGURE_FLAGS+= LDFLAGS=-Wl,-R\'\$$\$$ORIGIN:\$$\$$ORIGIN/../ure-link/lib\'
.END
.END
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="GCC"
CONFIGURE_FLAGS+= LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2
PATCH_FILES+=liblangtag-0.4.0-mingw.patch
.ELSE # "$(COM)"=="GCC"
PATCH_FILES+=liblangtag-0.4.0-msc-configure.patch
PATCH_FILES+=liblangtag-0.4.0-cross.patch
.ENDIF # "$(COM)"=="GCC"
.ENDIF # "$(GUI)"=="WNT"
.IF "$(CROSS_COMPILING)"=="YES"
# There's a tool used only at build time to create the .xml file, and this does not work
# with cross-compiling. The file for this case is from a normal (non-cross) build.
PATCH_FILES+=liblangtag-0.4.0-cross.patch
CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
.ENDIF
OUT2INC += $(my_install_relative)/include/liblangtag/*
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="GCC"
OUT2BIN += $(my_install_relative)/bin/liblangtag-1.dll
OUT2LIB += $(my_install_relative)/lib/liblangtag.dll.a
.ELSE
OUT2LIB += $(my_install_relative)/lib/langtag.lib*
.ENDIF
.ELSE
.IF "$(OS)" == "MACOSX"
OUT2LIB += $(my_install_relative)/lib/liblangtag*.dylib
.ELSE
OUT2LIB += $(my_install_relative)/lib/liblangtag.so*
.ENDIF
.ENDIF
# --- Targets ------------------------------------------------------
ALLTAR: $(MISC)/liblangtag_data.zip
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
$(MISC)/liblangtag_data.zip: $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE)
@-rm -f $@
@echo creating $@
$(COMMAND_ECHO)cd $(my_data) && zip $(ZIP_VERBOSITY) -r $(my_misc)/$(@:f) *
mkdir: %_DEST%\inc\liblangtag
..\%__SRC%\inc\* %_DEST%\inc\liblangtag\
..\%__SRC%\bin\liblangtag-*.dll %_DEST%\bin\
..\%__SRC%\lib\liblangtag.so* %_DEST%\lib\
..\%__SRC%\lib\langtag.lib* %_DEST%\lib\
..\%__SRC%\lib\liblangtag*.dylib %_DEST%\lib\
..\%__SRC%\lib\liblangtag.dll.a %_DEST%\lib\
..\%__SRC%\misc\liblangtag_data.zip %_DEST%\pck\
symlink: %_DEST%\lib\liblangtag.so.1.0.0 %_DEST%\lib\liblangtag.so.1
symlink: %_DEST%\lib\liblangtag.so.1.0.0 %_DEST%\lib\liblangtag.so
# Unpacked data needed for test_languagetag in i18npool.
mkdir: %_DEST%\share
mkdir: %_DEST%\share\liblangtag
mkdir: %_DEST%\share\liblangtag\common
mkdir: %_DEST%\share\liblangtag\common\bcp47
mkdir: %_DEST%\share\liblangtag\common\supplemental
..\%__SRC%\misc\install\install-liblangtag\share\liblangtag\* %_DEST%\share\liblangtag\
..\%__SRC%\misc\install\install-liblangtag\share\liblangtag\common\bcp47\* %_DEST%\share\liblangtag\common\bcp47\
..\%__SRC%\misc\install\install-liblangtag\share\liblangtag\common\supplemental\* %_DEST%\share\liblangtag\common\supplemental\
..\%__SRC%\misc\install\@.__________________________________________________OOO\share\liblangtag\* %_DEST%\share\liblangtag\
..\%__SRC%\misc\install\@.__________________________________________________OOO\share\liblangtag\common\bcp47\* %_DEST%\share\liblangtag\common\bcp47\
..\%__SRC%\misc\install\@.__________________________________________________OOO\share\liblangtag\common\supplemental\* %_DEST%\share\liblangtag\common\supplemental\
......@@ -45,6 +45,7 @@ gb_PackagePart_get_destinations = \
$(OUTDIR)/par \
$(OUTDIR)/pck \
$(OUTDIR)/rdb \
$(OUTDIR)/share \
$(OUTDIR)/unittest \
$(OUTDIR)/xml \
......
tb tail_build : BERKELEYDB:berkeleydb CAIRO:cairo CPPUNIT:cppunit EXPAT:expat ICU:icu JPEG:jpeg 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 CAIRO:cairo CPPUNIT:cppunit EXPAT:expat ICU:icu JPEG:jpeg 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment