Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions recipes/autoconf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("m4/1.4.19") # Needed at runtime by downstream clients as well
self.requires("m4/[>=1.4 <2]") # Needed at runtime by downstream clients as well

def package_id(self):
del self.info.settings.arch
Expand All @@ -44,7 +44,7 @@ def package_id(self):
self.info.requires.clear()

def build_requirements(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/<host_version>")
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down
6 changes: 5 additions & 1 deletion recipes/bison/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from conan.tools.gnu import Autotools, AutotoolsToolchain
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
from conan.tools.scm import Version
import os

required_conan_version = ">=2.4"
Expand Down Expand Up @@ -34,7 +35,7 @@ def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("m4/1.4.19")
self.requires("m4/[>=1.4 <2]")

def validate(self):
if is_msvc(self) and self.version == "3.8.2":
Expand Down Expand Up @@ -77,6 +78,9 @@ def generate(self):
"gl_cv_func_snprintf_directive_n=no",
])
tc.extra_cflags.append("-FS")
elif self.settings.compiler == "apple-clang" and Version(self.version) < "3.7.6":
# INFO: lib/obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))'
tc.extra_cflags.append("-Wno-error=incompatible-pointer-types")
env = tc.environment()
if is_msvc(self):
automake_conf = self.dependencies.build["automake"].conf_info
Expand Down
2 changes: 1 addition & 1 deletion recipes/elfutils/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def requirements(self):
def build_requirements(self):
self.tool_requires("gettext/0.22.5")
self.tool_requires("automake/1.16.5")
self.build_requires("m4/1.4.19")
self.build_requires("m4/[>=1.4 <2]")
self.build_requires("flex/2.6.4")
self.tool_requires("bison/3.8.2")
if not self.conf.get("tools.gnu:pkg_config", default=False, check_type=str):
Expand Down
4 changes: 2 additions & 2 deletions recipes/flex/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def layout(self):
def requirements(self):
# Flex requires M4 to be compiled. If consumer does not have M4
# installed, Conan will need to know that Flex requires it.
self.requires("m4/1.4.19")
self.requires("m4/[>=1.4 <2]")

def build_requirements(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/<host_version>")
self.tool_requires("gnu-config/cci.20210814")
if hasattr(self, "settings_build") and cross_building(self):
self.tool_requires(f"{self.name}/{self.version}")
Expand Down
2 changes: 1 addition & 1 deletion recipes/gmp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def validate(self):
)

def build_requirements(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/[>=1.4 <2]")
if self.settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down
2 changes: 1 addition & 1 deletion recipes/libsystemd/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def validate(self):

def build_requirements(self):
self.tool_requires("meson/[>=1.4.0 <2]")
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/[>=1.4 <2]")
self.tool_requires("gperf/3.1")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/[>=2.1.0 <3]")
Expand Down
2 changes: 1 addition & 1 deletion recipes/libtool/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def requirements(self):

def build_requirements(self):
self.tool_requires("automake/1.16.5")
self.tool_requires("m4/1.4.19") # Needed by configure
self.tool_requires("m4/[>=1.4 <2]") # Needed by configure
self.tool_requires("gnu-config/cci.20210814")
if self.settings_build.os == "Windows":
self.win_bash = True
Expand Down
9 changes: 8 additions & 1 deletion recipes/m4/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,16 @@ def generate(self):
"-rtlib=compiler-rt",
"-Wno-unused-command-line-argument",
])
elif self.settings.compiler == "apple-clang" and Version(self.version) < "1.4.19":
# INFO: lib/obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))'
tc.extra_cflags.append("-Wno-error=incompatible-function-pointer-types")
elif self.version == "1.4.19" and self.settings.compiler == "gcc" and Version(self.settings.compiler) >= "15":
# FIXME: https://savannah.gnu.org/support/?func=detailitem&item_id=111150
# WORKAROUND: https://lists.buildroot.org/pipermail/buildroot/2025-May/777741.html
tc.extra_cflags.append("-std=gnu17")
if cross_building(self) and is_msvc(self):
triplet_arch_windows = {"x86_64": "x86_64", "x86": "i686", "armv8": "aarch64"}

host_arch = triplet_arch_windows.get(str(self.settings.arch))
build_arch = triplet_arch_windows.get(str(self._settings_build.arch))

Expand Down
2 changes: 1 addition & 1 deletion recipes/mingw-w64/linux/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def validate(self):
)

def build_requirements(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/[>=1.4 <2]")
self.tool_requires("gmp/6.3.0")
self.tool_requires("mpfr/4.2.0")
self.tool_requires("mpc/1.3.1")
Expand Down
2 changes: 1 addition & 1 deletion recipes/mpir/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def build_requirements(self):
self.tool_requires("libtool/2.4.7")
self.tool_requires("yasm/1.3.0")
if not is_msvc(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/[>=1.4 <2]")
if self._settings_build.os == "Windows":
self.win_bash = True
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
Expand Down
6 changes: 3 additions & 3 deletions recipes/pulseaudio/meson/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def validate(self):
)

def build_requirements(self):
self.tool_requires("m4/1.4.19")
self.tool_requires("meson/1.3.2")
self.tool_requires("m4/[>=1.4 <2]")
self.tool_requires("meson/[>=1.3.2 <2]")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.1.0")
self.tool_requires("pkgconf/[>=2.2 <3]")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
2 changes: 1 addition & 1 deletion recipes/tree-gen/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def layout(self):
def build_requirements(self):
if self._should_build_test:
self.test_requires("gtest/1.15.0")
self.tool_requires("m4/1.4.19")
self.tool_requires("m4/[>=1.4 <2]")
if self.settings.os == "Windows":
self.tool_requires("winflexbison/2.5.24")
else:
Expand Down