summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Szuba <marecki@gentoo.org>2023-02-24 16:39:48 +0000
committerMarek Szuba <marecki@gentoo.org>2023-02-24 16:50:01 +0000
commita344d85fb00bc0a7faa8145463e124b802a4e648 (patch)
treee55ea431dedcb30defe0a9ebb0ab022ff979571a /net-misc/oidc-agent
parentapp-text/xiphos: migrate to net-libs/webkit-gtk:4.1 (diff)
downloadgentoo-a344d85fb00bc0a7faa8145463e124b802a4e648.tar.gz
gentoo-a344d85fb00bc0a7faa8145463e124b802a4e648.tar.bz2
gentoo-a344d85fb00bc0a7faa8145463e124b802a4e648.zip
net-misc/oidc-agent: migrate to net-libs/webkit-gtk:4.1
Builds and tests fine against this version. Closes: https://bugs.gentoo.org/893708 Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'net-misc/oidc-agent')
-rw-r--r--net-misc/oidc-agent/files/oidc-agent-4.5.0_webkit41.patch11
-rw-r--r--net-misc/oidc-agent/oidc-agent-4.5.0-r1.ebuild89
2 files changed, 100 insertions, 0 deletions
diff --git a/net-misc/oidc-agent/files/oidc-agent-4.5.0_webkit41.patch b/net-misc/oidc-agent/files/oidc-agent-4.5.0_webkit41.patch
new file mode 100644
index 000000000000..d445fafcb3c7
--- /dev/null
+++ b/net-misc/oidc-agent/files/oidc-agent-4.5.0_webkit41.patch
@@ -0,0 +1,11 @@
+--- a/Makefile
++++ b/Makefile
+@@ -179,7 +179,7 @@
+ CPPFLAGS += -fPIC
+ ifndef MAC_OS
+ ifndef ANY_MSYS
+-CPPFLAGS += $(shell pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0) -lstdc++
++CPPFLAGS += $(shell pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.1) -lstdc++
+ endif
+ endif
+ ifndef MAC_OS
diff --git a/net-misc/oidc-agent/oidc-agent-4.5.0-r1.ebuild b/net-misc/oidc-agent/oidc-agent-4.5.0-r1.ebuild
new file mode 100644
index 000000000000..459b2148429c
--- /dev/null
+++ b/net-misc/oidc-agent/oidc-agent-4.5.0-r1.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit 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 ~riscv"
+IUSE="test"
+
+DEPEND="app-crypt/libsecret
+ dev-libs/cJSON:=
+ dev-libs/libsodium:=
+ media-gfx/qrencode
+ net-libs/libmicrohttpd:=
+ net-libs/webkit-gtk:4.1=
+ net-misc/curl
+ elibc_musl? ( sys-libs/argp-standalone )"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-libs/check )"
+
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.4.0_deps-automagic.patch
+ "${FILESDIR}"/${PN}-4.4.0_install-perms.patch
+ "${FILESDIR}"/${PN}-4.5.0_webkit41.patch
+)
+
+src_prepare() {
+ xdg_environment_reset
+ default
+ sed -i -e 's|^\(\s\+\)@|\1|' Makefile || die "Failed to increase verbosity in Makefile"
+}
+
+src_compile() {
+ local -x USE_CJSON_SO=1
+ use elibc_musl && local -x USE_ARGP_SO=1
+ emake -j1 create_obj_dir_structure create_picobj_dir_structure # Bug #880157
+ emake
+}
+
+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
+}