# $NetBSD: Makefile,v 1.27 2025/06/09 00:40:00 gdt Exp $

# Before updating sip, geography/qgis (as the most demanding sip user
# currently known) must be tested to build and run ok.  The 6.8.0
# release of sip was very broken, and .0 releases of sip should be
# viewed with extreme caution and probably skipped.
# 6.11.1: qgis 3.34 fails to build
# 6.12.0: qgis 3.34 and 3.40 both fail to build
DISTNAME=	sip-6.10.0
PKGNAME=	${PYPKGPREFIX}-${DISTNAME:S/sip/sip6/}
PKGREVISION=	1
CATEGORIES=	x11 python
MASTER_SITES=	${MASTER_SITE_PYPI:=s/sip/}
# Upstream NEWS is not in NEWS, but instead at:
#   https://python-sip.readthedocs.io/en/stable/releases.html

MAINTAINER=	gdt@NetBSD.org
#MAINTAINER+=	rhialto@NetBSD.org
HOMEPAGE=	https://github.com/Python-SIP/sip
COMMENT=	Tool to create Python bindings for C++ libraries
LICENSE=	sip-license OR gnu-gpl-v2 OR gnu-gpl-v3

TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
DEPENDS+=	${PYPKGPREFIX}-packaging-[0-9]*:../../devel/py-packaging
DEPENDS+=	${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools

USE_LANGUAGES=	c c++

PYTHON_SELF_CONFLICT=	yes

.include "../../lang/python/pyversion.mk"

.if ${PYTHON_VERSION} < 311
DEPENDS+=	${PYPKGPREFIX}-tomli-[0-9]*:../../textproc/py-tomli
.endif

.include "../../lang/python/wheel.mk"
.include "../../mk/bsd.pkg.mk"
