Add simple wrapper to support platform-specific pkg-config paths (#1513810)
This commit is contained in:
parent
d51479a3ab
commit
cf41f5098b
22
pkgconf.spec
22
pkgconf.spec
@ -12,15 +12,21 @@
|
||||
%global pkgconfig_evr 1:%{pkgconfig_verrel}
|
||||
%endif
|
||||
|
||||
# Search path for pc files for pkgconf
|
||||
%global pkgconf_libdirs %{_libdir}/pkgconfig:%{_datadir}/pkgconfig
|
||||
|
||||
Name: pkgconf
|
||||
Version: 1.3.90
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Package compiler and linker metadata toolkit
|
||||
|
||||
License: ISC
|
||||
URL: http://pkgconf.org/
|
||||
Source0: https://distfiles.dereferenced.org/%{name}/%{name}-%{version}.tar.xz
|
||||
|
||||
# Simple wrapper script to offer platform versions of pkgconfig
|
||||
Source1: platform-pkg-config.in
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: make
|
||||
|
||||
@ -101,7 +107,7 @@ the system provider of pkg-config.
|
||||
%build
|
||||
autoreconf -fiv
|
||||
%configure --disable-static \
|
||||
--with-pkg-config-dir=%{_libdir}/pkgconfig:%{_datadir}/pkgconfig \
|
||||
--with-pkg-config-dir=%{pkgconf_libdirs} \
|
||||
--with-system-includedir=%{_includedir} \
|
||||
--with-system-libdir=%{_libdir}
|
||||
|
||||
@ -118,8 +124,15 @@ make check
|
||||
find %{buildroot} -name '*.la' -print -delete
|
||||
|
||||
%if %{with pkgconfig_compat}
|
||||
install -pm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
|
||||
|
||||
sed -e "s|@TARGET_PLATFORM@|%{_target_platform}|" \
|
||||
-e "s|@PKGCONF_LIBDIRS@|%{pkgconf_libdirs}|" \
|
||||
-e "s|@PKGCONF_SYSLIBDIR@|%{_libdir}|" \
|
||||
-e "s|@PKGCONF_SYSINCDIR@|%{_includedir}|" \
|
||||
-i %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
|
||||
|
||||
ln -sf pkgconf %{buildroot}%{_bindir}/pkg-config
|
||||
ln -sf pkgconf %{buildroot}%{_bindir}/%{_target_platform}-pkg-config
|
||||
|
||||
# I don't have a better way to deal with this...
|
||||
cp -a %{buildroot}%{_mandir}/man1/pkgconf.1 %{buildroot}%{_mandir}/man1/pkg-config.1
|
||||
@ -168,6 +181,9 @@ rm -rf %{buildroot}%{_datadir}/aclocal
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Jan 05 2018 Neal Gompa <ngompa13@gmail.com> - 1.3.90-2
|
||||
- Add simple wrapper to support platform-specific pkg-config paths (#1513810)
|
||||
|
||||
* Tue Dec 19 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3.90-1
|
||||
- Update to 1.3.90
|
||||
|
||||
|
12
platform-pkg-config.in
Normal file
12
platform-pkg-config.in
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 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@}"
|
||||
|
||||
pkgconf $@
|
||||
|
||||
exit $?
|
Loading…
Reference in New Issue
Block a user