Date: Thu, 5 Sep 2024 06:20:07 GMT From: Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: adaf512dc055 - main - textproc/nuspell: Clean up Makefile Message-ID: <202409050620.4856K7Uw096128@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=adaf512dc055f0ab907b1120d4fafa932a3e7864 commit adaf512dc055f0ab907b1120d4fafa932a3e7864 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-09-05 05:25:22 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-09-05 06:17:48 +0000 textproc/nuspell: Clean up Makefile - Update WWW - Update version requirement of TEST_DEPENDS - Use complete arguments/options - Convert REINPLACE_CMD to patch files - Remove unnecessary substitution - Cosmetic change --- textproc/nuspell/Makefile | 36 ++++++++++------------ textproc/nuspell/files/patch-CMakeLists.txt | 7 +++++ .../nuspell/files/patch-src-nuspell-finder.cxx | 14 +++++++++ textproc/nuspell/pkg-plist | 3 +- 4 files changed, 40 insertions(+), 20 deletions(-) diff --git a/textproc/nuspell/Makefile b/textproc/nuspell/Makefile index 8b4d0c8f8132..66b15b95884b 100644 --- a/textproc/nuspell/Makefile +++ b/textproc/nuspell/Makefile @@ -1,44 +1,42 @@ PORTNAME= nuspell +PORTVERSION= 5.1.6 DISTVERSIONPREFIX= v -DISTVERSION= 5.1.6 CATEGORIES= textproc MAINTAINER= sunpoet@FreeBSD.org COMMENT= Fast and safe spellchecking C++ library -WWW= https://nuspell.github.io/ +WWW= https://nuspell.github.io/ \ + https://github.com/nuspell/nuspell LICENSE= LGPL3+ LICENSE_FILE= ${WRKSRC}/COPYING.LESSER LIB_DEPENDS= libicuuc.so:devel/icu -TEST_DEPENDS= catch2>0:devel/catch2 +TEST_DEPENDS= catch2>=3.1.1:devel/catch2 USES= cmake:testing compiler:c++17-lang -USE_GITHUB= yes + +CMAKE_ON= BUILD_SHARED_LIBS BUILD_TOOLS +CMAKE_OFF= BUILD_TESTING +CMAKE_TESTING_ON= BUILD_TESTING USE_LDCONFIG= yes -CMAKE_OFF+= ${CMAKE_TESTING_ON} -PLIST_SUB= VERSION=${PORTVERSION} +PLIST_SUB= PORTVERSION=${PORTVERSION} + +USE_GITHUB= yes OPTIONS_DEFINE= MANPAGES -OPTIONS_DEFAULT=MANPAGES OPTIONS_EXCLUDE_i386= MANPAGES # https://github.com/haskell-foundation/foundation/issues/565 +OPTIONS_DEFAULT=MANPAGES +OPTIONS_SUB= yes MANPAGES_BUILD_DEPENDS= pandoc:textproc/hs-pandoc MANPAGES_CMAKE_BOOL= BUILD_DOCS -MANPAGES_PLIST_FILES= share/man/man1/${PORTNAME}.1.gz -post-patch: -# Skip README as it only contains install instructions - @${REINPLACE_CMD} -i .doc '/README/d' ${WRKSRC}/CMakeLists.txt -# Respect PREFIX != /usr/local - @${REINPLACE_CMD} -e 's,/usr/local,${PREFIX},' \ - ${WRKSRC}/src/nuspell/finder.cxx - -makepatch-clean: +post-extract: @${RM} ${WRKSRC}/tests/suggestiontest/Makefile.orig -.include <bsd.port.mk> +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|' ${WRKSRC}/src/nuspell/finder.cxx -# XXX Don't override definition in Mk/bsd.port.mk -makepatch: makepatch-clean +.include <bsd.port.mk> diff --git a/textproc/nuspell/files/patch-CMakeLists.txt b/textproc/nuspell/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..cf7297bfab09 --- /dev/null +++ b/textproc/nuspell/files/patch-CMakeLists.txt @@ -0,0 +1,7 @@ +--- CMakeLists.txt.orig 2024-07-04 11:45:35 UTC ++++ CMakeLists.txt +@@ -77,4 +77,3 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/NuspellConfi + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/NuspellConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/NuspellConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nuspell) +-install(FILES README.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) diff --git a/textproc/nuspell/files/patch-src-nuspell-finder.cxx b/textproc/nuspell/files/patch-src-nuspell-finder.cxx new file mode 100644 index 000000000000..46f65d4109e0 --- /dev/null +++ b/textproc/nuspell/files/patch-src-nuspell-finder.cxx @@ -0,0 +1,14 @@ +--- src/nuspell/finder.cxx.orig 2024-07-04 11:45:35 UTC ++++ src/nuspell/finder.cxx +@@ -94,9 +94,9 @@ auto append_default_dir_paths(vector<fs::path>& paths) + paths[i] /= "myspell"; + } + else { +- paths.push_back("/usr/local/share/hunspell"); ++ paths.push_back("%%PREFIX%%/share/hunspell"); + paths.push_back("/usr/share/hunspell"); +- paths.push_back("/usr/local/share/myspell"); ++ paths.push_back("%%PREFIX%%/share/myspell"); + paths.push_back("/usr/share/myspell"); + } + #if defined(__APPLE__) && defined(__MACH__) diff --git a/textproc/nuspell/pkg-plist b/textproc/nuspell/pkg-plist index d0b4a0242e49..3b332cb3194a 100644 --- a/textproc/nuspell/pkg-plist +++ b/textproc/nuspell/pkg-plist @@ -14,5 +14,6 @@ lib/cmake/nuspell/NuspellTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/nuspell/NuspellTargets.cmake lib/libnuspell.so lib/libnuspell.so.5 -lib/libnuspell.so.%%VERSION%% +lib/libnuspell.so.%%PORTVERSION%% libdata/pkgconfig/nuspell.pc +%%MANPAGES%%share/man/man1/nuspell.1.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409050620.4856K7Uw096128>