public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgrapheme/, dev-libs/libgrapheme/files/
Date: Thu, 23 Dec 2021 01:03:12 +0000 (UTC)	[thread overview]
Message-ID: <1640221087.1c7c50d3a3ee8391ba2cd7dc6a41f647fb2c6d7f.ionen@gentoo> (raw)

commit:     1c7c50d3a3ee8391ba2cd7dc6a41f647fb2c6d7f
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 23 00:20:33 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu Dec 23 00:58:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c7c50d3

dev-libs/libgrapheme: initial import, version 1

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-libs/libgrapheme/Manifest                      |  1 +
 .../libgrapheme/files/libgrapheme-1-make.patch     | 32 +++++++++++++++++++
 dev-libs/libgrapheme/libgrapheme-1.ebuild          | 37 ++++++++++++++++++++++
 dev-libs/libgrapheme/metadata.xml                  |  8 +++++
 4 files changed, 78 insertions(+)

diff --git a/dev-libs/libgrapheme/Manifest b/dev-libs/libgrapheme/Manifest
new file mode 100644
index 000000000000..3caacef0b4e6
--- /dev/null
+++ b/dev-libs/libgrapheme/Manifest
@@ -0,0 +1 @@
+DIST libgrapheme-1.tar.gz 67912 BLAKE2B 62e82018b2a45f7259811fbfbae45741252ffedafa095d8e373d62220fc50141afe359d171b723e007120ac307db540c03cfe6e60ecedf1eea0be5518caa9bcb SHA512 c0f3300d30707266e44ee01f359204720ae1770788cec509b03be914f8581caae144fb72952d111f108ebef21fd96b5ca2cf69463ee569bce4bba8645942ee05

diff --git a/dev-libs/libgrapheme/files/libgrapheme-1-make.patch b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch
new file mode 100644
index 000000000000..363df6cfb51e
--- /dev/null
+++ b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch
@@ -0,0 +1,32 @@
+Adjust config.mk variables, fix cross-compilation, and don't run ldconfig.
+--- a/Makefile
++++ b/Makefile
+@@ -68,3 +68,6 @@
+ $(GEN):
+-	$(CC) -o $@ $(LDFLAGS) $@.o gen/util.o
++	$(BUILD_CC) -o $@ $(BUILD_LDFLAGS) $@.o gen/util.o
++
++gen/%.o:
++	$(BUILD_CC) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $<
+ 
+@@ -84,3 +87,3 @@
+ libgrapheme.so: $(SRC:=.o)
+-	$(CC) -o $@ -shared $?
++	$(CC) -o $@ -shared $(LDFLAGS) $?
+ 
+@@ -99,3 +102,2 @@
+ 	cp -f grapheme.h "$(DESTDIR)$(INCPREFIX)"
+-	ldconfig || true
+ 
+--- a/config.mk
++++ b/config.mk
+@@ -13,8 +13,4 @@
+ CPPFLAGS = -D_DEFAULT_SOURCE
+-CFLAGS   = -std=c99 -Os -fPIC -Wall -Wextra -Wpedantic
+-LDFLAGS  = -s
++CFLAGS  := -std=c99 -fPIC -Wall -Wextra -Wpedantic $(CFLAGS)
+ 
+ # tools
+-CC = cc
+-AR = ar
+-RANLIB = ranlib

diff --git a/dev-libs/libgrapheme/libgrapheme-1.ebuild b/dev-libs/libgrapheme/libgrapheme-1.ebuild
new file mode 100644
index 000000000000..3217f024438d
--- /dev/null
+++ b/dev-libs/libgrapheme/libgrapheme-1.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2021 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"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-make.patch
+)
+
+src_configure() {
+	tc-export CC AR RANLIB
+	tc-export_build_env BUILD_CC # see make.patch
+
+	append-ldflags -Wl,--soname=${PN}.so
+}
+
+src_install() {
+	local emakeargs=(
+		DESTDIR="${D}"
+		PREFIX="${EPREFIX}"/usr
+		LIBPREFIX="${EPREFIX}"/usr/$(get_libdir)
+	)
+	emake "${emakeargs[@]}" install
+	einstalldocs
+
+	rm "${ED}"/usr/$(get_libdir)/${PN}.a || die
+}

diff --git a/dev-libs/libgrapheme/metadata.xml b/dev-libs/libgrapheme/metadata.xml
new file mode 100644
index 000000000000..06d84e396dc3
--- /dev/null
+++ b/dev-libs/libgrapheme/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>ionen@gentoo.org</email>
+		<name>Ionen Wolkens</name>
+	</maintainer>
+</pkgmetadata>


                 reply	other threads:[~2021-12-23  1:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1640221087.1c7c50d3a3ee8391ba2cd7dc6a41f647fb2c6d7f.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox