diff --git a/cmake.prov b/cmake.prov index 182cd87..f569c23 100644 --- a/cmake.prov +++ b/cmake.prov @@ -2,6 +2,7 @@ # -*- coding:utf-8 -*- # # Copyright (C) 2015 Daniel Vrátil +# Copyright (C) 2017 Daniel Vrátil # # # This program is free software; you can redistribute it and/or modify @@ -45,21 +46,13 @@ class CMakeParser: paths = configFile.rsplit("/", 3) modulePath = "%s/cmake/%s" % (paths[0], paths[2]) - - lowercase = False - configFile = glob.glob("%s/*Config.cmake" % modulePath) - if not configFile: - configFile = glob.glob("%s/*-config.cmake" % modulePath) - lowercase = True - if not configFile: - return (None, None, None) - - if lowercase: - moduleName = configFile[0][len(modulePath) + 1:-len("-config.cmake")] + cfgFile = paths[3] + if cfgFile.endswith("Config.cmake"): + return (modulePath, cfgFile[0:-len("Config.cmake")], False) + elif cfgFile.endswith("-config.cmake"): + return (modulePath, cfgFile[0:-len("-config.cmake")], True) else: - moduleName = configFile[0][len(modulePath) + 1:-len("Config.cmake")] - - return (modulePath, moduleName, lowercase) + return (None, None, False) def resolveCMakeModuleVersion(self, modulePath, cmakeModule, lowercase): versionFile = ("%s/%s-config-version.cmake" if lowercase else "%s/%sConfigVersion.cmake") % (modulePath, cmakeModule) diff --git a/cmake.spec b/cmake.spec index d8a71c5..23847f6 100644 --- a/cmake.spec +++ b/cmake.spec @@ -43,7 +43,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -399,6 +399,9 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Mon Feb 20 2017 Rex Dieter - 3.7.2-3 +- Fix ambiguous file lookup in cmake.prov + * Thu Feb 9 2017 Orion Poplawski - 3.7.2-2 - Fix cmake.prov error