Commit graph

32 commits

Author SHA1 Message Date
Thomas Preston 9cc8680fe5 pkgconf: Add pkgconf system lib and include path
Buildroot does not reconfigure pkgconf system library and system include
dirs to STAGING_DIR. This means that pkgconf prints the sysroot system
library and system include dirs instead of letting the compiler handle
the logical sysroot. This breaks the -isystem compiler flag, as it
increases the priority of the system library and system include
directories. For example:

	$ output/host/bin/pkg-config --cflags glib-2.0
	-Ioutput/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/include/glib-2.0
	-Ioutput/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/lib/glib-2.0/include
	-Ioutput/host/bin/../x86_64-buildroot-linux-gnu/sysroot/usr/include

A header in `.../sysroot/usr/include` will be included before a header
in any directory specified with -isystem flags. Specifically, this
breaks the Chromium build system, which expects a C++ math.h in a
bundled LLVM C++ library, and gets a GNU C math.h instead.

Fix this by telling pkgconf about the sysroot's system library and
system include directories, so that it doesn't accidentally print them.

Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
[Arnout: change order of variables]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-20 00:21:36 +02:00
Thomas Preston 8905454daf pkgconf: Split pkgconf command into multi-line
The pkgconf command is a long and confusing line, which is about to get
longer. Split it up into logical stages so that it is easier to
visualise changes.

Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-19 22:56:46 +02:00
Adam Duskett 0bd07e9166 package/pkgconf: bump to version 1.6.1
Other changes:
  - Add a hash for the license file.

Tested against:
  - libsoup
  - X11r7
  - dbus-glib
  - atk

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-04-16 00:37:09 +02:00
Thomas Petazzoni 0d244183bf package/pkgconf: fix behavior of pkg-config --version
For some odd reason, the new pkg-config 1.5.3 changed the behavior of
"pkg-config --version": as soon as another argument than "--version"
is passed, the code assumes the user wanted to run "--modversion"
instead.

Sadly, this breaks badly with our pkg-config wrapper that
unconditionally passes --static to pkg-config when
BR2_STATIC_LIBS=y. When ffmpeg calls "pkg-config --version" to test if
pkg-config is available and functional, it's actually "pkg-config
--static --version" that gets executed. pkg-config assumes that the
user wanted to use --modversion and bails out with an error.

This causes a build failure of ffmpeg in BR2_STATIC_LIBS=y
configuration.

This misbehavior of pkg-config has been reported upstream at
https://git.dereferenced.org/pkgconf/pkgconf/issues/19, but until it
gets fixed, we work around the issue by reverting the commit that does
the "hey let's assume you're using --modversion if --version is passed
with more than one argument".

Fixes:

  http://autobuild.buildroot.net/results/ed82a95e1866ea2caadbb3433b2a255b2cf621d2/
  (and plenty of other ffmpeg + BR2_STATIC_LIBS=y build failures)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-01-03 21:55:15 +01:00
Thomas Petazzoni 7125fc5c1a package/pkgconf: add patch to restore pre-1.5.3 behavior for sysroot prefixing
Prior to the bump to version 1.5.3 in commit
4e42366939, we had a patch on pkgconf
that ensures only some variables containing paths were prefixed by the
sysroot directory when queried through pkg-config. This patch was
dropped as part of the 1.5.3 bump, but it turns out we really need
something like this, or a significant number of changes need to be
done to existing packages.

Indeed, pkg-config has no notion of which variable/path gets used at
build time vs. which variable/path gets used at runtime. Prefixing
with the sysroot the paths used at build time works and is desirable,
but prefixing the paths used at runtime doesn't work.

This commit should fix a large number of remaining build failures
related to pkgconf 1.5.3, and should allow reverting a significant
number of workarounds.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-21 16:34:59 +01:00
Carlos Santos 8da467b489 package/pkgconf: purge trailing '/' from PKGCONF_SITE
<PKG>_SITE cannot have a trailing slash.

This was not detected by the check in generic-package because it is a
host-only package without Config.in symbol.

Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2018-12-10 22:00:50 +01:00
Thomas Petazzoni 4e42366939 package/pkgconf: bump to 1.5.3, change upstream
The pkgconf project now has a website at pkgconf.org, and hosts its
tarballs at https://distfiles.dereferenced.org/pkgconf/, so this
commit updates the upstream location, and uses the xz-compressed
tarball as well.

pkgconf is bumped to 1.5.3. What prompted this update is the fact that
GStreamer uses the --define-prefix option when calling pkg-config, and
this option didn't exist in pkgconf 0.9.2.

The patch 0001-Fix-all-variables-sysroot-prefix-problem.patch is
dropped, because pkgconf now behaves properly, by prefixing all paths
with the sysroot. This has been verified by testing libdir and
includedir in zlib.pc, and adding some dummy pkgdatadir, mapdir and
sdkdir variables:

