mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-07 05:57:07 -08:00
dev-cpp/simpleini: add 4.20
Upstream added a CMakeLists but it does not really do anything for us (no install target, no tests handling, no .cmake to install), and is intended for in-source usage. So no changes in that regard. However the normal Makefiles did get some improvements, there's an install target and tests' now use pkg-config to find gtest. Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST simpleini-4.19.tar.gz 62793 BLAKE2B f32a25743c89f954a0b1cce2cb29584d63083922b9b56d91b39412617067f7316ecb897474a7f3a4d550569a0d007e51780d3532079966a7ba72e2b89ff5a5cc SHA512 3f0f3120aca3350bab66fe1727f4d15536d933a0840a17b49203c2220fab7ace4383d856c1b77a84f4e36c9a5df0c3eb937ad729c977f84e7163d7e2cff400c5
|
||||
DIST simpleini-4.20.tar.gz 64807 BLAKE2B 5179fbdc1a46b352590a20bcaafa88d905d75ef3334becc03caf11f5b8c4bd3673971d688f9ec0077af3192244b29befd217dfa4ef218594f68c917698727b72 SHA512 e2518d10d63026b0fd423cbd77372b60bc693e8ec1878a91ab05364a49b48d38d8d379247a27a8ffc5582ba19e333b10996f4bf48899c06c567ae0dea067a9e3
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Use $(PKG_CONFIG), and also avoid repeating the calls for every objects.
|
||||
--- a/tests/Makefile
|
||||
+++ b/tests/Makefile
|
||||
@@ -2,2 +2,2 @@
|
||||
-CXXFLAGS+=-Wall -std=c++14 `pkg-config --cflags gtest_main`
|
||||
-LDFLAGS+=`pkg-config --libs gtest_main`
|
||||
+CXXFLAGS:=-Wall -std=c++14 $(shell $(PKG_CONFIG) --cflags gtest_main) $(CXXFLAGS)
|
||||
+LDFLAGS:=$(LDFLAGS) $(shell $(PKG_CONFIG) --libs gtest_main)
|
||||
@@ -0,0 +1,36 @@
|
||||
# Copyright 2022-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit toolchain-funcs
|
||||
|
||||
DESCRIPTION="C++ library providing a simple API to read and write INI-style files"
|
||||
HOMEPAGE="https://github.com/brofield/simpleini/"
|
||||
SRC_URI="https://github.com/brofield/simpleini/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
DEPEND="test? ( dev-cpp/gtest )"
|
||||
BDEPEND="test? ( virtual/pkgconfig )"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-4.20-pkgconfig-var.patch
|
||||
)
|
||||
|
||||
src_compile() {
|
||||
if use test; then
|
||||
tc-export CXX PKG_CONFIG
|
||||
emake -C tests "${emakeargs[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# note: this skips ConvertUTF, can use -DSI_CONVERT_ICU instead if needed
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install
|
||||
einstalldocs
|
||||
}
|
||||
Reference in New Issue
Block a user