git: bc639905d1e4 - main - security/lastpass-cli: Update to 1.3.7

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 14 Nov 2023 17:18:04 UTC
The branch main has been updated by sunpoet:

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

commit bc639905d1e48f694a6ebd943fd510f58667cd7c
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-14 16:38:35 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-14 17:15:34 +0000

    security/lastpass-cli: Update to 1.3.7
    
    - Update MASTER_SITES: use upstream release tarball
    - Update WWW
    - Convert REINPLACE_CMD to patch files
    - Take maintainership
    
    Changes:        https://github.com/lastpass/lastpass-cli/releases
---
 security/lastpass-cli/Makefile                    | 55 ++++++++++-------------
 security/lastpass-cli/distinfo                    |  6 +--
 security/lastpass-cli/files/patch-CMakeLists.txt  | 11 +++++
 security/lastpass-cli/files/patch-process.h       | 13 ------
 security/lastpass-cli/files/patch-test-include.sh | 11 +++++
 security/lastpass-cli/pkg-descr                   |  4 +-
 6 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/security/lastpass-cli/Makefile b/security/lastpass-cli/Makefile
index 2bc298d54abf..2dc403ae2782 100644
--- a/security/lastpass-cli/Makefile
+++ b/security/lastpass-cli/Makefile
@@ -1,55 +1,46 @@
 PORTNAME=	lastpass-cli
-DISTVERSIONPREFIX=	v
-DISTVERSION=	1.3.6
+PORTVERSION=	1.3.7
 CATEGORIES=	security
+MASTER_SITES=	https://github.com/lastpass/lastpass-cli/releases/download/v${PORTVERSION}/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	LastPass command line interface tool
-WWW=		https://lastpass.com/
+WWW=		https://lastpass.com/ \
+		https://github.com/lastpass/lastpass-cli
 
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libcurl.so:ftp/curl
 
-USES=		cmake:noninja gnome pkgconfig ssl
+USES=		cmake gnome pkgconfig shebangfix ssl
 USE_GNOME=	libxml2
 
-USE_GITHUB=	yes
-GH_ACCOUNT=	lastpass
-
+CMAKE_ARGS=	-DOPENSSL_ROOT_DIR=${OPENSSLBASE}
 TEST_TARGET=	lpass-test test
 
 PLIST_FILES=	bin/lpass
 
-OPTIONS_DEFINE=		BASH MANPAGES PINENTRY XCLIP XSEL
-OPTIONS_DEFAULT=	BASH MANPAGES
-PINENTRY_DESC=		Use pinentry for password entry
-XCLIP_DESC=		Use xclip for interacting with X11 clipboard
-XSEL_DESC=		Use xsel for interacting with X11 clipboard
-
-BASH_BUILD_DEPENDS=		bash-completion>=0:shells/bash-completion
-BASH_RUN_DEPENDS=		bash-completion>=0:shells/bash-completion
-BASH_PLIST_FILES=		share/bash-completion/completions/lpass
-MANPAGES_BUILD_DEPENDS=		asciidoc:textproc/asciidoc \
-				xmlto:textproc/xmlto
-MANPAGES_ALL_TARGET=		all doc-man
-MANPAGES_INSTALL_TARGET=	install install-doc
-MANPAGES_PLIST_FILES=		${MANPREFIX}/share/man/man1/lpass.1.gz
-
+SHEBANG_FILES=	test/tests
+
+OPTIONS_DEFINE=	BASH MANPAGES PINENTRY XCLIP XSEL
+OPTIONS_DEFAULT=BASH MANPAGES
+PINENTRY_DESC=	Use pinentry for password entry
+XCLIP_DESC=	Use xclip for interacting with X11 clipboard
+XSEL_DESC=	Use xsel for interacting with X11 clipboard
+
+BASH_BUILD_DEPENDS=	bash-completion>=0:shells/bash-completion
+BASH_PLIST_FILES=	share/bash-completion/completions/lpass
+BASH_RUN_DEPENDS=	bash-completion>=0:shells/bash-completion
+MANPAGES_ALL_TARGET=	all doc-man
+MANPAGES_BUILD_DEPENDS=	asciidoc:textproc/asciidoc
+MANPAGES_INSTALL_TARGET=install install-doc
+MANPAGES_PLIST_FILES=	${PREFIX}/share/man/man1/lpass.1.gz
 PINENTRY_RUN_DEPENDS=	pinentry:security/pinentry
 XCLIP_RUN_DEPENDS=	xclip:x11/xclip
 XSEL_RUN_DEPENDS=	xsel:x11/xsel-conrad
 
