Skip to content

Commit

Permalink
(conan-io#21919) calceph: add v3.5.5
Browse files Browse the repository at this point in the history
* calceph: add v3.5.5

* calceph: don't raise ConanInvalidConfiguration for shared on Windows

* calceph: set package_type

* calceph: try to fix shared option for Conan v1

* Fixed lint errors

---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
  • Loading branch information
valgur and perseoGI authored Oct 15, 2024
1 parent 7e86a8e commit 0c86693
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions recipes/calceph/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.5.5":
url: "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-3.5.5.tar.gz"
sha256: "f7acf529a9267793126d7fdbdf79d4d26ae33274c99d09a9fc9d6191a3c72aca"
"3.5.1":
url: "https://www.imcce.fr/content/medias/recherche/equipes/asd/calceph/calceph-3.5.1.tar.gz"
sha256: "33cc0be1b8ffb647aff9d3ac1cf025e460451e00144050d3bbc4f13bceb11c1d"
Expand Down
13 changes: 6 additions & 7 deletions recipes/calceph/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import fix_apple_shared_install_name
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import chdir, copy, get, replace_in_file, rm, rmdir
Expand All @@ -15,11 +14,12 @@ class CalcephConan(ConanFile):
name = "calceph"
description = "C Library designed to access the binary planetary ephemeris " \
"files, such INPOPxx, JPL DExxx and SPICE ephemeris files."
license = ["CECILL-C", "CECILL-B", "CECILL-2.1"]
license = ("CECILL-C", "CECILL-B", "CECILL-2.1")
topics = ("ephemeris", "astronomy", "space", "planet")
homepage = "https://www.imcce.fr/inpop/calceph"
url = "https://github.com/conan-io/conan-center-index"

package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
Expand All @@ -43,18 +43,17 @@ def config_options(self):
del self.options.threadsafe

def configure(self):
if self.options.shared:
if self.settings.os == "Windows":
del self.options.shared
self.package_type = "static-library"
if self.options.get_safe("shared"):
self.options.rm_safe("fPIC")
self.settings.rm_safe("compiler.cppstd")
self.settings.rm_safe("compiler.libcxx")

def layout(self):
basic_layout(self, src_folder="src")

def validate(self):
if is_msvc(self) and self.options.shared:
raise ConanInvalidConfiguration(f"{self.ref} doesn't support shared builds with Visual Studio yet")

def build_requirements(self):
if self._settings_build.os == "Windows" and not is_msvc(self):
self.win_bash = True
Expand Down
2 changes: 2 additions & 0 deletions recipes/calceph/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.5.5":
folder: all
"3.5.1":
folder: all
"3.5.0":
Expand Down

0 comments on commit 0c86693

Please sign in to comment.