summaryrefslogtreecommitdiff
path: root/graphics/py-sk1/Makefile
blob: 0b2b984da33d78c37dd45d775d6f233e451b306f (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
56
57
58
# $FreeBSD$

PORTNAME=	sk1
DISTVERSION=	g20171127
PORTREVISION=	4
CATEGORIES=	graphics python
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Professional quality illustration program

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	liblcms2.so:graphics/lcms2 \
		libMagickCore-6.so:graphics/ImageMagick6
BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cairo>0:graphics/py-cairo@${PY_FLAVOR}
RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cairo>0:graphics/py-cairo@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}pycups>0:print/py-pycups@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}reportlab>0:print/py-reportlab@${PY_FLAVOR}

USES=		desktop-file-utils python:2.7
USE_GITHUB=	yes
GH_ACCOUNT=	sk1project
GH_PROJECT=	sk1-wx
GH_TAGNAME=	2352d72
USE_PYTHON=	concurrent distutils
PYSETUP=	setup-sk1.py
PYDISTUTILS_INSTALLARGS=	--root=${STAGEDIR}
USE_GNOME=	cairo glib20 pango
USE_WX=		2.8+ # 2.8 or 3.0 (see the github page)
WX_COMPS=	python:lib

MAKE_ENV=	FREEBSD_PYTHON_VER=${PYTHON_VER}
_VER=		"2.0rc3"
PLIST_SUB=	VER="${_VER}"

post-patch:
	@${REINPLACE_CMD} -E " \
		s|/usr/|${LOCALBASE}/|g ; \
		s|%s-wx-%s' % \(NAME, VERSION\)|%s-wx-%s-%s' % (NAME, VERSION, os.environ['FREEBSD_PYTHON_VER'])| ; \
		s/sk1\.(desktop|png|xpm|svg)/sk1-${PYTHON_VER}.\1/g ; \
		s|\(install_path, \['GPLv3.txt', 'LICENSE', \]\),|| " \
		${WRKSRC}/setup-sk1.py
	@${REINPLACE_CMD} -e 's|/usr/|${LOCALBASE}/|' ${WRKSRC}/setup.cfg_*
	@${REINPLACE_CMD} -e ' \
		s|sk1|sk1-${PYTHON_VER}| ; \
		s|^Name.*|& (python${PYTHON_VER})|' \
		${WRKSRC}/src/sk1.desktop
.for ext in desktop png xpm svg
	@${MV} ${WRKSRC}/src/sk1.${ext} ${WRKSRC}/src/sk1-${PYTHON_VER}.${ext}
.endfor

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/sk1-wx-${_VER}-${PYTHON_VER}/uc2/*/_*.so

.include <bsd.port.mk>