1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

math/libxlsxwriter: Improve port and switch to CMake

* Switch to CMake
* Enable "make test"
* Unbundle libs (md5 and minizip)
* Import upstreamed PR #454

Reference:
https://github.com/jmcnamara/libxlsxwriter/pull/454

PR:		281018
Reviewed by:	bapt (maintainer)
This commit is contained in:
Daniel Engberg 2024-08-31 00:19:12 +02:00
parent 3a4b5f414c
commit b2bbc1ba67
4 changed files with 24 additions and 22 deletions

View File

@ -1,19 +1,36 @@
PORTNAME= libxlsxwriter
PORTVERSION= 1.1.8
DISTVERSIONPREFIX= v
DISTVERSION= 1.1.8
PORTREVISION= 1
CATEGORIES= math devel
PATCH_SITES= https://github.com/jmcnamara/libxlsxwriter/commit/
PATCHFILES= 5af9c1fd3e330a6a4aeaba58599e2c5294c521ab.patch:-p1
MAINTAINER= bapt@FreeBSD.org
COMMENT= C library for creating Excel XLSX files
WWW= https://libxlsxwriter.github.io/
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/License.txt
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR}
USES= cmake:testing compiler:c11 localbase:ldflags minizip pathfix \
pkgconfig python:test ssl
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= jmcnamara
MAKE_ARGS= INSTALL_DIR=${STAGEDIR}${PREFIX}
USE_LDCONFIG= yes
USES= compiler:c11 gmake
EXTRACT_AFTER_ARGS= --exclude ${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT}/third_party/md5 \
--exclude ${GH_PROJECT_DEFAULT}-${GH_TAGNAME_EXTRACT}/third_party/minizip \
--no-same-owner --no-same-permissions
CMAKE_TESTING_ON= BUILD_TESTS
CMAKE_ON= BUILD_SHARED_LIBS \
USE_OPENSSL_MD5 \
USE_SYSTEM_MINIZIP
.include <bsd.port.mk>

View File

@ -1,3 +1,5 @@
TIMESTAMP = 1724058226
TIMESTAMP = 1725056181
SHA256 (jmcnamara-libxlsxwriter-v1.1.8_GH0.tar.gz) = 122c98353e5b69284a1cd782be7ae67bdefde2146f8197ef89a1aaf886058e86
SIZE (jmcnamara-libxlsxwriter-v1.1.8_GH0.tar.gz) = 21840785
SHA256 (5af9c1fd3e330a6a4aeaba58599e2c5294c521ab.patch) = b5b9d12c52bb6640c5399967360f9d1cd7a31a7c15bd2a6d3226d8c50b445074
SIZE (5af9c1fd3e330a6a4aeaba58599e2c5294c521ab.patch) = 3271

View File

@ -1,16 +0,0 @@
--- src/Makefile.orig 2021-07-12 22:30:20 UTC
+++ src/Makefile
@@ -159,11 +159,11 @@ $(LIBXLSXWRITER_A) : $(OBJS)
# The dynamic library.
ifeq ($(findstring m32,$(CFLAGS)),m32)
-ARCH = -m32
+XSLX_ARCH = -m32
endif
$(LIBXLSXWRITER_SO) : $(SOBJS)
- $(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(ARCH) $(TARGET_ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $(MD5_SO) $(DTOA_LIB_SO) $^ $(LIBS)
+ $(Q)$(CC) $(LDFLAGS) $(SOFLAGS) $(XSLX_ARCH) $(TARGET_ARCH) -o $@ $(MINIZIP_SO) $(TMPFILEPLUS_SO) $(MD5_SO) $(DTOA_LIB_SO) $^ $(LIBS)
# The test library.
$(LIBXLSXWRITER_TO) : $(TOBJS)

View File

@ -33,7 +33,6 @@ include/xlsxwriter/vml.h
include/xlsxwriter/workbook.h
include/xlsxwriter/worksheet.h
include/xlsxwriter/xmlwriter.h
lib/libxlsxwriter.a
lib/libxlsxwriter.so
lib/libxlsxwriter.so.7
libdata/pkgconfig/xlsxwriter.pc