Commit Graph

241 Commits (706273c746f623d2c63aca939e075647ec892fae)

Author SHA1 Message Date
TingPing 83eea876b0 meson: Fix defining PKGCONF_API (#174) 2018-03-06 23:27:54 -06:00
William Pitcock 0d52339141 libpkgconf: pkg: ensure the dependency node has a solution associated with it
Sometimes this did not happen, e.g. when using providers as the solution (ref #172).
2018-02-08 14:26:25 -06:00
William Pitcock d5fd74d799 libpkgconf: fragment: revert the quoting changes, but not the lexing changes
a few strange edge cases are causing problems (closes #168)
2018-01-22 15:13:14 -06:00
William Pitcock 4a09efe070 libpkgconf: pkg: fix harmless gcc7 compiler warning 2018-01-05 11:38:21 -06:00
William Pitcock a42f265c07 libpkgconf: pkg: include system libdir and includedir search paths as variables in builtin packages (closes #165) 2017-12-21 02:19:21 -06:00
William Pitcock cf96c562e1 libpkgconf: argvsplit: fix escape handling in tokenizer (closes #163) 2017-12-14 22:41:14 -06:00
William Pitcock 18abb4ccc1 libpkgconf: fragment: fix nitpick warning reported by MSVC (closes #162) 2017-12-13 11:18:25 -06:00
William Pitcock e0bf4009cb libpkgconf: pkg: rename pkgconf_pkg_t.requires to pkgconf_pkg_t.required (closes #154)
C++20 makes requires a keyword, so we need to not use it in headers.
2017-12-12 00:21:21 -06:00
William Pitcock 278a2bd667 libpkgconf: fragment: rework quoting and lexing (closes #139, #153)
we now use POSIX-style quoting for all fragments.  it is our belief that this is the
most optimal behaviour for portability, because all POSIX-compliant tools require
single-quotes to be considered as literal (closes #153).

because of this, we are able to remove some hacks on the lexer side which were there
to simulate pkg-config quoting, but were basically utterly wrong (closes #139).
2017-12-11 18:25:55 -06:00
William Pitcock 973aff21e9 libpkgconf: tuple: add some trace logging 2017-12-11 17:39:12 -06:00
William Pitcock 7274357565 libpkgconf: fragment: track merged fragments, as they should never be quoted 2017-12-10 00:39:39 -06:00
William Pitcock cad2515be5 libpkgconf: fragment: there are no consumers of non-escaped rendered fragment lists, so deprecate the option 2017-12-10 00:36:20 -06:00
William Pitcock d2b6983385 libpkgconf: cache: fix refcount issue exposed by recent depgraph solver changes 2017-12-08 13:39:40 -06:00
William Pitcock 19d91e90e5 libpkgconf: fragment: allow for overriding the default fragment rendering behaviour 2017-12-07 19:13:35 -06:00
William Pitcock f7406afc5b libpkgconf: pkg: do not mention PKG_CONFIG_SKIP_CONFLICTS env var when simplified errors are requested (closes #134) 2017-12-05 18:04:42 -06:00
William Pitcock 06abf28dab libpkgconf: client: handle NULL client in pkgconf_trace calls 2017-12-05 17:46:57 -06:00
William Pitcock 74d58d1b63 libpkgconf: pkg: cache solutions for already solved dependency graph nodes
in almost all cases, we partially solve the dependency graph multiple times, which
just wastes resources.  if we record the solution to a given dependency node, further
iterations can make use of the previous solution without having to solve it again.

this is safe because all provides entries (including virtuals) are knowable prior to
solving the dependency graph the first time.

a nice side effect of this is that all packages are preloaded when querying
information about them (--cflags and related commands).
2017-12-05 17:34:01 -06:00
William Pitcock 44b4b126f3 libpkgconf: pkg: record which pkgconf_client_t owns each pkgconf_pkg_t object 2017-12-05 17:32:00 -06:00
William Pitcock 4c0cc29277 libpkgconf: pkg: add refcount debugging 2017-12-05 17:24:57 -06:00
William Pitcock 4589274c43 libpkgconf: start to remove PKGCONF_BUFSIZE allocations from the stack. (closes #149)
Patch by Karen Arutyunov.
2017-10-16 12:56:19 -05:00
William Pitcock 1297385762 libpkgconf: fragment: remove obsolete code in pkgconf_fragment_should_munge() 2017-10-16 12:51:59 -05:00
William Pitcock 36551cca83 libpkgconf: path: relocate the path before doing dedup checks (closes #151) 2017-10-16 11:30:22 -05:00
William Pitcock 3bc2e21dd1 libpkgconf: path: ensure entire buffer is zeroed before calling realpath() on it (closes #150) 2017-10-16 11:26:27 -05:00
Baptiste Daroussin 6985a179c1 libpkgconf: Fix issue when sysroot is '/'
If sysroot is /, simply do nothing.

This fixes #146
2017-10-11 17:05:35 +02:00
William Pitcock fae657101c libpkgconf: argvsplit: handle double backslash case properly (closes #140) 2017-09-23 00:24:34 -05:00
William Pitcock abe0f5c821 libpkgconf: fileio: fix quoting logic for double backslash case (ref #140) 2017-09-23 00:19:16 -05:00
William Pitcock db56c80d92 libpkgconf: fragment: add debug to document post-subst output to parser 2017-09-23 00:11:55 -05:00
William Pitcock 67dd48a343 libpkgconf: api: handle DLL_EXPORT libtool case on mingw (closes #141) 2017-09-23 00:00:43 -05:00
William Pitcock 24c1439d52 libpkgconf: stdinc: fix SIZE_FMT_SPECIFIER on mingw 2017-09-22 23:58:40 -05:00
William Pitcock 420c62e10c libpkgconf: pkg: refactor parser harness to allow providing warnings, provide warning for improper fragment list 2017-09-19 21:58:54 -05:00
William Pitcock 7ced8d77ae libpkgconf: fragment: pkgconf_fragment_parse: return false on parse failure 2017-09-19 21:48:53 -05:00
William Pitcock 7786554be2 libpkgconf: fragment: check pkgconf_argv_split() return value 2017-09-19 21:34:24 -05:00
William Pitcock 56101390ac libpkgconf: fragment parsing: do not pass NULL to pkgconf_fragment_add() 2017-09-19 21:08:18 -05:00
William Pitcock e9fd43caa7 libpkgconf: clean up header includes (closes #137) 2017-09-17 23:38:25 -05:00
William Pitcock ebb4c73525 libpkgconf: client: resolve memory leak of filter lists (closes #130) 2017-09-13 15:02:57 -05:00
William Pitcock f808300a01 libpkgconf: pkg: some elements of virtual packages should be freed as they have heap-allocated portions (closes #132) 2017-09-13 14:56:10 -05:00
William Pitcock 9b55fc3c23 libpkgconf: cache: refactor the way package objects are marked as cached to avoid memory leaks (#133) 2017-09-13 14:41:19 -05:00
William Pitcock 048deb95b3 headers: add C++ wrappers (closes #136) 2017-09-13 14:35:28 -05:00
William Pitcock b5da424ef7 stdinc: drop _GNU_SOURCE definition 2017-09-13 14:20:47 -05:00
William Pitcock 906fef8449 libpkgconf: fragment: mark some inline match tables as const 2017-09-08 20:09:12 -05:00
William Pitcock b7839f6bb7 libpkgconf: pkg: pkgconf_pkg_scan_dir: remove unnecessary static declaration of filebuf 2017-09-08 20:06:52 -05:00
William Pitcock 2681c29edd libpkgconf: pkg: determine_prefix: use caller-provided buffer for reentrancy 2017-09-08 20:04:49 -05:00
William Pitcock adae70445a libpkgconf: pkg: get_default_pkgconfig_path: use caller-supplied buffer for reentrancy 2017-09-08 20:01:34 -05:00
William Pitcock 1252d7ae6a libpkgconf: dependency: make dependency_to_str() private, use a caller-supplied buffer for reentrancy 2017-09-08 19:53:52 -05:00
William Pitcock 615bab3df9 libpkgconf: pkg: pkgconf_pkg_report_graph_error(): move already_sent_notice to pkgconf_client_t 2017-09-08 19:48:31 -05:00
William Pitcock b0ef708efc libpkgconf: pkg: pkg_get_parent_dir(): use caller-supplied buffer instead of a static buffer to make reentrant 2017-09-08 19:23:04 -05:00
William Pitcock b9dac13ef3 libpkgconf: tuple: pkgconf_tuple_parse(): remove unnecessary static buffer declaration 2017-09-08 19:17:38 -05:00
William Pitcock 47ce9765a8 libpkgconf: define SIZE_FMT_SPECIFIER on POSIX and Windows platforms and use it in place of %zu
The MSVCRT runtime as used on Windows does not support %zu, but instead recommends %Iu.  As we want
to remain portable to other runtimes, even on Windows, we do not use %Iu, but instead expand it logically
to either %lu or %llu depending on if it's _WIN32 or _WIN64 headers.

On POSIX, we assume C99 support is available and always use %zu, as pkgconf has never supported anything
earlier than C99 officially.

Closes #125.
2017-09-08 18:46:48 -05:00
William Pitcock a6d6b88d14 libpkgconf: path: fix logic error in path relocation case when matching against a list (closes #129) 2017-09-08 18:27:04 -05:00
William Pitcock 9505213c1b tuple: check expanded variables to see if a sysroot has been duplicated, and if so, remove the prepended sysroot.
This allows compatibility between legacy pkg-config's broken sysroot implementation and pkgconf's sysroot
implementation, by removing any prepended sysroot paths and preferencing the variable expansion sysroot path
we typically do instead.

Closes github #123.
2017-07-16 17:37:41 -05:00