commit:     c04941c80ba5444bd75d49f1bd5c625fb80b34fd
Author:     Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
AuthorDate: Wed Sep 27 22:58:27 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec  4 00:15:07 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c04941c8

app-crypt/moolticute: fill version.h with package version

Closes: https://github.com/gentoo/gentoo/pull/6021

 app-crypt/moolticute/moolticute-9999.ebuild | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/app-crypt/moolticute/moolticute-9999.ebuild 
b/app-crypt/moolticute/moolticute-9999.ebuild
index 8609d2fec94..789f753ee72 100644
--- a/app-crypt/moolticute/moolticute-9999.ebuild
+++ b/app-crypt/moolticute/moolticute-9999.ebuild
@@ -34,6 +34,15 @@ DEPEND="${RDEPEND}"
 
 S="${WORKDIR}/${P/_/-}"
 
+src_prepare() {
+       default
+
+       # Fill version.h with package version
+       if [[ ${PV} != 9999* ]]; then
+               sed -i "s/\"git\"/\"v${PV/_/-}\"/" src/version.h || die
+       fi
+}
+
 src_configure() {
        eqmake5 PREFIX="/usr" Moolticute.pro
 }

Reply via email to