summaryrefslogtreecommitdiff
path: root/net-misc/oidc-agent
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/oidc-agent')
-rw-r--r--net-misc/oidc-agent/Manifest9
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch48
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch51
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.0.2_install-perms.patch60
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-liblist-automagic.patch11
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-toolchain-vars.patch43
-rw-r--r--net-misc/oidc-agent/oidc-agent-3.3.1.ebuild63
-rw-r--r--net-misc/oidc-agent/oidc-agent-4.0.2.ebuild82
8 files changed, 201 insertions, 166 deletions
diff --git a/net-misc/oidc-agent/Manifest b/net-misc/oidc-agent/Manifest
index 5a8ae0671b89..51fb34c6d1ff 100644
--- a/net-misc/oidc-agent/Manifest
+++ b/net-misc/oidc-agent/Manifest
@@ -1,10 +1,11 @@
AUX oidc-agent-3.3.1_desktop-category.patch 270 BLAKE2B ab841626749f19ecfb6f27d79224a2954633e623f306d66698d6f2d9a53047a29411c12bf572d76e273315a8d99b0f2b664604e6b0aa60efe43f74ff68261d60 SHA512 249d1a50da20e4bc37eb1c8d894bd87dc7f165b85af340ee862c72a926db521819796540fe95bb58c8494c2c8bc13ffd1c8a864ec455b81f878e9cc079872cdb
AUX oidc-agent-3.3.1_install-perms.patch 1773 BLAKE2B 8fad809127230af52849da4d496cb71a26efbd8529c67c631eeb153472c60f83a96d46e12bd263d3582c8a5c4f4bbd9841a37b3d5e750f7b24c5a205d8b6aa63 SHA512 94631b5c13d9d41dd9377740e4559f65175e6f6438d2cd108a7d3e445005443791b18cd2926e2e925a4774e6d51d1288f665461c12cc390ee60300c192972d3b
-AUX oidc-agent-3.3.1_makefile-toolchain-vars.patch 1294 BLAKE2B 8267867cead49287697c403999845da7a51d697cd6b6a15589480fd05ab275af82c97202c9f050acc270e2b6750b952b4e2bdd03cd8702236c343df985fcd26e SHA512 8241a1eecc5db5c740743f02cb8d6daa05758447425aaa4f5b5832b416f1c195c118c51205ca83190c0bc07d2cc314641594cb76005e3cb136fb7e205f1cc5a7
-AUX oidc-agent-3.3.1_test-suite-buffer-overflows.patch 1526 BLAKE2B ec623853da106f60a58814181c80786bea8ec8c02bafbcf7d1ac840723ddbf77aaf810ea5b06a62aaa4268aafd3c6c5a821d25eeb656e66393012c6b338afa18 SHA512 a9f4f50eaff99e077ac3cd1290ba45e59f6a538694919f87b3c2467b498a95fac76b84f875f92d9575516d5581cd2dfbcc9602c978ac2fd591d8dc8aabb7499f
AUX oidc-agent-3.3.5_makefile-toolchain-vars.patch 1342 BLAKE2B 4d2db2bc1711bcc99b4c7c98677836f80a9fabfb824e33c4affa70eda95188e22f32fc787bbd487d5a4462fce2333119ea5d6208c56acf638c5782f2d1b509f2 SHA512 4775a28c5e29b431238b712b7baa98501be3a3b5c46fcdcfae008665374539cd5192f0af81feeb1c5822d7d46378dd66d0650a0f2cf091d4801493a6a34ac2b4
-DIST oidc-agent-3.3.1.tar.gz 764721 BLAKE2B eea09b3b140ca81be0f3dc8f200120287682ddb328275be35bd736249b72eabb40c87ebd168e51c992ccd4b4a02138e17d3e20f3cebfb4d42bde01351aacead1 SHA512 75428bb52c0cf43256fddd3b33895d7c882ced367543763c68a385448dbe29805ee1fc035f3727e743a607ed4af851ae5db24b40cc6801fc31e45b6fec16bd66
+AUX oidc-agent-4.0.2_install-perms.patch 1931 BLAKE2B 9061a41dc805f98c4813f967f2e0280ed519c143551c9232bd1a3786f6e4569407744d3821845b5245751fb6bd91462d45fa6f12dcae92fcac1abd6fb5bf2f51 SHA512 f924f3e3bbcb0e427036fb2c13e9272641b340d829d19389c072faef5da6381f1470858033c78bc356bbba75b622bc0283cc4e1fba3255f80788b2d09fab5106
+AUX oidc-agent-4.0.2_makefile-liblist-automagic.patch 448 BLAKE2B df7716192364c71619af14cdd88323a2b6ac7b382d76326aacafa0814dc141416fdda87fc3a11eae8c333e0ac4fcad4386d2e902e13a300a12bd5cbe25df11d7 SHA512 b1145a26fe837a06291067c62bb939b76993e10194a0fc155cfc892677e4f432e0744410dee23eaf14f3a04a9a0c5d8629abaa7c40e3e1abe28ccb2868a41ceb
+AUX oidc-agent-4.0.2_makefile-toolchain-vars.patch 1214 BLAKE2B 2e2c78973049160a9b6210d2180bb851c11a31ce90c8c1af5f05b0d86cd7cdce572c564c4117ec23f286c72a4d701b52ec815f6f30e68c58353fe5394bd210e6 SHA512 22c561c057be1de9ba1747a0234225954ec953f2bdecb0cc05149891e6fc43fede14808dbf59e9e27e5e5e8041d22b16ba4d46e366bd5b96a2b567b2d26a0f8d
DIST oidc-agent-3.3.5.tar.gz 766803 BLAKE2B 4998820283d38e3cee76ab7c308075b74da735f6b2c05ed562c5d61006c5ba85f1c44d7e2c0bfb5e4ee60017835ecf331f8b82a45aa5d0105b7933eeec1025a0 SHA512 c58d9e61a99bf870ce4be0e4fde3faa90b8197d0714626412d162c2e09cca18df734a062b792f7fc92323b50677c64df4aeda5ee42a5ea4e44731ad0e15c8030
-EBUILD oidc-agent-3.3.1.ebuild 1485 BLAKE2B 14a68d23c070f73bc4919f5b48cb8ca2d6c8e6538da1a79826d9f6f50799d9a7ff056f2f8c52f9d904bbbf1941d5ef5e9df2b1d65e68d00fae7575a6c6fe78be SHA512 796a3eccc59b07f28dcbd6a82d5946028379a17ba68d55f0acf6d2525897ee805a02f6f733b9bcc4688f22b51d3b2ee6c0177e263c6033d10a769508d6f6b3a3
+DIST oidc-agent-4.0.2.tar.gz 802872 BLAKE2B bbee872f0b029f4289a4805d1a5f8fe2fe2b8c297a918cf7821aec6bf4dbe634882425c888cb0e784778b56754af1c8b5a34d5282f84090cccf6315897ccb461 SHA512 fef440cd4b72055d8175f9f33c735235bb87bfca38b53bc4e049b1644f74f6a683d312297efa04cbacfe55190c5d6b588fa37475e5a55acff540909865389037
EBUILD oidc-agent-3.3.5-r1.ebuild 1547 BLAKE2B 1baf0c63e4d2e54cd6c8ac1e311e81e3c04af5b27eb8fa9314ec1dba507f567b0407f07d7d3517487943f0de080f240cc84d05ae1a811cffee38f4c241df3372 SHA512 51a4f0bd8f8263bc1589cd56bdda73eb7f2232c309127dbcdc934aaf1a2c74b78c161b94ada715f91f66c2369e02f91a36ca2b37a73fec29f2f8441ec9def9a1
+EBUILD oidc-agent-4.0.2.ebuild 2137 BLAKE2B 2ee40466f628bb06d914923badd5e7d8995ea12e56276be89fbaebcd694838ca01467d0b29cca6a737aafbbf4ac8c6f2407f8b8bfaedad8134d0c551fd6fe7db SHA512 86be93a4c41c0007ecf56f9f70015e6a461e3fa106277fdf0c9c5f792881c0bf75fcb4871719323e5b5852fb2eb76312e97be58dfc4907814c4d53eb1f6f4c92
MISC metadata.xml 779 BLAKE2B ef7a040559363a8012380b3f8568f963a612078c2d5e5129f54db724d414d6c7864e79e480eba5574fd36847caa13a09a7ac7013f5ceb406d83e3be5ebdb47e9 SHA512 f9465b4e88418ec276071683b5abbe8f7601e54daf0cb74da2d24d142e2307b1bb994ee4191eee48ed1b3fef724ad49b548cef12cc4c77088c2f2d07e1b8a776
diff --git a/net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch
deleted file mode 100644
index dda1ab252214..000000000000
--- a/net-misc/oidc-agent/files/oidc-agent-3.3.1_makefile-toolchain-vars.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-1. Support user-provided values of CC, CFLAGS and LDFLAGS
-2. Do not force the use of a static version of libsodium
-
---- a/Makefile
-+++ b/Makefile
-@@ -54,20 +54,20 @@
- endif
-
- # Compiler options
--CC = gcc
-+CC := $(CC)
- # compiling flags here
--CFLAGS = -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra
-+CFLAGS := $(CFLAGS) -g -std=c99 -I$(SRCDIR) -I$(LIBDIR) -Wall -Wextra
- ifndef MAC_OS
- CFLAGS += $(shell pkg-config --cflags libsecret-1)
- endif
- TEST_CFLAGS = $(CFLAGS) -I.
-
- # Linker options
--LINKER = gcc
-+LINKER := $(CC)
- ifdef MAC_OS
- LFLAGS = -lsodium -largp
- else
--LFLAGS = -l:libsodium.a -lseccomp
-+LFLAGS := $(LDFLAGS) -lsodium -lseccomp
- endif
- ifdef HAS_CJSON
- LFLAGS += -lcjson
-@@ -81,7 +81,7 @@
- ifdef MAC_OS
- CLIENT_LFLAGS = -L$(APILIB) -largp -loidc-agent.$(LIBVERSION)
- else
--CLIENT_LFLAGS = -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lseccomp
-+CLIENT_LFLAGS = $(LDFLAGS) -L$(APILIB) -l:$(SHARED_LIB_NAME_FULL) -lseccomp
- endif
- ifdef HAS_CJSON
- CLIENT_LFLAGS += -lcjson
-@@ -478,7 +478,7 @@
- ifdef MAC_OS
- @gcc -dynamiclib -fpic -Wl, -o $@ $(PIC_OBJECTS) -lc
- else
-- @gcc -shared -fpic -Wl,-soname,$(SONAME) -o $@ $(PIC_OBJECTS) -lc
-+ @$(LINKER) -shared -fpic -Wl,-soname,$(SONAME) $(LDFLAGS) -o $@ $(PIC_OBJECTS) -lc
- endif
-
- .PHONY: shared_lib
diff --git a/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch b/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch
deleted file mode 100644
index b43f20c06860..000000000000
--- a/net-misc/oidc-agent/files/oidc-agent-3.3.1_test-suite-buffer-overflows.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/test/src/utils/stringUtils/tc_strelim.c
-+++ b/test/src/utils/stringUtils/tc_strelim.c
-@@ -7,7 +7,7 @@
-
- START_TEST(test_noFound) {
- const char* const str = "abcdeffedcba";
-- char s[strlen(str)];
-+ char s[strlen(str) + 1];
- strcpy(s, str);
- ck_assert_str_eq(strelim(s, 'x'), str);
- }
---- a/test/src/utils/stringUtils/tc_strelimIfAfter.c
-+++ b/test/src/utils/stringUtils/tc_strelimIfAfter.c
-@@ -7,7 +7,7 @@
-
- START_TEST(test_noElim) {
- const char* const str = "abcdeffedcba";
-- char s[strlen(str)];
-+ char s[strlen(str) + 1];
- strcpy(s, str);
- ck_assert_str_eq(strelimIfAfter(s, 'b', 'x'), str);
- }
-@@ -15,7 +15,7 @@
-
- START_TEST(test_noFound) {
- const char* const str = "abcdeffedcba";
-- char s[strlen(str)];
-+ char s[strlen(str) + 1];
- strcpy(s, str);
- ck_assert_str_eq(strelimIfAfter(s, 'x', 'a'), str);
- }
---- a/test/src/utils/stringUtils/tc_strelimIfFollowed.c
-+++ b/test/src/utils/stringUtils/tc_strelimIfFollowed.c
-@@ -7,7 +7,7 @@
-
- START_TEST(test_noElim) {
- const char* const str = "abcdeffedcba";
-- char s[strlen(str)];
-+ char s[strlen(str) + 1];
- strcpy(s, str);
- ck_assert_str_eq(strelimIfFollowed(s, 'b', 'x'), str);
- }
-@@ -15,7 +15,7 @@
-
- START_TEST(test_noFound) {
- const char* const str = "abcdeffedcba";
-- char s[strlen(str)];
-+ char s[strlen(str) + 1];
- strcpy(s, str);
- ck_assert_str_eq(strelimIfFollowed(s, 'x', 'a'), str);
- }
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 000000000000..6184f42d9335
--- /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-liblist-automagic.patch b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-liblist-automagic.patch
new file mode 100644
index 000000000000..1e8765aef9d0
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.0.2_makefile-liblist-automagic.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -58,7 +58,7 @@
+
+ # USE_CJSON_SO ?= $(shell /sbin/ldconfig -N -v $(sed 's/:/ /g' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep -i libcjson >/dev/null && echo 1 || echo 0)
+ USE_CJSON_SO ?= 0
+-USE_LIST_SO ?= $(shell /sbin/ldconfig -N -v $(sed 's/:/ /g' <<< $LD_LIBRARY_PATH) 2>/dev/null | grep -i liblist >/dev/null && echo 1 || echo 0)
++USE_LIST_SO ?= 0
+
+ ifeq ($(USE_CJSON_SO),1)
+ DEFINE_USE_CJSON_SO = -DUSE_CJSON_SO
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 000000000000..533af1f2a6d4
--- /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-3.3.1.ebuild b/net-misc/oidc-agent/oidc-agent-3.3.1.ebuild
deleted file mode 100644
index 2ca56ed3f68e..000000000000
--- a/net-misc/oidc-agent/oidc-agent-3.3.1.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2020 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}-3.3.1_desktop-category.patch
- "${FILESDIR}"/${PN}-3.3.1_install-perms.patch
- "${FILESDIR}"/${PN}-3.3.1_makefile-toolchain-vars.patch
- "${FILESDIR}"/${PN}-3.3.1_test-suite-buffer-overflows.patch
-)
-
-src_compile() {
- # Bug #728840
- append-flags -fcommon
-
- # Parallel building 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
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
-
- 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
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
-}
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 000000000000..88d48a54d23d
--- /dev/null
+++ b/net-misc/oidc-agent/oidc-agent-4.0.2.ebuild
@@ -0,0 +1,82 @@
+# 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-liblist-automagic.patch
+ "${FILESDIR}"/${PN}-4.0.2_makefile-toolchain-vars.patch
+)
+
+src_prepare() {
+ default
+ sed -i -e 's|^\(\s\+\)@|\1|' Makefile || die "Failed to increase verbosity in Makefile"
+}
+
+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
+}