1 |
commit: a36cbeb1287c096d09464f527fd9ce6c4450155a |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 12:57:15 2021 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 13:03:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a36cbeb1 |
7 |
|
8 |
sci-mathematics/glpk: don't install build artifacts with USE=examples. |
9 |
|
10 |
The build system for glpk automatically descends into the "examples" |
11 |
directory to build an example program. Afterwards, when we install |
12 |
the entire "examples" directory to honor USE=examples, we wind up |
13 |
installing the build artifacts for that program as well. |
14 |
|
15 |
This commit adds an extra "emake clean" to remove the build artifacts, |
16 |
and an "rm" to get rid of the (useless, to the end user) example |
17 |
Makefiles themselves. |
18 |
|
19 |
Closes: https://bugs.gentoo.org/779358 |
20 |
Reported-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
21 |
Package-Manager: Portage-3.0.13, Repoman-3.0.2 |
22 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
23 |
|
24 |
.../glpk/{glpk-5.0.ebuild => glpk-5.0-r1.ebuild} | 16 ++++++++++++++++ |
25 |
1 file changed, 16 insertions(+) |
26 |
|
27 |
diff --git a/sci-mathematics/glpk/glpk-5.0.ebuild b/sci-mathematics/glpk/glpk-5.0-r1.ebuild |
28 |
similarity index 76% |
29 |
rename from sci-mathematics/glpk/glpk-5.0.ebuild |
30 |
rename to sci-mathematics/glpk/glpk-5.0-r1.ebuild |
31 |
index c91cdf6a34a..8bf55ceb4aa 100644 |
32 |
--- a/sci-mathematics/glpk/glpk-5.0.ebuild |
33 |
+++ b/sci-mathematics/glpk/glpk-5.0-r1.ebuild |
34 |
@@ -44,6 +44,7 @@ src_prepare() { |
35 |
append-cppflags $($(tc-getPKG_CONFIG) --cflags libiodbc) |
36 |
|
37 |
default |
38 |
+ |
39 |
eautoreconf |
40 |
} |
41 |
|
42 |
@@ -64,11 +65,26 @@ src_configure() { |
43 |
|
44 |
src_install() { |
45 |
default |
46 |
+ |
47 |
if use examples; then |
48 |
+ # The top-level Makefile descends into the "examples" directory |
49 |
+ # unconditionally, building a program and excreting build |
50 |
+ # artifacts that we don't want to install. Note: this still |
51 |
+ # leaves the example program /usr/bin/glpsol installed. An |
52 |
+ # additional "emake ... uninstall" could probably take care |
53 |
+ # of that if desired. |
54 |
+ emake -C examples clean |
55 |
+ |
56 |
+ # Installing the Makefiles for the examples does the user no |
57 |
+ # good without the top-level Makefile. |
58 |
+ rm examples/Makefile{.in,.am,} \ |
59 |
+ || die "failed to remove example Makefiles" |
60 |
+ |
61 |
insinto "/usr/share/doc/${PF}" |
62 |
doins -r examples |
63 |
docompress -x "/usr/share/doc/${PF}/examples" |
64 |
fi |
65 |
+ |
66 |
use doc && dodoc doc/*.pdf doc/notes/*.pdf doc/*.txt |
67 |
|
68 |
# no static archives |