From 77b58eb775678d4fe0e96d408b2fe6286c383537 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Tue, 26 Dec 2023 20:36:11 +0200 Subject: [PATCH] libsigcpp: add v3.6.0, v2.12.1 --- recipes/libsigcpp/2.x.x/conandata.yml | 3 ++ recipes/libsigcpp/3.x.x/conandata.yml | 11 ++----- recipes/libsigcpp/3.x.x/conanfile.py | 28 ++++++++--------- .../3.x.x/patches/3.0.0-0001-libsigcpp.patch | 31 ------------------- .../3.x.x/patches/3.0.7-0001-libsigcpp.patch | 31 ------------------- recipes/libsigcpp/config.yml | 6 ++-- 6 files changed, 24 insertions(+), 86 deletions(-) delete mode 100644 recipes/libsigcpp/3.x.x/patches/3.0.0-0001-libsigcpp.patch delete mode 100644 recipes/libsigcpp/3.x.x/patches/3.0.7-0001-libsigcpp.patch diff --git a/recipes/libsigcpp/2.x.x/conandata.yml b/recipes/libsigcpp/2.x.x/conandata.yml index 604636a369d17..90f6b75c1d874 100644 --- a/recipes/libsigcpp/2.x.x/conandata.yml +++ b/recipes/libsigcpp/2.x.x/conandata.yml @@ -1,4 +1,7 @@ sources: + "2.12.1": + url: "https://ftp2.nluug.nl/windowing/gnome/sources/libsigc++/2.12/libsigc++-2.12.1.tar.xz" + sha256: "a9dbee323351d109b7aee074a9cb89ca3e7bcf8ad8edef1851f4cf359bd50843" "2.10.8": url: "https://ftp2.nluug.nl/windowing/gnome/sources/libsigc++/2.10/libsigc++-2.10.8.tar.xz" sha256: "235a40bec7346c7b82b6a8caae0456353dc06e71f14bc414bcc858af1838719a" diff --git a/recipes/libsigcpp/3.x.x/conandata.yml b/recipes/libsigcpp/3.x.x/conandata.yml index ca82ebd4ecc93..52f228302f1dd 100644 --- a/recipes/libsigcpp/3.x.x/conandata.yml +++ b/recipes/libsigcpp/3.x.x/conandata.yml @@ -1,12 +1,7 @@ sources: + "3.6.0": + url: "https://ftp.gnome.org/pub/GNOME/sources/libsigc++/3.6/libsigc++-3.6.0.tar.xz" + sha256: "c3d23b37dfd6e39f2e09f091b77b1541fbfa17c4f0b6bf5c89baef7229080e17" "3.0.7": url: "https://ftp.gnome.org/pub/GNOME/sources/libsigc++/3.0/libsigc++-3.0.7.tar.xz" sha256: "bfbe91c0d094ea6bbc6cbd3909b7d98c6561eea8b6d9c0c25add906a6e83d733" - "3.0.0": - url: "https://ftp.gnome.org/pub/GNOME/sources/libsigc++/3.0/libsigc++-3.0.0.tar.xz" - sha256: "50a0855c1eb26e6044ffe888dbe061938ab4241f96d8f3754ea7ead38ab8ed06" -patches: - "3.0.7": - - patch_file: "patches/3.0.7-0001-libsigcpp.patch" - "3.0.0": - - patch_file: "patches/3.0.0-0001-libsigcpp.patch" diff --git a/recipes/libsigcpp/3.x.x/conanfile.py b/recipes/libsigcpp/3.x.x/conanfile.py index 7f5cc01dd330a..b9aa1af16fb47 100644 --- a/recipes/libsigcpp/3.x.x/conanfile.py +++ b/recipes/libsigcpp/3.x.x/conanfile.py @@ -2,10 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import ( - apply_conandata_patches, collect_libs, copy, export_conandata_patches, get, - rename, replace_in_file, rmdir, save -) +from conan.tools.files import collect_libs, copy, get, rename, replace_in_file, rmdir, save import glob import os import textwrap @@ -45,9 +42,6 @@ def _minimum_compilers_version(self): "apple-clang": "10", } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC @@ -64,10 +58,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def loose_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] + return all(int(p1) < int(p2) for p1, p2 in zip(str(v1).split("."), str(v2).split("."))) minimum_version = self._minimum_compilers_version.get(str(self.settings.compiler), False) if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): @@ -76,18 +67,27 @@ def loose_lt_semver(v1, v2): ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) tc.generate() def _patch_sources(self): - apply_conandata_patches(self) if not self.options.shared: replace_in_file(self, os.path.join(self.source_folder, "sigc++config.h.cmake"), "define SIGC_DLL 1", "undef SIGC_DLL") + # Disable subdirs + save(self, os.path.join(self.source_folder, "examples", "CMakeLists.txt"), "") + save(self, os.path.join(self.source_folder, "tests", "CMakeLists.txt"), "") + # Enable static builds + cmakelists = os.path.join(self.source_folder, "sigc++", "CMakeLists.txt") + replace_in_file(self, cmakelists, " SHARED ", " ") + # Fix install paths + replace_in_file(self, cmakelists, + 'LIBRARY DESTINATION "lib"', + "LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin") + def build(self): self._patch_sources() diff --git a/recipes/libsigcpp/3.x.x/patches/3.0.0-0001-libsigcpp.patch b/recipes/libsigcpp/3.x.x/patches/3.0.0-0001-libsigcpp.patch deleted file mode 100644 index 938d5b0c7ab4b..0000000000000 --- a/recipes/libsigcpp/3.x.x/patches/3.0.0-0001-libsigcpp.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -71,8 +71,6 @@ - - - add_subdirectory (sigc++) --add_subdirectory (examples) --add_subdirectory (tests) - - - set (PROJECT_CMAKE_NAME "${PROJECT_NAME}-3") ---- sigc++/CMakeLists.txt -+++ sigc++/CMakeLists.txt -@@ -23,7 +23,7 @@ - - set (SIGCPP_LIB_NAME sigc-${SIGCXX_API_VERSION}) - --add_library(${SIGCPP_LIB_NAME} SHARED ${SOURCE_FILES}) -+add_library(${SIGCPP_LIB_NAME} ${SOURCE_FILES}) - - set_property (TARGET ${SIGCPP_LIB_NAME} PROPERTY VERSION ${PACKAGE_VERSION}) - set_property(TARGET ${SIGCPP_LIB_NAME} PROPERTY SOVERSION ${LIBSIGCPP_SOVERSION}) -@@ -42,6 +42,8 @@ - install ( - TARGETS ${SIGCPP_LIB_NAME} - EXPORT "${PROJECT_CMAKE_NAME}Targets" -+ ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib" -+ RUNTIME DESTINATION "bin" - INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" - ) diff --git a/recipes/libsigcpp/3.x.x/patches/3.0.7-0001-libsigcpp.patch b/recipes/libsigcpp/3.x.x/patches/3.0.7-0001-libsigcpp.patch deleted file mode 100644 index a0455859fec29..0000000000000 --- a/recipes/libsigcpp/3.x.x/patches/3.0.7-0001-libsigcpp.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -89,8 +89,6 @@ - - - add_subdirectory (sigc++) --add_subdirectory (examples) --add_subdirectory (tests) - - - set (PROJECT_CMAKE_NAME "${PROJECT_NAME}-3") ---- sigc++/CMakeLists.txt -+++ sigc++/CMakeLists.txt -@@ -23,7 +23,7 @@ - - set (SIGCPP_LIB_NAME sigc-${SIGCXX_API_VERSION}) - --add_library(${SIGCPP_LIB_NAME} SHARED ${SOURCE_FILES}) -+add_library(${SIGCPP_LIB_NAME} ${SOURCE_FILES}) - - set_property (TARGET ${SIGCPP_LIB_NAME} PROPERTY VERSION ${PACKAGE_VERSION}) - set_property(TARGET ${SIGCPP_LIB_NAME} PROPERTY SOVERSION ${LIBSIGCPP_SOVERSION}) -@@ -42,6 +42,8 @@ - install ( - TARGETS ${SIGCPP_LIB_NAME} - EXPORT "${PROJECT_CMAKE_NAME}Targets" -+ ARCHIVE DESTINATION "lib" - LIBRARY DESTINATION "lib" -+ RUNTIME DESTINATION "bin" - INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" - ) diff --git a/recipes/libsigcpp/config.yml b/recipes/libsigcpp/config.yml index 9590a7ad0b61a..4a40ae4ef452b 100644 --- a/recipes/libsigcpp/config.yml +++ b/recipes/libsigcpp/config.yml @@ -1,7 +1,9 @@ versions: - "3.0.7": + "3.6.0": folder: "3.x.x" - "3.0.0": + "3.0.7": folder: "3.x.x" + "2.12.1": + folder: "2.x.x" "2.10.8": folder: "2.x.x"