Projects
openEuler:Mainline
pkgconf
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 10
View file
_service:tar_scm:pkgconf.spec
Changed
@@ -1,16 +1,14 @@ %global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig Name: pkgconf -Version: 1.8.0 -Release: 3 +Version: 1.9.5 +Release: 1 Summary: Package compiler and linker metadata toolkit License: ISC URL: http://pkgconf.org/ Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz -Patch6000: backport-CVE-2023-24056.patch - BuildRequires: gcc, make, autoconf, automake, libtool #tests BuildRequires: kyua, atf-tests @@ -45,6 +43,14 @@ %package_help +%package bomtool +Summary: Simple SBOM generator using pc(5) files +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description bomtool +bomtool is a program which helps generate a Software Bill of Materials +manifest using data from installed .pc files. + %prep %autosetup -p1 @@ -105,7 +111,13 @@ %files help %{_mandir}/*/* +%files bomtool +%{_bindir}/bomtool + %changelog +* Mon Jul 24 2023 dongyuzhen <dongyuzhen@h-partners.com> - 1.9.5-1 +- upgrade version to 1.9.5 + * Sun Jan 29 2023 dongyuzhen <dongyuzhen@h-partners.com> - 1.8.0-3 - fix CVE-2023-24056
View file
_service:tar_scm:backport-CVE-2023-24056.patch
Deleted
@@ -1,71 +0,0 @@ -From 628b2b2bafa5d3a2017193ddf375093e70666059 Mon Sep 17 00:00:00 2001 -From: Ariadne Conill <ariadne@dereferenced.org> -Date: Fri, 20 Jan 2023 22:07:03 +0000 -Subject: PATCH tuple: test for, and stop string processing, on truncation - -otherwise a buffer overflow occurs. -this has been a bug in pkgconf since the beginning, it seems. -instead of disclosing the bug correctly, a "hotshot" developer -decided to blog about it instead. sigh. - -https://nullprogram.com/blog/2023/01/18/ ---- - libpkgconf/tuple.c | 28 +++++++++++++++++++++++----- - 1 file changed, 23 insertions(+), 5 deletions(-) - -diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c -index 2d550d8..b831070 100644 ---- a/libpkgconf/tuple.c -+++ b/libpkgconf/tuple.c -@@ -293,12 +293,21 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const - } - } - -+ size_t remain = PKGCONF_BUFSIZE - (bptr - buf); - ptr += (pptr - ptr); - kv = pkgconf_tuple_find_global(client, varname); - if (kv != NULL) - { -- strncpy(bptr, kv, PKGCONF_BUFSIZE - (bptr - buf)); -- bptr += strlen(kv); -+ size_t nlen = pkgconf_strlcpy(bptr, kv, remain); -+ if (nlen > remain) -+ { -+ pkgconf_warn(client, "warning: truncating very long variable to 64KB\n"); -+ -+ bptr = buf + (PKGCONF_BUFSIZE - 1); -+ break; -+ } -+ -+ bptr += nlen; - } - else - { -@@ -306,12 +315,21 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const - - if (kv != NULL) - { -+ size_t nlen; -+ - parsekv = pkgconf_tuple_parse(client, vars, kv); -+ nlen = pkgconf_strlcpy(bptr, parsekv, remain); -+ free(parsekv); - -- strncpy(bptr, parsekv, PKGCONF_BUFSIZE - (bptr - buf)); -- bptr += strlen(parsekv); -+ if (nlen > remain) -+ { -+ pkgconf_warn(client, "warning: truncating very long variable to 64KB\n"); - -- free(parsekv); -+ bptr = buf + (PKGCONF_BUFSIZE - 1); -+ break; -+ } -+ -+ bptr += nlen; - } - } - } --- -2.33.0 -
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/Makefile.am -> _service:tar_scm:pkgconf-1.9.5.tar.xz/Makefile.am
Changed
@@ -11,7 +11,7 @@ AM_CFLAGS = -DPERSONALITY_PATH=\"$(personality_dir)\" -DPKG_DEFAULT_PATH=\"$(pkg_default_dir)\" -DSYSTEM_INCLUDEDIR=\"$(system_includedir)\" -DSYSTEM_LIBDIR=\"$(system_libdir)\" -bin_PROGRAMS = pkgconf +bin_PROGRAMS = pkgconf bomtool lib_LTLIBRARIES = libpkgconf.la EXTRA_DIST = pkg.m4 \ @@ -22,6 +22,7 @@ libpkgconf/win-dirent.h \ tests/lib-relocatable/lib/pkgconfig/foo.pc \ tests/lib1/argv-parse-2.pc \ + tests/lib1/billion-laughs.pc \ tests/lib1/dos-lineendings.pc \ tests/lib1/paren-quoting.pc \ tests/lib1/argv-parse-3.pc \ @@ -61,6 +62,7 @@ tests/lib3/bar.pc \ tests/lib1/conflicts.pc \ tests/lib1/omg-uninstalled.pc \ + tests/lib1/omg-sysroot-uninstalled.pc \ tests/lib1/isystem.pc \ tests/lib1/idirafter.pc \ tests/lib1/idirafter-ordering.pc \ @@ -88,6 +90,9 @@ tests/lib1/malformed-1.pc \ tests/lib1/malformed-quoting.pc \ tests/lib1/malformed-version.pc \ + tests/lib1/metapackage.pc \ + tests/lib1/metapackage-1.pc \ + tests/lib1/metapackage-2.pc \ tests/lib1/explicit-sysroot.pc \ tests/lib1/escaped-backslash.pc \ tests/lib1/cflags-internal.pc \ @@ -98,6 +103,10 @@ tests/lib1/tuple-quoting.pc \ tests/lib1/empty-tuple.pc \ tests/lib1/orphaned-requires-private.pc \ + tests/lib1/sysroot-dir-2.pc \ + tests/lib1/sysroot-dir-3.pc \ + tests/lib1/sysroot-dir-4.pc \ + tests/lib1/sysroot-dir-5.pc \ $(test_scripts) \ doc/conf.py \ doc/extract.py \ @@ -126,7 +135,8 @@ tests/sysroot.sh \ tests/version.sh -check_SCRIPTS= $(test_scripts:.sh=) +test_sh = $(filter-out tests/meson.build, $(test_scripts)) +check_SCRIPTS = $(test_sh:.sh=) SUFFIXES= .sh @@ -146,7 +156,7 @@ libpkgconf/path.c \ libpkgconf/personality.c \ libpkgconf/parser.c -libpkgconf_la_LDFLAGS = -no-undefined -version-info 3:0:0 -export-symbols-regex '^pkgconf_' +libpkgconf_la_LDFLAGS = -no-undefined -version-info 4:0:0 -export-symbols-regex '^pkgconf_' dist_man_MANS = \ man/pkgconf.1 \ @@ -159,11 +169,17 @@ cli/main.c \ cli/getopt_long.c \ cli/renderer-msvc.c -pkgconf_CPPFLAGS = -Ilibpkgconf -Icli +pkgconf_CPPFLAGS = -I$(top_srcdir)/libpkgconf -I$(top_srcdir)/cli noinst_HEADERS = \ cli/getopt_long.h \ cli/renderer-msvc.h +bomtool_LDADD = libpkgconf.la +bomtool_SOURCES = \ + cli/bomtool/main.c \ + cli/getopt_long.c +bomtool_CPPFLAGS = -I$(top_srcdir)/libpkgconf -I$(top_srcdir)/cli -I$(top_srcdir)/cli/bomtool + dist_doc_DATA = README.md AUTHORS m4datadir = $(datadir)/aclocal
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/Makefile.in -> _service:tar_scm:pkgconf-1.9.5.tar.xz/Makefile.in
Changed
@@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = pkgconf$(EXEEXT) +bin_PROGRAMS = pkgconf$(EXEEXT) bomtool$(EXEEXT) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \ @@ -162,6 +162,10 @@ libpkgconf_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libpkgconf_la_LDFLAGS) $(LDFLAGS) -o $@ +am_bomtool_OBJECTS = cli/bomtool/bomtool-main.$(OBJEXT) \ + cli/bomtool-getopt_long.$(OBJEXT) +bomtool_OBJECTS = $(am_bomtool_OBJECTS) +bomtool_DEPENDENCIES = libpkgconf.la am_pkgconf_OBJECTS = cli/pkgconf-main.$(OBJEXT) \ cli/pkgconf-getopt_long.$(OBJEXT) \ cli/pkgconf-renderer-msvc.$(OBJEXT) @@ -182,9 +186,11 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libpkgconf depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = cli/$(DEPDIR)/pkgconf-getopt_long.Po \ +am__depfiles_remade = cli/$(DEPDIR)/bomtool-getopt_long.Po \ + cli/$(DEPDIR)/pkgconf-getopt_long.Po \ cli/$(DEPDIR)/pkgconf-main.Po \ cli/$(DEPDIR)/pkgconf-renderer-msvc.Po \ + cli/bomtool/$(DEPDIR)/bomtool-main.Po \ libpkgconf/$(DEPDIR)/argvsplit.Plo \ libpkgconf/$(DEPDIR)/audit.Plo \ libpkgconf/$(DEPDIR)/bsdstubs.Plo \ @@ -215,8 +221,10 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -SOURCES = $(libpkgconf_la_SOURCES) $(pkgconf_SOURCES) -DIST_SOURCES = $(libpkgconf_la_SOURCES) $(pkgconf_SOURCES) +SOURCES = $(libpkgconf_la_SOURCES) $(bomtool_SOURCES) \ + $(pkgconf_SOURCES) +DIST_SOURCES = $(libpkgconf_la_SOURCES) $(bomtool_SOURCES) \ + $(pkgconf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -246,17 +254,14 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Kyuafile.in \ $(srcdir)/Makefile.in $(srcdir)/libpkgconf.pc.in \ $(top_srcdir)/libpkgconf/config.h.in \ $(top_srcdir)/tests/Kyuafile.in \ $(top_srcdir)/tests/test_env.sh.in AUTHORS COPYING NEWS \ - compile config.guess config.sub depcomp install-sh ltmain.sh \ - missing + README.md compile config.guess config.sub depcomp install-sh \ + ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -289,6 +294,8 @@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -299,8 +306,10 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ +FILECMD = @FILECMD@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -412,6 +421,7 @@ libpkgconf/win-dirent.h \ tests/lib-relocatable/lib/pkgconfig/foo.pc \ tests/lib1/argv-parse-2.pc \ + tests/lib1/billion-laughs.pc \ tests/lib1/dos-lineendings.pc \ tests/lib1/paren-quoting.pc \ tests/lib1/argv-parse-3.pc \ @@ -451,6 +461,7 @@ tests/lib3/bar.pc \ tests/lib1/conflicts.pc \ tests/lib1/omg-uninstalled.pc \ + tests/lib1/omg-sysroot-uninstalled.pc \ tests/lib1/isystem.pc \ tests/lib1/idirafter.pc \ tests/lib1/idirafter-ordering.pc \ @@ -478,6 +489,9 @@ tests/lib1/malformed-1.pc \ tests/lib1/malformed-quoting.pc \ tests/lib1/malformed-version.pc \ + tests/lib1/metapackage.pc \ + tests/lib1/metapackage-1.pc \ + tests/lib1/metapackage-2.pc \ tests/lib1/explicit-sysroot.pc \ tests/lib1/escaped-backslash.pc \ tests/lib1/cflags-internal.pc \ @@ -488,6 +502,10 @@ tests/lib1/tuple-quoting.pc \ tests/lib1/empty-tuple.pc \ tests/lib1/orphaned-requires-private.pc \ + tests/lib1/sysroot-dir-2.pc \ + tests/lib1/sysroot-dir-3.pc \ + tests/lib1/sysroot-dir-4.pc \ + tests/lib1/sysroot-dir-5.pc \ $(test_scripts) \ doc/conf.py \ doc/extract.py \ @@ -516,7 +534,8 @@ tests/sysroot.sh \ tests/version.sh -check_SCRIPTS = $(test_scripts:.sh=) +test_sh = $(filter-out tests/meson.build, $(test_scripts)) +check_SCRIPTS = $(test_sh:.sh=) SUFFIXES = .sh nobase_pkginclude_HEADERS = libpkgconf/bsdstubs.h libpkgconf/iter.h libpkgconf/libpkgconf.h libpkgconf/stdinc.h libpkgconf/libpkgconf-api.h libpkgconf_la_SOURCES = \ @@ -535,7 +554,7 @@ libpkgconf/personality.c \ libpkgconf/parser.c -libpkgconf_la_LDFLAGS = -no-undefined -version-info 3:0:0 -export-symbols-regex '^pkgconf_' +libpkgconf_la_LDFLAGS = -no-undefined -version-info 4:0:0 -export-symbols-regex '^pkgconf_' dist_man_MANS = \ man/pkgconf.1 \ man/pkg.m4.7 \ @@ -548,11 +567,17 @@ cli/getopt_long.c \ cli/renderer-msvc.c -pkgconf_CPPFLAGS = -Ilibpkgconf -Icli +pkgconf_CPPFLAGS = -I$(top_srcdir)/libpkgconf -I$(top_srcdir)/cli noinst_HEADERS = \ cli/getopt_long.h \ cli/renderer-msvc.h +bomtool_LDADD = libpkgconf.la +bomtool_SOURCES = \ + cli/bomtool/main.c \ + cli/getopt_long.c + +bomtool_CPPFLAGS = -I$(top_srcdir)/libpkgconf -I$(top_srcdir)/cli -I$(top_srcdir)/cli/bomtool dist_doc_DATA = README.md AUTHORS m4datadir = $(datadir)/aclocal m4data_DATA = pkg.m4 @@ -740,12 +765,26 @@ libpkgconf.la: $(libpkgconf_la_OBJECTS) $(libpkgconf_la_DEPENDENCIES) $(EXTRA_libpkgconf_la_DEPENDENCIES) $(AM_V_CCLD)$(libpkgconf_la_LINK) -rpath $(libdir) $(libpkgconf_la_OBJECTS) $(libpkgconf_la_LIBADD) $(LIBS) +cli/bomtool/$(am__dirstamp): + @$(MKDIR_P) cli/bomtool + @: > cli/bomtool/$(am__dirstamp) +cli/bomtool/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) cli/bomtool/$(DEPDIR) + @: > cli/bomtool/$(DEPDIR)/$(am__dirstamp) +cli/bomtool/bomtool-main.$(OBJEXT): cli/bomtool/$(am__dirstamp) \ + cli/bomtool/$(DEPDIR)/$(am__dirstamp) cli/$(am__dirstamp): @$(MKDIR_P) cli @: > cli/$(am__dirstamp) cli/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) cli/$(DEPDIR) @: > cli/$(DEPDIR)/$(am__dirstamp) +cli/bomtool-getopt_long.$(OBJEXT): cli/$(am__dirstamp) \ + cli/$(DEPDIR)/$(am__dirstamp) + +bomtool$(EXEEXT): $(bomtool_OBJECTS) $(bomtool_DEPENDENCIES) $(EXTRA_bomtool_DEPENDENCIES) + @rm -f bomtool$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(bomtool_OBJECTS) $(bomtool_LDADD) $(LIBS) cli/pkgconf-main.$(OBJEXT): cli/$(am__dirstamp) \ cli/$(DEPDIR)/$(am__dirstamp) cli/pkgconf-getopt_long.$(OBJEXT): cli/$(am__dirstamp) \ @@ -760,15 +799,18 @@ mostlyclean-compile:
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/NEWS -> _service:tar_scm:pkgconf-1.9.5.tar.xz/NEWS
Changed
@@ -1,6 +1,111 @@ Changes from previous version of pkgconf ======================================== +Changes from 1.9.4 to 1.9.5: +---------------------------- + +* Fix incorrect assumptions involving the use of ctype(3) functions. + Patch by Taylor R Campbell. + +* Fix detection of provided functions on autoconf. + Patches by Harmen Stoppels. + +* Fix deletion of tests/meson.build by the autoconf build system. + Patch by h30032433. + +* Fix quoting rules in argvsplit.c. + Patch by huyubiao. + +* Update libpkgconf documentation and documentation building scripts. + Patches by Andrew Shadura. + +* Enforce maximum package count correctly for --modversion. + +Changes from 1.9.3 to 1.9.4: +---------------------------- + +* Fix a buffer overflow vulnerability involving very large variable expansions. + CVE-2023-24056 + +* Fix a bunch of minor regressions with the solver. + +* Create separate solutions for `--cflags` and `--libs` when `--static` is not + used. + +* Remove final trailing whitespace in pkgconf_fragment_render_buf(). + +* Revert broken pkg.m4 change involving querying module versions in + PKG_CHECK_MODULES. + +* Fix handling of tildes in version strings. + +* Various C99 formatting string fixes involving SIZE_FMT_SPECIFIER. + +Changes from 1.9.2 to 1.9.3: +---------------------------- + +* Fix a bunch of minor code issues pointed out using Clang static analyzer. + +* New API: pkgconf_solution_free(), which frees a compiled solution graph. + +* Fix behavior when overriding global variables with `--define-variable`. + +Changes from 1.9.1 to 1.9.2: +---------------------------- + +* Do not try to break dependency cycles across dependency lists. This causes + the solved graph to sometimes miss required dependency nodes because the + solver detected an incorrect dependency cycle. + +* New API: pkgconf_queue_solve(), which replaces pkgconf_queue_apply(). + pkgconf_queue_apply is now deprecated and should not be used in new code. + +Changes from 1.9.0 to 1.9.1: +---------------------------- + +* Skip graph flattening and traversal for query types which only make sense + for a single pkg-config module. + + The old solver walked these graphs with --maximum-traverse-depth=1 in + these cases, but this is no longer helpful because the graph is flattened + by the new solver. + +Changes from 1.8.0 to 1.9.0: +---------------------------- + +* pkgconf 1.9.0 is the first testing release in the pkgconf 2.0 development + series. While it is believed to be suitable for production, there may be + bugs due to the overall redesign of the solver and other initiatives. + Additionally, a future release of pkgconf plans will have additional ABI + breaks for the libpkgconf library before the pkgconf 2.0 release is cut. + +* There is now a new solver that is designed to provide higher performance + with complicated graphs, which works by flattening the dependency graph + into a smaller set of dependencies. This graph can then be evaluated + instead of the original dependency graph without having to visit every + edge in the graph. + + NOTE: This solver, while providing significant performance improvements, + does so, at the cost of changed behavior for some edge cases (such as + circular dependencies). + +* Bug fixes: + - Resolved several memory leaks with edge cases when using libpkgconf + directly. + - pkgconf CLI now consistently frees libpkgconf resources under all + circumstances. + - SYSROOT rules are no longer applied to `-uninstalled` packages by + default. Use `PKG_CONFIG_PKGCONF1_SYSROOT_RULES` for legacy behavior. + +* A new `--license` selector has been added to the pkgconf CLI. This uses + SPDX expressions which can be set as the `License` field in `.pc` files. + See the `pc(5)` manpage for more information. + +* The canonical location for pkgconf maintenance going forward is + <https://gitea.treehouse.systems/ariadne/pkgconf>. This is presently + mirrored to GitHub for user convenience, but that mirroring will + be terminated at some point (due to GitHub Copilot). + Changes from 1.7.4 to 1.8.0: ----------------------------
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/README.md -> _service:tar_scm:pkgconf-1.9.5.tar.xz/README.md
Changed
@@ -3,9 +3,9 @@ `pkgconf` is a program which helps to configure compiler and linker flags for development libraries. It is similar to pkg-config from freedesktop.org. -`libpkgconf` is a library which provides access to most of `pkgconf`'s functionality, to allow -other tooling such as compilers and IDEs to discover and use libraries configured by -pkgconf. +`libpkgconf` is a library which provides access to most of `pkgconf`'s functionality, +to allow other tooling such as compilers and IDEs to discover and use libraries +configured by pkgconf. ## using `pkgconf` with autotools @@ -41,7 +41,7 @@ As of the 1.1 series, pkgconf also fully implements support for `Provides` rules, while pkg-config does not. pkg-config only provides the `--print-provides` functionality as a stub. There are other intentional implementation differences in pkgconf's dependency -resolver verses pkg-config's dependency resolver in terms of completeness and correctness, +resolver versus pkg-config's dependency resolver in terms of completeness and correctness, such as, for example, how `Conflicts` rules are processed. ## linker flags optimization @@ -71,16 +71,25 @@ the pkg-config tutorialfd-tut, as most likely fixing them to follow the specified rules will solve the problem. -Additionally, **we do not consider pkgconf doing what you tell it to do, when pkg-config -fails to do so, to be a bug**. +Additionally, **we do not consider pkgconf doing what you tell it to do, in cases for +which pkg-config fails to do so, to be a bug**. If, for example, you use environment variables such as `PKG_CONFIG_SYSTEM_INCLUDE|LIBRARY_PATH` and then find yourself surprised that `pkgconf` is stripping `-I` and `-L` flags relating -to those paths, it's not a `pkgconf` problem -- `pkgconf` is doing exactly what you told +to those paths, it is not a `pkgconf` problem -- `pkgconf` is doing exactly what you told it to do. -We will reject bugs like this, and if you choose to violate our Code of Conduct(CODE_OF_CONDUCT.md) -by demanding we fix your non-bug, we will fix the problem by banning you from the repo instead. +We will reject bugs like this, and if someone insists on fixing such a non-bug, this +constitutes a violation of our Code of Conduct(CODE_OF_CONDUCT.md), which may be +addressed by banning from this repository. + +## debug output + +Please use only the stable interfaces to query pkg-config. Do not screen-scrape the +output from `--debug`: this is sent to `stderr` for a reason, it is not intended to be +scraped. The `--debug` output is **not** a stable interface, and should **never** be +depended on as a source of information. If you need a stable interface to query pkg-config +which is not covered, please get in touch. ## compiling `pkgconf` and `libpkgconf` on UNIX @@ -103,17 +112,16 @@ $ make $ sudo make install -## compiling `pkgconf` and `libpkgconf` with CMake (usually for Windows) +## compiling `pkgconf` and `libpkgconf` with Meson (usually for Windows) -pkgconf is compiled using CMake on Windows. In theory, you could also use CMake to build -on UNIX, but this is not recommended at this time as it pkgconf is typically built much earlier -than CMake. - $ mkdir build - $ cd build - $ cmake .. - $ make - $ sudo make install +pkgconf is compiled using Meson(https://mesonbuild.com) on Windows. In theory, you could also use +Meson to build on UNIX, but this is not recommended at this time as it pkgconf is typically built +much earlier than Meson. + + $ meson setup build -Dtests=disabled + $ meson compile -C build + $ meson install -C build There are a few defines such as SYSTEM_LIBDIR, PKGCONFIGDIR and SYSTEM_INCLUDEDIR. However, on Windows, the default PKGCONFIGDIR value is usually overridden at runtime based
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/aclocal.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/aclocal.m4
Changed
@@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.)) -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if($1, 1.16.3, , +m4_if($1, 1.16.5, , AC_FATAL(Do not call $0, use AM_INIT_AUTOMAKE($1).))dnl ) @@ -51,14 +51,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN(AM_SET_CURRENT_AUTOMAKE_VERSION, -AM_AUTOMAKE_VERSION(1.16.3)dnl +AM_AUTOMAKE_VERSION(1.16.5)dnl m4_ifndef(AC_AUTOCONF_VERSION, m4_copy(m4_PACKAGE_VERSION, AC_AUTOCONF_VERSION))dnl _AM_AUTOCONF_VERSION(m4_defn(AC_AUTOCONF_VERSION))) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ Usually this means the macro was only invoked conditionally.) fi)) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,7 +332,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -400,7 +400,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -428,6 +428,10 @@ # release and drop the old call support. AC_DEFUN(AM_INIT_AUTOMAKE, AC_PREREQ(2.65)dnl +m4_ifdef(_$0_ALREADY_INIT, + m4_fatal($0 expanded multiple times +m4_defn(_$0_ALREADY_INIT)), + m4_define(_$0_ALREADY_INIT, m4_expansion_stack))dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow(^AM_A-Z+FLAGS$)dnl @@ -464,7 +468,7 @@ _AM_SET_OPTIONS($1)dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef(AC_PACKAGE_NAME, ok):m4_ifdef(AC_PACKAGE_VERSION, ok), + m4_ifset(AC_PACKAGE_NAME, ok):m4_ifset(AC_PACKAGE_VERSION, ok), ok:ok,, m4_fatal(AC_INIT should be called with package and version arguments))dnl AC_SUBST(PACKAGE, 'AC_PACKAGE_TARNAME')dnl @@ -516,6 +520,20 @@ m4_define(AC_PROG_OBJCXX, m4_defn(AC_PROG_OBJCXX)_AM_DEPENDENCIES(OBJCXX)))dnl ) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST(CTAGS) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST(ETAGS) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST(CSCOPE) + AC_REQUIRE(AM_SILENT_RULES)dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -597,7 +615,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME("$_am_arg")`/stamp-h$_am_stamp_count) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -618,7 +636,7 @@ fi AC_SUBST(install_sh)) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -639,7 +657,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -682,7 +700,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -716,7 +734,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -745,7 +763,7 @@ AC_DEFUN(_AM_IF_OPTION, m4_ifset(_AM_MANGLE_OPTION($1), $2, $3)) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -792,7 +810,7 @@ # For backward compatibility. AC_DEFUN_ONCE(AM_PROG_CC_C_O, AC_REQUIRE(AC_PROG_CC)) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -811,7 +829,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -892,7 +910,7 @@ rm -f conftest.file ) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. #
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/cli/bomtool
Added
+(directory)
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/cli/bomtool/main.c
Added
@@ -0,0 +1,365 @@ +/* + * bomtool/main.c + * main() routine, printer functions + * + * Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 + * pkgconf authors (see AUTHORS). + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * This software is provided 'as is' and without any warranty, express or + * implied. In no event shall the authors be liable for any damages arising + * from the use of this software. + */ + +#include "libpkgconf/config.h" +#include <libpkgconf/stdinc.h> +#include <libpkgconf/libpkgconf.h> +#include "getopt_long.h" + +#define PKG_VERSION (((uint64_t) 1) << 1) +#define PKG_ABOUT (((uint64_t) 1) << 2) +#define PKG_HELP (((uint64_t) 1) << 3) + +static const char *spdx_version = "SPDX-2.2"; +static const char *bom_license = "CC0-1.0"; +static const char *document_ref = "SPDXRef-DOCUMENT"; + +static pkgconf_client_t pkg_client; +static uint64_t want_flags; +static size_t maximum_package_count = 0; +static int maximum_traverse_depth = 2000; +FILE *error_msgout = NULL; + +static bool +error_handler(const char *msg, const pkgconf_client_t *client, void *data) +{ + (void) client; + (void) data; + fprintf(error_msgout, "%s", msg); + return true; +} + +static const char * +sbom_spdx_identity(pkgconf_pkg_t *pkg) +{ + static char bufPKGCONF_ITEM_SIZE; + + snprintf(buf, sizeof buf, "%sC64%s", pkg->id, pkg->version); + + return buf; +} + +static const char * +sbom_name(pkgconf_pkg_t *world) +{ + static char bufPKGCONF_BUFSIZE; + pkgconf_node_t *node; + + pkgconf_strlcpy(buf, "SBOM-SPDX", sizeof buf); + + PKGCONF_FOREACH_LIST_ENTRY(world->required.head, node) + { + pkgconf_dependency_t *dep = node->data; + pkgconf_pkg_t *match = dep->match; + + if (!dep->match) + continue; + + pkgconf_strlcat(buf, "-", sizeof buf); + pkgconf_strlcat(buf, sbom_spdx_identity(match), sizeof buf); + } + + return buf; +} + +static void +write_sbom_header(pkgconf_client_t *client, pkgconf_pkg_t *world) +{ + (void) client; + (void) world; + + printf("SPDXVersion: %s\n", spdx_version); + printf("DataLicense: %s\n", bom_license); + printf("SPDXID: %s\n", document_ref); + printf("DocumentName: %s\n", sbom_name(world)); + printf("DocumentNamespace: https://spdx.org/spdxdocs/bomtool-%s\n", PACKAGE_VERSION); + printf("Creator: Tool: bomtool %s\n", PACKAGE_VERSION); + + printf("\n\n"); +} + +static const char * +sbom_identity(pkgconf_pkg_t *pkg) +{ + static char bufPKGCONF_ITEM_SIZE; + + snprintf(buf, sizeof buf, "%s@%s", pkg->id, pkg->version); + + return buf; +} + +static void +write_sbom_package(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *unused) +{ + (void) client; + (void) unused; + + if (pkg->flags & PKGCONF_PKG_PROPF_VIRTUAL) + return; + + printf("##### Package: %s\n\n", sbom_identity(pkg)); + + printf("PackageName: %s\n", sbom_identity(pkg)); + printf("SPDXID: SPDXRef-Package-%s\n", sbom_spdx_identity(pkg)); + printf("PackageVersion: %s\n", pkg->version); + printf("PackageDownloadLocation: NOASSERTION\n"); + printf("PackageVerificationCode: NOASSERTION\n"); + + /* XXX: What about projects? */ + if (pkg->maintainer != NULL) + printf("PackageSupplier: Person: %s\n", pkg->maintainer); + + if (pkg->url != NULL) + printf("PackageHomePage: %s\n", pkg->url); + + printf("PackageLicenseDeclared: %s\n", pkg->license != NULL ? pkg->license : "NOASSERTION"); + + if (pkg->copyright != NULL) + printf("PackageCopyrightText: <text>%s</text>\n", pkg->copyright); + + if (pkg->description != NULL) + printf("PackageSummary: <text>%s</text>\n", pkg->description); + + printf("\n\n"); +} + +static void +write_sbom_relationships(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *unused) +{ + (void) client; + (void) unused; + + char baserefPKGCONF_ITEM_SIZE; + pkgconf_node_t *node; + + if (pkg->flags & PKGCONF_PKG_PROPF_VIRTUAL) + return; + + snprintf(baseref, sizeof baseref, "SPDXRef-Package-%sC64%s", pkg->id, pkg->version); + + PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node) + { + pkgconf_dependency_t *dep = node->data; + pkgconf_pkg_t *match = dep->match; + + if (!dep->match) + continue; + + printf("Relationship: %s DEPENDS_ON SPDXRef-Package-%s\n", baseref, sbom_spdx_identity(match)); + printf("Relationship: SPDXRef-Package-%s DEPENDENCY_OF %s\n", sbom_spdx_identity(match), baseref); + } + + PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node) + { + pkgconf_dependency_t *dep = node->data; + pkgconf_pkg_t *match = dep->match; + + if (!dep->match) + continue; + + printf("Relationship: %s DEPENDS_ON SPDXRef-Package-%s\n", baseref, sbom_spdx_identity(match)); + printf("Relationship: SPDXRef-Package-%s DEV_DEPENDENCY_OF %s\n", sbom_spdx_identity(match), baseref); + } + + if (pkg->required.head != NULL || pkg->requires_private.head != NULL) + printf("\n\n"); +} + +static bool +generate_sbom_from_world(pkgconf_client_t *client, pkgconf_pkg_t *world) +{ + int eflag; + pkgconf_node_t *node; + + write_sbom_header(client, world); + + eflag = pkgconf_pkg_traverse(client, world, write_sbom_package, NULL, maximum_traverse_depth, 0); + if (eflag != PKGCONF_PKG_ERRF_OK) + return false; + + eflag = pkgconf_pkg_traverse(client, world, write_sbom_relationships, NULL, maximum_traverse_depth, 0); + if (eflag != PKGCONF_PKG_ERRF_OK) + return false; + + PKGCONF_FOREACH_LIST_ENTRY(world->required.head, node) + { + pkgconf_dependency_t *dep = node->data;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/cli/main.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/cli/main.c
Changed
@@ -70,6 +70,7 @@ #define PKG_INTERNAL_CFLAGS (((uint64_t) 1) << 42) #define PKG_DUMP_PERSONALITY (((uint64_t) 1) << 43) #define PKG_SHARED (((uint64_t) 1) << 44) +#define PKG_DUMP_LICENSE (((uint64_t) 1) << 45) static pkgconf_client_t pkg_client; static const pkgconf_fragment_render_ops_t *want_render_ops = NULL; @@ -85,7 +86,7 @@ FILE *logfile_out = NULL; static bool -error_handler(const char *msg, const pkgconf_client_t *client, const void *data) +error_handler(const char *msg, const pkgconf_client_t *client, void *data) { (void) client; (void) data; @@ -346,16 +347,6 @@ return true; } -static void -print_variable(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *variable) -{ - const char *var; - - var = pkgconf_tuple_find(client, &pkg->vars, variable); - if (var != NULL) - printf("%s", var); -} - static bool apply_variable(pkgconf_client_t *client, pkgconf_pkg_t *world, void *variable, int maxdepth) { @@ -366,11 +357,12 @@ { pkgconf_dependency_t *dep = iter->data; pkgconf_pkg_t *pkg = dep->match; + const char *var; - if (iter->prev != NULL) - printf(" "); + var = pkgconf_tuple_find(client, &pkg->vars, variable); - print_variable(client, pkg, variable); + if (var != NULL) + printf("%s%s", iter->prev != NULL ? " " : "", var); } printf("\n"); @@ -415,7 +407,8 @@ char workbufPKGCONF_ITEM_SIZE; for (it = want_env_prefix; *it != '\0'; it++) - if (!isalpha(*it) && !isdigit(*it)) + if (!isalpha((unsigned char)*it) && + !isdigit((unsigned char)*it)) return false; snprintf(workbuf, sizeof workbuf, "%s_CFLAGS", want_env_prefix); @@ -594,6 +587,32 @@ #endif static void +print_license(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *data) +{ + (void) client; + (void) data; + + if (pkg->flags & PKGCONF_PKG_PROPF_VIRTUAL) + return; + + /* NOASSERTION is the default when the license is unknown, per SPDX spec § 3.15 */ + printf("%s: %s\n", pkg->id, pkg->license != NULL ? pkg->license : "NOASSERTION"); +} + +static bool +apply_license(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int maxdepth) +{ + int eflag; + + eflag = pkgconf_pkg_traverse(client, world, print_license, data, maxdepth, 0); + + if (eflag != PKGCONF_PKG_ERRF_OK) + return false; + + return true; +} + +static void version(void) { printf("%s\n", PACKAGE_VERSION); @@ -696,6 +715,7 @@ printf(" --path show the exact filenames for any matching .pc files\n"); printf(" --modversion print the specified module's version to stdout\n"); printf(" --internal-cflags do not filter 'internal' cflags from output\n"); + printf(" --license print the specified module's license to stdout if known\n"); printf("\nfiltering output:\n\n"); #ifndef PKGCONF_LITE @@ -801,8 +821,13 @@ char *logfile_arg = NULL; char *want_env_prefix = NULL; unsigned int want_client_flags = PKGCONF_PKG_PKGF_NONE; - pkgconf_cross_personality_t *personality; + pkgconf_cross_personality_t *personality = NULL; bool opened_error_msgout = false; + pkgconf_pkg_t world = { + .id = "virtual:world", + .realname = "virtual world package", + .flags = PKGCONF_PKG_PROPF_STATIC | PKGCONF_PKG_PROPF_VIRTUAL, + }; want_flags = 0; @@ -883,6 +908,7 @@ { "dump-personality", no_argument, &want_flags, PKG_DUMP_PERSONALITY }, { "personality", required_argument, NULL, 53 }, #endif + { "license", no_argument, &want_flags, PKG_DUMP_LICENSE }, { NULL, 0, NULL, 0 } }; @@ -894,12 +920,6 @@ } #endif -#ifndef PKGCONF_LITE - personality = deduce_personality(argv); -#else - personality = pkgconf_cross_personality_default(); -#endif - while ((ret = pkg_getopt_long_only(argc, argv, "", options, NULL)) != -1) { switch (ret) @@ -950,13 +970,21 @@ #endif case '?': case ':': - return EXIT_FAILURE; - break; + ret = EXIT_FAILURE; + goto out; default: break; } } + if (personality == NULL) { +#ifndef PKGCONF_LITE + personality = deduce_personality(argv); +#else + personality = pkgconf_cross_personality_default(); +#endif + } + pkgconf_path_copy_list(&personality->dir_list, &dir_list); pkgconf_path_free(&dir_list); @@ -1001,24 +1029,33 @@ if ((want_flags & PKG_ABOUT) == PKG_ABOUT) { about(); - return EXIT_SUCCESS; + + ret = EXIT_SUCCESS; + goto out; } if ((want_flags & PKG_VERSION) == PKG_VERSION) { version(); - return EXIT_SUCCESS; + + ret = EXIT_SUCCESS; + goto out; } if ((want_flags & PKG_HELP) == PKG_HELP) { usage(); - return EXIT_SUCCESS; + + ret = EXIT_SUCCESS; + goto out; } if (getenv("PKG_CONFIG_FDO_SYSROOT_RULES")) want_client_flags |= PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES; + if (getenv("PKG_CONFIG_PKGCONF1_SYSROOT_RULES")) + want_client_flags |= PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES; + if ((want_flags & PKG_SHORT_ERRORS) == PKG_SHORT_ERRORS) want_client_flags |= PKGCONF_PKG_PKGF_SIMPLIFY_ERRORS; @@ -1074,17 +1111,11 @@ if ((want_flags & PKG_INTERNAL_CFLAGS) == PKG_INTERNAL_CFLAGS)
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/cli/renderer-msvc.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/cli/renderer-msvc.c
Changed
@@ -149,7 +149,6 @@ { cnt = pkgconf_strlcpy(bptr, ".lib", buf_remaining); bptr += cnt; - buf_remaining -= cnt; } if (escape)
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/compile -> _service:tar_scm:pkgconf-1.9.5.tar.xz/compile
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/config.guess -> _service:tar_scm:pkgconf-1.9.5.tar.xz/config.guess
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. -timestamp='2015-01-01' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2022-01-09' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -15,7 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. +# along with this program; if not, see <https://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,11 +29,19 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ @@ -39,7 +49,7 @@ Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +60,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,7 +94,8 @@ exit 1 fi -trap 'exit 1' 1 2 15 +# Just in case it came from the environment. +GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires @@ -96,66 +107,90 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD=$driver + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include <features.h> #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include <stdarg.h> + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" + + # Second heuristic to detect musl libc. + if "$LIBC" = unknown && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if "$LIBC" = unknown ; then + LIBC=gnu + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*)
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/config.sub -> _service:tar_scm:pkgconf-1.9.5.tar.xz/config.sub
Changed
@@ -1,12 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2015 Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2015-01-01' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2021-12-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -15,7 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see <http://www.gnu.org/licenses/>. +# along with this program; if not, see <https://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +35,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,15 +52,21 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 OPTION CPU-MFR-OPSYS - $0 OPTION ALIAS +Usage: $0 OPTION CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -68,7 +76,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2015 Free Software Foundation, Inc. +Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -90,12 +98,12 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -111,1228 +119,1186 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\(^-*-^-*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-^-*$//'` - if $basic_machine != $1 - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +# shellcheck disable=SC2162 +saved_IFS=$IFS +IFS="-" read field1 field2 field3 field4 <<EOF +$1 +EOF +IFS=$saved_IFS -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun234* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c123* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.4-9*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v4-9*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/configure -> _service:tar_scm:pkgconf-1.9.5.tar.xz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for pkgconf 1.8.0. +# Generated by GNU Autoconf 2.71 for pkgconf 1.9.5. # # Report bugs to <https://github.com/pkgconf/pkgconf/issues/new>. # @@ -621,8 +621,8 @@ # Identity of this package. PACKAGE_NAME='pkgconf' PACKAGE_TARNAME='pkgconf' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='pkgconf 1.8.0' +PACKAGE_VERSION='1.9.5' +PACKAGE_STRING='pkgconf 1.9.5' PACKAGE_BUGREPORT='https://github.com/pkgconf/pkgconf/issues/new' PACKAGE_URL='' @@ -680,6 +680,7 @@ AR DLLTOOL OBJDUMP +FILECMD LN_S NM ac_ct_DUMPBIN @@ -702,6 +703,9 @@ AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -1358,7 +1362,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures pkgconf 1.8.0 to adapt to many kinds of systems. +\`configure' configures pkgconf 1.9.5 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1429,7 +1433,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pkgconf 1.8.0:";; + short | recursive ) echo "Configuration of pkgconf 1.9.5:";; esac cat <<\_ACEOF @@ -1549,7 +1553,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pkgconf configure 1.8.0 +pkgconf configure 1.9.5 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1602,6 +1606,91 @@ } # ac_fn_c_try_compile +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -1711,39 +1800,6 @@ } # ac_fn_c_check_func -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -printf %s "checking for $2... " >&6; } -if eval test \${$3+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - eval "$3=yes" -else $as_nop - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -eval ac_res=\$$3 - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -printf "%s\n" "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. @@ -1805,7 +1861,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/configure.ac -> _service:tar_scm:pkgconf-1.9.5.tar.xz/configure.ac
Changed
@@ -11,8 +11,8 @@ 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.8.0, https://github.com/pkgconf/pkgconf/issues/new) +AC_PREREQ(2.71) +AC_INIT(pkgconf,1.9.5,https://github.com/pkgconf/pkgconf/issues/new) AC_CONFIG_SRCDIR(cli/main.c) AC_CONFIG_MACRO_DIR(m4) AX_CHECK_COMPILE_FLAG(-Wall, CFLAGS="$CFLAGS -Wall") @@ -22,7 +22,8 @@ AX_CHECK_COMPILE_FLAG(-std=c99, CFLAGS="$CFLAGS -std=c99") ) AC_CONFIG_HEADERS(libpkgconf/config.h) -AC_CHECK_FUNCS(strlcpy strlcat strndup) +AC_CHECK_DECLS(strlcpy, strlcat, strndup, , , #include <string.h>) +AC_CHECK_DECLS(reallocarray) AC_CHECK_HEADERS(sys/stat.h) AM_INIT_AUTOMAKE(foreign dist-xz subdir-objects) AM_SILENT_RULES(yes) @@ -30,26 +31,26 @@ AC_SYS_LARGEFILE -AC_ARG_WITH(personality-dir,AC_HELP_STRING(--with-personality-dir,specify +AC_ARG_WITH(personality-dir,AS_HELP_STRING(--with-personality-dir,specify the place where cross-compile personality files will be found), PERSONALITY_PATH="$withval", PERSONALITY_PATH="${datadir}/pkgconfig/personality.d:${sysconfdir}/pkgconfig/personality.d") AC_SUBST(PERSONALITY_PATH) -AC_ARG_WITH(pkg-config-dir,AC_HELP_STRING(--with-pkg-config-dir,specify +AC_ARG_WITH(pkg-config-dir,AS_HELP_STRING(--with-pkg-config-dir,specify the place where pc files will be found),PKG_DEFAULT_PATH="$withval", PKG_DEFAULT_PATH="${libdir}/pkgconfig:${datadir}/pkgconfig") AC_SUBST(PKG_DEFAULT_PATH) -AC_ARG_WITH(system-libdir,AC_HELP_STRING(--with-system-libdir,specify the +AC_ARG_WITH(system-libdir,AS_HELP_STRING(--with-system-libdir,specify the system library directory (default LIBDIR)), SYSTEM_LIBDIR="$withval", SYSTEM_LIBDIR="${libdir}") AC_SUBST(SYSTEM_LIBDIR) -AC_ARG_WITH(system-includedir,AC_HELP_STRING(--with-system-includedir,specify the +AC_ARG_WITH(system-includedir,AS_HELP_STRING(--with-system-includedir,specify the system include directory (default INCLUDEDIR)), SYSTEM_INCLUDEDIR="$withval", SYSTEM_INCLUDEDIR="${includedir}")
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/depcomp -> _service:tar_scm:pkgconf-1.9.5.tar.xz/depcomp
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/extract.py -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/extract.py
Changed
@@ -70,21 +70,21 @@ while True: char = source_file.read(1) if not char: - if state is 3 or state is 4: + if state == 3 or state == 4: raise UnterminatedCommentError() - if state is 2: + if state == 2: # Was in single line comment. Create comment. comment = Comment(current_comment, line_counter, False) comments.append(comment) return comments - if state is 0: + if state == 0: # Waiting for comment start character or beginning of # string. if char == '/': state = 1 elif char == '"': state = 5 - elif state is 1: + elif state == 1: # Found comment start character, classify next character and # determine if single or multiline comment. if char == '/': @@ -94,7 +94,7 @@ state = 3 else: state = 0 - elif state is 2: + elif state == 2: # In single line comment, read characters until EOL. if char == '\n': comment = Comment(current_comment, line_counter, False) @@ -103,14 +103,14 @@ state = 0 else: current_comment += char - elif state is 3: + elif state == 3: # In multi-line comment, add characters until '*' # encountered. if char == '*': state = 4 else: current_comment += char - elif state is 4: + elif state == 4: # In multi-line comment with asterisk found. Determine if # comment is ending. if char == '/': @@ -125,13 +125,13 @@ if char != '*': current_comment += char state = 3 - elif state is 5: + elif state == 5: # In string literal, expect literal end or escape char. if char == '"': state = 0 elif char == '\\': state = 6 - elif state is 6: + elif state == 6: # In string literal, escaping current char. state = 5 if char == '\n':
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-client.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-client.rst
Changed
@@ -9,21 +9,32 @@ Client objects are not thread safe, in other words, a client object should not be shared across thread boundaries. -.. c:function:: void pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error_handler) +.. c:function:: void pkgconf_client_dir_list_build(pkgconf_client_t *client) + + Bootstraps the package search paths. If the ``PKGCONF_PKG_PKGF_ENV_ONLY`` `flag` is set on the client, + then only the ``PKG_CONFIG_PATH`` environment variable will be used, otherwise both the + ``PKG_CONFIG_PATH`` and ``PKG_CONFIG_LIBDIR`` environment variables will be used. + + :param pkgconf_client_t* client: The pkgconf client object to bootstrap. + :return: nothing + +.. c:function:: void pkgconf_client_init(pkgconf_client_t *client, pkgconf_error_handler_func_t error_handler, void *error_handler_data, const pkgconf_cross_personality_t *personality) Initialise a pkgconf client object. :param pkgconf_client_t* client: The client to initialise. :param pkgconf_error_handler_func_t error_handler: An optional error handler to use for logging errors. :param void* error_handler_data: user data passed to optional error handler + :param pkgconf_cross_personality_t* personality: the cross-compile personality to use for defaults :return: nothing -.. c:function:: pkgconf_client_t* pkgconf_client_new(pkgconf_error_handler_func_t error_handler) +.. c:function:: pkgconf_client_t* pkgconf_client_new(pkgconf_error_handler_func_t error_handler, void *error_handler_data, const pkgconf_cross_personality_t *personality) Allocate and initialise a pkgconf client object. :param pkgconf_error_handler_func_t error_handler: An optional error handler to use for logging errors. :param void* error_handler_data: user data passed to optional error handler + :param pkgconf_cross_personality_t* personality: cross-compile personality to use :return: A pkgconf client object. :rtype: pkgconf_client_t* @@ -97,11 +108,14 @@ :return: true if the warn handler processed the message, else false. :rtype: bool -.. c:function:: bool pkgconf_trace(const pkgconf_client_t *client, const char *format, ...) +.. c:function:: bool pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t len, const char *funcname, const char *format, ...) Report a message to a client-registered trace handler. :param pkgconf_client_t* client: The pkgconf client object to report the trace message to. + :param char* filename: The file the function is in. + :param size_t lineno: The line number currently being executed. + :param char* funcname: The function name to use. :param char* format: A printf-style format string to use for formatting the trace message. :return: true if the trace handler processed the message, else false. :rtype: bool
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-dependency.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-dependency.rst
Changed
@@ -14,6 +14,7 @@ :param char* package: The package `atom` to set on the dependency node. :param char* version: The package `version` to set on the dependency node. :param pkgconf_pkg_comparator_t compare: The comparison operator to set on the dependency node. + :param uint flags: Any flags to attach to the dependency node. :return: A dependency node. :rtype: pkgconf_dependency_t * @@ -25,6 +26,29 @@ :param pkgconf_dependency_t* tail: The dependency node to add to the tail of the dependency list. :return: nothing +.. c:function:: void pkgconf_dependency_free_one(pkgconf_dependency_t *dep) + + Frees a dependency node. + + :param pkgconf_dependency_t* dep: The dependency node to free. + :return: nothing + +.. c:function:: pkgconf_dependency_t *pkgconf_dependency_ref(pkgconf_client_t *owner, pkgconf_dependency_t *dep) + + Increases a dependency node's refcount. + + :param pkgconf_client_t* owner: The client object which owns the memory of this dependency node. + :param pkgconf_dependency_t* dep: The dependency to increase the refcount of. + :return: the dependency node on success, else NULL + +.. c:function:: void pkgconf_dependency_unref(pkgconf_client_t *owner, pkgconf_dependency_t *dep) + + Decreases a dependency node's refcount and frees it if necessary. + + :param pkgconf_client_t* owner: The client object which owns the memory of this dependency node. + :param pkgconf_dependency_t* dep: The dependency to decrease the refcount of. + :return: nothing + .. c:function:: void pkgconf_dependency_free(pkgconf_list_t *list) Release a dependency list and it's child dependency nodes. @@ -41,6 +65,7 @@ :param pkgconf_client_t* client: The client object that owns the package this dependency list belongs to. :param pkgconf_list_t* deplist_head: The dependency list to populate with dependency nodes. :param char* depends: The dependency data to parse. + :param uint flags: Any flags to attach to the dependency nodes. :return: nothing .. c:function:: void pkgconf_dependency_parse(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, pkgconf_list_t *deplist, const char *depends) @@ -53,4 +78,13 @@ :param pkgconf_pkg_t* pkg: The package object that owns this dependency list. :param pkgconf_list_t* deplist: The dependency list to populate with dependency nodes. :param char* depends: The dependency data to parse. + :param uint flags: Any flags to attach to the dependency nodes. :return: nothing + +.. c:function:: pkgconf_dependency_t *pkgconf_dependency_copy(pkgconf_client_t *client, const pkgconf_dependency_t *dep) + + Copies a dependency node to a new one. + + :param pkgconf_client_t* client: The client object that will own this dependency. + :param pkgconf_dependency_t* dep: The dependency node to copy. + :return: a pointer to a new dependency node, else NULL
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-fragment.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-fragment.rst
Changed
@@ -6,13 +6,14 @@ `fragment list` contains various `fragments` of text (such as ``-I /usr/include``) in a matter which is composable, mergeable and reorderable. -.. c:function:: void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string) +.. c:function:: void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string, unsigned int flags) Adds a `fragment` of text to a `fragment list`, possibly modifying the fragment if a sysroot is set. :param pkgconf_client_t* client: The pkgconf client being accessed. :param pkgconf_list_t* list: The fragment list. :param char* string: The string of text to add as a fragment to the fragment list. + :param uint flags: Parsing-related flags for the package. :return: nothing .. c:function:: bool pkgconf_fragment_has_system_dir(const pkgconf_client_t *client, const pkgconf_fragment_t *frag) @@ -110,5 +111,6 @@ :param pkgconf_client_t* client: The pkgconf client being accessed. :param pkgconf_list_t* list: The `fragment list` to add the fragment entries to. :param pkgconf_list_t* vars: A list of variables to use for variable substitution. + :param uint flags: Any parsing flags to be aware of. :param char* value: The string to parse into fragments. :return: true on success, false on parse error
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-path.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-path.rst
Changed
@@ -25,12 +25,12 @@ :return: number of path nodes added to the path list :rtype: size_t -.. c:function:: size_t pkgconf_path_build_from_environ(const char *environ, const char *fallback, pkgconf_list_t *dirlist) +.. c:function:: size_t pkgconf_path_build_from_environ(const char *envvarname, const char *fallback, pkgconf_list_t *dirlist) Adds the paths specified in an environment variable to a path list. If the environment variable is not set, an optional default set of paths is added. - :param char* environ: The environment variable to look up. + :param char* envvarname: The environment variable to look up. :param char* fallback: The fallback paths to use if the environment variable is not set. :param pkgconf_list_t* dirlist: The path list to add the path nodes to. :param bool filter: Whether to perform duplicate filtering. @@ -46,6 +46,14 @@ :return: true if the path list has a matching prefix, otherwise false :rtype: bool +.. c:function:: void pkgconf_path_copy_list(pkgconf_list_t *dst, const pkgconf_list_t *src) + + Copies a path list to another path list. + + :param pkgconf_list_t* dst: The path list to copy to. + :param pkgconf_list_t* src: The path list to copy from. + :return: nothing + .. c:function:: void pkgconf_path_free(pkgconf_list_t *dirlist) Releases any path nodes attached to the given path list.
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-pkg.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-pkg.rst
Changed
@@ -5,22 +5,14 @@ The `pkg` module provides dependency resolution services and the overall `.pc` file parsing routines. -.. c:function:: void pkgconf_pkg_dir_list_build(pkgconf_client_t *client) - - Bootstraps the package search paths. If the ``PKGCONF_PKG_PKGF_ENV_ONLY`` `flag` is set on the client, - then only the ``PKG_CONFIG_PATH`` environment variable will be used, otherwise both the - ``PKG_CONFIG_PATH`` and ``PKG_CONFIG_LIBDIR`` environment variables will be used. - - :param pkgconf_client_t* client: The pkgconf client object to bootstrap. - :return: nothing - -.. c:function:: pkgconf_pkg_t *pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, FILE *f) +.. c:function:: pkgconf_pkg_t *pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, FILE *f, unsigned int flags) Parse a .pc file into a pkgconf_pkg_t object structure. :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. :param char* filename: The filename of the package file (including full path). :param FILE* f: The file object to read from. + :param uint flags: The flags to use when parsing. :returns: A ``pkgconf_pkg_t`` object which contains the package data. :rtype: pkgconf_pkg_t * @@ -76,7 +68,7 @@ :param char* a: The first version to compare in the pair. :param char* b: The second version to compare in the pair. - :return: -1 if the first version is greater, 0 if both versions are equal, 1 if the second version is greater. + :return: -1 if the first version is less than, 0 if both versions are equal, 1 if the second version is less than. :rtype: int .. c:function:: pkgconf_pkg_t *pkgconf_builtin_pkg_get(const char *name) @@ -126,7 +118,7 @@ :return: On success, ``PKGCONF_PKG_ERRF_OK`` (0), else an error code. :rtype: unsigned int -.. c:function:: unsigned int pkgconf_pkg_traverse(pkgconf_client_t *client, pkgconf_pkg_t *root, pkgconf_pkg_traverse_func_t func, void *data, int maxdepth) +.. c:function:: unsigned int pkgconf_pkg_traverse(pkgconf_client_t *client, pkgconf_pkg_t *root, pkgconf_pkg_traverse_func_t func, void *data, int maxdepth, unsigned int skip_flags) Walk and resolve the dependency graph up to `maxdepth` levels. @@ -135,6 +127,7 @@ :param pkgconf_pkg_traverse_func_t func: A traversal function to call for each resolved node in the dependency graph. :param void* data: An opaque pointer to data to be passed to the traversal function. :param int maxdepth: The maximum depth to walk the dependency graph for. -1 means infinite recursion. + :param uint skip_flags: Skip over dependency nodes containing the specified flags. A setting of 0 skips no dependency nodes. :return: ``PKGCONF_PKG_ERRF_OK`` on success, else an error code. :rtype: unsigned int
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-queue.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-queue.rst
Changed
@@ -33,11 +33,32 @@ :param pkgconf_list_t* list: The dependency resolution queue to release. :return: nothing +.. c:function:: void pkgconf_solution_free(pkgconf_client_t *client, pkgconf_pkg_t *world, int maxdepth) + + Removes references to package nodes contained in a solution. + + :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. + :param pkgconf_pkg_t* world: The root for the generated dependency graph. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. + :returns: nothing + +.. c:function:: bool pkgconf_queue_solve(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_pkg_t *world, int maxdepth) + + Solves and flattens the dependency graph for the supplied dependency list. + + :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. + :param pkgconf_list_t* list: The list of dependency requests to consider. + :param pkgconf_pkg_t* world: The root for the generated dependency graph, provided by the caller. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. + :param int maxdepth: The maximum allowed depth for the dependency resolver. A depth of -1 means unlimited. + :returns: true if the dependency resolver found a solution, otherwise false. + :rtype: bool + .. c:function:: void pkgconf_queue_apply(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_queue_apply_func_t func, int maxdepth, void *data) Attempt to compile a dependency resolution queue into a dependency resolution problem, then attempt to solve the problem and feed the solution to a callback function if a complete dependency graph is found. + This function should not be used in new code. Use pkgconf_queue_solve instead. + :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. :param pkgconf_list_t* list: The list of dependency requests to consider. :param pkgconf_queue_apply_func_t func: The callback function to call if a solution is found by the dependency resolver.
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf-tuple.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf-tuple.rst
Changed
@@ -64,13 +64,14 @@ :return: the value of the variable or ``NULL`` :rtype: char * -.. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) +.. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags) Parse an expression for variable substitution. :param pkgconf_client_t* client: The pkgconf client object to access. :param pkgconf_list_t* list: The variable list to search for variables (along side the global variable list). :param char* value: The ``key=value`` string to parse. + :param uint flags: Any flags to consider while parsing. :return: the variable data with any variables substituted :rtype: char *
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/doc/libpkgconf.rst -> _service:tar_scm:pkgconf-1.9.5.tar.xz/doc/libpkgconf.rst
Changed
@@ -11,6 +11,7 @@ libpkgconf-dependency libpkgconf-fragment libpkgconf-path + libpkgconf-personality libpkgconf-pkg libpkgconf-queue libpkgconf-tuple
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/install-sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/install-sh
Changed
@@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2013-12-25.23; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -271,15 +295,18 @@ fi dst=$dst_arg - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst - dst=$dstdir/`basename "$src"` + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac dstdir_status=0 else dstdir=`dirname "$dst"` @@ -288,27 +315,16 @@ fi fi + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac + obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *23672367) mkdir_umask=$umask;; - .*00202 | .0202 | .02) mkdir_umask=22;; - - *0-7) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -318,43 +334,49 @@ fi posix_mkdir=false - case $umask in - *1235670-70-7) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf.pc.in -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf.pc.in
Changed
@@ -5,7 +5,8 @@ Name: libpkgconf Description: a library for accessing and manipulating development framework configuration -URL: http://github.com/pkgconf/pkgconf +URL: https://gitea.treehouse.systems/ariadne/pkgconf +License: ISC Version: @PACKAGE_VERSION@ CFlags: -I${includedir}/pkgconf Libs: -L${libdir} -lpkgconf
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/argvsplit.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/argvsplit.c
Changed
@@ -80,7 +80,7 @@ if (escaped) { /* POSIX: only \CHAR is special inside a double quote if CHAR is {$, `, ", \, newline}. */ - if (quote == '\"') + if (quote == '"') { if (!(*src_iter == '$' || *src_iter == '`' || *src_iter == '"' || *src_iter == '\\')) *dst_iter++ = '\\'; @@ -88,7 +88,9 @@ *dst_iter++ = *src_iter; } else + { *dst_iter++ = *src_iter; + } escaped = false; } @@ -101,7 +103,7 @@ else *dst_iter++ = *src_iter; } - else if (isspace((unsigned int)*src_iter)) + else if (isspace((unsigned char)*src_iter)) { if ((*argv)argc_count != NULL) { @@ -118,11 +120,9 @@ } else switch(*src_iter) { -#ifndef _WIN32 case '\\': escaped = true; break; -#endif case '\"': case '\'':
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/bsdstubs.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/bsdstubs.c
Changed
@@ -20,11 +20,12 @@ #include <stdlib.h> #include <sys/types.h> #include <string.h> +#include <errno.h> #include <libpkgconf/bsdstubs.h> #include <libpkgconf/config.h> -#ifndef HAVE_STRLCPY +#if !HAVE_DECL_STRLCPY /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). @@ -57,7 +58,7 @@ } #endif -#ifndef HAVE_STRLCAT +#if !HAVE_DECL_STRLCAT /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters @@ -106,7 +107,7 @@ * from the use of this software. */ -#ifndef HAVE_STRNDUP +#if !HAVE_DECL_STRNDUP /* * Creates a memory buffer and copies at most 'len' characters to it. * If 'len' is less than the length of the source string, truncation occured. @@ -137,3 +138,23 @@ { return strndup(src, len); } + +#if !HAVE_DECL_REALLOCARRAY +void * +reallocarray(void *ptr, size_t m, size_t n) +{ + if (n && m > -1 / n) + { + errno = ENOMEM; + return 0; + } + + return realloc(ptr, m * n); +} +#endif + +void * +pkgconf_reallocarray(void *ptr, size_t m, size_t n) +{ + return reallocarray(ptr, m, n); +}
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/bsdstubs.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/bsdstubs.h
Changed
@@ -25,6 +25,7 @@ PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz); PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz); PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len); +PKGCONF_API extern void *pkgconf_reallocarray(void *ptr, size_t m, size_t n); #ifdef __cplusplus }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/cache.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/cache.c
Changed
@@ -16,6 +16,8 @@ #include <libpkgconf/stdinc.h> #include <libpkgconf/libpkgconf.h> +#include <assert.h> + /* * !doc * @@ -29,6 +31,46 @@ * be shared across threads. */ +static int +cache_member_cmp(const void *a, const void *b) +{ + const char *key = a; + const pkgconf_pkg_t *pkg = *(void **) b; + + return strcmp(key, pkg->id); +} + +static int +cache_member_sort_cmp(const void *a, const void *b) +{ + const pkgconf_pkg_t *pkgA = *(void **) a; + const pkgconf_pkg_t *pkgB = *(void **) b; + + if (pkgA == NULL) + return 1; + + if (pkgB == NULL) + return -1; + + return strcmp(pkgA->id, pkgB->id); +} + +static void +cache_dump(const pkgconf_client_t *client) +{ + size_t i; + + PKGCONF_TRACE(client, "dumping package cache contents"); + + for (i = 0; i < client->cache_count; i++) + { + const pkgconf_pkg_t *pkg = client->cache_tablei; + + PKGCONF_TRACE(client, SIZE_FMT_SPECIFIER": %p(%s)", + i, pkg, pkg == NULL ? "NULL" : pkg->id); + } +} + /* * !doc * @@ -46,17 +88,19 @@ pkgconf_pkg_t * pkgconf_cache_lookup(pkgconf_client_t *client, const char *id) { - pkgconf_node_t *node; + if (client->cache_table == NULL) + return NULL; - PKGCONF_FOREACH_LIST_ENTRY(client->pkg_cache.head, node) - { - pkgconf_pkg_t *pkg = node->data; + pkgconf_pkg_t **pkg; + + pkg = bsearch(id, client->cache_table, + client->cache_count, sizeof (void *), + cache_member_cmp); - if (!strcmp(pkg->id, id)) - { - PKGCONF_TRACE(client, "found: %s @%p", id, pkg); - return pkgconf_pkg_ref(client, pkg); - } + if (pkg != NULL) + { + PKGCONF_TRACE(client, "found: %s @%p", id, *pkg); + return pkgconf_pkg_ref(client, *pkg); } PKGCONF_TRACE(client, "miss: %s", id); @@ -82,12 +126,19 @@ return; pkgconf_pkg_ref(client, pkg); - pkgconf_node_insert(&pkg->cache_iter, pkg, &client->pkg_cache); PKGCONF_TRACE(client, "added @%p to cache", pkg); /* mark package as cached */ pkg->flags |= PKGCONF_PKG_PROPF_CACHED; + + ++client->cache_count; + client->cache_table = pkgconf_reallocarray(client->cache_table, + client->cache_count, sizeof (void *)); + client->cache_tableclient->cache_count - 1 = pkg; + + qsort(client->cache_table, client->cache_count, + sizeof(void *), cache_member_sort_cmp); } /* @@ -104,6 +155,9 @@ void pkgconf_cache_remove(pkgconf_client_t *client, pkgconf_pkg_t *pkg) { + if (client->cache_table == NULL) + return; + if (pkg == NULL) return; @@ -112,7 +166,41 @@ PKGCONF_TRACE(client, "removed @%p from cache", pkg); - pkgconf_node_delete(&pkg->cache_iter, &client->pkg_cache); + pkgconf_pkg_t **slot; + + slot = bsearch(pkg->id, client->cache_table, + client->cache_count, sizeof (void *), + cache_member_cmp); + + if (slot == NULL) + return; + + (*slot)->flags &= ~PKGCONF_PKG_PROPF_CACHED; + pkgconf_pkg_unref(client, *slot); + *slot = NULL; + + qsort(client->cache_table, client->cache_count, + sizeof(void *), cache_member_sort_cmp); + + if (client->cache_tableclient->cache_count - 1 != NULL) + { + PKGCONF_TRACE(client, "end of cache table refers to %p, not NULL", + client->cache_tableclient->cache_count - 1); + cache_dump(client); + abort(); + } + + client->cache_count--; + if (client->cache_count > 0) + { + client->cache_table = pkgconf_reallocarray(client->cache_table, + client->cache_count, sizeof(void *)); + } + else + { + free(client->cache_table); + client->cache_table = NULL; + } } /* @@ -129,15 +217,15 @@ void pkgconf_cache_free(pkgconf_client_t *client) { - pkgconf_node_t *iter, *iter2; + if (client->cache_table == NULL) + return; - PKGCONF_FOREACH_LIST_ENTRY_SAFE(client->pkg_cache.head, iter2, iter) - { - pkgconf_pkg_t *pkg = iter->data; - pkgconf_pkg_unref(client, pkg); - } + while (client->cache_count > 0) + pkgconf_cache_remove(client, client->cache_table0); - memset(&client->pkg_cache, 0, sizeof client->pkg_cache); + free(client->cache_table); + client->cache_table = NULL; + client->cache_count = 0; PKGCONF_TRACE(client, "cleared package cache"); }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/client.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/client.c
Changed
@@ -98,6 +98,8 @@ client->error_handler_data = error_handler_data; client->error_handler = error_handler; client->auditf = NULL; + client->cache_table = NULL; + client->cache_count = 0; #ifndef PKGCONF_LITE if (client->trace_handler == NULL) @@ -401,7 +403,7 @@ * :rtype: bool */ bool -pkgconf_default_error_handler(const char *msg, const pkgconf_client_t *client, const void *data) +pkgconf_default_error_handler(const char *msg, const pkgconf_client_t *client, void *data) { (void) msg; (void) client;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/config.h.in -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/config.h.in
Changed
@@ -1,5 +1,21 @@ /* libpkgconf/config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 if you have the declaration of `reallocarray', and to 0 if you + don't. */ +#undef HAVE_DECL_REALLOCARRAY + +/* Define to 1 if you have the declaration of `strlcat', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCAT + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCPY + +/* Define to 1 if you have the declaration of `strndup', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNDUP + /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H @@ -21,15 +37,6 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strlcat' function. */ -#undef HAVE_STRLCAT - -/* Define to 1 if you have the `strlcpy' function. */ -#undef HAVE_STRLCPY - -/* Define to 1 if you have the `strndup' function. */ -#undef HAVE_STRNDUP - /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/config.h.meson -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/config.h.meson
Changed
@@ -9,6 +9,21 @@ /* Define to 1 if you have the `strndup' function. */ #mesondefine HAVE_STRNDUP +/* Define to 1 if you have the `reallocarray' function. */ +#mesondefine HAVE_REALLOCARRAY + +/* Define to 1 if you have the `strlcat' function. */ +#mesondefine HAVE_DECL_STRLCAT + +/* Define to 1 if you have the `strlcpy' function. */ +#mesondefine HAVE_DECL_STRLCPY + +/* Define to 1 if you have the `strndup' function. */ +#mesondefine HAVE_DECL_STRNDUP + +/* Define to 1 if you have the `reallocarray' function. */ +#mesondefine HAVE_DECL_REALLOCARRAY + /* Name of package */ #mesondefine PACKAGE
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/dependency.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/dependency.c
Changed
@@ -73,7 +73,7 @@ } static inline pkgconf_dependency_t * -add_or_replace_dependency_node(const pkgconf_client_t *client, pkgconf_dependency_t *dep, pkgconf_list_t *list) +add_or_replace_dependency_node(pkgconf_client_t *client, pkgconf_dependency_t *dep, pkgconf_list_t *list) { char depbufPKGCONF_ITEM_SIZE; pkgconf_dependency_t *dep2 = find_colliding_dependency(dep, list); @@ -92,7 +92,7 @@ { PKGCONF_TRACE(client, "dropping dependency %s@%p because of collision", depbuf, dep); - free(dep); + pkgconf_dependency_unref(dep->owner, dep); return NULL; } else if (dep2->flags && dep->flags == 0) @@ -100,7 +100,7 @@ PKGCONF_TRACE(client, "dropping dependency %s@%p because of collision", depbuf2, dep2); pkgconf_node_delete(&dep2->iter, list); - free(dep2); + pkgconf_dependency_unref(dep2->owner, dep2); } else /* If both dependencies have equal strength, we keep both, because of situations like: @@ -113,13 +113,20 @@ } PKGCONF_TRACE(client, "added dependency %s to list @%p; flags=%x", dependency_to_str(dep, depbuf, sizeof depbuf), list, dep->flags); - pkgconf_node_insert_tail(&dep->iter, dep, list); - + pkgconf_node_insert_tail(&dep->iter, pkgconf_dependency_ref(dep->owner, dep), list); + + /* This dependency is intentionally unowned. + * + * Internally we have no use for the returned type, and usually just + * discard it. However, there is a publig pkgconf_dependency_add + * function, which references this return value before returning it, + * giving ownership at that point. + */ return dep; } static inline pkgconf_dependency_t * -pkgconf_dependency_addraw(const pkgconf_client_t *client, pkgconf_list_t *list, const char *package, size_t package_sz, const char *version, size_t version_sz, pkgconf_pkg_comparator_t compare, unsigned int flags) +pkgconf_dependency_addraw(pkgconf_client_t *client, pkgconf_list_t *list, const char *package, size_t package_sz, const char *version, size_t version_sz, pkgconf_pkg_comparator_t compare, unsigned int flags) { pkgconf_dependency_t *dep; @@ -131,6 +138,8 @@ dep->compare = compare; dep->flags = flags; + dep->owner = client; + dep->refcount = 0; return add_or_replace_dependency_node(client, dep, list); } @@ -152,12 +161,12 @@ * :rtype: pkgconf_dependency_t * */ pkgconf_dependency_t * -pkgconf_dependency_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *package, const char *version, pkgconf_pkg_comparator_t compare, unsigned int flags) +pkgconf_dependency_add(pkgconf_client_t *client, pkgconf_list_t *list, const char *package, const char *version, pkgconf_pkg_comparator_t compare, unsigned int flags) { - if (version != NULL) - return pkgconf_dependency_addraw(client, list, package, strlen(package), version, strlen(version), compare, flags); - - return pkgconf_dependency_addraw(client, list, package, strlen(package), NULL, 0, compare, flags); + pkgconf_dependency_t *dep; + dep = pkgconf_dependency_addraw(client, list, package, strlen(package), version, + version != NULL ? strlen(version) : 0, compare, flags); + return pkgconf_dependency_ref(dep->owner, dep); } /* @@ -180,6 +189,77 @@ /* * !doc * + * .. c:function:: void pkgconf_dependency_free_one(pkgconf_dependency_t *dep) + * + * Frees a dependency node. + * + * :param pkgconf_dependency_t* dep: The dependency node to free. + * :return: nothing + */ +void +pkgconf_dependency_free_one(pkgconf_dependency_t *dep) +{ + if (dep->match != NULL) + pkgconf_pkg_unref(dep->match->owner, dep->match); + + if (dep->package != NULL) + free(dep->package); + + if (dep->version != NULL) + free(dep->version); + + free(dep); +} + +/* + * !doc + * + * .. c:function:: pkgconf_dependency_t *pkgconf_dependency_ref(pkgconf_client_t *owner, pkgconf_dependency_t *dep) + * + * Increases a dependency node's refcount. + * + * :param pkgconf_client_t* owner: The client object which owns the memory of this dependency node. + * :param pkgconf_dependency_t* dep: The dependency to increase the refcount of. + * :return: the dependency node on success, else NULL + */ +pkgconf_dependency_t * +pkgconf_dependency_ref(pkgconf_client_t *client, pkgconf_dependency_t *dep) +{ + if (client != dep->owner) + return NULL; + + dep->refcount++; + PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount); + return dep; +} + +/* + * !doc + * + * .. c:function:: void pkgconf_dependency_unref(pkgconf_client_t *owner, pkgconf_dependency_t *dep) + * + * Decreases a dependency node's refcount and frees it if necessary. + * + * :param pkgconf_client_t* owner: The client object which owns the memory of this dependency node. + * :param pkgconf_dependency_t* dep: The dependency to decrease the refcount of. + * :return: nothing + */ +void +pkgconf_dependency_unref(pkgconf_client_t *client, pkgconf_dependency_t *dep) +{ + if (client != dep->owner) + return; + + --dep->refcount; + PKGCONF_TRACE(client, "%s refcount@%p: %d", dep->package, dep, dep->refcount); + + if (dep->refcount <= 0) + pkgconf_dependency_free_one(dep); +} + +/* + * !doc + * * .. c:function:: void pkgconf_dependency_free(pkgconf_list_t *list) * * Release a dependency list and it's child dependency nodes. @@ -196,17 +276,11 @@ { pkgconf_dependency_t *dep = node->data; - if (dep->match != NULL) - pkgconf_pkg_unref(NULL, dep->match); - - if (dep->package != NULL) - free(dep->package); - - if (dep->version != NULL) - free(dep->version); - - free(dep); + pkgconf_node_delete(&dep->iter, list); + pkgconf_dependency_unref(dep->owner, dep); } + + pkgconf_list_zero(list); } /* @@ -225,7 +299,7 @@ * :return: nothing */ void -pkgconf_dependency_parse_str(const pkgconf_client_t *client, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags) +pkgconf_dependency_parse_str(pkgconf_client_t *client, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags) { parse_state_t state = OUTSIDE_MODULE; pkgconf_pkg_comparator_t compare = PKGCONF_CMP_ANY; @@ -255,11 +329,11 @@ break; case INSIDE_MODULE_NAME: - if (isspace((unsigned int)*ptr)) + if (isspace((unsigned char)*ptr)) { const char *sptr = ptr; - while (*sptr && isspace((unsigned int)*sptr)) + while (*sptr && isspace((unsigned char)*sptr)) sptr++;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/fragment.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/fragment.c
Changed
@@ -93,15 +93,18 @@ } static inline void -pkgconf_fragment_munge(const pkgconf_client_t *client, char *buf, size_t buflen, const char *source, const char *sysroot_dir) +pkgconf_fragment_munge(const pkgconf_client_t *client, char *buf, size_t buflen, const char *source, const char *sysroot_dir, unsigned int flags) { *buf = '\0'; - if (sysroot_dir == NULL) - sysroot_dir = pkgconf_tuple_find_global(client, "pc_sysrootdir"); + if (!(flags & PKGCONF_PKG_PROPF_UNINSTALLED) || (client->flags & PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES)) + { + if (sysroot_dir == NULL) + sysroot_dir = pkgconf_tuple_find_global(client, "pc_sysrootdir"); - if (sysroot_dir != NULL && pkgconf_fragment_should_munge(source, sysroot_dir)) - pkgconf_strlcat(buf, sysroot_dir, buflen); + if (sysroot_dir != NULL && pkgconf_fragment_should_munge(source, sysroot_dir)) + pkgconf_strlcat(buf, sysroot_dir, buflen); + } pkgconf_strlcat(buf, source, buflen); @@ -110,27 +113,28 @@ } static inline char * -pkgconf_fragment_copy_munged(const pkgconf_client_t *client, const char *source) +pkgconf_fragment_copy_munged(const pkgconf_client_t *client, const char *source, unsigned int flags) { char mungebufPKGCONF_ITEM_SIZE; - pkgconf_fragment_munge(client, mungebuf, sizeof mungebuf, source, client->sysroot_dir); + pkgconf_fragment_munge(client, mungebuf, sizeof mungebuf, source, client->sysroot_dir, flags); return strdup(mungebuf); } /* * !doc * - * .. c:function:: void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string) + * .. c:function:: void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string, unsigned int flags) * * Adds a `fragment` of text to a `fragment list`, possibly modifying the fragment if a sysroot is set. * * :param pkgconf_client_t* client: The pkgconf client being accessed. * :param pkgconf_list_t* list: The fragment list. * :param char* string: The string of text to add as a fragment to the fragment list. + * :param uint flags: Parsing-related flags for the package. * :return: nothing */ void -pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string) +pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string, unsigned int flags) { pkgconf_fragment_t *frag; @@ -142,7 +146,7 @@ frag = calloc(sizeof(pkgconf_fragment_t), 1); frag->type = *(string + 1); - frag->data = pkgconf_fragment_copy_munged(client, string + 2); + frag->data = pkgconf_fragment_copy_munged(client, string + 2, flags); PKGCONF_TRACE(client, "added fragment {%c, '%s'} to list @%p", frag->type, frag->data, list); } @@ -156,12 +160,12 @@ pkgconf_fragment_t *parent = list->tail->data; /* only attempt to merge 'special' fragments together */ - if (!parent->type && pkgconf_fragment_is_unmergeable(parent->data)) + if (!parent->type && parent->data != NULL && pkgconf_fragment_is_unmergeable(parent->data)) { size_t len; char *newdata; - pkgconf_fragment_munge(client, mungebuf, sizeof mungebuf, string, NULL); + pkgconf_fragment_munge(client, mungebuf, sizeof mungebuf, string, NULL, flags); len = strlen(parent->data) + strlen(mungebuf) + 2; newdata = malloc(len); @@ -527,7 +531,8 @@ free(quoted); } - *bptr++ = ' '; + if (node->next != NULL) + *bptr++ = ' '; } *bptr = '\0'; @@ -663,15 +668,16 @@ * :param pkgconf_client_t* client: The pkgconf client being accessed. * :param pkgconf_list_t* list: The `fragment list` to add the fragment entries to. * :param pkgconf_list_t* vars: A list of variables to use for variable substitution. + * :param uint flags: Any parsing flags to be aware of. * :param char* value: The string to parse into fragments. * :return: true on success, false on parse error */ bool -pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value) +pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value, unsigned int flags) { int i, ret, argc; char **argv; - char *repstr = pkgconf_tuple_parse(client, vars, value); + char *repstr = pkgconf_tuple_parse(client, vars, value, flags); PKGCONF_TRACE(client, "post-subst: %s -> %s", value, repstr); @@ -685,6 +691,8 @@ for (i = 0; i < argc; i++) { + PKGCONF_TRACE(client, "processing %s", argvi); + if (argvi == NULL) { PKGCONF_TRACE(client, "parsed fragment string is inconsistent: argc = %d while argv%d == NULL", argc, i); @@ -693,7 +701,7 @@ return false; } - pkgconf_fragment_add(client, list, argvi); + pkgconf_fragment_add(client, list, argvi, flags); } pkgconf_argv_free(argv);
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/iter.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/iter.h
Changed
@@ -35,6 +35,14 @@ #define PKGCONF_LIST_INITIALIZER { NULL, NULL, 0 } static inline void +pkgconf_list_zero(pkgconf_list_t *list) +{ + list->head = NULL; + list->tail = NULL; + list->length = 0; +} + +static inline void pkgconf_node_insert(pkgconf_node_t *node, void *data, pkgconf_list_t *list) { pkgconf_node_t *tnode;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/libpkgconf-api.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/libpkgconf-api.h
Changed
@@ -2,8 +2,7 @@ #define LIBPKGCONF_LIBPKGCONF_API_H /* Makefile.am specifies visibility using the libtool option -export-symbols-regex '^pkgconf_' - * Unfortunately, that is not available when building with cmake, so use attributes instead, - * in a way that doesn't depend on any cmake magic. + * Unfortunately, that is not available when building with meson, so use attributes instead. */ #if defined(PKGCONFIG_IS_STATIC) # define PKGCONF_API
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/libpkgconf.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/libpkgconf.h
Changed
@@ -20,6 +20,7 @@ #include <stdarg.h> #include <stddef.h> #include <stdbool.h> +#include <stdint.h> #include <libpkgconf/libpkgconf-api.h> #include <libpkgconf/iter.h> #include <libpkgconf/bsdstubs.h> @@ -78,8 +79,8 @@ #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 10905 +#define LIBPKGCONF_VERSION_STR "1.9.5" struct pkgconf_fragment_ { pkgconf_node_t iter; @@ -100,6 +101,9 @@ pkgconf_pkg_t *match; unsigned int flags; + + int refcount; + pkgconf_client_t *owner; }; struct pkgconf_tuple_ { @@ -107,8 +111,12 @@ char *key; char *value; + + unsigned int flags; }; +#define PKGCONF_PKG_TUPLEF_OVERRIDE 0x1 + struct pkgconf_path_ { pkgconf_node_t lnode; @@ -120,13 +128,10 @@ #define PKGCONF_PKG_PROPF_NONE 0x00 #define PKGCONF_PKG_PROPF_STATIC 0x01 #define PKGCONF_PKG_PROPF_CACHED 0x02 -#define PKGCONF_PKG_PROPF_SEEN 0x04 #define PKGCONF_PKG_PROPF_UNINSTALLED 0x08 #define PKGCONF_PKG_PROPF_VIRTUAL 0x10 struct pkgconf_pkg_ { - pkgconf_node_t cache_iter; - int refcount; char *id; char *filename; @@ -135,6 +140,9 @@ char *description; char *url; char *pc_filedir; + char *license; + char *maintainer; + char *copyright; pkgconf_list_t libs; pkgconf_list_t libs_private; @@ -157,16 +165,19 @@ */ pkgconf_tuple_t *orig_prefix; pkgconf_tuple_t *prefix; + + uint64_t serial; + + size_t hits; }; typedef bool (*pkgconf_pkg_iteration_func_t)(const pkgconf_pkg_t *pkg, void *data); typedef void (*pkgconf_pkg_traverse_func_t)(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *data); typedef bool (*pkgconf_queue_apply_func_t)(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int maxdepth); -typedef bool (*pkgconf_error_handler_func_t)(const char *msg, const pkgconf_client_t *client, const void *data); +typedef bool (*pkgconf_error_handler_func_t)(const char *msg, const pkgconf_client_t *client, void *data); struct pkgconf_client_ { pkgconf_list_t dir_list; - pkgconf_list_t pkg_cache; pkgconf_list_t filter_libdirs; pkgconf_list_t filter_includedirs; @@ -191,6 +202,11 @@ char *prefix_varname; bool already_sent_notice; + + uint64_t serial; + + pkgconf_pkg_t **cache_table; + size_t cache_count; }; struct pkgconf_cross_personality_ { @@ -233,7 +249,7 @@ PKGCONF_API pkgconf_cross_personality_t *pkgconf_cross_personality_find(const char *triplet); PKGCONF_API void pkgconf_cross_personality_deinit(pkgconf_cross_personality_t *personality); -#define PKGCONF_IS_MODULE_SEPARATOR(c) ((c) == ',' || isspace ((unsigned int)(c))) +#define PKGCONF_IS_MODULE_SEPARATOR(c) ((c) == ',' || isspace ((unsigned char)(c))) #define PKGCONF_IS_OPERATOR_CHAR(c) ((c) == '<' || (c) == '>' || (c) == '!' || (c) == '=') #define PKGCONF_PKG_PKGF_NONE 0x0000 @@ -253,8 +269,10 @@ #define PKGCONF_PKG_PKGF_DONT_FILTER_INTERNAL_CFLAGS 0x2000 #define PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS 0x4000 #define PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES 0x8000 +#define PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES 0x10000 #define PKGCONF_PKG_DEPF_INTERNAL 0x1 +#define PKGCONF_PKG_DEPF_PRIVATE 0x2 #define PKGCONF_PKG_ERRF_OK 0x0 #define PKGCONF_PKG_ERRF_PACKAGE_NOT_FOUND 0x1 @@ -282,17 +300,17 @@ PKGCONF_API bool pkgconf_error(const pkgconf_client_t *client, const char *format, ...) PRINTFLIKE(2, 3); PKGCONF_API bool pkgconf_warn(const pkgconf_client_t *client, const char *format, ...) PRINTFLIKE(2, 3); PKGCONF_API bool pkgconf_trace(const pkgconf_client_t *client, const char *filename, size_t lineno, const char *funcname, const char *format, ...) PRINTFLIKE(5, 6); -PKGCONF_API bool pkgconf_default_error_handler(const char *msg, const pkgconf_client_t *client, const void *data); +PKGCONF_API bool pkgconf_default_error_handler(const char *msg, const pkgconf_client_t *client, void *data); #ifndef PKGCONF_LITE #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define PKGCONF_TRACE(client, ...) do { \ pkgconf_trace(client, __FILE__, __LINE__, __PRETTY_FUNCTION__, __VA_ARGS__); \ - } while (0); + } while (0) #else #define PKGCONF_TRACE(client, ...) do { \ pkgconf_trace(client, __FILE__, __LINE__, __func__, __VA_ARGS__); \ - } while (0); + } while (0) #endif #else #define PKGCONF_TRACE(client, ...) @@ -315,12 +333,16 @@ PKGCONF_API pkgconf_pkg_t *pkgconf_scan_all(pkgconf_client_t *client, void *ptr, pkgconf_pkg_iteration_func_t func); /* parse.c */ -PKGCONF_API pkgconf_pkg_t *pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *path, FILE *f); -PKGCONF_API void pkgconf_dependency_parse_str(const pkgconf_client_t *client, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags); -PKGCONF_API void pkgconf_dependency_parse(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags); +PKGCONF_API pkgconf_pkg_t *pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *path, FILE *f, unsigned int flags); +PKGCONF_API void pkgconf_dependency_parse_str(pkgconf_client_t *client, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags); +PKGCONF_API void pkgconf_dependency_parse(pkgconf_client_t *client, pkgconf_pkg_t *pkg, pkgconf_list_t *deplist_head, const char *depends, unsigned int flags); PKGCONF_API void pkgconf_dependency_append(pkgconf_list_t *list, pkgconf_dependency_t *tail); PKGCONF_API void pkgconf_dependency_free(pkgconf_list_t *list); -PKGCONF_API pkgconf_dependency_t *pkgconf_dependency_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *package, const char *version, pkgconf_pkg_comparator_t compare, unsigned int flags); +PKGCONF_API void pkgconf_dependency_free_one(pkgconf_dependency_t *dep); +PKGCONF_API pkgconf_dependency_t *pkgconf_dependency_add(pkgconf_client_t *client, pkgconf_list_t *list, const char *package, const char *version, pkgconf_pkg_comparator_t compare, unsigned int flags); +PKGCONF_API pkgconf_dependency_t *pkgconf_dependency_ref(pkgconf_client_t *client, pkgconf_dependency_t *dep); +PKGCONF_API void pkgconf_dependency_unref(pkgconf_client_t *client, pkgconf_dependency_t *dep); +PKGCONF_API pkgconf_dependency_t *pkgconf_dependency_copy(pkgconf_client_t *client, const pkgconf_dependency_t *dep); /* argvsplit.c */ PKGCONF_API int pkgconf_argv_split(const char *src, int *argc, char ***argv); @@ -333,8 +355,8 @@ } pkgconf_fragment_render_ops_t; typedef bool (*pkgconf_fragment_filter_func_t)(const pkgconf_client_t *client, const pkgconf_fragment_t *frag, void *data); -PKGCONF_API bool pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value); -PKGCONF_API void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string); +PKGCONF_API bool pkgconf_fragment_parse(const pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_list_t *vars, const char *value, unsigned int flags); +PKGCONF_API void pkgconf_fragment_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *string, unsigned int flags); PKGCONF_API void pkgconf_fragment_copy(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_fragment_t *base, bool is_private); PKGCONF_API void pkgconf_fragment_copy_list(const pkgconf_client_t *client, pkgconf_list_t *list, const pkgconf_list_t *base); PKGCONF_API void pkgconf_fragment_delete(pkgconf_list_t *list, pkgconf_fragment_t *node); @@ -349,9 +371,9 @@ PKGCONF_API char *pkgconf_fgetline(char *line, size_t size, FILE *stream); /* tuple.c */ -PKGCONF_API pkgconf_tuple_t *pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *parent, const char *key, const char *value, bool parse); +PKGCONF_API pkgconf_tuple_t *pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *parent, const char *key, const char *value, bool parse, unsigned int flags); PKGCONF_API char *pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const char *key); -PKGCONF_API char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *list, const char *value); +PKGCONF_API char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *list, const char *value, unsigned int flags); PKGCONF_API void pkgconf_tuple_free(pkgconf_list_t *list); PKGCONF_API void pkgconf_tuple_free_entry(pkgconf_tuple_t *tuple, pkgconf_list_t *list); PKGCONF_API void pkgconf_tuple_add_global(pkgconf_client_t *client, const char *key, const char *value); @@ -362,9 +384,11 @@ /* queue.c */ PKGCONF_API void pkgconf_queue_push(pkgconf_list_t *list, const char *package); PKGCONF_API bool pkgconf_queue_compile(pkgconf_client_t *client, pkgconf_pkg_t *world, pkgconf_list_t *list); +PKGCONF_API bool pkgconf_queue_solve(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_pkg_t *world, int maxdepth); PKGCONF_API void pkgconf_queue_free(pkgconf_list_t *list); PKGCONF_API bool pkgconf_queue_apply(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_queue_apply_func_t func, int maxdepth, void *data); PKGCONF_API bool pkgconf_queue_validate(pkgconf_client_t *client, pkgconf_list_t *list, int maxdepth); +PKGCONF_API void pkgconf_solution_free(pkgconf_client_t *client, pkgconf_pkg_t *world); /* cache.c */ PKGCONF_API pkgconf_pkg_t *pkgconf_cache_lookup(pkgconf_client_t *client, const char *id);
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/parser.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/parser.c
Changed
@@ -44,14 +44,23 @@ lineno++; p = readbuf; - while (*p && (isalpha((unsigned int)*p) || isdigit((unsigned int)*p) || *p == '_' || *p == '.')) + while (*p && isspace((unsigned char)*p)) + p++; + if (*p && p != readbuf) + { + warnfunc(data, "%s:" SIZE_FMT_SPECIFIER ": warning: whitespace encountered while parsing key section\n", + filename, lineno); + warned_key_whitespace = true; + } + key = p; + while (*p && (isalpha((unsigned char)*p) || isdigit((unsigned char)*p) || *p == '_' || *p == '.')) p++; - key = readbuf; - if (!isalpha((unsigned int)*key) && !isdigit((unsigned int)*p)) + if (!isalpha((unsigned char)*key) && + !isdigit((unsigned char)*p)) continue; - while (*p && isspace((unsigned int)*p)) + while (*p && isspace((unsigned char)*p)) { if (!warned_key_whitespace) { @@ -72,12 +81,12 @@ p++; } - while (*p && isspace((unsigned int)*p)) + while (*p && isspace((unsigned char)*p)) p++; value = p; p = value + (strlen(value) - 1); - while (*p && isspace((unsigned int) *p) && p > value) + while (*p && isspace((unsigned char) *p) && p > value) { if (!warned_value_whitespace && op == '=') { @@ -89,7 +98,6 @@ *p = '\0'; p--; } - if (ops(unsigned char) op) ops(unsigned char) op(data, lineno, key, value); }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/path.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/path.c
Changed
@@ -268,6 +268,8 @@ free(pnode->path); free(pnode); } + + pkgconf_list_zero(dirlist); } static char *
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/personality.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/personality.c
Changed
@@ -17,11 +17,24 @@ #include <libpkgconf/stdinc.h> #include <libpkgconf/libpkgconf.h> +/* + * !doc + * + * libpkgconf `personality` module + * ========================= + */ + #ifdef _WIN32 # define strcasecmp _stricmp #endif -static bool default_personality_init = false; +/* + * Increment each time the default personality is inited, decrement each time + * it's deinited. Whenever it is 0, then the deinit frees the personality. In + * that case an additional call to init will create it anew. + */ +static unsigned default_personality_init = 0; + static pkgconf_cross_personality_t default_personality = { .name = "default", #ifdef _WIN32 @@ -85,30 +98,47 @@ * * Returns the default cross-compile personality. * + * Not thread safe. + * * :rtype: pkgconf_cross_personality_t* * :return: the default cross-compile personality */ pkgconf_cross_personality_t * pkgconf_cross_personality_default(void) { - if (default_personality_init) + if (default_personality_init) { + ++default_personality_init; return &default_personality; + } build_default_search_path(&default_personality.dir_list); pkgconf_path_split(SYSTEM_LIBDIR, &default_personality.filter_libdirs, false); pkgconf_path_split(SYSTEM_INCLUDEDIR, &default_personality.filter_includedirs, false); - default_personality_init = true; + ++default_personality_init; return &default_personality; } +/* + * !doc + * + * .. c:function:: void pkgconf_cross_personality_deinit(pkgconf_cross_personality_t *) + * + * Decrements the count of default cross personality instances. + * + * Not thread safe. + * + * :rtype: void + */ void pkgconf_cross_personality_deinit(pkgconf_cross_personality_t *personality) { - pkgconf_path_free(&personality->dir_list); - pkgconf_path_free(&personality->filter_libdirs); - pkgconf_path_free(&personality->filter_includedirs); + if (--default_personality_init == 0) { + pkgconf_path_free(&personality->dir_list); + pkgconf_path_free(&personality->filter_libdirs); + pkgconf_path_free(&personality->filter_includedirs); + } } #ifndef PKGCONF_LITE @@ -118,7 +148,7 @@ const char *c = triplet; for (; *c; c++) - if (!isalnum(*c) && *c != '-' && *c != '_') + if (!isalnum((unsigned char)*c) && *c != '-' && *c != '_') return false; return true;
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/pkg.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/pkg.c
Changed
@@ -37,6 +37,14 @@ #define PKG_CONFIG_EXT ".pc" +static unsigned int +pkgconf_pkg_traverse_main(pkgconf_client_t *client, + pkgconf_pkg_t *root, + pkgconf_pkg_traverse_func_t func, + void *data, + int maxdepth, + unsigned int skip_flags); + static inline bool str_has_suffix(const char *str, const char *suffix) { @@ -64,7 +72,7 @@ return strdup(buf); } -typedef void (*pkgconf_pkg_parser_keyword_func_t)(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value); +typedef void (*pkgconf_pkg_parser_keyword_func_t)(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value); typedef struct { const char *keyword; const pkgconf_pkg_parser_keyword_func_t func; @@ -78,17 +86,17 @@ } static void -pkgconf_pkg_parser_tuple_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +pkgconf_pkg_parser_tuple_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) { (void) keyword; (void) lineno; char **dest = (char **)((char *) pkg + offset); - *dest = pkgconf_tuple_parse(client, &pkg->vars, value); + *dest = pkgconf_tuple_parse(client, &pkg->vars, value, pkg->flags); } static void -pkgconf_pkg_parser_version_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +pkgconf_pkg_parser_version_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) { (void) keyword; (void) lineno; @@ -97,7 +105,7 @@ char **dest = (char **)((char *) pkg + offset); /* cut at any detected whitespace */ - p = pkgconf_tuple_parse(client, &pkg->vars, value); + p = pkgconf_tuple_parse(client, &pkg->vars, value, pkg->flags); len = strcspn(p, " \t"); if (len != strlen(p)) @@ -113,10 +121,10 @@ } static void -pkgconf_pkg_parser_fragment_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +pkgconf_pkg_parser_fragment_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) { pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset); - bool ret = pkgconf_fragment_parse(client, dest, &pkg->vars, value); + bool ret = pkgconf_fragment_parse(client, dest, &pkg->vars, value, pkg->flags); if (!ret) { @@ -126,7 +134,7 @@ } static void -pkgconf_pkg_parser_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +pkgconf_pkg_parser_dependency_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) { (void) keyword; (void) lineno; @@ -137,7 +145,7 @@ /* a variant of pkgconf_pkg_parser_dependency_func which colors the dependency node as an "internal" dependency. */ static void -pkgconf_pkg_parser_internal_dependency_func(const pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +pkgconf_pkg_parser_internal_dependency_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) { (void) keyword; (void) lineno; @@ -146,19 +154,34 @@ pkgconf_dependency_parse(client, pkg, dest, value, PKGCONF_PKG_DEPF_INTERNAL); } +/* a variant of pkgconf_pkg_parser_dependency_func which colors the dependency node as a "private" dependency. */ +static void +pkgconf_pkg_parser_private_dependency_func(pkgconf_client_t *client, pkgconf_pkg_t *pkg, const char *keyword, const size_t lineno, const ptrdiff_t offset, const char *value) +{ + (void) keyword; + (void) lineno; + + pkgconf_list_t *dest = (pkgconf_list_t *)((char *) pkg + offset); + pkgconf_dependency_parse(client, pkg, dest, value, PKGCONF_PKG_DEPF_PRIVATE); +} + /* keep this in alphabetical order */ static const pkgconf_pkg_parser_keyword_pair_t pkgconf_pkg_parser_keyword_funcs = { {"CFLAGS", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, cflags)}, {"CFLAGS.private", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, cflags_private)}, {"Conflicts", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, conflicts)}, + {"Copyright", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, copyright)}, {"Description", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, description)}, {"LIBS", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, libs)}, {"LIBS.private", pkgconf_pkg_parser_fragment_func, offsetof(pkgconf_pkg_t, libs_private)}, + {"License", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, license)}, + {"Maintainer", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, maintainer)}, {"Name", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, realname)}, {"Provides", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, provides)}, {"Requires", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, required)}, {"Requires.internal", pkgconf_pkg_parser_internal_dependency_func, offsetof(pkgconf_pkg_t, requires_private)}, - {"Requires.private", pkgconf_pkg_parser_dependency_func, offsetof(pkgconf_pkg_t, requires_private)}, + {"Requires.private", pkgconf_pkg_parser_private_dependency_func, offsetof(pkgconf_pkg_t, requires_private)}, + {"URL", pkgconf_pkg_parser_tuple_func, offsetof(pkgconf_pkg_t, url)}, {"Version", pkgconf_pkg_parser_version_func, offsetof(pkgconf_pkg_t, version)}, }; @@ -297,19 +320,17 @@ * which is broken when redefining the prefix. We try to outsmart the * file and rewrite any directory that starts with the same prefix. */ - if (strcmp(keyword, pkg->owner->prefix_varname) || !(pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX)) - { - pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true); - } - else if (pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX && pkg->orig_prefix + if (pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX && pkg->orig_prefix && is_path_prefix_equal(canonicalized_value, pkg->orig_prefix->value, strlen(pkg->orig_prefix->value))) { char newvaluePKGCONF_ITEM_SIZE; pkgconf_strlcpy(newvalue, pkg->prefix->value, sizeof newvalue); pkgconf_strlcat(newvalue, canonicalized_value + strlen(pkg->orig_prefix->value), sizeof newvalue); - pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, newvalue, false); + pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, newvalue, false, pkg->flags); } + else if (strcmp(keyword, pkg->owner->prefix_varname) || !(pkg->owner->flags & PKGCONF_PKG_PKGF_REDEFINE_PREFIX)) + pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true, pkg->flags); else { char pathbufPKGCONF_ITEM_SIZE; @@ -318,12 +339,12 @@ if (relvalue != NULL) { char *prefix_value = convert_path_to_value(relvalue); - pkg->orig_prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, "orig_prefix", canonicalized_value, true); - pkgconf_tuple_add_global(pkg->owner, keyword, prefix_value); + pkg->orig_prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, "orig_prefix", canonicalized_value, true, pkg->flags); + pkg->prefix = pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, prefix_value, false, pkg->flags); free(prefix_value); } else - pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true); + pkgconf_tuple_add(pkg->owner, &pkg->vars, keyword, value, true, pkg->flags); } } @@ -381,18 +402,19 @@ /* * !doc * - * .. c:function:: pkgconf_pkg_t *pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, FILE *f) + * .. c:function:: pkgconf_pkg_t *pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename, FILE *f, unsigned int flags) * * Parse a .pc file into a pkgconf_pkg_t object structure. * * :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. * :param char* filename: The filename of the package file (including full path). * :param FILE* f: The file object to read from. + * :param uint flags: The flags to use when parsing. * :returns: A ``pkgconf_pkg_t`` object which contains the package data. * :rtype: pkgconf_pkg_t * */ pkgconf_pkg_t * -pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *f) +pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE *f, unsigned int flags) { pkgconf_pkg_t *pkg; char *idptr; @@ -401,20 +423,18 @@ pkg->owner = client; pkg->filename = strdup(filename); pkg->pc_filedir = pkg_get_parent_dir(pkg); + pkg->flags = flags; char *pc_filedir_value = convert_path_to_value(pkg->pc_filedir); - pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pc_filedir_value, true); + pkgconf_tuple_add(client, &pkg->vars, "pcfiledir", pc_filedir_value, true, pkg->flags); free(pc_filedir_value); - /* If pc_filedir is outside of sysroot_dir, clear pc_filedir + /* If pc_filedir is outside of sysroot_dir, override sysroot_dir for this + * package. * See https://github.com/pkgconf/pkgconf/issues/213 */ if (client->sysroot_dir && strncmp(pkg->pc_filedir, client->sysroot_dir, strlen(client->sysroot_dir)))
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/queue.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/queue.c
Changed
@@ -51,7 +51,7 @@ pkgconf_queue_t *pkgq = calloc(sizeof(pkgconf_queue_t), 1); pkgq->package = strdup(package); - pkgconf_node_insert_tail(&pkgq->iter, pkgq, list); + pkgconf_node_insert(&pkgq->iter, pkgq, list); } /* @@ -107,13 +107,199 @@ } } +static void +pkgconf_queue_collect_dependents(pkgconf_client_t *client, pkgconf_pkg_t *pkg, void *data) +{ + pkgconf_node_t *node; + pkgconf_pkg_t *world = data; + + if (pkg == world) + return; + + PKGCONF_FOREACH_LIST_ENTRY(pkg->required.head, node) + { + pkgconf_dependency_t *flattened_dep; + + flattened_dep = pkgconf_dependency_copy(client, node->data); + + pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->required); + } + + if (client->flags & PKGCONF_PKG_PKGF_SEARCH_PRIVATE) + { + PKGCONF_FOREACH_LIST_ENTRY(pkg->requires_private.head, node) + { + pkgconf_dependency_t *flattened_dep; + + flattened_dep = pkgconf_dependency_copy(client, node->data); + + pkgconf_node_insert(&flattened_dep->iter, flattened_dep, &world->requires_private); + } + } +} + +static int +dep_sort_cmp(const void *a, const void *b) +{ + const pkgconf_dependency_t *depA = *(void **) a; + const pkgconf_dependency_t *depB = *(void **) b; + + return depB->match->hits - depA->match->hits; +} + +static inline void +flatten_dependency_set(pkgconf_client_t *client, pkgconf_list_t *list) +{ + pkgconf_node_t *node, *next; + pkgconf_dependency_t **deps = NULL; + size_t dep_count = 0, i; + + PKGCONF_FOREACH_LIST_ENTRY_SAFE(list->head, next, node) + { + pkgconf_dependency_t *dep = node->data; + pkgconf_pkg_t *pkg = pkgconf_pkg_verify_dependency(client, dep, NULL); + + if (pkg == NULL) + continue; + + if (pkg->serial == client->serial) + { + pkgconf_node_delete(node, list); + pkgconf_dependency_unref(client, dep); + goto next; + } + + if (dep->match == NULL) + { + PKGCONF_TRACE(client, "WTF: unmatched dependency %p <%s>", dep, dep->package); + abort(); + } + + /* for virtuals, we need to check to see if there are dupes */ + for (i = 0; i < dep_count; i++) + { + pkgconf_dependency_t *other_dep = depsi; + + PKGCONF_TRACE(client, "dedup %s = %s?", dep->package, other_dep->package); + + if (!strcmp(dep->package, other_dep->package)) + { + PKGCONF_TRACE(client, "skipping, "SIZE_FMT_SPECIFIER" deps", dep_count); + goto next; + } + } + + pkg->serial = client->serial; + + /* copy to the deps table */ + dep_count++; + deps = pkgconf_reallocarray(deps, dep_count, sizeof (void *)); + depsdep_count - 1 = dep; + + PKGCONF_TRACE(client, "added %s to dep table", dep->package); +next: + pkgconf_pkg_unref(client, pkg); + } + + if (deps == NULL) + return; + + qsort(deps, dep_count, sizeof (void *), dep_sort_cmp); + + /* zero the list and start readding */ + pkgconf_list_zero(list); + + for (i = 0; i < dep_count; i++) + { + pkgconf_dependency_t *dep = depsi; + + if (dep->match == NULL) + continue; + + memset(&dep->iter, '\0', sizeof (dep->iter)); + pkgconf_node_insert(&dep->iter, dep, list); + + PKGCONF_TRACE(client, "slot "SIZE_FMT_SPECIFIER": dep %s matched to %p<%s> hits "SIZE_FMT_SPECIFIER, i, dep->package, dep->match, dep->match->id, dep->match->hits); + } + + free(deps); +} + static inline unsigned int pkgconf_queue_verify(pkgconf_client_t *client, pkgconf_pkg_t *world, pkgconf_list_t *list, int maxdepth) { + unsigned int result; + if (!pkgconf_queue_compile(client, world, list)) return PKGCONF_PKG_ERRF_DEPGRAPH_BREAK; - return pkgconf_pkg_verify_graph(client, world, maxdepth); + /* collect all the dependencies */ + result = pkgconf_pkg_traverse(client, world, pkgconf_queue_collect_dependents, world, maxdepth, 0); + if (result != PKGCONF_PKG_ERRF_OK) + return result; + + /* flatten the dependency set using serials. + * we copy the dependencies to a vector, and then erase the list. + * then we copy them back to the list. + */ + ++client->serial; + + PKGCONF_TRACE(client, "flattening requires deps"); + flatten_dependency_set(client, &world->required); + + ++client->serial; + + PKGCONF_TRACE(client, "flattening requires.private deps"); + flatten_dependency_set(client, &world->requires_private); + + return PKGCONF_PKG_ERRF_OK; +} + +/* + * !doc + * + * .. c:function:: void pkgconf_solution_free(pkgconf_client_t *client, pkgconf_pkg_t *world, int maxdepth) + * + * Removes references to package nodes contained in a solution. + * + * :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. + * :param pkgconf_pkg_t* world: The root for the generated dependency graph. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. + * :returns: nothing + */ +void +pkgconf_solution_free(pkgconf_client_t *client, pkgconf_pkg_t *world) +{ + (void) client; + + if (world->flags & PKGCONF_PKG_PROPF_VIRTUAL) + { + pkgconf_dependency_free(&world->required); + pkgconf_dependency_free(&world->requires_private); + } +} + +/* + * !doc + * + * .. c:function:: bool pkgconf_queue_solve(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_pkg_t *world, int maxdepth) + * + * Solves and flattens the dependency graph for the supplied dependency list. + * + * :param pkgconf_client_t* client: The pkgconf client object to use for dependency resolution. + * :param pkgconf_list_t* list: The list of dependency requests to consider. + * :param pkgconf_pkg_t* world: The root for the generated dependency graph, provided by the caller. Should have PKGCONF_PKG_PROPF_VIRTUAL flag. + * :param int maxdepth: The maximum allowed depth for the dependency resolver. A depth of -1 means unlimited. + * :returns: true if the dependency resolver found a solution, otherwise false. + * :rtype: bool + */ +bool
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/stdinc.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/stdinc.h
Changed
@@ -59,6 +59,7 @@ # include <dirent.h> # include <unistd.h> # include <limits.h> +# include <strings.h> # ifdef PATH_MAX # define PKGCONF_ITEM_SIZE (PATH_MAX + 1024) # else
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/tuple.c -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/tuple.c
Changed
@@ -45,7 +45,23 @@ void pkgconf_tuple_add_global(pkgconf_client_t *client, const char *key, const char *value) { - pkgconf_tuple_add(client, &client->global_vars, key, value, false); + pkgconf_tuple_add(client, &client->global_vars, key, value, false, 0); +} + +static pkgconf_tuple_t * +lookup_global_tuple(const pkgconf_client_t *client, const char *key) +{ + pkgconf_node_t *node; + + PKGCONF_FOREACH_LIST_ENTRY(client->global_vars.head, node) + { + pkgconf_tuple_t *tuple = node->data; + + if (!strcmp(tuple->key, key)) + return tuple; + } + + return NULL; } /* @@ -63,17 +79,13 @@ char * pkgconf_tuple_find_global(const pkgconf_client_t *client, const char *key) { - pkgconf_node_t *node; + pkgconf_tuple_t *tuple; - PKGCONF_FOREACH_LIST_ENTRY(client->global_vars.head, node) - { - pkgconf_tuple_t *tuple = node->data; + tuple = lookup_global_tuple(client, key); + if (tuple == NULL) + return NULL; - if (!strcmp(tuple->key, key)) - return tuple->value; - } - - return NULL; + return tuple->value; } /* @@ -108,13 +120,18 @@ { char *workbuf = strdup(kv); char *value; + pkgconf_tuple_t *tuple; value = strchr(workbuf, '='); if (value == NULL) goto out; *value++ = '\0'; - pkgconf_tuple_add_global(client, workbuf, value); + + tuple = pkgconf_tuple_add(client, &client->global_vars, workbuf, value, false, 0); + if (tuple != NULL) + tuple->flags = PKGCONF_PKG_TUPLEF_OVERRIDE; + out: free(workbuf); } @@ -161,6 +178,45 @@ return buf; } +static const char * +find_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars) +{ + const char *sysroot_dir; + + sysroot_dir = pkgconf_tuple_find(client, vars, "pc_sysrootdir"); + if (sysroot_dir == NULL) + sysroot_dir = client->sysroot_dir; + + return sysroot_dir; +} + +static bool +should_rewrite_sysroot(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *buf, unsigned int flags) +{ + const char *sysroot_dir; + + if (flags & PKGCONF_PKG_PROPF_UNINSTALLED && !(client->flags & PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES)) + return false; + + sysroot_dir = find_sysroot(client, vars); + if (sysroot_dir == NULL) + return false; + + if (*buf != '/') + return false; + + if (!strcmp(sysroot_dir, "/")) + return false; + + if (strlen(buf) <= strlen(sysroot_dir)) + return false; + + if (strstr(buf + strlen(sysroot_dir), sysroot_dir) == NULL) + return false; + + return true; +} + /* * !doc * @@ -177,7 +233,7 @@ * :rtype: pkgconf_tuple_t * */ pkgconf_tuple_t * -pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *key, const char *value, bool parse) +pkgconf_tuple_add(const pkgconf_client_t *client, pkgconf_list_t *list, const char *key, const char *value, bool parse, unsigned int flags) { char *dequote_value; pkgconf_tuple_t *tuple = calloc(sizeof(pkgconf_tuple_t), 1); @@ -186,14 +242,14 @@ dequote_value = dequote(value); - PKGCONF_TRACE(client, "adding tuple to @%p: %s => %s (parsed? %d)", list, key, dequote_value, parse); - tuple->key = strdup(key); if (parse) - tuple->value = pkgconf_tuple_parse(client, list, dequote_value); + tuple->value = pkgconf_tuple_parse(client, list, dequote_value, flags); else tuple->value = strdup(dequote_value); + PKGCONF_TRACE(client, "adding tuple to @%p: %s => %s (parsed? %d)", list, key, tuple->value, parse); + pkgconf_node_insert(&tuple->iter, tuple, list); free(dequote_value); @@ -218,10 +274,11 @@ pkgconf_tuple_find(const pkgconf_client_t *client, pkgconf_list_t *list, const char *key) { pkgconf_node_t *node; - char *res; + pkgconf_tuple_t *global_tuple; - if ((res = pkgconf_tuple_find_global(client, key)) != NULL) - return res; + global_tuple = lookup_global_tuple(client, key); + if (global_tuple != NULL && global_tuple->flags & PKGCONF_PKG_TUPLEF_OVERRIDE) + return global_tuple->value; PKGCONF_FOREACH_LIST_ENTRY(list->head, node) { @@ -231,30 +288,35 @@ return tuple->value; } + if (global_tuple != NULL) + return global_tuple->value; + return NULL; } /* * !doc * - * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) + * .. c:function:: char *pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags) * * Parse an expression for variable substitution. * * :param pkgconf_client_t* client: The pkgconf client object to access. * :param pkgconf_list_t* list: The variable list to search for variables (along side the global variable list). * :param char* value: The ``key=value`` string to parse. + * :param uint flags: Any flags to consider while parsing. * :return: the variable data with any variables substituted * :rtype: char * */ char * -pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value) +pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const char *value, unsigned int flags) { char bufPKGCONF_BUFSIZE; const char *ptr; char *bptr = buf; - if (!(client->flags & PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES)) + if (!(client->flags & PKGCONF_PKG_PKGF_FDO_SYSROOT_RULES) && + (!(flags & PKGCONF_PKG_PROPF_UNINSTALLED) || (client->flags & PKGCONF_PKG_PKGF_PKGCONF1_SYSROOT_RULES))) { if (*value == '/' && client->sysroot_dir != NULL && strncmp(value, client->sysroot_dir, strlen(client->sysroot_dir))) bptr += pkgconf_strlcpy(buf, client->sysroot_dir, sizeof buf); @@ -293,12 +355,23 @@ } } + PKGCONF_TRACE(client, "lookup tuple %s", varname);
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/libpkgconf/win-dirent.h -> _service:tar_scm:pkgconf-1.9.5.tar.xz/libpkgconf/win-dirent.h
Changed
@@ -1,21 +1,29 @@ /* * Dirent interface for Microsoft Visual Studio - * Version 1.21 * - * Copyright (C) 2006-2012 Toni Ronkko + * Copyright (C) 1998-2019 Toni Ronkko * This file is part of dirent. Dirent may be freely distributed * under the MIT license. For all details and documentation, see * https://github.com/tronkko/dirent */ -#ifndef LIBPKGCONF_DIRENT_H -#define LIBPKGCONF_DIRENT_H +#ifndef DIRENT_H +#define DIRENT_H + +/* Hide warnings about unreferenced local functions */ +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wunused-function" +#elif defined(_MSC_VER) +# pragma warning(disable:4505) +#elif defined(__GNUC__) +# pragma GCC diagnostic ignored "-Wunused-function" +#endif /* * Include windows.h without Windows Sockets 1.1 to prevent conflicts with * Windows Sockets 2.0. */ #ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN #endif #include <windows.h> @@ -28,6 +36,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <errno.h> +#include <ctype.h> /* Indicates that d_type field is available in dirent structure */ #define _DIRENT_HAVE_D_TYPE @@ -37,123 +46,123 @@ /* Entries missing from MSVC 6.0 */ #if !defined(FILE_ATTRIBUTE_DEVICE) -# define FILE_ATTRIBUTE_DEVICE 0x40 +# define FILE_ATTRIBUTE_DEVICE 0x40 #endif /* File type and permission flags for stat(), general mask */ #if !defined(S_IFMT) -# define S_IFMT _S_IFMT +# define S_IFMT _S_IFMT #endif /* Directory bit */ #if !defined(S_IFDIR) -# define S_IFDIR _S_IFDIR +# define S_IFDIR _S_IFDIR #endif /* Character device bit */ #if !defined(S_IFCHR) -# define S_IFCHR _S_IFCHR +# define S_IFCHR _S_IFCHR #endif /* Pipe bit */ #if !defined(S_IFFIFO) -# define S_IFFIFO _S_IFFIFO +# define S_IFFIFO _S_IFFIFO #endif /* Regular file bit */ #if !defined(S_IFREG) -# define S_IFREG _S_IFREG +# define S_IFREG _S_IFREG #endif /* Read permission */ #if !defined(S_IREAD) -# define S_IREAD _S_IREAD +# define S_IREAD _S_IREAD #endif /* Write permission */ #if !defined(S_IWRITE) -# define S_IWRITE _S_IWRITE +# define S_IWRITE _S_IWRITE #endif /* Execute permission */ #if !defined(S_IEXEC) -# define S_IEXEC _S_IEXEC +# define S_IEXEC _S_IEXEC #endif /* Pipe */ #if !defined(S_IFIFO) -# define S_IFIFO _S_IFIFO +# define S_IFIFO _S_IFIFO #endif /* Block device */ #if !defined(S_IFBLK) -# define S_IFBLK 0 +# define S_IFBLK 0 #endif /* Link */ #if !defined(S_IFLNK) -# define S_IFLNK 0 +# define S_IFLNK 0 #endif /* Socket */ #if !defined(S_IFSOCK) -# define S_IFSOCK 0 +# define S_IFSOCK 0 #endif /* Read user permission */ #if !defined(S_IRUSR) -# define S_IRUSR S_IREAD +# define S_IRUSR S_IREAD #endif /* Write user permission */ #if !defined(S_IWUSR) -# define S_IWUSR S_IWRITE +# define S_IWUSR S_IWRITE #endif /* Execute user permission */ #if !defined(S_IXUSR) -# define S_IXUSR 0 +# define S_IXUSR 0 #endif /* Read group permission */ #if !defined(S_IRGRP) -# define S_IRGRP 0 +# define S_IRGRP 0 #endif /* Write group permission */ #if !defined(S_IWGRP) -# define S_IWGRP 0 +# define S_IWGRP 0 #endif /* Execute group permission */ #if !defined(S_IXGRP) -# define S_IXGRP 0 +# define S_IXGRP 0 #endif /* Read others permission */ #if !defined(S_IROTH) -# define S_IROTH 0 +# define S_IROTH 0 #endif /* Write others permission */ #if !defined(S_IWOTH) -# define S_IWOTH 0 +# define S_IWOTH 0 #endif /* Execute others permission */ #if !defined(S_IXOTH) -# define S_IXOTH 0 +# define S_IXOTH 0 #endif /* Maximum length of file name */ #if !defined(PATH_MAX) -# define PATH_MAX MAX_PATH +# define PATH_MAX MAX_PATH #endif #if !defined(FILENAME_MAX) -# define FILENAME_MAX MAX_PATH +# define FILENAME_MAX MAX_PATH #endif #if !defined(NAME_MAX) -# define NAME_MAX FILENAME_MAX +# define NAME_MAX FILENAME_MAX #endif /* File type flags for d_type */ @@ -177,32 +186,32 @@ * on Windows. */ #if !defined(S_ISFIFO) -# define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) +# define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) #endif #if !defined(S_ISDIR)
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/ltmain.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/ltmain.sh
Changed
@@ -1,12 +1,12 @@ -#! /bin/sh +#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2014-01-03.01 +## by inline-source v2019-02-19.15 -# libtool (GNU libtool) 2.4.6 +# libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 -# Copyright (C) 1996-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.6 -package_revision=2.4.6 +VERSION=2.4.7 +package_revision=2.4.7 ## ------ ## @@ -64,34 +64,25 @@ # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2015-01-20.17; # UTC +scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# Copyright (C) 2004-2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. - -# As a special exception to the GNU General Public License, if you distribute -# this file as part of a program or library that is built using GNU Libtool, -# you may include this file under the same distribution terms that you use -# for the rest of that program. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# This is free software. There is NO warranty; not even for +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Copyright (C) 2004-2019, 2021 Bootstrap Authors +# +# This file is dual licensed under the terms of the MIT license +# <https://opensource.org/license/MIT>, and GPL version 2 or later +# <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of +# these licenses when using or redistributing this software or any of +# the files within it. See the URLs above, or the file `LICENSE` +# included in the Bootstrap distribution for the full license texts. -# Please report bugs or propose patches to gary@gnu.org. +# Please report bugs or propose patches to: +# <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## @@ -139,9 +130,12 @@ _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# These NLS vars are set unconditionally (bootstrap issue #24). Unset those +# in case the environment reset is needed later and the $save_* variant is not +# defined (see the code above). +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' @@ -159,6 +153,26 @@ fi +# func_unset VAR +# -------------- +# Portably unset VAR. +# In some shells, an 'unset VAR' statement leaves a non-zero return +# status if VAR is already unset, which might be problematic if the +# statement is used at the end of a function (thus poisoning its return +# value) or when 'set -e' is active (causing even a spurious abort of +# the script in this case). +func_unset () +{ + { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } +} + + +# Make sure CDPATH doesn't cause `cd` commands to output the target dir. +func_unset CDPATH + +# Make sure ${,E,F}GREP behave sanely. +func_unset GREP_OPTIONS + ## ------------------------- ## ## Locate command utilities. ## @@ -259,7 +273,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin + func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } @@ -295,7 +309,7 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin + func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } @@ -360,6 +374,35 @@ s/\\(^$_G_bs\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" +# require_check_ifs_backslash +# --------------------------- +# Check if we can use backslash as IFS='\' separator, and set +# $check_ifs_backshlash_broken to ':' or 'false'. +require_check_ifs_backslash=func_require_check_ifs_backslash +func_require_check_ifs_backslash () +{ + _G_save_IFS=$IFS + IFS='\' + _G_check_ifs_backshlash='a\\b' + for _G_i in $_G_check_ifs_backshlash + do + case $_G_i in + a) + check_ifs_backshlash_broken=false + ;; + '') + break + ;; + *) + check_ifs_backshlash_broken=: + break + ;; + esac + done + IFS=$_G_save_IFS + require_check_ifs_backslash=: +} + ## ----------------- ## ## Global variables. ## @@ -580,16 +623,16 @@ { $debug_cmd - func_quote_for_eval "$2" - eval "$1+=\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd - func_quote_for_eval "$2" - eval "$1=\$$1\\ \$func_quote_for_eval_result" + func_quote_arg pretty "$2" + eval "$1=\$$1\\ \$func_quote_arg_result" } fi @@ -1091,85 +1134,203 @@ } -# func_quote_for_eval ARG...
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/m4/libtool.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/m4/libtool.m4
Changed
@@ -1,6 +1,7 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ) -# serial 58 LT_INIT +# serial 59 LT_INIT # LT_PREREQ(VERSION) @@ -181,6 +182,7 @@ m4_require(_LT_CHECK_SHELL_FEATURES)dnl m4_require(_LT_PATH_CONVERSION_FUNCTIONS)dnl m4_require(_LT_CMD_RELOAD)dnl +m4_require(_LT_DECL_FILECMD)dnl m4_require(_LT_CHECK_MAGIC_METHOD)dnl m4_require(_LT_CHECK_SHAREDLIB_FROM_LINKLIB)dnl m4_require(_LT_CMD_OLD_ARCHIVE)dnl @@ -219,8 +221,8 @@ ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, -# which needs '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC and +# ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -778,7 +780,7 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ + $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1042,8 +1044,8 @@ _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1067,17 +1069,12 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin91*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.012,.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) + case $MACOSX_DEPLOYMENT_TARGET,$host in + 10.012,*|,*powerpc*-darwin5-8*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + *) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1126,12 +1123,12 @@ output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if($1, CXX, if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ,) else @@ -1245,7 +1242,8 @@ # _LT_WITH_SYSROOT # ---------------- AC_DEFUN(_LT_WITH_SYSROOT, -AC_MSG_CHECKING(for sysroot) +m4_require(_LT_DECL_SED)dnl +AC_MSG_CHECKING(for sysroot) AC_ARG_WITH(sysroot, AS_HELP_STRING(--with-sysroot@<:@=DIR@:>@, Search for dependent libraries within DIR (or the compiler's sysroot @@ -1262,7 +1260,7 @@ fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1292,7 +1290,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1309,7 +1307,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1321,7 +1319,7 @@ ;; esac else - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1343,7 +1341,7 @@ echo '#line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1351,7 +1349,7 @@ emul="${emul}64" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1359,7 +1357,7 @@ emul="${emul}ltsmip" ;; esac - case `/usr/bin/file conftest.$ac_objext` in + case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1379,14 +1377,14 @@ # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1454,7 +1452,7 @@ # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in + case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1493,9 +1491,22 @@ m4_defun(_LT_PROG_AR, AC_CHECK_TOOLS(AR, ar, false) : ${AR=ar}
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/m4/ltoptions.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/m4/ltoptions.m4
Changed
@@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/m4/ltsugar.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/m4/ltsugar.m4
Changed
@@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 #
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/m4/ltversion.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/m4/ltversion.m4
Changed
@@ -1,6 +1,7 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, +# Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -9,15 +10,15 @@ # @configure_input@ -# serial 4179 ltversion.m4 +# serial 4245 ltversion.m4 # This file is part of GNU Libtool -m4_define(LT_PACKAGE_VERSION, 2.4.6) -m4_define(LT_PACKAGE_REVISION, 2.4.6) +m4_define(LT_PACKAGE_VERSION, 2.4.7) +m4_define(LT_PACKAGE_REVISION, 2.4.7) AC_DEFUN(LTVERSION_VERSION, -macro_version='2.4.6' -macro_revision='2.4.6' +macro_version='2.4.7' +macro_revision='2.4.7' _LT_DECL(, macro_version, 0, Which release of libtool.m4 was used?) _LT_DECL(, macro_revision, 0) )
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/m4/lt~obsolete.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/m4/lt~obsolete.m4
Changed
@@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software -# Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free +# Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/man/pc.5 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/man/pc.5
Changed
@@ -99,6 +99,9 @@ .It Cflags.private Required compiler flags for static compilation. (optional; fragment list; pkgconf extension) +.It Copyright +A copyright attestation statement. +(optional; literal; pkgconf extension) .It Libs Required linking flags for this package. Libraries this package depends on for linking against it, which are not @@ -110,6 +113,13 @@ Libraries this package depends on for linking against it statically, which are not described as dependencies should be specified here. (optional; fragment list) +.It License +The asserted SPDX license tag that should be applied to the given package. +(optional; literal; pkgconf extension) +.It Maintainer +The preferred contact for the maintainer. This should be in the format of a +name followed by an e-mail address or website. +(optional; literal; pkgconf extension) .It Requires Required dependencies that must be met for the package to be usable. All dependencies must be satisfied or the pkg-config implementation must not use @@ -151,6 +161,9 @@ Name: libfoo # human-readable name Description: an example library called libfoo # human-readable description +Copyright: Copyright (c) 2022 pkgconf project authors +License: Apache-2.0 +Maintainer: the pkgconf project <http://www.pkgconf.org> Version: 1.0 URL: http://www.pkgconf.org Requires: libbar > 2.0.0
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/man/pkgconf-personality.5 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/man/pkgconf-personality.5
Changed
@@ -36,7 +36,7 @@ by a colon (:) and then the value the property should be set to. Variable substitution is always performed regardless of property type. .Pp -There are two types of property: +There are three types of property: .\" .Bl -tag -width indent .\"
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/meson.build -> _service:tar_scm:pkgconf-1.9.5.tar.xz/meson.build
Changed
@@ -1,23 +1,41 @@ project('pkgconf', 'c', - version : '1.8.0', + version : '1.9.5', license : 'ISC', - meson_version : '>=0.47') - + meson_version : '>=0.49', + default_options : 'c_std=c99', +) cc = meson.get_compiler('c') +add_project_arguments( + '-D_BSD_SOURCE', + '-D_DEFAULT_SOURCE', + cc.get_supported_arguments( + '-Wimplicit-function-declaration', + '-Wmisleading-indentation', + ), + language : 'c', +) cdata = configuration_data() check_functions = - 'HAVE_STRLCAT', 'strlcat', 'string.h', - 'HAVE_STRLCPY', 'strlcpy', 'string.h', - 'HAVE_STRNDUP', 'strndup', 'string.h', + 'strlcat', 'string.h', + 'strlcpy', 'string.h', + 'strndup', 'string.h', + 'strdup', 'string.h', + 'strncasecmp', 'strings.h', + 'strcasecmp', 'strings.h', + 'reallocarray', 'stdlib.h', 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)) - cdata.set(f.get(0), 1) + name = f0.to_upper().underscorify() + if cc.has_function(f0, prefix : '#define _BSD_SOURCE\n#include <@0@>'.format(f1)) and cc.has_header_symbol(f1, f0, prefix : '#define _BSD_SOURCE') + cdata.set('HAVE_@0@'.format(name), 1) + cdata.set('HAVE_DECL_@0@'.format(name), 1) + else + cdata.set('HAVE_DECL_@0@'.format(name), 0) endif endforeach @@ -38,8 +56,8 @@ cdata.set_quoted('PACKAGE_NAME', meson.project_name()) cdata.set_quoted('PACKAGE_VERSION', meson.project_version()) cdata.set_quoted('PACKAGE_BUGREPORT', 'https://todo.sr.ht/~kaniini/pkgconf') -cdata.set('abs_top_srcdir', meson.source_root()) -cdata.set('abs_top_builddir', meson.build_root()) +cdata.set('abs_top_srcdir', meson.current_source_dir()) +cdata.set('abs_top_builddir', meson.current_build_dir()) subdir('libpkgconf') @@ -68,10 +86,22 @@ 'libpkgconf/tuple.c', c_args: '-DLIBPKGCONF_EXPORT', build_static, install : true, - version : '3.0.0', - soversion : '3', + version : '4.0.0', + soversion : '4', +) + +# For other projects using libpkgconfig as a subproject +dep_libpkgconf = declare_dependency( + link_with : libpkgconf, + include_directories : include_directories('.'), ) +# If we have a new enough meson override the dependency so that only +# `dependency('libpkgconf')` is required from the consumer +if meson.version().version_compare('>= 0.54.0') + meson.override_dependency('libpkgconf', dep_libpkgconf) +endif + pkg = import('pkgconfig') pkg.generate(libpkgconf, name : 'libpkgconf', @@ -91,15 +121,12 @@ c_args: build_static, install : true) -if get_option('tests') - kyua_exe = find_program('kyua') - atf_sh_exe = find_program('atf-sh') - test('kyua', kyua_exe, args : '--config=none', 'test', '--kyuafile=' + join_paths(meson.build_root(), 'Kyuafile'), '--build-root=' + meson.build_root()) - - - configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata) - subdir('tests') -endif +with_tests = get_option('tests') +kyua_exe = find_program('kyua', required : with_tests, disabler : true) +atf_sh_exe = find_program('atf-sh', required : with_tests, disabler : true) +kyuafile = configure_file(input : 'Kyuafile.in', output : 'Kyuafile', configuration : cdata) +test('kyua', kyua_exe, args : '--config=none', 'test', '--kyuafile', kyuafile, '--build-root', meson.current_build_dir()) +subdir('tests') install_man('man/pkgconf.1') install_man('man/pkg.m4.7') @@ -107,4 +134,4 @@ install_man('man/pkgconf-personality.5') install_data('pkg.m4', install_dir: 'share/aclocal') install_data('AUTHORS', install_dir: 'share/doc/pkgconf') -install_data('README.md', install_dir: 'share/doc/pkgconf') \ No newline at end of file +install_data('README.md', install_dir: 'share/doc/pkgconf')
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/meson_options.txt -> _service:tar_scm:pkgconf-1.9.5.tar.xz/meson_options.txt
Changed
@@ -1,3 +1,5 @@ -option('tests', type: 'boolean', value: true, - description: 'Build tests which depends upon the kyua framework' -) \ No newline at end of file +option( + 'tests', + type: 'feature', + description: 'Build tests which depends upon the kyua framework', +)
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/missing -> _service:tar_scm:pkgconf-1.9.5.tar.xz/missing
Changed
@@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/pkg.m4 -> _service:tar_scm:pkgconf-1.9.5.tar.xz/pkg.m4
Changed
@@ -1,5 +1,5 @@ -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 11 (pkg-config-0.29.1) +# pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> @@ -41,7 +41,7 @@ dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun(PKG_PREREQ, -m4_define(PKG_MACROS_VERSION, 0.29.1) +m4_define(PKG_MACROS_VERSION, 0.29.2) m4_if(m4_version_compare(PKG_MACROS_VERSION, $1), -1, m4_fatal(pkg.m4 version $1 or higher is required but PKG_MACROS_VERSION found)) )dnl PKG_PREREQ @@ -86,7 +86,7 @@ dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE(PKG_PROG_PKG_CONFIG) -dnl only at the first occurence in configure.ac, so if the first place +dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN(PKG_CHECK_EXISTS, @@ -142,7 +142,7 @@ AC_ARG_VAR($1_LIBS, linker flags for $1, overriding pkg-config)dnl pkg_failed=no -AC_MSG_CHECKING(for $1) +AC_MSG_CHECKING(for $2) _PKG_CONFIG($1_CFLAGS, cflags, $2) _PKG_CONFIG($1_LIBS, libs, $2) @@ -152,17 +152,17 @@ See the pkg-config man page for more details.) if test $pkg_failed = yes; then - AC_MSG_RESULT(no) + AC_MSG_RESULT(no) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else - $1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + $1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi - # Put the nasty error message in config.log where it belongs - echo "$$1_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + # Put the nasty error message in config.log where it belongs + echo "$$1_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - m4_default($4, AC_MSG_ERROR( + m4_default($4, AC_MSG_ERROR( Package requirements ($2) were not met: $$1_PKG_ERRORS @@ -173,8 +173,8 @@ _PKG_TEXT)dnl ) elif test $pkg_failed = untried; then - AC_MSG_RESULT(no) - m4_default($4, AC_MSG_FAILURE( + AC_MSG_RESULT(no) + m4_default($4, AC_MSG_FAILURE( The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -184,10 +184,10 @@ To get pkg-config, see <http://pkg-config.freedesktop.org/>.)dnl ) else - $1_CFLAGS=$pkg_cv_$1_CFLAGS - $1_LIBS=$pkg_cv_$1_LIBS + $1_CFLAGS=$pkg_cv_$1_CFLAGS + $1_LIBS=$pkg_cv_$1_LIBS AC_MSG_RESULT(yes) - $3 + $3 fidnl )dnl PKG_CHECK_MODULES
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/basic.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/basic.sh
Changed
@@ -29,6 +29,9 @@ libs_circular_directpc \ libs_static \ libs_static_ordering \ + license_isc \ + license_noassertion \ + modversion_noflatten \ pkg_config_path \ nolibs \ nocflags \ @@ -47,7 +50,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lfoo\n" \ pkgconf --libs foo } @@ -55,7 +58,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo\n" \ pkgconf --cflags --libs foo } @@ -64,7 +67,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo\n" \ pkgconf --cflags --libs 'foo > 1.2' } @@ -72,7 +75,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n" \ pkgconf --cflags --libs 'foo > 1.2 bar >= 1.3' } @@ -80,7 +83,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/include/foo -fPIC -L/test/lib -lbar -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lbar -lfoo\n" \ pkgconf --cflags --libs 'foo > 1.2,bar >= 1.3' } @@ -88,7 +91,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo\n" \ pkgconf --cflags --libs 'foo' '>' '1.2' } @@ -96,7 +99,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lfoo\n" \ pkgconf --cflags --libs 'foo' '!=' '1.3.0' } @@ -176,7 +179,7 @@ export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ -s exit:1 \ - pkgconf --exists 'tilde <= 1.0.0' + pkgconf --exists 'tilde >= 1.0.0' } exists_body() @@ -190,7 +193,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - pkgconf --exists 'tilde >= 1.0.0' + pkgconf --exists 'tilde <= 1.0.0' } exists3_body() @@ -204,30 +207,30 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz \n" \ + -o inline:"-lintermediary-1 -lintermediary-2 -lfoo -lbar -lbaz\n" \ pkgconf --libs intermediary-1 intermediary-2 } -libs_circular1_body() +libs_circular2_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \ - pkgconf --libs circular-1 + -o inline:"circular-1: breaking circular reference (circular-1 -> circular-2 -> circular-1)\n" \ + pkgconf circular-2 --validate } -libs_circular2_body() +libs_circular1_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lcircular-3 -lcircular-1 -lcircular-2 \n" \ - pkgconf --libs circular-3 + -o inline:"circular-3: breaking circular reference (circular-3 -> circular-1 -> circular-3)\n" \ + pkgconf circular-1 --validate } libs_circular_directpc_body() { atf_check \ - -o inline:"-lcircular-1 -lcircular-2 -lcircular-3 \n" \ + -o inline:"-lcircular-2 -lcircular-3 -lcircular-1\n" \ pkgconf --libs ${selfdir}/lib1/circular-3.pc } @@ -235,7 +238,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"/libfoo.a -pthread \n" \ + -o inline:"/libfoo.a -pthread\n" \ pkgconf --libs static-archive-libs } @@ -243,7 +246,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lbar -lfoo \n" \ + -o inline:"-L/test/lib -lbar -lfoo\n" \ pkgconf --libs foo bar } @@ -251,20 +254,20 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1${PATH_SEP}${selfdir}/lib2" atf_check \ - -o inline:"-L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lfoo\n" \ pkgconf --libs foo atf_check \ - -o inline:"-L/test/lib -lbar -lfoo \n" \ + -o inline:"-L/test/lib -lbar -lfoo\n" \ pkgconf --libs bar } with_path_body() { atf_check \ - -o inline:"-L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lfoo\n" \ pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs foo atf_check \ - -o inline:"-L/test/lib -lbar -lfoo \n" \ + -o inline:"-L/test/lib -lbar -lfoo\n" \ pkgconf --with-path=${selfdir}/lib1 --with-path=${selfdir}/lib2 --libs bar } @@ -288,7 +291,7 @@ { cp ${selfdir}/lib1/foo.pc . atf_check \ - -o inline:"-L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lfoo\n" \ pkgconf --libs foo.pc } @@ -307,3 +310,24 @@ -o inline:"foo\n" \ pkgconf --with-path=${selfdir}/lib3 --print-requires bar } + +license_isc_body() +{ + atf_check \ + -o inline:"foo: ISC\n" \ + pkgconf --with-path=${selfdir}/lib1 --license foo +} + +license_noassertion_body() +{ + atf_check \ + -o inline:"bar: NOASSERTION\nfoo: ISC\n" \ + pkgconf --with-path=${selfdir}/lib1 --license bar +}
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/conflicts.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/conflicts.sh
Changed
@@ -10,7 +10,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lconflicts \n" \ + -o inline:"-L/test/lib -lconflicts\n" \ pkgconf --libs conflicts } @@ -18,6 +18,6 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lconflicts \n" \ + -o inline:"-L/test/lib -lconflicts\n" \ pkgconf --ignore-conflicts --libs conflicts }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/framework.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/framework.sh
Changed
@@ -9,12 +9,12 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-F/test/lib -framework framework-1 \n" \ + -o inline:"-F/test/lib -framework framework-1\n" \ pkgconf --libs framework-1 atf_check \ - -o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \ + -o inline:"-F/test/lib -framework framework-2 -framework framework-1\n" \ pkgconf --libs framework-2 atf_check \ - -o inline:"-F/test/lib -framework framework-2 -framework framework-1 \n" \ + -o inline:"-F/test/lib -framework framework-2 -framework framework-1\n" \ pkgconf --libs framework-1 framework-2 }
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/billion-laughs.pc
Added
@@ -0,0 +1,13 @@ +v9=lol +v8=${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9}${v9} +v7=${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8}${v8} +v6=${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7}${v7} +v5=${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6}${v6} +v4=${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5}${v5} +v3=${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4}${v4} +v2=${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3}${v3} +v1=${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2}${v2} +v0=${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1}${v1} +Name: One Billion Laughs +Version: ${v0} +Description: Don't install this!
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/lib1/foo.pc -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/foo.pc
Changed
@@ -9,3 +9,4 @@ Libs: -L${libdir} -lfoo Cflags: -fPIC -I${includedir}/foo Cflags.private: -DFOO_STATIC +License: ISC
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/metapackage-1.pc
Added
@@ -0,0 +1,6 @@ +Name: metapackage-1 +Version: 0.1 +Description: metapackage for testing purposes +Requires.private: metapackage-2 +Libs: -lmetapackage-1 +Cflags: -I/metapackage-1
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/metapackage-2.pc
Added
@@ -0,0 +1,5 @@ +Name: metapackage-2 +Version: 0.1 +Description: metapackage for testing purposes +Libs: -lmetapackage-2 +Cflags: -I/metapackage-2
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/metapackage.pc
Added
@@ -0,0 +1,4 @@ +Name: metapackage +Version: 0.1 +Description: metapackage for testing purposes +Requires: metapackage-1, metapackage-2
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/omg-sysroot-uninstalled.pc
Added
@@ -0,0 +1,10 @@ +prefix=${pc_sysrootdir}/test +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: omg-sysroot +Description: A testing pkg-config file +Version: 1.2.3 +Libs: -L${libdir} -lomg +Cflags: -fPIC -I${includedir}/omg
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/lib1/quotes.pc -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/quotes.pc
Changed
@@ -7,4 +7,4 @@ Description: A testing pkg-config file Version: 1.2.3 Libs: -L${libdir} -lfoo -Cflags: -DQUOTED=\"bla\" +Cflags: -DQUOTED=\"bla\" -DA=\"escaped\ string\'\ \literal\" -DB="\1\$" -DC='bla'
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/sysroot-dir-2.pc
Added
@@ -0,0 +1,7 @@ +prefix=${pc_sysrootdir}/usr + +Name: sysroot-dir +Description: Package for testing whether sysroot dirs are repeated or not +Version: 1 +CFlags: -I${prefix}/include +Libs: -L${prefix}/lib -lfoo
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/sysroot-dir-3.pc
Added
@@ -0,0 +1,9 @@ +prefix=/sysroot/usr +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: sysroot-dir +Description: Package for testing whether sysroot dirs are repeated or not +Version: 1 +CFlags: -I${includedir} +Libs: -L${libdir} -lfoo
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/sysroot-dir-4.pc
Added
@@ -0,0 +1,9 @@ +prefix=${pc_sysrootdir}/usr +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: sysroot-dir +Description: Package for testing whether sysroot dirs are repeated or not +Version: 1 +CFlags: -I${includedir} +Libs: -L${libdir} -lfoo
View file
_service:tar_scm:pkgconf-1.9.5.tar.xz/tests/lib1/sysroot-dir-5.pc
Added
@@ -0,0 +1,9 @@ +prefix=/sysroot/usr +includedir=${prefix}/include +libdir=${prefix}/lib + +Name: sysroot-dir +Description: Package for testing whether sysroot dirs are repeated or not +Version: 1 +CFlags: -I${includedir} +Libs: -L${libdir} -lfoo
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/meson.build -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/meson.build
Changed
@@ -18,6 +18,5 @@ # yuck foreach test : tests - configure_file(input: test + '.sh', output: test, copy: true) - run_command('chmod', '755', join_paths(meson.build_root(), 'tests', test)) + test_file = configure_file(input: test + '.sh', output: test, copy: true) endforeach
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/parser.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/parser.sh
Changed
@@ -41,7 +41,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lfoo \n" \ + -o inline:"-lfoo\n" \ pkgconf --libs comments } @@ -49,7 +49,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lfoo \n" \ + -o inline:"-lfoo\n" \ pkgconf --libs comments-in-fields } @@ -57,7 +57,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib/dos-lineendings -ldos-lineendings \n" \ + -o inline:"-L/test/lib/dos-lineendings -ldos-lineendings\n" \ pkgconf --libs dos-lineendings } @@ -65,7 +65,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/include/no-trailing-newline \n" \ + -o inline:"-I/test/include/no-trailing-newline\n" \ pkgconf --cflags no-trailing-newline } @@ -73,7 +73,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-llib-3 -llib-1 -llib-2 -lpthread \n" \ + -o inline:"-llib-3 -llib-1 -llib-2 -lpthread\n" \ pkgconf --libs argv-parse } @@ -90,7 +90,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ + -o inline:"-llib-1 -pthread /test/lib/lib2.so\n" \ pkgconf --libs argv-parse-3 } @@ -98,10 +98,10 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L~ -ltilde \n" \ + -o inline:"-L~ -ltilde\n" \ pkgconf --libs tilde-quoting atf_check \ - -o inline:"-I~ \n" \ + -o inline:"-I~\n" \ pkgconf --cflags tilde-quoting } @@ -109,7 +109,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L\$(libdir) -ltilde \n" \ + -o inline:"-L\$(libdir) -ltilde\n" \ pkgconf --libs paren-quoting } @@ -134,7 +134,7 @@ { atf_check \ -e ignore \ - -o inline:"-IC:\\\\\\\\A \n" \ + -o inline:"-IC:\\\\\\\\A\n" \ pkgconf --with-path=${selfdir}/lib1 --cflags escaped-backslash } @@ -142,7 +142,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-DQUOTED=\\\"bla\\\" \n" \ + -o inline:"-DQUOTED=\\\"bla\\\" -DA=\\\"escaped\\ string\\\'\\ literal\\\" -DB=\\\\\\1\$ -DC=bla\n" \ pkgconf --cflags quotes } @@ -150,7 +150,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar \n" \ + -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar\n" \ pkgconf --libs flag-order-1 } @@ -158,7 +158,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar -lfoo \n" \ + -o inline:"-L/test/lib -Bdynamic -lfoo -Bstatic -lbar -lfoo\n" \ pkgconf --libs flag-order-1 foo } @@ -166,7 +166,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group \n" \ + -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group\n" \ pkgconf --libs flag-order-3 } @@ -174,7 +174,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group -lfoo \n" \ + -o inline:"-L/test/lib -Wl,--start-group -lfoo -lbar -Wl,--end-group -lfoo\n" \ pkgconf --libs flag-order-3 foo } @@ -182,7 +182,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/include \n" \ + -o inline:"-I/test/include\n" \ pkgconf --cflags variable-whitespace } @@ -190,7 +190,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\"/test/share/doc\\\" \n" \ + -o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\"/test/share/doc\\\"\n" \ pkgconf --cflags fragment-quoting } @@ -198,7 +198,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -DQUOTED=/test/share/doc \n" \ + -o inline:"-fPIC -I/test/include/foo -DQUOTED=/test/share/doc\n" \ pkgconf --cflags fragment-quoting-2 } @@ -206,7 +206,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\"/test/share/doc\\\" \n" \ + -o inline:"-fPIC -I/test/include/foo -DQUOTED=\\\"/test/share/doc\\\"\n" \ pkgconf --cflags fragment-quoting-3 } @@ -214,7 +214,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -DQUOTED=/test/share/doc \n" \ + -o inline:"-fPIC -I/test/include/foo -DQUOTED=/test/share/doc\n" \ pkgconf --cflags fragment-quoting-5 } @@ -222,28 +222,28 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\\ world \n" \ + -o inline:"-Dhello=10 -Dworld=+32 -DDEFINED_FROM_PKG_CONFIG=hello\\ world\n" \ pkgconf --cflags fragment-quoting-7 } fragment_escaping_1_body() { atf_check \ - -o inline:"-IC:\\\\\\\\D\\ E \n" \ + -o inline:"-IC:\\\\\\\\D\\ E\n" \ pkgconf --with-path="${selfdir}/lib1" --cflags fragment-escaping-1 } fragment_escaping_2_body() { atf_check \ - -o inline:"-IC:\\\\\\\\D\\ E \n" \ + -o inline:"-IC:\\\\\\\\D\\ E\n" \ pkgconf --with-path="${selfdir}/lib1" --cflags fragment-escaping-2 }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/provides.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/provides.sh
Changed
@@ -27,7 +27,7 @@ -o inline:"${OUTPUT}" \ pkgconf --print-provides provides atf_check \ - -o inline:"-lfoo \n" \ + -o inline:"-lfoo\n" \ pkgconf --libs provides-request-simple atf_check \ -e ignore \
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/regress.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/regress.sh
Changed
@@ -8,6 +8,7 @@ depgraph_break_2 \ depgraph_break_3 \ define_variable \ + define_variable_override \ variable \ keep_system_libs \ libs \ @@ -28,7 +29,10 @@ malformed_1 \ malformed_quoting \ explicit_sysroot \ - empty_tuple + empty_tuple \ + solver_requires_private_debounce \ + billion_laughs \ + maximum_package_depth_off_by_one # sysroot_munge \ @@ -71,6 +75,13 @@ pkgconf --variable=typelibdir --define-variable='libdir=\${libdir}' typelibdir } +define_variable_override_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + atf_check -o inline:"/test\n" \ + pkgconf --variable=prefix --define-variable='prefix=/test' typelibdir +} + variable_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" @@ -88,7 +99,7 @@ pkgconf --libs-only-L cflags-libs-only atf_check \ - -o inline:"-L/test/local/lib \n" \ + -o inline:"-L/test/local/lib\n" \ pkgconf --libs-only-L --keep-system-libs cflags-libs-only } @@ -96,7 +107,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/local/lib -lfoo \n" \ + -o inline:"-L/test/local/lib -lfoo\n" \ pkgconf --libs cflags-libs-only } @@ -104,7 +115,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/local/lib -lfoo \n" \ + -o inline:"-L/test/local/lib -lfoo\n" \ pkgconf --libs-only-L --libs-only-l cflags-libs-only } @@ -112,10 +123,10 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/bar/lib -lfoo1 \n" \ + -o inline:"-L/test/bar/lib -lfoo1\n" \ pkgconf --libs prefix-foo1 atf_check \ - -o inline:"-L/test/bar/lib -lfoo1 -lfoo2 \n" \ + -o inline:"-L/test/bar/lib -lfoo1 -lfoo2\n" \ pkgconf --libs prefix-foo1 prefix-foo2 } @@ -123,7 +134,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/local/include/foo \n" \ + -o inline:"-I/test/local/include/foo\n" \ pkgconf --cflags-only-I --cflags-only-other cflags-libs-only } @@ -131,7 +142,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO \n" \ + -o inline:"-I/test/bar/include/foo -DBAR -fPIC -DFOO\n" \ pkgconf --cflags prefix-foo1 prefix-foo2 } @@ -155,7 +166,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-isystem /opt/bad/include -isystem /opt/bad2/include \n" \ + -o inline:"-isystem /opt/bad/include -isystem /opt/bad2/include\n" \ pkgconf --cflags isystem } @@ -171,7 +182,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-idirafter /opt/bad/include -idirafter /opt/bad2/include \n" \ + -o inline:"-idirafter /opt/bad/include -idirafter /opt/bad2/include\n" \ pkgconf --cflags idirafter } @@ -187,7 +198,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3 \n" \ + -o inline:"-I/opt/bad/include1 -idirafter -I/opt/bad/include2 -I/opt/bad/include3\n" \ pkgconf --cflags idirafter-ordering } @@ -195,7 +206,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib2" atf_check \ - -o inline:"-fPIC -I/test/include/foo \n" \ + -o inline:"-fPIC -I/test/include/foo\n" \ pkgconf --cflags ${selfdir}/lib3/bar.pc } @@ -204,7 +215,7 @@ sed "s|/sysroot/|${selfdir}/|g" ${selfdir}/lib1/sysroot-dir.pc > ${selfdir}/lib1/sysroot-dir-selfdir.pc export PKG_CONFIG_PATH="${selfdir}/lib1" PKG_CONFIG_SYSROOT_DIR="${selfdir}" atf_check \ - -o inline:"-L${selfdir}/lib -lfoo \n" \ + -o inline:"-L${selfdir}/lib -lfoo\n" \ pkgconf --libs sysroot-dir-selfdir } @@ -223,7 +234,7 @@ fragment_collision_body() { - atf_check -o inline:"-D_BAZ -D_BAR -D_FOO -D_THREAD_SAFE -pthread \n" \ + atf_check -o inline:"-D_BAZ -D_BAR -D_FOO -D_THREAD_SAFE -pthread\n" \ pkgconf --with-path="${selfdir}/lib1" --cflags fragment-collision } @@ -251,3 +262,21 @@ atf_check -o inline:"\n" \ pkgconf --with-path="${selfdir}/lib1" --cflags empty-tuple } + +solver_requires_private_debounce_body() +{ + atf_check -o inline:"-I/metapackage-1 -I/metapackage-2 -lmetapackage-1 -lmetapackage-2\n" \ + pkgconf --with-path="${selfdir}/lib1" --cflags --libs metapackage +} + +billion_laughs_body() +{ + atf_check -o inline:"warning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\nwarning: truncating very long variable to 64KB\n" \ + pkgconf --with-path="${selfdir}/lib1" --validate billion-laughs +} + +maximum_package_depth_off_by_one_body() +{ + atf_check -o inline:"1.2.3\n" \ + pkgconf --with-path="${selfdir}/lib1" --modversion foo bar baz +}
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/requires.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/requires.sh
Changed
@@ -21,7 +21,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lbar -lfoo \n" \ + -o inline:"-L/test/lib -lbar -lfoo\n" \ pkgconf --libs bar } @@ -29,7 +29,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -L/test/lib -lbaz \n" \ + -o inline:"-fPIC -I/test/include/foo -L/test/lib -lbaz\n" \ pkgconf --libs --cflags baz } @@ -37,7 +37,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lbaz -L/test/lib -lzee -L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lbaz -L/test/lib -lzee -L/test/lib -lfoo\n" \ pkgconf --static --libs baz } @@ -45,7 +45,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-L/test/lib -lbaz -L/test/lib -lfoo \n" \ + -o inline:"-L/test/lib -lbaz -L/test/lib -lfoo\n" \ pkgconf --static --pure --libs baz } @@ -53,7 +53,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ + -o inline:"-llib-1 -pthread /test/lib/lib2.so\n" \ pkgconf --static --libs argv-parse-2 } @@ -61,7 +61,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-fPIC -I/test/include/foo -DFOO_STATIC \n" \ + -o inline:"-fPIC -I/test/include/foo -DFOO_STATIC\n" \ pkgconf --static --cflags baz } @@ -69,7 +69,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lprivate -lfoo -lbaz -lzee -lbar -lfoo \n" \ + -o inline:"-lprivate -lbaz -lzee -lbar -lfoo -lfoo\n" \ pkgconf --static --libs-only-l private-libs-duplication } @@ -77,7 +77,7 @@ { export PKG_CONFIG_PATH="${selfdir}/lib1" atf_check \ - -o inline:"-lbar -lbar-private -L/test/lib -lfoo \n" \ + -o inline:"-lbar -lbar-private -L/test/lib -lfoo\n" \ pkgconf --static --libs static-libs } @@ -87,14 +87,14 @@ atf_check \ -s exit:1 \ -e ignore \ - -o inline:"\n" \ + -o ignore \ pkgconf --cflags missing-require } requires_internal_body() { atf_check \ - -o inline:"-lbar -lbar-private -L/test/lib -lfoo \n" \ + -o inline:"-lbar -lbar-private -L/test/lib -lfoo\n" \ pkgconf --with-path="${selfdir}/lib1" --static --libs requires-internal } @@ -110,7 +110,7 @@ requires_internal_collision_body() { atf_check \ - -o inline:"-I/test/local/include/foo \n" \ + -o inline:"-I/test/local/include/foo\n" \ pkgconf --with-path="${selfdir}/lib1" --cflags requires-internal-collision }
View file
_service:tar_scm:pkgconf-1.8.0.tar.xz/tests/sysroot.sh -> _service:tar_scm:pkgconf-1.9.5.tar.xz/tests/sysroot.sh
Changed
@@ -6,13 +6,18 @@ cflags \ variable \ do_not_eat_slash \ + do_not_duplicate_sysroot_dir \ + uninstalled \ + uninstalled_pkgconf1 \ + uninstalled_fdo \ + uninstalled_fdo_pc_sysrootdir do_not_eat_slash_body() { export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_SYSROOT_DIR="/" atf_check \ - -o inline:"-fPIC -I/test/include/foo \n" \ + -o inline:"-fPIC -I/test/include/foo\n" \ pkgconf --cflags baz } @@ -21,7 +26,7 @@ export PKG_CONFIG_PATH="${selfdir}/lib1" export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}" atf_check \ - -o inline:"-fPIC -I${SYSROOT_DIR}/test/include/foo \n" \ + -o inline:"-fPIC -I${SYSROOT_DIR}/test/include/foo\n" \ pkgconf --cflags baz } @@ -36,3 +41,70 @@ -o inline:"${SYSROOT_DIR}/test/include\n" \ pkgconf --variable=includedir foo } + +do_not_duplicate_sysroot_dir_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + + atf_check \ + -o inline:"-I/sysroot/usr/include\n" \ + pkgconf --cflags sysroot-dir-2 + + atf_check \ + -o inline:"-I/sysroot/usr/include\n" \ + pkgconf --cflags sysroot-dir-3 + + atf_check \ + -o inline:"-I/sysroot/usr/include\n" \ + pkgconf --cflags sysroot-dir-5 + + export PKG_CONFIG_SYSROOT_DIR="${SYSROOT_DIR}" + + atf_check \ + -o inline:"-I${SYSROOT_DIR}/usr/include\n" \ + pkgconf --cflags sysroot-dir-4 +} + +uninstalled_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + + atf_check \ + -o inline:"-L/test/lib -lomg\n" \ + pkgconf --libs omg +} + +uninstalled_pkgconf1_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + export PKG_CONFIG_PKGCONF1_SYSROOT_RULES="1" + + atf_check \ + -o inline:"-L/sysroot/test/lib -lomg\n" \ + pkgconf --libs omg +} + +uninstalled_fdo_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + export PKG_CONFIG_FDO_SYSROOT_RULES="1" + + atf_check \ + -o inline:"-L/test/lib -lomg\n" \ + pkgconf --libs omg +} + +uninstalled_fdo_pc_sysrootdir_body() +{ + export PKG_CONFIG_PATH="${selfdir}/lib1" + export PKG_CONFIG_SYSROOT_DIR="/sysroot" + export PKG_CONFIG_FDO_SYSROOT_RULES="1" + + atf_check \ + -o inline:"-L/sysroot/test/lib -lomg\n" \ + pkgconf --libs omg-sysroot +}
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2