$ cat staging/usr/lib/pkgconfig/zlib.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
sharedlibdir=${libdir}
includedir=${prefix}/include
pkgdatadir=${prefix}/pouet
mapdir=${prefix}/this/is/map/dir
sdkdir=${prefix}/this/is/sdk/dir
[...]

$ ./host/bin/pkg-config --variable=libdir zlib
./host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib
$ ./host/bin/pkg-config --variable=includedir zlib
./host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include
$ ./host/bin/pkg-config --variable=mapdir zlib
./host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/this/is/map/dir
$ ./host/bin/pkg-config --variable=sdkdir zlib
./host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/this/is/sdk/dir
$ ./host/bin/pkg-config --variable=pkgdatadir zlib
./host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/pouet

So, the 0001-Fix-all-variables-sysroot-prefix-problem patch is no
longer necessary.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-09 16:56:49 +01:00
Peter Korsgaard 92b8bd0879 Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-03-05 21:04:14 +01:00
Gaël PORTAY cc2f3a2a59 pkgconf: pkg-config.in: exec pkgconf
Replace the shell script with pkgconf without creating a new process.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-25 21:55:28 +01:00
Gaël PORTAY cc526b428b pkgconf: pkg-config.in: double quote $@
The shell expands "$@" as "$1" "$2" "$3"... while it expands $@ as $1 $2
$3. With the second form, we loses spaces in positional parameters.

As example, the following call

        pkg-config --cflags "one two" three

is wrapped as

        pkgconf --cflags one two three

while we are expecting

        pkgconf --cflags "one two" three

"$@" is really useful when writing wrappers. It passes the positional
arguments *as* they are given.

Double quote $@ to prevent from splitting elements.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-25 21:55:25 +01:00
Gaël PORTAY c667c21f18 package/*/Config.in.host: fix help text check-package warnings
This commit fixes the warnings reported by check-package on the help
text of all package Config.in.host files, related to the formatting of
the help text: should start with a tab, then 2 spaces, then at most 62
characters.

Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-02-14 21:25:04 +01:00
Thomas Petazzoni 3f6d39816b pkgconf: use relative path to STAGING_DIR instead of absolute path
The pkg-config wrapper script is currently generated with absolute
paths to $(STAGING_DIR). However, this will not work properly with
per-package SDK, and each package will be built with a different
STAGING_DIR value.

In order to fix this, we adjust how the pkg-config wrapper script is
generated, so that it uses a relative path to itself: the sysroot (i.e
STAGING_DIR) is always located in $(path of
pkg-config)/../$(STAGING_SUBDIR).

This change is independent from the per-package SDK work, and could be
applied independently from it.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-12-31 18:24:11 +01:00
Thomas Petazzoni 2277fdeca8 package/*/Config.in: fix help text check-package warnings
This commit fixes the warnings reported by check-package on the help
text of all package Config.in files, related to the formatting of the
help text: should start with a tab, then 2 spaces, then at most 62
characters.

The vast majority of warnings fixed were caused by too long lines. A
few warnings were related to spaces being used instead of a tab to
indent the help text.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-12-18 09:22:54 +01:00
Peter Korsgaard 7eb21b66cf pkgconf: expose the host variant in menuconfig
With the addition of the sdk support it may be interesting to build
host-pkgconf even though no packages need it, so expose it in menuconfig.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-09-19 21:44:28 +02:00
Peter Korsgaard 13cb944aab pkgconf: update upstream URL in Config.in
The download location got changed two years ago when the version was bumped
to 0.9.12, but the upstream URL in Config.in wasn't updated.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-09-19 21:44:28 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
Bernd Kuhls 3e74c1312d package/pkgconf: variable pkgdatadir also needs sysroot prefixing, wayland patch III
Needed when wayland support is enabled in xserver_xorg-server.

This patch fixes the final build error:

Making all in xwayland
make[3]: Entering directory '/home/buildroot/br5/output/build/xserver_xorg-server-1.19.0/hw/xwayland'
make[3]: *** No rule to make target '/usr/share/wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml', needed by 'relative-pointer-unstable-v1-client-protocol.h'.  Stop.

when trying to build
http://autobuild.buildroot.net/results/cf0/cf026e9b18e86b9890341612050f4d166a7b822d/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-01-29 23:06:33 +01:00
Gustavo Zacarias 07de512d25 pkgconf: fix incorrect variable-directory sysroot prefixing
According to the pkg-config documents ("specification") when
sysroot-prefixing is enabled via PKG_CONFIG_SYSROOT_DIR this should only
be applied to -I/-L directories (includes, library directories), and not
to all of the other variables that can specify a directory.

However xorg uses mapdir/sdkdir in a similar fashion in what could be
considered an abuse of the spec, hence needs to be prefixed as well.
And what's more, it also uses includedir in a nonstandard fashion just
requesting the value via 'pkg-config --variable=includedir libfoo' which
doesn't pass the standard prefixing rules for the --cflags and --libs
invocation.

