Skip to content

Commit

Permalink
scnlib drop older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jcar87 committed Nov 4, 2024
1 parent cd1ae6e commit 7cb72de
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 288 deletions.
61 changes: 0 additions & 61 deletions recipes/scnlib/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,64 +11,3 @@ sources:
"2.0.3":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.3.tar.gz"
sha256: "507ed0e988f1d9460a9c921fc21f5a5244185a4015942f235522fbe5c21e6a51"
"2.0.2":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.2.tar.gz"
sha256: "a485076b8710576cf05fbc086d39499d16804575c0660b0dfaeeaf7823660a17"
"2.0.1":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.1.tar.gz"
sha256: "f399d1b1f36f5d53a2d63fd2974797ab8f3f7e69c424d9661253830cb793b72e"
"2.0.0":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v2.0.0.tar.gz"
sha256: "2a35356a3a7485fdf97f28cfbea52db077cf4e7bab0a5a0fc3b04e89630334cd"
"1.1.3":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.1.3.tar.gz"
sha256: "32ca1baed2da5d86aa03273c87580ef32e95925697d252138507ec0545d86ab2"
"1.1.2":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.1.2.tar.gz"
sha256: "5ed3ec742302c7304bf188bde9c4012a65dc8124ff4e1a69b598480d664250e6"
"1.0":
url: "https://github.com/eliaskosunen/scnlib/archive/refs/tags/v1.0.tar.gz"
sha256: "5b8333e522206c2a74e57a9c9544c4fe4e7858cfe93e216905b463eaf91af5fe"
patches:
"2.0.2":
- patch_file: "patches/2.0.0-0001-remove-re2-version.patch"
patch_description: "remove re2 version on find_package"
patch_type: "portability"
"2.0.1":
- patch_file: "patches/2.0.0-0001-remove-re2-version.patch"
patch_description: "remove re2 version on find_package"
patch_type: "portability"
"2.0.0":
- patch_file: "patches/2.0.0-0001-remove-re2-version.patch"
patch_description: "remove re2 version on find_package"
patch_type: "portability"
"1.1.3":
- patch_file: "patches/1.1.3-0001-install-dll-windows.patch"
patch_description: "add runtime destination path on install"
patch_type: "portability"
- patch_file: "patches/1.1.3-0002-remove-header-only-target.patch"
patch_description: "prevent to generate header only target for conan package"
patch_type: "conan"
- patch_file: "patches/1.1.3-0003-fix-link-keyword.patch"
patch_description: "use PRIVATE instead of INTERFACE"
patch_type: "conan"
"1.1.2":
- patch_file: "patches/1.1.2-0001-install-dll-windows.patch"
patch_description: "add runtime destination path on install"
patch_type: "portability"
- patch_file: "patches/1.1.2-0002-remove-header-only-target.patch"
patch_description: "prevent to generate header only target for conan package"
patch_type: "conan"
- patch_file: "patches/1.1.2-0003-fix-link-keyword.patch"
patch_description: "use PRIVATE instead of INTERFACE"
patch_type: "conan"
"1.0":
- patch_file: "patches/1.0-0001-install-dll-windows.patch"
patch_description: "add runtime destination path on install"
patch_type: "portability"
- patch_file: "patches/1.0-0002-remove-header-only-target.patch"
patch_description: "prevent to generate header only target for conan package"
patch_type: "conan"
- patch_file: "patches/1.0-0003-use-conan-package.patch"
patch_description: "use conan package of fast-float"
patch_type: "conan"
46 changes: 15 additions & 31 deletions recipes/scnlib/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from conan import ConanFile
from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, rmdir
from conan.tools.files import get, copy, rm, rmdir
from conan.tools.build import check_min_cppstd
from conan.tools.scm import Version
from conan.tools.layout import basic_layout
Expand Down Expand Up @@ -35,23 +35,15 @@ class ScnlibConan(ConanFile):

@property
def _min_cppstd(self):
if Version(self.version) < "2.0.0":
return "11"
else:
# scn/2.0.0 has complation error on MSVC c++17
# we have to use versions which support c++20
# https://github.com/eliaskosunen/scnlib/issues/97
# https://github.com/conan-io/conan-center-index/pull/22455#issuecomment-1924444193
return "20" if is_msvc(self) else "17"

