From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1259647-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4BEDD1382C5
	for <garchives@archives.gentoo.org>; Thu, 11 Mar 2021 10:26:25 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 51107E09E8;
	Thu, 11 Mar 2021 10:26:24 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 2338AE09E8
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 10:26:24 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 8ED7133BEC7
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 10:26:22 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D8F614AF
	for <gentoo-commits@lists.gentoo.org>; Thu, 11 Mar 2021 10:26:20 +0000 (UTC)
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Marek Szuba" <marecki@gentoo.org>
Message-ID: <1615458366.602b39eb0b0b5914bfbf2eaef294a3526aeac86c.marecki@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/oidc-agent/, net-misc/oidc-agent/files/
X-VCS-Repository: repo/gentoo
X-VCS-Files: net-misc/oidc-agent/Manifest net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
X-VCS-Directories: net-misc/oidc-agent/ net-misc/oidc-agent/files/
X-VCS-Committer: marecki
X-VCS-Committer-Name: Marek Szuba
X-VCS-Revision: 602b39eb0b0b5914bfbf2eaef294a3526aeac86c
X-VCS-Branch: master
Date: Thu, 11 Mar 2021 10:26:20 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: cee76ec6-acd5-4c3d-8a29-d8a7edf77994
X-Archives-Hash: febe840dcecedfcb06df2b69ba567556

commit:     602b39eb0b0b5914bfbf2eaef294a3526aeac86c
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 10:14:43 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 10:26:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=602b39eb

net-misc/oidc-agent: bump to 4.0.2

Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-misc/oidc-agent/Manifest                       |  1 +
 .../files/oidc-agent-4.0.2_install-perms.patch     | 60 +++++++++++++++++
 .../oidc-agent-4.0.2_makefile-toolchain-vars.patch | 43 ++++++++++++
 net-misc/oidc-agent/oidc-agent-4.0.2.ebuild        | 76 ++++++++++++++++++++++
 4 files changed, 180 insertions(+)

diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest
index 2a5395fd9d7..1e6f8d3e6ae 100644
--- a/net-misc/oidc-agent/Manifest
+++ b/net-misc/oidc-agent/Manifest
@@ -1,2 +1,3 @@
 DIST oidc-agent-3.3.1.tar.gz 764721 BLAKE2B eea09b3b140ca81be0f3dc8f200120287682ddb328275be35bd736249b72eabb40c87ebd168e51c992ccd4b4a02138e17d3e20f3cebfb4d42bde01351aacead1 SHA512 75428bb52c0cf43256fddd3b33895d7c882ced367543763c68a385448dbe29805ee1fc035f3727e743a607ed4af851ae5db24b40cc6801fc31e45b6fec16bd66
 DIST oidc-agent-3.3.5.tar.gz 766803 BLAKE2B 4998820283d38e3cee76ab7c308075b74da735f6b2c05ed562c5d61006c5ba85f1c44d7e2c0bfb5e4ee60017835ecf331f8b82a45aa5d0105b7933eeec1025a0 SHA512 c58d9e61a99bf870ce4be0e4fde3faa90b8197d0714626412d162c2e09cca18df734a062b792f7fc92323b50677c64df4aeda5ee42a5ea4e44731ad0e15c8030
+DIST oidc-agent-4.0.2.tar.gz 802872 BLAKE2B bbee872f0b029f4289a4805d1a5f8fe2fe2b8c297a918cf7821aec6bf4dbe634882425c888cb0e784778b56754af1c8b5a34d5282f84090cccf6315897ccb461 SHA512 fef440cd4b72055d8175f9f33c735235bb87bfca38b53bc4e049b1644f74f6a683d312297efa04cbacfe55190c5d6b588fa37475e5a55acff540909865389037

