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

This commit is contained in:
Neal Gompa 2020-08-10 00:56:48 -04:00
parent d7c533a5fe
commit 05c8560a2e
2 changed files with 17 additions and 5 deletions

View File

@ -17,7 +17,7 @@
Name: pkgconf Name: pkgconf
Version: 1.7.3 Version: 1.7.3
Release: 1%{?dist} Release: 2%{?dist}
Summary: Package compiler and linker metadata toolkit Summary: Package compiler and linker metadata toolkit
License: ISC License: ISC
@ -138,12 +138,15 @@ EOM
install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
sed -e "s|@TARGET_PLATFORM@|%{_target_platform}|" \ sed -e "s|@TARGET_PLATFORM@|%{_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_LIBDIRS@|%{pkgconf_libdirs}|" \
-e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \ -e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \
-e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \ -e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
-i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config -i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
ln -sf pkgconf %{buildroot}%{_bindir}/pkg-config ln -sr %{buildroot}%{_bindir}/%{_target_platform}-pkg-config %{buildroot}%{_bindir}/pkg-config
# Link pkg-config(1) to pkgconf(1) # Link pkg-config(1) to pkgconf(1)
echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/pkg-config.1 echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/pkg-config.1
@ -195,6 +198,9 @@ rm -rf %{buildroot}%{_datadir}/aclocal
%endif %endif
%changelog %changelog
* Mon Aug 10 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-2
- Add /usr/local paths to pkg-config(1) search path for non RPM builds
* Mon Aug 03 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-1 * Mon Aug 03 2020 Neal Gompa <ngompa13@gmail.com> - 1.7.3-1
- Update to 1.7.3 - Update to 1.7.3

View File

@ -3,8 +3,14 @@
# Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config # Simple wrapper to tell pkgconf to behave as a platform-specific version of pkg-config
# Platform: @TARGET_PLATFORM@ # Platform: @TARGET_PLATFORM@
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_LIBDIR="${PKG_CONFIG_LIBDIR:-@PKGCONF_LIBDIRS@}"
export PKG_CONFIG_SYSTEM_LIBRARY_PATH="${PKG_CONFIG_SYSTEM_LIBRARY_PATH:-@PKGCONF_SYSLIBDIR@}" 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@}" export PKG_CONFIG_SYSTEM_INCLUDE_PATH="${PKG_CONFIG_SYSTEM_INCLUDE_PATH:-@PKGCONF_SYSINCDIR@}"
fi
exec pkgconf "$@" exec pkgconf "$@"