[DO-1345] fixed windows packages (!16)
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/16 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
committed by
Aleksandr Vodyanov
parent
3759e1163f
commit
a82e89a1bc
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,13 +1,13 @@
|
||||
sources:
|
||||
"1.1.0":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/brotli"
|
||||
branch: "v1.1.0"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/brotli/archive/v1.1.0.tar.gz"
|
||||
sha256: "e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff"
|
||||
"1.0.9":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/brotli"
|
||||
branch: "v1.0.9"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/brotli/archive/v1.0.9.tar.gz"
|
||||
sha256: "f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46"
|
||||
"1.0.7":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/brotli"
|
||||
branch: "v1.0.7"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/brotli/archive/v1.0.7.tar.gz"
|
||||
sha256: "4c61bfb0faca87219ea587326c467b95acb25555b53d1a421ffa3c8a9296ee2c"
|
||||
patches:
|
||||
"1.1.0":
|
||||
- patch_file: "patches/1.1.0-target-props.patch"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
|
||||
from conan.tools.scm import Version, Git
|
||||
from conan.tools.scm import Version
|
||||
import os
|
||||
|
||||
required_conan_version = ">=1.53.0"
|
||||
@@ -54,11 +54,7 @@ class BrotliConan(ConanFile):
|
||||
cmake_layout(self, src_folder="src")
|
||||
|
||||
def source(self):
|
||||
#get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
git = Git(self)
|
||||
sources = self.conan_data["sources"][self.version]
|
||||
clone_args = ['--depth', '1', '--branch', sources["branch"]]
|
||||
git.clone(url=sources["url"], target=self.source_folder, args=clone_args)
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
|
||||
@@ -21,6 +21,6 @@ class TestPackageConan(ConanFile):
|
||||
cmake.build()
|
||||
|
||||
def test(self):
|
||||
if can_run(self):
|
||||
if can_run(self) and (self.settings.compiler != "gcc" or self.settings.os != "Windows"):
|
||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
sources:
|
||||
"1.0.8":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/bzip2"
|
||||
branch: bzip2-1.0.8
|
||||
url: "https://nexus.avroid.tech/repository/all-raw-proxy-sourceware_org/pub/bzip2/bzip2-1.0.8.tar.gz"
|
||||
sha256: "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269"
|
||||
"1.0.6":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/bzip2"
|
||||
branch: bzip2-1.0.6
|
||||
url: "https://nexus.avroid.tech/repository/all-raw-proxy-sourceware_org/pub/bzip2/bzip2-1.0.6.tar.gz"
|
||||
sha256: "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
|
||||
patches:
|
||||
"1.0.6":
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, save
|
||||
from conan.tools.scm import Version, Git
|
||||
from conan.tools.scm import Version
|
||||
import os
|
||||
import textwrap
|
||||
|
||||
@@ -47,11 +47,7 @@ class Bzip2Conan(ConanFile):
|
||||
cmake_layout(self, src_folder="src")
|
||||
|
||||
def source(self):
|
||||
#get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
git = Git(self)
|
||||
sources = self.conan_data["sources"][self.version]
|
||||
clone_args = ['--depth', '1', '--branch', sources["branch"]]
|
||||
git.clone(url=sources["url"], target=self.source_folder, args=clone_args)
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
sources:
|
||||
"1.4.3":
|
||||
url: "http://code.videolan.org/videolan/dav1d/-/archive/1.4.3/dav1d-1.4.3.tar.gz"
|
||||
url: "http://nexus.avroid.tech/repository/all-raw-proxy-code_videolan_org/videolan/dav1d/-/archive/1.4.3/dav1d-1.4.3.tar.gz"
|
||||
sha256: "88a023e58d955e0886faf49c72940e0e90914a948a8e60c1326ce3e09e7a6099"
|
||||
"1.4.1":
|
||||
url: "http://code.videolan.org/videolan/dav1d/-/archive/1.4.1/dav1d-1.4.1.tar.gz"
|
||||
url: "http://nexus.avroid.tech/repository/all-raw-proxy-code_videolan_org/videolan/dav1d/-/archive/1.4.1/dav1d-1.4.1.tar.gz"
|
||||
sha256: "8d407dd5fe7986413c937b14e67f36aebd06e1fa5cfec679d10e548476f2d5f8"
|
||||
"1.3.0":
|
||||
url: "http://code.videolan.org/videolan/dav1d/-/archive/1.3.0/dav1d-1.3.0.tar.gz"
|
||||
url: "http://nexus.avroid.tech/repository/all-raw-proxy-code_videolan_org/videolan/dav1d/-/archive/1.3.0/dav1d-1.3.0.tar.gz"
|
||||
sha256: "6d8be2741c505c47f8f1ced3c9cc427759243436553d01d1acce201f87b39e71"
|
||||
"1.2.1":
|
||||
url: "http://code.videolan.org/videolan/dav1d/-/archive/1.2.1/dav1d-1.2.1.tar.gz"
|
||||
url: "http://nexus.avroid.tech/repository/all-raw-proxy-code_videolan_org/videolan/dav1d/-/archive/1.2.1/dav1d-1.2.1.tar.gz"
|
||||
sha256: "4e33eb61ec54c768a16da0cf8fa0928b4c4593f5f804a3c887d4a21c318340b2"
|
||||
|
||||
@@ -60,7 +60,7 @@ class Dav1dConan(ConanFile):
|
||||
self.output.warning("The 'with_avx512' option is deprecated and has no effect")
|
||||
|
||||
def build_requirements(self):
|
||||
# self.tool_requires("meson/1.4.0")
|
||||
self.tool_requires("meson/[>=1.4.0<2]")
|
||||
if self.options.assembly:
|
||||
self.tool_requires("nasm/2.16.01")
|
||||
|
||||
@@ -87,6 +87,12 @@ class Dav1dConan(ConanFile):
|
||||
|
||||
def build(self):
|
||||
self._patch_sources()
|
||||
if self.settings.os == "Windows" and self.settings.compiler == "gcc":
|
||||
replace_in_file(self,
|
||||
os.path.join(self.source_folder, "meson.build"),
|
||||
"find_program('nasm'",
|
||||
"find_program('nasm.exe'",
|
||||
)
|
||||
meson = Meson(self)
|
||||
meson.configure()
|
||||
meson.build()
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
sources:
|
||||
"3.3.0":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.3.0"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/refs/tags/v3.3.0.tar.gz"
|
||||
sha256: "04ec44461850abbf33824da84978043b22554896b552c5fd11a9c5ae4b4d296e"
|
||||
"3.2.1":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.2.1"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.2.1.tar.gz"
|
||||
sha256: "e40d236343cad807e83d192265f139481c51fc83a1c49e406ac6ce0a0ba7cd35"
|
||||
"3.2.0":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.2.0"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.2.0.tar.gz"
|
||||
sha256: "3dbcdf186ad092a8b71228a5962009b5c96abde9a315257a3452eb988414ea3b"
|
||||
"3.1.7":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.1.7"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.1.7.tar.gz"
|
||||
sha256: "a0204d6ab48223f2c8f53a932014e7f245125e7a5267764b1fbeebe4fa0ee8b9"
|
||||
"3.1.6":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.1.6"
|
||||
url: https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.1.6.tar.gz
|
||||
sha256: 8a79e87d02ce1333c9d6c5e47f452596442a343d8c3e9b234e8a62fce1b1d49c
|
||||
"3.1.5":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.1.5"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.1.5.tar.gz"
|
||||
sha256: "a63ecb93182134ba4293fd5f22d6e08ca417caafa244afaa751cbfddf6415b13"
|
||||
"3.1.4":
|
||||
url: "ssh://git@git.avroid.tech.:2222/Mirrors/double-conversion"
|
||||
branch: "v3.1.4"
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/google/double-conversion/archive/v3.1.4.tar.gz"
|
||||
sha256: "95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021"
|
||||
|
||||
@@ -2,7 +2,6 @@ from conan import ConanFile
|
||||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
|
||||
from conan.tools.files import copy, get, rmdir, rm
|
||||
from conan.tools.microsoft import check_min_vs
|
||||
from conan.tools.scm import Git
|
||||
import os
|
||||
|
||||
required_conan_version = ">=1.54.0"
|
||||
@@ -42,11 +41,7 @@ class DoubleConversionConan(ConanFile):
|
||||
check_min_vs(self, "190")
|
||||
|
||||
def source(self):
|
||||
#get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
git = Git(self)
|
||||
sources = self.conan_data["sources"][self.version]
|
||||
clone_args = ['--depth', '1', '--branch', sources["branch"]]
|
||||
git.clone(url=sources["url"], target=self.source_folder, args=clone_args)
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
|
||||
@@ -21,6 +21,6 @@ class TestPackageConan(ConanFile):
|
||||
cmake.build()
|
||||
|
||||
def test(self):
|
||||
if can_run(self):
|
||||
if can_run(self) and (self.settings.compiler != "gcc" or self.settings.os != "Windows"):
|
||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
|
||||
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
|
||||
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,8 @@
|
||||
sources:
|
||||
"2.13.2":
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-download_savannah_gnu_org/releases/freetype/freetype-2.13.2.tar.xz"
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-sourceforge_net/projects/freetype/files/freetype2/2.13.2/freetype-2.13.2.tar.xz"
|
||||
"2.12.1":
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-download_savannah_gnu_org/releases/freetype/freetype-2.12.1.tar.xz"
|
||||
|
||||
@@ -58,11 +58,9 @@ class FreetypeConan(ConanFile):
|
||||
|
||||
def requirements(self):
|
||||
if self.options.with_png:
|
||||
# self.requires("libpng/[>=1.6 <2]")
|
||||
self.requires("libpng/1.6.43")
|
||||
self.requires("libpng/[>=1.6 <2]")
|
||||
if self.options.with_zlib:
|
||||
#self.requires("zlib/[>=1.2.10 <2]")
|
||||
self.requires("zlib/1.3.1")
|
||||
self.requires("zlib/[>=1.2.10 <2]")
|
||||
if self.options.with_bzip2:
|
||||
self.requires("bzip2/1.0.8")
|
||||
if self.options.with_brotli:
|
||||
|
||||
@@ -84,7 +84,7 @@ class GLibConan(ConanFile):
|
||||
self.requires("libiconv/1.17")
|
||||
|
||||
def build_requirements(self):
|
||||
# self.tool_requires("meson/[>=1.2.3 <2]")
|
||||
self.tool_requires("meson/[>=1.2.3 <2]")
|
||||
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
|
||||
self.tool_requires("pkgconf/[>=2.2 <3]")
|
||||
|
||||
|
||||
@@ -100,10 +100,10 @@ class HarfbuzzConan(ConanFile):
|
||||
)
|
||||
|
||||
def build_requirements(self):
|
||||
# self.tool_requires("meson/1.4.0")
|
||||
self.tool_requires("meson/[>=1.4.0<2]")
|
||||
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
|
||||
self.tool_requires("pkgconf/[>=2.1.0]")
|
||||
if self.options.with_glib:
|
||||
if self.options.with_glib and (self.settings.os != "Windows" or self.settings.compiler != "gcc"):
|
||||
self.tool_requires("glib/<host_version>")
|
||||
if self.settings.os == "Macos":
|
||||
# Ensure that the gettext we use at build time is compatible
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
|
||||
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
|
||||
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
60
recipes/meson/all/conandata.yml
Normal file
60
recipes/meson/all/conandata.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
sources:
|
||||
"1.6.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.6.0.tar.gz"
|
||||
sha256: "342300656bfdafb6cc09325bdd0fd507366ecaa6be25fa4525f50889adf7c606"
|
||||
"1.5.1":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.5.1.tar.gz"
|
||||
sha256: "55f6acd5bf72c14d4aa5a781993633f84a1d117bdf2c2057735902ced9b81390"
|
||||
"1.5.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.5.0.tar.gz"
|
||||
sha256: "781913826fb6f478eb7d77e1942ab3df39444e4c90e9a3523737e215171db469"
|
||||
"1.4.1":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.4.1.tar.gz"
|
||||
sha256: "a7efc72ecb873c5a62031ade1921a7177b67cfdcb2e9410a7ab023f9e8192f4b"
|
||||
"1.4.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.4.0.tar.gz"
|
||||
sha256: "61382f295378bddcd9bebb3a9a9065b1cbc671fa41b80964ab02726f9a5f3a88"
|
||||
"1.3.2":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.3.2.tar.gz"
|
||||
sha256: "683082fb3c5cddf203b21d29bdf4c227e2f7964da5324a15e1a5f7db94322b4b"
|
||||
"1.3.1":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.3.1.tar.gz"
|
||||
sha256: "274c121edb859602eb4589d31d8791e980748bb19950fc6f611a21d76dc22cc6"
|
||||
"1.3.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.3.0/meson-1.3.0.tar.gz"
|
||||
sha256: "4ba253ef60e454e23234696119cbafa082a0aead0bd3bbf6991295054795f5dc"
|
||||
"1.2.3":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.2.3/meson-1.2.3.tar.gz"
|
||||
sha256: "4533a43c34548edd1f63a276a42690fce15bde9409bcf20c4b8fa3d7e4d7cac1"
|
||||
"1.2.2":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.2.2/meson-1.2.2.tar.gz"
|
||||
sha256: "4a0f04de331fbc7af3b802a844fc8838f4ccd1ded1e792ba4f8f2faf8c5fe4d6"
|
||||
"1.2.1":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.2.1/meson-1.2.1.tar.gz"
|
||||
sha256: "b1db3a153087549497ee52b1c938d2134e0338214fe14f7efd16fecd57b639f5"
|
||||
"1.2.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.2.0.tar.gz"
|
||||
sha256: "603489f0aaa6305f806c6cc4a4455a965f22290fc74f65871f589b002110c790"
|
||||
"1.1.1":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.1.1/meson-1.1.1.tar.gz"
|
||||
sha256: "d04b541f97ca439fb82fab7d0d480988be4bd4e62563a5ca35fadb5400727b1c"
|
||||
# qt requires 1.1.0
|
||||
"1.1.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/1.1.0.tar.gz"
|
||||
sha256: "f29a3e14062043d75e82d16f1e41856e6b1ed7a7c016e10c7b13afa7ee6364cc"
|
||||
# wayland-protocols requires 1.0.0
|
||||
"1.0.0":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/releases/download/1.0.0/meson-1.0.0.tar.gz"
|
||||
sha256: "aa50a4ba4557c25e7d48446abfde857957dcdf58385fffbe670ba0e8efacce05"
|
||||
# gtk requires 0.62.2
|
||||
"0.62.2":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/0.62.2.tar.gz"
|
||||
sha256: "97108f4d9bb16bc758c44749bd25ec7d42c6a762961efbed8b7589a2a3551ea6"
|
||||
# gst-plugins-base requires 0.61.2
|
||||
"0.61.2":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/0.61.2.tar.gz"
|
||||
sha256: "33cd555314a94d52acfbb3f6f44d4e61c4ad0bfec7acf4301be7e40bb969b3a8"
|
||||
# gobject-introspection requires 0.59.3
|
||||
"0.59.3":
|
||||
url: "https://nexus.avroid.tech/repository/devops-raw-proxy-github/mesonbuild/meson/archive/0.59.3.tar.gz"
|
||||
sha256: "b2c5bfd5032189a66cf6a32d98ba82d94d7d314577d8efe4d9dc159c4073f282"
|
||||
81
recipes/meson/all/conanfile.py
Normal file
81
recipes/meson/all/conanfile.py
Normal file
@@ -0,0 +1,81 @@
|
||||
import os
|
||||
import textwrap
|
||||
|
||||
from conan import ConanFile, conan_version
|
||||
from conan.tools.files import copy, get, rmdir, save, replace_in_file
|
||||
from conan.tools.layout import basic_layout
|
||||
from conan.tools.scm import Version
|
||||
|
||||
required_conan_version = ">=1.52.0"
|
||||
|
||||
|
||||
class MesonConan(ConanFile):
|
||||
name = "meson"
|
||||
description = "a project to create the best possible next-generation build system"
|
||||
license = "Apache-2.0"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
homepage = "https://github.com/mesonbuild/meson"
|
||||
topics = ("mesonbuild", "build-system")
|
||||
package_type = "application"
|
||||
no_copy_source = True
|
||||
|
||||
def layout(self):
|
||||
basic_layout(self, src_folder="src")
|
||||
|
||||
# def requirements(self):
|
||||
# if self.conf.get("tools.meson.mesontoolchain:backend", default="ninja", check_type=str) == "ninja":
|
||||
# # Meson requires >=1.8.2 as of 1.5
|
||||
# # https://github.com/mesonbuild/meson/blob/b6b634ad33e5ca9ad4a9d6139dba4244847cc0e8/mesonbuild/backend/ninjabackend.py#L625
|
||||
# self.requires("ninja/[>=1.10.2 <2]")
|
||||
|
||||
def package_id(self):
|
||||
self.info.clear()
|
||||
|
||||
def source(self):
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def package(self):
|
||||
copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
|
||||
copy(self, "*", src=self.source_folder, dst=os.path.join(self.package_folder, "bin"))
|
||||
rmdir(self, os.path.join(self.package_folder, "bin", "test cases"))
|
||||
|
||||
# create wrapper scripts
|
||||
save(self, os.path.join(self.package_folder, "bin", "meson.cmd"), textwrap.dedent("""\
|
||||
@echo off
|
||||
set PYTHONDONTWRITEBYTECODE=1
|
||||
CALL python %~dp0/meson.py %*
|
||||
"""))
|
||||
save(self, os.path.join(self.package_folder, "bin", "meson"), textwrap.dedent("""\
|
||||
#!/usr/bin/env bash
|
||||
meson_dir=$(dirname "$0")
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
exec "$meson_dir/meson.py" "$@"
|
||||
"""))
|
||||
|
||||
def finalize(self):
|
||||
copy(self, "*", src=self.immutable_package_folder, dst=self.package_folder)
|
||||
replace_in_file(self, os.path.join(self.package_folder, "bin", "meson.cmd"),
|
||||
"set PYTHONDONTWRITEBYTECODE=1",
|
||||
"")
|
||||
|
||||
replace_in_file(self, os.path.join(self.package_folder, "bin", "meson"),
|
||||
"export PYTHONDONTWRITEBYTECODE=1",
|
||||
"")
|
||||
|
||||
@staticmethod
|
||||
def _chmod_plus_x(filename):
|
||||
if os.name == "posix":
|
||||
os.chmod(filename, os.stat(filename).st_mode | 0o111)
|
||||
|
||||
def package_info(self):
|
||||
meson_root = os.path.join(self.package_folder, "bin")
|
||||
self._chmod_plus_x(os.path.join(meson_root, "meson"))
|
||||
self._chmod_plus_x(os.path.join(meson_root, "meson.py"))
|
||||
|
||||
self.cpp_info.builddirs = [os.path.join("bin", "mesonbuild", "cmake", "data")]
|
||||
|
||||
self.cpp_info.includedirs = []
|
||||
self.cpp_info.libdirs = []
|
||||
|
||||
if Version(conan_version).major < 2:
|
||||
self.env_info.PATH.append(meson_root)
|
||||
29
recipes/meson/all/test_package/conanfile.py
Normal file
29
recipes/meson/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import os
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.tools.build import can_run
|
||||
from conan.tools.layout import basic_layout
|
||||
from conan.tools.meson import Meson
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "MesonToolchain", "VirtualBuildEnv", "VirtualRunEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
|
||||
def layout(self):
|
||||
basic_layout(self)
|
||||
|
||||
def build(self):
|
||||
meson = Meson(self)
|
||||
meson.configure()
|
||||
meson.build()
|
||||
|
||||
def test(self):
|
||||
self.run("meson --version")
|
||||
if can_run(self):
|
||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
2
recipes/meson/all/test_package/meson.build
Normal file
2
recipes/meson/all/test_package/meson.build
Normal file
@@ -0,0 +1,2 @@
|
||||
project('test_package', 'cpp')
|
||||
executable('test_package', 'test_package.cpp')
|
||||
6
recipes/meson/all/test_package/test_package.cpp
Normal file
6
recipes/meson/all/test_package/test_package.cpp
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello from Meson.\n");
|
||||
return 0;
|
||||
}
|
||||
37
recipes/meson/config.yml
Normal file
37
recipes/meson/config.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
versions:
|
||||
"1.6.0":
|
||||
folder: all
|
||||
"1.5.1":
|
||||
folder: all
|
||||
"1.5.0":
|
||||
folder: all
|
||||
"1.4.1":
|
||||
folder: all
|
||||
"1.4.0":
|
||||
folder: all
|
||||
"1.3.2":
|
||||
folder: all
|
||||
"1.3.1":
|
||||
folder: all
|
||||
"1.3.0":
|
||||
folder: all
|
||||
"1.2.3":
|
||||
folder: all
|
||||
"1.2.2":
|
||||
folder: all
|
||||
"1.2.1":
|
||||
folder: all
|
||||
"1.2.0":
|
||||
folder: all
|
||||
"1.1.1":
|
||||
folder: all
|
||||
"1.1.0":
|
||||
folder: all
|
||||
"1.0.0":
|
||||
folder: all
|
||||
"0.62.2":
|
||||
folder: all
|
||||
"0.61.2":
|
||||
folder: all
|
||||
"0.59.3":
|
||||
folder: all
|
||||
6
recipes/msys2/all/conandata.yml
Normal file
6
recipes/msys2/all/conandata.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
sources:
|
||||
"cci.latest":
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/devops-raw-proxy-github/msys2/msys2-installer/releases/download/2023-10-26/msys2-base-x86_64-20231026.tar.xz"
|
||||
- "https://nexus.avroid.tech/repository/devops-raw-proxy-sourceforge_net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20231026.tar.xz"
|
||||
sha256: "fa75120560563a311241c05882016978bd35612692c7f0d39815a27837bff27d"
|
||||
196
recipes/msys2/all/conanfile.py
Normal file
196
recipes/msys2/all/conanfile.py
Normal file
@@ -0,0 +1,196 @@
|
||||
from conan import ConanFile
|
||||
from conan.errors import ConanInvalidConfiguration, ConanException
|
||||
from conan.tools.files import chdir, get, replace_in_file, copy
|
||||
from conan.tools.layout import basic_layout
|
||||
import fnmatch
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import errno
|
||||
import ctypes
|
||||
|
||||
required_conan_version = ">=1.47.0"
|
||||
|
||||
|
||||
class lock:
|
||||
def __init__(self):
|
||||
self.handle = ctypes.windll.kernel32.CreateMutexA(None, 0, "Global\\ConanMSYS2".encode())
|
||||
if not self.handle:
|
||||
raise ctypes.WinError()
|
||||
|
||||
def __enter__(self):
|
||||
status = ctypes.windll.kernel32.WaitForSingleObject(self.handle, 0xFFFFFFFF)
|
||||
if status not in [0, 0x80]:
|
||||
raise ctypes.WinError()
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
status = ctypes.windll.kernel32.ReleaseMutex(self.handle)
|
||||
if not status:
|
||||
raise ctypes.WinError()
|
||||
|
||||
def close(self):
|
||||
ctypes.windll.kernel32.CloseHandle(self.handle)
|
||||
|
||||
__del__ = close
|
||||
|
||||
class MSYS2Conan(ConanFile):
|
||||
name = "msys2"
|
||||
description = "MSYS2 is a software distro and building platform for Windows"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
homepage = "http://www.msys2.org"
|
||||
license = "MSYS license"
|
||||
topics = ("msys", "unix", "subsystem")
|
||||
|
||||
settings = "os", "arch"
|
||||
# "exclude_files" "packages" "additional_packages" values are a comma separated list
|
||||
options = {
|
||||
"exclude_files": ["ANY"],
|
||||
"packages": ["ANY"],
|
||||
"additional_packages": [None, "ANY"],
|
||||
"no_kill": [True, False]
|
||||
}
|
||||
default_options = {
|
||||
"exclude_files": "*/link.exe",
|
||||
"packages": "base-devel,binutils,gcc",
|
||||
"additional_packages": None,
|
||||
"no_kill": False,
|
||||
}
|
||||
|
||||
short_paths = True
|
||||
|
||||
def layout(self):
|
||||
basic_layout(self, src_folder="src")
|
||||
|
||||
def package_id(self):
|
||||
del self.info.options.no_kill
|
||||
|
||||
def validate(self):
|
||||
if self.settings.os != "Windows":
|
||||
raise ConanInvalidConfiguration("Only Windows supported")
|
||||
if self.settings.arch != "x86_64":
|
||||
raise ConanInvalidConfiguration("Only Windows x64 supported")
|
||||
|
||||
def source(self):
|
||||
get(self, **self.conan_data["sources"][self.version],
|
||||
destination=self.source_folder, strip_root=False) # Preserve tarball root dir (msys64/)
|
||||
|
||||
def _update_pacman(self):
|
||||
with chdir(self, os.path.join(self._msys_dir, "usr", "bin")):
|
||||
try:
|
||||
self._kill_pacman()
|
||||
|
||||
# https://www.msys2.org/docs/ci/
|
||||
self.run('bash -l -c "pacman --debug --noconfirm --ask 20 -Syuu"') # Core update (in case any core packages are outdated)
|
||||
self._kill_pacman()
|
||||
self.run('bash -l -c "pacman --debug --noconfirm --ask 20 -Syuu"') # Normal update
|
||||
self._kill_pacman()
|
||||
self.run('bash -l -c "pacman --debug -Rc dash --noconfirm"')
|
||||
except ConanException:
|
||||
self.run('bash -l -c "cat /var/log/pacman.log || echo nolog"')
|
||||
self._kill_pacman()
|
||||
raise
|
||||
|
||||
# https://github.com/msys2/MSYS2-packages/issues/1966
|
||||
def _kill_pacman(self):
|
||||
if self.options.no_kill:
|
||||
return
|
||||
if (self.settings.os == "Windows"):
|
||||
taskkill_exe = os.path.join(os.environ.get('SystemRoot'), 'system32', 'taskkill.exe')
|
||||
|
||||
log_out = True
|
||||
if log_out:
|
||||
out = subprocess.PIPE
|
||||
err = subprocess.STDOUT
|
||||
else:
|
||||
out = open(os.devnull, 'w', encoding='UTF-8')
|
||||
err = subprocess.PIPE
|
||||
|
||||
if os.path.exists(taskkill_exe):
|
||||
taskkill_cmds = [
|
||||
f"{taskkill_exe} /f /t /im pacman.exe",
|
||||
f"{taskkill_exe} /f /im gpg-agent.exe",
|
||||
f"{taskkill_exe} /f /im dirmngr.exe",
|
||||
f'{taskkill_exe} /fi "MODULES eq msys-2.0.dll"',
|
||||
]
|
||||
for taskkill_cmd in taskkill_cmds:
|
||||
try:
|
||||
proc = subprocess.Popen(taskkill_cmd, stdout=out, stderr=err, bufsize=1)
|
||||
proc.wait()
|
||||
except OSError as e:
|
||||
if e.errno == errno.ENOENT:
|
||||
raise ConanException("Cannot kill pacman") from e
|
||||
|
||||
@property
|
||||
def _msys_dir(self):
|
||||
subdir = "msys64" # top-level directoy in tarball
|
||||
return os.path.join(self.source_folder, subdir)
|
||||
|
||||
def build(self):
|
||||
with lock():
|
||||
self._do_build()
|
||||
|
||||
def _do_build(self):
|
||||
packages = []
|
||||
if self.options.packages:
|
||||
packages.extend(str(self.options.packages).split(","))
|
||||
if self.options.additional_packages:
|
||||
packages.extend(str(self.options.additional_packages).split(","))
|
||||
|
||||
self._update_pacman()
|
||||
|
||||
with chdir(self, os.path.join(self._msys_dir, "usr", "bin")):
|
||||
for package in packages:
|
||||
self.run(f'bash -l -c "pacman -S {package} --noconfirm"')
|
||||
for package in ['pkgconf']:
|
||||
if self.run(f'bash -l -c "pacman -Qq {package}"', ignore_errors=True, quiet=True) == 0:
|
||||
self.run(f'bash -l -c "pacman -Rs -d -d {package} --noconfirm"')
|
||||
|
||||
self._kill_pacman()
|
||||
|
||||
# create /tmp dir in order to avoid
|
||||
# bash.exe: warning: could not find /tmp, please create!
|
||||
tmp_dir = os.path.join(self._msys_dir, 'tmp')
|
||||
if not os.path.isdir(tmp_dir):
|
||||
os.makedirs(tmp_dir)
|
||||
tmp_name = os.path.join(tmp_dir, 'dummy')
|
||||
with open(tmp_name, 'a', encoding='UTF-8'):
|
||||
os.utime(tmp_name, None)
|
||||
|
||||
# Prepend the PKG_CONFIG_PATH environment variable with an eventual PKG_CONFIG_PATH environment variable
|
||||
# Note: this is no longer needed when we exclusively support Conan 2 integrations
|
||||
replace_in_file(self, os.path.join(self._msys_dir, "etc", "profile"),
|
||||
'PKG_CONFIG_PATH="', 'PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}')
|
||||
|
||||
def package(self):
|
||||
excludes = None
|
||||
if self.options.exclude_files:
|
||||
excludes = tuple(str(self.options.exclude_files).split(","))
|
||||
for exclude in excludes:
|
||||
for root, _, filenames in os.walk(self._msys_dir):
|
||||
for filename in filenames:
|
||||
fullname = os.path.join(root, filename)
|
||||
if fnmatch.fnmatch(fullname, exclude):
|
||||
os.unlink(fullname)
|
||||
# See https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#kb-h013-default-package-layout
|
||||
copy(self, "*", dst=os.path.join(self.package_folder, "bin", "msys64"), src=self._msys_dir, excludes=excludes)
|
||||
shutil.copytree(os.path.join(self._msys_dir, "usr", "share", "licenses"),
|
||||
os.path.join(self.package_folder, "licenses"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.libdirs = []
|
||||
self.cpp_info.includedirs = []
|
||||
|
||||
msys_root = os.path.join(self.package_folder, "bin", "msys64")
|
||||
msys_bin = os.path.join(msys_root, "usr", "bin")
|
||||
self.cpp_info.bindirs.append(msys_bin)
|
||||
|
||||
self.buildenv_info.define_path("MSYS_ROOT", msys_root)
|
||||
self.buildenv_info.define_path("MSYS_BIN", msys_bin)
|
||||
|
||||
self.conf_info.define("tools.microsoft.bash:subsystem", "msys2")
|
||||
self.conf_info.define("tools.microsoft.bash:path", os.path.join(msys_bin, "bash.exe"))
|
||||
|
||||
# conan v1 specific stuff
|
||||
self.env_info.MSYS_ROOT = msys_root
|
||||
self.env_info.MSYS_BIN = msys_bin
|
||||
self.env_info.path.append(msys_bin)
|
||||
34
recipes/msys2/all/test_package/conanfile.py
Normal file
34
recipes/msys2/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,34 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.env import Environment
|
||||
from io import StringIO
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch"
|
||||
generators = "VirtualBuildEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
|
||||
@property
|
||||
def _secret_value(self):
|
||||
return "SECRET_CONAN_PKG_VARIABLE"
|
||||
|
||||
def generate(self):
|
||||
env = Environment()
|
||||
env.define("PKG_CONFIG_PATH", self._secret_value)
|
||||
envvars = env.vars(self)
|
||||
envvars.save_script("conanbuildenv_pkg_config_path")
|
||||
|
||||
def build(self):
|
||||
pass # nothing to do, skip hook warning
|
||||
|
||||
def test(self):
|
||||
self.run('bash.exe -c ^"make --version^"')
|
||||
self.run('bash.exe -c ^"! test -f /bin/link^"')
|
||||
self.run('bash.exe -c ^"! test -f /usr/bin/link^"')
|
||||
|
||||
output = StringIO()
|
||||
self.run('bash.exe -c "echo $PKG_CONFIG_PATH"', output)
|
||||
assert self._secret_value in output.getvalue()
|
||||
28
recipes/msys2/all/test_v1_package/conanfile.py
Normal file
28
recipes/msys2/all/test_v1_package/conanfile.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from conans import ConanFile, tools
|
||||
from conans.errors import ConanException
|
||||
from io import StringIO
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
|
||||
def build(self):
|
||||
pass # nothing to do, skip hook warning
|
||||
|
||||
def test(self):
|
||||
bash = tools.which("bash.exe")
|
||||
|
||||
if bash:
|
||||
self.output.info("using bash.exe from: " + bash)
|
||||
else:
|
||||
raise ConanException("No instance of bash.exe could be found on %PATH%")
|
||||
|
||||
self.run('bash.exe -c ^"make --version^"')
|
||||
self.run('bash.exe -c ^"! test -f /bin/link^"')
|
||||
self.run('bash.exe -c ^"! test -f /usr/bin/link^"')
|
||||
|
||||
secret_value = "SECRET_CONAN_PKG_VARIABLE"
|
||||
with tools.environment_append({"PKG_CONFIG_PATH": secret_value}):
|
||||
output = StringIO()
|
||||
self.run('bash.exe -c "echo $PKG_CONFIG_PATH"', output=output)
|
||||
assert secret_value in output.getvalue()
|
||||
3
recipes/msys2/config.yml
Normal file
3
recipes/msys2/config.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
versions:
|
||||
"cci.latest":
|
||||
folder: "all"
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json",
|
||||
"build/gcc-11.5-x86_64-17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class OpenH264Conan(ConanFile):
|
||||
basic_layout(self, src_folder="src")
|
||||
|
||||
def build_requirements(self):
|
||||
#self.tool_requires("meson/1.4.1")
|
||||
self.tool_requires("meson/[>=1.4.1<2]")
|
||||
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
|
||||
self.tool_requires("pkgconf/[>=2.2 <3]")
|
||||
if self.settings.arch in ["x86", "x86_64"]:
|
||||
@@ -73,6 +73,8 @@ class OpenH264Conan(ConanFile):
|
||||
if self._preserve_dll_name:
|
||||
# INFO: When generating with Meson, the library name is openh264-7.dll. This change preserves the old name openh264.dll
|
||||
replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "soversion: major_version,", "soversion: '',")
|
||||
if self.settings.compiler == "gcc" and self.settings.os == "Windows":
|
||||
replace_in_file(self, os.path.join(self.source_folder, "meson.build"), "find_program('nasm", "find_program('nasm.exe")
|
||||
|
||||
def build(self):
|
||||
self._patch_sources()
|
||||
|
||||
@@ -21,6 +21,6 @@ class TestPackageConan(ConanFile):
|
||||
cmake.build()
|
||||
|
||||
def test(self):
|
||||
if can_run(self):
|
||||
if can_run(self) and (self.settings.os != "Windows" or self.settings.compiler != "gcc"):
|
||||
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
|
||||
@@ -86,7 +86,7 @@ class QtConan(ConanFile):
|
||||
default_options = {
|
||||
"shared": False,
|
||||
"commercial": False,
|
||||
"opengl": "desktop",
|
||||
"opengl": "dynamic",
|
||||
"with_vulkan": False,
|
||||
"openssl": True,
|
||||
"with_pcre2": True,
|
||||
@@ -544,7 +544,7 @@ class QtConan(ConanFile):
|
||||
elif self._settings_build.os == "Windows":
|
||||
return "mingw32-make"
|
||||
else:
|
||||
return "make -j20"
|
||||
return "make"
|
||||
|
||||
def _xplatform(self):
|
||||
if self.settings.os == "Linux":
|
||||
@@ -882,7 +882,7 @@ class QtConan(ConanFile):
|
||||
save(self, ".qmake.super" , "")
|
||||
|
||||
self.run("%s %s" % (os.path.join(self.source_folder, "qt5", "configure"), " ".join(args)))
|
||||
self.run("make -j16")
|
||||
self.run(self._make_program())
|
||||
|
||||
@property
|
||||
def _cmake_core_extras_file(self):
|
||||
|
||||
22
recipes/strawberryperl/all/conandata.yml
Normal file
22
recipes/strawberryperl/all/conandata.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
sources:
|
||||
"5.32.1.1":
|
||||
x86:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit-portable.zip"
|
||||
sha256: "d9c5711d12573a0f6d977792caa58364b1d46217521ae5c25cf5cc378a7c23c0"
|
||||
x86_64:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.32.1.1/strawberry-perl-5.32.1.1-64bit-portable.zip"
|
||||
sha256: "692646105b0f5e058198a852dc52a48f1cebcaf676d63bbdeae12f4eaee9bf5c"
|
||||
"5.30.0.1":
|
||||
x86:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit-portable.zip"
|
||||
sha256: "a1d77821c77b7a3298cf3fe381e57cba43f89b9859204398f36d85f33b287837"
|
||||
x86_64:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit-portable.zip"
|
||||
sha256: "9367a64ac1451b21804a224bb6235fe6848dd42f5fa1871583821ac3dfabf013"
|
||||
"5.28.1.1":
|
||||
x86:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.28.1.1/strawberry-perl-5.28.1.1-32bit-portable.zip"
|
||||
sha256: "8b15c7c9574989568254a7859e473b7d5f68a1145d2e4418036600a81b13805c"
|
||||
x86_64:
|
||||
url: "https://nexus.avroid.tech/repository/strawberryperl_com/download/5.28.1.1/strawberry-perl-5.28.1.1-64bit-portable.zip"
|
||||
sha256: "935c95ba096fa11c4e1b5188732e3832d330a2a79e9882ab7ba8460ddbca810d"
|
||||
57
recipes/strawberryperl/all/conanfile.py
Normal file
57
recipes/strawberryperl/all/conanfile.py
Normal file
@@ -0,0 +1,57 @@
|
||||
from conan import ConanFile, conan_version
|
||||
from conan.errors import ConanInvalidConfiguration
|
||||
from conan.tools.files import copy, get, rmdir
|
||||
from conan.tools.scm import Version
|
||||
import os
|
||||
|
||||
required_conan_version = ">=1.52.0"
|
||||
|
||||
|
||||
class StrawberryPerlConan(ConanFile):
|
||||
name = "strawberryperl"
|
||||
description = "Strawberry Perl for Windows."
|
||||
license = ("Artistic-1.0", "GPL-1.0")
|
||||
homepage = "http://strawberryperl.com"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
topics = ("perl", "interpreter", "windows")
|
||||
package_type = "application"
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
|
||||
def layout(self):
|
||||
self.folders.build = "build"
|
||||
|
||||
def package_id(self):
|
||||
del self.info.settings.compiler
|
||||
del self.info.settings.build_type
|
||||
|
||||
def validate(self):
|
||||
if self.settings.os != "Windows":
|
||||
raise ConanInvalidConfiguration(f"{self.ref} is only intended to be used on Windows.")
|
||||
if self.settings.arch not in ("x86", "x86_64"):
|
||||
raise ConanInvalidConfiguration(f"{self.ref} is only available for x86 and x86_64 architectures.")
|
||||
|
||||
def source(self):
|
||||
pass
|
||||
|
||||
def build(self):
|
||||
get(self, **self.conan_data["sources"][self.version][str(self.settings.arch)], destination=self.build_folder)
|
||||
|
||||
def package(self):
|
||||
copy(self, pattern="License.rtf*", src=os.path.join(self.build_folder, "licenses"), dst=os.path.join(self.package_folder, "licenses"))
|
||||
copy(self, pattern="*", src=os.path.join(self.build_folder, "perl", "bin"), dst=os.path.join(self.package_folder, "bin"))
|
||||
copy(self, pattern="*", src=os.path.join(self.build_folder, "perl", "lib"), dst=os.path.join(self.package_folder, "lib"))
|
||||
copy(self, pattern="*", src=os.path.join(self.build_folder, "perl", "vendor", "lib"), dst=os.path.join(self.package_folder, "lib"))
|
||||
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.libdirs = []
|
||||
self.cpp_info.includedirs = []
|
||||
|
||||
perl_path = os.path.join(self.package_folder, "bin", "perl.exe").replace("\\", "/")
|
||||
self.conf_info.define("user.strawberryperl:perl", perl_path)
|
||||
|
||||
# TODO remove once conan v2 is the only support and recipes have been migrated
|
||||
if Version(conan_version).major < 2:
|
||||
bin_path = os.path.join(self.package_folder, "bin")
|
||||
self.env_info.PATH.append(bin_path)
|
||||
self.user_info.perl = perl_path
|
||||
16
recipes/strawberryperl/all/test_package/conanfile.py
Normal file
16
recipes/strawberryperl/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from conan import ConanFile
|
||||
import os
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "VirtualBuildEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
|
||||
def test(self):
|
||||
self.run("perl --version")
|
||||
perl_script = os.path.join(self.source_folder, "list_files.pl")
|
||||
self.run(f"perl {perl_script}")
|
||||
12
recipes/strawberryperl/all/test_package/list_files.pl
Normal file
12
recipes/strawberryperl/all/test_package/list_files.pl
Normal file
@@ -0,0 +1,12 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Path::Tiny;
|
||||
|
||||
my $dir = path('.');
|
||||
my $iter = $dir->iterator;
|
||||
print "Hello Conan!\n";
|
||||
while (my $file = $iter->()) {
|
||||
next if $file->is_dir();
|
||||
print "$file\n";
|
||||
}
|
||||
7
recipes/strawberryperl/config.yml
Normal file
7
recipes/strawberryperl/config.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
versions:
|
||||
"5.32.1.1":
|
||||
folder: all
|
||||
"5.30.0.1":
|
||||
folder: all
|
||||
"5.28.1.1":
|
||||
folder: all
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"version": 4,
|
||||
"vendor": {
|
||||
"conan": {}
|
||||
},
|
||||
"include": [
|
||||
"build/gcc-12-x86_64-gnu17-release/generators/CMakePresets.json"
|
||||
]
|
||||
}
|
||||
@@ -1,25 +1,33 @@
|
||||
sources:
|
||||
"5.4.5":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.4.5"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.4.5.tar.xz"
|
||||
sha256: "da9dec6c12cf2ecf269c31ab65b5de18e8e52b96f35d5bcd08c12b43e6878803"
|
||||
"5.4.4":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.4.4"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.4.4.tar.gz"
|
||||
sha256: "aae39544e254cfd27e942d35a048d592959bd7a79f9a624afb0498bb5613bdf8"
|
||||
"5.4.2":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.4.2"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.4.2.tar.gz"
|
||||
- "https://c3i.jfrog.io/artifactory/conan-center-backup-sources/87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05"
|
||||
sha256: "87947679abcf77cc509d8d1b474218fd16b72281e2797360e909deaee1ac9d05"
|
||||
"5.4.0":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.4.0"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.4.0.tar.gz"
|
||||
sha256: "7471ef5991f690268a8f2be019acec2e0564b7b233ca40035f339fe9a07f830b"
|
||||
"5.2.10":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.2.10"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.2.10.tar.gz"
|
||||
sha256: "eb7a3b2623c9d0135da70ca12808a214be9c019132baaa61c9e1d198d1d9ded3"
|
||||
"5.2.5":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.2.5"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.2.5.tar.gz"
|
||||
sha256: "f6f4910fd033078738bd82bfba4f49219d03b17eb0794eb91efbae419f4aba10"
|
||||
"5.2.4":
|
||||
url: "ssh://git@git.avroid.tech:2222/Mirrors/xz"
|
||||
branch: "v5.2.4"
|
||||
url:
|
||||
- "https://nexus.avroid.tech/repository/all-raw-proxy-tukaani_org/xz/xz-5.2.4.tar.gz"
|
||||
sha256: "b512f3b726d3b37b6dc4c8570e137b9311e7552e8ccbab4d39d47ce5f4177145"
|
||||
patches:
|
||||
"5.2.4":
|
||||
- patch_file: "patches/0001-relax_windows-sdk-restriction.patch"
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.apple import fix_apple_shared_install_name
|
||||
from conan.tools.build import cross_building
|
||||
from conan.tools.env import VirtualBuildEnv
|
||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir, save, chdir
|
||||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rename, replace_in_file, rm, rmdir, save
|
||||
from conan.tools.gnu import Autotools, AutotoolsToolchain
|
||||
from conan.tools.layout import basic_layout
|
||||
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime, MSBuild, MSBuildToolchain
|
||||
from conan.tools.scm import Version, Git
|
||||
from conan.tools.scm import Version
|
||||
import os
|
||||
import textwrap
|
||||
|
||||
@@ -82,11 +81,7 @@ class XZUtilsConan(ConanFile):
|
||||
self.tool_requires("msys2/cci.latest")
|
||||
|
||||
def source(self):
|
||||
#get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
git = Git(self)
|
||||
sources = self.conan_data["sources"][self.version]
|
||||
clone_args = ['--depth', '1', '--branch', sources["branch"]]
|
||||
git.clone(url=sources["url"], target=self.source_folder, args=clone_args)
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
if self._use_msbuild:
|
||||
@@ -100,13 +95,6 @@ class XZUtilsConan(ConanFile):
|
||||
tc.configure_args.append("--disable-doc")
|
||||
if self.settings.build_type == "Debug":
|
||||
tc.configure_args.append("--enable-debug")
|
||||
if cross_building(self) and self.settings.os == "Windows":
|
||||
tc.configure_args.append("--disable-dependency-tracking")
|
||||
tc.configure_args.append("--disable-nls")
|
||||
tc.configure_args.append("--disable-scripts")
|
||||
tc.configure_args.append("--disable-threads")
|
||||
tc.configure_args.append("--enable-small")
|
||||
tc.configure_args.append("CFLAGS=-march=x86-64 -mtune=generic")
|
||||
tc.generate()
|
||||
|
||||
@property
|
||||
@@ -163,8 +151,6 @@ class XZUtilsConan(ConanFile):
|
||||
if self._use_msbuild:
|
||||
self._build_msvc()
|
||||
else:
|
||||
with chdir(self, self.source_folder):
|
||||
self.run("./autogen.sh --no-po4a --no-doxygen")
|
||||
autotools = Autotools(self)
|
||||
autotools.configure()
|
||||
autotools.make()
|
||||
|
||||
Reference in New Issue
Block a user