summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/lastpass-cli/Manifest5
-rw-r--r--app-admin/lastpass-cli/files/lastpass-cli-1.3.3-gcc10-fix.patch82
-rw-r--r--app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild69
-rw-r--r--app-admin/lastpass-cli/metadata.xml20
4 files changed, 176 insertions, 0 deletions
diff --git a/app-admin/lastpass-cli/Manifest b/app-admin/lastpass-cli/Manifest
new file mode 100644
index 0000000..dad9e93
--- /dev/null
+++ b/app-admin/lastpass-cli/Manifest
@@ -0,0 +1,5 @@
+AUX lastpass-cli-1.3.3-gcc10-fix.patch 2855 BLAKE2B 9d20c68d2d1349d557fef3d147e799cca1db7181e767011fcba73d2cb2639f2fa0e6a1f321561f0cffa39dfa365080984c923f10eff8fb9a3eeab19ca11418a3 SHA512 53d8d6842d21fad888597750d4ebef4de351621751befe791a09921210ddae13a2fbeb21e17aca759e60c3c6172ae786fbea42d8e9dbb379386033fe2b3a5bfa
+DIST lastpass-cli-1.3.3.tar.gz 116434 BLAKE2B 341f99a7a5edd157c271a0989a004ace8300f2121230b4c0b7c23152643ebc0e3f60717a057b4e6acc802fe641ccd84c770bfcb3d89c505713aea23692d1542b SHA512 9b9274cae1fe4045b7df4402170c522ab5765929739e76141b35a75ce3c8af824acd881e194face45e8721d6ce778bde97ff1a1ac23515de0c6dba28d61a8c7e
+DIST lastpass-cli-man-1.3.1.tar.xz 5700 BLAKE2B 736ab71ad55cfcb657c727f3dc9dc15775dab1a0232d1ffc51b8794e49911531c96a841b4a5ac0b31f0516cd7aa54027ac7d0eb096816730cdfd192c04d99449 SHA512 e60807683ecd681b3937ef447d3e6a487d25418fe99f51ba99e54bf643c5254dd18427a03e7f035198ef34ff578bbb6116baf04eb554f54d85e7d059b6bfed7e
+EBUILD lastpass-cli-1.3.3.ebuild 1633 BLAKE2B dd78356f8707c0ae659f6a4116c24c1f39512a0a37a50b82cb2033fe8c4cca5d8154db93a09c76ffd67172ff2c76b44e9a3434560c8e597cba5b9f179f0fd945 SHA512 87d774e4cc3004aa62c9bcc5b1a6c8a8b2a1c44244a6b36f16ed469fda79d6c0b84f1a43e7d4fe600ed695072a3559f18363f179ffffc47020e127a92484e1d5
+MISC metadata.xml 643 BLAKE2B a5a01a1dbcc257692bd14369470d69eef33a00a9910ed5006c62f1f5fec2a9a261dd6ece42bcaa68345a21f6e26958f965f90459501324b0e7a168f3fcc4f7f9 SHA512 6b1a7f6566687384d328260576dad306dd07add06001b3746b4f37f05ff91b6ee72e1e2ecfd35463a5b78b4ba8dd1a7757503bdf992372dbd474967e4bf0e9f3
diff --git a/app-admin/lastpass-cli/files/lastpass-cli-1.3.3-gcc10-fix.patch b/app-admin/lastpass-cli/files/lastpass-cli-1.3.3-gcc10-fix.patch
new file mode 100644
index 0000000..186d4a6
--- /dev/null
+++ b/app-admin/lastpass-cli/files/lastpass-cli-1.3.3-gcc10-fix.patch
@@ -0,0 +1,82 @@
+From 6b69a534863741734b550daf43b5d06c8d899b9a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
+Date: Thu, 23 Jan 2020 00:25:50 +0100
+Subject: [PATCH] Mark global variable as extern
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC now defaults to -fno-common. As a result, global variable accesses
+are more efficient on various targets. In C, global variables with
+multiple tentative definitions now result in linker errors.
+
+Fix #532
+
+Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
+---
+ globals.c | 40 ++++++++++++++++++++++++++++++++++++++++
+ process.h | 4 ++--
+ 2 files changed, 42 insertions(+), 2 deletions(-)
+ create mode 100644 globals.c
+
+diff --git a/globals.c b/globals.c
+new file mode 100644
+index 0000000..59e9c30
+--- /dev/null
++++ b/globals.c
+@@ -0,0 +1,40 @@
++/*
++ *
++ * Copyright (C) 2014-2018 LastPass.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License along
++ * with this program; if not, write to the Free Software Foundation, Inc.,
++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * In addition, as a special exception, the copyright holders give
++ * permission to link the code of portions of this program with the
++ * OpenSSL library under certain conditions as described in each
++ * individual source file, and distribute linked combinations
++ * including the two.
++ *
++ * You must obey the GNU General Public License in all respects
++ * for all of the code used other than OpenSSL. If you modify
++ * file(s) with this exception, you may extend this exception to your
++ * version of the file(s), but you are not obligated to do so. If you
++ * do not wish to do so, delete this exception statement from your
++ * version. If you delete this exception statement from all source
++ * files in the program, then also delete it here.
++ *
++ * See LICENSE.OpenSSL for more details regarding this exception.
++ */
++
++#include "process.h"
++
++/* Globals */
++int ARGC;
++char **ARGV;
+diff --git a/process.h b/process.h
+index 58c2480..4cc2cf4 100644
+--- a/process.h
++++ b/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/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild b/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild
new file mode 100644
index 0000000..27b8506
--- /dev/null
+++ b/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_WARN_UNUSED_CLI=no
+inherit cmake-utils bash-completion-r1
+
+DESCRIPTION="Interfaces with LastPass.com from the command line."
+HOMEPAGE="https://github.com/lastpass/lastpass-cli"
+SRC_URI="https://github.com/lastpass/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~gokturk/distfiles/app-admin/lastpass-cli/${PN}-man-1.3.1.tar.xz"
+
+SLOT="0"
+LICENSE="GPL-2+ GPL-2+-with-openssl-exception"
+KEYWORDS="amd64 x86"
+IUSE="X +pinentry test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ X? ( || ( x11-misc/xclip x11-misc/xsel ) )
+ dev-libs/openssl:0=
+ net-misc/curl
+ dev-libs/libxml2
+ pinentry? ( app-crypt/pinentry )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/"${PN}"-1.3.3-gcc10-fix.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DBASH_COMPLETION_COMPLETIONSDIR="$(get_bashcompdir)"
+ )
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(usex test lpass-test '')
+}
+
+src_install() {
+ cmake-utils_src_install install
+
+ doman "${WORKDIR}"/man/lpass.1
+
+ # Version 1.3.2 uses automagic detection for bashcomp
+ # To preserve backwards compatibility, we unconditionally
+ # install the completion file
+ newbashcomp contrib/lpass_bash_completion lpass
+}
+
+src_test() {
+ local myctestargs=(
+ -j1 # Parallel tests fail
+ )
+
+ # The path to lpass-test is hardcoded to "${S}"/build/lpass-test
+ # which is incorrect for our out-of-source build
+ sed -e "s|TEST_LPASS=.*|TEST_LPASS=\"${BUILD_DIR}/lpass-test\"|" \
+ -i "${S}"/test/include.sh || die
+
+ cmake-utils_src_test
+}
diff --git a/app-admin/lastpass-cli/metadata.xml b/app-admin/lastpass-cli/metadata.xml
new file mode 100644
index 0000000..837ad12
--- /dev/null
+++ b/app-admin/lastpass-cli/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>gokturk@gentoo.org</email>
+ <name>Göktürk Yüksek</name>
+ </maintainer>
+ <use>
+ <flag name="X">
+ Use <pkg>x11-misc/xclip</pkg> or <pkg>x11-misc/xsel</pkg> to copy passwords to the clipboard.
+ </flag>
+ <flag name="pinentry">
+ Use <pkg>app-crypt/pinentry</pkg> to prompt for passwords.
+ </flag>
+ </use>
+ <upstream>
+ <remote-id type="github">lastpass/lastpass-cli</remote-id>
+ <bugs-to>https://github.com/lastpass/lastpass-cli/issues</bugs-to>
+ </upstream>
+</pkgmetadata>