summaryrefslogtreecommitdiff
path: root/cad/electric/Makefile
blob: c6c10ddcb45e3369433b9e6745ad9ff9668dbfa4 (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
# New ports collection makefile for:	electric
# Date created:		4 May 2000
# Whom:			Mario S F Ferreira <lioux@linf.unb.br> et al.
#
# $FreeBSD$
#

PORTNAME=	electric
PORTVERSION=	7.0.0
PORTREVISION=	4
CATEGORIES=	cad
MASTER_SITES=	${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR=	${PORTNAME}
DISTNAME=	${PORTNAME}-${PORTVERSION:C/^(...)\./\1/}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A sophisticated electrical CAD system

GNU_CONFIGURE=	yes

OPTIONS_DEFINE=	QT3 T1LIB NLS OPTIMIZED_CFLAGS
OPTIONS_DEFAULT=	T1LIB
QT3_DESC=	Use QT gui (instead of Motif)
T1LIB_DESC=	Use T1lib Type1 font library

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MQT3}
LIB_DEPENDS+=	qt-mt:${PORTSDIR}/x11-toolkits/qt33
FEATURES+=	QT
.else
USE_MOTIF=	yes
FEATURES+=	MOTIF
.endif

.if ${PORT_OPTIONS:MT1LIB}
LIB_DEPENDS+=	t1.5:${PORTSDIR}/devel/t1lib
FEATURES+=	T1LIB
.endif

.if ${PORT_OPTIONS:MNLS}
USES+=		gettext
FEATURES+=	INT
.endif

.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
FEATURES+=	OPT
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|/usr/share/electric/lib/|${DATADIR}/lib/|; \
		s|/usr/share/electric/doc/|${DOCSDIR}/|; \
		s|/usr/bin/|${LOCALBASE}/bin/|; \
		s|${LOCALBASE}/bin/sort|${SORT}|' \
		${WRKSRC}/src/include/config.h
	@${REINPLACE_CMD} -e 's|/usr/share/electric/lib|${DATADIR}/lib|; \
		s|/usr/share/electric/doc|${DOCSDIR}|; \
		s|%%LOCALBASE%%|${LOCALBASE}|g' \
		${WRKSRC}/Makefile.in
	@${REINPLACE_CMD} -e 's|/usr/X11R6/|${LOCALBASE}/|' ${WRKSRC}/configure
.for FEATURE in ${FEATURES}
	@${REINPLACE_CMD} -e 's|#%%${FEATURE}%%||g' ${WRKSRC}/Makefile.in
.endfor

post-install:
	${STRIP_CMD} ${PREFIX}/bin/electric

.include <bsd.port.mk>