update Sun Jun 13 18:37:00 PDT 2010
[pkgsrc.git] / graphics / xfig / Makefile
1 # $NetBSD: Makefile,v 1.62 2010/06/13 22:44:46 wiz Exp $
2
3 DISTNAME=       xfig.3.2.5b.full
4 PKGNAME=        xfig-3.2.5b
5 PKGREVISION=    7
6 CATEGORIES=     graphics
7 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=mcj/}
8
9 MAINTAINER=     pkgsrc-users@NetBSD.org
10 HOMEPAGE=       http://www.xfig.org/
11 COMMENT=        CAD-like 2D drawing tool, good for colorful scale drawings & ISOs
12
13 PKG_DESTDIR_SUPPORT=    user-destdir
14
15 DEPENDS+=       transfig>=3.2.4:../../print/transfig
16 # if we're using Xaw3d, then we need 1.5E or newer since using that
17 # version means we need a patch, which is currently used unconditionally
18 BUILDLINK_API_DEPENDS.Xaw3d+=   Xaw3d>=1.5E
19
20 WRKSRC=                 ${WRKDIR}/xfig.3.2.5b
21 USE_IMAKE=              YES
22 XAW_TYPE?=              3d
23
24 NO_INSTALL_MANPAGES=    YES     # install.all does install.man
25 INSTALL_TARGET=         install install.all
26 CFLAGS+=                -I${X11PREFIX}/include/X11
27
28 .include "../../mk/bsd.prefs.mk"
29
30 post-extract:
31         cd ${WRKSRC} && ${RM} -f Doc/*.orig Doc/*/*.orig Doc/*/*.save Doc/*/*/*.orig
32         find ${WRKSRC}/Libraries -type d -exec ${CHMOD} 0755 {} \;
33         find ${WRKSRC}/Libraries -type f -exec ${CHMOD} 0644 {} \;
34         find ${WRKSRC}/Doc -type d -exec ${CHMOD} 0755 {} \;
35         find ${WRKSRC}/Doc -type f -exec ${CHMOD} 0644 {} \;
36
37 SUBST_CLASSES+=         xaw
38 SUBST_STAGE.xaw=        post-patch
39 SUBST_MESSAGE.xaw=      Fixing Imakefile
40 SUBST_FILES.xaw=        Imakefile
41 .if defined(XAW_TYPE) && ${XAW_TYPE} == "3d"
42 # define XAW3D and XAW3D1_5E
43 SUBST_SED.xaw+=         -e 's/.*\(\#define.XAW3D\)/\1/'
44 .elif defined(XAW_TYPE) && ${XAW_TYPE} == "xpm"
45 #  define XAW3D, undef XAW3D1_5E
46 SUBST_SED.xaw+=         -e 's/.*\(\#define.XAW3D1_5E\)/XCOMM \1/'
47 SUBST_SED.xaw+=         -e t
48 SUBST_SED.xaw+=         -e 's/.*\(\#define.XAW3D\)/\1/'
49 .else
50 # undef XAW3D and XAW3D1_5E
51 SUBST_SED.xaw+=         -e 's/.*\(\#define.XAW3D\)/XCOMM \1/'
52 .endif
53
54 SUBST_CLASSES+=         i18n
55 SUBST_STAGE.i18n=       post-patch
56 SUBST_MESSAGE.i18n=     Enabling I18N
57 SUBST_FILES.i18n=       Imakefile
58 SUBST_SED.i18n+=        -e 's/XCOMM \(\#define I18N\)/\1/'
59
60 XFIGDOCDIR=             ${PREFIX}/share/doc/xfig
61
62 post-install:
63         ${INSTALL_DATA} ${WRKSRC}/Doc/FORMAT?.? ${DESTDIR}${XFIGDOCDIR}
64
65 .include "../../graphics/jpeg/buildlink3.mk"
66 .include "../../graphics/png/buildlink3.mk"
67 .include "../../x11/libXi/buildlink3.mk"
68 .include "../../x11/libXp/buildlink3.mk"
69 .include "../../x11/libXpm/buildlink3.mk"
70 .include "../../mk/xaw.buildlink3.mk"
71 .include "../../mk/bsd.pkg.mk"