aboutsummaryrefslogtreecommitdiffstats
path: root/comms/gfax/Makefile
blob: dd49cac99c35c4e65226fbac5f8b9e909cd1cfcd (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
# New ports collection makefile for:    gfax
# Date created:         20 January 2002
# Whom:             John Merryweather Cooper <jmcoopr@webmail.bmi.net>
#
# $FreeBSD$
#

PORTNAME=   gfax
PORTVERSION=    0.4.2
CATEGORIES= comms print
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/${PORTNAME}/0.4
DIST_SUBDIR=    gnome

MAINTAINER= coop9211@uidaho.edu

BUILD_DEPENDS=  ${LOCALBASE}/share/automake/install-sh:${PORTSDIR}/devel/automake \
        ${LOCALBASE}/bin/sendfax:${PORTSDIR}/comms/hylafax
RUN_DEPENDS=    ${LOCALBASE}/bin/sendfax:${PORTSDIR}/comms/hylafax

USE_GMAKE=  yes
USE_X_PREFIX=   yes
USE_GNOMENG=    yes
USE_REINPLACE=  yes
USE_GNOME=  gnomeprefix gnomehack libpanel libcapplet libglade
GNU_CONFIGURE=  yes

CONFIGURE_ENV=  CPPFLAGS="${PTHREAD_CFLAGS}"

post-extract:
    @${LN} -sf ${LOCALBASE}/share/automake/install-sh ${WRKSRC}/install-sh
    @${LN} -sf ${LOCALBASE}/share/automake/missing ${WRKSRC}/missing
    @${LN} -sf ${LOCALBASE}/share/automake/mkinstalldirs ${WRKSRC}/mkinstalldirs

post-patch:
    @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
         s|DATADIRNAME=lib|DATADIRNAME=share|g' \
            ${WRKSRC}/configure
    @find ${WRKSRC} -name "Makefile.in*" | ${XARGS} ${REINPLACE_CMD} -e \
         's|[(]gnomedatadir[)]/gnome|(gnomedatadir)|g'

pre-install:
    @${MV} ${WRKSRC}/gfax.install-lpr ${WRKSRC}/gfax.install-lpr.orig
    @${SED} \
        -e 's#%%PREFIX%%#${PREFIX}/#' \
        ${WRKSRC}/gfax.install-lpr.orig > ${WRKSRC}/gfax.install-lpr
    @${MV} ${WRKSRC}/lpr.gfax ${WRKSRC}/lpr.gfax.orig
    @${SED} \
        -e 's#%%PREFIX%%#${PREFIX}/#' \
        ${WRKSRC}/lpr.gfax.orig > ${WRKSRC}/lpr.gfax

post-install:
    @${SH} ${PREFIX}/bin/gfax.install-lpr

.include <bsd.port.mk>