aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/dia/Makefile
blob: 8ea13df76cd9bc8f68b7fbfce697c87201cc2257 (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
# New ports collection makefile for:    dia
# Date created:        21 December 1999
# Whom:                saper@system.pl
#
# $FreeBSD$
#

PORTNAME=   dia
PORTVERSION=    0.86
CATEGORIES= graphics gnome
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= stable/sources/dia

MAINTAINER= saper@system.pl

LIB_DEPENDS=    gnome.4:${PORTSDIR}/x11/gnomelibs \
        gtk12.2:${PORTSDIR}/x11-toolkits/gtk12  \
        xml.5:${PORTSDIR}/textproc/libxml   \
        gdk_imlib.5:${PORTSDIR}/graphics/imlib \
        popt.0:${PORTSDIR}/devel/popt
RUN_DEPENDS=    panel:${PORTSDIR}/x11/gnomecore

GLIB_CONFIG?=   ${LOCALBASE}/bin/glib12-config
GTK_CONFIG?=    ${X11BASE}/bin/gtk12-config

USE_X_PREFIX=   yes
USE_LIBTOOL=    yes
USE_GMAKE=  yes

CONFIGURE_ARGS= --localstatedir=${PREFIX}/share/gnome \
        --datadir=${PREFIX}/share/gnome \
        --enable-gnome
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        GTK_CONFIG="${GTK_CONFIG}" \
        GLIB_CONFIG="${GLIB_CONFIG}" \
        LDFLAGS="-L${LOCALBASE}/lib"

MAN1=       dia.1

pre-patch:
    @${PERL} -pi -e 's|-lpthread|-pthread|g ; \
         s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
    @find ${WRKSRC} -name "Makefile.in" | xargs ${PERL} -pi -e \
        's|\$\(datadir\)/gnome/|\$\(datadir\)/|g ; \
         s|\$\(datadir\)/locale|\$\(prefix\)/share/locale|g'

post-install:
    ${SED} "s|%%PREFIX%%|${PREFIX}|g" ${FILESDIR}/dia.sh > ${WRKDIR}/dia.sh
    ${INSTALL_SCRIPT} ${WRKDIR}/dia.sh ${PREFIX}/bin/dia

.include <bsd.port.mk>