summaryrefslogtreecommitdiff
path: root/graphics/py-photocollage/Makefile
blob: 4c1fa56c543b13b85ad314c037eed29d3562fcdc (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

PORTNAME=	photocollage
DISTVERSION=	1.4.4
PORTREVISION=	2
CATEGORIES=	graphics python
MASTER_SITES=	CHEESESHOP
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Graphical tool to make photo collage posters

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/LICENSE

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}cairo>0:graphics/py-cairo@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}six>:devel/py-six@${PY_FLAVOR} \
		${PY_PILLOW}

USES=		gettext-tools python:3.6+
USE_PYTHON=	autoplist concurrent distutils
NO_ARCH=	yes

post-patch:
	@${REINPLACE_CMD} -e ' \
		s|${PORTNAME}|${PORTNAME}-${PYTHON_VER}| ; \
		s|^Name.*|& (python${PYTHON_VER})|' \
		${WRKSRC}/data/${PORTNAME}.desktop
	@${REINPLACE_CMD} -E 's/photocollage\.(png|svg|desktop|appdata\.xml)/photocollage-${PYTHON_VER}.\1/' ${WRKSRC}/setup.py
	@${REINPLACE_CMD} -E 's/APP_NAME = "photocollage"/APP_NAME = "photocollage-${PYTHON_VER}"/' ${WRKSRC}/photocollage/__init__.py
	@cd ${WRKSRC} && for f in $$(${FIND} -E . -regex '.*\.(png|svg|desktop|appdata\.xml)'); do \
		${MV} $$f $$(${ECHO} $$f | ${SED} -E 's|photocollage\.([[:alpha:].]*)|photocollage-${PYTHON_VER}.\1|'); \
	done

.include <bsd.port.mk>