Skip to content
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

automake: add include directories from environment variable #2038

Merged
merged 3 commits into from
Jul 3, 2020

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Jun 25, 2020

Specify library name and version: automake/**

When running autoreconf, a project's configure.ac might need a xxx.m4 file,
provided by another package.

This pr lets automake use the AUTOMAKE_CONAN_INCLUDES environment variable.
By appending paths to this variable, automake will look for .m4 scripts.

This is part of a solution for reconfiguring zbar.
See #2029

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@madebr madebr mentioned this pull request Jun 25, 2020
4 tasks
@conan-center-bot
Copy link
Collaborator

All green in build 1 (b0186f011f6214908e73e2fdd639dfabc2d15107)! 😊

uilianries
uilianries previously approved these changes Jun 26, 2020
@conan-center-bot
Copy link
Collaborator

All green in build 2 (f27e0381390e4015286172413efdc086d7d786e1)! 😊

@madebr madebr requested a review from uilianries June 27, 2020 01:06
@madebr
Copy link
Contributor Author

madebr commented Jun 27, 2020

@danimtb @uilianries @SSE4 @jgsogo
Please review!
(this recipe is a requirement for the test of pkgconf at #1013)

@@ -49,7 +50,9 @@ def _build_scripts(self):

def _build_autotools(self):
"""Test autoreconf + configure + make"""
self.run("{} --verbose --install".format(os.environ["AUTORECONF"]), win_bash=tools.os_info.is_windows)
with tools.environment_append({"AUTOMAKE_CONAN_INCLUDES": [tools.unix_path(self.source_folder)]}):
print(os.environ["AUTOMAKE_CONAN_INCLUDES"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use self.output.info if this is something you want to print in the build process

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a remainder of a debug session. It can be removed.

@@ -107,5 +107,7 @@ def package_info(self):
self.output.info("Setting AUTOMAKE to {}".format(automake))
self.env_info.AUTOMAKE = automake

self.output.info("Append M4 include directories to AUTOMAKE_CONAN_INCLUDES environment variable")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something the consumers need to add themselves? Why not populating here that environment variable?

Copy link
Contributor Author

@madebr madebr Jun 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, consumers need to populate this.
pkgconf is an example:

A default autoconf/automake installation provides a few standard macros to generate the configure script.
pkgconf provides a m4 file which extends this list of macros with pkg-config related macros (see pkgconf's test_package for an example).

Please also check out the zbar pull request. There we found out that the default autoconf/automake misses macros related to iconv to which I don't have a good solution yet.

This would also be a good use case of your context concept. It would be nice to require a dependency, but only in the context of running autoreconf.

@conan-center-bot
Copy link
Collaborator

All green in build 3 (04f9c66efd2c632f725f7b49f978b3e83a0d805a)! 😊

@madebr
Copy link
Contributor Author

madebr commented Jul 2, 2020

@jgsogo @danimtb @SSE4
Please review!
This patch is a requirement for the well working of pkgconf at #1013

@danimtb danimtb merged commit f2f7511 into conan-io:master Jul 3, 2020
@madebr madebr deleted the automake_includes branch July 3, 2020 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants