[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / textproc / py-libxml2

File: [cvs.NetBSD.org] / pkgsrc / textproc / py-libxml2 / Makefile (download)

Revision 1.79, Tue Mar 15 03:21:20 2022 UTC (10 months, 3 weeks ago) by gutteridge
Branch: MAIN
CVS Tags: pkgsrc-2022Q1-base, pkgsrc-2022Q1
Changes since 1.78: +2 -1 lines

py-libxml2: fix packaging checks when PREFIX is /usr/local

Substituting for /usr/local is a no-op in this case. Addresses
PR pkg/56747 from John Klos.

# $NetBSD: Makefile,v 1.79 2022/03/15 03:21:20 gutteridge Exp $

.include "../../textproc/libxml2/Makefile.common"

PKGNAME=	${PYPKGPREFIX}-${DISTNAME}

COMMENT=	Python wrapper for libxml2
LICENSE=	modified-bsd

USE_GCC_RUNTIME=	yes

PYSETUPSUBDIR=	python
NO_CONFIGURE=	YES

SUBST_CLASSES+=		setup
SUBST_MESSAGE.setup=	Fixing hardcoded paths.
SUBST_STAGE.setup=	pre-build
SUBST_FILES.setup=	python/setup.py
SUBST_NOOP_OK.setup=	yes # PREFIX may be /usr/local
SUBST_SED.setup=	-e "/ROOT/s,'/usr/local','${BUILDLINK_PREFIX.libxml2}',g"
SUBST_SED.setup+=	-e "/^\"/s,/usr/include,${BUILDLINK_PREFIX.iconv}/include,g"
SUBST_SED.setup+=	-e "/^\"/s,/usr/local/include,${BUILDLINK_PREFIX.iconv}/include,g"

BUILDLINK_TRANSFORM.Darwin+=	opt:-bundle:-dynamiclib

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "Darwin"
post-install: fix-darwin-install-name
.PHONY: fix-darwin-install-name
fix-darwin-install-name:
	install_name_tool -id ${PREFIX}/${PYSITELIB}/libxml2mod.so \
	    ${DESTDIR}${PREFIX}/${PYSITELIB}/libxml2mod.so
.endif

EGG_NAME=	${DISTNAME:S/-/_python-/}

BUILD_DEPENDS+=	${PYPKGPREFIX}-expat>=0:../../textproc/py-expat

.include "../../lang/python/egg.mk"
.include "../../converters/libiconv/buildlink3.mk"
BUILDLINK_API_DEPENDS.libxml2+=	libxml2>=${PKGVERSION_NOREV}
.include "../../textproc/libxml2/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"