Skip to content

Adding Botan 3.0.0 recipe #17364

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

Closed

Conversation

Maaown
Copy link
Contributor

@Maaown Maaown commented May 2, 2023

Specify library name and version: botan/3.0.0

fixes #17247


@CLAassistant
Copy link

CLAassistant commented May 2, 2023

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@Maaown
Copy link
Contributor Author

Maaown commented May 2, 2023

fixes #17247

@Maaown Maaown force-pushed the 17247-botan-upgrade-conanfile-2.0 branch from 22fc918 to ef8a4cd Compare May 2, 2023 12:35
@conan-center-bot

This comment has been minimized.

@Maaown Maaown force-pushed the 17247-botan-upgrade-conanfile-2.0 branch from ef8a4cd to 9c03cdd Compare May 3, 2023 07:42
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Maaown Maaown force-pushed the 17247-botan-upgrade-conanfile-2.0 branch from b143dc4 to fec14ec Compare May 9, 2023 13:32
@conan-center-bot

This comment has been minimized.

@Maaown Maaown force-pushed the 17247-botan-upgrade-conanfile-2.0 branch from 9d019b8 to fa9ec63 Compare May 9, 2023 14:19
@conan-center-bot

This comment has been minimized.

1 similar comment
@conan-center-bot

This comment has been minimized.

@Maaown Maaown force-pushed the 17247-botan-upgrade-conanfile-2.0 branch from 96a2343 to 69015fc Compare May 9, 2023 15:01
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@memsharded memsharded self-assigned this May 10, 2023
@memsharded
Copy link
Member

I have contributed some further things that would be necessary to modernize this recipe in 8cd739a:

  • We cannot drop yet support for 1.X, so changed to required_conan_version = ">=1.55"
  • There is a conan Version that should be used instead of the LooseVersion.
  • Using ``layout()```
  • Using apply_conandata_patches(self) and export_conandata_patches(self)

There are still other things that need to be fixed:

  • Using proper generate(), removing all deps_cpp_info references
  • Removing tools.vcvars, most likely using VCVars generator in generate()

@conan-center-bot

This comment has been minimized.

@lieser
Copy link
Contributor

lieser commented May 22, 2023

@Maaown do you want me to help here? I could rebase my changes onto your PR, and try to push it into your branch.

@Maaown
Copy link
Contributor Author

Maaown commented May 22, 2023

@lieser That would be greatly appreciated, i'm not at all familiar with building on windows so i may need help on that part.
Otherwise, if you see some improvements, go for it.
I'm in a rush these days, i'll check what you've done the sooner i can.

@lieser
Copy link
Contributor

lieser commented May 23, 2023

I rebased most of my changes and pushed them to https://github.com/lieser/conan-center-index/tree/17247-botan-upgrade-conanfile-2.0. Did not have permissions to push into your branch. Maybe you could give me access? Or just pull them yourself.

Did you test that reading the environment variables with Environment actually works? Then I tried it a few weeks ago it seemed to fail to read them, regardless of if they there defined on the command line or the conan profile. I had to use os.getenv().
But bevor I change it to use os.getenv() I want to make sure I did not just fail to use it correctly.


def package_info(self):
major_version = tools.Version(self.version).major
major_version = self.version.split('.')[0]
self.cpp_info.set_property("pkg_config_name", f"botan-{major_version}")
self.cpp_info.names["pkg_config"] = f"botan-{major_version}"
Copy link
Contributor

Choose a reason for hiding this comment

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

From my understanding this is redundant with the self.cpp_info.set_property line above, and can be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Removed it

# Required to build at least 2.12.1
return "sources"
def layout(self):
basic_layout(self, src_folder="src")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason you changed sources to src? I slightly prefer the old sources, to make sure it is not confused to be related with the src folder inside the botan repository.

Also maybe place it between def validate() and def source(), so they are order according to the order in which they are called.

Copy link
Contributor

Choose a reason for hiding this comment

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

Linter will complain if it is not src. Moved the function in my PR.

for patch in self.conan_data.get('patches', {}).get(self.version, []):
tools.patch(**patch)
with tools.chdir(self._source_subfolder):
apply_conandata_patches(self)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a Conan expert can answer this with a reason why:
Is build() or source() the best place to put this?

In my change I moved this to source(), because the Boost recipe calls it there too, and it made sense to me conceptually. But in most recipe it seems to be called in the build() method.

Comment on lines 268 to 269
# Required, see https://github.com/conan-io/conan-center-index/pull/3456
macos_min_version = tools.apple_deployment_target_flag(self.settings.os,
Copy link
Contributor

Choose a reason for hiding this comment

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

Unsure how this is best resolved. apple_deployment_target_flag() seems to be currently private because of a missing use case.

Don't know if we have here a use case, or if there is not a modern and better way. E.g. by using the AutoToolsBuildEnvironment, the only place there apple_deployment_target_flag() is called internally.

Copy link
Contributor

Choose a reason for hiding this comment

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

Used AutotoolsToolchain(self).apple_min_version_flag as a workaround.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Jun 27, 2023

I detected other pull requests that are modifying botan/all recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@conan-center-bot

This comment has been minimized.

@lieser
Copy link
Contributor

lieser commented Jun 28, 2023

I created a second draft PR there I can push into to continue working on this (#18079).

@Maaown As my PR is currently based on yours, could you please still sign the CLA as a preparation for it to get merged?

@Maaown
Copy link
Contributor Author

Maaown commented Jun 28, 2023

I created a second draft PR there I can push into to continue working on this (#18079).

@Maaown As my PR is currently based on yours, could you please still sign the CLA as a preparation for it to get merged?

Should be done by now

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Sorry, the system is under maintenance and it doesn't accept builds right now.
Please, check https://status.conan.io to obtain more information.
Thanks for your understanding and help with the Conan Center Index!


Conan v2 pipeline ❌

Note: Conan v2 builds may be required once they are on the v2 ready list

The v2 pipeline failed. Please, review the errors and note this will be required for pull requests to be merged in the near future.

See details:

Sorry, the system is under maintenance and it doesn't accept builds right now.
Please, check https://status.conan.io to obtain more information.
Thanks for your understanding and help with the Conan Center Index!

@stale
Copy link

stale bot commented Oct 15, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Copy link
Contributor

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@github-actions github-actions bot closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[request] botan/2.19.3 - Upgrade conanfile to 2.x format
6 participants