openbsd-ports/math/plplot/Makefile
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

106 lines
2.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.61 2018/10/24 14:28:07 sthen Exp $
BROKEN-powerpc = Error: Kind -2 not supported for type INTEGER at (1)
COMMENT-main = advanced 2D and 3D scientific plotting library
COMMENT-c++ = C++ interface to plplot
COMMENT-fortran = Fortran 77 interface to plplot
VERSION = 5.13.0
DISTNAME = plplot-${VERSION}
SHARED_LIBS = csirocsa 4.0 \
csironn 0.0 \
plplot 15.0 \
plplotcxx 13.0 \
plplotfortran 0.0 \
qsastime 0.0
PKGNAME-main = ${DISTNAME}
PKGNAME-c++ = plplot-c++-${VERSION}
PKGNAME-fortran = plplot-fortran-${VERSION}
REVISION-c++ = 0
REVISION-fortran = 0
REVISION-main = 0
CATEGORIES = math graphics
HOMEPAGE = http://plplot.sourceforge.net/
MAINTAINER = Steven Mestdagh <steven@openbsd.org>
# LGPL
PERMIT_PACKAGE_CDROM = Yes
MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=plplot/}
COMPILER = base-clang ports-gcc base-gcc
MODULES = fortran
MODFORTRAN_COMPILER = gfortran
BUILD_DEPENDS = print/ghostscript/gnu-fonts \
${MODFORTRAN_BUILD_DEPENDS}
myRUN_DEPENDS = print/ghostscript/gnu-fonts
MODULES += devel/cmake
# Until the cmake ninja generator supports fortran
USE_NINJA = No
CONFIGURE_ARGS = -D ENABLE_ada=OFF \
-D ENABLE_cxx=ON \
-D ENABLE_d=OFF \
-D ENABLE_fortran=ON \
-D ENABLE_java=OFF \
-D ENABLE_lua=OFF \
-D ENABLE_ocaml=OFF \
-D ENABLE_octave=OFF \
-D ENABLE_pdl=OFF \
-D ENABLE_python=OFF \
-D ENABLE_qt=OFF \
-D ENABLE_pyqt4=OFF \
-D ENABLE_tcl=OFF \
-D ENABLE_itcl=OFF \
-D ENABLE_tk=OFF \
-D ENABLE_itk=OFF \
-D ENABLE_wxwidgets=OFF
DOCSRC = ${WRKSRC}/doc/docbook/src
MULTI_PACKAGES = -main -c++ -fortran
myWANTLIB += ICE SM X11 Xext cairo glib-2.0
myWANTLIB += gobject-2.0 m pango-1.0 pangocairo-1.0
myWANTLIB += qhull intl ltdl
WANTLIB-main = ${myWANTLIB} c pthread
WANTLIB-c++ = plplot m ${COMPILER_LIBCXX}
WANTLIB-fortran = plplot m ${MODFORTRAN_WANTLIB}
myLIB_DEPENDS = devel/glib2 \
devel/gettext \
devel/pango \
graphics/cairo \
math/qhull \
devel/libtool,-ltdl
LIB_DEPENDS-main = ${myLIB_DEPENDS}
LIB_DEPENDS-c++ = math/plplot,-main
LIB_DEPENDS-fortran = math/plplot,-main \
${MODFORTRAN_LIB_DEPENDS}
RUN_DEPENDS-main = ${myRUN_DEPENDS}
RUN_DEPENDS-c++ =
RUN_DEPENDS-fortran =
pre-configure:
@sed -i 's/3plplot/3/g' ${DOCSRC}/*.3plplot
@cd ${DOCSRC} && for m in *.3plplot; do mv $$m $${m%\.3plplot}.3; done
post-install:
${INSTALL_MAN} ${DOCSRC}/*.3 ${PREFIX}/man/man3
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/plplot/html
${INSTALL_DATA} ${DOCSRC}/*.html ${PREFIX}/share/doc/plplot/html
.include <bsd.port.mk>