aboutsummaryrefslogtreecommitdiffstats
path: root/news/pyne/Makefile
blob: 7784f289db6c717e384645e4c0c06289476e148a (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
# ex:ts=8
# New ports collection makefile for:    pyne
# Date created:         Dec 10, 2001
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   pyne
PORTVERSION=    1.0.1
PORTREVISION=   1
CATEGORIES= news python mail
MASTER_SITES=   http://www.soul-less.pwp.blueyonder.co.uk/pyne/

MAINTAINER= ports@FreeBSD.org
COMMENT=    An X11 offline Newsreader/Emailer

BUILD_DEPENDS=  pygtk-codegen-2.0:${PORTSDIR}/x11-toolkits/py-gtk2
RUN_DEPENDS=    ${BUILD_DEPENDS}

# ugly hack imported from openoffice.
.if !defined(DISPLAY)
BUILD_DEPENDS+= Xvfb:${X_VFBSERVER_PORT}
DISPLAYHACK=    localhost:1001
.endif

USE_REINPLACE=      yes
USE_PYTHON=     yes
GNU_CONFIGURE=      yes
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
MAKE_ENV=       PYTHON_SITELIBDIR="${PYTHON_SITELIBDIR}"
ALL_TARGET=     default

pre-configure:
    @${REINPLACE_CMD} -e "s@[(]PREFIX[)]\/lib@(PYTHON_SITELIBDIR)@g" ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} -e "s@pybins=\(.*\)@pybins=\${PYTHON_VERSION}@" ${WRKSRC}/configure

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

    ${X11BASE}/bin/Xvfb :1001 -screen 0 800x600x24 > /dev/null 2>&1 & ${ECHO_CMD} $$! > \
        ${WRKDIR}/.Xvfb.pid
    @${REINPLACE_CMD} -e "s@--compile@--compile --display ${DISPLAYHACK}@" \
        ${WRKSRC}/Makefile
.endif

post-install:
.if !defined(DISPLAY)
    @${CAT} ${WRKDIR}/.Xvfb.pid | ${XARGS} kill
    @${RM} ${WRKDIR}/.Xvfb.pid
.endif
    @${STRIP_CMD} ${PREFIX}/bin/yencdec

.include <bsd.port.mk>