From fcf1958dbf69895f6fb9884e83c1d0dc6ae6cdd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 9 Apr 2020 16:33:24 +0700 Subject: [PATCH] kea: cross compile --- srcpkgs/kea/patches/cross-cxx-regex.patch | 34 +++++++++++++++++++++++ srcpkgs/kea/template | 9 ++++-- 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 srcpkgs/kea/patches/cross-cxx-regex.patch diff --git a/srcpkgs/kea/patches/cross-cxx-regex.patch b/srcpkgs/kea/patches/cross-cxx-regex.patch new file mode 100644 index 00000000000..a44d71afe3a --- /dev/null +++ b/srcpkgs/kea/patches/cross-cxx-regex.patch @@ -0,0 +1,34 @@ +diff --git configure.ac configure.ac +index 02fcd8b..20a7cc6 100755 +--- configure.ac ++++ configure.ac +@@ -540,6 +540,21 @@ AC_TRY_COMPILE([ + AC_MSG_RESULT(no)) + + AC_MSG_CHECKING(for usuable C++11 regex) ++AC_TRY_COMPILE([ ++#ifdef __clang__ ++ /* suppose all clang are usable */ ++#elif defined(__GNUC__) ++ #if (__GNUC__ * 100 + __GNUC_MINOR__) < 409 ++ #error regex was implemented in gcc 4.9 ++ #endif ++#else ++ #error unknown compiler ++#endif ++],[ ], ++[ ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++11 regex is usable]) ++], + AC_TRY_RUN([ + #include + #include +@@ -552,6 +567,7 @@ int main() { + [AC_MSG_RESULT(yes) + AC_DEFINE(USE_REGEX, 1, [Define to 1 if C++11 regex is usable])], + AC_MSG_RESULT(no)) ++) + + # Run the gtest detection routines. This supports --with-gtest and --with-gtest-source + # parameters. If specified, those will set the HAVE_GTEST, HAVE_GTEST_SOURCE, diff --git a/srcpkgs/kea/template b/srcpkgs/kea/template index 86393c1edf8..d7be3da6644 100644 --- a/srcpkgs/kea/template +++ b/srcpkgs/kea/template @@ -5,8 +5,8 @@ revision=1 build_style=gnu-configure configure_args="--enable-generate-docs --with-openssl=${XBPS_CROSS_BASE}/usr $(vopt_if mysql --with-mysql) - $(vopt_if pgsql --with-pgsql=${XBPS_CROSS_BASE}/usr/bin/pg_config)" -hostmakedepends="flex bison perl pkg-config + $(vopt_if pgsql --with-pgsql=${XBPS_CROSS_BASE}/usr/bin/pg_config.sh)" +hostmakedepends="flex bison perl pkg-config automake libtool doxygen elinks libxslt docbook-xsl python3-Sphinx python3-sphinx_rtd_theme" makedepends="boost-devel log4cplus-devel python3-devel $(vopt_if botan botan-devel libressl-devel) @@ -21,7 +21,6 @@ license="MPL-2.0, Apache-2.0" homepage="https://kea.isc.org" distfiles="http://ftp.isc.org/isc/kea/${version/.P/-P}/kea-${version/.P/-P}.tar.gz" checksum=1da3d50e0c8e92e1aa6d66100b5afd7b93ba2c50b0a4ea114fd9dcb8be982ca9 -nocross="Tools required for messages are not built for the host arch" build_options="botan mysql pgsql" desc_option_botan="With Botan SSL support" @@ -34,6 +33,10 @@ CXXFLAGS="-Wno-deprecated-declarations -O2" make_dirs="/var/kea 755 root root" +pre_configure() { + autoreconf -fi +} + post_install() { vsv kea-dhcp4 vsv kea-dhcp6