summaryrefslogtreecommitdiff
path: root/devel/eric6/Makefile
blob: 18f55ac2d37ff08aab54d57bd401f7a49da779d7 (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
# Created by: Boris Samorodov <bsam@FreeBSD.org>
# $FreeBSD$

PKGNAMESUFFIX=	-qt5-${FLAVOR:U:S/_/-/}
DISTNAME=	${PORTNAME}-nolang-${DISTVERSION}
CATEGORIES=	devel python

# Note to MAINTAINER: this should be converted to USES=pyqt, USE_PYQT=[...]
BUILD_DEPENDS+=	${PYQT_PY_RELNAME}-chart>=${PYQT_VERSION}:x11-toolkits/py-qt5-chart@${PY_FLAVOR}
RUN_DEPENDS+=	${PYQT_PY_RELNAME}-chart>=${PYQT_VERSION}:x11-toolkits/py-qt5-chart@${PY_FLAVOR}
RUN_DEPENDS+=	${PYTHON_LIBDIR}/lib-dynload/_sqlite3.so:databases/py-sqlite3@${PY_FLAVOR}

CONFLICTS_INSTALL=	${FLAVORS:N${FLAVOR}:C/^/${PORTNAME}${PKGNAMESUFFIX}-/:C/$/-[0-9]*/}

USES+=		desktop-file-utils python:3.5+ pyqt:5 shebangfix
USE_PYTHON=	flavors
USE_PYQT=	core gui qscintilla2 webengine \
		help_run network_run svg_run sql_run
INSTALL_PY=	install.py -c -f eric6config.freebsd -i ${STAGEDIR}
SHEBANG_FILES=	*.py eric/eric6/*.py eric/scripts/*.py
SUB_FILES=	eric6.desktop
MASTERPORT=	yes

PORTDATA=	*
PORTDOCS=	*
PORTEXAMPLES=	*

OPTIONS_DEFINE=	DOCS EXAMPLES

.include "${.CURDIR}/bsd.eric6.mk"
.include <bsd.port.options.mk>

post-patch:
	${RM} ${WRKSRC}/eric/i18n/*.qm ${WRKSRC}/eric/i18n/*.ts

do-configure:
	${SED}  -e 's,PYTHON_SITELIBDIR,${PYTHON_SITELIBDIR},' \
		-e 's,PREFIX,${PREFIX},' \
		-e 's,DATADIR,${DATADIR},' \
		-e 's,LOCALBASE,${LOCALBASE},' \
		-e 's,DOCSDIR,${DOCSDIR},' \
		-e 's,EXAMPLESDIR,${EXAMPLESDIR},' \
		< ${FILESDIR}/config > ${WRKSRC}/eric6config.freebsd

do-install:
	@(cd ${WRKSRC}; \
	${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${INSTALL_PY})

post-install:
	${INSTALL_DATA} ${WRKDIR}/eric6.desktop ${STAGEDIR}${PREFIX}/share/applications/
	${LN} -sf ${DATADIR:C|${PREFIX}(/share(/pixmaps)?)?||:C|/[^/]+|../|g}eric6/icons/default/eric.png \
		${STAGEDIR}${PREFIX}/share/pixmaps/eric6.png
	@${MKDIR} ${STAGEDIR}${DATADIR}/i18n

.include <bsd.port.mk>