[packages/uriparser] - updated to 0.9.3, now uses cmake

qboosh qboosh at pld-linux.org
Sun Apr 28 18:37:57 CEST 2019


commit 49e0eae222cb5df880066d2fa548b36212620a88
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 28 18:38:15 2019 +0200

    - updated to 0.9.3, now uses cmake

 uriparser-doxygen.patch | 39 +++++++++++++++++++++------------
 uriparser.spec          | 58 +++++++++++++++++++++++++++++++------------------
 2 files changed, 62 insertions(+), 35 deletions(-)
---
diff --git a/uriparser.spec b/uriparser.spec
index 7b60a85..17eb89c 100644
--- a/uriparser.spec
+++ b/uriparser.spec
@@ -1,30 +1,28 @@
 #
 # Conditional build
-%bcond_without  doc	# disable generated documentation
-%bcond_without  tests	# disable 'make check'
+%bcond_without  doc		# generated documentation
+%bcond_without  static_libs	# static library
+%bcond_without  tests		# unit tests
 #
 Summary:	A strictly RFC 3986 compliant URI parsing library
 Summary(pl.UTF-8):	Biblioteka analizująca URI ściśle zgodne z RFC 3986
 Name:		uriparser
-Version:	0.9.1
+Version:	0.9.3
 Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/uriparser/uriparser/releases
 Source0:	https://github.com/uriparser/uriparser/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
-# Source0-md5:	c00ac34aaf4ab66c69d1100db3b79a62
+# Source0-md5:	395113a381c47d55e00bccdb5cb6a2da
 Patch0:		%{name}-doxygen.patch
 URL:		https://uriparser.github.io/
-BuildRequires:	autoconf >= 2.61
-BuildRequires:	automake >= 1:1.10.1
+BuildRequires:	cmake >= 3.3
 %{?with_tests:BuildRequires:	gtest-devel >= 1.8.1-3}
 %if %{with doc}
 BuildRequires:	doxygen
 BuildRequires:	graphviz
 %endif
 BuildRequires:	libstdc++-devel
-BuildRequires:	libtool >= 2:2
-BuildRequires:	pkgconfig >= 1:0.9.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -64,25 +62,41 @@ Statyczna biblioteka uriparser.
 %patch0 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__automake}
-%{__autoheader}
-%{__autoconf}
-%configure \
-	 %{!?with_doc:--disable-doc} \
-	 %{!?with_tests:--disable-test}
+%if %{with static_libs}
+install -d build-static
+cd build-static
+%cmake .. \
+	-DBUILD_SHARED_LIBS=OFF \
+	-DURIPARSER_BUILD_DOCS=OFF \
+	-DURIPARSER_BUILD_TESTS=OFF \
+	-DURIPARSER_BUILD_TOOLS=OFF
+
+%{__make}
+cd ..
+%endif
+
+install -d build
+cd build
+%cmake .. \
+	%{!?with_doc:-DURIPARSER_BUILD_DOCS=OFF} \
+	%{!?with_tests:-DURIPARSER_BUILD_TESTS=OFF}
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C build-static install \
+	DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %if %{with doc}
 # packaged as %doc
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/uriparser
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/html
 %endif
 
 %clean
@@ -93,7 +107,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog THANKS
+%doc AUTHORS COPYING ChangeLog GOALS.txt README.md THANKS TODO.txt
 %attr(755,root,root) %{_bindir}/uriparse
 %attr(755,root,root) %{_libdir}/liburiparser.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/liburiparser.so.1
@@ -101,13 +115,15 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %if %{with doc}
-%doc doc/html
+%doc build/doc/html/*
 %endif
 %attr(755,root,root) %{_libdir}/liburiparser.so
-%{_libdir}/liburiparser.la
 %{_includedir}/uriparser
+%{_libdir}/cmake/uriparser-%{version}
 %{_pkgconfigdir}/liburiparser.pc
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/liburiparser.a
+%endif
diff --git a/uriparser-doxygen.patch b/uriparser-doxygen.patch
index 1f8031d..82d4106 100644
--- a/uriparser-doxygen.patch
+++ b/uriparser-doxygen.patch
@@ -1,16 +1,27 @@
---- uriparser-0.8.5/doc/Makefile.am.orig	2018-02-10 08:58:51.675192042 +0100
-+++ uriparser-0.8.5/doc/Makefile.am	2018-02-10 09:00:28.205190940 +0100
-@@ -23,9 +23,11 @@
- 
- ## Install doc files
- install-data-local:
--	$(MKDIR_P) "$(DESTDIR)$(docdir)/html/search"  ## Didn't work with installdirs-local
-+	$(MKDIR_P) "$(DESTDIR)$(docdir)/html"  ## Didn't work with installdirs-local
- 	$(INSTALL_DATA) html/*.css html/*.html html/*.js html/*.md5 html/*.png "$(DESTDIR)$(docdir)/html/"
--	$(INSTALL_DATA) html/search/* "$(DESTDIR)$(docdir)/html/search/"
-+	if test -d html/search ; then \
-+	$(MKDIR_P) "$(DESTDIR)$(docdir)/html/search" ; \
-+	$(INSTALL_DATA) html/search/* "$(DESTDIR)$(docdir)/html/search/" ; fi
- 	-$(INSTALL_DATA) *.qch "$(DESTDIR)$(docdir)/"
+--- uriparser-0.9.3/CMakeLists.txt.orig	2019-04-28 14:04:25.000000000 +0200
++++ uriparser-0.9.3/CMakeLists.txt	2019-04-28 16:00:52.723819252 +0200
+@@ -292,24 +292,10 @@
+ #
+ if(URIPARSER_BUILD_DOCS)
+     find_package(Doxygen REQUIRED dot doxygen)
+-    find_program(QHG_LOCATION
+-        NAMES
+-            qhelpgenerator
+-            qhelpgenerator-qt5  # e.g. CentOS 7
+-    )
+-    include(FindHTMLHelp)
  
+     # Generate Doxyfile
+-    if(HTML_HELP_COMPILER)
+-        set(GENERATE_HTMLHELP YES)
+-    else()
+         set(GENERATE_HTMLHELP NO)
+-    endif()
+-    if(QHG_LOCATION)
+-        set(GENERATE_QHP YES)
+-    else()
+         set(GENERATE_QHP NO)
+-    endif()
+     configure_file(doc/Doxyfile.in doc/Doxyfile @ONLY)
+     configure_file(doc/release.sh.in doc/release.sh @ONLY)
  
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/uriparser.git/commitdiff/49e0eae222cb5df880066d2fa548b36212620a88



More information about the pld-cvs-commit mailing list