SHA256
1
0
forked from pool/pkgconf

- Add /usr/local paths to pkg-config(1) search path for non RPM builds (boo#1175039)

OBS-URL: https://build.opensuse.org/package/show/devel:tools/pkgconf?expand=0&rev=20
This commit is contained in:
Neal Gompa 2020-08-10 05:07:59 +00:00 committed by Git OBS Bridge
parent 70ff42f5fb
commit 04a0b1e938
3 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Aug 10 05:03:07 UTC 2020 - Neal Gompa <ngompa13@gmail.com>
- Add /usr/local paths to pkg-config(1) search path for non RPM builds (boo#1175039)
-------------------------------------------------------------------
Mon Jun 15 08:30:00 UTC 2020 - Callum Farmer <callumjfarmer13@gmail.com>

View File

@ -2,7 +2,7 @@
# spec file for package pkgconf
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 Neal Gompa <ngompa13@gmail.com>.
# Copyright (c) 2020 Neal Gompa <ngompa13@gmail.com>.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -168,12 +168,15 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name}
install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{pkgconf_target_platform}-pkg-config
sed -e "s|@TARGET_PLATFORM@|%{pkgconf_target_platform}|" \
-e "s|@PKGCONF_LIBDIRS_LOCAL@|/usr/local/%{_lib}/pkgconfig:/usr/local/share/pkgconfig:%{pkgconf_libdirs}|" \
-e "s|@PKGCONF_SYSLIBDIR_LOCAL@|/usr/local/%{_lib}:%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR_LOCAL@|/usr/local/include:%{_includedir}|" \
-e "s|@PKGCONF_LIBDIRS@|%{pkgconf_libdirs}|" \
-e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
-i %{buildroot}%{_bindir}/%{pkgconf_target_platform}-pkg-config
ln -sf pkgconf %{buildroot}%{_bindir}/pkg-config
ln -sr %{buildroot}%{_bindir}/%{pkgconf_target_platform}-pkg-config %{buildroot}%{_bindir}/pkg-config
# Link pkg-config(1) to pkgconf(1)
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/pkg-config.1

View File

@ -3,8 +3,14 @@
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}"
if [ -z "${RPM_BUILD_ROOT}" ]; then
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS_LOCAL@}"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR_LOCAL@}"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR_LOCAL@}"
else
export PKG_CONFIG_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}"
export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}"
fi
exec pkgconf "$@"