aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/dia/Makefile
blob: 71cac3999481d9e4b341b95ce26441fe663b8c0c (plain) (blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# New ports collection makefile for:    dia
# Date created:        21 December 1999
# Whom:                saper@system.pl
#
# $FreeBSD$
#   $MCom: ports/graphics/dia/Makefile,v 1.16 2007/10/11 02:49:12 mezz Exp $
#

PORTNAME=   dia
DISTVERSION=    0.97.1
PORTREVISION=   2
PORTEPOCH=  1
CATEGORIES= graphics gnome
MASTER_SITES=   GNOME
DIST_SUBDIR=    gnome2

MAINTAINER?=    gnome@FreeBSD.org
COMMENT=    Diagram creation program, similar to Visio

BUILD_DEPENDS=  ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:${PORTSDIR}/textproc/docbook-xsl
LIB_DEPENDS=    popt.0:${PORTSDIR}/devel/popt

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_GNOME=  gtk20 gnomehack gnomeprefix libxslt libartlgpl2 intlhack \
        desktopfileutils
WANT_GNOME= yes
INSTALLS_ICONS= yes
USE_GETTEXT=    yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LIBS="-L${LOCALBASE}/lib -lintl" \
        LOCALBASE="${LOCALBASE}"

MAN1=       dia.1
MANLANG=    "" fr

.if !defined(WITHOUT_PYTHON)
USE_PYTHON= yes
USE_GNOME+= pygtk2
CONFIGURE_ARGS= --with-python
PLIST_SUB+= PYTHON=""
.else
PLIST_SUB+= PYTHON="@comment "
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "i386"
LIB_DEPENDS+=       EMF.1:${PORTSDIR}/graphics/libemf
CONFIGURE_ARGS+=    --enable-libemf
PLIST_SUB+=     WMF=""
.else
CONFIGURE_ARGS+=    --disable-libemf
PLIST_SUB+=     WMF="@comment "
.endif

.if ${HAVE_GNOME:Mlibgnomeui}!=""
USE_GNOME+=     libgnomeui
INSTALLS_OMF=       yes
CONFIGURE_ARGS+=    --enable-gnome
PKGNAMESUFFIX=      -gnome
GNOME_ENABLED=      yes
PLIST_SUB+=     GNOME=""
.else
CONFIGURE_ARGS+=    --disable-gnome
PLIST_SUB+=     GNOME="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \
        ${WRKSRC}/lib/intl.c
.if defined(NOPORTDOCS)
    @${FIND} ${WRKSRC}/doc -name Makefile.in | ${XARGS} ${REINPLACE_CMD} -e \
        's|$$(examples)||g ; s|$$(mkinstalldirs) $$(sysdoc)/examples||g ; \
        s|$$(mkinstalldirs) $$(sysdoc)||g'
.endif
.ifndef (GNOME_ENABLED)
    @${FIND} ${WRKSRC} -name Makefile.in | \
        ${XARGS} ${REINPLACE_CMD} -e \
        's,\(^GTK_LIBS.*\),\1 ${PTHREAD_LIBS}, ; \
         s,\(^GTK_CFLAGS = \),\1 ${PTHREAD_CFLAGS} ,'
.endif

pre-configure:
    @${REINPLACE_CMD} -e 's|http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl|${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl| ; \
        s|echo aout|echo elf|g ; s|/usr/include/libEMF|${LOCALBASE}/include/libEMF|g' \
        ${WRKSRC}/configure

post-install:
    @-update-desktop-database

.include <bsd.port.post.mk>