This patch makes pkgconf behave in the pkg-config specified way with the
added exception for the includedir, libdir, mapdir and sdkdir variables
which are prefixed.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Tested-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-06 13:31:29 +01:00
Gustavo Zacarias d7f6d320b6 pkgconf: bump to version 0.9.12
Drop patches, they aren't required any more.
It fixes a bug where inline comments cause issues, like:

Libs: -lblah # -lbleh

...it would make pkgconf search for the '#' package

This is required for the nettle 3.1.1 upgrade since howgeed.pc adjusts
Libs according to static/dynamic builds using the comment feature.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-05 16:33:32 +01:00
Fabio Porcedda 014cbd5f31 package/pkgconf: add hash
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-04-20 19:50:54 +02:00
Jerzy Grzegorek bd8c733fb4 packages: indentation cleanup
This commit doesn't touch infra packages.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-03-31 13:57:41 +02:00
Peter Korsgaard 298cd8eaa2 package/*: rename patches according to the new policy
Autogenerated from rename-patch.py (http://patchwork.ozlabs.org/patch/403345)

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-02-03 14:52:56 +01:00
Thomas Petazzoni 665e13c85e Rename BR2_PREFER_STATIC_LIB to BR2_STATIC_LIBS
Since a while, the semantic of BR2_PREFER_STATIC_LIB has been changed
from "prefer static libraries when possible" to "use only static
libraries". The former semantic didn't make much sense, since the user
had absolutely no control/idea of which package would use static
libraries, and which packages would not. Therefore, for quite some
time, we have been starting to enforce that BR2_PREFER_STATIC_LIB
should really build everything with static libraries.

As a consequence, this patch renames BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS, and adjust the Config.in option accordingly.

This also helps preparing the addition of other options to select
shared, shared+static or just static.

Note that we have verified that this commit can be reproduced by
simply doing a global rename of BR2_PREFER_STATIC_LIB to
BR2_STATIC_LIBS plus adding BR2_PREFER_STATIC_LIB to Config.in.legacy.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-12-11 22:48:13 +01:00
Jerzy Grzegorek c7f4b96471 package: remove the trailing slash sign from <PKG>_SITE variable
Since the trailing slash is stripped from $($(PKG)_SITE) by pkg-generic.mk:

$(call DOWNLOAD,$($(PKG)_SITE:/=)/$($(PKG)_SOURCE))

so it is redundant.
This patch removes it from $(PKG)_SITE variable for BR consistency.

Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-07-31 23:17:46 +02:00
Thomas De Schampheleire 17eaa5d3ab pkgconf: don't double prefix lib/include paths with sysroot
A .pc file could contain statements of the form:
    -L/usr/lib
but also:
    -L/path/to/sysroot/usr/lib

The latter form typically occurs when the dependency was configured with a
statement like --with-xxx=$(STAGING_DIR)/usr.

pkgconf only expects the first form, and prefixes it with the specified
sysroot. However, this strategy would result in a double sysroot in the
second case:
    -L/path/to/sysroot/path/to/sysroot/usr/lib

This patch checks for the presence of the sysroot in the specified -L or -I
directives, and only adds the sysroot when not already present.

Partially fixes bug #5750 (https://bugs.busybox.net/show_bug.cgi?id=5750)

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-06-29 12:41:00 +02:00
Vicente Olivert Riera 958c9438cc host-pkgconf: use --static option for static builds
Detect when BR2_PREFER_STATIC_LIBS is selected and modify the host
pkg-config wrapper to append the --static option in that case.

Fixes:
   http://autobuild.buildroot.net/results/161/161446dde7e8e774773eb2b34fd555f5ac22dd02/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Tested-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-05-07 22:39:33 +02:00
Bernd Kuhls f467e8d91a pkgconf: rewrite variable sdkdir, needed by xdriver_xf86-video-intel
- rename patch file to include the apply order

Signed-off-by: Bernd Kuhls <berndkuhls@hotmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-29 23:11:26 +01:00
Gustavo Zacarias 1f95d1a975 pkg-config: remove deprecated
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-06 00:04:56 +01:00
Thomas Petazzoni 9e7d7b3cd4 pkgconf: fix upstream URL
The upstream URL has changed to
http://rabbit.dereferenced.org/~nenolod/distfiles/, updated the
Buildroot pkgconf package accordingly.

Fixes #6638.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reported-by: <masrur.macece@gmail.com>
Cc: <masrur.macece@gmail.com>
2013-10-30 22:49:43 +01:00
Alexandre Belloni 8dfd59d114 Normalize separator size to 80
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-06 22:30:24 +02:00
Thomas Petazzoni bcd02088b3 pkgconf: add license informations
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-01-20 20:42:54 +01:00
Gustavo Zacarias 3ee3e3d22e pkgconf: new package
pkgconf is a drop-in replacement for pkg-config that doesn't need
itself to build and just requires a C89 compiler.

Instead of using a patch for hardcoded sysroot support (as the patch to
pkg-config does) we rely instead on a wrapper script that takes the
appropiate action.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-10-29 21:56:50 +01:00