Gentoo Archives: gentoo-commits

From: "Göktürk Yüksek" <gokturk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/lastpass-cli/, app-admin/lastpass-cli/files/
Date: Wed, 06 May 2020 00:35:21
Message-Id: 1588725251.32bba57937d6a7b5d37fcc18b33b4c80e1e3e6b4.gokturk@gentoo
1 commit: 32bba57937d6a7b5d37fcc18b33b4c80e1e3e6b4
2 Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 6 00:34:11 2020 +0000
4 Commit: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
5 CommitDate: Wed May 6 00:34:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32bba579
7
8 app-admin/lastpass-cli: fix building with -fno-common
9
10 Closes: https://bugs.gentoo.org/707534
11 Package-Manager: Portage-2.3.69, Repoman-2.3.14
12 Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org>
13
14 .../files/lastpass-cli-1.3.3-gcc10-fix.patch | 82 ++++++++++++++++++++++
15 app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild | 6 +-
16 2 files changed, 87 insertions(+), 1 deletion(-)
17
18 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
19 new file mode 100644
20 index 00000000000..186d4a6a1a7
21 --- /dev/null
22 +++ b/app-admin/lastpass-cli/files/lastpass-cli-1.3.3-gcc10-fix.patch
23 @@ -0,0 +1,82 @@
24 +From 6b69a534863741734b550daf43b5d06c8d899b9a Mon Sep 17 00:00:00 2001
25 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@×××××.com>
26 +Date: Thu, 23 Jan 2020 00:25:50 +0100
27 +Subject: [PATCH] Mark global variable as extern
28 +MIME-Version: 1.0
29 +Content-Type: text/plain; charset=UTF-8
30 +Content-Transfer-Encoding: 8bit
31 +
32 +GCC now defaults to -fno-common. As a result, global variable accesses
33 +are more efficient on various targets. In C, global variables with
34 +multiple tentative definitions now result in linker errors.
35 +
36 +Fix #532
37 +
38 +Signed-off-by: Robert-André Mauchin <zebob.m@×××××.com>
39 +---
40 + globals.c | 40 ++++++++++++++++++++++++++++++++++++++++
41 + process.h | 4 ++--
42 + 2 files changed, 42 insertions(+), 2 deletions(-)
43 + create mode 100644 globals.c
44 +
45 +diff --git a/globals.c b/globals.c
46 +new file mode 100644
47 +index 0000000..59e9c30
48 +--- /dev/null
49 ++++ b/globals.c
50 +@@ -0,0 +1,40 @@
51 ++/*
52 ++ *
53 ++ * Copyright (C) 2014-2018 LastPass.
54 ++ *
55 ++ * This program is free software; you can redistribute it and/or modify
56 ++ * it under the terms of the GNU General Public License as published by
57 ++ * the Free Software Foundation; either version 2 of the License, or
58 ++ * (at your option) any later version.
59 ++ *
60 ++ * This program is distributed in the hope that it will be useful,
61 ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
62 ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63 ++ * GNU General Public License for more details.
64 ++ *
65 ++ * You should have received a copy of the GNU General Public License along
66 ++ * with this program; if not, write to the Free Software Foundation, Inc.,
67 ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
68 ++ *
69 ++ * In addition, as a special exception, the copyright holders give
70 ++ * permission to link the code of portions of this program with the
71 ++ * OpenSSL library under certain conditions as described in each
72 ++ * individual source file, and distribute linked combinations
73 ++ * including the two.
74 ++ *
75 ++ * You must obey the GNU General Public License in all respects
76 ++ * for all of the code used other than OpenSSL. If you modify
77 ++ * file(s) with this exception, you may extend this exception to your
78 ++ * version of the file(s), but you are not obligated to do so. If you
79 ++ * do not wish to do so, delete this exception statement from your
80 ++ * version. If you delete this exception statement from all source
81 ++ * files in the program, then also delete it here.
82 ++ *
83 ++ * See LICENSE.OpenSSL for more details regarding this exception.
84 ++ */
85 ++
86 ++#include "process.h"
87 ++
88 ++/* Globals */
89 ++int ARGC;
90 ++char **ARGV;
91 +diff --git a/process.h b/process.h
92 +index 58c2480..4cc2cf4 100644
93 +--- a/process.h
94 ++++ b/process.h
95 +@@ -4,8 +4,8 @@
96 + #include <stdbool.h>
97 + #include <sys/types.h>
98 +
99 +-int ARGC;
100 +-char **ARGV;
101 ++extern int ARGC;
102 ++extern char **ARGV;
103 +
104 + void process_set_name(const char *name);
105 + void process_disable_ptrace(void);
106
107 diff --git a/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild b/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild
108 index a8047a4f366..fefda5aeb79 100644
109 --- a/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild
110 +++ b/app-admin/lastpass-cli/lastpass-cli-1.3.3.ebuild
111 @@ -1,4 +1,4 @@
112 -# Copyright 1999-2019 Gentoo Authors
113 +# Copyright 1999-2020 Gentoo Authors
114 # Distributed under the terms of the GNU General Public License v2
115
116 EAPI=6
117 @@ -29,6 +29,10 @@ DEPEND="${RDEPEND}
118 virtual/pkgconfig
119 "
120
121 +PATCHES=(
122 + "${FILESDIR}"/"${PN}"-1.3.3-gcc10-fix.patch
123 +)
124 +
125 src_configure() {
126 local mycmakeargs=(
127 -DBASH_COMPLETION_COMPLETIONSDIR="$(get_bashcompdir)"