diff --git a/.builds/autoconf-fedora-rawhide.yml b/.builds/autoconf-fedora-rawhide.yml deleted file mode 100644 index 22b3e92..0000000 --- a/.builds/autoconf-fedora-rawhide.yml +++ /dev/null @@ -1,25 +0,0 @@ -image: fedora/rawhide -packages: - - make - - kernel-devel - - gcc - - gcc-c++ - - autoconf - - automake - - libtool - - kyua - - libatf-sh - - xz - - gzip -sources: - - https://git.sr.ht/~kaniini/pkgconf -tasks: - - autogen: | - cd ~/pkgconf - sh autogen.sh - - configure: | - cd ~/pkgconf - ./configure - - distcheck: | - cd ~/pkgconf - make distcheck diff --git a/.builds/meson-fedora-rawhide.yml b/.builds/meson-fedora-rawhide.yml deleted file mode 100644 index 37f9d84..0000000 --- a/.builds/meson-fedora-rawhide.yml +++ /dev/null @@ -1,16 +0,0 @@ -image: fedora/rawhide -packages: - - meson - - ninja-build - - kyua - - libatf-sh -sources: - - https://git.sr.ht/~kaniini/pkgconf -tasks: - - configure: | - cd ~/pkgconf - meson build - - distcheck: | - cd ~/pkgconf - ninja -C build - ninja -C build test diff --git a/Makefile.am b/Makefile.am index a0d3b5e..e1d4cb3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,10 +15,6 @@ bin_PROGRAMS = pkgconf lib_LTLIBRARIES = libpkgconf.la EXTRA_DIST = pkg.m4 \ - meson.build \ - meson_options.txt \ - libpkgconf/meson.build \ - libpkgconf/config.h.meson \ libpkgconf/win-dirent.h \ tests/lib-relocatable/lib/pkgconfig/foo.pc \ tests/lib1/argv-parse-2.pc \ @@ -97,6 +93,7 @@ EXTRA_DIST = pkg.m4 \ tests/lib1/tuple-quoting.pc \ tests/lib1/empty-tuple.pc \ tests/lib1/orphaned-requires-private.pc \ + tests/test_env.sh \ $(test_scripts) \ doc/conf.py \ doc/extract.py \ @@ -113,7 +110,7 @@ EXTRA_DIST = pkg.m4 \ doc/libpkgconf-queue.rst \ doc/libpkgconf-tuple.rst -test_scripts= tests/meson.build \ +test_scripts= \ tests/basic.sh \ tests/builtins.sh \ tests/conflicts.sh \ diff --git a/NEWS b/NEWS index b22c50f..9f8fe5f 100644 --- a/NEWS +++ b/NEWS @@ -1,61 +1,6 @@ Changes from previous version of pkgconf ======================================== -Changes from 1.7.2 to 1.7.3: ----------------------------- - -* Bug fixes: - - Fix a possible out of boundary write when evaluating dependencies. - Patch by Tobias Stöckmann. - - Fix escaping logic on Windows. Patch by Vincent Torri. - - Fix out of boundary reads and writes with a malformed fragment. - Patches by Tobias Stöckmann. - - Fix a possible out of boundary write when evaluating tuples. - Patch by Tobias Stöckmann. - -Changes from 1.7.1 to 1.7.2: ----------------------------- - -* Bug fixes: - - Fix a windows-specific crash relating to path fixups. - -Changes from 1.7.0 to 1.7.1: ----------------------------- - -* Bug fixes: - - Fix a possible out of boundary access in the parser for the - cross-compile database. Patch by Tobias Stöckmann. - - Missing files for building with Meson are now included in the - tarball. Patch by Neal Gompa. - - Fix calculation of package atoms on Windows with paths that - use both directory separator characters. - -Changes from 1.6.3 to 1.7.0: ----------------------------- - -* Bug fixes: - - Fix a possible buffer overflow involving newline escaping. - Patch by Tobias Stöckmann. - - Fix an out of boundary access in the parser. - Patch by Tobias Stöckmann. - - Fix leakage of strcmp() result value in pkgconf_compare_version() - responses. - - Return the default personality if loading a cross-compile - personality file failed. - - Do not complain about newlines when validating package versions. - - Properly detect strndup() on Windows when building with Meson. - -* Enhancements: - - A new --shared option and WantDefaultStatic cross-compile - configuration option have been added. This allows for toolchains - to specify that static linking should be used by default. - - Support for the PKG_CONFIG_MSVC_SYNTAX environment variable has - been added. Patch by Dan Kegel. - - Support for the PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS - client flag which disables emulation of freedesktop.org pkg-config - fragment merging semantics has been added. - Patch by Karen Arutyunov. - Changes from 1.6.2 to 1.6.3: ---------------------------- diff --git a/cli/main.c b/cli/main.c index db27775..3627818 100644 --- a/cli/main.c +++ b/cli/main.c @@ -69,7 +69,6 @@ #define PKG_MSVC_SYNTAX (((uint64_t) 1) << 41) #define PKG_INTERNAL_CFLAGS (((uint64_t) 1) << 42) #define PKG_DUMP_PERSONALITY (((uint64_t) 1) << 43) -#define PKG_SHARED (((uint64_t) 1) << 44) static pkgconf_client_t pkg_client; static const pkgconf_fragment_render_ops_t *want_render_ops = NULL; @@ -603,7 +602,7 @@ static void about(void) { printf("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION); - printf("Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020\n"); + printf("Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019\n"); printf(" pkgconf authors (see AUTHORS in documentation directory).\n\n"); printf("Permission to use, copy, modify, and/or distribute this software for any\n"); printf("purpose with or without fee is hereby granted, provided that the above\n"); @@ -665,7 +664,6 @@ usage(void) printf(" --maximum-traverse-depth maximum allowed depth for dependency graph\n"); printf(" --static be more aggressive when computing dependency graph\n"); printf(" (for static linking)\n"); - printf(" --shared use a simplified dependency graph (usually default)\n"); printf(" --pure optimize a static dependency graph as if it were a normal\n"); printf(" dependency graph\n"); printf(" --env-only look only for package entries in PKG_CONFIG_PATH\n"); @@ -829,7 +827,6 @@ main(int argc, char *argv[]) { "short-errors", no_argument, &want_flags, PKG_SHORT_ERRORS, }, { "maximum-traverse-depth", required_argument, NULL, 11, }, { "static", no_argument, &want_flags, PKG_STATIC, }, - { "shared", no_argument, &want_flags, PKG_SHARED, }, { "pure", no_argument, &want_flags, PKG_PURE, }, { "print-requires", no_argument, &want_flags, PKG_REQUIRES, }, { "print-variables", no_argument, &want_flags, PKG_VARIABLES|PKG_PRINT_ERRORS, }, @@ -971,7 +968,7 @@ main(int argc, char *argv[]) pkgconf_client_init(&pkg_client, error_handler, NULL, personality); #ifndef PKGCONF_LITE - if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX || getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL) + if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX) want_render_ops = msvc_renderer_get(); #endif @@ -1005,8 +1002,18 @@ main(int argc, char *argv[]) if ((want_flags & PKG_VERSION) == PKG_VERSION) { - version(); - return EXIT_SUCCESS; + if (argc > 2) + { + fprintf(stderr, "%s: --version specified with other options or module names, assuming --modversion.\n", argv[0]); + + want_flags &= ~PKG_VERSION; + want_flags |= PKG_MODVERSION; + } + else + { + version(); + return EXIT_SUCCESS; + } } if ((want_flags & PKG_HELP) == PKG_HELP) @@ -1030,12 +1037,9 @@ main(int argc, char *argv[]) if ((want_flags & PKG_IGNORE_CONFLICTS) == PKG_IGNORE_CONFLICTS || getenv("PKG_CONFIG_IGNORE_CONFLICTS") != NULL) want_client_flags |= PKGCONF_PKG_PKGF_SKIP_CONFLICTS; - if ((want_flags & PKG_STATIC) == PKG_STATIC || personality->want_default_static) + if ((want_flags & PKG_STATIC) == PKG_STATIC) want_client_flags |= (PKGCONF_PKG_PKGF_SEARCH_PRIVATE | PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS); - if ((want_flags & PKG_SHARED) == PKG_SHARED) - want_client_flags &= ~(PKGCONF_PKG_PKGF_SEARCH_PRIVATE | PKGCONF_PKG_PKGF_MERGE_PRIVATE_FRAGMENTS); - /* if --static and --pure are both specified, then disable merge-back. * this allows for a --static which searches private modules, but has the same fragment behaviour as if * --static were disabled. see for rationale. diff --git a/configure.ac b/configure.ac index 823bdf4..b6096ab 100644 --- a/configure.ac +++ b/configure.ac @@ -12,9 +12,9 @@ dnl implied. In no event shall the authors be liable for any damages arising dnl from the use of this software. AC_PREREQ([2.68]) -AC_INIT([pkgconf], [1.7.3], [https://todo.sr.ht/~kaniini/pkgconf]) +AC_INIT([pkgconf], [1.6.3], [https://todo.sr.ht/~kaniini/pkgconf]) AC_CONFIG_SRCDIR([cli/main.c]) -AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_MACRO_DIRS([m4]) AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"]) AX_CHECK_COMPILE_FLAG([-Wextra], [CFLAGS="$CFLAGS -Wextra"]) AX_CHECK_COMPILE_FLAG([-Wformat=2], [CFLAGS="$CFLAGS -Wformat=2"]) diff --git a/libpkgconf/argvsplit.c b/libpkgconf/argvsplit.c index aaba858..02ce1a3 100644 --- a/libpkgconf/argvsplit.c +++ b/libpkgconf/argvsplit.c @@ -118,11 +118,9 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv) } else switch(*src_iter) { -#ifndef _WIN32 case '\\': escaped = true; break; -#endif case '\"': case '\'': diff --git a/libpkgconf/config.h.meson b/libpkgconf/config.h.meson index c0e97a6..d1236c7 100644 --- a/libpkgconf/config.h.meson +++ b/libpkgconf/config.h.meson @@ -3,6 +3,27 @@ /* Define to 1 if you have the `cygwin_conv_path' function. */ #mesondefine HAVE_CYGWIN_CONV_PATH +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_STRING_H + /* Define to 1 if you have the `strlcat' function. */ #mesondefine HAVE_STRLCAT @@ -12,6 +33,18 @@ /* Define to 1 if you have the `strndup' function. */ #mesondefine HAVE_STRNDUP +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#mesondefine HAVE_UNISTD_H + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#mesondefine LT_OBJDIR + /* Name of package */ #mesondefine PACKAGE diff --git a/libpkgconf/dependency.c b/libpkgconf/dependency.c index d5cdf3c..b3722b1 100644 --- a/libpkgconf/dependency.c +++ b/libpkgconf/dependency.c @@ -237,7 +237,6 @@ pkgconf_dependency_parse_str(const pkgconf_client_t *client, pkgconf_list_t *dep char *vstart = NULL; char *package = NULL, *version = NULL; char *cnameptr = cmpname; - char *cnameend = cmpname + PKGCONF_ITEM_SIZE - 1; memset(cmpname, '\0', sizeof cmpname); @@ -305,8 +304,7 @@ pkgconf_dependency_parse_str(const pkgconf_client_t *client, pkgconf_list_t *dep if (PKGCONF_IS_OPERATOR_CHAR(*ptr)) { state = INSIDE_OPERATOR; - if (cnameptr < cnameend) - *cnameptr++ = *ptr; + *cnameptr++ = *ptr; } break; @@ -317,7 +315,7 @@ pkgconf_dependency_parse_str(const pkgconf_client_t *client, pkgconf_list_t *dep state = AFTER_OPERATOR; compare = pkgconf_pkg_comparator_lookup_by_name(cmpname); } - else if (cnameptr < cnameend) + else *cnameptr++ = *ptr; break; diff --git a/libpkgconf/fileio.c b/libpkgconf/fileio.c index 22281f2..b64205d 100644 --- a/libpkgconf/fileio.c +++ b/libpkgconf/fileio.c @@ -20,7 +20,7 @@ char * pkgconf_fgetline(char *line, size_t size, FILE *stream) { char *s = line; - char *end = line + size - 2; + char *end = line + size - 1; bool quoted = false; int c = '\0', c2; diff --git a/libpkgconf/fragment.c b/libpkgconf/fragment.c index 80d9ba2..b431694 100644 --- a/libpkgconf/fragment.c +++ b/libpkgconf/fragment.c @@ -137,7 +137,7 @@ pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const if (*string == '\0') return; - if (strlen(string) > 1 && !pkgconf_fragment_is_special(string)) + if (!pkgconf_fragment_is_special(string)) { frag = calloc(sizeof(pkgconf_fragment_t), 1); @@ -150,8 +150,7 @@ pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const { char mungebuf[PKGCONF_ITEM_SIZE]; - if (list->tail != NULL && list->tail->data != NULL && - !(client->flags & PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS)) + if (list->tail != NULL && list->tail->data != NULL) { pkgconf_fragment_t *parent = list->tail->data; @@ -433,11 +432,7 @@ fragment_quote(const pkgconf_fragment_t *frag) (*src > ')' && *src < '+') || (*src > ':' && *src < '=') || (*src > '=' && *src < '@') || - (*src > 'Z' && *src < '\\') || -#ifndef _WIN32 - (*src == '\\') || -#endif - (*src > '\\' && *src < '^') || + (*src > 'Z' && *src < '^') || (*src == '`') || (*src > 'z' && *src < '~') || (*src > '~'))) @@ -447,10 +442,8 @@ fragment_quote(const pkgconf_fragment_t *frag) if ((ptrdiff_t)(dst - out) + 2 > outlen) { - ptrdiff_t offset = dst - out; outlen *= 2; out = realloc(out, outlen); - dst = out + offset; } } diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index ca448eb..44a9e7f 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -78,8 +78,8 @@ typedef struct pkgconf_cross_personality_ pkgconf_cross_personality_t; #define PKGCONF_FOREACH_LIST_ENTRY_REVERSE(tail, value) \ for ((value) = (tail); (value) != NULL; (value) = (value)->prev) -#define LIBPKGCONF_VERSION 10700 -#define LIBPKGCONF_VERSION_STR "1.7.0" +#define LIBPKGCONF_VERSION 10603 +#define LIBPKGCONF_VERSION_STR "1.6.3" struct pkgconf_fragment_ { pkgconf_node_t iter; @@ -202,8 +202,6 @@ struct pkgconf_cross_personality_ { pkgconf_list_t filter_includedirs; char *sysroot_dir; - - bool want_default_static; }; /* client.c */ @@ -249,7 +247,6 @@ PKGCONF_API pkgconf_cross_personality_t *pkgconf_cross_personality_find(const ch #define PKGCONF_PKG_PKGF_DONT_RELOCATE_PATHS 0x0800 #define PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS 0x1000 #define PKGCONF_PKG_PKGF_DONT_FILTER_INTERNAL_CFLAGS 0x2000 -#define PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS 0x4000 #define PKGCONF_PKG_DEPF_INTERNAL 0x1 diff --git a/libpkgconf/parser.c b/libpkgconf/parser.c index 7ac9362..17aa697 100644 --- a/libpkgconf/parser.c +++ b/libpkgconf/parser.c @@ -66,11 +66,8 @@ pkgconf_parser_parse(FILE *f, void *data, const pkgconf_parser_operand_func_t *o } op = *p; - if (*p != '\0') - { - *p = '\0'; - p++; - } + *p = '\0'; + p++; while (*p && isspace((unsigned int)*p)) p++; diff --git a/libpkgconf/personality.c b/libpkgconf/personality.c index ab9ef74..bbbbbf9 100644 --- a/libpkgconf/personality.c +++ b/libpkgconf/personality.c @@ -119,16 +119,6 @@ typedef struct { const ptrdiff_t offset; } personality_keyword_pair_t; -static void -personality_bool_func(pkgconf_cross_personality_t *p, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value) -{ - (void) keyword; - (void) lineno; - - bool *dest = (bool *)((char *) p + offset); - *dest = strcasecmp(value, "true") || strcasecmp(value, "yes") || *value == '1'; -} - static void personality_copy_func(pkgconf_cross_personality_t *p, const char *keyword, const size_t lineno, const ptrdiff_t offset, char *value) { @@ -156,7 +146,6 @@ static const personality_keyword_pair_t personality_keyword_pairs[] = { {"SystemIncludePaths", personality_fragment_func, offsetof(pkgconf_cross_personality_t, filter_includedirs)}, {"SystemLibraryPaths", personality_fragment_func, offsetof(pkgconf_cross_personality_t, filter_libdirs)}, {"Triplet", personality_copy_func, offsetof(pkgconf_cross_personality_t, name)}, - {"WantDefaultStatic", personality_bool_func, offsetof(pkgconf_cross_personality_t, want_default_static)}, }; static int @@ -179,7 +168,7 @@ personality_keyword_set(pkgconf_cross_personality_t *p, const size_t lineno, con pair->func(p, keyword, lineno, pair->offset, value); } -static const pkgconf_parser_operand_func_t personality_parser_ops[256] = { +static const pkgconf_parser_operand_func_t personality_parser_ops[] = { [':'] = (pkgconf_parser_operand_func_t) personality_keyword_set }; @@ -259,6 +248,6 @@ pkgconf_cross_personality_find(const char *triplet) finish: pkgconf_path_free(&plist); - return out != NULL ? out : pkgconf_cross_personality_default(); + return out; } #endif diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 214f544..c212899 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -99,7 +99,7 @@ pkgconf_pkg_parser_version_func(const pkgconf_client_t *client, pkgconf_pkg_t *p /* cut at any detected whitespace */ p = pkgconf_tuple_parse(client, &pkg->vars, value); - len = strcspn(p, " \t"); + len = strcspn(p, " \t\r\n"); if (len) { i = p + (ptrdiff_t) len; @@ -381,19 +381,13 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE * /* make module id */ if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL) idptr++; +#ifdef _WIN32 + else if ((idptr = strrchr(pkg->filename, '/')) != NULL) + idptr++; +#endif else idptr = pkg->filename; -#ifdef _WIN32 - /* On Windows, both \ and / are allowed in paths, so we have to chop both. - * strrchr() took us to the last \ in that case, so we just have to see if - * it is followed by a /. If so, lop it off. - */ - char *mungeptr; - if ((mungeptr = strrchr(idptr, '/')) != NULL) - idptr = mungeptr++; -#endif - pkg->id = strdup(idptr); idptr = strrchr(pkg->id, '.'); if (idptr) @@ -532,14 +526,15 @@ pkgconf_pkg_try_specific_path(pkgconf_client_t *client, const char *path, const PKGCONF_TRACE(client, "trying path: %s for %s", path, name); - snprintf(locbuf, sizeof locbuf, "%s%c%s" PKG_CONFIG_EXT, path, PKG_DIR_SEP_S, name); - snprintf(uninst_locbuf, sizeof uninst_locbuf, "%s%c%s-uninstalled" PKG_CONFIG_EXT, path, PKG_DIR_SEP_S, name); + snprintf(locbuf, sizeof locbuf, "%s/%s" PKG_CONFIG_EXT, path, name); + snprintf(uninst_locbuf, sizeof uninst_locbuf, "%s/%s-uninstalled" PKG_CONFIG_EXT, path, name); if (!(client->flags & PKGCONF_PKG_PKGF_NO_UNINSTALLED) && (f = fopen(uninst_locbuf, "r")) != NULL) { PKGCONF_TRACE(client, "found (uninstalled): %s", uninst_locbuf); pkg = pkgconf_pkg_new_from_file(client, uninst_locbuf, f); - pkg->flags |= PKGCONF_PKG_PROPF_UNINSTALLED; + if (pkg != NULL) + pkg->flags |= PKGCONF_PKG_PROPF_UNINSTALLED; } else if ((f = fopen(locbuf, "r")) != NULL) { @@ -866,8 +861,8 @@ pkgconf_compare_version(const char *a, const char *b) } ret = strcmp(one, two); - if (ret != 0) - return ret < 0 ? -1 : 1; + if (ret) + return ret; *str1 = oldch1; *str2 = oldch2; diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c index 0d9946d..f505abd 100644 --- a/libpkgconf/tuple.c +++ b/libpkgconf/tuple.c @@ -264,7 +264,6 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const else if (*(ptr + 1) == '{') { char varname[PKGCONF_ITEM_SIZE]; - char *vend = varname + PKGCONF_ITEM_SIZE - 1; char *vptr = varname; const char *pptr; char *kv, *parsekv; @@ -274,15 +273,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const for (pptr = ptr + 2; *pptr != '\0'; pptr++) { if (*pptr != '}') - { - if (vptr < vend) - *vptr++ = *pptr; - else - { - *vptr = '\0'; - break; - } - } + *vptr++ = *pptr; else { *vptr = '\0'; diff --git a/man/pkg.m4.7 b/man/pkg.m4.7 index f921070..448dda8 100644 --- a/man/pkg.m4.7 +++ b/man/pkg.m4.7 @@ -87,7 +87,7 @@ be changed by passing the .Nm DIRECTORY parameter. .Pp -This value can be overridden with the +This value can be overriden with the .Fl -with-pkgconfigdir configure parameter. .Ss "PKG_NOARCH_INSTALLDIR(DIRECTORY)" @@ -99,7 +99,7 @@ be changed by passing the .Nm DIRECTORY parameter. .Pp -This value can be overridden with the +This value can be overriden with the .Fl -with-noarch-pkgconfigdir configure parameter. .Ss "PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])" diff --git a/man/pkgconf-personality.5 b/man/pkgconf-personality.5 index 7941d9e..5815948 100644 --- a/man/pkgconf-personality.5 +++ b/man/pkgconf-personality.5 @@ -47,11 +47,6 @@ The property will be set to the text of the value. The property will be set to a list of fragments parsed from the text. The input text must be in a format that is suitable for passing to a POSIX shell without any shell expansions after variable substitution has been done. -Elements are delimited with a colon. -.\" -.It Boolean -The property will be set to true if the value is one of: true, yes or 1. -Otherwise it will be set to false. .\" .El .Ss PROPERTY KEYWORDS @@ -76,18 +71,15 @@ include files. A list of directories that are included by default in the search path for libraries. (mandatory; fragment list) -.It WantDefaultStatic -If true, pkgconf will default to operating in static linking mode. -(optional; boolean; default is false) .\" -.El .Sh EXAMPLES An example .personality file: .Bd -literal # This is a comment Triplet: x86_64-pc-linux-gnu SysrootDir: /home/kaniini/sysroot/x86_64-pc-linux-gnu -DefaultSearchPaths: /home/kaniini/sysroot/x86_64-pc-linux-gnu/lib/pkgconfig:/home/kaniini/sysroot/x86_64-pc-linux-gnu/share/pkgconfig +DefaultSearchPaths: /home/kaniini/sysroot/x86_64-pc-linux-gnu/lib/pkgconfig \\ + /home/kaniini/sysroot/x86_64-pc-linux-gnu/share/pkgconfig SystemIncludePaths: /home/kaniini/sysroot/x86_64-pc-linux-gnu/include SystemLibraryPaths: /home/kaniini/sysroot/x86_64-pc-linux-gnu/lib .Ed diff --git a/man/pkgconf.1 b/man/pkgconf.1 index d5488a1..1fc8421 100644 --- a/man/pkgconf.1 +++ b/man/pkgconf.1 @@ -58,8 +58,6 @@ dependencies of modules added to the resolver's solution. .It Fl -static Compute a deeper dependency graph and use compiler/linker flags intended for static linking. -.It Fl -shared -Compute a simple dependency graph that is only suitable for shared linking. .It Fl -pure Treats the computed dependency graph as if it were pure. This is mainly intended for use with the @@ -106,7 +104,7 @@ the requested modules. .It Fl -uninstalled Exit with a non-zero result if the dependency resolver uses an .Sq uninstalled -module as part of it's solution. +module as part of its solution. .It Fl -no-uninstalled Forbids the dependency resolver from considering 'uninstalled' modules as part of a solution. @@ -211,8 +209,6 @@ If set, enables additional debug logging. The format of the debug log messages is implementation-specific. .It Va PKG_CONFIG_DONT_RELOCATE_PATHS If set, disables the path relocation feature. -.It Va PKG_CONFIG_MSVC_SYNTAX -If set, uses MSVC syntax for fragments. .El .Sh EXAMPLES Displaying the CFLAGS of a package: diff --git a/meson.build b/meson.build index bf5904f..77c37cd 100644 --- a/meson.build +++ b/meson.build @@ -1,23 +1,41 @@ project('pkgconf', 'c', - version : '1.7.3', + version : '1.6.3', license : 'ISC', - meson_version : '>=0.47') + meson_version : '>=0.40') cc = meson.get_compiler('c') cdata = configuration_data() +check_headers = [ + ['HAVE_DLFCN_H', 'dlfcn.h'], + ['HAVE_INTTYPES_H', 'inttypes.h'], + ['HAVE_MEMORY_H', 'memory.h'], + ['HAVE_STDINT_H', 'stdint.h'], + ['HAVE_STDLIB_H', 'stdlib.h'], + ['HAVE_STRINGS_H', 'strings.h'], + ['HAVE_STRING_H', 'string.h'], + ['HAVE_SYS_STAT_H', 'sys/stat.h'], + ['HAVE_SYS_TYPES_H', 'sys/types.h'], + ['HAVE_UNISTD_H', 'unistd.h'], +] + +foreach h : check_headers + if cc.has_header(h.get(1)) + cdata.set(h.get(0), 1) + endif +endforeach check_functions = [ - ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'], - ['HAVE_STRLCAT', 'strlcat', 'string.h'], - ['HAVE_STRLCPY', 'strlcpy', 'string.h'], - ['HAVE_STRNDUP', 'strndup', 'string.h'], + ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', '#include'], + ['HAVE_STRLCAT', 'strlcat', '#include'], + ['HAVE_STRLCPY', 'strlcpy', '#include'], + ['HAVE_STRNDUP', 'strndup', '#include'], ] foreach f : check_functions - if cc.has_function(f.get(1), prefix : '#include <' + f.get(2) + '>') and cc.has_header_symbol(f.get(2), f.get(1)) + if cc.has_function(f.get(1), prefix : f.get(2)) cdata.set(f.get(0), 1) endif endforeach diff --git a/tests/meson.build b/tests/meson.build index 1f21e04..e8ef6c4 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -18,6 +18,6 @@ tests = [ # yuck foreach test : tests - configure_file(input: test + '.sh', output: test, copy: true) + configure_file(input: test + '.sh', output: test, configuration: configuration_data()) run_command('chmod', '755', join_paths(meson.build_root(), 'tests', test)) endforeach