summaryrefslogtreecommitdiff
blob: ac7156b3880921cc4c51bfbf10326b1620c4e9e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

CMAKE_ECLASS="cmake"
inherit cmake-multilib

MY_PN=${PN^^}
MY_P=${MY_PN}-${PV}

DESCRIPTION="AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker"
HOMEPAGE="https://github.com/CopernicaMarketingSoftware/AMQP-CPP"
SRC_URI="https://github.com/CopernicaMarketingSoftware/${MY_PN}/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE=""

S="${WORKDIR}/${MY_P}"

src_prepare() {
	sed \
		-e "s:DESTINATION cmake:DESTINATION share/cmake/${MY_PN}:g" \
		-e "s:DESTINATION lib:DESTINATION $(get_libdir):g" \
		-i CMakeLists.txt || die
	cmake_src_prepare
	default
}

src_configure() {
	local mycmakeargs=(
		-DAMQP-CPP_BUILD_SHARED=ON
		-DAMQP-CPP_LINUX_TCP=ON
	)
	cmake-multilib_src_configure
}