diff --git a/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch b/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch
new file mode 100644
index 00000000000..6184f42d933
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch
@@ -0,0 +1,60 @@
+--- a/Makefile
++++ b/Makefile
+@@ -411,19 +411,19 @@
+ 
+ ## Man pages
+ $(MAN_PATH)/man1/$(AGENT).1: $(MANDIR)/$(AGENT).1 $(MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(AGENTSERVER_MAN_PATH)/man1/$(AGENTSERVER).1: $(MANDIR)/$(AGENTSERVER).1 $(AGENTSERVER_MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(MAN_PATH)/man1/$(GEN).1: $(MANDIR)/$(GEN).1 $(MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(MAN_PATH)/man1/$(ADD).1: $(MANDIR)/$(ADD).1 $(MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(MAN_PATH)/man1/$(CLIENT).1: $(MANDIR)/$(CLIENT).1 $(MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(MAN_PATH)/man1/$(KEYCHAIN).1: $(MANDIR)/$(KEYCHAIN).1 $(MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ $(PROMPT_MAN_PATH)/man1/$(PROMPT).1: $(MANDIR)/$(PROMPT).1 $(PROMPT_MAN_PATH)/man1
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ 
+ ## Lib
+@@ -437,24 +437,24 @@
+ 	@ln -sf $(SHARED_LIB_NAME_SO) $@
+ 
+ $(INCLUDE_PATH)/oidc-agent/api.h: $(SRCDIR)/$(CLIENT)/api.h $(INCLUDE_PATH)/oidc-agent
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ $(INCLUDE_PATH)/oidc-agent/ipc_values.h: $(SRCDIR)/defines/ipc_values.h $(INCLUDE_PATH)/oidc-agent
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ $(INCLUDE_PATH)/oidc-agent/oidc_error.h: $(SRCDIR)/utils/oidc_error.h $(INCLUDE_PATH)/oidc-agent
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ $(LIBDEV_PATH)/liboidc-agent.a: $(APILIB)/liboidc-agent.a $(LIBDEV_PATH)
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ $(INCLUDE_PATH)/oidc-agent/export_symbols.h: $(SRCDIR)/$(CLIENT)/export_symbols.h $(INCLUDE_PATH)/oidc-agent
+-	@install $< $@
++	@install -m 644 $< $@
+ 
+ 
+ ## scheme handler
+ $(DESKTOP_APPLICATION_PATH)/oidc-gen.desktop: $(CONFDIR)/scheme_handler/oidc-gen.desktop
+-	@install -D $< $@
++	@install -m 644 -D $< $@
+ 	@echo "Exec=x-terminal-emulator -e bash -c \"$(BIN_AFTER_INST_PATH)/bin/$(GEN) --codeExchange=%u; exec bash\"" >> $@
+ 
+ ## Xsession

diff --git a/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch
new file mode 100644
index 00000000000..533af1f2a6d
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch
@@ -0,0 +1,43 @@
+--- a/Makefile
++++ b/Makefile
+@@ -74,9 +74,9 @@
+ endif
+ 
+ # Compiler options
+-CC       = gcc
++CC       := $(CC)
+ # compiling flags here
+-CFLAGS   = -g -std=c99 -I$(SRCDIR) -I$(LIBDIR)  -Wall -Wextra -fno-common
++CFLAGS   := $(CFLAGS) -g -std=c99 -I$(SRCDIR) -I$(LIBDIR)  -Wall -Wextra -fno-common
+ ifndef MAC_OS
+ ifndef NODPKG
+ 	CFLAGS   +=$(shell dpkg-buildflags --get CPPFLAGS)
+@@ -87,11 +87,11 @@
+ TEST_CFLAGS = $(CFLAGS) -I.
+ 
+ # Linker options
+-LINKER   = gcc
++LINKER   := $(CC)
+ ifdef MAC_OS
+ LFLAGS   = -lsodium -largp
+ else
+-LFLAGS   = -lsodium -lseccomp -fno-common
++LFLAGS   := $(LDFLAGS) -lsodium -lseccomp -fno-common
+ ifndef NODPKG
+ LFLAGS +=$(shell dpkg-buildflags --get LDFLAGS)
+ endif
+@@ -112,12 +112,12 @@
+ ifdef MAC_OS
+ CLIENT_LFLAGS = -L$(APILIB) -largp -loidc-agent.$(LIBVERSION) -lsodium
+ else
+-CLIENT_LFLAGS = -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lsodium -lseccomp
++CLIENT_LFLAGS := $(LDFLAGS) -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lsodium -lseccomp
+ ifndef NODPKG
+ 	CLIENT_LFLAGS += $(shell dpkg-buildflags --get LDFLAGS)
+ endif
+ endif
+-LIB_LFLAGS = -lc -lsodium
++LIB_LFLAGS := $(LDFLAGS) -lc -lsodium
+ ifndef MAC_OS
+ ifndef NODPKG
+ 	LIB_FLAGS += $(shell dpkg-buildflags --get LDFLAGS)

diff --git a/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild b/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
new file mode 100644
index 00000000000..1bac67f225c
--- /dev/null
+++ b/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic xdg-utils
+
+DESCRIPTION="Agent and tools for managing OpenID Connect tokens on the command line"
+HOMEPAGE="https://github.com/indigo-dc/oidc-agent"
+SRC_URI="https://github.com/indigo-dc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND="app-crypt/libsecret
+	dev-libs/libsodium
+	net-libs/libmicrohttpd
+	sys-libs/libseccomp"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-libs/check )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.0.2_install-perms.patch
+	"${FILESDIR}"/${PN}-4.0.2_makefile-toolchain-vars.patch
+)
+
+src_compile() {
+	# As of 4.0.2 parallel building still doesn't work
+	emake -j1
+}
+
+src_install() {
+	emake \
+		PREFIX="${ED}" \
+		BIN_AFTER_INST_PATH="/usr" \
+		INCLUDE_PATH="${ED}"/usr/include \
+		LIB_PATH="${ED}"/usr/$(get_libdir) \
+		install
+
+	# This file is not compatible with Gentoo and in any case, we generally
+	# let the users load such agents themselves.
+	rm -f "${ED}"/etc/X11/Xsession.d/91${PN}
+}
+
+pkg_postinst() {
+	xdg_desktop_database_update
+
+	if [[ -z "${REPLACING_VERSIONS}" ]]; then
+		elog
+		elog "You should use oidc-gen to initially generate your account configuration"
+		elog "before it can be loaded into oidc-agent using oidc-add. For details, please"
+		elog "consult the man page of oidc-gen, or full documentation at"
+		elog "    https://indigo-dc.gitbooks.io/oidc-agent/"
+		elog
+	else
+		local new_major_ver old_ver
+		new_major_ver=$(ver_cut 1)
+		for old_ver in ${REPLACING_VERSIONS}; do
+			if [[ $(ver_cut 1 ${old_ver}) != ${new_major_ver} ]]; then
+				ewarn
+				ewarn "You are upgrading from a different major version. Please restart any running instances of ${PN}"
+				ewarn "to make sure they are compatible with the updated clients."
+				ewarn
+				break
+			fi
+		done
+	fi
+}
+
+pkg_postrm() {
+	xdg_desktop_database_update
+}