[packages/cppdap] - new
qboosh
qboosh at pld-linux.org
Wed Aug 23 17:44:07 CEST 2023
commit c35c759e087acbc613ece16ad27bceb922fd7cb1
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Aug 23 17:12:24 2023 +0200
- new
cppdap-shared.patch | 24 ++++++++++++++++++
cppdap.spec | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+)
---
diff --git a/cppdap.spec b/cppdap.spec
new file mode 100644
index 0000000..1baa2d4
--- /dev/null
+++ b/cppdap.spec
@@ -0,0 +1,73 @@
+Summary: C++11 implementation of the Debug Adapter Protocol
+Summary(pl.UTF-8): Implementacja Debug Adapter Protocol w C++11
+Name: cppdap
+%define tag_ver 1.58.0-a
+Version: %(echo %{tag_ver} | tr -d -)
+Release: 1
+License: Apache v2.0
+Group: Libraries
+#Source0Download: https://github.com/google/cppdap/tags
+Source0: https://github.com/google/cppdap/archive/dap-%{tag_ver}.tar.gz
+# Source0-md5: 24465ac50c76a19565f07f4a723b78cb
+Patch0: %{name}-shared.patch
+URL: https://github.com/google/cppdap
+BuildRequires: cmake >= 3.13
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: nlohmann-json-devel
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+cppdap is a C++11 library ("SDK") implementation of the Debug Adapter
+Protocol (<https://microsoft.github.io/debug-adapter-protocol/>),
+providing an API for implementing a DAP client or server.
+
+%description -l pl.UTF-8
+cppdap to implementacja w postaci biblioteki ("SDK") C++11 protokołu
+Debug Adapter Protocol
+(<https://microsoft.github.io/debug-adapter-protocol/>), dostarczająca
+API do implementowania klienta lub serwera DAP.
+
+%package devel
+Summary: Header files for cppdap library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cppdap
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libstdc++-devel >= 6:4.7
+
+%description devel
+Header files for cppdap library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki cppdap.
+
+%prep
+%setup -q -n %{name}-dap-%{tag_ver}
+%patch0 -p1
+
+%build
+%cmake -B build \
+ -DCPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE=ON
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build 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 README.md
+%attr(755,root,root) %{_libdir}/libcppdap.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/dap
+%{_libdir}/cmake/cppdap
diff --git a/cppdap-shared.patch b/cppdap-shared.patch
new file mode 100644
index 0000000..1c3d1d4
--- /dev/null
+++ b/cppdap-shared.patch
@@ -0,0 +1,24 @@
+From 6a3cc9a804e83c40f4202fe6a34c8911d2c7c12b Mon Sep 17 00:00:00 2001
+From: Julien Schueller <schueller at phimeca.com>
+Date: Thu, 13 Jul 2023 19:36:52 +0200
+Subject: [PATCH] CMake: Allow to build dynamic lib
+
+This allows taking cmake BUILD_SHARED_LIBS option to decide whether to build a shared or static lib
+This does not change the default (static)
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 717f02e..3a14f59 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -226,7 +226,7 @@ endfunction(cppdap_set_target_options)
+ ###########################################################
+
+ # dap
+-add_library(cppdap STATIC ${CPPDAP_LIST})
++add_library(cppdap ${CPPDAP_LIST})
+ set_target_properties(cppdap PROPERTIES POSITION_INDEPENDENT_CODE 1)
+
+ cppdap_set_target_options(cppdap)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/cppdap.git/commitdiff/c35c759e087acbc613ece16ad27bceb922fd7cb1
More information about the pld-cvs-commit
mailing list