File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
var/spack/repos/builtin/packages/gettext Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 33#
44# SPDX-License-Identifier: (Apache-2.0 OR MIT)
55
6+ import re
7+
68from spack import *
79
810
@@ -12,6 +14,8 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
1214 homepage = "https://www.gnu.org/software/gettext/"
1315 gnu_mirror_path = "gettext/gettext-0.20.1.tar.xz"
1416
17+ executables = [r'^gettext$' ]
18+
1519 version ('0.21' , sha256 = 'd20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192' )
1620 version ('0.20.2' , sha256 = 'b22b818e644c37f6e3d1643a1943c32c3a9bff726d601e53047d2682019ceaba' )
1721 version ('0.20.1' , sha256 = '53f02fbbec9e798b0faaf7c73272f83608e835c6288dd58be6c9bb54624a3800' )
@@ -51,6 +55,13 @@ class Gettext(AutotoolsPackage, GNUMirrorPackage):
5155 patch ('nvhpc-export-symbols.patch' , when = '%nvhpc' )
5256 patch ('nvhpc-long-width.patch' , when = '%nvhpc' )
5357
58+ @classmethod
59+ def determine_version (cls , exe ):
60+ gettext = Executable (exe )
61+ output = gettext ('--version' , output = str , error = str )
62+ match = re .match (r'gettext(?: \(.+\)) ([\d.]+)' , output )
63+ return match .group (1 ) if match else None
64+
5465 def configure_args (self ):
5566 spec = self .spec
5667
You can’t perform that action at this time.
0 commit comments