[DO-973] harfbuzz package (!10)

Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech>
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/10
This commit is contained in:
Aleksandr Vodyanov
2024-12-26 12:02:17 +03:00
parent 39afe6a1dd
commit c807f2514e
126 changed files with 6604 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
sources:
"0.22":
url: "https://nexus.avroid.tech/repository/all-raw-proxy-ftp_gnu_org/pub/gnu/gettext/gettext-0.22.tar.gz"
sha256: "49f089be11b490170bbf09ed2f51e5f5177f55be4cc66504a5861820e0fb06ab"
"0.21":
url: "https://nexus.avroid.tech/repository/all-raw-proxy-ftp_gnu_org/pub/gnu/gettext/gettext-0.21.tar.gz"
sha256: "c77d0da3102aec9c07f43671e60611ebff89a996ef159497ce8e59d075786b12"
"0.20.1":
sha256: "66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c"
url: "https://nexus.avroid.tech/repository/all-raw-proxy-ftp_gnu_org/pub/gnu/gettext/gettext-0.20.1.tar.gz"
patches:
"0.21":
- patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch"
patch_description: "memmove is intrinsic function on MSVC"
patch_type: "portability"
"0.20.1":
- patch_file: "patches/0001-build-Fix-build-errors-with-MSVC.patch"
patch_description: "Fix build errors with MSVC"
patch_type: "portability"
- patch_file: "patches/0002-memmove-is-intrinsic-function-on-MSVC.patch"
patch_description: "memmove is intrinsic function on MSVC"
patch_type: "portability"
- patch_file: "patches/0003-Reported-by-Gabor-Z.-Papp-gzp-papp.hu.patch"
patch_description: "fix preloadable libintl for static build"
patch_type: "portability"

View File

