-
Notifications
You must be signed in to change notification settings - Fork 2.1k
mailio: add version 0.25.3 #27926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mailio: add version 0.25.3 #27926
Conversation
You will need to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ssauermann - Thanks for this PR! 🙏
Before merging, let me suggest some changes to clean up this recipe 😁 I could not directly apply those ones to your branch, so it'd be great if you could do it.
In a nutshell, my proposal includes:
- Stopped publishing older versions as there aren't any other recipes requiring them.
- Removed all the patches.
- Added a single line to replace the line needed in the last patch.
- Removed some useless imports after applying these changes.
- No upper limits requiring the CMake tool.
Diff
diff --git a/recipes/mailio/all/conandata.yml b/recipes/mailio/all/conandata.yml
index c42700110..eeb216031 100644
--- a/recipes/mailio/all/conandata.yml
+++ b/recipes/mailio/all/conandata.yml
@@ -2,43 +2,3 @@ sources:
"0.25.3":
url: "https://github.com/karastojko/mailio/archive/refs/tags/0.25.3.tar.gz"
sha256: "12B79D8A8211033D7E59BE2E30521A8109ED83BDA86C86437EBE7E04298A5AA5"
- "0.24.1":
- url: "https://github.com/karastojko/mailio/archive/refs/tags/0.24.1.tar.gz"
- sha256: "52d5ced35b6a87677d897010fb2e7c2d2ddbd834d59aab991c65c0c6627af40f"
- "0.23.0":
- url: "https://github.com/karastojko/mailio/archive/refs/tags/0.23.0.tar.gz"
- sha256: "9fc3f1f803a85170c2081cbbef2e301473a400683fc1dffefa2d6707598206a5"
- "0.22.0":
- url: "https://github.com/karastojko/mailio/archive/refs/tags/0.22.0.tar.gz"
- sha256: "e177522f0479f33b6cbc7085268ca385140457eb752b45f07e5d6b41e314ece9"
- "0.21.0":
- url: "https://github.com/karastojko/mailio/archive/refs/tags/0.21.0.tar.gz"
- sha256: "8f58dfc8bcbe01224c788f22c544c27611e3c411ed5a2097488fbb32a3c0fb3d"
- "0.20.0":
- url: "https://github.com/karastojko/mailio/archive/refs/tags/0.20.0.tar.gz"
- sha256: "073d6b1ff891444b54a01c2a3f17074fd612f9e2e14d9ebd61863c70737b1882"
-patches:
- "0.25.3":
- - patch_file: "patches/0.25.3-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
- "0.24.1":
- - patch_file: "patches/0.24.1-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
- "0.23.0":
- - patch_file: "patches/0.23.0-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
- "0.22.0":
- - patch_file: "patches/0.22.0-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
- "0.21.0":
- - patch_file: "patches/0.21.0-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
- "0.20.0":
- - patch_file: "patches/0.20.0-adapt-cmakelists.patch"
- patch_description: "fix install path"
- patch_type: "conan"
diff --git a/recipes/mailio/all/conanfile.py b/recipes/mailio/all/conanfile.py
index 668b0fdb3..e4a61835a 100644
--- a/recipes/mailio/all/conanfile.py
+++ b/recipes/mailio/all/conanfile.py
@@ -1,9 +1,7 @@
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
-from conan.tools.env import VirtualBuildEnv
-from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
-from conan.tools.scm import Version
+from conan.tools.files import copy, get, rmdir, replace_in_file
import os
required_conan_version = ">=2.0.9"
@@ -28,9 +26,6 @@ class MailioConan(ConanFile):
short_paths = True
implements = ["auto_shared_fpic"]
- def export_sources(self):
- export_conandata_patches(self)
-
def layout(self):
cmake_layout(self, src_folder="src")
@@ -42,25 +37,20 @@ class MailioConan(ConanFile):
check_min_cppstd(self, 17)
def build_requirements(self):
- self.tool_requires("cmake/[>=3.16.3 <4]")
+ self.tool_requires("cmake/[>=3.16.3]")
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
- apply_conandata_patches(self)
+ replace_in_file(self, os.path.join(self.source_folder, "CMakeLists.txt"),
+ "install(FILES ${CMAKE_BINARY_DIR}/version.hpp",
+ "install(FILES ${PROJECT_BINARY_DIR}/version.hpp")
def generate(self):
- env = VirtualBuildEnv(self)
- env.generate()
-
tc = CMakeToolchain(self)
- if Version(self.version) < "0.24.0":
- tc.variables["MAILIO_BUILD_SHARED_LIBRARY"] = self.options.shared
tc.variables["MAILIO_BUILD_DOCUMENTATION"] = False
tc.variables["MAILIO_BUILD_EXAMPLES"] = False
- if Version(self.version) >= "0.22.0":
- tc.variables["MAILIO_BUILD_TESTS"] = False
+ tc.variables["MAILIO_BUILD_TESTS"] = False
tc.generate()
-
deps = CMakeDeps(self)
deps.generate()
diff --git a/recipes/mailio/all/patches/0.20.0-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.20.0-adapt-cmakelists.patch
deleted file mode 100644
index 428097537..000000000
--- a/recipes/mailio/all/patches/0.20.0-adapt-cmakelists.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9cd343d..3fa8a34 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -142,7 +131,7 @@ install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgco
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
- target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_BINARY_DIR}")
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
diff --git a/recipes/mailio/all/patches/0.21.0-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.21.0-adapt-cmakelists.patch
deleted file mode 100644
index 8f2e69344..000000000
--- a/recipes/mailio/all/patches/0.21.0-adapt-cmakelists.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/a/CMakeLists.txt b/b/CMakeLists.txt
-index 5c9cc6d..86d24fa 100644
---- a/a/CMakeLists.txt
-+++ b/b/CMakeLists.txt
-@@ -137,7 +137,7 @@ configure_file(mailio.pc.in ${CMAKE_BINARY_DIR}/mailio.pc IMMEDIATE @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
-@@ -167,15 +167,15 @@ endif(MINGW)
- install(DIRECTORY include/mailio DESTINATION ${INCLUDE_INSTALL_DIR})
-
- install(TARGETS ${PROJECT_NAME}
-- EXPORT ${PROJECT_NAME}Config
-+ # EXPORT ${PROJECT_NAME}Config
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
- )
-
--export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)
-+# export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)
-
--install(EXPORT ${PROJECT_NAME}Config DESTINATION share/${PROJECT_NAME}/cmake)
-+# install(EXPORT ${PROJECT_NAME}Config DESTINATION share/${PROJECT_NAME}/cmake)
-
- # optionally build examples
- if(${MAILIO_BUILD_EXAMPLES})
diff --git a/recipes/mailio/all/patches/0.22.0-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.22.0-adapt-cmakelists.patch
deleted file mode 100644
index 417d34636..000000000
--- a/recipes/mailio/all/patches/0.22.0-adapt-cmakelists.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a79e042..9306cba 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -145,7 +145,7 @@ configure_file(mailio.pc.in ${CMAKE_BINARY_DIR}/mailio.pc IMMEDIATE @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
-@@ -181,16 +181,11 @@ endif()
- install(DIRECTORY include/mailio DESTINATION ${INCLUDE_INSTALL_DIR})
-
- install(TARGETS ${PROJECT_NAME}
-- EXPORT ${PROJECT_NAME}Config
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
- )
-
--export(TARGETS ${PROJECT_NAME} FILE ${PROJECT_NAME}Config.cmake)
--
--install(EXPORT ${PROJECT_NAME}Config DESTINATION share/${PROJECT_NAME}/cmake)
--
- # optionally build examples
- if(${MAILIO_BUILD_EXAMPLES})
- add_subdirectory(examples)
diff --git a/recipes/mailio/all/patches/0.23.0-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.23.0-adapt-cmakelists.patch
deleted file mode 100644
index a29154c58..000000000
--- a/recipes/mailio/all/patches/0.23.0-adapt-cmakelists.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e3b30fd..d1adcab 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -146,7 +146,7 @@ configure_file(mailio.pc.in ${CMAKE_BINARY_DIR}/mailio.pc IMMEDIATE @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
diff --git a/recipes/mailio/all/patches/0.24.1-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.24.1-adapt-cmakelists.patch
deleted file mode 100644
index 455368841..000000000
--- a/recipes/mailio/all/patches/0.24.1-adapt-cmakelists.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 30d4e0d..747cfab 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -144,7 +144,7 @@ configure_file(mailio.pc.in ${CMAKE_BINARY_DIR}/mailio.pc IMMEDIATE @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
diff --git a/recipes/mailio/all/patches/0.25.3-adapt-cmakelists.patch b/recipes/mailio/all/patches/0.25.3-adapt-cmakelists.patch
deleted file mode 100644
index 3c8576b48..000000000
--- a/recipes/mailio/all/patches/0.25.3-adapt-cmakelists.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 7ea76be..75f4eb8 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -141,7 +141,7 @@ configure_file(mailio.pc.in ${CMAKE_BINARY_DIR}/mailio.pc IMMEDIATE @ONLY)
- install(FILES ${CMAKE_BINARY_DIR}/mailio.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
-
- configure_file(${PROJECT_SOURCE_DIR}/include/version.hpp.in version.hpp)
--install(FILES ${CMAKE_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-+install(FILES ${PROJECT_BINARY_DIR}/version.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME})
-
- # generate the export header for exporting symbols
- # this is needed to generate a shared library.
Thanks! I've applied the patch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @ssauermann 👏
Sorry, but I missed removing these lines https://github.com/conan-io/conan-center-index/pull/27926/files#diff-1976ed5ee8e165fec4ee5b6622b8667482c16fe75ae11a382c58d893e3c297b2R4-R13 from the conandata.yml file in my previous diff 😮💨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ssauermann
LGTM! 👏
Summary
Changes to recipe: mailio/0.25.3
Motivation
Multiple fixes since 0.24.1
Details
karastojko/mailio@0.24.1...0.25.3