summaryrefslogtreecommitdiff
path: root/cad/pcb/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'cad/pcb/Makefile')
-rw-r--r--cad/pcb/Makefile69
1 files changed, 38 insertions, 31 deletions
diff --git a/cad/pcb/Makefile b/cad/pcb/Makefile
index 284f3ae6d3f..e548539518f 100644
--- a/cad/pcb/Makefile
+++ b/cad/pcb/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2002/06/27 16:46:30 agc Exp $
+# $NetBSD: Makefile,v 1.15 2002/09/21 06:49:25 jlam Exp $
# FreeBSD Id: Makefile,v 1.19 1998/10/31 18:05:31 jseger Exp
#
@@ -17,46 +17,53 @@ COMMENT= X11 interactive printed circuit board layout system
DEPENDS+= m4-1.4:../../devel/m4
+USE_BUILDLINK2= yes
USE_IMAKE= yes
-INFO_FILES= pcb.info
+PKG_SYSCONFSUBDIR= pcb
+DOCDIR= ${PREFIX}/share/doc/pcb
+EGDIR= ${PREFIX}/share/examples/pcb
+INFODIR= ${PREFIX}/info
+M4DIR= ${PREFIX}/lib/x11/pcb/m4
-DEINSTALL_FILE= ${WRKDIR}/DEINSTALL
+INFO_FILES= pcb.info
+CONF_FILES= ${EGDIR}/local.inc ${PKG_SYSCONFDIR}/local.inc
-PCB_CONFDIR= ${PKG_SYSCONFDIR}/pcb
-MESSAGE_SUBST+= PCB_CONFDIR=${PCB_CONFDIR}
# avoid picking up any user config files during the build
MAKE_ENV+= HOME=${WRKSRC}
post-patch:
- ${MV} -f ${WRKSRC}/config.h ${WRKSRC}/config.h.bak
- ${SED} 's;@pkg_sysconfdir@;${PCB_CONFDIR};g' ${WRKSRC}/config.h.bak > ${WRKSRC}/config.h
-
-pre-install:
- ${SED} 's;@pkg_sysconfdir@;${PKG_SYSCONFDIR};g' ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ for file in ${WRKSRC}/config.h; do \
+ ${SED} -e "s|@sysconfdir@|${PKG_SYSCONFDIR}|g" \
+ $${file} > $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
post-install:
- ${INSTALL_MAN_DIR} ${PREFIX}/share/doc/pcb/
- ${INSTALL_MAN} ${WRKSRC}/doc/index.html ${PREFIX}/share/doc/pcb/
- ${INSTALL_MAN} ${WRKSRC}/doc/pcb.html ${PREFIX}/share/doc/pcb/
- ${INSTALL_MAN} ${WRKSRC}/doc/pcb.info ${PREFIX}/info/
- ${INSTALL_MAN} ${WRKSRC}/doc/pcb.ps ${PREFIX}/share/doc/pcb/
- ${INSTALL_MAN} ${WRKSRC}/doc/refcard.ps ${PREFIX}/share/doc/pcb/
- ${INSTALL_DATA_DIR} ${PCB_CONFDIR}
- if [ ! -f "${PCB_CONFDIR}/local.inc" ]; then \
- ${ECHO} "# list your local includes here" > ${PCB_CONFDIR}/local.inc ; \
- fi
- ${MV} -f ${X11PREFIX}/lib/X11/pcb/m4/common.m4 ${X11PREFIX}/lib/X11/pcb/m4/common.m4.bak
- ${AWK} '/^divert\(0\)dnl/ { \
- printf("include(${PCB_CONFDIR}/local.inc)\n"); \
- printf("sinclude(site-config.inc)\n"); \
- printf("sinclude(user-config.inc)\n"); \
- printf("sinclude(proj-config.inc)\n"); \
- } \
- {gsub(/^include\(/,"include(${X11PREFIX}/lib/X11/pcb/m4/"); print } ' \
- ${X11PREFIX}/lib/X11/pcb/m4/common.m4.bak > ${X11PREFIX}/lib/X11/pcb/m4/common.m4
- ${RM} -f ${X11PREFIX}/lib/X11/pcb/m4/common.m4.bak
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/index.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/pcb.html ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/pcb.info ${INFODIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/pcb.ps ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/doc/refcard.ps ${DOCDIR}
+ for file in ${M4DIR}/common.m4; do \
+ ${AWK} ' \
+ /^divert\(0\)dnl/ { \
+ printf("include(${PKG_SYSCONFDIR}/local.inc)\n"); \
+ printf("sinclude(site-config.inc)\n"); \
+ printf("sinclude(user-config.inc)\n"); \
+ printf("sinclude(proj-config.inc)\n"); \
+ } \
+ {
+ gsub(/^include\(/,"include(${M4DIR}/"); \
+ print; \
+ }' \
+ $${file} > $${file}.fixed; \
+ ${MV} -f $${file}.fixed $${file}; \
+ done
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${ECHO} "# list your local includes here" > ${EGDIR}/local.inc
.include "../../mk/texinfo.mk"
-.include "../../mk/x11.buildlink.mk"
+.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"