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

55 lines
1.6 KiB
Makefile

# $OpenBSD: Makefile,v 1.32 2018/10/24 14:28:09 sthen Exp $
COMMENT = XMPP transport/gateway
DISTNAME = spectrum-1.4.8
CATEGORIES = net
REVISION = 9
HOMEPAGE = http://spectrum.im/
MASTER_SITES = https://github.com/downloads/hanzz/libtransport/
MAINTAINER = Sebastian Reitenbach <sebastia@openbsd.org>
# GPLv2
PERMIT_PACKAGE_CDROM = Yes
WANTLIB += c m pthread ${COMPILER_LIBCXX} gloox purple glib-2.0 gthread-2.0 ev
WANTLIB += PocoData PocoFoundation PocoDataMySQL PocoDataODBC PocoDataSQLite
WANTLIB += Magick++-6.Q16
COMPILER = base-clang ports-gcc base-gcc
MODULES = devel/cmake lang/python
BUILD_DEPENDS = devel/gettext-tools
LIB_DEPENDS = devel/libev \
graphics/ImageMagick \
net/gloox \
net/pidgin,-libpurple \
net/poco
RUN_DEPENDS = net/py-xmpppy
SPVARDIR = /var/spectrum
CONFIGURE_ENV += LDFLAGS=-pthread
NO_TEST = Yes
SUBST_VARS = SPVARDIR
pre-configure:
${SUBST_CMD} ${WRKSRC}/spectrumctl/spectrumctl.py \
${WRKSRC}/spectrumctl/spectrum/env.py ${WRKSRC}/spectrum.cfg \
${WRKSRC}/spectrumctl/spectrum/spectrum.py
post-install:
${INSTALL_DATA} ${WRKDIST}/schemas/mysql_schema.sql \
${PREFIX}/share/examples/spectrum
rm ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/spectrum/env.py.*
rm ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/spectrum/spectrum.py.orig
rm ${PREFIX}/lib/python${MODPY_VERSION}/site-packages/spectrum/spectrum.py.beforesubst
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py \
${PREFIX}/lib/python${MODPY_VERSION}/site-packages/spectrum
chmod a+r ${PREFIX}/share/examples/spectrum/spectrum.cfg.example
.include <bsd.port.mk>