summaryrefslogtreecommitdiff
path: root/libpkgconf/libpkgconf
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-07-18 16:56:35 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-07-20 14:19:18 +0300
commit1e53fa691949998dfa711878ecb7863814f085ee (patch)
tree830b85261c13f7702ec4153f852beecabb79b14f /libpkgconf/libpkgconf
parenta0cb8991b2cb61e9c0f3d8075759939cc61d57f0 (diff)
Upgrade to 1.6.3
Diffstat (limited to 'libpkgconf/libpkgconf')
-rw-r--r--libpkgconf/libpkgconf/.gitignore4
-rw-r--r--libpkgconf/libpkgconf/buildfile68
l---------libpkgconf/libpkgconf/config.h.cmake.in.orig1
-rw-r--r--libpkgconf/libpkgconf/config.h.in (renamed from libpkgconf/libpkgconf/config.h)23
l---------libpkgconf/libpkgconf/config.h.meson.orig1
-rw-r--r--libpkgconf/libpkgconf/version.h.in10
6 files changed, 44 insertions, 63 deletions
diff --git a/libpkgconf/libpkgconf/.gitignore b/libpkgconf/libpkgconf/.gitignore
index 620b4c8..d4cefd7 100644
--- a/libpkgconf/libpkgconf/.gitignore
+++ b/libpkgconf/libpkgconf/.gitignore
@@ -1,3 +1,3 @@
-# Generated version.h.
+# Generated config.h.
#
-version.h
+config.h
diff --git a/libpkgconf/libpkgconf/buildfile b/libpkgconf/libpkgconf/buildfile
index 5131874..0296e64 100644
--- a/libpkgconf/libpkgconf/buildfile
+++ b/libpkgconf/libpkgconf/buildfile
@@ -2,7 +2,7 @@
# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
# license : ISC; see accompanying COPYING file
-lib{pkgconf}: {h c}{* -version} {h}{version}
+lib{pkgconf}: {h c}{* -config} {h}{config}
tclass = $c.target.class
@@ -12,21 +12,9 @@ windows = ($tclass == 'windows')
msvc = ($c.class == 'msvc')
-# The version file is internal (it is only included from the internal
-# config.h) so we don't distribute nor install it (see below).
-#
-h{version}: in{version} $src_root/manifest
-
-# Build options.
-#
-# Note that we have to add "-I$src_root" for the headers auto-generating
-# machinery to work properly.
-#
-c.poptions =+ "-I$out_root" "-I$src_root"
-
-# Define the PKG_DEFAULT_PATH, SYSTEM_INCLUDEDIR and SYSTEM_LIBDIR macros.
-# The whole idea feels utterly broken (hello cross-compilation) so we will
-# just do bare minimum and wait and see.
+# Assign variables for the PKG_DEFAULT_PATH, SYSTEM_INCLUDEDIR, and
+# SYSTEM_LIBDIR macro definitions. The whole idea feels utterly broken (hello
+# cross-compilation) so we will just do bare minimum and wait and see.
#
# There is also PERSONALITY_PATH macro added in 1.5.1. It looks like the
# personality files are invented to fix cross-compilation but are unlikely to
@@ -66,21 +54,39 @@ else
#
# So we keep the macros empty.
#
- def_paths = ""
+ def_dirs = ""
personality_dirs = ""
}
-c.poptions += -DPKG_DEFAULT_PATH=\"$def_dirs\" \
- -DSYSTEM_INCLUDEDIR=\"$inc_dirs\" \
- -DSYSTEM_LIBDIR=\"$lib_dirs\" \
- -DPERSONALITY_PATH=\"$personality_dirs\"
+# The config header is internal (is only included from C files), so we don't
+# distribute nor install it (see below).
+#
+h{config}: in{config}
+{
+ PACKAGE_VERSION = "$version.project_id"
+
+ # Escape backslashes and quotes in the directory paths prior to representing
+ # them as C string literals.
+ #
+ SYSTEM_INCLUDEDIR = $regex.replace($inc_dirs, '(\\|")', '\\\1')
+ SYSTEM_LIBDIR = $regex.replace($lib_dirs, '(\\|")', '\\\1')
+ PKG_DEFAULT_PATH = $regex.replace($def_dirs, '(\\|")', '\\\1')
+ PERSONALITY_PATH = $regex.replace($personality_dirs, '(\\|")', '\\\1')
+}
+
+# Build options.
+#
+# Note that we have to add "-I$src_root" for the headers auto-generating
+# machinery to work properly.
+#
+c.poptions =+ "-I$out_root" "-I$src_root"
# Disable warnings.
#
if $msvc
c.coptions += /wd4996 /wd4267
-# Note: this should go last as it adds obj target-specific options.
+# Note: this should go last as it adds obj target-specific poptions.
#
if! $windows
{
@@ -109,11 +115,6 @@ if! $windows
}
else
{
- cc.poptions += -DWIN32 -D_WINDOWS -D_MBCS
-
- if $msvc
- cc.coptions += /GS /fp:precise /Zc:wchar_t /Zc:forScope
-
# See libpkgconf-api.h for details.
#
objs{*}: c.poptions += -DLIBPKGCONF_EXPORT
@@ -140,16 +141,9 @@ else
h{*}: install = include/libpkgconf/
install.include = $install.include/pkgconf/
-# Internal auto-generated header (see above).
-#
-h{version}: install = false
-
# Implementation details.
#
-# The upstream's config.h is generated during the configuration phase. We
-# distribute a custom one with a minimal set of macro definitions required to
-# build the project. Note that the file is internal (is only included from C
-# files) and so is not installed.
-#
-for h: config stdinc win-dirent
+h{config}: install = false
+
+for h: stdinc win-dirent
h{$h}@./: install = false
diff --git a/libpkgconf/libpkgconf/config.h.cmake.in.orig b/libpkgconf/libpkgconf/config.h.cmake.in.orig
deleted file mode 120000
index e991bcb..0000000
--- a/libpkgconf/libpkgconf/config.h.cmake.in.orig
+++ /dev/null
@@ -1 +0,0 @@
-../../upstream/libpkgconf/config.h.cmake.in \ No newline at end of file
diff --git a/libpkgconf/libpkgconf/config.h b/libpkgconf/libpkgconf/config.h.in
index c8d5cd5..ac5b1fa 100644
--- a/libpkgconf/libpkgconf/config.h
+++ b/libpkgconf/libpkgconf/config.h.in
@@ -1,4 +1,4 @@
-/* file : libpkgconf/config.h -*- C -*-
+/* file : libpkgconf/config.h.in -*- C -*-
* copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
* license : ISC; see accompanying COPYING file
*/
@@ -6,8 +6,8 @@
#define LIBPKGCONF_CONFIG_H
/*
- * For the semantics of the following macros refer to config.h.cmake.in.orig
- * and upstream's CMakeList.txt.
+ * For the semantics of the following macros refer to config.h.meson.orig
+ * and upstream's meson.build.
*
* Note that we will explicitly undefine macros that are present in the
* libpkgconf source code but should not be defined. While this is not
@@ -16,15 +16,7 @@
* some system headers.
*/
-/*
- * Auto-generated. Defines the following configuration macros:
-
-#define PACKAGE_VERSION
-
- * Keep all the macros listed (in this exact form) for the change tracking
- * (see README-DEV).
- */
-#include <libpkgconf/version.h>
+#define PACKAGE_VERSION "$PACKAGE_VERSION$"
/*
* strndup() is not present on Windows, for gcc and clang if compile with
@@ -51,6 +43,11 @@
*/
#define HAVE_SYS_STAT_H 1
-#define PACKAGE_BUGREPORT "https://git.dereferenced.org/pkgconf/pkgconf/issues"
+#define PACKAGE_BUGREPORT "https://todo.sr.ht/~kaniini/pkgconf"
+
+#define PKG_DEFAULT_PATH "$PKG_DEFAULT_PATH$"
+#define PERSONALITY_PATH "$PERSONALITY_PATH$"
+#define SYSTEM_INCLUDEDIR "$SYSTEM_INCLUDEDIR$"
+#define SYSTEM_LIBDIR "$SYSTEM_LIBDIR$"
#endif /* LIBPKGCONF_CONFIG_H */
diff --git a/libpkgconf/libpkgconf/config.h.meson.orig b/libpkgconf/libpkgconf/config.h.meson.orig
new file mode 120000
index 0000000..db3eaf0
--- /dev/null
+++ b/libpkgconf/libpkgconf/config.h.meson.orig
@@ -0,0 +1 @@
+../../upstream/libpkgconf/config.h.meson \ No newline at end of file
diff --git a/libpkgconf/libpkgconf/version.h.in b/libpkgconf/libpkgconf/version.h.in
deleted file mode 100644
index 6b30948..0000000
--- a/libpkgconf/libpkgconf/version.h.in
+++ /dev/null
@@ -1,10 +0,0 @@
-/* file : libpkgconf/version.h.in -*- C -*-
- * copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
- * license : ISC; see accompanying COPYING file
- */
-
-#ifndef PACKAGE_VERSION /* Note: using the version macro itself. */
-
-#define PACKAGE_VERSION "$libpkgconf.version.project_id$"
-
-#endif /* PACKAGE_VERSION */