Fixup fromcvs/togit conversion
[pkgsrcv2.git] / cad / pcb / Makefile
1 # $NetBSD$
2 #
3
4 DISTNAME=       pcb-20110918
5 PKGREVISION=    5
6 CATEGORIES=     cad
7 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=pcb/}
8
9 MAINTAINER=     dmcmahill@NetBSD.org
10 HOMEPAGE=       http://pcb.gpleda.org/
11 COMMENT=        Printed circuit board layout system
12 LICENSE=        gnu-gpl-v2
13
14 PKG_INSTALLATION_TYPES= overwrite pkgviews
15 PKG_DESTDIR_SUPPORT=    user-destdir
16
17 DEPENDS+=       gettext-tools>=0.14.6:../../devel/gettext-tools
18
19 CONFLICTS+=     pcb-current-[0-9]*
20
21 GNU_CONFIGURE=          yes
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
34 USE_PKGLOCALEDIR=       yes
35 INFO_FILES=             yes
36 LDFLAGS+=               -lstdc++  # direct link as required by ld v2.22
37
38 USE_LANGUAGES=          c c++
39
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
45
46 .include "../../mk/bsd.prefs.mk"
47 .include "../../mk/bsd.options.mk"
48
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
59 .else
60 PKG_FAIL_REASON=        Invalid options
61 .endif
62
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"
66 .endif
67
68 EXPORTERS=      bom gerber ps
69 .if !empty(PKG_OPTIONS:Mpng)
70 EXPORTERS+=     png
71 .include "../../graphics/gd/buildlink3.mk"
72 .endif
73
74 CONFIGURE_ARGS+=        --with-exporters=${EXPORTERS:Q}
75
76 post-extract:
77         ${CHMOD} -R go-w ${WRKSRC}
78
79 # remove some stuff that is either broken or unmaintained
80 # and would require another runtime depends
81 post-install:
82         ${RM} ${DESTDIR}${PREFIX}/share/pcb/tools/PCB2HPGL
83         ${RM} ${DESTDIR}${PREFIX}/share/pcb/tools/tgo2pcb.tcl
84
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"