aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/diacanvas2/Makefile
blob: 9211f48655c9573bf0dbc886108e8dc3a50daa85 (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
# ex:ts=8
# Ports collection makefile for:    diacanvas2
# Date created:         Feb 9, 2003
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   diacanvas2
PORTVERSION=    0.13.1
CATEGORIES= graphics gnome
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= diacanvas

MAINTAINER= ports@FreeBSD.org
COMMENT=    A general drawing canvas from dia dialog editor

USE_GNOME=  gnomehack gnometarget pygnome2
USE_PYTHON= 2.2+
USE_REINPLACE=  yes
USE_GMAKE=  yes
USE_LIBTOOL_VER=    15
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"
INSTALLS_SHLIB= yes

.if !defined(DISPLAY)
BUILD_DEPENDS+= Xvfb:${X_VFBSERVER_PORT}
CONFIGURE_ENV+= DISPLAY=localhost:1001
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} >= 502126
BROKEN=     "Broken pkg-plist"
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        's|unit_tests doc|unit_tests|g' ${WRKSRC}/Makefile.in

pre-configure:
.if exists(${WRKDIR}/.Xvfb.pid)
    @-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
    @${RM} -f ${WRKDIR}/.Xvfb.pid
.endif
.if !defined(DISPLAY)
    #
    # This is a UGLY hack to not have to specify a X-Display.
    #
    ${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO} $$! > ${WRKDIR}/.Xvfb.pid
    @sleep 5
.endif

post-configure:
.if !defined(DISPLAY)
    @-${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
    @${RM} -f ${WRKDIR}/.Xvfb.pid
.endif

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/ref/html/*.html ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/ref/html/*.png ${DOCSDIR}
.endif

.include <bsd.port.post.mk>