diff --git a/ntp/PKGBUILD b/ntp/PKGBUILD index e61ce60316..06d1e5fc87 100644 --- a/ntp/PKGBUILD +++ b/ntp/PKGBUILD @@ -1,11 +1,13 @@ # POWER Maintainer: Alexander Baldeck -# Maintainer: Lukas Fleischer +# Maintainer: +# Contributor: Lukas Fleischer +# Contributor: Christian Heusel # Contributor: Gaetan Bisson # Contributor: kevin pkgname=ntp _pkgname=ntp #-dev -_pkgver=4.2.8p17 +_pkgver=4.2.8p18 pkgver=${_pkgver/p/.p} pkgrel=1 pkgdesc='Network Time Protocol reference implementation' @@ -15,17 +17,26 @@ arch=(x86_64 powerpc64le powerpc64 powerpc riscv64) depends=('openssl' 'perl' 'libcap' 'libedit') backup=('etc/ntp.conf') source=("https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/${_pkgname}-${_pkgver}.tar.gz" + ntp-4.2.8.p18-fix-build.patch 'ntp.conf' 'ntpd.service' 'ntpdate.service' 'ntp.sysusers') -sha256sums=('103dd272e6a66c5b8df07dce5e9a02555fcd6f1397bdfb782237328e89d3a866' +sha256sums=('cf84c5f3fb1a295284942624d823fffa634144e096cfc4f9969ac98ef5f468e5' + '9c4afa0daed5fd3cc9544ec808b2bb1dd959e5d40c4cae307b7025b16885903c' 'abccefe0b3a65cd375d5071ce780be8d2d205439aa6d34bcd3c56de6e80ba821' '1edd7e7916766b4aebb4d96a5da4b0a1086f43d3e0e4ffc90c2e4f92bd13ce7e' '63b0f8c03905daecad3f901664db70a608519b6ca4f4e7b159ab2c971cffacf4' 'f839a3b6d8e64fcd9332274131b4d5aa0b2c272db072dc310af1735ef286746a') options=('!emptydirs') +prepare() { + cd "${_pkgname}-${_pkgver}" + + patch -Np1 < ../ntp-4.2.8.p18-fix-build.patch + autoreconf -fiv +} + build() { cd "${_pkgname}-${_pkgver}" diff --git a/ntp/ntp-4.2.8.p18-fix-build.patch b/ntp/ntp-4.2.8.p18-fix-build.patch new file mode 100644 index 0000000000..1fc2df26b0 --- /dev/null +++ b/ntp/ntp-4.2.8.p18-fix-build.patch @@ -0,0 +1,16 @@ +diff -Nru a/sntp/m4/openldap-thread-check.m4 b/sntp/m4/openldap-thread-check.m4 +--- a/sntp/m4/openldap-thread-check.m4 2024-05-19 18:38:30 +0000 ++++ b/sntp/m4/openldap-thread-check.m4 2024-05-19 18:38:30 +0000 +@@ -262,10 +262,8 @@ + dnl save the flags + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include +-#ifndef NULL +-#define NULL (void*)0 +-#endif +-]], [[pthread_detach(NULL);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) ++pthread_t thread; ++]], [[pthread_detach(thread);]])],[ol_cv_func_pthread_detach=yes],[ol_cv_func_pthread_detach=no]) + ]) + + if test $ol_cv_func_pthread_detach = no ; then diff --git a/ntp/ntp-4.2.8_p15-glibc-2.34.patch b/ntp/ntp-4.2.8_p15-glibc-2.34.patch deleted file mode 100644 index a32f3adabd..0000000000 --- a/ntp/ntp-4.2.8_p15-glibc-2.34.patch +++ /dev/null @@ -1,28 +0,0 @@ -https://bugs.gentoo.org/806358 -https://patchwork.openembedded.org/patch/180019/ - -From: Khem Raj -Date: Sat, 31 Jul 2021 10:51:41 -0700 -Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc - -In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which -could mean different stack sizes at runtime on different architectures -and it also causes compile failure. Default glibc thread stack size -or 64Kb set by ntp should be good in glibc these days. - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- a/libntp/work_thread.c -+++ b/libntp/work_thread.c -@@ -41,7 +41,7 @@ - #ifndef THREAD_MINSTACKSIZE - # define THREAD_MINSTACKSIZE (64U * 1024) - #endif --#ifndef __sun -+#if !defined(__sun) && !defined(__GLIBC__) - #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN - # undef THREAD_MINSTACKSIZE - # define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN --- -2.32.0 -