William Pitcock
a6d6b88d14
libpkgconf: path: fix logic error in path relocation case when matching against a list ( closes #129 )
2017-09-08 18:27:04 -05:00
William Pitcock
9505213c1b
tuple: check expanded variables to see if a sysroot has been duplicated, and if so, remove the prepended sysroot.
...
This allows compatibility between legacy pkg-config's broken sysroot implementation and pkgconf's sysroot
implementation, by removing any prepended sysroot paths and preferencing the variable expansion sysroot path
we typically do instead.
Closes github #123 .
2017-07-16 17:37:41 -05:00
Maxin B. John
74666bff38
stdinc.h: fix build with mingw ( #122 )
...
Fixes this build error with mingw:
...
| compilation terminated.
| In file included from ../pkgconf-1.3.7/libpkgconf/libpkgconf.h:19:0,
| from ../pkgconf-1.3.7/libpkgconf/audit.c:16:
| ../pkgconf-1.3.7/libpkgconf/stdinc.h:36:12: fatal error: BaseTsd.h: No
such file or directory
| # include <BaseTsd.h>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
2017-07-16 13:21:45 -05:00
Jussi Pakkanen
40fd995060
Experiment to build with Meson ( #119 )
...
* Initial Meson build definitions.
* Install man page and headers.
2017-06-19 19:03:00 -05:00
William Pitcock
864b14e5b9
Merge branch 'cmakeify' of github.com:dankegel/pkgconf
2017-06-16 21:06:01 -05:00
William Pitcock
03f7841065
libpkgconf: pkg: windows can use either \ or / as directory separators
...
ref #118
2017-06-16 15:27:23 -05:00
William Pitcock
d45e850130
Revert "pkg: use pkgconf_pkg_t.realname instead of pkgconf_pkg_t.id for injecting the default provides entry"
...
This reverts commit 0c22b4d8a1
.
2017-06-16 13:03:51 -05:00
William Pitcock
0c22b4d8a1
pkg: use pkgconf_pkg_t.realname instead of pkgconf_pkg_t.id for injecting the default provides entry
...
This issue was noticed while porting pkgconf to Windows.
ref #118
2017-06-16 11:49:54 -05:00
Dan Kegel
794aa5016a
Tidy up a bit.
2017-06-05 20:54:57 -07:00
Dan Kegel
ededaa6415
cmake: add missing configure variables, install headers and .pc file, use simpler line to invoke kyua, tweak build location of dll for ease of testing
2017-06-05 17:40:10 -07:00
Dan Kegel
4ba2bac538
Don't depend on libtool magic to control which symbols are exported from shared libraries
2017-06-05 14:00:02 -07:00
Dan Kegel
9258874ee1
cmake: use right soversion for libpkgconf
2017-06-05 10:23:56 -07:00
Dan Kegel
8b4a4b831b
First draft of cmake install rules
2017-06-04 19:32:08 -07:00
Dan Kegel
4d7b4d7c8e
Minimal tweaks to compile with Visual C 2015
2017-06-04 19:19:55 -07:00
Dan Kegel
35d0f63daf
win-dirent.h: MIT-licensed port of dirent to win32 from https://github.com/tronkko/dirent
2017-06-04 19:19:01 -07:00
Dan Kegel
251f747343
First draft of cmake port
2017-06-04 17:44:37 -07:00
William Pitcock
d280060ed7
libpkgconf: pkg: add additional validation rules in post-parse phase
2017-05-19 23:37:57 -05:00
William Pitcock
0262b8251d
libpkgconf: pkgconf_pkg_find(): correctly handle failure from pkgconf_pkg_new_from_file()
2017-05-19 23:33:49 -05:00
William Pitcock
cf3c50ca78
libpkgconf: pkg: pkgconf_try_specific_path() and pkgconf_pkg_new_from_file() require a mutable client to release resources when encountering invalid packages
2017-05-19 23:21:58 -05:00
William Pitcock
3c7f82a7fb
fragment: also protect -nostdinc, -nostdlibinc, -nobuiltininc
2017-05-09 19:38:57 -05:00
William Pitcock
74eb74a3ef
fragment: handle -include similarly to -isystem and -idirafter
2017-05-09 19:37:23 -05:00
William Pitcock
9fde4be1f3
fragment: also protect -ansi, -std=, -stdlib=, -pedantic, -trigraphs, -Wa, and -Wp fragments
2017-05-09 19:34:39 -05:00
William Pitcock
c7a8e1e3b8
fragment: give -Wl fragments the same protection as -pthread
2017-05-09 19:30:02 -05:00
William Pitcock
90d52e6c2a
fragment: add -pthread as a special fragment
2017-05-05 01:40:57 -05:00
William Pitcock
6e643aa432
libpkgconf: hopefully the last necessary tweak to quoting...
2017-03-29 18:00:57 -05:00
William Pitcock
acac1f8ed3
libpkgconf: pkg: show iteration depth when traversing
2017-03-24 00:59:53 -05:00
William Pitcock
81011ba522
main: implement --short-errors ( #115 )
2017-02-27 09:54:02 -06:00
William Pitcock
794443a92a
dependency: break API to add tracepoints to dependency list building
2017-02-25 16:04:55 -06:00
William Pitcock
e0c9569f14
fragment: add tracepoints
2017-02-25 15:53:50 -06:00
William Pitcock
01fe5743ea
fragment: add new option to control escaping shell arguments
2017-02-25 15:32:49 -06:00
William Pitcock
ae42261c3f
argvsplit: refactor splitting state machine
2017-02-25 15:04:08 -06:00
John Hein
9b255d465c
If PKG_CONFIG_PATH element is a sym link, use the link destination instead of the link for inode caching checks.
...
See issue 112 & issue 110 (https://github.com/pkgconf/pkgconf/issues )
2017-02-24 23:26:41 -06:00
John Hein
76b8e0a26b
Normalize the path to remove duplicate / separators rather than possibly altering the path with realpath(3). Leave sym links as is in path components. This is also cheaper than realpath(3), and works on platforms that don't have realpath(3).
...
Note: if this is accepted, the check for realpath in configure.ac
can be removed, and some docs that mention realpath will be adjusted.
2017-02-24 23:26:10 -06:00
William Pitcock
d558e30ab3
libpkgconf: argvsplit: quoting logic was simplified too much
2017-02-07 10:25:38 -06:00
William Pitcock
b0c36cd128
libpkgconf: pkg: add some trace points
2017-02-04 20:35:49 -06:00
William Pitcock
16ecf82fd7
libpkgconf: client: bring up the default trace handler as early as possible
2017-02-04 20:09:21 -06:00
William Pitcock
f7f0bfc460
libpkgconf: cache: add trace points
2017-02-04 20:01:41 -06:00
William Pitcock
2b6bb5a252
libpkgconf: client: add trace points
2017-02-04 19:50:58 -06:00
William Pitcock
d20efff495
libpkgconf: overhaul pkgconf_trace() a little
2017-02-04 19:49:59 -06:00
William Pitcock
820ad83edd
libpkgconf: pkg: add variable whitespace warnings back, using pkgconf_warn().
2017-02-04 19:05:28 -06:00
William Pitcock
bef293080a
libpkgconf: client: add trace logging too
2017-02-04 18:57:21 -06:00
William Pitcock
a6755cd792
libpkgconf: client: add pkgconf_warn()
2017-02-04 18:46:53 -06:00
William Pitcock
eb98a1e6c3
libpkgconf: client: clean up various aspects of error/warn handlers
2017-02-04 18:46:33 -06:00
William Pitcock
d884dc46a2
libpkgconf: client: ensure error/warn handlers always have a sane default instead of actually NULL
2017-02-04 18:41:16 -06:00
William Pitcock
c0b6a62c40
libpkgconf: client: add warn handler and getter/setter for both warn handler and error handler
2017-02-04 18:37:58 -06:00
William Pitcock
647c0255aa
libpkgconf: add PKGCONF_PKG_PKGF_DONT_RELOCATE_PATHS ( #110 )
...
main: add PKG_CONFIG_DONT_RELOCATE_PATHS environment variable and --dont-relocate-paths option to disable path relocation
2017-02-03 13:17:21 -06:00
William Pitcock
fe40bc33f8
libpkgconf: argvsplit: do not consider ' or " to be equivalent to \ ( #111 )
2017-02-03 12:53:50 -06:00
William Pitcock
42d65b14c7
libpkgconf: client: add INCLUDE environment to the cflags path filter list on windows
2017-02-01 13:03:06 -06:00
William Pitcock
1aa1a43321
Revert "libpkgconf: pkg: warn when encountering trailing whitespace"
...
This reverts commit 2fa4fd09d0
.
2017-01-26 13:38:57 -06:00
William Pitcock
2fa4fd09d0
libpkgconf: pkg: warn when encountering trailing whitespace
2017-01-26 13:32:07 -06:00
William Pitcock
ef1503b769
libpkgconf: strip trailing whitespace
2017-01-26 13:10:52 -06:00
William Pitcock
b06bbe75a4
libpkgconf: path: only enable cygwin path relocation backend for msys (ref #72 )
2017-01-23 23:17:26 -06:00
William Pitcock
e87595b3d1
libpkgconf: use a better check instead of stat() for pkg-config file iteration, avoiding a TOCTOU race condition identified by coverity
2017-01-23 12:42:13 -06:00
William Pitcock
db65f935f0
libpkgconf: iter: check list->tail for null, not list->head
2017-01-23 00:24:13 -06:00
William Pitcock
0927ecf1c6
Revert "Actually fix the regression introduced in 7b39c38"
...
This reverts commit 5e5c418837
.
2017-01-22 23:29:59 -06:00
William Pitcock
5554be4986
libpkgconf: queue: chase API change (mark static root virtual packages as static)
2017-01-22 23:28:51 -06:00
William Pitcock
0c01a81299
libpkgconf: split virtual/static package state (this is API/ABI safe, static packages are always treated as virtual when it comes to mutation)
2017-01-22 23:26:01 -06:00
William Pitcock
9ece7cd487
libpkgconf: move sys/stat.h inclusion out of stdinc.h to the only other consumer of sys/stat.h
2017-01-22 23:09:38 -06:00
William Pitcock
e5f3dac6e7
libpkgconf: pkg: handle error value from stat(2).
2017-01-22 23:07:39 -06:00
William Pitcock
67796a1d86
libpkgconf: argvsplit: make escape handling more explicit
2017-01-22 23:04:01 -06:00
Igor Gnatenko
5db87c9685
remove dead assignments ( #109 )
...
* remove dead assignments
None of them are used.
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
* The address of an object "&pkgconf_pkg_provides_vermatch_rules[pkgdep->compare]" is never null
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
* Overrunning array pkgconf_pkg_comparator_names at element index 7
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-22 11:31:34 -08:00
Baptiste Daroussin
5e5c418837
Actually fix the regression introduced in 7b39c38
2017-01-22 11:26:43 +01:00
Baptiste Daroussin
17be554a21
Revert "Fix regression introduced in 7b39c38"
...
This reverts commit 7d89f659ff
.
2017-01-22 11:23:24 +01:00
Baptiste Daroussin
7d89f659ff
Fix regression introduced in 7b39c38
...
now pkgconf --variable=pc_path pkg-config works
2017-01-22 10:44:09 +01:00
William Pitcock
7237b811e7
add support for making paths relocatable ( closes #103 )
2017-01-20 00:58:48 -06:00
William Pitcock
ced4f00363
libpkgconf: client: add pkgconf_client_[get|set]_prefix_varname()
2017-01-19 19:16:00 -06:00
William Pitcock
13cf74c7a3
libpkgconf: kill flags from top-level fragment API (ref #105 )
2017-01-19 18:23:25 -06:00
William Pitcock
7b39c38408
libpkgconf: pkg: clean up use of flags variable (ref #105 )
2017-01-19 18:17:29 -06:00
William Pitcock
127fd037d4
libpkgconf: pkg: uncouple resolver flags from pkgconf_pkg_dir_list_build(). (ref #105 )
2017-01-19 17:35:57 -06:00
William Pitcock
0ca6a16ce5
libpkgconf: queue: nuke flags parameters (ref #105 )
2017-01-19 17:32:38 -06:00
William Pitcock
597c3c7faf
libpkgconf: client: add pkgconf_client_t.flags and a get/set interface for it
2017-01-19 17:22:20 -06:00
William Pitcock
1ee3c12f53
libpkgconf: path: use pkgconf_path_relocate() when matching paths
2017-01-19 10:43:23 -06:00
William Pitcock
fa927fd379
libpkgconf: path: pkgconf_path_relocate(): implement realpath backend
2017-01-19 10:36:07 -06:00
William Pitcock
0315832285
doc: document pkgconf_path_relocate()
2017-01-19 10:31:40 -06:00
William Pitcock
4f94090fe4
libpkgconf: fragment: make pkgconf_fragment_filter() accept userdata ( closes #106 )
2017-01-18 20:25:19 -06:00
William Pitcock
b428eeaacf
libpkgconf: remove legacy check to ensure pkgconf_pkg_dir_list_build() is only called once.
...
this is not necessary anymore because:
- we do path entry deduplication
- it is possible that we want to prime the dir list with some user-specified paths prior to building it
2017-01-18 11:29:24 -06:00
William Pitcock
147fd80750
path: relocate system libdir/includedir if appropriate
2017-01-13 20:12:38 -06:00
William Pitcock
cb1dc71e23
fragment: simplify pkgconf_fragment_copy_munged()
2017-01-13 20:10:02 -06:00
William Pitcock
87a5a1f0cc
path: when stubbing pkgconf_path_relocate(), suppress unused variables warnings
2017-01-13 20:08:22 -06:00
William Pitcock
27c3710521
fragment: when munging, do a path relocation too
2017-01-13 20:06:48 -06:00
William Pitcock
1369f558c6
path: add new pkgconf_path_relocate() API which is a stub when path
...
relocation is not needed
2017-01-13 20:05:21 -06:00
William Pitcock
7f6a185977
fragment: only munge if sysroot_dir is actually set
...
on cygwin/msys2, it is possible for munging to be enabled for other types of munging (instead of sysroot)
2017-01-13 19:55:54 -06:00
William Pitcock
4ba414f74a
fragment: handle oddball fragments like -framework more accurately
2017-01-07 15:04:34 -06:00
Baptiste Daroussin
3b3f1dc76e
Fix gcc warnings
2017-01-07 17:57:37 +01:00
Baptiste Daroussin
2e855972dc
inode cache: ensure we never use an unitilized struct stat
2017-01-07 17:52:44 +01:00
Graham Ollis
9c426b6f2c
do not filter non-existent directories if filter is off
2016-12-31 14:10:59 -06:00
William Pitcock
0c690dc891
libpkgconf: fragment: fix over-optimization of cflags/linker flags in edge cases involving non-standard options
2016-12-30 12:39:10 -06:00
William Pitcock
92f566ff38
libpkgconf: path: check both device node and inode for dedup. pointed out by @plicease
2016-12-30 11:39:45 -06:00
William Pitcock
2305031573
libpkgconf: path: make the duplicate filtering opt-in. some path lists should not be deduped (compiler path lists, for example)
2016-12-30 11:13:04 -06:00
William Pitcock
bad0da0c03
libpkgconf: path: filter out duplicate path entries by inode if possible ( closes #102 )
2016-12-30 11:01:15 -06:00
William Pitcock
aa041b415e
libpkgconf: path: add naive path list filtering function
2016-12-30 10:44:01 -06:00
William Pitcock
135da1440c
libpkgconf: iter: track list lengths
2016-12-30 09:57:01 -06:00
William Pitcock
ad1e414dee
libpkgconf: fragment: handle -idirafter in the same way as -isystem
...
(https://bugs.freedesktop.org/show_bug.cgi?id=97337 )
2016-12-30 02:47:42 -06:00
William Pitcock
c916e3a437
libpkgconf: client: filter all of the path-related GCC environment variables listed in the GCC manual (not just the ones in pkg-config)
2016-12-30 02:39:18 -06:00
William Pitcock
1ece862e87
libpkgconf: client: some toolchains have C_INCLUDE_PATH and CPLUS_INCLUDE_PATH, treat them as PKG_CONFIG_SYSTEM_INCLUDE_PATH.
2016-12-30 02:35:36 -06:00
William Pitcock
6ef4a853b5
libpkgconf: migrate pkgconf client fragment_is_system_dir() to a libpkgconf API
2016-12-21 20:06:17 -06:00
William Pitcock
cd0160a4a2
libpkgconf: handle PKG_CONFIG_SYSTEM_INCLUDE_PATH and PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variables at client init time
2016-12-21 19:55:01 -06:00
William Pitcock
f6b074f267
libpkgconf: path: make pkgconf_path_match_list() take a const list argument
2016-12-21 19:50:05 -06:00
William Pitcock
61c750fde3
libpkgconf: pkg: cleanup and document pkg module
2016-12-15 23:36:59 -06:00
William Pitcock
32c8c73d8b
libpkgconf: pkg: pkgconf_pkg_find_in_registry_key() should actually be private
2016-12-15 22:57:15 -06:00