From 5bfa0c9d170e14d5dfa9a174298561432c96ed20 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 3 Oct 2022 00:04:46 +0100 Subject: sys-auth/pam-pgsql: fix build with Clang 16 Closes: https://bugs.gentoo.org/871492 Signed-off-by: Sam James --- ...2-Fix-crypt-implicit-function-declaration.patch | 18 +++++++ sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r1.ebuild | 51 -------------------- sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r2.ebuild | 55 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 51 deletions(-) create mode 100644 sys-auth/pam-pgsql/files/pam-pgsql-0.7.3.2-Fix-crypt-implicit-function-declaration.patch delete mode 100644 sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r1.ebuild create mode 100644 sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r2.ebuild (limited to 'sys-auth') diff --git a/sys-auth/pam-pgsql/files/pam-pgsql-0.7.3.2-Fix-crypt-implicit-function-declaration.patch b/sys-auth/pam-pgsql/files/pam-pgsql-0.7.3.2-Fix-crypt-implicit-function-declaration.patch new file mode 100644 index 000000000000..bf3604fd5670 --- /dev/null +++ b/sys-auth/pam-pgsql/files/pam-pgsql-0.7.3.2-Fix-crypt-implicit-function-declaration.patch @@ -0,0 +1,18 @@ +From: Sam James +Date: Sun, 2 Oct 2022 23:55:21 +0100 +Subject: [PATCH] Fix crypt() implicit function declaration + +crypt() is POSIX and setting _XOPEN_SOURCE makes glibc inhibit +defining it w/o _DEFAULT_SOURCE. + +Bug: https://bugs.gentoo.org/871492 +--- a/src/backend_pgsql.c ++++ b/src/backend_pgsql.c +@@ -8,7 +8,6 @@ + * William Grzybowski + */ + +-#define _XOPEN_SOURCE 500 + #include + #include + #include diff --git a/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r1.ebuild b/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r1.ebuild deleted file mode 100644 index 656ce64960a5..000000000000 --- a/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r1.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit pam - -DESCRIPTION="PAM module to authenticate users via PostgreSQL" -HOMEPAGE="https://sourceforge.net/projects/pam-pgsql/" - -if [[ ${PV} == *_p* ]]; then - SRC_URI="http://www.flameeyes.eu/gentoo-distfiles/${P}.tar.gz" -else - SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" -fi - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -RDEPEND=">=dev-db/postgresql-8.0:= - >=dev-libs/libgcrypt-1.2.0:0= - sys-libs/pam - virtual/libcrypt:=" -DEPEND="${RDEPEND}" - -src_configure() { - econf \ - --sysconfdir=/etc/security \ - --libdir=/$(get_libdir) -} - -src_compile() { - emake pammoddir="$(getpam_mod_dir)" -} - -src_install() { - emake DESTDIR="${D}" pammoddir="$(getpam_mod_dir)" install - - find "${ED}" -name '*.la' -delete || die -} - -pkg_postinst() { - if [[ -z ${REPLACING_VERSIONS} ]] ; then - elog "Please see the documentation and configuration examples in the" - elog "documentation directory at /usr/share/doc/${PF}." - elog "" - elog "Please note that the default configuration file in Gentoo has been" - elog "moved to /etc/security/pam-pgsql.conf to follow the other PAM modules." - fi -} diff --git a/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r2.ebuild b/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r2.ebuild new file mode 100644 index 000000000000..cf3ad756ccad --- /dev/null +++ b/sys-auth/pam-pgsql/pam-pgsql-0.7.3.2-r2.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit pam + +DESCRIPTION="PAM module to authenticate users via PostgreSQL" +HOMEPAGE="https://sourceforge.net/projects/pam-pgsql/" + +if [[ ${PV} == *_p* ]]; then + SRC_URI="http://www.flameeyes.eu/gentoo-distfiles/${P}.tar.gz" +else + SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +fi + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +RDEPEND=">=dev-db/postgresql-8.0:= + >=dev-libs/libgcrypt-1.2.0:0= + sys-libs/pam + virtual/libcrypt:=" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-0.7.3.2-Fix-crypt-implicit-function-declaration.patch +) + +src_configure() { + econf \ + --sysconfdir=/etc/security \ + --libdir=/$(get_libdir) +} + +src_compile() { + emake pammoddir="$(getpam_mod_dir)" +} + +src_install() { + emake DESTDIR="${D}" pammoddir="$(getpam_mod_dir)" install + + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "Please see the documentation and configuration examples in the" + elog "documentation directory at /usr/share/doc/${PF}." + elog "" + elog "Please note that the default configuration file in Gentoo has been" + elog "moved to /etc/security/pam-pgsql.conf to follow the other PAM modules." + fi +} -- cgit v1.2.3-65-gdbad