summaryrefslogtreecommitdiffstats
path: root/x11-toolkits/py-gnome-extras/Makefile
blob: 0bbc351d8665ee0cb73287d09332ca7f87c3fef0 (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
94
95
96
97
98
99
100
101
102
103
104
105
# New ports collection makefile for:    py-gnome-extras
# Date created:             22 November 2005
# Whom:                 Koop Mast <kwm@FreeBSD.org>
#
# $FreeBSD$
#   $MCom: ports/x11-toolkits/py-gnome-extras/Makefile,v 1.16 2005/07/17 12:45:16 kwm Exp $
#

PORTNAME=   gnome
PORTVERSION=    2.11.3
CATEGORIES= x11-toolkits python gnome
MASTER_SITES=   ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-python-extras/${PORTVERSION:C/..$//}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX=  -extras
DISTNAME=   gnome-python-extras-${PORTVERSION}
DIST_SUBDIR=    gnome2

MAINTAINER= gnome@FreeBSD.org
COMMENT=    A set of Python bindings for GNOME 2

BUILD_DEPENDS=  ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA}
LIB_DEPENDS=    gtkspell.0:${PORTSDIR}/textproc/gtkspell2 \
        gtop-2.0.2:${PORTSDIR}/devel/libgtop2 \
        totem-plparser.1:${PORTSDIR}/multimedia/totem-gstreamer \
        gksu1.2.0:${PORTSDIR}/sysutils/libgksu \
        gksuui1.0.0:${PORTSDIR}/sysutils/libgksuui
RUN_DEPENDS=    ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA}

MOZILLA=    firefox
HEADERS_SUFX=
MOZ_BUILD=  firefox

.if !defined(WITH_MOZILLA)
MOZILLA=    firefox
.else
.if ${WITH_MOZILLA}=="mozilla"
MOZILLA=    mozilla
MOZ_BUILD=  mozilla
.else
.if ${WITH_MOZILLA}=="mozilla-devel" || ${WITH_MOZILLA}=="mozilla-devel-gtk2"
MOZILLA=    mozilla-devel
HEADERS_SUFX=   -devel
MOZ_BUILD=  mozilla
.else
MOZILLA=    firefox
HEADERS_SUFX=
.endif
.endif
.endif

USE_BZIP2=  yes
USE_GMAKE=  yes
USE_PYTHON= yes
USE_GNOME=  gnomehack libgnomeprintui libgtkhtml gnomepanel \
        gtksourceview libwnck nautiluscdburner pygnome2 libgda2
USE_AUTOTOOLS=  libtool:15
CONFIGURE_ARGS= --with-gtkmozembed=${MOZ_BUILD}
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib"

EG_SRC_DIR= ${WRKSRC}/examples
EG_DST_DIR= ${PREFIX}/share/examples/py-gnome
.if !defined(NOPORTDOCS)
DOCSDIR=    ${PREFIX}/share/doc/py-gnome-extras
.else
DOCSDIR=    ${WRKSRC}/share/doc/py-gnome-extras
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
.if ${MOZILLA}=="mozilla-devel"
USE_GCC=    3.4
.endif
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|mozilla-gtkmozembed|${MOZ_BUILD}-gtkmozembed${HEADERS_SUFX}|g ; \
        s|mozilla-xpcom|${MOZ_BUILD}-xpcom${HEADERS_SUFX}|g ; \
        s|$$MOZILLA-gtkmozembed|$$MOZILLA-gtkmozembed${HEADERS_SUFX}|g ; \
        s|$$MOZILLA-xpcom|$$MOZILLA-xpcom${HEADERS_SUFX}|g' \
        ${WRKSRC}/configure
    @${FIND} ${WRKSRC}/docs -name Makefile.in | ${XARGS} ${REINPLACE_CMD} \
        -e 's|^HTML_DIR =.*|HTML_DIR = ${DOCSDIR}|g'
    @${REINPLACE_CMD} -e 's|-DHAVE_GNOMEPRINT28||g' \
        ${WRKSRC}/configure

.if !defined(NOPORTDOCS)
post-install:
    ${MKDIR} ${EG_DST_DIR}
    ${TAR} -C ${EG_SRC_DIR} -cf - . | ${TAR} -C ${EG_DST_DIR} -xf -
    ${CHOWN} -R ${BINOWN}:${BINGRP} ${EG_DST_DIR}
.endif

pre-everything::
    @${ECHO_MSG} ""
    @${ECHO_MSG} " By default py-gnome-extras uses www/mozilla for html rendering, but you can"
    @${ECHO_MSG} " change this by defining WITH_MOZILLA to one of the following values:"
    @${ECHO_MSG}
    @${ECHO_MSG} "  firefox       "
    @${ECHO_MSG} "  mozilla-devel "
    @${ECHO_MSG} ""

.include <bsd.port.post.mk>