-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mingw should require m4 #9172
mingw should require m4 #9172
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,9 @@ def validate(self): | |
raise ConanInvalidConfiguration("gcc version {} is not in the list of valid versions: {}" | ||
.format(str(self.options.gcc), valid_gcc)) | ||
|
||
def build_requirements(self): | ||
self.build_requires("m4/1.4.19") | ||
|
||
def _download_source(self): | ||
arch_data = self.conan_data["sources"][self.version] | ||
|
||
|
@@ -257,16 +260,17 @@ def build(self): | |
|
||
def package(self): | ||
self.copy("COPYING", src=os.path.join(self.build_folder, "sources", "mingw-w64"), dst="licenses") | ||
tools.remove_files_by_mask(os.path.join(self.package_folder, "lib"), "*.la") | ||
tools.remove_files_by_mask(os.path.join(self.package_folder, "x86_64-w64-mingw32", "lib"), "*.la") | ||
tools.remove_files_by_mask(os.path.join(self.package_folder, "x86_64-w64-mingw32", "lib32"), "*.la") | ||
tools.remove_files_by_mask(os.path.join(self.package_folder, "bin", "gcc", "x86_64-w64-mingw32", "10.3.0"), "*.la") | ||
tools.remove_files_by_mask(self.package_folder, "*.la") | ||
tools.rmdir(os.path.join(self.package_folder, "share", "man")) | ||
tools.rmdir(os.path.join(self.package_folder, "share", "doc")) | ||
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig")) | ||
# Remove symlinks, we need to create them in the package_info step | ||
# replace with relative symlinks so they'll resolve correctly on consumer's machine | ||
os.unlink(os.path.join(self.package_folder, 'mingw')) | ||
os.unlink(os.path.join(self.package_folder, self._target_tag, 'lib64')) | ||
self.run("ln -s {} {}".format(os.path.join(os.curdir, self._target_tag), | ||
os.path.join(self.package_folder, 'mingw'))) | ||
self.run("ln -s {} {}".format(os.path.join(os.curdir, 'lib'), | ||
os.path.join(self.package_folder, self._target_tag, 'lib64'))) | ||
|
||
def package_info(self): | ||
if getattr(self, "settings_target", None): | ||
|
@@ -307,10 +311,4 @@ def package_info(self): | |
self.env_info.STRIP = prefix + "strip" | ||
self.env_info.GCOV = prefix + "gcov" | ||
self.env_info.RC = prefix + "windres" | ||
# Symlinks cannot be created in package step, otherwise the link target is wrong. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait the old comment said this was not possible 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was not possible because the links were absolute. |
||
if not os.path.exists(os.path.join(self.package_folder, 'mingw')): | ||
self.run("ln -s {} {}".format(os.path.join(self.package_folder, self._target_tag), | ||
os.path.join(self.package_folder, 'mingw'))) | ||
if not os.path.exists(os.path.join(self.package_folder, self._target_tag, 'lib64')): | ||
self.run("ln -s {} {}".format(os.path.join(self.package_folder, self._target_tag, 'lib'), | ||
os.path.join(self.package_folder, self._target_tag, 'lib64'))) | ||
self.env_info.DLLTOOL = prefix + "dlltool" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not using
tools.fix_symlinks()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just in case, calling
os.symlink
should be more portable thanln -s
command line.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools.fix_symlinks()
doesn't work:the link is generated relative to the package folder and not the link itself: