aboutsummaryrefslogtreecommitdiffstats
path: root/main/openntpd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-10-31 17:40:33 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-11-07 16:46:12 +0000
commit1f6d84ee87fda699ae6a7758faaa9e4036dc86fa (patch)
tree14ed3d94896056a76bba41cf13b10ee77a35c7ce /main/openntpd
parentc2c70980c9f4d081a5e418e5ce811068da76532d (diff)
downloadaports-1f6d84ee87fda699ae6a7758faaa9e4036dc86fa.tar.bz2
aports-1f6d84ee87fda699ae6a7758faaa9e4036dc86fa.tar.xz
main/openntpd: rebuild against libtls-standalone
Diffstat (limited to 'main/openntpd')
-rw-r--r--main/openntpd/APKBUILD15
-rw-r--r--main/openntpd/libtls-standalone.patch20
2 files changed, 32 insertions, 3 deletions
diff --git a/main/openntpd/APKBUILD b/main/openntpd/APKBUILD
index 1394119ff4..e30832e23f 100644
--- a/main/openntpd/APKBUILD
+++ b/main/openntpd/APKBUILD
@@ -2,21 +2,28 @@
pkgname=openntpd
pkgver=6.2_p3
_pkgver=${pkgver/_/}
-pkgrel=1
+pkgrel=2
pkgdesc="Lightweight NTP server ported from OpenBSD"
url="http://www.openntpd.org/"
subpackages="openntpd-doc"
-makedepends="libressl-dev linux-headers bsd-compat-headers"
+makedepends="libtls-standalone-dev linux-headers bsd-compat-headers
+ autoconf automake libtool"
arch="all"
license="BSD"
options="!check"
source="https://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/$pkgname-$_pkgver.tar.gz
ntp-user.patch
+ libtls-standalone.patch
$pkgname.confd
$pkgname.initd
"
builddir="$srcdir/$pkgname-$_pkgver"
+prepare() {
+ default_prepare
+ autoreconf -vif
+}
+
build() {
cd "$builddir"
@@ -27,7 +34,8 @@ build() {
--localstatedir=/var \
--mandir=/usr/share/man \
--sysconfdir=/etc \
- --with-privsep-user=ntp
+ --with-privsep-user=ntp \
+ --enable-https-constraint
make
}
@@ -46,5 +54,6 @@ package() {
sha512sums="56a04bfd8b161b365607673ac80086ff53ae943938fa49bf52edbc541432eca30730a46a4af581fe26ce3bbceb144cb25982a38959b7a3f9304c727fe60f9f50 openntpd-6.2p3.tar.gz
290311e5cd074d5bd1e6374ba9b4776e4acf792d47011c43412e236766b73be2b0e5f0091bd3ad79d0b637754531889b199e66c64952765bbcd1bade0d2ebe94 ntp-user.patch
+4b27edb9b778a8a0437735e010f0606cd03a46d10bb054a6527929d46de44ba470bc81017cb2a61956fc8049879e498aadf545a89a35be1237e26eeac98ef3e3 libtls-standalone.patch
01c3d9ed18741981fb2d8ebb509cd71801b57f57fcac48ed727687a6402dbad8a791ace1e63c0069a07b0dbcbc98c917885c942dab9616d25dde429f1fb9c348 openntpd.confd
009eb7c7cf290c9302d9585ce7dffb2195e7e73c8bd3274b158efde10b537919c5dc4a47038f2fca6d650bcd79e8333395faa06d98f28327a328368fd59a1618 openntpd.initd"
diff --git a/main/openntpd/libtls-standalone.patch b/main/openntpd/libtls-standalone.patch
new file mode 100644
index 0000000000..3b5d8e4053
--- /dev/null
+++ b/main/openntpd/libtls-standalone.patch
@@ -0,0 +1,20 @@
+diff --git a/configure.ac b/configure.ac
+index 88884c2..b0c0697 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -60,8 +60,13 @@ AM_CONDITIONAL([HAVE_CLOCK_GETRES], [test "x$ac_cv_func_clock_getres" = xyes])
+ AM_CONDITIONAL([HAVE_CLOCK_GETTIME], [test "x$ac_cv_func_clock_gettime" = xyes])
+
+ # check for libtls
+-AC_SEARCH_LIBS([tls_config_set_ca_mem],[tls],
+- [LIBS="$LIBS -ltls -lssl -lcrypto"],,[-lssl -lcrypto])
++PKG_CHECK_MODULES([LIBTLS], [libtls],[],[
++ PKG_CHECK_MODULES([LIBTLS], [libtls-standalone])
++ ])
++AC_SEARCH_LIBS([tls_config_set_ca_mem],[tls tls-standalone],
++ [LIBS="$LIBS $LIBTLS_LIBS"
++ CFLAGS="$CFLAGS $LIBTLS_CFLAGS"],
++ ,[$LIBTLS_LIBS])
+ AC_CHECK_FUNCS([tls_config_set_ca_mem])
+
+ # check if libtls uses 3-argument tls_write