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

57 lines
1.2 KiB
Makefile

# $OpenBSD: Makefile,v 1.69 2018/10/24 14:28:01 sthen Exp $
COMMENT = simplified wrapper and interface generator
SUBST_VARS = VERSION
VERSION = 3.0.12
DISTNAME = swig-${VERSION}
CATEGORIES = devel
REVISION = 0
HOMEPAGE = http://www.swig.org/
# BSD
PERMIT_PACKAGE_CDROM = Yes
WANTLIB = c m pcre ${COMPILER_LIBCXX} z
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=swig/}
MODULES = lang/python \
lang/ruby \
lang/tcl
MODRUBY_RUNDEP = No
MODPY_RUNDEP = No
BUILD_DEPENDS = ${MODTCL_BUILD_DEPENDS} \
lang/guile
LIB_DEPENDS = devel/pcre
USE_GMAKE = Yes
CONFIGURE_STYLE = gnu
CONFIGURE_ARGS += --with-tclincl=${MODTCL_INCDIR} \
--with-tcllib=${MODTCL_LIBDIR} \
--with-guilelib=${LOCALBASE}/lib \
--with-python=${MODPY_BIN} \
--with-ruby=${RUBY} \
--without-mzscheme \
--without-php4 \
--without-ocaml
MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC}/Tools/config
ALL_TARGET = swig
SWIG_EXAMPLES = ${PREFIX}/share/examples/swig
SWIG_DOCS = ${PREFIX}/share/doc/swig
post-install:
${INSTALL_DATA_DIR} ${SWIG_EXAMPLES}
${INSTALL_DATA_DIR} ${SWIG_DOCS}
cp -R ${WRKSRC}/Examples/* ${SWIG_EXAMPLES}
cp -R ${WRKSRC}/Doc/* ${SWIG_DOCS}
chmod 0644 ${SWIG_DOCS}/Manual/CCache.html
.include <bsd.port.mk>