Skip to content

Commit

Permalink
(conan-io#7696) openscenegraph: add missing imports
Browse files Browse the repository at this point in the history
* openscenegraph: add missing imports

also, fix class name

* openscenegraph: Update Conan conventions

Automatically created by bincrafters-conventions 0.30.5

* Update conanfile.py

* Update conanfile.py

* Update recipes/openscenegraph/all/conanfile.py

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Update recipes/openscenegraph/all/conanfile.py

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Update conanfile.py

Co-authored-by: bincrafters-user <bincrafters@gmail.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
  • Loading branch information
3 people authored and ivanvurbanov committed Dec 2, 2021
1 parent 16dcb42 commit cc8cc47
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions recipes/openscenegraph/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from conans import CMake, ConanFile, tools
import glob, os
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.29.1"


class ConanFile(ConanFile):
class OpenSceneGraphConanFile(ConanFile):
name = "openscenegraph"
description = "OpenSceneGraph is an open source high performance 3D graphics toolkit"
topics = "conan", "openscenegraph", "graphics"
topics = ("openscenegraph", "graphics")
url = "https://github.com/conan-io/conan-center-index"
homepage = "http://www.openscenegraph.org"
license = "LGPL-2.1-only", "WxWindows-exception-3.1"
Expand Down Expand Up @@ -103,16 +104,19 @@ def configure(self):
del self.options.with_png
del self.options.with_dcmtk

def validate(self):
if self.options.get_safe("with_asio", False):
raise ConanInvalidConfiguration("ASIO support in OSG is broken, see https://github.com/openscenegraph/OpenSceneGraph/issues/921")
if hasattr(self, "settings_build") and tools.cross_building(self):
raise ConanInvalidConfiguration("openscenegraph recipe cannot be cross-built yet. Contributions are welcome.")

def requirements(self):
if self.options.enable_windowing_system and self.settings.os == "Linux":
self.requires("xorg/system")
self.requires("opengl/system")

if self.options.use_fontconfig:
self.requires("fontconfig/2.13.92")
self.requires("fontconfig/2.13.93")

if self.options.get_safe("with_asio", False):
# Should these be private requires?
Expand Down Expand Up @@ -144,8 +148,8 @@ def requirements(self):
self.requires("zlib/1.2.11")

def source(self):
tools.get(**self.conan_data["sources"][self.version])
os.rename("OpenSceneGraph-OpenSceneGraph-" + self.version, self._source_subfolder)
tools.get(**self.conan_data["sources"][self.version],
strip_root=True, destination=self._source_subfolder)

def _patch_sources(self):
for patch in self.conan_data["patches"].get(self.version, []):
Expand Down

0 comments on commit cc8cc47

Please sign in to comment.