aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/py-kde/Makefile
blob: d6bcc1040e3cc13cb46a013b64b7c4b4c71c4e85 (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
# New ports collection makefile for:    PyKDE
# Date created:     Sun Oct 17 00:24:28 PDT 1999
# Whom:         adsharma@sharmas.dhs.org
#
# $FreeBSD$
#

PORTNAME=   kde
PORTVERSION=    3.11.3
PORTREVISION=   2
CATEGORIES= x11-toolkits kde python
MASTER_SITES=   http://www.river-bank.demon.co.uk/download/PyKDE2/
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   PyKDE-${PORTVERSION}

MAINTAINER= danny@ricin.com
COMMENT=    Python Bindings for KDE3

BUILD_DEPENDS=  pyuic:${PORTSDIR}/x11-toolkits/py-qt
RUN_DEPENDS=    ${BUILD_DEPENDS}

USE_PYTHON= yes
USE_KDELIBS_VER=3
USE_REINPLACE=  yes

PYQTVERSION=    3.13
EXAMPLESDIR=    ${PREFIX}/share/examples/${PKGBASE}

NO_FILTER_SHLIBS=   yes

MODULES=    kdecore kdefx kdeui kio kfile kparts kspell kdeprint kmdi

.include <bsd.port.pre.mk>

post-patch:
    @${REINPLACE_CMD} -e 's#/usr/bin/python#${PYTHON_CMD}#' ${WRKSRC}/postproc
    @( cd ${WRKSRC} && \
        ver=`${ECHO} ${KDE_VERSION} | ${SED} -e 's/\.//g'` && \
        if [ "$${ver}" -gt "330" ]; then \
            ( ${MV} extra/kde330 extra/kde$${ver} && \
            for i in ${MODULES}; do \
                ${MV} sip/$${i}/$${i}-kde330.diff \
                    sip/$${i}/$${i}-kde$${ver}.diff; \
            done ) \
        fi )

do-configure:
    @( cd ${WRKSRC} && ${PYTHON_CMD} configure.py -c \
        -k ${LOCALBASE} \
        -v ${PREFIX}/share/sip \
        -d ${PYTHONPREFIX_SITELIBDIR} )

pre-install:
    @${REINPLACE_CMD} -e "s,${SETENV} python,${PYTHON_CMD}," \
        ${WRKSRC}/contrib/kdepyuic

post-install:
.if !defined(NOPORTDOCS)
    @${MKDIR} ${EXAMPLESDIR}
    @( cd ${WRKSRC}/examples && ${TAR} -cf - . ) | \
        ( cd ${EXAMPLESDIR} && ${TAR} -xf - )
    @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${EXAMPLESDIR}
    @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${EXAMPLESDIR}
    @${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif
    @${INSTALL_SCRIPT} ${WRKSRC}/contrib/kdepyuic ${PREFIX}/bin
    @${PYTHON_CMD} -c "import pykdeconfig, dcopexport"
    @${PYTHON_CMD} -O -c "import pykdeconfig, dcopexport"

.include <bsd.port.post.mk>