#1 Add pugixml.pc
Closed 5 years ago by c72578. Opened 6 years ago by c72578.
rpms/ c72578/pugixml 2018-06-26_add_pugixml.pc  into  master

file added
+11
@@ -0,0 +1,11 @@ 

+ prefix=/usr

+ exec_prefix=/usr

+ includedir=/usr/include

+ libdir=

+ 

+ Name: pugixml

+ Description: Light-weight, simple and fast XML parser for C++ with XPath support.

+ URL: https://pugixml.org/

+ Version: 1.9

+ Cflags: -I${includedir}

+ Libs: -L${libdir} -lpugixml

file modified
+13 -2
@@ -2,13 +2,17 @@ 

  

  Name:           pugixml

  Version:        1.9

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        A light-weight C++ XML processing library

  Group:          Development/Libraries

  License:        MIT

  URL:            http://pugixml.org

  

  Source0:        https://github.com/zeux/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz

+ # pugixml.pc is not installed automatically yet in version 1.9.

+ # See: https://github.com/zeux/pugixml/pull/193

+ # Care about libdir (lib, lib64) of the .pc file manually here.

+ Source1:        pugixml.pc

  

  BuildRequires:  cmake gcc-c++

  
@@ -40,7 +44,8 @@ 

  

  %prep

  %setup -q -n %{name}-%{version}%{?prerel:%{prerel}}

- 

+ cp -a %{SOURCE1} .

+ sed -i "s|^libdir=|libdir=%{_libdir}|" pugixml.pc

  

  %build

  rm -rf build && mkdir build && pushd build
@@ -53,6 +58,8 @@ 

  pushd build

  %make_install

  popd

+ mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig

+ install -m 644 pugixml.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/pugixml.pc

  

  # Install optional items.

  mkdir -p %{buildroot}%{_datadir}/%{name}/contrib
@@ -71,6 +78,7 @@ 

  %files devel

  %{_libdir}/*.so

  %{_libdir}/cmake/pugixml/

+ %{_libdir}/pkgconfig/pugixml.pc

  %{_datadir}/%{name}

  %{_includedir}/*.hpp

  
@@ -79,6 +87,9 @@ 

  

  

  %changelog

+ * Tue Jun 26 2018 Wolfgang Stöggl <c72578@yahoo.de> - 1.9-2

+ - Add pugixml.pc for pkg-config

+ 

  * Fri Apr 06 2018 Richard Shaw <hobbes1069@gmail.com> - 1.9-1

  - Update to 1.9.

  

  • Tue Jun 26 2018 Wolfgang Stöggl c72578@yahoo.de - 1.9-2
  • Add pugixml.pc for pkg-config

Motivation for adding pugixml.pc:

pugixml will be a future dependency of Poedit 2.1, which is currently under development.
The configure script of Poedit checks for pugixml using pkg-config.

Successful Koji build: https://koji.fedoraproject.org/koji/taskinfo?taskID=27881168

The missing pugixml.pc has been worked around for now in the Poedit package using the following patch:
poedit-2.1-update_configure_check_for_pugixml.patch

pugixml.pc will be automatically included in the next release of pugixml. Fedora rpms of current git snapshots of pugixml, which include pugixml.pc, can be found here:
https://copr.fedorainfracloud.org/coprs/c72578/pugixml/

Therefore closing this PR ...

Pull-Request has been closed by c72578

5 years ago