freebsd-ports/lang/maude/Makefile
Piotr Kubaj 6ff958cc9b lang/maude: fix build on GCC architectures
Don't link unconditinally with $NCURSESLIB. When NCURSESLIB is /usr/lib and the system compiler is base GCC, GCC from ports (currently GCC9) is used. Passing -L/usr/lib makes GCC try to link to base libstdc++ instead the one from ports.

Also add USES=localbase:ldflags.

PR:		239481
Approved by:	linimon (mentor), greg@unrelenting.technology (maintainer)
Differential Revision:	https://reviews.freebsd.org/D21397
2019-08-29 19:37:17 +00:00

79 lines
2.0 KiB
Makefile

# Created by: Rick van der Zwet <rick@wzoeterwoude.net>
# $FreeBSD$
PORTNAME= maude
PORTVERSION= 2.7.1
CATEGORIES= lang
MASTER_SITES= http://maude.cs.illinois.edu/w/images/d/d8/
DISTNAME= Maude-${PORTVERSION}
MAINTAINER= greg@unrelenting.technology
COMMENT= High-performance reflective language
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex
LIB_DEPENDS= libbdd.so:science/buddy \
libtecla.so:devel/libtecla \
libgmp.so:math/gmp \
libsigsegv.so:devel/libsigsegv
USES= alias autoreconf bison compiler:c++11-lang localbase:ldflags \
ncurses
WRKSRC= ${WRKDIR}/maude-${PORTVERSION}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --datadir=${DATADIR}
MAKE_JOBS_UNSAFE= yes
OPTIONS_SUB= yes
OPTIONS_DEFINE= DOCS FULL_MAUDE CVC4
OPTIONS_DEFAULT= FULL_MAUDE CVC4
FULL_MAUDE_DESC= Install full-maude
CVC4_DESC= Enable SMT support via CVC4
CVC4_LIB_DEPENDS= libcvc4.so:math/cvc4
CVC4_CONFIGURE_WITH= cvc4
PORTDOCS= AUTHORS COPYING ChangeLog INSTALL NEWS README
.include <bsd.port.pre.mk>
.if ${NCURSESLIB} != /usr/lib
CPPFLAGS+= -I${NCURSESINC}
LDFLAGS+= -L${NCURSESLIB}
.endif
.if ${PORT_OPTIONS:MFULL_MAUDE}
MASTER_SITES+= http://maude.cs.illinois.edu/w/images/c/ca/:fm
FULL_MAUDE= full-maude.maude
FULL_MAUDE_DIST= Full-Maude-${PORTVERSION}.zip
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${FULL_MAUDE_DIST}:fm
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_DEPENDS+= ${LOCALBASE}/bin/unzip:archivers/unzip
PLIST_SUB+= FULL_MAUDE=""
PLIST_SUB+= FULL_MAUDE_VER="${FULL_MAUDE_VER}"
.else
PLIST_SUB+= FULL_MAUDE="@comment "
.endif
post-extract-FULL_MAUDE-on:
${UNZIP_CMD} ${DISTDIR}/${FULL_MAUDE_DIST} ${FULL_MAUDE} -d ${WRKDIR}
post-patch:
@${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' \
${WRKSRC}/src/Mixfix/global.hh
@${REINPLACE_CMD} -e 's|-lcurses|-lncurses|g' \
${WRKSRC}/configure.ac
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
post-install-FULL_MAUDE-on:
${INSTALL_DATA} ${WRKDIR}/${FULL_MAUDE} ${STAGEDIR}${DATADIR}
.include <bsd.port.post.mk>