summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-07-14 05:42:56 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-07-14 06:07:49 -0400
commit76c715b4aeea02b52e97879d0d16e33cc89037e4 (patch)
treedbe9edf80508f5ca679fc29d0c6de237138d635b /dev-cpp/simpleini
parentx11-terms/kitty: Backport fix for musl 1.2.4 (diff)
downloadgentoo-76c715b4aeea02b52e97879d0d16e33cc89037e4.tar.gz
gentoo-76c715b4aeea02b52e97879d0d16e33cc89037e4.tar.bz2
gentoo-76c715b4aeea02b52e97879d0d16e33cc89037e4.zip
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>
Diffstat (limited to 'dev-cpp/simpleini')
-rw-r--r--dev-cpp/simpleini/Manifest1
-rw-r--r--dev-cpp/simpleini/files/simpleini-4.20-pkgconfig-var.patch8
-rw-r--r--dev-cpp/simpleini/simpleini-4.20.ebuild36
3 files changed, 45 insertions, 0 deletions
diff --git a/dev-cpp/simpleini/Manifest b/dev-cpp/simpleini/Manifest
index 36c11c57d1cb..fe11c1acfa25 100644
--- a/dev-cpp/simpleini/Manifest
+++ b/dev-cpp/simpleini/Manifest
@@ -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
diff --git a/dev-cpp/simpleini/files/simpleini-4.20-pkgconfig-var.patch b/dev-cpp/simpleini/files/simpleini-4.20-pkgconfig-var.patch
new file mode 100644
index 000000000000..1250a01f3ca2
--- /dev/null
+++ b/dev-cpp/simpleini/files/simpleini-4.20-pkgconfig-var.patch
@@ -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)
diff --git a/dev-cpp/simpleini/simpleini-4.20.ebuild b/dev-cpp/simpleini/simpleini-4.20.ebuild
new file mode 100644
index 000000000000..ccc5bfadc70d
--- /dev/null
+++ b/dev-cpp/simpleini/simpleini-4.20.ebuild
@@ -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
+}