Skip to content

Commit 177f0e3

Browse files
(#21645) xmlsec: bump
* xmlsec: bump * Bump/xmlsec/all (#54) * xmlsec/all: bump deps Generated and committed by [Conan Center Bump Deps](https://github.com/ericLemanissier/conan-center-index-bump-deps) Find more updatable recipes in the [GitHub Pages](https://ericLemanissier.github.io/conan-center-index-bump-deps/) * rebump * unbump libxml2 * simplify test package * remove 1.3.2 * Update conanfile.py * Update conanfile.py
1 parent 8ecce87 commit 177f0e3

File tree

9 files changed

+45
-270
lines changed

9 files changed

+45
-270
lines changed

recipes/xmlsec/all/conandata.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
sources:
2+
"1.2.38":
3+
url: "https://github.com/lsh123/xmlsec/releases/download/xmlsec-1_2_38/xmlsec1-1.2.38.tar.gz"
4+
sha256: "9de8cf8d7d2e288a9cef205cc6cb93c926a67dadfaf44aaff76ed63c28ce9902"
25
"1.2.33":
36
url: "https://www.aleksey.com/xmlsec/download/older-releases/xmlsec1-1.2.33.tar.gz"
47
sha256: "26041d35a20a245ed5a2fb9ee075f10825664d274220cb5190340fa87a4d0931"

recipes/xmlsec/all/conanfile.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def build_requirements(self):
8080
if not is_msvc(self):
8181
self.tool_requires("libtool/2.4.7")
8282
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
83-
self.tool_requires("pkgconf/2.0.3")
83+
self.tool_requires("pkgconf/2.1.0")
8484
if self._settings_build.os == "Windows":
8585
self.win_bash = True
8686
if not self.conf.get("tools.microsoft.bash:path", check_type=str):
@@ -158,11 +158,13 @@ def build(self):
158158
f"static={yes_no(not self.options.shared)}",
159159
"include=\"{}\"".format(";".join(deps_includedirs)),
160160
"lib=\"{}\"".format(";".join(deps_libdirs)),
161-
"with-dl=no",
161+
"with-dl={}".format(yes_no(Version(self.version) >= "1.2.35" and self.options.shared)),
162162
f"xslt={yes_no(self.options.with_xslt)}",
163163
"iconv=no",
164164
"crypto={}".format(",".join(crypto_engines)),
165165
]
166+
if Version(self.version) >= "1.2.35":
167+
args.append("pedantic=no")
166168

167169
with chdir(self, os.path.join(self.source_folder, "win32")):
168170
self.run(f"cscript configure.js {' '.join(args)}")
@@ -199,8 +201,9 @@ def package(self):
199201
if not self.options.shared:
200202
rm(self, "*.dll", os.path.join(self.package_folder, "bin"))
201203
rm(self, "*.pdb", os.path.join(self.package_folder, "bin"))
202-
os.unlink(os.path.join(self.package_folder, "lib", "libxmlsec-openssl_a.lib" if self.options.shared else "libxmlsec-openssl.lib"))
203-
os.unlink(os.path.join(self.package_folder, "lib", "libxmlsec_a.lib" if self.options.shared else "libxmlsec.lib"))
204+
if Version(self.version) < "1.2.35":
205+
os.unlink(os.path.join(self.package_folder, "lib", "libxmlsec-openssl_a.lib" if self.options.shared else "libxmlsec-openssl.lib"))
206+
os.unlink(os.path.join(self.package_folder, "lib", "libxmlsec_a.lib" if self.options.shared else "libxmlsec.lib"))
204207
else:
205208
autotools = Autotools(self)
206209
autotools.install()

recipes/xmlsec/all/test_package/CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ cmake_minimum_required(VERSION 3.1)
22
project(test_package LANGUAGES C)
33

44
find_package(xmlsec REQUIRED CONFIG)
5-
find_package(LibXml2 REQUIRED MODULE)
6-
if(XMLSEC_WITH_XSLT)
7-
find_package(LibXslt REQUIRED MODULE)
8-
endif()
95

10-
add_executable(${PROJECT_NAME} sign1.c)
11-
target_link_libraries(${PROJECT_NAME} PRIVATE LibXml2::LibXml2 xmlsec::xmlsec)
12-
if(XMLSEC_WITH_XSLT)
13-
target_link_libraries(${PROJECT_NAME} PRIVATE LibXslt::LibXslt)
14-
endif()
6+
add_executable(${PROJECT_NAME} main.c)
7+
target_link_libraries(${PROJECT_NAME} PRIVATE xmlsec::xmlsec)
+3-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
from conan import ConanFile
22
from conan.tools.build import can_run
3-
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
3+
from conan.tools.cmake import CMake, cmake_layout
44
import os
55

66

77
class TestPackageConan(ConanFile):
88
settings = "os", "arch", "compiler", "build_type"
9-
generators = "CMakeDeps", "VirtualRunEnv"
9+
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
1010
test_type = "explicit"
1111

1212
def layout(self):
1313
cmake_layout(self)
1414

1515
def requirements(self):
1616
self.requires(self.tested_reference_str)
17-
self.requires("libxml2/2.11.5")
18-
19-
def generate(self):
20-
tc = CMakeToolchain(self)
21-
tc.variables["XMLSEC_WITH_XSLT"] = self.dependencies["xmlsec"].options.with_xslt
22-
tc.generate()
2317

2418
def build(self):
2519
cmake = CMake(self)
@@ -29,6 +23,4 @@ def build(self):
2923
def test(self):
3024
if can_run(self):
3125
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
32-
xml_file = os.path.join(self.source_folder, "sign1-tmpl.xml")
33-
pem_file = os.path.join(self.source_folder, "rsakey.pem")
34-
self.run(f"{bin_path} {xml_file} {pem_file}", env="conanrun")
26+
self.run(bin_path, env="conanrun")
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <stdlib.h>
2+
3+
4+
#include <xmlsec/xmlsec.h>
5+
6+
7+
int main(int argc, char **argv) {
8+
/* Init xmlsec library */
9+
if(xmlSecInit() < 0) {
10+
fprintf(stderr, "Error: xmlsec initialization failed.\n");
11+
return(-1);
12+
}
13+
14+
/* Check loaded library version */
15+
if(xmlSecCheckVersion() != 1) {
16+
fprintf(stderr, "Error: loaded xmlsec library version is not compatible.\n");
17+
return(-1);
18+
}
19+
20+
if(xmlSecCheckVersionExact() != 1) {
21+
fprintf(stderr, "Error: loaded xmlsec library version is not exact.\n");
22+
return(-1);
23+
}
24+
25+
/* Shutdown xmlsec library */
26+
xmlSecShutdown();
27+
return(0);
28+
}

recipes/xmlsec/all/test_package/rsakey.pem

-9
This file was deleted.

recipes/xmlsec/all/test_package/sign1-tmpl.xml

-26
This file was deleted.

recipes/xmlsec/all/test_package/sign1.c

-211
This file was deleted.

recipes/xmlsec/config.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
versions:
2+
"1.2.38":
3+
folder: all
24
"1.2.33":
35
folder: all
46
"1.2.32":

0 commit comments

Comments
 (0)