def export_sources(self):
export_conandata_patches(self)
# scn/2.0.0 has complation error on MSVC c++17
# we have to use versions which support c++20
# https://github.com/eliaskosunen/scnlib/issues/97
# https://github.com/conan-io/conan-center-index/pull/22455#issuecomment-1924444193
return "20" if is_msvc(self) else "17"

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if Version(self.version) < "2.0":
del self.options.regex_backend

def configure(self):
if self.options.get_safe("header_only") or self.options.shared:
Expand Down Expand Up @@ -109,24 +101,21 @@ def generate(self):
tc.variables["SCN_DOCS"] = False
tc.variables["SCN_INSTALL"] = True
tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = True
if Version(self.version) < "2.0":
tc.variables["SCN_USE_BUNDLED_FAST_FLOAT"] = False
else:
tc.variables["SCN_USE_EXTERNAL_SIMDUTF"] = True
tc.variables["SCN_USE_EXTERNAL_FAST_FLOAT"] = True
tc.variables["SCN_BENCHMARKS_BUILDTIME"] = False
tc.variables["SCN_BENCHMARKS_BINARYSIZE"] = False
tc.variables["SCN_DISABLE_REGEX"] = self.options.regex_backend is None
if self.options.regex_backend is not None:
tc.variables["SCN_REGEX_BACKEND"] = self.options.regex_backend
tc.variables["SCN_USE_EXTERNAL_REGEX_BACKEND"] = True

tc.variables["SCN_USE_EXTERNAL_SIMDUTF"] = True
tc.variables["SCN_USE_EXTERNAL_FAST_FLOAT"] = True
tc.variables["SCN_BENCHMARKS_BUILDTIME"] = False
tc.variables["SCN_BENCHMARKS_BINARYSIZE"] = False
tc.variables["SCN_DISABLE_REGEX"] = self.options.regex_backend is None
if self.options.regex_backend is not None:
tc.variables["SCN_REGEX_BACKEND"] = self.options.regex_backend
tc.variables["SCN_USE_EXTERNAL_REGEX_BACKEND"] = True
tc.generate()

deps = CMakeDeps(self)
deps.generate()

def build(self):
apply_conandata_patches(self)
if not self.options.get_safe("header_only"):
cmake = CMake(self)
cmake.configure()
Expand Down Expand Up @@ -166,11 +155,6 @@ def package_info(self):
self.cpp_info.components["_scnlib"].requires.append("fast_float::fast_float")
if "2.0" <= Version(self.version) < "3.0":
self.cpp_info.components["_scnlib"].requires.append("simdutf::simdutf")
if Version(self.version) >= "2.0":
if self.options.get_safe("regex_backend") in ["boost", "boost_icu"]:
self.cpp_info.components["_scnlib"].requires.append("boost::regex")
elif self.options.get_safe("regex_backend") == "re2":
self.cpp_info.components["_scnlib"].requires.append("re2::re2")

if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.components["_scnlib"].system_libs.append("m")
Expand Down
12 changes: 0 additions & 12 deletions recipes/scnlib/all/patches/1.0-0001-install-dll-windows.patch

This file was deleted.

This file was deleted.

35 changes: 0 additions & 35 deletions recipes/scnlib/all/patches/1.0-0003-use-conan-package.patch

This file was deleted.

12 changes: 0 additions & 12 deletions recipes/scnlib/all/patches/1.1.2-0001-install-dll-windows.patch

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions recipes/scnlib/all/patches/1.1.2-0003-fix-link-keyword.patch

This file was deleted.

12 changes: 0 additions & 12 deletions recipes/scnlib/all/patches/1.1.3-0001-install-dll-windows.patch

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions recipes/scnlib/all/patches/1.1.3-0003-fix-link-keyword.patch

This file was deleted.

13 changes: 0 additions & 13 deletions recipes/scnlib/all/patches/2.0.0-0001-remove-re2-version.patch

This file was deleted.

12 changes: 0 additions & 12 deletions recipes/scnlib/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,3 @@ versions:
folder: all
"2.0.3":
folder: all
"2.0.2":
folder: all
"2.0.1":
folder: all
"2.0.0":
folder: all
"1.1.3":
folder: all
"1.1.2":
folder: all
"1.0":
folder: all

0 comments on commit 7cb72de

Please sign in to comment.