Accepting request 921316 from home:matwey:branches:devel:libraries:c_c++

- Version 4.3.14
  Add 0001-Add-missing-include-416.patch: fix build
  Add 0001-Use-GNUInstallDirs-cmake-module.patch: fix build
  Add 0001-Fix-TCP-module-build-for-old-gcc-versions.patch: fix build

OBS-URL: https://build.opensuse.org/request/show/921316
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libamqpcpp?expand=0&rev=6
This commit is contained in:
2021-09-24 13:45:28 +00:00
committed by Git OBS Bridge
parent 9970f52e34
commit 16f8fad952
7 changed files with 117 additions and 43 deletions

View File

@@ -0,0 +1,24 @@
From 1dc169810d31110e134fbe032be009f5f8e98d73 Mon Sep 17 00:00:00 2001
From: Raoul Wols <raoulwols@gmail.com>
Date: Thu, 5 Aug 2021 17:20:43 +0200
Subject: [PATCH] Add missing include (#416)
---
src/linux_tcp/sslerrorprinter.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/linux_tcp/sslerrorprinter.h b/src/linux_tcp/sslerrorprinter.h
index 03ddb80..fdfd983 100644
--- a/src/linux_tcp/sslerrorprinter.h
+++ b/src/linux_tcp/sslerrorprinter.h
@@ -18,6 +18,7 @@
* Dependencies
*/
#include "openssl.h"
+#include <string>
#include <memory>
/**
--
2.26.2

View File

@@ -0,0 +1,67 @@
From 31af190a6aa1f3b9bc94ee3aee9aab55d13ff3d5 Mon Sep 17 00:00:00 2001
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
Date: Fri, 24 Sep 2021 15:24:35 +0300
Subject: [PATCH] Use GNUInstallDirs cmake module
Some Linux distributions prefer to use /usr/lib64 destination for libraries at
64bit architectures. To be as generic as possible, use GNUInstallDirs module to
resolve correct destination paths.
The paths can be overrided from the command line as the following:
cmake .. -DCMAKE_INSTALL_LIBDIR:PATH=lib
---
CMakeLists.txt | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0200eb..931d686 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,33 +92,35 @@ endif()
# install rules
# ------------------------------------------------------------------------------------------------------
+include(GNUInstallDirs)
+
if(AMQP-CPP_BUILD_SHARED)
# copy shared lib and its static counter part
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
- RUNTIME DESTINATION lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
else()
# copy static lib
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config
- ARCHIVE DESTINATION lib
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif()
# copy header files
-install(DIRECTORY include/amqpcpp/ DESTINATION include/amqpcpp
+install(DIRECTORY include/amqpcpp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/amqpcpp"
FILES_MATCHING PATTERN "*.h")
-install(FILES include/amqpcpp.h DESTINATION include)
+install(FILES include/amqpcpp.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(EXPORT ${PROJECT_NAME}Config DESTINATION cmake)
+install(EXPORT ${PROJECT_NAME}Config DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/amqpcpp")
export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
set(PRIVATE_LIBS "-llibamqpcc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/amqpcpp.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/amqpcpp.pc" @ONLY)
-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/amqpcpp.pc" DESTINATION lib/pkgconfig)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/amqpcpp.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
# submodule support
# ------------------------------------------------------------------------------------------------------
--
2.26.2

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a60d900a8e32b55b39229f2ea00070156b99c0a1336450d531038e6241a4d8b
size 114947

3
AMQP-CPP-4.3.14.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ac69a407c0edf9f8f56fdbb56acb4e5e9b331e3243cb95f26b861ae794549f4
size 158382

View File

@@ -1,28 +0,0 @@
--- Makefile.orig 2017-01-26 01:16:59.438314000 +0000
+++ Makefile 2017-02-04 03:06:10.386126000 +0000
@@ -1,6 +1,8 @@
PREFIX ?= /usr
-INCLUDE_DIR = ${PREFIX}/include
-LIBRARY_DIR = ${PREFIX}/lib
+LIBDIR ?= ${PREFIX}/lib64
+INCLUDEDIR ?= ${PREFIX}/include
+INCLUDE_DIR = ${DESTDIR}${INCLUDEDIR}
+LIBRARY_DIR = ${DESTDIR}${LIBDIR}
export LIBRARY_NAME = amqpcpp
export SONAME = 2.6
export VERSION = 2.6.2
@@ -24,12 +26,10 @@
$(MAKE) -C src clean
install:
- mkdir -p ${INCLUDE_DIR}/$(LIBRARY_NAME)
- mkdir -p ${LIBRARY_DIR}
+ install -d ${INCLUDE_DIR}/$(LIBRARY_NAME)
+ install -d ${LIBRARY_DIR}
cp -f $(LIBRARY_NAME).h ${INCLUDE_DIR}
cp -f include/*.h ${INCLUDE_DIR}/$(LIBRARY_NAME)
-cp -f src/lib$(LIBRARY_NAME).so.$(VERSION) ${LIBRARY_DIR}
- -cp -f src/lib$(LIBRARY_NAME).a.$(VERSION) ${LIBRARY_DIR}
ln -r -s -f $(LIBRARY_DIR)/lib$(LIBRARY_NAME).so.$(VERSION) $(LIBRARY_DIR)/lib$(LIBRARY_NAME).so.$(SONAME)
ln -r -s -f $(LIBRARY_DIR)/lib$(LIBRARY_NAME).so.$(VERSION) $(LIBRARY_DIR)/lib$(LIBRARY_NAME).so
- ln -r -s -f $(LIBRARY_DIR)/lib$(LIBRARY_NAME).a.$(VERSION) $(LIBRARY_DIR)/lib$(LIBRARY_NAME).a

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Sep 24 09:40:54 UTC 2021 - Matwey Kornilov <matwey.kornilov@gmail.com>
- Version 4.3.14
Add 0001-Add-missing-include-416.patch: fix build
Add 0001-Use-GNUInstallDirs-cmake-module.patch: fix build
-------------------------------------------------------------------
Sat Feb 4 09:06:07 UTC 2017 - jengelh@inai.de

View File

@@ -1,7 +1,7 @@
#
# spec file for package libamqpcpp
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,13 +12,13 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define major 2
%define minor 6
%define patch 2
%define major 4
%define minor 3
%define patch 14
Name: libamqpcpp
Version: %{major}.%{minor}.%{patch}
@@ -26,9 +26,11 @@ Release: 1%{?dist}
Summary: C++ library for asynchronous non-blocking communication with RabbitMQ
License: Apache-2.0
Group: Development/Libraries/C++
Url: https://github.com/CopernicaMarketingSoftware/AMQP-CPP
URL: https://github.com/CopernicaMarketingSoftware/AMQP-CPP
Source0: https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/v%{version}.tar.gz#/AMQP-CPP-%{version}.tar.gz
Patch0: Makefile.patch
Patch0: 0001-Add-missing-include-416.patch
Patch1: 0001-Use-GNUInstallDirs-cmake-module.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: make
@@ -39,8 +41,7 @@ generate frames that can be sent to a RabbitMQ server.
%prep
%setup -q -n AMQP-CPP-%{version}
%patch0
%autosetup -p1 -n AMQP-CPP-%{version}
%package -n %{name}%{major}_%{minor}
Summary: C++ library for asynchronous non-blocking communication with RabbitMQ
@@ -67,10 +68,11 @@ Group: Development/Tools/Other
Provides examples for using %{name}.
%build
make %{?_smp_mflags}
%cmake -DAMQP-CPP_BUILD_SHARED=ON
%cmake_build
%install
make install DESTDIR=%{buildroot} LIBDIR=%{_libdir}
%cmake_install
%post -n %{name}%{major}_%{minor} -p /sbin/ldconfig
@@ -88,6 +90,9 @@ make install DESTDIR=%{buildroot} LIBDIR=%{_libdir}
%{_includedir}/amqpcpp/*.h
%{_includedir}/amqpcpp.h
%{_libdir}/libamqpcpp.so
%dir %{_libdir}/cmake/amqpcpp
%{_libdir}/cmake/amqpcpp/*.cmake
%{_libdir}/pkgconfig/amqpcpp.pc
%files examples
%defattr(-,root,root,-)
@@ -106,7 +111,6 @@ make install DESTDIR=%{buildroot} LIBDIR=%{_libdir}
%else
%license LICENSE
%endif
%{_libdir}/libamqpcpp.so.%{version}
%{_libdir}/libamqpcpp.so.%{major}.%{minor}
%changelog