@@ -0,0 +1,239 @@
import glob
import os
from conan import ConanFile
from conan.tools.apple import is_apple_os
from conan.tools.build import cross_building
from conan.tools.env import VirtualBuildEnv, VirtualRunEnv, Environment
from conan.tools.files import (
apply_conandata_patches,
copy,
export_conandata_patches,
get,
rename
)
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
from conan.tools.scm import Version
required_conan_version = ">=1.53.0"
class GetTextConan(ConanFile):
name = "libgettext"
description = "An internationalization and localization system for multilingual programs"
topics = ("gettext", "intl", "libintl", "i18n")
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://www.gnu.org/software/gettext"
# Some parts of the project are GPL-3.0-or-later and some are LGPL-2.1-or-later.
# At this time, only libintl is packaged, which is licensed under the LGPL-2.1-or-later.
# If you modify this package to include other portions of the library, please configure the license accordingly.
# The licensing of the project is documented here: https://www.gnu.org/software/gettext/manual/gettext.html#Licenses
license = "LGPL-2.1-or-later"
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
"fPIC": [True, False],
"threads": ["posix", "solaris", "pth", "windows", "disabled"],
}
default_options = {
"shared": False,
"fPIC": True,
# Handle default value for `threads` in `config_options` method
}
@property
def _is_clang_cl(self):
return self.settings.os == "Windows" and self.settings.compiler == "clang" and \
self.settings.compiler.get_safe("runtime")
@property
def _gettext_folder(self):
return "gettext-tools"
def export_sources(self):
export_conandata_patches(self)
def config_options(self):
if self.settings.os == "Windows":
self.options.rm_safe("fPIC")
self.options.threads = {"Solaris": "solaris", "Windows": "windows"}.get(str(self.settings.os), "posix")
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.libcxx")
self.settings.rm_safe("compiler.cppstd")
def layout(self):
basic_layout(self, src_folder="src")
def requirements(self):
self.requires("libiconv/1.17")
@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)
def build_requirements(self):
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", default=False, check_type=str):
self.tool_requires("msys2/cci.latest")
if is_msvc(self) or self._is_clang_cl:
self.tool_requires("automake/1.16.5")
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
VirtualBuildEnv(self).generate()
if not cross_building(self):
VirtualRunEnv(self).generate(scope="build")
tc = AutotoolsToolchain(self)
tc.configure_args += [
"HELP2MAN=/bin/true",
"EMACS=no",
"--disable-nls",
"--disable-dependency-tracking",
"--enable-relocatable",
"--disable-c++",
"--disable-java",
"--disable-csharp",
"--disable-libasprintf",
"--disable-curses",
"--disable-threads" if self.options.threads == "disabled" else ("--enable-threads=" + str(self.options.threads)),
f"--with-libiconv-prefix={unix_path(self, self.dependencies['libiconv'].package_folder)}",
]
if is_msvc(self) or self._is_clang_cl:
target = None
if self.settings.arch == "x86_64":
target = "x86_64-w64-mingw32"
elif self.settings.arch == "x86":
target = "i686-w64-mingw32"
if target is not None:
tc.configure_args += [f"--host={target}", f"--build={target}"]
if (str(self.settings.compiler) == "Visual Studio" and Version(self.settings.compiler.version) >= "12") or \
(str(self.settings.compiler) == "msvc" and Version(self.settings.compiler.version) >= "180"):
tc.extra_cflags += ["-FS"]
if self.settings.build_type == "Debug":
# Skip checking for the 'n' printf format directly
# in msvc, as it is known to not be available due to security concerns.
# Skipping it avoids a GUI prompt during ./configure for a debug build
# See https://github.com/conan-io/conan-center-index/issues/23698
tc.configure_args.extend([
'gl_cv_func_printf_directive_n=no'
])
tc.make_args += ["-C", "intl"]
env = tc.environment()
if is_msvc(self) or self._is_clang_cl:
def programs():
rc = None
if self.settings.arch == "x86_64":
rc = "windres --target=pe-x86-64"
elif self.settings.arch == "x86":
rc = "windres --target=pe-i386"
if self._is_clang_cl:
return os.environ.get("CC", "clang-cl"), os.environ.get("AR", "llvm-lib"), os.environ.get("LD", "lld-link"), rc
if is_msvc(self):
return "cl -nologo", "lib", "link", rc
compile_wrapper = unix_path(self, self.conf.get("user.automake:compile-wrapper", check_type=str))
ar_wrapper = unix_path(self, self.conf.get("user.automake:lib-wrapper", check_type=str))
cc, ar, link, rc = programs()
env.define("CC", f"{compile_wrapper} {cc}")
env.define("CXX", f"{compile_wrapper} {cc}")
env.define("LD", link)
env.define("AR", f"{ar_wrapper} {ar}")
env.define("NM", "dumpbin -symbols")
env.define("RANLIB", ":")
env.define("STRIP", ":")
if rc is not None:
env.define("RC", rc)
env.define("WINDRES", rc)
tc.generate(env)
if is_msvc(self) or self._is_clang_cl:
# Custom AutotoolsDeps for cl like compilers
# workaround for https://github.com/conan-io/conan/issues/12784
includedirs = []
defines = []
libs = []
libdirs = []
linkflags = []
cxxflags = []
cflags = []
for dependency in self.dependencies.values():
deps_cpp_info = dependency.cpp_info.aggregated_components()
includedirs.extend(deps_cpp_info.includedirs)
defines.extend(deps_cpp_info.defines)
libs.extend(deps_cpp_info.libs + deps_cpp_info.system_libs)
libdirs.extend(deps_cpp_info.libdirs)
linkflags.extend(deps_cpp_info.sharedlinkflags + deps_cpp_info.exelinkflags)
cxxflags.extend(deps_cpp_info.cxxflags)
cflags.extend(deps_cpp_info.cflags)
env = Environment()
env.append("CPPFLAGS", [f"-I{unix_path(self, p)}" for p in includedirs] + [f"-D{d}" for d in defines])
env.append("_LINK_", [lib if lib.endswith(".lib") else f"{lib}.lib" for lib in libs])
env.append("LDFLAGS", [f"-L{unix_path(self, p)}" for p in libdirs] + linkflags)
env.append("CXXFLAGS", cxxflags)
env.append("CFLAGS", cflags)
env.vars(self).save_script("conanautotoolsdeps_cl_workaround")
else:
deps = AutotoolsDeps(self)
deps.generate()
def build(self):
apply_conandata_patches(self)
autotools = Autotools(self)
autotools.configure("gettext-runtime")
autotools.make()
def package(self):
dest_lib_dir = os.path.join(self.package_folder, "lib")
dest_runtime_dir = os.path.join(self.package_folder, "bin")
dest_include_dir = os.path.join(self.package_folder, "include")
copy(self, "COPYING", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*gnuintl*.dll", self.build_folder, dest_runtime_dir, keep_path=False)
copy(self, "*gnuintl*.lib", self.build_folder, dest_lib_dir, keep_path=False)
copy(self, "*gnuintl*.a", self.build_folder, dest_lib_dir, keep_path=False)
copy(self, "*gnuintl*.so*", self.build_folder, dest_lib_dir, keep_path=False)
copy(self, "*gnuintl*.dylib", self.build_folder, dest_lib_dir, keep_path=False)
copy(self, "*libgnuintl.h", self.build_folder, dest_include_dir, keep_path=False)
rename(self, os.path.join(dest_include_dir, "libgnuintl.h"), os.path.join(dest_include_dir, "libintl.h"))
fix_msvc_libname(self)
def package_info(self):
self.cpp_info.set_property("cmake_find_mode", "both")
self.cpp_info.set_property("cmake_file_name", "Intl")
self.cpp_info.set_property("cmake_target_name", "Intl::Intl")
self.cpp_info.libs = ["gnuintl"]
if is_apple_os(self):
self.cpp_info.frameworks.append("CoreFoundation")
self.cpp_info.names["cmake_find_package"] = "Intl"
self.cpp_info.names["cmake_find_package_multi"] = "Intl"
def fix_msvc_libname(conanfile, remove_lib_prefix=True):
"""remove lib prefix & change extension to .lib in case of cl like compiler"""
if not conanfile.settings.get_safe("compiler.runtime"):
return
libdirs = getattr(conanfile.cpp.package, "libdirs")
for libdir in libdirs:
for ext in [".dll.a", ".dll.lib", ".a"]:
full_folder = os.path.join(conanfile.package_folder, libdir)
for filepath in glob.glob(os.path.join(full_folder, f"*{ext}")):
libname = os.path.basename(filepath)[0:-len(ext)]
if remove_lib_prefix and libname[0:3] == "lib":
libname = libname[3:]
rename(conanfile, filepath, os.path.join(os.path.dirname(filepath), f"{libname}.lib"))

View File

@@ -0,0 +1,362 @@
From b33dca8eecdc1eb30bb3747df563faabf729f001 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Thu, 4 Jul 2019 16:27:33 +0200
Subject: [PATCH 1/2] build: Fix build errors with MSVC.
* gettext-tools/libgettextpo/exported.sh.in: Remove one level of eval.
* gettext-tools/libgettextpo/Makefile.am (config.h): Redirect compiler output to
stderr. Remove symbols that contain an '@'.
* libtextstyle/lib/Makefile.am (config.h): Likewise.
build: Fix build error with MSVC.
* gettext-runtime/intl/export.h (LIBINTL_DLL_EXPORTED): Define differently for
MSVC.
build: Fix build error with MSVC.
* gettext-runtime/intl/Makefile.am (INTL_WINDOWS_LIBS): New variable.
(OTHER_LDFLAGS): Add it.
build: Fix build errors with MSVC.
* gettext-tools/src/lang-table.h (language_table, language_variant_table):
Declare with C linkage.
* gettext-tools/src/read-po.h (input_format_po): Likewise.
* gettext-tools/src/read-properties.h (input_format_properties): Likewise.
* gettext-tools/src/read-stringtable.h (input_format_stringtable): Likewise.
* gettext-tools/src/write-properties.h (output_format_properties): Likewise.
* gettext-tools/src/write-stringtable.h (output_format_stringtable): Likewise.
intl: Don't export the glwthread* symbols from libintl on native Windows.
* gettext-runtime/intl/Makefile.am (OTHER_LDFLAGS): Add an -export-symbols-regex
option.
---
gettext-runtime/intl/Makefile.in | 10 +++++++++-
gettext-runtime/intl/export.h | 2 ++
gettext-tools/intl/Makefile.in | 10 +++++++++-
gettext-tools/libgettextpo/Makefile.in | 4 ++--
gettext-tools/libgettextpo/exported.sh.in | 5 ++---
gettext-tools/src/lang-table.h | 14 +++++++++++++-
gettext-tools/src/read-po.h | 14 +++++++++++++-
gettext-tools/src/read-properties.h | 14 +++++++++++++-
gettext-tools/src/read-stringtable.h | 14 +++++++++++++-
gettext-tools/src/write-properties.h | 14 +++++++++++++-
gettext-tools/src/write-stringtable.h | 14 +++++++++++++-
libtextstyle/lib/Makefile.in | 4 ++--
12 files changed, 104 insertions(+), 15 deletions(-)
diff --git a/gettext-runtime/intl/Makefile.in b/gettext-runtime/intl/Makefile.in
index fe59cd4aa..10aaa89fe 100644
--- a/gettext-runtime/intl/Makefile.in
+++ b/gettext-runtime/intl/Makefile.in
@@ -1416,6 +1416,11 @@ libintl_la_DEPENDENCIES = $(WOE32_LIBADD)
libgnuintl_la_LIBADD = $(WOE32_LIBADD)
libgnuintl_la_DEPENDENCIES = $(WOE32_LIBADD)
+# langprefs.c (_nl_language_preferences_win32_95) uses functions from
+# advapi32.dll.
+@WOE32_TRUE@INTL_WINDOWS_LIBS = -ladvapi32
+@WOE32_FALSE@INTL_WINDOWS_LIBS =
+
# Libtool's library version information for libintl.
# Before making a gettext release, you must change this according to the
# libtool documentation, section "Library interface versions".
@@ -1424,8 +1429,11 @@ LTV_REVISION = 6
LTV_AGE = 1
# How to build libintl.la and libgnuintl.la.
+# Limit the exported symbols: Don't export glwthread* (from gnulib modules).
OTHER_LDFLAGS = \
- @LTLIBICONV@ @INTL_MACOSX_LIBS@ @LTLIBTHREAD@ -no-undefined \
+ @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(INTL_WINDOWS_LIBS) @LTLIBTHREAD@ \
+ -no-undefined \
+ -export-symbols-regex '^([^g]|g[^l]|gl[^w]|glw[^t]|glwt[^h]|glwth[^r]|glwthr[^e]|glwthre[^a]|glwthrea[^d]).*' \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir)
diff --git a/gettext-runtime/intl/export.h b/gettext-runtime/intl/export.h
index b5c47ad5b..10253e338 100644
--- a/gettext-runtime/intl/export.h
+++ b/gettext-runtime/intl/export.h
@@ -1,6 +1,8 @@
#if @HAVE_VISIBILITY@ && BUILDING_LIBINTL
#define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default")))
+#elif defined _MSC_VER && BUILDING_LIBINTL
+#define LIBINTL_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBINTL_DLL_EXPORTED
#endif
diff --git a/gettext-tools/intl/Makefile.in b/gettext-tools/intl/Makefile.in
index 9bdfe2238..6eabf22af 100644
--- a/gettext-tools/intl/Makefile.in
+++ b/gettext-tools/intl/Makefile.in
@@ -2120,6 +2120,11 @@ libintl_la_DEPENDENCIES = $(WOE32_LIBADD)
libgnuintl_la_LIBADD = $(WOE32_LIBADD)
libgnuintl_la_DEPENDENCIES = $(WOE32_LIBADD)
+# langprefs.c (_nl_language_preferences_win32_95) uses functions from
+# advapi32.dll.
+@WOE32_TRUE@INTL_WINDOWS_LIBS = -ladvapi32
+@WOE32_FALSE@INTL_WINDOWS_LIBS =
+
# Libtool's library version information for libintl.
# Before making a gettext release, you must change this according to the
# libtool documentation, section "Library interface versions".
@@ -2128,8 +2133,11 @@ LTV_REVISION = 6
LTV_AGE = 1
# How to build libintl.la and libgnuintl.la.
+# Limit the exported symbols: Don't export glwthread* (from gnulib modules).
OTHER_LDFLAGS = \
- @LTLIBICONV@ @INTL_MACOSX_LIBS@ @LTLIBTHREAD@ -no-undefined \
+ @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(INTL_WINDOWS_LIBS) @LTLIBTHREAD@ \
+ -no-undefined \
+ -export-symbols-regex '^([^g]|g[^l]|gl[^w]|glw[^t]|glwt[^h]|glwth[^r]|glwthr[^e]|glwthre[^a]|glwthrea[^d]).*' \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir)
diff --git a/gettext-tools/libgettextpo/Makefile.in b/gettext-tools/libgettextpo/Makefile.in
index 59356fa1d..444ef7807 100644
--- a/gettext-tools/libgettextpo/Makefile.in
+++ b/gettext-tools/libgettextpo/Makefile.in
@@ -2942,8 +2942,8 @@ config.h: $(BUILT_SOURCES)
;; \
esac; \
done; \
- } 5>&1 \
- | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \
+ } 5>&1 1>&2 \
+ | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \
| sed -e 's,^obstack_free$$,__obstack_free,' \
| sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t && \
if test -f config.h; then \
diff --git a/gettext-tools/libgettextpo/exported.sh.in b/gettext-tools/libgettextpo/exported.sh.in
index 2e6b89ab6..be7fb38bd 100644
--- a/gettext-tools/libgettextpo/exported.sh.in
+++ b/gettext-tools/libgettextpo/exported.sh.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009, 2019 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,5 +20,4 @@
# This is a separate script because $(GLOBAL_SYMBOL_PIPE) cannot be used in a
# Makefile, since it may contain dollar signs.
-nm_cmd="@NM@ $1 | @GLOBAL_SYMBOL_PIPE@"
-eval $nm_cmd
+@NM@ "$1" | @GLOBAL_SYMBOL_PIPE@
diff --git a/gettext-tools/src/lang-table.h b/gettext-tools/src/lang-table.h
index 7ac197669..ebf193b98 100644
--- a/gettext-tools/src/lang-table.h
+++ b/gettext-tools/src/lang-table.h
@@ -1,5 +1,5 @@
/* Table of languages.
- Copyright (C) 2001-2007 Free Software Foundation, Inc.
+ Copyright (C) 2001-2007, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2005.
This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,12 @@
#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct language_table_entry
{
const char *code;
@@ -32,4 +38,10 @@ extern const size_t language_table_size;
extern struct language_table_entry language_variant_table[];
extern const size_t language_variant_table_size;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _LANG_TABLE_H */
diff --git a/gettext-tools/src/read-po.h b/gettext-tools/src/read-po.h
index 6852a22a0..98fc893b2 100644
--- a/gettext-tools/src/read-po.h
+++ b/gettext-tools/src/read-po.h
@@ -1,5 +1,5 @@
/* Reading PO files.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,19 @@
#include "read-catalog-abstract.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Describes a .po / .pot file parser. */
extern DLL_VARIABLE const struct catalog_input_format input_format_po;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _READ_PO_H */
diff --git a/gettext-tools/src/read-properties.h b/gettext-tools/src/read-properties.h
index e04abe524..9c299e6c2 100644
--- a/gettext-tools/src/read-properties.h
+++ b/gettext-tools/src/read-properties.h
@@ -1,5 +1,5 @@
/* Reading Java .properties files.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,19 @@
#include "read-catalog-abstract.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Describes a .properties file parser. */
extern DLL_VARIABLE const struct catalog_input_format input_format_properties;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _READ_PROPERTIES_H */
diff --git a/gettext-tools/src/read-stringtable.h b/gettext-tools/src/read-stringtable.h
index 43d1ba505..4a107f2ff 100644
--- a/gettext-tools/src/read-stringtable.h
+++ b/gettext-tools/src/read-stringtable.h
@@ -1,5 +1,5 @@
/* Reading NeXTstep/GNUstep .strings files.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,19 @@
#include "read-catalog-abstract.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Describes a .strings file parser. */
extern DLL_VARIABLE const struct catalog_input_format input_format_stringtable;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _READ_STRINGTABLE_H */
diff --git a/gettext-tools/src/write-properties.h b/gettext-tools/src/write-properties.h
index f0d18a7e4..7671afb30 100644
--- a/gettext-tools/src/write-properties.h
+++ b/gettext-tools/src/write-properties.h
@@ -1,5 +1,5 @@
/* Writing Java .properties files.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,19 @@
#include "write-catalog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Describes a PO file in Java .properties syntax. */
extern DLL_VARIABLE const struct catalog_output_format output_format_properties;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _WRITE_PROPERTIES_H */
diff --git a/gettext-tools/src/write-stringtable.h b/gettext-tools/src/write-stringtable.h
index 7d4981826..af0b081c8 100644
--- a/gettext-tools/src/write-stringtable.h
+++ b/gettext-tools/src/write-stringtable.h
@@ -1,5 +1,5 @@
/* Writing NeXTstep/GNUstep .strings files.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,19 @@
#include "write-catalog.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Describes a PO file in .strings syntax. */
extern DLL_VARIABLE const struct catalog_output_format output_format_stringtable;
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _WRITE_STRINGTABLE_H */
diff --git a/libtextstyle/lib/Makefile.in b/libtextstyle/lib/Makefile.in
index 4a11d73a1..ebee4845a 100644
--- a/libtextstyle/lib/Makefile.in
+++ b/libtextstyle/lib/Makefile.in
@@ -4536,8 +4536,8 @@ config.h: $(BUILT_SOURCES) libtextstyle.sym
;; \
esac; \
done; \
- } 5>&1 \
- | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \
+ } 5>&1 1>&2 \
+ | sed -e 's,.* ,,' | grep -v '@' | LC_ALL=C sort | LC_ALL=C uniq \
| LC_ALL=C join -v 1 - libtextstyle.sym \
| sed -e 's,^\(.*\)$$,#define \1 libtextstyle_\1,' > config.h-t; \
} 6>&1 && \
--
2.21.0.windows.1

