sthen 25f0e460f2 Add COMPILER lines to c++ ports which currently use the default. Adjust
some existing COMPILER lines with arch restrictions etc. In the usual
case this is now using "COMPILER = base-clang ports-gcc base-gcc" on
ports with c++ libraries in WANTLIB.

This is basically intended to be a noop on architectures using clang
as the system compiler, but help with other architectures where we
currently have many ports knocked out due to building with an unsuitable
compiler -

- some ports require c++11/newer so the GCC version in base that is used
on these archirtectures is too old.

- some ports have conflicts where an executable is built with one compiler
(e.g. gcc from base) but a library dependency is built with a different
one (e.g. gcc from ports), resulted in mixing incompatible libraries in the
same address space.

devel/gmp is intentionally skipped as it's on the path to building gcc -
the c++ library there is unused in ports (and not built by default upstream)
so intending to disable building gmpcxx in a future commit.
2018-10-24 14:27:57 +00:00

88 lines
2.7 KiB
Makefile

# $OpenBSD: Makefile,v 1.44 2018/10/24 14:28:10 sthen Exp $
BROKEN-powerpc = 64-bit atomics (__sync_bool_compare_and_swap_8)
COMMENT-main = syslog daemon supporting databases, TCP, SSL, RELP
COMMENT-mysql = MySQL plugin for rsyslog
COMMENT-normalize = liblognorm plugin for rsyslog
COMMENT-pgsql = PostgreSQL plugin for rsyslog
COMMENT-elasticsearch = Elasticsearch plugin for rsyslog
MULTI_PACKAGES = -main -mysql -normalize -pgsql -elasticsearch
V = 8.37.0
DISTNAME = rsyslog-$V
PKGNAME-main = rsyslog-$V
PKGNAME-mysql = rsyslog-mysql-$V
PKGNAME-normalize = rsyslog-normalize-$V
PKGNAME-pgsql = rsyslog-pgsql-$V
PKGNAME-elasticsearch = rsyslog-elasticsearch-$V
CATEGORIES = sysutils
REVISION-elasticsearch =0
REVISION-main = 0
REVISION-mysql = 0
REVISION-normalize = 0
REVISION-pgsql = 0
HOMEPAGE = https://www.rsyslog.com/
MAINTAINER = Remi Locherer <remi@openbsd.org>
# GPLv3+
PERMIT_PACKAGE_CDROM = Yes
COMPILER = base-clang ports-gcc base-gcc
WANTLIB-main += c crypto curl estr fastjson ffi gcrypt gmp gnutls
WANTLIB-main += gpg-error hogweed iconv idn2 intl nettle nghttp2
WANTLIB-main += p11-kit pthread relp ssl tasn1 unistring uuid z
WANTLIB-mysql += crypto m mysqlclient pthread ssl ${COMPILER_LIBCXX} z
WANTLIB-normalize += estr fastjson lognorm pthread
WANTLIB-pgsql += crypto pq pthread ssl
WANTLIB-elasticsearch += crypto curl m nghttp2 pthread ssl z
LIB_DEPENDS-main = devel/libfastjson \
devel/libestr \
net/curl \
security/libgcrypt \
security/gnutls \
sysutils/librelp>=1.2.14
# XXX should port to using libc UUID functions
LIB_DEPENDS-main += sysutils/e2fsprogs
LIB_DEPENDS-mysql = databases/mariadb
RUN_DEPENDS-mysql = ${PKGNAME-main}:${PKGPATH},-main
LIB_DEPENDS-normalize = devel/liblognorm
RUN_DEPENDS-normalize = ${PKGNAME-main}:${PKGPATH},-main
LIB_DEPENDS-pgsql = databases/postgresql
RUN_DEPENDS-pgsql = ${PKGNAME-main}:${PKGPATH},-main
RUN_DEPENDS-elasticsearch = ${PKGNAME-main}:${PKGPATH},-main
MASTER_SITES = https://www.rsyslog.com/files/download/rsyslog/
CONFIGURE_STYLE = gnu
LIBTOOL_FLAGS = --tag=disable-static
CONFIGURE_ARGS += --enable-pgsql \
--enable-mysql \
--enable-mail \
--enable-mmnormalize \
--enable-gnutls \
--enable-relp \
--enable-elasticsearch
CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include"
post-install:
rm ${PREFIX}/lib/rsyslog/*.la
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rsyslog
${SUBST_DATA} ${FILESDIR}/rsyslog.conf \
${PREFIX}/share/examples/rsyslog/rsyslog.conf
${INSTALL_DATA} ${WRKSRC}/plugins/ommysql/createDB.sql \
${PREFIX}/share/examples/rsyslog/createDB_mysql.sql
${INSTALL_DATA} ${WRKSRC}/plugins/ompgsql/createDB.sql \
${PREFIX}/share/examples/rsyslog/createDB_pgsql.sql
.include <bsd.port.mk>