Skip to content

Commit

Permalink
libxlsxwriter: add new version 1.1.9 (#25715)
Browse files Browse the repository at this point in the history
* libxlsxwriter: add version 1.1.9

* add virtualbuildenv

* revert 1.1.8

* fix compilation errors on MSVC

* disable pkgconf
  • Loading branch information
toge authored Nov 4, 2024
1 parent c3f020c commit 6555cdf
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions recipes/libxlsxwriter/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.1.9":
url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.9.tar.gz"
sha256: "03ae330d50f74c8a70be0b06b52bd50868f7cd1251ed040fe3b68d1ad6fd11dc"
"1.1.8":
url: "https://github.com/jmcnamara/libxlsxwriter/archive/v1.1.8.tar.gz"
sha256: "122c98353e5b69284a1cd782be7ae67bdefde2146f8197ef89a1aaf886058e86"
Expand All @@ -18,6 +21,10 @@ sources:
url: "https://github.com/jmcnamara/libxlsxwriter/archive/RELEASE_1.0.0.tar.gz"
sha256: "8b353379333c323d14a9d265cd2491d3a6c0032c8d6ec2141f10b82ab66a087c"
patches:
"1.1.9":
- patch_file: "patches/1.1.9-0001-fix-cmake.patch"
patch_description: "Fix CMake: disable pkgconfig & avoid some hardcoded flags"
patch_type: "conan"
"1.1.8":
- patch_file: "patches/1.1.7-0001-fix-cmake.patch"
patch_description: "Fix CMake: robust dependencies discovery & avoid some hardcoded flags"
Expand Down
2 changes: 2 additions & 0 deletions recipes/libxlsxwriter/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def generate(self):
tc.variables["USE_STATIC_MSVC_RUNTIME"] = is_msvc_static_runtime(self)
tc.generate()
deps = CMakeDeps(self)
if Version(self.version) >= "1.1.9":
deps.set_property("minizip", "cmake_additional_variables_prefixes", ["MINIZIP"])
deps.generate()

def build(self):
Expand Down
25 changes: 25 additions & 0 deletions recipes/libxlsxwriter/all/patches/1.1.9-0001-fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e444dcc..44a638d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -183,9 +183,9 @@ endif()

if(NOT BUILD_SHARED_LIBS)
if(UNIX)
- set(CMAKE_POSITION_INDEPENDENT_CODE ON)
+# set(CMAKE_POSITION_INDEPENDENT_CODE ON)
elseif(MINGW OR MSYS)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -static-libgcc -Wno-char-subscripts -Wno-long-long")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts -Wno-long-long")
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_FILE32API)
elseif(MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"")
@@ -208,7 +208,7 @@ if(MSVC AND USE_STATIC_MSVC_RUNTIME)
endif()

# Configure pkg-config
-find_package(PkgConfig)
+# find_package(PkgConfig)
file(READ "include/xlsxwriter.h" ver)

string(REGEX MATCH "LXW_VERSION \"([^\"]+)\"" _ ${ver})
2 changes: 2 additions & 0 deletions recipes/libxlsxwriter/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.1.9":
folder: "all"
"1.1.8":
folder: "all"
"1.1.7":
Expand Down

0 comments on commit 6555cdf

Please sign in to comment.