commit:     bfcfbfe0dacfc3ee5a6601a4f85f206309fc09de
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 28 12:45:02 2021 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Jan 28 12:45:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bfcfbfe0

media-gfx/valentina: patched out vcs calls in 0.6.1-r1

Closes: https://bugs.gentoo.org/762601
Package-Manager: Portage-3.0.14, Repoman-3.0.2
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 .../valentina-0.6.1-disable-vcs-version.patch      | 75 ++++++++++++++++++++++
 media-gfx/valentina/valentina-0.6.1-r1.ebuild      |  3 +-
 2 files changed, 77 insertions(+), 1 deletion(-)

diff --git 
a/media-gfx/valentina/files/valentina-0.6.1-disable-vcs-version.patch 
b/media-gfx/valentina/files/valentina-0.6.1-disable-vcs-version.patch
new file mode 100644
index 00000000000..471d7a85313
--- /dev/null
+++ b/media-gfx/valentina/files/valentina-0.6.1-disable-vcs-version.patch
@@ -0,0 +1,75 @@
+diff --git a/common.pri b/common.pri
+index 523aa7c..33be789 100644
+--- a/common.pri
++++ b/common.pri
+@@ -212,37 +212,7 @@ defineReplace(enable_ccache){
+ }
+ 
+ defineReplace(FindBuildRevision){
+-CONFIG(debug, debug|release){
+-    # Debug mode
+-    return(\\\"unknown\\\")
+-}else{
+-    # Release mode
+-
+-    macx{
+-        HG = /usr/local/bin/hg # Can't defeat PATH variable on Mac OS.
+-    }else {
+-        HG = hg # All other platforms are OK.
+-    }
+-
+-    #build revision number for using in version
+-    unix {
+-        DVCS_HESH=$$system("$${HG} log -r. --template '{node|short}'")
+-    } else {
+-        # Use escape character before "|" on Windows
+-        DVCS_HESH=$$system($${HG} log -r. --template "{node^|short}")
+-    }
+-    isEmpty(DVCS_HESH){
+-        DVCS_HESH=$$system("git rev-parse --short HEAD")
+-        isEmpty(DVCS_HESH){
+-            DVCS_HESH = \\\"unknown\\\" # if we can't find build revision 
left unknown.
+-        } else {
+-            DVCS_HESH=\\\"Git:$${DVCS_HESH}\\\"
+-        }
+-    } else {
+-        DVCS_HESH=\\\"Hg:$${DVCS_HESH}\\\"
+-    }
+-    return($${DVCS_HESH})
+-}
++return(\\\"unknown\\\")
+ }
+ 
+ # Default prefix. Use for creation install path.
+diff --git a/src/libs/vmisc/vmisc.pro b/src/libs/vmisc/vmisc.pro
+index cf8db51..fff1c0e 100644
+--- a/src/libs/vmisc/vmisc.pro
++++ b/src/libs/vmisc/vmisc.pro
+@@ -98,10 +98,7 @@ CONFIG(debug, debug|release){
+         HG = hg # All other platforms all OK.
+     }
+     #latest tag distance number for using in version
+-    HG_DISTANCE=$$system($${HG} log -r. --template '{latesttagdistance}')
+-    isEmpty(HG_DISTANCE){
+-        HG_DISTANCE = 0 # if we can't find local revision left 0.
+-    }
++    HG_DISTANCE = 0 # if we can't find local revision left 0.
+     message("Latest tag distance:" $${HG_DISTANCE})
+     DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest 
tag distance number in sources.
+ }
+diff --git a/src/libs/vtest/vtest.pro b/src/libs/vtest/vtest.pro
+index a336d48..c943fc5 100644
+--- a/src/libs/vtest/vtest.pro
++++ b/src/libs/vtest/vtest.pro
+@@ -92,10 +92,7 @@ CONFIG(debug, debug|release){
+         HG = hg # All other platforms all OK.
+     }
+     #latest tag distance number for using in version
+-    HG_DISTANCE=$$system($${HG} log -r. --template '{latesttagdistance}')
+-    isEmpty(HG_DISTANCE){
+-        HG_DISTANCE = 0 # if we can't find local revision left 0.
+-    }
++    HG_DISTANCE = 0 # if we can't find local revision left 0.
+     message("Latest tag distance:" $${HG_DISTANCE})
+     DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest 
tag distance number in sources.
+ }

diff --git a/media-gfx/valentina/valentina-0.6.1-r1.ebuild 
b/media-gfx/valentina/valentina-0.6.1-r1.ebuild
index d6decfb393a..e770ab6d6e9 100644
--- a/media-gfx/valentina/valentina-0.6.1-r1.ebuild
+++ b/media-gfx/valentina/valentina-0.6.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -45,6 +45,7 @@ S=${WORKDIR}/${PN}-v${PV}
 
 PATCHES=(
        "${FILESDIR}/5823.patch"
+       "${FILESDIR}/${P}-disable-vcs-version.patch"
        "${WORKDIR}/valentina-5858.patch"
 )
 

Reply via email to