[packages/libphonenumber] - new - link patch to fix internal linking
qboosh
qboosh at pld-linux.org
Wed Apr 29 17:21:54 CEST 2020
commit 874379c9b6b94932ec6e5408512112c194628084
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Apr 29 17:22:04 2020 +0200
- new
- link patch to fix internal linking
libphonenumber-link.patch | 11 +++++
libphonenumber.spec | 111 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+)
---
diff --git a/libphonenumber.spec b/libphonenumber.spec
new file mode 100644
index 0000000..ec34ad0
--- /dev/null
+++ b/libphonenumber.spec
@@ -0,0 +1,111 @@
+# TODO: java package
+#
+# Conditional build:
+%bcond_with re2 # RE2 regular expressions engine (broken as of 8.12.2)
+%bcond_without static_libs # static libraries
+#
+Summary: Library to handle international phone numbers
+Summary(pl.UTF-8): Biblioteka do obsługi międzynarodowych numerów telefonów
+Name: libphonenumber
+Version: 8.12.2
+Release: 1
+License: Apache v2.0 with BSD parts
+Group: Libraries
+#Source0Download: https://github.com/google/libphonenumber/releases/
+Source0: https://github.com/google/libphonenumber/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 0924eb4ca6e9b00e9111d44e01284e66
+Patch0: %{name}-link.patch
+URL: https://github.com/google/libphonenumber/
+BuildRequires: boost-devel >= 1.40.0
+BuildRequires: cmake >= 2.8.5
+BuildRequires: gtest-devel
+BuildRequires: jre
+BuildRequires: libicu-devel >= 4.4
+BuildRequires: libstdc++-devel
+BuildRequires: pkgconfig
+BuildRequires: protobuf-devel >= 2.4
+%{?with_re2:BuildRequires: re2-devel}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Google's common C++ library for parsing, formatting, storing and
+validating international phone numbers.
+
+%description -l pl.UTF-8
+Wspólna biblioteka C++ Google'a do analizy, formatowania,
+przechowywania oraz sprawdzania poprawności międzynarodowych numerów
+telefonów.
+
+%package devel
+Summary: Header files for libphonenumber library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libphonenumber
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: boost-devel >= 1.40.0
+Requires: libicu-devel
+Requires: libstdc++-devel
+Requires: protobuf-devel
+
+%description devel
+Header files for libphonenumber library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libphonenumber.
+
+%package static
+Summary: Static libphonenumber libraries
+Summary(pl.UTF-8): Statyczne biblioteki libphonenumber
+Group: Development/Libraries
+Requires: %{name}-devel = %{version}-%{release}
+
+%description static
+Static libphonenumber libraries.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki libphonenumber.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+install -d build/cpp
+cd build/cpp
+%cmake ../../cpp \
+ %{!?with_static_libs:-DBUILD_STATIC_LIB=OFF} \
+ %{?with_re2:-DUSE_RE2=ON}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build/cpp install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CONTRIBUTORS FALSEHOODS.md FAQ.md LICENSE.Chromium README.md release_notes.txt cpp/{LICENSE,README}
+%attr(755,root,root) %{_libdir}/libgeocoding.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgeocoding.so.8
+%attr(755,root,root) %{_libdir}/libphonenumber.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libphonenumber.so.8
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libgeocoding.so
+%attr(755,root,root) %{_libdir}/libphonenumber.so
+%{_includedir}/phonenumbers
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libgeocoding.a
+%{_libdir}/libphonenumber.a
+%endif
diff --git a/libphonenumber-link.patch b/libphonenumber-link.patch
new file mode 100644
index 0000000..241ee8f
--- /dev/null
+++ b/libphonenumber-link.patch
@@ -0,0 +1,11 @@
+--- libphonenumber-8.12.2/cpp/CMakeLists.txt.orig 2020-04-22 12:05:08.000000000 +0200
++++ libphonenumber-8.12.2/cpp/CMakeLists.txt 2020-04-29 06:39:39.838900132 +0200
+@@ -442,7 +442,7 @@
+ # Note that the subset of base/ on which the geocoder relies is implemented
+ # on top of Boost header-only libraries (e.g. scoped_ptr.hpp).
+ target_link_libraries (geocoding ${LIBRARY_DEPS})
+- target_link_libraries (geocoding-shared ${LIBRARY_DEPS})
++ target_link_libraries (geocoding-shared phonenumber-shared ${LIBRARY_DEPS})
+ endif ()
+
+ # Build a specific library for testing purposes.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libphonenumber.git/commitdiff/874379c9b6b94932ec6e5408512112c194628084
More information about the pld-cvs-commit
mailing list