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 proxy package for libx11 #678

Closed
wants to merge 18 commits into from
Closed

Conversation

czoido
Copy link
Contributor

@czoido czoido commented Jan 15, 2020

Specify library name and version: libx11/system

This is a proxy package for libx11.Tthis means that this package will verify if x11 is installed in the user's system and populate the cpp_info with the required information.
When, in the near future, a package for this library is created, this can be transparently substituted in the consumer without requiring any changes.

Related to: #641

  • 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.

@conan-center-bot
Copy link
Collaborator

Some configurations of 'libx11/system' failed in build 1 (4c309788318c643cdcd7bf5d86b4442a2f33e823):

  • Linux x86_64, Release, gcc 5, libstdc++
    • Hooks errors detected:
      • [HOOK - conan-center.py] pre_export(): ERROR: [EXPORT LICENSE (KB-H023)] This recipe is exporting a license file. Remove COPYING.txt from exports(https://github.com/conan-io/conan-center-index/wiki/Error-Knowledge-Base#KB-H023)
    • Log download
    • Log error Download
    • Profile
  • Access to all the logs


def package(self):
tools.download("https://gitlab.freedesktop.org/xorg/lib/libx11/raw/master/COPYING", filename="COPYING")
self.copy("COPYING", dst="licenses")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really useful to have a license file when you don't distribute anything ?

Copy link
Contributor

Choose a reason for hiding this comment

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

agree, it's pointless

def system_requirements(self):
installer = self._system_packages()
if not installer.installed(self._required_system_package):
raise ConanInvalidConfiguration(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the plan to have libx11-dev installed in C3I build configurations ? Otherwise that would drastically reduce this package's usefulness, because it would not be possible to require it from any CCI recipe.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, they should be installed in CCI, if not all these kinds of recipes would be useless as you say.

homepage = "https://www.x.org/wiki/"
description = "Client interface to the X Window System, otherwise known as \'Xlib\'",
settings = "os", "compiler", "build_type", "arch"
_required_system_package = "libx11-dev"
Copy link
Contributor

Choose a reason for hiding this comment

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

would be much better to use pkg-config to check package availability, so it would be completely distro agnostic

@conan-center-bot
Copy link
Collaborator

All green in build 2 (878b564eebfd639186d4377b0dfe3f96bb1818b9)! 😊



def package_info(self):
if self._system_packages().installed("pkg-config"):
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe without pkg-config it's hard to deduce all correct flags. -lX11 isn't always enough. I'd say require pkg-config and fail otherwise.

@czoido czoido mentioned this pull request Jan 16, 2020
4 tasks
@conan-center-bot
Copy link
Collaborator

Some configurations of 'libx11/system' failed in build 3 (823e3648bb582a869536bd2d3a71805d849a655b):

@czoido
Copy link
Contributor Author

czoido commented Jan 16, 2020

Closing: #641 (comment)
Will open one for xorg-dev encompassing several libs.

@czoido czoido closed this Jan 16, 2020
@czoido czoido deleted the add_system_libx11 branch December 1, 2021 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants