summaryrefslogtreecommitdiff
path: root/x11/py-qt3-sip/Makefile
blob: 3d09b0646121febf7cf11d4590c5fbbd62406bde (plain)
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
# $NetBSD: Makefile,v 1.5 2003/08/25 17:31:45 recht Exp $
#

DISTNAME=	sip-x11-gpl-3.8
PKGNAME=	${PYPKGPREFIX}-qt3-sip-3.8
CATEGORIES=	x11 devel
MASTER_SITES=	http://www.river-bank.demon.co.uk/download/sip/

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.riverbankcomputing.co.uk/sip/index.php
COMMENT=	Tool to create Python bindings for C++ libraries

CONFLICTS+=	${PYPKGPREFIX}-qt2-sip-*

# needs qmake
BUILD_DEPENDS+=		qt3-tools-3.*:../../x11/qt3-tools

USE_BUILDLINK2= 	# defined
USE_X11=		# defined
USE_LIBTOOL=		# defined
USE_GMAKE=	yes

CONFIGURE_ARGS=		-q ${QTDIR} -m ${GMAKE}

PYQT_TMPDIR=		${WRKDIR}/pyqt_tmp
CONFIGURE_ARGS+=	-d ${PYQT_TMPDIR}
CONFIGURE_ARGS+=	-b ${PYQT_TMPDIR}

PYTHON_VERSIONS_ACCEPTED=	22pth 23pth 21pth
PY_PATCHPLIST=	yes
QTLIBDIR=	${QTDIR:S/${BUILDLINK_PREFIX.qt3-libs}\///}/lib
PLIST_SUBST+=	PYVERSSUFFIX=${PYVERSSUFFIX} QTLIBDIR=${QTLIBDIR}

MAKE_ENV+=	QTPREFIX=${QTDIR}

do-configure:
	${MKDIR} -p ${PYQT_TMPDIR}
	(cd ${WRKSRC} && ${PYTHONBIN} build.py ${CONFIGURE_ARGS})

# XXX - hack. Shouldn't need the symlinks as qmake should let us build
# proper libraries that install outside of QTDIR more easily.
post-install:
	(cd ${PYQT_TMPDIR} && ${INSTALL_PROGRAM} sip \
		${PREFIX}/bin/sip${PYVERSSUFFIX})
	(cd ${PYQT_TMPDIR} && ${LIBTOOL} ${INSTALL_DATA} \
		libsip.la ${PREFIX}/${PYSITELIB})
	(cd ${PREFIX}/${PYSITELIB}; for i in libsip.*; do \
		${LN} -sf ${PREFIX}/${PYSITELIB}/$$i \
			${PREFIX}/${QTLIBDIR}/$$i; done)

.include "../../lang/python/extension.mk"
.include "../../lang/python/application.mk"
.include "../../x11/qt3-libs/buildlink2.mk"

.include "../../mk/bsd.pkg.mk"