7 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pcb/}
9 MAINTAINER= dmcmahill@NetBSD.org
10 HOMEPAGE= http://pcb.gpleda.org/
11 COMMENT= Printed circuit board layout system
14 PKG_INSTALLATION_TYPES= overwrite pkgviews
15 PKG_DESTDIR_SUPPORT= user-destdir
17 DEPENDS+= gettext-tools>=0.14.6:../../devel/gettext-tools
19 CONFLICTS+= pcb-current-[0-9]*
22 CONFIGURE_ENV+= WISH=${TOOLS_PATH.wish}
23 # work around a problem where the configure script uses
24 # AM_PROG_LEX and follows it with an AC_PATH_PROG to try
25 # and make sure that lex really does exist. Unfortunately
26 # that test is thrown off by pkgsrc giving a full path for LEX.
27 # so, bypass the test and put our desired result directly into the
28 # configure cache. Same for YACC.
29 CONFIGURE_ENV+= ac_cv_path_LEX_PATH=${TOOLS_PATH.lex}
30 CONFIGURE_ENV+= ac_cv_path_YACC_PATH=${TOOLS_PATH.bison}
31 CONFIGURE_ARGS+= --disable-update-desktop-database
32 CONFIGURE_ARGS+= --disable-update-mime-database
33 USE_TOOLS+= bison gm4:run gmake intltool lex wish:run pkg-config
36 LDFLAGS+= -lstdc++ # direct link as required by ld v2.22
40 PKG_OPTIONS_VAR= PKG_OPTIONS.pcb
41 PKG_SUPPORTED_OPTIONS= png
42 PKG_OPTIONS_REQUIRED_GROUPS= gui
43 PKG_OPTIONS_GROUP.gui= batch gtk motif
44 PKG_SUGGESTED_OPTIONS= gtk png
46 .include "../../mk/bsd.prefs.mk"
47 .include "../../mk/bsd.options.mk"
49 .if !empty(PKG_OPTIONS:Mmotif)
50 .include "../../mk/motif.buildlink3.mk"
51 CONFIGURE_ARGS+= --with-gui=lesstif
52 .elif !empty(PKG_OPTIONS:Mgtk)
53 .include "../../graphics/gtkglext/buildlink3.mk"
54 .include "../../graphics/glu/buildlink3.mk"
55 .include "../../x11/gtk2/buildlink3.mk"
56 CONFIGURE_ARGS+= --with-gui=gtk
57 .elif !empty(PKG_OPTIONS:Mbatch)
58 CONFIGURE_ARGS+= --with-gui=none
60 PKG_FAIL_REASON= Invalid options
63 # dbus is only needed if we are building a gui (lesstif/gtk)
64 .if empty(PKG_OPTIONS:Mbatch)
65 .include "../../sysutils/dbus/buildlink3.mk"
68 EXPORTERS= bom gerber ps
69 .if !empty(PKG_OPTIONS:Mpng)
71 .include "../../graphics/gd/buildlink3.mk"
74 CONFIGURE_ARGS+= --with-exporters=${EXPORTERS:Q}
77 ${CHMOD} -R go-w ${WRKSRC}
79 # remove some stuff that is either broken or unmaintained
80 # and would require another runtime depends
82 ${RM} ${DESTDIR}${PREFIX}/share/pcb/tools/PCB2HPGL
83 ${RM} ${DESTDIR}${PREFIX}/share/pcb/tools/tgo2pcb.tcl
85 .include "../../devel/gettext-lib/buildlink3.mk"
86 # NOTE: glib is needed by the core of pcb and not just the GTK gui.
87 .include "../../devel/glib2/buildlink3.mk"
88 .include "../../graphics/hicolor-icon-theme/buildlink3.mk"
89 .include "../../sysutils/desktop-file-utils/desktopdb.mk"
90 .include "../../mk/bsd.pkg.mk"