1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/print/py-pycups/Makefile
2021-10-25 23:57:35 +08:00

36 lines
933 B
Makefile

# Created by: Michael Johnson <ahze@FreeBSD.org>
PORTNAME= pycups
PORTVERSION= 2.0.1
CATEGORIES= print python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= CUPS bindings for Python
LICENSE= GPLv2 GPLv3
LICENSE_COMB= dual
LIB_DEPENDS= libcups.so:print/cups
USES= iconv localbase python:3.5+
USE_PYTHON= autoplist concurrent distutils
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|^\(VERSION=\).*$$|\1${PORTVERSION}|' ${WRKSRC}/Makefile
.if empty(ICONV_LIB)
@${REINPLACE_CMD} -e 's| or sys.platform.startswith("freebsd"):|:|' ${WRKSRC}/setup.py
.endif
pre-configure:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cupsconnection.c
@${REINPLACE_CMD} -e 's|#ifdef __SVR4|#ifdef __FreeBSD__|' ${WRKSRC}/cupsppd.c
post-install:
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
.include <bsd.port.post.mk>