Botan honors the CXX, CXXFLAGS, AR, and LDFLAGS enviroment now.

So there is no need to patch the compiler type.
suggested by upstream developer Jack Lloyd

Add py-docutils as build dependency to create man pages.
package failure reported by ajacoutot@

Explicitly set the compiler type to gcc on non clang archs.
This commit is contained in:
bluhm 2018-01-16 18:49:40 +00:00
parent f4fb7658d0
commit 4573f0bde5
3 changed files with 7 additions and 46 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.13 2018/01/14 20:56:23 rsadowski Exp $
# $OpenBSD: Makefile,v 1.14 2018/01/16 18:49:40 bluhm Exp $
COMMENT = crypto and TLS for C++11
VERSION = 2.4.0
REVISION = 0
DISTNAME = Botan-${VERSION}
PKGNAME = botan2-${VERSION}
@ -17,7 +18,7 @@ MAINTAINER = Alexander Bluhm <bluhm@openbsd.org>
# BSD 2-Clause
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += ${COMPILER_LIBCXX} bz2 c crypto lzma m z
WANTLIB = ${COMPILER_LIBCXX} bz2 c crypto lzma m z
MASTER_SITES = ${HOMEPAGE}releases/
@ -28,6 +29,7 @@ MODULES = lang/python
MODPY_RUNDEP = No
COMPILER = base-clang ports-gcc
BUILD_DEPENDS = textproc/py-docutils
LIB_DEPENDS = archivers/bzip2 \
archivers/xz
@ -53,7 +55,6 @@ PKG_ARGS = -Dx86=0
SUBST_VARS = CXX CXXFLAGS LIBbotan-2_VERSION
pre-configure:
${SUBST_CMD} ${WRKSRC}/src/build-data/cc/{clang,gcc}.txt
${SUBST_CMD} ${WRKSRC}/src/build-data/os/openbsd.txt
${SUBST_CMD} ${WRKSRC}/src/tests/main.cpp
ln -sf ${MODPY_BIN} ${WRKDIR}/bin/python
@ -77,7 +78,9 @@ post-install:
# if we don't explicitly configure for it, it passes as a good enough gcc,
# and then we get lots of warnings for unknown warning options...
.if ${PROPERTIES:Mclang}
CONFIGURE_ARGS += --with-external-includedir=${LOCALBASE}/include \
CONFIGURE_ARGS += --with-external-includedir=${LOCALBASE}/include \
--with-external-libdir=${LOCALBASE}/lib \
--cc=clang
.else
CONFIGURE_ARGS += --cc=gcc
.endif

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_build-data_cc_clang_txt,v 1.1 2018/01/14 20:40:18 rsadowski Exp $
Index: src/build-data/cc/clang.txt
--- src/build-data/cc/clang.txt.orig
+++ src/build-data/cc/clang.txt
@@ -1,13 +1,13 @@
macro_name CLANG
-binary_name clang++
+binary_name ${CXX}
lang_flags "-std=c++11 -D_REENTRANT"
warning_flags "-Wall -Wextra -Wpedantic -Wshadow -Wstrict-aliasing -Wstrict-overflow=5 -Wcast-align -Wmissing-declarations -Wpointer-arith -Wcast-qual"
maintainer_warning_flags "-Wunreachable-code -Wdocumentation -Qunused-arguments -Werror -Wno-error=unused-parameter -Wno-error=unreachable-code -Wno-error=deprecated-declarations"
-optimization_flags "-O3"
+optimization_flags "${CXXFLAGS}"
size_optimization_flags "-Os"
#sanitizer_flags "-fsanitize=address,undefined -fsanitize-coverage=edge,indirect-calls,8bit-counters -fno-sanitize-recover=undefined"
sanitizer_flags "-fsanitize=address,undefined"

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-src_build-data_cc_gcc_txt,v 1.2 2018/01/14 20:40:18 rsadowski Exp $
Index: src/build-data/cc/gcc.txt
--- src/build-data/cc/gcc.txt.orig
+++ src/build-data/cc/gcc.txt
@@ -1,6 +1,6 @@
macro_name GCC
-binary_name g++
+binary_name ${CXX}
lang_flags "-std=c++11 -D_REENTRANT"
@@ -9,7 +9,7 @@ warning_flags "-Wall -Wextra -Wpedantic -Wstrict-alias
maintainer_warning_flags "-Wstrict-overflow=5 -Wold-style-cast -Wsuggest-override -Wshadow -Werror -Wno-error=strict-overflow -Wno-error=deprecated-declarations"
-optimization_flags "-O3"
+optimization_flags "${CXXFLAGS}"
size_optimization_flags "-Os"
shared_flags "-fPIC"