p11-kit: upstream patch for issetugid(2) test.
Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
parent
c43fa69847
commit
bbf12005c1
|
@ -0,0 +1,36 @@
|
|||
build: Ease issetugid() check when cross-compiling
|
||||
|
||||
When cross-compiling, the configure check for issetugid() aborts,
|
||||
because of the pessimistic default of AC_RUN_IFELSE. This patch
|
||||
provides the non-pessimistic default to AC_RUN_IFELSE and wrap the
|
||||
macro invocation with AC_CACHE_CHECK so that the user can override the
|
||||
check by setting ac_cv_issetugid_openbsd=yes, as suggested in:
|
||||
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Runtime.html#Runtime
|
||||
|
||||
--- configure.ac 2018-05-30 16:10:47.000000000 +0200
|
||||
+++ configure.ac 2018-05-31 15:43:06.099988369 +0200
|
||||
@@ -115,15 +115,17 @@
|
||||
|
||||
# Check if issetugid() is available and has compatible behavior with OpenBSD
|
||||
AC_CHECK_FUNCS([issetugid], [
|
||||
- AC_MSG_CHECKING([whether issetugid() can detect setuid/setgid])
|
||||
- issetugid_openbsd=no
|
||||
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
|
||||
- [[return issetugid ();]])],
|
||||
- [chmod 02777 ./conftest$EXEEXT; ./conftest$EXEEXT || issetugid_openbsd=yes])
|
||||
- if test "$issetugid_openbsd" = yes; then
|
||||
+ AC_CACHE_CHECK([whether issetugid() can detect setuid/setgid],
|
||||
+ [ac_cv_issetugid_openbsd],
|
||||
+ [ac_cv_issetugid_openbsd=no
|
||||
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]],
|
||||
+ [[return issetugid ();]])],
|
||||
+ [chmod 02777 ./conftest$EXEEXT; ./conftest$EXEEXT || ac_cv_issetugid_openbsd=yes],
|
||||
+ [ac_cv_issetugid_openbsd=no],
|
||||
+ [ac_cv_issetugid_openbsd="guessing no"])])
|
||||
+ if test "$ac_cv_issetugid_openbsd" = yes; then
|
||||
AC_DEFINE([HAVE_ISSETUGID_OPENBSD], [1], [Whether issetugid() has compatible behavior with OpenBSD])
|
||||
fi
|
||||
- AC_MSG_RESULT([$issetugid_openbsd])
|
||||
])
|
||||
|
||||
# Required functions
|
|
@ -4,7 +4,7 @@ version=0.23.12
|
|||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--with-module-path=/usr/lib/pkcs11 --without-trust-paths"
|
||||
hostmakedepends="pkg-config"
|
||||
hostmakedepends="automake libtool pkg-config"
|
||||
makedepends="libtasn1-devel libffi-devel"
|
||||
short_desc="Provides a way to load and enumerate PKCS#11 modules"
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
|
@ -14,6 +14,14 @@ distfiles="${homepage}/releases/download/${version}/p11-kit-${version}.tar.gz"
|
|||
checksum=58bae22f19db1de1a1103e7ca4149eed6e303e727878c2cd5ea9e6fe445fd403
|
||||
conf_files="/etc/pkcs11/pkcs11.conf"
|
||||
|
||||
case "$XBPS_TARGET_MACHIN" in
|
||||
*-musl) configure_args+=" ac_cv_issetugid_openbsd=no" ;;
|
||||
esac
|
||||
|
||||
pre_configure() {
|
||||
NOCONFIGURE=1 autoreconf -fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
mv ${DESTDIR}/etc/pkcs11/pkcs11.conf.example ${DESTDIR}/etc/pkcs11/pkcs11.conf
|
||||
vlicense COPYING
|
||||
|
|
Loading…
Reference in New Issue