diff options
author | Christopher Byrne <salah.coronya@gmail.com> | 2024-06-25 20:12:18 -0500 |
---|---|---|
committer | Matthew Thode <prometheanfire@gentoo.org> | 2024-07-08 12:16:46 -0500 |
commit | 1905d5242be1770a6c7fe2c3fca2397eebcfaef4 (patch) | |
tree | 90232e42a59a079620666d5f96d53efecdeb89e7 /sys-auth | |
parent | dev-python/humanize: add 4.10.0 (diff) | |
download | gentoo-1905d5242be1770a6c7fe2c3fca2397eebcfaef4.tar.gz gentoo-1905d5242be1770a6c7fe2c3fca2397eebcfaef4.tar.bz2 gentoo-1905d5242be1770a6c7fe2c3fca2397eebcfaef4.zip |
sys-auth/nss-pam-ldapd: Fix build on clang
Upstream pull request: https://github.com/arthurdejong/nss-pam-ldapd/pull/68
Closes: https://bugs.gentoo.org/832002
Signed-off-by: Christopher Byrne <salah.coronya@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37304
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.12-configure-CFLAGS-decontamination.patch | 55 | ||||
-rw-r--r-- | sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild | 5 |
2 files changed, 60 insertions, 0 deletions
diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.12-configure-CFLAGS-decontamination.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.12-configure-CFLAGS-decontamination.patch new file mode 100644 index 000000000000..00687e2c7492 --- /dev/null +++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.12-configure-CFLAGS-decontamination.patch @@ -0,0 +1,55 @@ +diff --git a/configure.ac b/configure.ac +index 12bf35c..beb13bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,39 +101,25 @@ then + fi + + # check for debugging options ++DEBUG_CFLAGS="" + AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [enable extensive debugging and logging]), +- [if test "x$enableval" != "xno" ; then CFLAGS="-g -DDEBUG $CFLAGS" ; fi]) ++ [AS_IF([test "x$enableval" != "xno"], ++ [AX_APPEND_COMPILE_FLAGS([-g -DDEBUG],[DEBUG_CFLAGS])] ++ )]) ++AC_SUBST([DEBUG_CFLAGS]) + + # check for extra compiler warnings +-DESIRED_CFLAGS="" ++EXTRA_CFLAGS="" + AC_ARG_ENABLE(warnings, + AS_HELP_STRING([--enable-warnings], + [enable extra compiler warnings (gcc)]), +- [if test "x$enableval" != "no" +- then +- CFLAGS="$CFLAGS -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Waggregate-return -Wmissing-declarations -Wunused -Wformat=2 -Wswitch-default -Wswitch-enum -Wfloat-equal -Wbad-function-cast -Wredundant-decls" +- DESIRED_CFLAGS="$DESIRED_CFLAGS -Wextra -Wdeclaration-after-statement -Werror-implicit-function-declaration -Werror=implicit" +- fi]) +-test_gcc_flag() { +- AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) +- $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null +- ret=$? +- rm -f conftest.o +- return $ret +-} +-for flag in $DESIRED_CFLAGS +-do +- AC_MSG_CHECKING([whether $CC accepts $flag]) +- if test_gcc_flag $flag +- then +- CFLAGS="$CFLAGS $flag" +- AC_MSG_RESULT([yes]) +- else +- AC_MSG_RESULT([no]) +- fi +-done ++ [AS_IF([test "x$enableval" != "xno"],[ ++ AX_APPEND_COMPILE_FLAGS([-pedantic -Wall -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Waggregate-return -Wmissing-declarations -Wunused -Wformat=2 -Wswitch-default -Wswitch-enum -Wfloat-equal -Wbad-function-cast -Wredundant-decls],[EXTRA_CFLAGS],[-Werror]) ++ AX_APPEND_COMPILE_FLAGS([-Wextra -Wdeclaration-after-statement -Werror-implicit-function-declaration -Werror=implicit],[EXTRA_CFLAGS],[-Werror]) ++ ])]) ++AC_SUBST([EXTRA_CFLAGS]) + + # check for Position Independent Code compiler option + PIC_CFLAGS="" diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild index 85c045be9ab5..1073dd8e15e7 100644 --- a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild +++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.12-r4.ebuild @@ -52,6 +52,7 @@ PATCHES=( "${FILESDIR}"/nss-pam-ldapd-0.9.11-tests.patch "${FILESDIR}"/nss-pam-ldapd-0.9.11-tests-py39.patch "${FILESDIR}"/nss-pam-ldapd-0.9.12-netdb-defines.patch + "${FILESDIR}"/nss-pam-ldapd-0.9.12-configure-CFLAGS-decontamination.patch ) pkg_setup() { @@ -64,6 +65,10 @@ src_prepare() { touch pynslcd/__init__.py || die "Could not create __init__.py for pynslcd" mv pynslcd/pynslcd.py pynslcd/main.py || die + find "${S}" -name Makefile.am -exec \ + sed -e '/^AM_CFLAGS/ s/$/ \$(DEBUG_CFLAGS) \$(EXTRA_CFLAGS)/g' \ + -i {} \; || die + eautoreconf } |