diff options
Diffstat (limited to 'libbutl-pkg-config')
-rw-r--r-- | libbutl-pkg-config/README-DEV | 30 | ||||
-rw-r--r-- | libbutl-pkg-config/buildfile | 65 | ||||
l--------- | libbutl-pkg-config/libpkg-config/argvsplit.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/bsdstubs.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/cache.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/client.c | 1 | ||||
-rw-r--r-- | libbutl-pkg-config/libpkg-config/config.h | 41 | ||||
l--------- | libbutl-pkg-config/libpkg-config/dependency.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/export.h | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/fileio.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/fragment.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/list.h | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/parser.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/path.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/pkg-config.h | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/pkg.c | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/stdinc.h | 1 | ||||
l--------- | libbutl-pkg-config/libpkg-config/tuple.c | 1 | ||||
-rw-r--r-- | libbutl-pkg-config/libpkg-config/version.h | 37 |
19 files changed, 188 insertions, 0 deletions
diff --git a/libbutl-pkg-config/README-DEV b/libbutl-pkg-config/README-DEV new file mode 100644 index 0000000..eba196e --- /dev/null +++ b/libbutl-pkg-config/README-DEV @@ -0,0 +1,30 @@ +Excluded/replaced/relocated upstream files/directories: + - libpkg-config/libbpkg-config/{.gitignore, buildfile} + + - libpkg-config/libbpkg-config/version.h.in + - libpkg-config/libbpkg-config/version.h -- replace with pre-generated for + submodule commit + + - libpkg-config/libbpkg-config/config.h.in + - libpkg-config/libbpkg-config/config.h -- replace with pre-generated with + empty system/default path (we + do/should not use them). + +Submodule update procedure (similar to updating to a new version of a +third-party package): + +1. Update submodule: + + https://build2.org/stage/build2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management-new-version-submodule + +2. Review upstream changes: + + https://build2.org/stage/build2-toolchain/doc/build2-toolchain-packaging.xhtml#core-version-management-new-version-review + + Look for: + + - files to add/remove (see above) + - changes to buildfiles that would need to be replicated (including to + root.build) + +3. Replace verison.h, config.h with pre-generated for this submodule commit. diff --git a/libbutl-pkg-config/buildfile b/libbutl-pkg-config/buildfile new file mode 100644 index 0000000..27159b3 --- /dev/null +++ b/libbutl-pkg-config/buildfile @@ -0,0 +1,65 @@ +# file : libbutl-pkg-config/buildfile +# license : MIT; see accompanying LICENSE file + +windows = ($c.target.class == 'windows') + +msvc_runtime = ($c.target.system == 'win32-msvc') + +msvc = ($c.class == 'msvc') +clang_msvc = ($c.id.type == 'clang' && $msvc_runtime) + +lib{butl-pkg-config}: libpkg-config/{h c}{*} + +# Build options. +# +c.poptions =+ "-I$src_base" + +obja{*}: c.poptions += -DLIBPKG_CONFIG_STATIC_BUILD +objs{*}: c.poptions += -DLIBPKG_CONFIG_SHARED_BUILD + +# Disable warnings. +# +if $msvc + c.coptions += /wd4996 /wd4267 +elif $clang_msvc + c.coptions += -Wno-deprecated-declarations -Wno-unused-function + +if $windows + c.libs += ($msvc_runtime ? advapi32.lib : -ladvapi32) + +# Export options. +# +lib{butl-pkg-config}: c.export.poptions = "-I$src_base" +liba{butl-pkg-config}: c.export.poptions += -DLIBPKG_CONFIG_STATIC +libs{butl-pkg-config}: c.export.poptions += -DLIBPKG_CONFIG_SHARED + +# For pre-releases use the complete version to make sure they cannot be used +# in place of another pre-release or the final version. See the version module +# for details on the version.* variable values. +# +if $version.pre_release + lib{butl-pkg-config}: bin.lib.version = @"-$version.project_id" +else + lib{butl-pkg-config}: bin.lib.version = @"-$version.major.$version.minor" + +# Install into the libbutl/pkg-config/ subdirectory of, say, /usr/include +# recreate subdirectories (so we end up with +# libbutl/pkg-config/libpkg-config/...>). Arrange via pkg-config to be able to +# include headers as <libpkg-config/...>. +# +# The reason we add an extra pkg-config/ subdirectory instead of installing +# directly into libbutl/ is because adding -I for libbutl/ will make all the +# libbutl headers includable without a prefix and thus prone to clashes. +# +h{*}: +{ + install = include/libbutl/pkg-config/ + install.subdirs = true +} + +libpkg-config/ +{ + h{config}@./ h{stdinc}@./: install = false +} + +lib{butl-pkg-config}: c.pkgconfig.include = include/libbutl/pkg-config/ diff --git a/libbutl-pkg-config/libpkg-config/argvsplit.c b/libbutl-pkg-config/libpkg-config/argvsplit.c new file mode 120000 index 0000000..59f933e --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/argvsplit.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/argvsplit.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/bsdstubs.c b/libbutl-pkg-config/libpkg-config/bsdstubs.c new file mode 120000 index 0000000..53c3669 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/bsdstubs.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/bsdstubs.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/cache.c b/libbutl-pkg-config/libpkg-config/cache.c new file mode 120000 index 0000000..04f55e2 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/cache.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/cache.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/client.c b/libbutl-pkg-config/libpkg-config/client.c new file mode 120000 index 0000000..d705a55 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/client.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/client.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/config.h b/libbutl-pkg-config/libpkg-config/config.h new file mode 100644 index 0000000..c1c5e8d --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/config.h @@ -0,0 +1,41 @@ +/* file : libpkg-config/config.h.in -*- C -*- + * license : ISC; see accompanying COPYING file + */ +#ifndef LIBPKG_CONFIG_CONFIG_H +#define LIBPKG_CONFIG_CONFIG_H + +#if defined(__linux__) +# include <features.h> /* __GLIBC__, __GLIBC_MINOR__ */ +#endif + +/* + * strndup() is not present on Windows while strl*() are only present on + * *BSD and MacOS. + * + */ +#if !defined(_WIN32) +# define HAVE_STRNDUP 1 +#endif + +/* + * GNU libc added strlcpy() and strlcat() in version 2.38 (in anticipation + * of their addition to POSIX). + */ +#if defined(__FreeBSD__) || \ + defined(__OpenBSD__) || \ + defined(__NetBSD__) || \ + defined(__APPLE__) || \ + (defined(__GLIBC__) && \ + defined(__GLIBC_MINOR__) && \ + (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 38)) +# define HAVE_STRLCPY 1 +# define HAVE_STRLCAT 1 +#endif + +#define LIBPKG_CONFIG_PROJECT_URL "https://github.com/build2/libpkg-config" + +#define PKG_CONFIG_DEFAULT_PATH "" +#define SYSTEM_INCLUDEDIR "" +#define SYSTEM_LIBDIR "" + +#endif /* LIBPKG_CONFIG_CONFIG_H */ diff --git a/libbutl-pkg-config/libpkg-config/dependency.c b/libbutl-pkg-config/libpkg-config/dependency.c new file mode 120000 index 0000000..2e12a02 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/dependency.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/dependency.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/export.h b/libbutl-pkg-config/libpkg-config/export.h new file mode 120000 index 0000000..d3bf554 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/export.h @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/export.h
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/fileio.c b/libbutl-pkg-config/libpkg-config/fileio.c new file mode 120000 index 0000000..65935f3 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/fileio.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/fileio.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/fragment.c b/libbutl-pkg-config/libpkg-config/fragment.c new file mode 120000 index 0000000..826d666 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/fragment.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/fragment.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/list.h b/libbutl-pkg-config/libpkg-config/list.h new file mode 120000 index 0000000..861f4d3 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/list.h @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/list.h
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/parser.c b/libbutl-pkg-config/libpkg-config/parser.c new file mode 120000 index 0000000..87c341e --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/parser.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/parser.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/path.c b/libbutl-pkg-config/libpkg-config/path.c new file mode 120000 index 0000000..b710dec --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/path.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/path.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/pkg-config.h b/libbutl-pkg-config/libpkg-config/pkg-config.h new file mode 120000 index 0000000..9a41ca6 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/pkg-config.h @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/pkg-config.h
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/pkg.c b/libbutl-pkg-config/libpkg-config/pkg.c new file mode 120000 index 0000000..74f6be5 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/pkg.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/pkg.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/stdinc.h b/libbutl-pkg-config/libpkg-config/stdinc.h new file mode 120000 index 0000000..f433ee0 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/stdinc.h @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/stdinc.h
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/tuple.c b/libbutl-pkg-config/libpkg-config/tuple.c new file mode 120000 index 0000000..7224e23 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/tuple.c @@ -0,0 +1 @@ +../../upstream/libpkg-config/libpkg-config/libpkg-config/tuple.c
\ No newline at end of file diff --git a/libbutl-pkg-config/libpkg-config/version.h b/libbutl-pkg-config/libpkg-config/version.h new file mode 100644 index 0000000..ef000f5 --- /dev/null +++ b/libbutl-pkg-config/libpkg-config/version.h @@ -0,0 +1,37 @@ +#ifndef LIBPKG_CONFIG_VERSION_H +#define LIBPKG_CONFIG_VERSION_H + +/* The numeric version format is AAAAABBBBBCCCCCDDDE where: + * + * AAAAA - major version number + * BBBBB - minor version number + * CCCCC - bugfix version number + * DDD - alpha / beta (DDD + 500) version number + * E - final (0) / snapshot (1) + * + * When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example: + * + * Version AAAAABBBBBCCCCCDDDE + * + * 0.1.0 0000000001000000000 + * 0.1.2 0000000001000020000 + * 1.2.3 0000100002000030000 + * 2.2.0-a.1 0000200001999990010 + * 3.0.0-b.2 0000299999999995020 + * 2.2.0-a.1.z 0000200001999990011 + */ +#define LIBPKG_CONFIG_VERSION 1000010001ULL +#define LIBPKG_CONFIG_VERSION_STR "0.1.2-a.0.20230830042926.81bc60b38195" +#define LIBPKG_CONFIG_VERSION_ID "0.1.2-a.0.81bc60b38195" +#define LIBPKG_CONFIG_VERSION_FULL "0.1.2-a.0.20230830042926.81bc60b38195" + +#define LIBPKG_CONFIG_VERSION_MAJOR 0 +#define LIBPKG_CONFIG_VERSION_MINOR 1 +#define LIBPKG_CONFIG_VERSION_PATCH 2 + +#define LIBPKG_CONFIG_PRE_RELEASE true + +#define LIBPKG_CONFIG_SNAPSHOT_SN 20230830042926ULL +#define LIBPKG_CONFIG_SNAPSHOT_ID "81bc60b38195" + +#endif /* LIBPKG_CONFIG_VERSION_H */ |