1 |
commit: 89b4aa759766a8f1f3959af566986825be60740c |
2 |
Author: Lucas Mitrak <lucas <AT> lucasmitrak <DOT> com> |
3 |
AuthorDate: Wed Sep 15 04:46:45 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 15 17:38:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=89b4aa75 |
7 |
|
8 |
sci-misc/irstlm: remove AM_CXXFLAGS, add doc/static-libs use flags |
9 |
|
10 |
* EAPI bump |
11 |
* Add doc and static-libs use flags |
12 |
* Add app-text/texlive[extra] as BDEPEND for doc |
13 |
* Add patch that removes lib and lib64 linking |
14 |
* Add patch that makes irstlm-manual.pdf obey --docdir |
15 |
* Remove AM_CXXFLAGS that breaks the package or should not be there |
16 |
* Copy doc/RELEASE to RELEASE.tex for doc |
17 |
* Add static-libs and doc to the configure using the econf variable |
18 |
|
19 |
Currently, sci-misc/irstlm will not compile due to bad AM_CXXFLAGS. |
20 |
A sed command was added which removes these unwanted flags. This was |
21 |
done in the same way to a PR upstream [1]. In addition, a patch was |
22 |
added which removes a Makefile.am lib->lib64 linking operation. This |
23 |
was also done in the same way as the upstream PR [1]. Another patch was |
24 |
added which removes doc/irstlm-manual.pdf from install in --prefix to |
25 |
instead obey --docdir. Furthermore, the doc USE flag was added for this |
26 |
new documentation. To create this documentation, a simple copy command |
27 |
of doc/RELEASE to RELEASE.tex is needed for it to make correctly. Also, |
28 |
a BDEPEND of app-text/texlive[extra] was added if the doc USE is true. |
29 |
A static-libs USE flag was added to include the static library |
30 |
libirstlm.a. Both USE flags are configured in the econf variable. |
31 |
Finally, the EAPI was bumped. |
32 |
|
33 |
[1] https://github.com/irstlm-team/irstlm/pull/12 |
34 |
|
35 |
Closes: https://bugs.gentoo.org/755473 |
36 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
37 |
Signed-off-by: Lucas Mitrak <lucas <AT> lucasmitrak.com> |
38 |
Closes: https://github.com/gentoo/sci/pull/1112 |
39 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
40 |
|
41 |
.../files/irstlm-6.00.05-doc-obey-docdir.patch | 22 +++++++++++++ |
42 |
.../files/irstlm-6.00.05-remove-lib-linking.patch | 18 ++++++++++ |
43 |
sci-misc/irstlm/irstlm-6.00.05-r1.ebuild | 38 ++++++++++++++++++++++ |
44 |
3 files changed, 78 insertions(+) |
45 |
|
46 |
diff --git a/sci-misc/irstlm/files/irstlm-6.00.05-doc-obey-docdir.patch b/sci-misc/irstlm/files/irstlm-6.00.05-doc-obey-docdir.patch |
47 |
new file mode 100644 |
48 |
index 000000000..0b25ead22 |
49 |
--- /dev/null |
50 |
+++ b/sci-misc/irstlm/files/irstlm-6.00.05-doc-obey-docdir.patch |
51 |
@@ -0,0 +1,22 @@ |
52 |
+Remove doc/irstlm-manual.pdf from install in --prefix to instead obey --docdir |
53 |
+ |
54 |
+--- a/doc/Makefile.am |
55 |
++++ b/doc/Makefile.am |
56 |
+@@ -1,5 +1,3 @@ |
57 |
+-documentationdir = @prefix@/doc |
58 |
+- |
59 |
+ if DOC_COMPILATION |
60 |
+ |
61 |
+ irstlm-manual.pdf: irstlm-manual.tex |
62 |
+@@ -14,10 +12,6 @@ clean-local: |
63 |
+ |
64 |
+ all: irstlm-manual.pdf |
65 |
+ |
66 |
+-dist_documentation_SCRIPTS = irstlm-manual.pdf |
67 |
++dist_doc_DATA = irstlm-manual.pdf |
68 |
+ |
69 |
+ endif |
70 |
+- |
71 |
+-EXTRA_DIST = irstlm-manual.tex |
72 |
+- |
73 |
+- |
74 |
|
75 |
diff --git a/sci-misc/irstlm/files/irstlm-6.00.05-remove-lib-linking.patch b/sci-misc/irstlm/files/irstlm-6.00.05-remove-lib-linking.patch |
76 |
new file mode 100644 |
77 |
index 000000000..c0cfcfe32 |
78 |
--- /dev/null |
79 |
+++ b/sci-misc/irstlm/files/irstlm-6.00.05-remove-lib-linking.patch |
80 |
@@ -0,0 +1,18 @@ |
81 |
+Remove Makefile.am lib linking operation |
82 |
+Taken from upstream PR: https://github.com/irstlm-team/irstlm/pull/12 |
83 |
+ |
84 |
+--- a/Makefile.am |
85 |
++++ b/Makefile.am |
86 |
+@@ -7,12 +7,3 @@ SUBDIRS = src scripts doc |
87 |
+ EXTRA_DIST = README RELEASE Copyright |
88 |
+ |
89 |
+ ACLOCAL_AMFLAGS = -I m4 |
90 |
+- |
91 |
+-LN_S=@LN_S@ |
92 |
+- |
93 |
+-install-exec-hook: |
94 |
+- cd ${exec_prefix}/ && \ |
95 |
+- ${LN_S} -n -f lib lib64 |
96 |
+- |
97 |
+-dist-hook: |
98 |
+- rm -rf `find $(distdir)/doc -type d -name .svn` |
99 |
|
100 |
diff --git a/sci-misc/irstlm/irstlm-6.00.05-r1.ebuild b/sci-misc/irstlm/irstlm-6.00.05-r1.ebuild |
101 |
new file mode 100644 |
102 |
index 000000000..73786fd4a |
103 |
--- /dev/null |
104 |
+++ b/sci-misc/irstlm/irstlm-6.00.05-r1.ebuild |
105 |
@@ -0,0 +1,38 @@ |
106 |
+# Copyright 1999-2021 Gentoo Authors |
107 |
+# Distributed under the terms of the GNU General Public License v2 |
108 |
+ |
109 |
+EAPI=8 |
110 |
+ |
111 |
+inherit autotools |
112 |
+ |
113 |
+DESCRIPTION="A tool to estimate, store, and access very large n-gram language models" |
114 |
+HOMEPAGE="https://hlt-mt.fbk.eu/technologies/irstlm" |
115 |
+SRC_URI="https://github.com/irstlm-team/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
116 |
+ |
117 |
+LICENSE="LGPL-3" |
118 |
+SLOT="0" |
119 |
+KEYWORDS="~amd64" |
120 |
+IUSE="doc static-libs" |
121 |
+ |
122 |
+BDEPEND="doc? ( app-text/texlive[extra] )" |
123 |
+ |
124 |
+PATCHES=( |
125 |
+ "${FILESDIR}"/${P}-remove-lib-linking.patch |
126 |
+ "${FILESDIR}"/${P}-doc-obey-docdir.patch |
127 |
+) |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ default |
131 |
+ # Remove AM_CXXFLAGS that are breaking the package or should not be there |
132 |
+ # Bug: https://bugs.gentoo.org/755473 |
133 |
+ sed -e 's/-static -isystem\/usr\/include -W //' -i src/Makefile.am || die |
134 |
+ # Needed for doc |
135 |
+ cp "${S}/doc/RELEASE" "${S}/RELEASE.tex" || die |
136 |
+ eautoreconf |
137 |
+} |
138 |
+ |
139 |
+src_configure() { |
140 |
+ econf \ |
141 |
+ $(use_enable static-libs static) \ |
142 |
+ $(use_enable doc) |
143 |
+} |