mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
40b25eeea2
- move more slave bits to its Makefile [1] - shuffle test targets [1] - use INSTALL_LIB for python module [1] - portlint [2] PR: 160714 [1] Reviewed by: scheidell [2] Approved by: gabor (mentor) Feature safe: yes
58 lines
1.7 KiB
Makefile
58 lines
1.7 KiB
Makefile
# New ports collection makefile for: py-xdelta3
|
|
# Date created: 7 Jun 2010
|
|
# Whom: Anonymous
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTREVISION= 1
|
|
PORTEPOCH= 0
|
|
CATEGORIES?= misc python
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
COMMENT= Python module for xdelta3
|
|
|
|
BUILD_DEPENDS= swig:${PORTSDIR}/devel/swig13 \
|
|
${NONEXISTENT}:${PORTSDIR}/misc/xdelta3:build
|
|
|
|
MASTERDIR= ${.CURDIR}/../../misc/xdelta3
|
|
|
|
USE_PYTHON= yes
|
|
USE_PYDISTUTILS= yes
|
|
PYDISTUTILS_PKGNAME= xdelta3main
|
|
|
|
WRKDIR= ${WRKDIRPREFIX}${MASTERDIR}/work
|
|
PLIST_FILES= %%PYTHON_SITELIBDIR%%/${PYDISTUTILS_PKGNAME}.so \
|
|
%%PYTHON_SITELIBDIR%%/xdelta3module.so \
|
|
%%PYTHON_SITELIBDIR%%/xdelta3.py
|
|
|
|
post-patch: .SILENT
|
|
${REINPLACE_CMD} -i.slave.bak -e '/^SWIG_FLAGS/s/=/& `python$$(PYVER)-config --cflags` -fpic/' \
|
|
-e '/^xdelta3module\.so:/,/^$$/ { s/ld/$$(CC)/; \
|
|
s/.*libpython.*\.so.*/`python$$(PYVER)-config --ldflags`/; \
|
|
/-lc/d; }' \
|
|
-e 's|/usr/include/python$$(PYVER)|${PYTHON_INCLUDEDIR}|' \
|
|
-e 's|/usr/lib/python$$(PYVER)|${PYTHON_LIBDIR}|' \
|
|
-e 's|/usr/lib/libpython|${LOCALBASE}/lib/libpython|' \
|
|
-e '/^all:/s/:.*/: swigtgt/' \
|
|
-e '/^PYVER/s/=.*/= ${PYTHON_VER}/' \
|
|
${WRKSRC}/Makefile
|
|
${REINPLACE_CMD} -e "/^REL/s/=.*/='${PORTVERSION}'/" \
|
|
-e "/extra_compile_args.*\[/,/]/ { s/'-O3',//; s/'-g',//; }" \
|
|
${WRKSRC}/${PYSETUP}
|
|
|
|
post-install:
|
|
${INSTALL_LIB} ${WRKSRC}/xdelta3module.so ${PYTHONPREFIX_SITELIBDIR}
|
|
${INSTALL_SCRIPT} ${WRKSRC}/xdelta3.py ${PYTHONPREFIX_SITELIBDIR}
|
|
|
|
test: build
|
|
${PYTHON_CMD} ${WRKSRC}/xdelta3-test.py
|
|
|
|
broken-regression-test: build
|
|
@cd ${WRKSRC} && for d in build/lib.*-${PYTHON_VER}; do \
|
|
set -x; \
|
|
PYTHONPATH=$${d}: ${PYTHON_CMD} testing/xdelta3-regtest.py; \
|
|
done
|
|
|
|
.include "${MASTERDIR}/Makefile"
|