aboutsummaryrefslogtreecommitdiff
path: root/cad/gnucap/Makefile
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2012-12-07 21:39:55 +0000
committerPawel Pekala <pawel@FreeBSD.org>2012-12-07 21:39:55 +0000
commit4ac28dd88f48bf4b60b62bef8513c737b9c8e53e (patch)
treef4e3d86bde2d39bc35154ae721a545c464151d8c /cad/gnucap/Makefile
parentee1905a4b60861c47ba478dc12c99fd4919edace (diff)
downloadports-4ac28dd88f48bf4b60b62bef8513c737b9c8e53e.tar.gz
ports-4ac28dd88f48bf4b60b62bef8513c737b9c8e53e.zip
Notes
Diffstat (limited to 'cad/gnucap/Makefile')
-rw-r--r--cad/gnucap/Makefile32
1 files changed, 21 insertions, 11 deletions
diff --git a/cad/gnucap/Makefile b/cad/gnucap/Makefile
index 13d5274d019e..f35efcebf546 100644
--- a/cad/gnucap/Makefile
+++ b/cad/gnucap/Makefile
@@ -1,10 +1,5 @@
-# ex:ts=8
-# Ports collection makefile for: gnucap
-# Date created: Feb 7, 2002
-# Whom: ijliao
-#
+# Created by: ijliao
# $FreeBSD$
-#
PORTNAME= gnucap
PORTVERSION= 2009.12.07
@@ -17,9 +12,11 @@ MAINTAINER= ports@FreeBSD.org
COMMENT= The GNU Circuit Analysis Package
LICENSE= GPLv3
-LICENSE_FILE= ${WRKSRC}/COPYING
-USE_GCC= any
+OPTIONS_DEFINE= READLINE DOCS EXAMPLES
+OPTIONS_DEFAULT=READLINE
+READLINE_DESC= Enable readline support
+
USE_GMAKE= yes
GNU_CONFIGURE= yes
MAKE_JOBS_SAFE= yes
@@ -29,20 +26,33 @@ PORTDOCS= *
PORTEXAMPLES= *
PLIST_FILES= bin/gnucap bin/gnucap-modelgen
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MREADLINE}
+USE_READLINE= yes
+.else
+CONFIGURE_ARGS+=--with-readline=no
+.endif
+
post-patch:
- ${REINPLACE_CMD} -e \
+ @${REINPLACE_CMD} -e \
'/^SUBDIRS/s|doc examples||' ${WRKSRC}/Makefile.in
+.for i in src/ap_match.cc modelgen/ap_match.cc
+ @${REINPLACE_CMD} -e \
+ "s:strchr(str2, '|'):const_cast<char*>(strchr(str2, '|')):" \
+ ${WRKSRC}/${i}
+.endfor
post-install:
${INSTALL_MAN} ${WRKSRC}/doc/*.1 ${MANPREFIX}/man/man1
-.if !defined(NOPORTDOCS)
+.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/acs-tutorial ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/history ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/relnotes.* ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/whatisit ${DOCSDIR}
.endif
-.if !defined(NOPORTEXAMPLES)
+.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/README ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/runall ${EXAMPLESDIR}