View File

@@ -0,0 +1,72 @@
From 9b2e480278d36c4d7b6f988621a3a9f699cc730f Mon Sep 17 00:00:00 2001
From: SSE4 <tomskside@gmail.com>
Date: Wed, 10 Jul 2019 03:55:56 -0700
Subject: [PATCH 2/2] - memmove is intrinsic function on MSVC
Signed-off-by: SSE4 <tomskside@gmail.com>
---
gettext-runtime/gnulib-lib/memmove.c | 4 ++++
gettext-tools/gnulib-lib/memmove.c | 4 ++++
gettext-tools/gnulib-lib/memset.c | 4 ++++
3 files changed, 12 insertions(+)
diff --git a/gettext-runtime/gnulib-lib/memmove.c b/gettext-runtime/gnulib-lib/memmove.c
index 0f040540c..bc8883ae4 100644
--- a/gettext-runtime/gnulib-lib/memmove.c
+++ b/gettext-runtime/gnulib-lib/memmove.c
@@ -7,6 +7,8 @@
#include <stddef.h>
+#ifndef _MSC_VER
+
void *
memmove (void *dest0, void const *source0, size_t length)
{
@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length)
}
return dest0;
}
+
+#endif
diff --git a/gettext-tools/gnulib-lib/memmove.c b/gettext-tools/gnulib-lib/memmove.c
index 0f040540c..bc8883ae4 100644
--- a/gettext-tools/gnulib-lib/memmove.c
+++ b/gettext-tools/gnulib-lib/memmove.c
@@ -7,6 +7,8 @@
#include <stddef.h>
+#ifndef _MSC_VER
+
void *
memmove (void *dest0, void const *source0, size_t length)
{
@@ -24,3 +26,5 @@ memmove (void *dest0, void const *source0, size_t length)
}
return dest0;
}
+
+#endif
diff --git a/gettext-tools/gnulib-lib/memset.c b/gettext-tools/gnulib-lib/memset.c
index 4e60124e7..b595fa966 100644
--- a/gettext-tools/gnulib-lib/memset.c
+++ b/gettext-tools/gnulib-lib/memset.c
@@ -18,6 +18,8 @@
#include <stddef.h>
+#ifndef _MSC_VER
+
void *
memset (void *str, int c, size_t len)
{
@@ -27,3 +29,5 @@ memset (void *str, int c, size_t len)
*st++ = c;
return str;
}
+
+#endif
--
2.21.0.windows.1

