pkgsrc/graphics/py-qrcode/Makefile
wiz 67e1f1a6bf python: egg.mk: add USE_PKG_RESOURCES flag
This flag should be set for packages that import pkg_resources
and thus need setuptools after the build step.

Set this flag for packages that need it and bump PKGREVISION.
2022-01-05 15:40:56 +00:00

40 lines
1.2 KiB
Makefile

# $NetBSD: Makefile,v 1.17 2022/01/05 15:41:12 wiz Exp $
DISTNAME= qrcode-6.1
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
PKGREVISION= 2
CATEGORIES= graphics python
MASTER_SITES= ${MASTER_SITE_PYPI:=q/qrcode/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://pypi.python.org/pypi/qrcode
COMMENT= Python QR Code image generator
LICENSE= modified-bsd
DEPENDS+= ${PYPKGPREFIX}-lxml-[0-9]*:../../textproc/py-lxml
DEPENDS+= ${PYPKGPREFIX}-six-[0-9]*:../../lang/py-six
PYTHON_VERSIONED_DEPENDENCIES= Pillow
USE_PKG_RESOURCES= yes
USE_LANGUAGES= # none
REPLACE_PYTHON+= qrcode/console_scripts.py
SUBST_CLASSES+= pkgmandir
SUBST_FILES.pkgmandir= setup.py
SUBST_MESSAGE.pkgmandir= Fixing PKGMANDIR path.
SUBST_SED.pkgmandir= -e "s|share/man|${PKGMANDIR}|1"
SUBST_STAGE.pkgmandir= pre-configure
post-install:
${MV} ${DESTDIR}${PREFIX}/bin/qr \
${DESTDIR}${PREFIX}/bin/qr-${PYVERSSUFFIX} || ${TRUE}
${MV} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/qr.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/qr-${PYVERSSUFFIX}.1 || ${TRUE}
.include "../../lang/python/application.mk"
.include "../../lang/python/egg.mk"
.include "../../lang/python/versioned_dependencies.mk"
.include "../../mk/bsd.pkg.mk"