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