aboutsummaryrefslogtreecommitdiff
path: root/cad/gspiceui/Makefile
blob: 04c1e8c22e5a7ab99564107a191596c3cd9d14f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Created by: Stanislav Sedov <ssedov@mbsd.msk.ru>
# $FreeBSD$

PORTNAME=	gspiceui
PORTVERSION=	1.0.00
PORTREVISION=	2
CATEGORIES=	cad
MASTER_SITES=	SF/${PORTNAME}/gSpiceUI/${PORTNAME}-v${PORTVERSION}
DISTNAME=	${PORTNAME}-v${PORTVERSION}

MAINTAINER=	kevinz5000@gmail.com
COMMENT=	GUI frontend to gnucap and ngspice circuit simulators

LICENSE=	GPLv2

RUN_DEPENDS=	# none if no options are set

OPTIONS_DEFINE=	DOCS EXAMPLES
OPTIONS_GROUP=	BACKEND VIEWER

OPTIONS_GROUP_BACKEND=	GNUCAP NGSPICE
OPTIONS_GROUP_VIEWER=	GWAVE

GNUCAP_DESC=	Depend on gnucap as a simulation backend
NGSPICE_DESC=	Depend on ngspice as a simulation backend
GWAVE_DESC=	Depend on gwave waveform viewer

OPTIONS_DEFAULT=	NGSPICE GWAVE

USE_WX=		2.6+
WX_UNICODE=	yes
USE_GCC=	4.6+
USE_GMAKE=	yes

DESKTOP_ENTRIES=	"GSpiceUI" "Circuit Simulator GUI" \
			"${PREFIX}/share/pixmaps/gspiceui-48x48.xpm" \
			"gspiceui" "Science;Electronics;" false

MAN1=		gspiceui.1
PORTDOCS=	*
PORTEXAMPLES=	*
PLIST_FILES=	bin/gspiceui share/pixmaps/gspiceui-48x48.xpm

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGNUCAP}
RUN_DEPENDS+=	gnucap:${PORTSDIR}/cad/gnucap
.endif

.if ${PORT_OPTIONS:MNGSPICE}
RUN_DEPENDS+=	ngspice:${PORTSDIR}/cad/ngspice_rework
.endif

.if ${PORT_OPTIONS:MGWAVE}
RUN_DEPENDS+=	gwave:${PORTSDIR}/cad/gwave
.endif

post-patch:
	@${REINPLACE_CMD} -e \
		's|:= -Ofast -pipe|+= -I.|g ; \
		 s|^INCLUDES |#INCLUDES |g ; \
		 s|$$(WXCFG)|$$(WX_CONFIG)|g ; \
		 s|$$(CC)|$$(CXX)|g' ${WRKSRC}/src/Makefile
	@${REINPLACE_CMD} -e \
		's|share/gspiceui|${DOCSDIR}|g' \
		${WRKSRC}/src/main/HelpTasks.cpp

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/gspiceui ${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/src/icons/gspiceui-48x48.xpm \
	    ${PREFIX}/share/pixmaps
	${INSTALL_MAN} ${WRKSRC}/gspiceui.1 ${MANPREFIX}/man/man1
.if ${PORT_OPTIONS:MDOCS}
	@${MKDIR} ${DOCSDIR}
.for dir in html
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${DOCSDIR} \
		"! -name Makefile")
.endfor
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
	@${MKDIR} ${EXAMPLESDIR}
.for dir in lib sch
	@(cd ${WRKSRC} && ${COPYTREE_SHARE} ${dir} ${EXAMPLESDIR} \
		"! -name Makefile")
.endfor
.endif

.include <bsd.port.mk>