git: 43ea95faf2c0 - main - chinese/libpinyin: Switch DB backend and improve port

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 19 May 2024 10:56:12 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=43ea95faf2c07a72429da7402f5feb74a8d88c02

commit 43ea95faf2c07a72429da7402f5feb74a8d88c02
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-05-19 09:12:21 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-05-19 10:56:01 +0000

    chinese/libpinyin: Switch DB backend and improve port
    
    * Switch to DISTVERSION
    * Use GitHub as primary download site and Sourceforge as fallback
    * Use USES= localbase:ldflags helper
    * Switch from DBD5 (deprecated) to KyotoCabinet as backend
    * Remove GNU_CONFIGURE_MANPREFIX
    
    PR:             279124
    Reviewed by:    Zhihao Yuan <lichray@gmail.com> (maintainer)
---
 chinese/libpinyin/Makefile | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/chinese/libpinyin/Makefile b/chinese/libpinyin/Makefile
index 9e55e7bfb96e..d5832c68f427 100644
--- a/chinese/libpinyin/Makefile
+++ b/chinese/libpinyin/Makefile
@@ -1,8 +1,9 @@
 PORTNAME=	libpinyin
-PORTVERSION=	2.8.1
-PORTREVISION=	1
+DISTVERSION=	2.8.1
+PORTREVISION=	2
 CATEGORIES=	chinese textproc
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}
+MASTER_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSION}/ \
+		SF/${PORTNAME}/${PORTNAME}
 
 MAINTAINER=	lichray@gmail.com
 COMMENT=	Library to deal with pinyin
@@ -11,18 +12,19 @@ WWW=		https://github.com/libpinyin/libpinyin
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		bdb compiler:c++11-lang gmake gnome libtool pathfix pkgconfig
+LIB_DEPENDS=	libkyotocabinet.so:databases/kyotocabinet
+
+USES=		compiler:c++11-lang gmake gnome libtool localbase:ldflags \
+		pathfix pkgconfig
 USE_GNOME=	glib20
+USE_LDCONFIG=	yes
 
 GNU_CONFIGURE=	yes
-GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
-USE_LDCONFIG=	yes
 
-CONFIGURE_ARGS+=CPPFLAGS="-I${LOCALBASE}/include \
-		-I${BDB_INCLUDE_DIR}" \
-		LDFLAGS="-L${LOCALBASE}/lib -l${BDB_LIB_NAME}"
 INSTALL_TARGET=	install-strip
 
+CONFIGURE_ARGS=	--with-dbm=KyotoCabinet
+
 OPTIONS_DEFINE=	NLS
 
 NLS_USES=	gettext