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

Add efsw #25448

Merged
merged 14 commits into from
Nov 4, 2024
Merged

Add efsw #25448

merged 14 commits into from
Nov 4, 2024

Conversation

Julianiolo
Copy link
Contributor

@Julianiolo Julianiolo commented Sep 27, 2024

Summary

Changes to recipe: efsw/1.4.0

Motivation

This recipe was missing and requested.


@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

Uuuuh, why does it not work? I've added the

if self.settings.os in ["Linux", "FreeBSD"]:
    self.cpp_info.system_libs.append("pthread")

but it still does not find pthread?

@conan-center-bot

This comment has been minimized.

@AbrilRBS AbrilRBS self-assigned this Oct 1, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@Julianiolo
Copy link
Contributor Author

This seems to be a problem due to missing cocoa? How do we add that, via system libs?

gwaldron/osgearth#1316

@Ahajha
Copy link
Contributor

Ahajha commented Oct 29, 2024

You want

self.cpp_info.frameworks = ["Cocoa"]

Also, the test package uses C++17 (filesystem), hence the build failure. That's odd, since EFSW only requires C++11. This is probably one of those cases where we shouldn't make test package a proper example, but just a simple test to make sure it compiles and links.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

Hooks produced the following warnings for commit c86e4f4
efsw/1.4.0@#b2112d6899069f72505a55802b5e7f9f
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libefsw.so' links to system library 'm' but it is not in cpp_info.system_libs.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libefsw.dylib' links to system library 'CoreFoundation' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libefsw.dylib' links to system library 'CoreServices' but it is not in cpp_info.frameworks.

AbrilRBS
AbrilRBS previously approved these changes Oct 29, 2024
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Thanks! This looks good now on my end :) Sorry for the delay on getting it reviewed.

Also thanks @Ahajha for the extra help, appreciated 🫶

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

@Ahajha Ahajha left a comment

Choose a reason for hiding this comment

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

A few minor nitpicks, but nothing worth blocking for:

  • Add a blank line between configure() and validate()
  • Don't use main(void) in C++, just main() is fine
  • A few stray comments from the template could probably be removed
  • Test package shouldn't require C++17

recipes/efsw/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/efsw/all/conanfile.py Outdated Show resolved Hide resolved
AbrilRBS
AbrilRBS previously approved these changes Oct 29, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

Warning

Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement.

All green in build 12 (8b95405185677f5a4dbd55b3ff76408806d779a7):

  • efsw/1.4.0:
    All packages built successfully! (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 12 (8b95405185677f5a4dbd55b3ff76408806d779a7):

  • efsw/1.4.0:
    All packages built successfully! (All logs)

Copy link
Contributor

@Ahajha Ahajha left a comment

Choose a reason for hiding this comment

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

LGTM

@Julianiolo
Copy link
Contributor Author

@AbrilRBS what is the status on this?

@Ahajha
Copy link
Contributor

Ahajha commented Nov 2, 2024

It just needs one more approval, we can probably ping someone next week

@Julianiolo
Copy link
Contributor Author

@Ahajha oooh so your approval doesn't count? Sad ._. xD

@Ahajha
Copy link
Contributor

Ahajha commented Nov 2, 2024

Yea, in theory I could be a community reviewer eventually but it's not a big deal for me. Then my approval would count. For now it's basically just a small thumbs up :)

@Julianiolo
Copy link
Contributor Author

maybe @uilianries?

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Thanks! (Reapproving with the new CI pipelien)

@jcar87 jcar87 merged commit dbb88c5 into conan-io:master Nov 4, 2024
14 checks passed
@jcar87 jcar87 mentioned this pull request Nov 4, 2024
Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

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

Thank you for your PR!

Due the Conan 1.x end-of-support in CCI, I would request updating the recipe to be Conan 2.x only: #25461

Comment on lines +39 to +40
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, 11)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, 11)
check_min_cppstd(self, 11)

For Conan 2.x, it's expected cppstd always.

Comment on lines +29 to +36

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
implements = ["auto_shared_fpic"]

Simplify using implements: https://docs.conan.io/2/reference/conanfile/attributes.html#implements

tc = CMakeToolchain(self)
if is_msvc(self):
tc.variables["USE_MSVC_RUNTIME_LIBRARY_DLL"] = not is_msvc_static_runtime(self)
tc.variables["BUILD_TEST_APP"] = False
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
tc.variables["BUILD_TEST_APP"] = False
tc.variables["BUILD_TEST_APP"] = False
tc.variables["BUILD_STATIC_LIBS"] = False

Avoid building repeated static library "efsw-static.a"

import os


required_conan_version = ">=1.53.0"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
required_conan_version = ">=1.53.0"
required_conan_version = ">=2.1"

Implements is available since 2.0.9

@uilianries
Copy link
Member

The upstream enforces fpic always: https://github.com/SpartanJ/efsw/blob/1.4.0/CMakeLists.txt#L139

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.

6 participants