libpkgconf/libpkgconf.h


Log

Author Commit Date CI Message
Ariadne Conill 4fc570f9 2025-06-24T15:49:00 pkgconf 2.5.1.
Ariadne Conill 204ad5e4 2025-06-18T21:56:01 pkgconf 2.5.0. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill a0fc46a8 2025-06-18T14:51:31 libpkgconf: clean up PRINTFLIKE and DEPRECATED macros On MingW, the wrong format string checker would be used. So prefer gnu_printf where it is known to be available. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 9665d214 2025-06-04T11:15:52 libpkgconf: client: add pkgconf_client_preload_from_environ() Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 01eb0cf1 2025-06-04T10:39:09 libpkgconf: client: add pkgconf_client_preload_path() for preloading packages Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 3be7f2ce 2025-06-04T10:34:23 libpkgconf: pkg: add tracking infrastructure for preloaded packages Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill aa5813ac 2025-05-31T00:06:57 libpkgconf: path: refactor windows registry PKG_CONFIG_PATH support Now we add to the search list rather than falling back to the registry after the search list fails to find a package. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 61610c65 2025-05-29T10:08:00 libpkgconf: pkg: refactor pkgconf_pkg_new_from_file into pkgconf_pkg_new_from_path Previously, files would be closed by side effect, which is a somewhat bad API design that trips up various static analysis tools. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 187f2604 2025-05-28T22:08:08 libpkgconf: personality: make cross-personality triplet identifier non-const Dynamically loaded personality files use a malloced string to store the triplet, and so we need to drop the const to allow for that string to be freed later. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 5a188784 2025-05-17T23:49:54 libpkgconf: add support for late-breaking unveil(2) notifications Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 7b8865d1 2025-05-08T13:07:30 libpkgconf: path: add pkgconf_path_prepend_list Previously when processing --with-path entries we were adding to the tail of the search list. In reality, we expect --with-path entries to be treated in an equivalent way to PKG_CONFIG_PATH. Accordingly, add a variant of pkgconf_path_copy_list which prepends instead. Related: https://github.com/pkgconf/pkgconf/issues/400 Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 1d37e711 2025-03-07T16:37:15 pkgconf 2.4.3.
Ariadne Conill 5c9ee7ee 2025-03-07T10:48:21 pkgconf 2.4.2.
Ariadne Conill 7e59a32a 2025-03-06T14:29:11 pkgconf 2.4.1.
Ariadne Conill 38053395 2025-03-05T17:03:55 pkgconf 2.4.0. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 680a7c53 2025-03-05T15:47:29 libpkgconf: add placeholder flags fields to all public objects that lacked them Since we are breaking ABI anyway, we may as well try to make the ABI break more futureproof. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 4f78e449 2025-03-05T15:36:56 libpkgconf: fragment: track terminating fragments like -Wl,--end-group Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 543ab926 2025-03-05T15:00:54 libpkgconf: fragment: track text fragments as a tree instead of a flat list This allows us to have more insight into the relationships between text fragments, for example linker groups. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 5fe482b2 2025-02-04T16:49:18 libpkgconf: buffer: pkgconf_buffer_lastc should always be 0 on an empty buffer Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill a4de2930 2025-02-03T05:31:40 libpkgconf: fileio: use bool for fgetline return type instead of a pointer (we internally look at the raw buffer anyway) Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill d0f8f3f2 2025-02-02T01:33:06 libpkgconf: fileio: rework to use pkgconf_buffer, allowing larger than 64KB lines Fixes: 130907d ("fileio: add routine for portably yanking lines out of a FILE stream") Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill 83a2ae04 2025-02-02T01:30:54 libpkgconf: buffer: fix memory allocation logic, add push/trim byte functions Fixes: 1001750 ("libpkgconf: add buffer management functions") Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill bd043cae 2025-02-02T00:31:54 libpkgconf: buffer: add PKGCONF_BUFFER_INITIALIZER
Ariadne Conill 10017500 2024-12-09T19:49:50 libpkgconf: add buffer management functions Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
Ariadne Conill a88c0d96 2024-08-07T00:10:13 pkgconf 2.3.0.
Ariadne Conill 174db1a1 2024-08-05T14:27:13 fragment: add pkgconf_fragment_insert()
Ariadne Conill a6179c77 2024-08-05T13:42:49 queue: add PKGCONF_PKG_DEPF_QUERY to color solution nodes part of the original query
Ariadne Conill 06120a87 2024-03-27T11:34:36 pkgconf 2.2.0
Kai Pastor 78d53ea0 2024-02-23T15:18:08 Revise serials, traversal, flattening Remove the 'traverse_serial' fields which were added in 2.1.1. Use the 'serial' field to track the current traversal. Stop using 'identifier' to sort packages in the flattened solution. Directly construct the flattened solution by a specific walk which also preserves the relative order in Requires and Requires.private. The topological sort is a single list, so don't fill requires_private. Purely private dependencies are marked in dependency flags. The ancestor flag is a pkg property, not a client property.
Kai Pastor b6e04e2d 2023-12-11T06:58:17 pkgconf 2.1.1
Ariadne Conill 80b5011e 2024-02-04T03:04:52 Use traverse_serial to short circuit graph evaluation for already visited nodes. In our previous attempt to optimize this problem, we did not track the type of the visit to the node, e.g. whether it came from evaluating Requires or Requires.private, which resulted in some solutions being correctly incalculated due to greedy optimization of the dependency graph. We reintroduce this optimization by adding a second traversal serial as well as re-introducing the PROPF_VISITED node property as well as a new PROPF_VISITED_PRIVATE node property flag. This allows a node to be revisted at maximum two times per traversal level. Co-authored-by: Yi Chou <yich@google.com>
Kai Pastor 45073b74 2023-10-15T12:40:41 Circular deps: track ancestors, not serial
Ariadne Conill 652aff97 2023-10-08T22:27:56 path: add pkgconf_path_prepend API for --with-path Otherwise, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR elements would be processed backwards. Fixes: 384ade5 (path: prepend paths rather than append paths when processing --with-path arguments) Closes: #250 Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill a6fb59a0 2023-09-02T21:15:46 pkgconf 2.0.3. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill ee702658 2023-09-02T21:05:03 use PRIu64 format specifiers for some uint64 identifiers in trace logging Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Colin Gillespie 66994f15 2023-08-19T07:57:48 cli: fix --modversion not showing version in various cases There are numerous edge cases where version is wrong or missing when matching the dependency queue to resolved packages. This adds the dependency name as it appears in the dependency queue to each package as it is resolved, allowing for a simple and correct comparison when printing. Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
Ariadne Conill eaa4bb44 2023-08-17T11:56:08 pkgconf 2.0.2.
Ariadne Conill 6a84d704 2023-08-11T14:23:08 pkgconf 2.0.1. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill 4fb0988a 2023-08-11T14:16:41 libpkgconf: queue: make the pkgconf_queue_t type public Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill de51b03c 2023-08-04T08:45:16 pkgconf 2.0.0.
Ariadne Conill 5d0e2f50 2023-08-04T08:19:42 Track packages using a lifetime unique identifier Use that identifier to cancel graph edges rather than the number of hits, which biases the earliest edge rather than the latest.
Ariadne Conill 35b1a623 2023-05-02T12:09:55 update libpkgconf version to 10905 Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Taylor R Campbell 212c8586 2023-03-17T19:32:58 Avoid undefined behaviour with the ctype(3) functions. fix https://github.com/pkgconf/pkgconf/issues/291 As defined in the C standard: In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. This is because they're designed to work with the int values returned by getc or fgetc; they need extra work to handle a char value. If EOF is -1 (as it almost always is), with 8-bit bytes, the allowed inputs to the ctype(3) functions are: {-1, 0, 1, 2, 3, ..., 255}. However, on platforms where char is signed, such as x86 with the usual ABI, code like char *ptr = ...; ... isspace(*ptr) ... may pass in values in the range: {-128, -127, -126, ..., -2, -1, 0, 1, ..., 127}. This has two problems: 1. Inputs in the set {-128, -127, -126, ..., -2} are forbidden. 2. The non-EOF byte 0xff is conflated with the value EOF = -1, so even though the input is not forbidden, it may give the wrong answer. Casting char to unsigned int first before passing the result to ctype(3) doesn't help: inputs like -128 are unchanged by this cast, because (on a two's-complement machine with 32-bit int and unsigned int), converting the signed char with integer value -128 to unsigned int gives integer value 2^32 - 128 = 0xffffff80, which is out of range, and which is converted in int back to -128, which is also out of range. It is necessary to cast char inputs to unsigned char first; you can then cast to unsigned int if you like but there's no need because the functions will always convert the argument to int by definition. So the above fragment needs to be: char *ptr = ...; ... isspace((unsigned char)*ptr) ... This patch changes unsigned int casts to unsigned char casts, and adds unsigned char casts where they are missing.
Ariadne Conill f7305434 2023-01-22T04:56:06 libpkgconf: bump API version to 10904
Ariadne Conill 6a66b312 2022-08-16T19:49:42 libpkgconf: increase API level to 10903
Ariadne Conill 80bc5ac3 2022-08-16T19:38:40 tuple: if a global tuple is explicitly defined with --define-variable, prefer it fixes github #259
Ariadne Conill 5044491f 2022-08-16T19:27:35 queue: add function to free a compiled solution
Ariadne Conill aa99ddf7 2022-08-11T15:52:33 pkg: add Copyright and Maintainer fields These are helpful pieces of information for BOM documents generated by pkgconf.
Ariadne Conill 69a3d458 2022-08-08T09:59:50 libpkgconf: revise API revision to 10902
Ariadne Conill 7e9aa7e1 2022-08-08T09:56:28 pkg: do not break cycles across dependency lists
Ariadne Conill 5b10a85a 2022-08-08T09:08:27 queue: add pkgconf_queue_solve API
Ariadne Conill d8d669f6 2022-08-07T04:47:04 pkgconf 1.9.0.
Ariadne Conill 1389aa05 2022-08-07T04:21:22 pkg: add pkgconf_pkg_t.license field The pkgconf_pkg_t.license field maps to the new License keyword, and should be an SPDX license expression.
Dylan Baker 96c61cba 2022-08-03T12:00:21 libpkgconf: remove trailing ; from macro definition GCC has a lovely bug (which I will report as soon as I have an account), which causes -Wmisleading-indentation to miss cases of misleading indentation after a `;;`, since the macro adds `;`, and in call cases the caller also adds `;`, we end up with a double macro and gcc fails to warn.
Ariadne Conill 6c70781a 2022-07-26T18:00:22 introduce PKG_CONFIG_PKGCONF1_SYSROOT_RULES for legacy pkgconf behavior
Ariadne Conill f8aefea7 2022-07-26T17:13:15 pkg: add flags argument to pkgconf_pkg_new_from_file
Ariadne Conill 297e18f2 2022-07-26T17:08:48 tuple: add flags parameter to pkgconf_tuple_parse
Ariadne Conill 5817e884 2022-06-26T07:22:56 pkg: track the number of hits a package has gotten while solving for dependencies
Ariadne Conill 46467240 2022-06-26T04:30:35 cache: refactor to use a continguous table and bsearch cache functions are the hottest part of the pkgconf code when profiled, by removing the linked list for lookups, we can turn lookups into an O(k) operation
Dylan Baker f5d6bb71 2022-02-04T16:06:08 libpkgconf: remove const modifier from error_handler data pointer Currently, the data pointer is `const void *`, which means that the handler can't modify the data without casting away the constness.
Ariadne Conill 2b82a4f6 2021-10-07T00:23:35 use a serial instead of PKGCONF_PKG_PROPF_SEEN
Ariadne Conill 7d8cc1e4 2021-10-06T13:13:34 dependency: add pkgconf_dependency_copy()
Ariadne Conill c547edd0 2021-10-06T11:52:18 deconst the client on pkgconf_dependency_add()
Ariadne Conill 4144d506 2021-10-06T11:48:13 implement dependency refcounting
Ariadne Conill 8130dd15 2021-10-06T11:29:18 dependency: add pkgconf_dependency_free_one
Stone Tickle d688a7bd 2021-06-11T15:00:47 implement pkgconf_cross_personality_deinit
Ariadne Conill fd1b8ccc 2021-03-18T06:22:11 main: if PKG_CONFIG_FDO_SYSROOT_RULES is set, or DESTDIR matches PKG_CONFIG_SYSROOT_DIRS, disable the automatic sysroot rewriting Closes #205.
Ariadne Conill f9531ce9 2021-03-18T05:59:54 add support for pkgconf_cross_personality_t.want_default_pure
Ariadne Conill dd57abfe 2020-05-24T14:44:01 pkgconf 1.7.0.
Ariadne Conill 4fb7683c 2020-05-24T14:40:47 add support for the PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS flag used in build2.
Ariadne Conill 48dc665a 2019-10-19T00:56:17 personality: add support for WantDefaultStatic setting
Ariadne Conill 19aa93e3 2019-08-04T15:54:24 prepare for pkgconf 2.0 development
Ariadne Conill c862e030 2019-07-12T06:53:37 pkgconf 1.6.3.
Ariadne Conill c816ce69 2019-07-11T03:36:03 pkgconf 1.6.2. (closes #38, #40, #41)
William Pitcock 2d0c1f5c 2019-05-06T15:15:41 lite: disable debug logging
William Pitcock 3afd14c4 2019-03-23T22:27:05 libpkgconf: path: use realpath(3) to deduplicate the search path closes #24
William Pitcock 183e68df 2019-01-14T13:52:04 libpkgconf: add LIBPKGCONF_VERSION macro
William Pitcock 36a5b7ac 2019-01-14T13:48:02 libpkgconf: fragment: add pkgconf_fragment_copy_list()
William Pitcock 40897f24 2018-05-09T22:52:27 libpkgconf: personality: remove const from the default personality, since it's not really const
William Pitcock e6ce6c8e 2018-05-09T22:39:39 libpkgconf: personality: fixups
William Pitcock 1244f8f8 2018-05-09T21:21:39 libpkgconf: refactor out the rfc822 message parser so that the cross-personality code can share it
William Pitcock f702967d 2018-05-09T19:56:30 libpkgconf: pkg: refactor pkgconf_pkg_new_from_file to prepare to factor out the rfc822 parser
William Pitcock 6b0e346c 2018-05-09T17:07:26 libpkgconf: refactor building the dir lists into separate concerns
William Pitcock 854490c5 2018-05-09T16:54:21 libpkgconf: add basic support for cross-compile personality objects
William Pitcock 43e8c7b4 2018-05-09T16:35:21 libpkgconf: path: add path list copying function
William Pitcock 7e9ed692 2018-03-18T18:04:02 libpkgconf: pkg: skip over -I cflags from Requires.internal nodes when building a cflags list
William Pitcock ad65bc4a 2018-03-18T18:01:59 libpkgconf: dependency: allow dependency nodes to be colored with traits
TingPing 83eea876 2018-03-07T05:27:54 meson: Fix defining PKGCONF_API (#174)
William Pitcock e0bf4009 2017-12-12T00:21:21 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.
William Pitcock 72743575 2017-12-10T00:39:39 libpkgconf: fragment: track merged fragments, as they should never be quoted
William Pitcock 19d91e90 2017-12-07T19:13:35 libpkgconf: fragment: allow for overriding the default fragment rendering behaviour
William Pitcock 74d58d1b 2017-12-05T17:34:01 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).
William Pitcock 44b4b126 2017-12-05T17:32:00 libpkgconf: pkg: record which pkgconf_client_t owns each pkgconf_pkg_t object
William Pitcock 7ced8d77 2017-09-19T21:48:53 libpkgconf: fragment: pkgconf_fragment_parse: return false on parse failure
William Pitcock e9fd43ca 2017-09-17T23:38:25 libpkgconf: clean up header includes (closes #137)
William Pitcock 048deb95 2017-09-13T14:35:28 headers: add C++ wrappers (closes #136)
William Pitcock 1252d7ae 2017-09-08T19:53:52 libpkgconf: dependency: make dependency_to_str() private, use a caller-supplied buffer for reentrancy
William Pitcock 615bab3d 2017-09-08T19:48:31 libpkgconf: pkg: pkgconf_pkg_report_graph_error(): move already_sent_notice to pkgconf_client_t
Dan Kegel 4ba2bac5 2017-06-05T14:00:02 Don't depend on libtool magic to control which symbols are exported from shared libraries
Dan Kegel 4d7b4d7c 2017-06-04T19:19:55 Minimal tweaks to compile with Visual C 2015