-CMAKE_ARGS+=	-DOPENSSL_ROOT_DIR=${OPENSSLBASE}
-
-post-extract:
-	@${REINPLACE_CMD} -e 's/-Wno-language-extension-token//g' \
-		${WRKSRC}/CMakeLists.txt
-	@${REINPLACE_CMD} -e 's/build\/lpass-test/lpass-test/' \
-		${WRKSRC}/test/include.sh
-
 post-install:
-	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lpass
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lpass
 
 .include <bsd.port.mk>
diff --git a/security/lastpass-cli/distinfo b/security/lastpass-cli/distinfo
index fb3c99c43d52..f94c2429cd0e 100644
--- a/security/lastpass-cli/distinfo
+++ b/security/lastpass-cli/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1693845538
-SHA256 (lastpass-lastpass-cli-v1.3.6_GH0.tar.gz) = 6573068abfda02426ba7374c03dde71d8870dcf44c8dc845bc53106be34bfedd
-SIZE (lastpass-lastpass-cli-v1.3.6_GH0.tar.gz) = 117267
+TIMESTAMP = 1699774472
+SHA256 (lastpass-cli-1.3.7.tar.gz) = 448a53960602164456bbc9156d017540a1dac989a8cab7bc6a2a9781b52d47cb
+SIZE (lastpass-cli-1.3.7.tar.gz) = 123983
diff --git a/security/lastpass-cli/files/patch-CMakeLists.txt b/security/lastpass-cli/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d4d3c68702ad
--- /dev/null
+++ b/security/lastpass-cli/files/patch-CMakeLists.txt
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2023-11-10 10:04:34 UTC
++++ CMakeLists.txt
+@@ -56,7 +56,7 @@ file(GLOB PROJECT_SOURCES *.c)
+ 
+ set(PROJECT_DEFINITIONS "_GNU_SOURCE")
+ 
+-set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wall -Wextra -Wno-language-extension-token")
++set(PROJECT_FLAGS "-std=gnu99 -pedantic -Wall -Wextra")
+ if(APPLE)
+   set(PROJECT_FLAGS "${PROJECT_FLAGS} -Wno-deprecated-declarations")
+ endif()
diff --git a/security/lastpass-cli/files/patch-process.h b/security/lastpass-cli/files/patch-process.h
deleted file mode 100644
index 10a2f73f501e..000000000000
--- a/security/lastpass-cli/files/patch-process.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- process.h.orig	2023-09-01 07:49:45 UTC
-+++ process.h
-@@ -4,8 +4,8 @@
- #include <stdbool.h>
- #include <sys/types.h>
- 
--int ARGC;
--char **ARGV;
-+extern int ARGC;
-+extern char **ARGV;
- 
- void process_set_name(const char *name);
- void process_disable_ptrace(void);
diff --git a/security/lastpass-cli/files/patch-test-include.sh b/security/lastpass-cli/files/patch-test-include.sh
new file mode 100644
index 000000000000..7104ee35699a
--- /dev/null
+++ b/security/lastpass-cli/files/patch-test-include.sh
@@ -0,0 +1,11 @@
+--- test/include.sh.orig	2023-11-10 10:04:34 UTC
++++ test/include.sh
+@@ -8,7 +8,7 @@ function setup()
+ 	export TEST_USER="user@example.com"
+ 	export TEST_PASS="123456"
+ 	export TEST_WRONG_PASS="000000"
+-	export TEST_LPASS="../build/lpass-test"
++	export TEST_LPASS="../lpass-test"
+ 	export LPASS_HOME="./.lpass"
+ }
+ 
diff --git a/security/lastpass-cli/pkg-descr b/security/lastpass-cli/pkg-descr
index c4d2ffb43a21..c7ed6471e03f 100644
--- a/security/lastpass-cli/pkg-descr
+++ b/security/lastpass-cli/pkg-descr
@@ -1,2 +1,2 @@
-lastpass-cli is an open-source command-line interface to the popular
-LastPass password management service.
+lastpass-cli is an open-source command-line interface to the popular LastPass
+password management service.