View File

@@ -0,0 +1,29 @@
From e81ca090d69837e4f1a3c41fe2345c77b38f756a Mon Sep 17 00:00:00 2001
From: SSE4 <tomskside@gmail.com>
Date: Fri, 12 Jul 2019 13:11:06 +0200
Subject: [PATCH 3/3] Reported by Gabor Z. Papp <gzp@papp.hu>.
This is a regression from 2018-11-25.
* gettext-tools/configure.ac (PRELOADABLE_LIBINTL): Set to false if
--disable-shared was specified.
---
gettext-tools/configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gettext-tools/configure b/gettext-tools/configure
index 5a831d6da..4be36c383 100755
--- a/gettext-tools/configure
+++ b/gettext-tools/configure
@@ -23901,7 +23901,7 @@ else
PACKAGE_IS_GETTEXT_TOOLS_FALSE=
fi
- if test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes; then
+ if test $USE_INCLUDED_LIBINTL = no && test $GLIBC2 = yes && test $enable_shared = yes; then
PRELOADABLE_LIBINTL_TRUE=
PRELOADABLE_LIBINTL_FALSE='#'
else
--
2.21.0

View File

@@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.1)
project(test_package C)
find_package(Intl CONFIG REQUIRED)
add_executable(${PROJECT_NAME} test_package.c)
target_link_libraries(${PROJECT_NAME} PRIVATE Intl::Intl)

View File

@@ -0,0 +1,9 @@
{
"version": 4,
"vendor": {
"conan": {}
},
"include": [
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
]
}

View File

@@ -0,0 +1,27 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake, cmake_layout
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
test_type = "explicit"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
def requirements(self):
self.requires(self.tested_reference_str)
def layout(self):
cmake_layout(self)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env=f"conanrun")

View File

@@ -0,0 +1,8 @@
#include <stdio.h>
#include <libintl.h>
int main() {
gettext("Hello, world!");
return 0;
}