1 |
commit: 6527420a375b7def6c697aace2a85b7340c11e8c |
2 |
Author: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 8 06:51:15 2019 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 8 06:51:15 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6527420a |
7 |
|
8 |
dev-libs/foma: new package |
9 |
|
10 |
- A set of utilities for constructing finite-state automata and |
11 |
transducers, dependency of libreoffice-voikko |
12 |
|
13 |
Package-Manager: Portage-2.3.75, Repoman-2.3.17 |
14 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
15 |
|
16 |
dev-libs/foma/Manifest | 1 + |
17 |
.../foma/files/foma-0.9.18-clean-makefile.patch | 35 +++++++++++++++++ |
18 |
dev-libs/foma/foma-0.9.18.ebuild | 44 ++++++++++++++++++++++ |
19 |
dev-libs/foma/metadata.xml | 8 ++++ |
20 |
4 files changed, 88 insertions(+) |
21 |
|
22 |
diff --git a/dev-libs/foma/Manifest b/dev-libs/foma/Manifest |
23 |
new file mode 100644 |
24 |
index 00000000000..81077719d2a |
25 |
--- /dev/null |
26 |
+++ b/dev-libs/foma/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST foma-0.9.18.tar.gz 337134 BLAKE2B b7f1eeaeaa21096f8077f0e81f3c57c49bbba30afe8db280089c40ed6cf475df33a6899fd2b6929d3f58fe8b3660a92566ae41f2bd5d8a46dacc073b48caf030 SHA512 17df4c070d1460855804aa63f97cc4a0d9568755e93de0de80821625faab7a3994a260650c5e8f43f80b5a0702dadb0cfe57136ab50eb2a9946f118991205b1a |
29 |
|
30 |
diff --git a/dev-libs/foma/files/foma-0.9.18-clean-makefile.patch b/dev-libs/foma/files/foma-0.9.18-clean-makefile.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..0ed1b811fc6 |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/foma/files/foma-0.9.18-clean-makefile.patch |
35 |
@@ -0,0 +1,35 @@ |
36 |
+diff -Naur a/Makefile b/Makefile |
37 |
+--- a/Makefile 2015-06-13 06:24:02.000000000 +0300 |
38 |
++++ b/Makefile 2019-09-08 09:24:22.127655912 +0300 |
39 |
+@@ -1,21 +1,16 @@ |
40 |
+-prefix = /usr/local |
41 |
++prefix = /usr |
42 |
+ exec_prefix = $(prefix) |
43 |
+ libdir = $(exec_prefix)/lib |
44 |
+ bindir = $(exec_prefix)/bin |
45 |
+ includedir = $(prefix)/include |
46 |
+ |
47 |
+ VERSION = 0.9.18 |
48 |
+-CC = gcc |
49 |
+-RANLIB = ranlib |
50 |
+ YACC = bison -v |
51 |
+ LEX = flex -8 |
52 |
+ LEXCLEX = flex -8 --prefix=lexc |
53 |
+ LEXIFACE = flex -8 --prefix=interface |
54 |
+ LEXCMATRIX = flex -8 --prefix=cmatrix |
55 |
+ RM = /bin/rm -f |
56 |
+-LDFLAGS = -lreadline -lz -ltermcap |
57 |
+-FLOOKUPLDFLAGS = libfoma.a -lz |
58 |
+-CFLAGS = -O3 -Wall -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC |
59 |
+ FOMAOBJS = foma.o stack.o iface.o lex.interface.o |
60 |
+ LIBOBJS = int_stack.o define.o determinize.o apply.o rewrite.o lexcread.o topsort.o flags.o minimize.o reverse.o extract.o sigma.o io.o structures.o constructions.o coaccessible.o utf8.o spelling.o dynarray.o mem.o stringhash.o trie.o lex.lexc.o lex.yy.o lex.cmatrix.o regex.o |
61 |
+ |
62 |
+@@ -82,7 +77,7 @@ |
63 |
+ if test -f $(libdir)/$(SHAREDLIB); then rm $(libdir)/$(SHAREDLIB); fi |
64 |
+ if test -f $(libdir)/$(SHAREDLIBM); then rm $(libdir)/$(SHAREDLIBM); fi |
65 |
+ cd $(libdir); ln -s $(SHAREDLIBV) $(SHAREDLIB); cd $(libdir); \ |
66 |
+- ln -s $(SHAREDLIBV) $(SHAREDLIBM); (ldconfig || true) \ |
67 |
++ ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ |
68 |
+ >/dev/null 2>&1; \ |
69 |
+ |
70 |
+ $(OBJS): foma.h |
71 |
|
72 |
diff --git a/dev-libs/foma/foma-0.9.18.ebuild b/dev-libs/foma/foma-0.9.18.ebuild |
73 |
new file mode 100644 |
74 |
index 00000000000..77889615925 |
75 |
--- /dev/null |
76 |
+++ b/dev-libs/foma/foma-0.9.18.ebuild |
77 |
@@ -0,0 +1,44 @@ |
78 |
+# Copyright 1999-2019 Gentoo Authors |
79 |
+# Distributed under the terms of the GNU General Public License v2 |
80 |
+ |
81 |
+EAPI=7 |
82 |
+ |
83 |
+inherit toolchain-funcs |
84 |
+ |
85 |
+DESCRIPTION="A set of utilities for constructing finite-state automata and transducers" |
86 |
+HOMEPAGE="https://github.com/mhulden/foma" |
87 |
+SRC_URI="https://bitbucket.org/mhulden/foma/downloads/${P}.tar.gz" |
88 |
+ |
89 |
+LICENSE="GPL-2" |
90 |
+SLOT="0" |
91 |
+KEYWORDS="~amd64 ~x86" |
92 |
+ |
93 |
+DEPEND="sys-libs/readline:* |
94 |
+ sys-libs/zlib" |
95 |
+RDEPEND="${DEPEND}" |
96 |
+ |
97 |
+PATCHES=( "${FILESDIR}/foma-0.9.18-clean-makefile.patch" ) |
98 |
+ |
99 |
+src_prepare() { |
100 |
+ default |
101 |
+ |
102 |
+ # Install to correct libdir |
103 |
+ sed "s|/lib|/$(get_libdir)|" -i Makefile || die |
104 |
+} |
105 |
+ |
106 |
+src_compile() { |
107 |
+ export CC="$(tc-getCC)" |
108 |
+ export RANLIB="$(tc-getRANLIB)" |
109 |
+ |
110 |
+ export CFLAGS="${CFLAGS} -Wl,--as-needed -D_GNU_SOURCE -std=c99 -fvisibility=hidden -fPIC" |
111 |
+ export FLOOKUPLDFLAGS="${LDFLAGS} libfoma.a -lz" |
112 |
+ export LDFLAGS="${LDFLAGS} -lreadline -lz -lncurses" |
113 |
+ |
114 |
+ default |
115 |
+} |
116 |
+ |
117 |
+src_install() { |
118 |
+ emake prefix="${D}"/usr install |
119 |
+ einstalldocs |
120 |
+ find "${D}" -name '*.a' -delete || die |
121 |
+} |
122 |
|
123 |
diff --git a/dev-libs/foma/metadata.xml b/dev-libs/foma/metadata.xml |
124 |
new file mode 100644 |
125 |
index 00000000000..6b0a0fb3a72 |
126 |
--- /dev/null |
127 |
+++ b/dev-libs/foma/metadata.xml |
128 |
@@ -0,0 +1,8 @@ |
129 |
+<?xml version="1.0" encoding="UTF-8"?> |
130 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
131 |
+<pkgmetadata> |
132 |
+ <maintainer type="person"> |
133 |
+ <email>juippis@g.o</email> |
134 |
+ <name>Joonas Niilola</name> |
135 |
+ </maintainer> |
136 |
+</pkgmetadata> |