summaryrefslogtreecommitdiff
path: root/cad/magic/Makefile
blob: e67619c7a1d825dbc4ff9a37c4f3b0ef243763f0 (plain)
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
# $NetBSD: Makefile,v 1.21 2009/06/30 00:07:11 joerg Exp $
#

DISTNAME=	magic-7.1
PKGREVISION=	5
CATEGORIES=	cad
MASTER_SITES=	http://vlsi.cornell.edu/magic/

MAINTAINER=	dmcmahill@NetBSD.org
HOMEPAGE=	http://vlsi.cornell.edu/magic/
COMMENT=	Integrated circuit layout system

MAKE_JOBS_SAFE=		no

USE_TOOLS+=	gmake printf
USE_GNU_READLINE=	# uses rl_*_completion_function
MAKE_ENV+=	MAGIC_HOME=${PREFIX:Q}
MAKE_FLAGS+=	MANDIR=${PREFIX}/${PKGMANDIR}

.include "../../mk/endian.mk"
.if ${MACHINE_ENDIAN} == "big"
CPPFLAGS+=	-DIS_BIG_ENDIAN
.else
CPPFLAGS+=	-DIS_LITTLE_ENDIAN
.endif

USE_TOOLS+=		awk:run
REPLACE_INTERPRETER+=	awk
REPLACE.awk.old=	/bin/awk
REPLACE.awk.new=	${TOOLS_PATH.awk}
REPLACE_FILES.awk=	ext2spice/spice2sim

post-patch:
	cd ${WRKSRC} && for f in `${FIND} . -type f -exec ${GREP} -l CAD_HOME {} /dev/null \\;` ; do \
		${ECHO} "Replacing CAD_HOME in $$f" ; \
		${MV} -f $$f $$f.bak ; ${SED} 's;CAD_HOME;MAGIC_HOME;g' $$f.bak > $$f ; \
		${RM} $$f.bak ; \
		done
	${CHMOD} 755 ${WRKSRC}/scripts/config

do-configure:
	cd ${WRKSRC} && ${PRINTF} '1\n2\n6\n\n\n\n\n\n\n\n\n\n\n' | \
		${SETENV} ${MAKE_ENV} ./scripts/config

.include "../../devel/readline/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"