utf8cpp: move to GitHub, make it a CMake package (#47870)

This commit is contained in:
Massimiliano Culpo 2024-12-02 22:14:24 +01:00 committed by GitHub
parent c30c85a99c
commit ac17e8bea4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,20 +6,16 @@
from spack.package import *
class Utf8cpp(Package):
class Utf8cpp(CMakePackage):
"""A simple, portable and lightweight generic library for handling UTF-8
encoded strings."""
homepage = "https://utfcpp.sourceforge.net/"
homepage = "https://github.com/nemtrif/utfcpp"
url = "https://github.com/nemtrif/utfcpp/archive/refs/tags/v2.3.4.tar.gz"
version("2.3.4", sha256="3373cebb25d88c662a2b960c4d585daf9ae7b396031ecd786e7bb31b15d010ef")
version("4.0.6", sha256="6920a6a5d6a04b9a89b2a89af7132f8acefd46e0c2a7b190350539e9213816c0")
version("3.2.4", sha256="fde21a4c519eed25f095a1cd8490167409cc70d7b5e9c38756142e588ccb7c7e")
version("2.3.4", sha256="1a26d07f88d173dbd26a45f645009d0c6f6ceeb5f0fc391b9f3a769d090a66f4")
def url_for_version(self, version):
url = (
"https://sourceforge.net/projects/utfcpp/files/utf8cpp_2x/Release%20{0}/utf8_v{1}.zip"
)
return url.format(version, version.underscored)
def install(self, spec, prefix):
install_tree("doc", prefix.share.doc)
install_tree("source", prefix.include)
depends_on("c", type="build")
depends_on("cxx", type="build")