freebsd-ports/devel/py-pyyaml5/Makefile
Muhammad Moinur Rahman 95274bf4f9 */*: Fix build with llvm16 on 13.2-STABLE
As like as HEAD(14.0-RELEASE) llvm16 was merged in base for 13.2-STABLE
with the OSVERSION 1302507.

- Utilize USE_CXXSTD=c++14 or similar solution where applicable
- Update conditionals to addtionally check for OSVERSION greater than
  1302507 and less than 1400000

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
2023-07-26 02:48:20 +02:00

54 lines
1.3 KiB
Makefile

PORTNAME= pyyaml
PORTVERSION= 5.4.1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
PKGNAMESUFFIX= 5
DISTNAME= PyYAML-${PORTVERSION}
MAINTAINER= python@FreeBSD.org
COMMENT= Python YAML parser
WWW= https://pyyaml.org/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python
USE_PYTHON= autoplist concurrent cython distutils
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}yaml
PORTSCOUT= limit:^5\.
OPTIONS_DEFINE= LIBYAML EXAMPLES
OPTIONS_DEFAULT=LIBYAML
LIBYAML_DESC= Use textproc/libyaml for faster parsing
LIBYAML_LIB_DEPENDS= libyaml.so:textproc/libyaml
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MLIBYAML}
PYDISTUTILS_SETUP+= --with-libyaml
PYDISTUTILS_BUILD_TARGET= build_ext
PYDISTUTILS_BUILDARGS+= --include-dirs=${LOCALBASE}/include \
--library-dirs=${LOCALBASE}/lib
.else
PYDISTUTILS_SETUP+= --without-libyaml
NO_ARCH= yes
.endif
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
CFLAGS+= -Wno-error=incompatible-function-pointer-types
.endif
post-install-EXAMPLES-on:
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
post-install-LIBYAML-on:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/yaml/_yaml*.so
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>