Skip to content

Commit

Permalink
premake: add 5.0.0-beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 1, 2023
1 parent 154fc8e commit b0b8b9c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
8 changes: 3 additions & 5 deletions recipes/premake/5.x/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
sources:
"5.0.0-beta2":
url: "https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-src.zip"
sha256: "4c1100f5170ae1c3bd1b4fd9458b3b02ae841aefbfc41514887b80996436dee2"
"5.0.0-alpha15":
url: "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha15/premake-5.0.0-alpha15-src.zip"
sha256: "880f56e7cb9f4945d1cb879f059189462c1b7bf62ef43ac7d25842dfb177dd53"
"5.0.0-alpha14":
url: "https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-src.zip"
sha256: "7c9fa4488156625c819dd03f2b48bfd4712fbfabdc2b5768e8c7f52dd7d16608"
patches:
"5.0.0-alpha15":
- patch_file: "patches/0001-5.0.0-alpha15-mingw.patch"

Check warning on line 10 in recipes/premake/5.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - patch_file: patches/0001-5.0 ... ^ (line: 10)
"5.0.0-alpha14":
- patch_file: "patches/0001-5.0.0-alpha14-mingw.patch"
19 changes: 6 additions & 13 deletions recipes/premake/5.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,6 @@ def _version_info(self, version):
res.append(p)
return tuple(res)

@property
def _gmake_directory_name_prefix(self):
if self._version_info(self.version) <= self._version_info("5.0.0-alpha14"):
return "gmake"
else:
return "gmake2"

@property
def _gmake_platform(self):
return {
Expand All @@ -105,8 +98,7 @@ def _gmake_platform(self):

@property
def _gmake_build_dir(self):
return os.path.join(self.source_folder, "build",
f"{self._gmake_directory_name_prefix}.{self._gmake_platform}")
return os.path.join(self.source_folder, "build", f"gmake2.{self._gmake_platform}")

@property
def _gmake_config(self):
Expand Down Expand Up @@ -137,10 +129,11 @@ def _patch_sources(self):
replace_in_file(self, fn, "-flto", "", strict=False)
if check_min_vs(self, 193, raise_invalid=False):
# Create VS 2022 project directory based on VS 2019 one
shutil.move(os.path.join(self.source_folder, "build", "vs2019"),
os.path.join(self.source_folder, "build", "vs2022"))
for vcxproj in glob.glob(os.path.join(self.source_folder, "build", "vs2022", "*.vcxproj")):
replace_in_file(self, vcxproj, "v142", "v143")
if "alpha" in str(self.version):
shutil.move(os.path.join(self.source_folder, "build", "vs2019"),
os.path.join(self.source_folder, "build", "vs2022"))
for vcxproj in glob.glob(os.path.join(self.source_folder, "build", "vs2022", "*.vcxproj")):
replace_in_file(self, vcxproj, "v142", "v143")

def build(self):
self._patch_sources()
Expand Down
4 changes: 2 additions & 2 deletions recipes/premake/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
versions:
"5.0.0-alpha14":
"5.0.0-beta2":
folder: "5.x"
"5.0.0-alpha15":
"5.0.0-alpha14":
folder: "5.x"

0 comments on commit b0b8b9c

Please sign in to comment.