[packages/linphone] - added cxx-autotools patch (enable linphone++ build when using autotools; cmake doesn't provide .pc

qboosh qboosh at pld-linux.org
Mon Jun 17 19:34:12 CEST 2019


commit 94b9c09c879954ebcd46d8830aa57041d0ebb2ac
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jun 17 19:35:18 2019 +0200

    - added cxx-autotools patch (enable linphone++ build when using autotools; cmake doesn't provide .pc or appdata files)
    - added no-rebuild patch (avoid rebuilding on make install)
    - release 6

 linphone-cxx-autotools.patch | 123 +++++++++++++++++++++++++++++++++++++++++++
 linphone-no-rebuild.patch    |  11 ++++
 linphone.spec                | 101 ++++++++++++++++++++++++++++++++---
 3 files changed, 228 insertions(+), 7 deletions(-)
---
diff --git a/linphone.spec b/linphone.spec
index 7f67a3c..1e7eb06 100644
--- a/linphone.spec
+++ b/linphone.spec
@@ -20,13 +20,15 @@ Summary:	Linphone Internet Phone
 Summary(pl.UTF-8):	Linphone - telefon internetowy
 Name:		linphone
 Version:	3.12.0
-Release:	5
+Release:	6
 License:	GPL v2+
 Group:		Applications/Communications
 Source0:	http://linphone.org/releases/sources/linphone/%{name}-%{version}.tar.gz
 # Source0-md5:	8292dbaa0a5d0a448dcbbee125e947e4
 Patch0:		%{name}-sh.patch
 Patch1:		build.patch
+Patch2:		%{name}-cxx-autotools.patch
+Patch3:		%{name}-no-rebuild.patch
 URL:		http://www.linphone.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake >= 1:1.9
@@ -53,6 +55,8 @@ BuildRequires:	ncurses-devel
 %{?with_system_ortp:BuildRequires:	ortp-devel >= 0.24.0}
 BuildRequires:	pkgconfig
 BuildRequires:	polarssl-devel >= 1.3
+# to generate C++ wrappers
+BuildRequires:	python-pystache
 BuildRequires:	readline-devel
 BuildRequires:	rpmbuild(macros) >= 1.98
 BuildRequires:	speex-devel >= 1:1.1.6
@@ -182,10 +186,60 @@ Static version of Linphone libraries.
 %description static -l pl.UTF-8
 Statyczne wersje bibliotek Linphone.
 
+%package apidocs
+Summary:	API documentation for Linphone library
+Summary(pl.UTF-8):	Dokumentacja API biblioteki Linphone
+Group:		Documentation
+
+%description apidocs
+API documentation for Linphone library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki Linphone.
+
+%package c++
+Summary:	C++ wrapper for Linphone library
+Summary(pl.UTF-8):	Interfejs C++ do biblioteki Linphone
+Group:		Libraries
+Requires:	%{name}-libs = %{version}-%{release}
+
+%description c++
+C++ wrapper for Linphone library.
+
+%description c++ -l pl.UTF-8
+Interfejs C++ do biblioteki Linphone.
+
+%package c++-devel
+Summary:	Headers for liblinphone++ library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki liblinphone++
+Group:		Development/Libraries
+Requires:	%{name}-c++ = %{version}-%{release}
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description c++-devel
+Headers for liblinphone++ library.
+
+%description c++-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki liblinphone++.
+
+%package c++-static
+Summary:	Static liblinphone++ library
+Summary(pl.UTF-8):	Statyczna biblioteka liblinphone++
+Group:		Development/Libraries
+Requires:	%{name}-c++-devel = %{version}-%{release}
+
+%description c++-static
+Static liblinphone++ library.
+
+%description c++-static -l pl.UTF-8
+Statyczna biblioteka liblinphone++.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 [ ! -e gitversion.h ] && echo '#define LIBLINPHONE_GIT_VERSION "%{version}"' > coreapi/gitversion.h
 
@@ -253,6 +307,10 @@ cd ..
 	GITDESCRIBE=/bin/true \
 	GIT_TAG=%{version}
 
+# disable installation of HTML docs (will be packaged as %doc)
+%{__tar} --delete -f coreapi/help/doc/doxygen/html/html.tar --wildcards '*'
+%{__tar} --delete -f coreapi/help/doc/doxygen/xml/xml.tar --wildcards '*'
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_desktopdir} \
@@ -261,7 +319,14 @@ install -d $RPM_BUILD_ROOT%{_desktopdir} \
 %{__make} install \
 	GITDESCRIBE=/bin/true \
 	GIT_TAG=%{version} \
-	DESTDIR=$RPM_BUILD_ROOT
+	DESTDIR=$RPM_BUILD_ROOT \
+	tuto_DATA=
+
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/liblinphone*.la
+%if %{without system_mediastreamer} || %{without system_ortp}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/*.la
+%endif
 
 install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
 
@@ -284,13 +349,16 @@ install pixmaps/%{name}.png $RPM_BUILD_ROOT%{_pixmapsdir}
 rm -rf $RPM_BUILD_ROOT
 
 %if %{without system_mediastreamer} || %{without system_ortp}
-%post libs
+%post	libs
 /sbin/ldconfig %{_libdir}/%{name}
 %else
-%post libs -p /sbin/ldconfig
+%post	libs -p /sbin/ldconfig
 %endif
 
-%postun libs -p /sbin/ldconfig
+%postun	libs -p /sbin/ldconfig
+
+%post	c++ -p /sbin/ldconfig
+%postun	c++ -p /sbin/ldconfig
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
@@ -351,8 +419,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/liblinphonetester.so
 %{_includedir}/linphone
 %{_pkgconfigdir}/linphone.pc
-%{_libdir}/liblinphone.la
-%{_libdir}/liblinphonetester.la
 %if %{without system_mediastreamer} || %{without system_ortp}
 %dir %{_libdir}/%{name}/include
 %dir %{_libdir}/%{name}/pkgconfig
@@ -382,3 +448,24 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/%{name}/libortp.a
 %endif
 %endif
+
+%files apidocs
+%defattr(644,root,root,755)
+%doc coreapi/help/doc/doxygen/html/{*.css,*.html,*.js,*.png}
+
+%files c++
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblinphone++.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblinphone++.so.9
+
+%files c++-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/liblinphone++.so
+%{_includedir}/linphone++
+%{_pkgconfigdir}/linphone++.pc
+
+%if %{with static_libs}
+%files c++-static
+%defattr(644,root,root,755)
+%{_libdir}/liblinphone++.a
+%endif
diff --git a/linphone-cxx-autotools.patch b/linphone-cxx-autotools.patch
new file mode 100644
index 0000000..718d852
--- /dev/null
+++ b/linphone-cxx-autotools.patch
@@ -0,0 +1,123 @@
+--- linphone-3.12.0/wrappers/cpp/Makefile.am.orig	1970-01-01 01:00:00.000000000 +0100
++++ linphone-3.12.0/wrappers/cpp/Makefile.am	2019-06-09 20:54:05.193613161 +0200
+@@ -0,0 +1,20 @@
++lib_LTLIBRARIES = liblinphone++.la
++liblinphone___la_CPPFLAGS = -DLINPHONECXX_EXPORTS
++liblinphone___la_CXXFLAGS = -I$(builddir)/include -I$(top_builddir)/include -I$(top_srcdir)/include $(BCTOOLBOX_CFLAGS) $(BELLESIP_CFLAGS)
++liblinphone___la_SOURCES = object.cc tools.cc
++nodist_liblinphone___la_SOURCES = src/linphone++.cc
++liblinphone___la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined
++liblinphone___la_LIBADD = $(top_builddir)/coreapi/liblinphone.la $(BCTOOLBOX_LIBS) $(BELLESIP_LIBS)
++
++linphonexxincludedir = $(includedir)/linphone++
++linphonexxinclude_HEADERS = object.hh
++
++pkgconfigdir = $(libdir)/pkgconfig
++nodist_pkgconfig_DATA = linphone++.pc
++
++src/linphone++.cc include/linphone++/linphone.hh: $(top_srcdir)/tools/genapixml.py $(top_srcdir)/tools/metadoc.py $(top_srcdir)/tools/abstractapi.py genwrapper.py class_header.mustache class_impl.mustache enums_header.mustache main_header.mustache $(top_builddir)/coreapi/help/doc/doxygen/xml/index.xml
++	$(PYTHON) $(srcdir)/genwrapper.py $(top_builddir)/coreapi/help/doc/doxygen/xml
++
++install-data-hook:
++	install -d $(DESTDIR)$(linphonexxincludedir)
++	cp -p $(builddir)/include/linphone++/*.hh $(DESTDIR)$(linphonexxincludedir)
+--- linphone-3.12.0/wrappers/cpp/linphone++.pc.in.orig	1970-01-01 01:00:00.000000000 +0100
++++ linphone-3.12.0/wrappers/cpp/linphone++.pc.in	2019-06-17 17:53:28.781100707 +0200
+@@ -0,0 +1,11 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Requires.private: linphone bctoolbox belle-sip
++Name: liblinphone++
++Description: C++ wrapper for linphone libraries.
++Version: @VERSION@
++Libs: -llinphone++
++Cflags: -I$(includedir)
+--- linphone-3.12.0/Makefile.am.orig	2017-04-06 11:25:59.000000000 +0200
++++ linphone-3.12.0/Makefile.am	2019-06-09 20:54:34.416788179 +0200
+@@ -4,7 +4,7 @@
+ ACLOCAL_AMFLAGS = -I m4 $(ACLOCAL_MACOS_FLAGS)
+ 
+ SUBDIRS = build m4 pixmaps po @ORTP_DIR@ @MS2_DIR@ \
+-		coreapi console gtk share scripts tools daemon tester include
++		coreapi console gtk share scripts tools daemon tester include wrappers/cpp
+ 
+ GITVERSION=`cd $(top_srcdir) && git describe --always || echo $(VERSION)`
+ 
+--- linphone-3.12.0/configure.ac.orig	2019-06-09 20:37:36.645635251 +0200
++++ linphone-3.12.0/configure.ac	2019-06-09 20:54:59.119987683 +0200
+@@ -1073,6 +1073,12 @@
+ 	include/Makefile
+ 	include/linphone/Makefile
+ 	coreapi/Makefile
++	coreapi/help/Makefile
++	coreapi/help/doc/Makefile
++	coreapi/help/doc/doxygen/Doxyfile
++	coreapi/help/doc/doxygen/Makefile
++	coreapi/help/examples/Makefile
++	coreapi/help/examples/C/Makefile
+ 	tester/Makefile
+ 	gtk/Makefile
+ 	console/Makefile
+@@ -1089,6 +1089,8 @@
+ 	share/audio-assistant.desktop
+ 	scripts/Makefile
+ 	tools/Makefile
++	wrappers/cpp/Makefile
++	wrappers/cpp/linphone++.pc
+ 	linphone.spec
+ 	linphone.iss
+ ])
+--- linphone-3.12.0/coreapi/Makefile.am.orig	2017-06-20 12:03:59.000000000 +0200
++++ linphone-3.12.0/coreapi/Makefile.am	2019-06-09 21:50:46.738518743 +0200
+@@ -13,7 +13,7 @@
+ 
+ ECHO=/bin/echo
+ 
+-SUBDIRS=.
++SUBDIRS=. help
+ 
+ EXTRA_DIST=linphonecore_jni.cc $(GITVERSION_FILE)
+ 
+--- linphone-3.12.0/coreapi/help/doc/doxygen/Makefile.am.orig	2017-06-20 12:03:59.000000000 +0200
++++ linphone-3.12.0/coreapi/help/doc/doxygen/Makefile.am	2019-06-10 19:34:47.457985724 +0200
+@@ -1,6 +1,6 @@
+ EXTRA_DIST=Doxyfile.in doxygen.dox
+ 
+-SOURCES=doxygen.dox $(top_srcdir)/coreapi/help/*.c $(top_srcdir)/coreapi/*.c $(top_srcdir)/coreapi/*.h
++SOURCES=doxygen.dox $(top_srcdir)/coreapi/*.c $(top_srcdir)/coreapi/*.h
+ 
+ if HAVE_DOXYGEN
+ 
+@@ -9,21 +9,21 @@
+ doc_htmldir=$(pkgdocdir)/html
+ doc_xmldir=$(pkgdocdir)/xml
+ 
+-doc_html_DATA = $(top_builddir)/coreapi/help/doc/html/html.tar
++doc_html_DATA = $(top_builddir)/coreapi/help/doc/doxygen/html/html.tar
+ 
+-$(doc_html_DATA): $(top_builddir)/coreapi/help/doc/html/index.html
+-	cd $(top_builddir)/coreapi/help/doc/html/ && tar cf html.tar *
++$(doc_html_DATA): $(top_builddir)/coreapi/help/doc/doxygen/html/index.html
++	cd $(top_builddir)/coreapi/help/doc/doxygen/html/ && tar cf html.tar *
+ 
+-$(top_builddir)/coreapi/help/doc/html/index.html: $(SOURCES) Doxyfile Makefile.am
++$(top_builddir)/coreapi/help/doc/doxygen/html/index.html: $(SOURCES) Doxyfile Makefile.am
+ 	rm -rf doc
+ 	$(DOXYGEN) Doxyfile
+ 
+-doc_xml_DATA = $(top_builddir)/coreapi/help/doc/xml/xml.tar
++doc_xml_DATA = $(top_builddir)/coreapi/help/doc/doxygen/xml/xml.tar
+ 
+-$(doc_xml_DATA): $(top_builddir)/coreapi/help/doc/xml/index.xml
+-	cd $(top_builddir)/coreapi/help/doc/xml/ && tar cf xml.tar *
++$(doc_xml_DATA): $(top_builddir)/coreapi/help/doc/doxygen/xml/index.xml
++	cd $(top_builddir)/coreapi/help/doc/doxygen/xml/ && tar cf xml.tar *
+ 
+-$(top_builddir)/coreapi/help/doc/xml/index.xml: $(top_builddir)/coreapi/help/doc/html/index.html
++$(top_builddir)/coreapi/help/doc/doxygen/xml/index.xml: $(top_builddir)/coreapi/help/doc/doxygen/html/index.html
+ 
+ 
+ install-data-hook:
diff --git a/linphone-no-rebuild.patch b/linphone-no-rebuild.patch
new file mode 100644
index 0000000..e5ea8f7
--- /dev/null
+++ b/linphone-no-rebuild.patch
@@ -0,0 +1,11 @@
+--- linphone-3.12.0/coreapi/Makefile.am.orig	2019-06-17 18:45:57.727374734 +0200
++++ linphone-3.12.0/coreapi/Makefile.am	2019-06-17 19:13:50.548312285 +0200
+@@ -205,7 +205,7 @@
+ 			cp -f $(builddir)/$(GITVERSION_FILE_TMP) $(builddir)/$(GITVERSION_FILE) ; \
+ 		fi ; \
+ 		rm -f $(builddir)/$(GITVERSION_FILE_TMP) ; \
+-	else \
++	elif test ! -f $(GITVERSION_FILE) ; then \
+ 		touch $(GITVERSION_FILE) ; \
+ 	fi
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/linphone.git/commitdiff/94b9c09c879954ebcd46d8830aa57041d0ebb2ac



More information about the pld-cvs-commit mailing list