1 |
commit: 1c7c50d3a3ee8391ba2cd7dc6a41f647fb2c6d7f |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 23 00:20:33 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 23 00:58:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c7c50d3 |
7 |
|
8 |
dev-libs/libgrapheme: initial import, version 1 |
9 |
|
10 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
11 |
|
12 |
dev-libs/libgrapheme/Manifest | 1 + |
13 |
.../libgrapheme/files/libgrapheme-1-make.patch | 32 +++++++++++++++++++ |
14 |
dev-libs/libgrapheme/libgrapheme-1.ebuild | 37 ++++++++++++++++++++++ |
15 |
dev-libs/libgrapheme/metadata.xml | 8 +++++ |
16 |
4 files changed, 78 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/libgrapheme/Manifest b/dev-libs/libgrapheme/Manifest |
19 |
new file mode 100644 |
20 |
index 000000000000..3caacef0b4e6 |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/libgrapheme/Manifest |
23 |
@@ -0,0 +1 @@ |
24 |
+DIST libgrapheme-1.tar.gz 67912 BLAKE2B 62e82018b2a45f7259811fbfbae45741252ffedafa095d8e373d62220fc50141afe359d171b723e007120ac307db540c03cfe6e60ecedf1eea0be5518caa9bcb SHA512 c0f3300d30707266e44ee01f359204720ae1770788cec509b03be914f8581caae144fb72952d111f108ebef21fd96b5ca2cf69463ee569bce4bba8645942ee05 |
25 |
|
26 |
diff --git a/dev-libs/libgrapheme/files/libgrapheme-1-make.patch b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch |
27 |
new file mode 100644 |
28 |
index 000000000000..363df6cfb51e |
29 |
--- /dev/null |
30 |
+++ b/dev-libs/libgrapheme/files/libgrapheme-1-make.patch |
31 |
@@ -0,0 +1,32 @@ |
32 |
+Adjust config.mk variables, fix cross-compilation, and don't run ldconfig. |
33 |
+--- a/Makefile |
34 |
++++ b/Makefile |
35 |
+@@ -68,3 +68,6 @@ |
36 |
+ $(GEN): |
37 |
+- $(CC) -o $@ $(LDFLAGS) $@.o gen/util.o |
38 |
++ $(BUILD_CC) -o $@ $(BUILD_LDFLAGS) $@.o gen/util.o |
39 |
++ |
40 |
++gen/%.o: |
41 |
++ $(BUILD_CC) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< |
42 |
+ |
43 |
+@@ -84,3 +87,3 @@ |
44 |
+ libgrapheme.so: $(SRC:=.o) |
45 |
+- $(CC) -o $@ -shared $? |
46 |
++ $(CC) -o $@ -shared $(LDFLAGS) $? |
47 |
+ |
48 |
+@@ -99,3 +102,2 @@ |
49 |
+ cp -f grapheme.h "$(DESTDIR)$(INCPREFIX)" |
50 |
+- ldconfig || true |
51 |
+ |
52 |
+--- a/config.mk |
53 |
++++ b/config.mk |
54 |
+@@ -13,8 +13,4 @@ |
55 |
+ CPPFLAGS = -D_DEFAULT_SOURCE |
56 |
+-CFLAGS = -std=c99 -Os -fPIC -Wall -Wextra -Wpedantic |
57 |
+-LDFLAGS = -s |
58 |
++CFLAGS := -std=c99 -fPIC -Wall -Wextra -Wpedantic $(CFLAGS) |
59 |
+ |
60 |
+ # tools |
61 |
+-CC = cc |
62 |
+-AR = ar |
63 |
+-RANLIB = ranlib |
64 |
|
65 |
diff --git a/dev-libs/libgrapheme/libgrapheme-1.ebuild b/dev-libs/libgrapheme/libgrapheme-1.ebuild |
66 |
new file mode 100644 |
67 |
index 000000000000..3217f024438d |
68 |
--- /dev/null |
69 |
+++ b/dev-libs/libgrapheme/libgrapheme-1.ebuild |
70 |
@@ -0,0 +1,37 @@ |
71 |
+# Copyright 2021 Gentoo Authors |
72 |
+# Distributed under the terms of the GNU General Public License v2 |
73 |
+ |
74 |
+EAPI=8 |
75 |
+ |
76 |
+inherit flag-o-matic toolchain-funcs |
77 |
+ |
78 |
+DESCRIPTION="Unicode string library" |
79 |
+HOMEPAGE="https://libs.suckless.org/libgrapheme/" |
80 |
+SRC_URI="https://dl.suckless.org/libgrapheme/${P}.tar.gz" |
81 |
+ |
82 |
+LICENSE="ISC" |
83 |
+SLOT="0" |
84 |
+KEYWORDS="~amd64 ~x86" |
85 |
+ |
86 |
+PATCHES=( |
87 |
+ "${FILESDIR}"/${P}-make.patch |
88 |
+) |
89 |
+ |
90 |
+src_configure() { |
91 |
+ tc-export CC AR RANLIB |
92 |
+ tc-export_build_env BUILD_CC # see make.patch |
93 |
+ |
94 |
+ append-ldflags -Wl,--soname=${PN}.so |
95 |
+} |
96 |
+ |
97 |
+src_install() { |
98 |
+ local emakeargs=( |
99 |
+ DESTDIR="${D}" |
100 |
+ PREFIX="${EPREFIX}"/usr |
101 |
+ LIBPREFIX="${EPREFIX}"/usr/$(get_libdir) |
102 |
+ ) |
103 |
+ emake "${emakeargs[@]}" install |
104 |
+ einstalldocs |
105 |
+ |
106 |
+ rm "${ED}"/usr/$(get_libdir)/${PN}.a || die |
107 |
+} |
108 |
|
109 |
diff --git a/dev-libs/libgrapheme/metadata.xml b/dev-libs/libgrapheme/metadata.xml |
110 |
new file mode 100644 |
111 |
index 000000000000..06d84e396dc3 |
112 |
--- /dev/null |
113 |
+++ b/dev-libs/libgrapheme/metadata.xml |
114 |
@@ -0,0 +1,8 @@ |
115 |
+<?xml version="1.0" encoding="UTF-8"?> |
116 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
117 |
+<pkgmetadata> |
118 |
+ <maintainer type="person"> |
119 |
+ <email>ionen@g.o</email> |
120 |
+ <name>Ionen Wolkens</name> |
121 |
+ </maintainer> |
122 |
+</pkgmetadata> |