app-crypt/moolticute: fill version.h with package version
authorPierre-Olivier Mercier <nemunaire@nemunai.re>
Wed, 27 Sep 2017 22:58:27 +0000 (00:58 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Mon, 4 Dec 2017 00:15:07 +0000 (01:15 +0100)
Closes: https://github.com/gentoo/gentoo/pull/6021

app-crypt/moolticute/moolticute-9999.ebuild

index 8609d2fec94562c990662ea22e0439b53f53ef98..789f753ee72516d992832270b26c269cb3d359c1 100644 (file)
@@ -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
 }