summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-10-06 19:44:09 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-10-06 20:55:08 -0400
commit1a25bc6332df62e2ebce72000572a62cbc83d7dc (patch)
tree4a2bf741f4bd6742387f79b7855d6eddfd476a68 /dev-libs/libgrapheme
parentnet-misc/openssh: add 9.1_p1 (diff)
downloadgentoo-1a25bc6332df62e2ebce72000572a62cbc83d7dc.tar.gz
gentoo-1a25bc6332df62e2ebce72000572a62cbc83d7dc.tar.bz2
gentoo-1a25bc6332df62e2ebce72000572a62cbc83d7dc.zip
dev-libs/libgrapheme: add 2.0.0
Upstream switched to semver and defines the soname as major.minor, so introduce subslot to match this. Patch no longer needed thanks to upstream changes. sed is not needed per-se but it's simpler than passing everything (to read from env given this is a posix makefile). Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-libs/libgrapheme')
-rw-r--r--dev-libs/libgrapheme/Manifest1
-rw-r--r--dev-libs/libgrapheme/libgrapheme-2.0.0.ebuild38
2 files changed, 39 insertions, 0 deletions
diff --git a/dev-libs/libgrapheme/Manifest b/dev-libs/libgrapheme/Manifest
index 3caacef0b4e6..dc1e795e5493 100644
--- a/dev-libs/libgrapheme/Manifest
+++ b/dev-libs/libgrapheme/Manifest
@@ -1 +1,2 @@
DIST libgrapheme-1.tar.gz 67912 BLAKE2B 62e82018b2a45f7259811fbfbae45741252ffedafa095d8e373d62220fc50141afe359d171b723e007120ac307db540c03cfe6e60ecedf1eea0be5518caa9bcb SHA512 c0f3300d30707266e44ee01f359204720ae1770788cec509b03be914f8581caae144fb72952d111f108ebef21fd96b5ca2cf69463ee569bce4bba8645942ee05
+DIST libgrapheme-2.0.0.tar.gz 844784 BLAKE2B 02e52bbbf69276bf2ed43b7acb0b95d59ba5e435514d62827d2e41f1605ba207ab808864df149527798f51e8ae8025fe7880aac738c66dd35bec0ad042f34d85 SHA512 c5b55a4201958f10cabd2ad228cda8ea35b6fc3260d6018f2c01a82ce265369c2f4ebd36e7e66aabf7458f86791e97754b544acac136c8acd874ea708efe961a
diff --git a/dev-libs/libgrapheme/libgrapheme-2.0.0.ebuild b/dev-libs/libgrapheme/libgrapheme-2.0.0.ebuild
new file mode 100644
index 000000000000..9cd9b0bf37de
--- /dev/null
+++ b/dev-libs/libgrapheme/libgrapheme-2.0.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit flag-o-matic toolchain-funcs
+
+DESCRIPTION="Unicode string library"
+HOMEPAGE="https://libs.suckless.org/libgrapheme/"
+SRC_URI="https://dl.suckless.org/libgrapheme/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+# upstream suggests keeping the static option, others have requested it too
+IUSE="static-libs"
+
+src_prepare() {
+ default
+
+ append-cflags ${CPPFLAGS}
+ tc-export CC AR RANLIB
+ tc-export_build_env BUILD_CC
+ sed -Ei '/^(BUILD_|)(CC|AR|RANLIB|CFLAGS|LDFLAGS|LDCONFIG).*=/d' config.mk || die
+}
+
+src_install() {
+ local emakeargs=(
+ DESTDIR="${D}"
+ PREFIX="${EPREFIX}"/usr
+ LIBPREFIX="${EPREFIX}"/usr/$(get_libdir)
+ )
+
+ emake "${emakeargs[@]}" install
+ einstalldocs
+
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/${PN}.a || die
+}