svn commit: r308451 - in head/cad/gnucap: . files
Pawel Pekala
pawel at FreeBSD.org
Fri Dec 7 21:39:56 UTC 2012
Author: pawel
Date: Fri Dec 7 21:39:55 2012
New Revision: 308451
URL: http://svnweb.freebsd.org/changeset/ports/308451
Log:
- Fix build with clang
- Convert to OptionsNG, add READLINE option
- Realign pkg-descr
PR: ports/172724
Submitted by: KATO Tsuguru <tkato432 at yahoo.com>
Feature safe: yes
Added:
head/cad/gnucap/files/
head/cad/gnucap/files/patch-modelgen__mg_.h (contents, props changed)
Modified:
head/cad/gnucap/Makefile
head/cad/gnucap/pkg-descr
Modified: head/cad/gnucap/Makefile
==============================================================================
--- head/cad/gnucap/Makefile Fri Dec 7 21:11:56 2012 (r308450)
+++ head/cad/gnucap/Makefile Fri Dec 7 21:39:55 2012 (r308451)
@@ -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 at 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}
Added: head/cad/gnucap/files/patch-modelgen__mg_.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/cad/gnucap/files/patch-modelgen__mg_.h Fri Dec 7 21:39:55 2012 (r308451)
@@ -0,0 +1,44 @@
+--- modelgen/mg_.h.orig 2009-12-08 08:19:15.000000000 +0900
++++ modelgen/mg_.h 2012-10-14 00:54:09.000000000 +0900
+@@ -108,6 +108,20 @@
+ size_t size()const {return _list.size();}
+ };
+ /*--------------------------------------------------------------------------*/
++class C_Comment
++ :public Base
++{
++public:
++ void parse(CS& f);
++};
++/*--------------------------------------------------------------------------*/
++class Cxx_Comment
++ :public Base
++{
++public:
++ void parse(CS& f);
++};
++/*--------------------------------------------------------------------------*/
+ /* A "Collection" differs from a "List" in how it is parsed.
+ * Each parse of a "Collection" created one more object and stores
+ * it in the Collection. The size of the Collection therefore grows by 1.
+@@ -200,20 +214,6 @@
+ }
+ };
+ /*--------------------------------------------------------------------------*/
+-class C_Comment
+- :public Base
+-{
+-public:
+- void parse(CS& f);
+-};
+-/*--------------------------------------------------------------------------*/
+-class Cxx_Comment
+- :public Base
+-{
+-public:
+- void parse(CS& f);
+-};
+-/*--------------------------------------------------------------------------*/
+ class Key
+ :public Base
+ {
Modified: head/cad/gnucap/pkg-descr
==============================================================================
--- head/cad/gnucap/pkg-descr Fri Dec 7 21:11:56 2012 (r308450)
+++ head/cad/gnucap/pkg-descr Fri Dec 7 21:39:55 2012 (r308451)
@@ -1,22 +1,22 @@
GnuCap is the GNU Circuit Analysis Package.
-The primary component is a general purpose circuit simulator. It performs
-nonlinear dc and transient analyses, fourier analysis, and ac analysis. It is
-fully interactive and command driven. It can also be run in batch mode or as a
-server. Spice compatible models for the MOSFET (level 1-7) and diode are
-included in this release.
+The primary component is a general purpose circuit simulator. It
+performs nonlinear dc and transient analyses, fourier analysis, and ac
+analysis. It is fully interactive and command driven. It can also be
+run in batch mode or as a server. Spice compatible models for the
+MOSFET (level 1-7) and diode are included in this release.
-GnuCap is not based on Spice, but some of the models have been derived from
-the Berkeley models.
+GnuCap is not based on Spice, but some of the models have been derived
+from the Berkeley models.
-Unlike Spice, the engine is designed to do true mixed-mode simulation. Most
-of the code is in place for future support of event driven analog simulation,
-and true multi-rate simulation.
+Unlike Spice, the engine is designed to do true mixed-mode simulation.
+Most of the code is in place for future support of event driven analog
+simulation, and true multi-rate simulation.
-If you are tired of Spice and want a second opinion, you want to play with the
-circuit and want a simulator that is interactive, you want to study the source
-code and want something easier to follow than Spice, or you are a researcher
-working on modeling and want automated model generation tools to make your job
-easier, try GnuCap.
+If you are tired of Spice and want a second opinion, you want to play
+with the circuit and want a simulator that is interactive, you want to
+study the source code and want something easier to follow than Spice,
+or you are a researcher working on modeling and want automated model
+generation tools to make your job easier, try GnuCap.
WWW: http://www.gnucap.org/
More information about the svn-ports-head
mailing list