551be3c723
Ports using USE_PYTHON=distutils are now flavored. They will automatically get flavors (py27, py34, py35, py36) depending on what versions they support. There is also a USE_PYTHON=flavors for ports that do not use distutils but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if using distutils but flavors are not wanted. A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been added to cope with Python ports that did not have the Python PKGNAMEPREFIX but are flavored. USES=python now also exports a PY_FLAVOR variable that contains the current python flavor. It can be used in dependency lines when the port itself is not python flavored. For example, deskutils/calibre. By default, all the flavors are generated. To only generate flavors for the versions in PYTHON2_DEFAULT and PYTHON3_DEFAULT, define BUILD_DEFAULT_PYTHON_FLAVORS in your make.conf. In all the ports with Python dependencies, the *_DEPENDS entries MUST end with the flavor so that the framework knows which to build/use. This is done by appending '@${PY_FLAVOR}' after the origin (or @${FLAVOR} if in a Python module with Python flavors, as the content will be the same). For example: RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR} PR: 223071 Reviewed by: portmgr, python Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D12464
82 lines
2.4 KiB
Makefile
82 lines
2.4 KiB
Makefile
# Created by: ijliao
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= linkchecker
|
|
PORTVERSION= 9.3
|
|
PORTREVISION= 1
|
|
CATEGORIES= www python
|
|
MASTER_SITES= CHEESESHOP
|
|
DISTNAME= LinkChecker-${PORTVERSION}
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Check HTML documents for broken links
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dnspython>0:dns/py-dnspython@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}requests>=2:www/py-requests@${FLAVOR}
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
|
|
USES= cpe python:2
|
|
CPE_VENDOR= bastian_kleineidam
|
|
USE_PYTHON= distutils autoplist
|
|
INSTALLS_ICONS= yes
|
|
|
|
OPTIONS_DEFINE= CLAMAV EXAMPLES GEOIP GTK2 LOGIN NLS QT4 \
|
|
SQLITE3 SYNTAX
|
|
OPTIONS_DEFAULT= SQLITE3 SYNTAX
|
|
OPTIONS_SUB= yes
|
|
|
|
CLAMAV_DESC= Clam Antivirus
|
|
CLAMAV_RUN_DEPENDS= clamscan:security/clamav
|
|
GEOIP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}GeoIP>0:net/py-GeoIP@${FLAVOR}
|
|
GTK2_USE= gnome=pygtk2
|
|
LOGIN_DESC= Login form submission
|
|
LOGIN_RUN_DEPENDS= twill>=0:www/twill
|
|
NLS_USES= gettext
|
|
QT4_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-noqt-setup.py
|
|
QT4_USES= pyqt:4
|
|
QT4_USE= PYQT=core_run,gui_run,help_run,qscintilla2_run,sql_run
|
|
SQLITE3_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${FLAVOR}
|
|
SYNTAX_DESC= HTML/CSS syntax check
|
|
SYNTAX_RUN_DEPENDS=\
|
|
${PYTHON_PKGNAMEPREFIX}cssutils>=0.9.5:www/py-cssutils@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}utidylib>=0.2:www/py-utidylib@${FLAVOR}
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e \
|
|
'/^Icon/s|=.*|=linkchecker|' ${WRKSRC}/doc/*.desktop
|
|
@${REINPLACE_CMD} -e 's|share/man|man|' ${WRKSRC}/setup.py
|
|
|
|
post-build:
|
|
.if ${PORT_OPTIONS:MNLS}
|
|
.for lang in de es fr
|
|
(cd ${WRKSRC}/po && msgfmt -c -o ${lang}.mo ${lang}.po)
|
|
.endfor
|
|
.endif
|
|
|
|
post-install:
|
|
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/linkcheck/*/*.so
|
|
.for i in 16 32 48 64 128
|
|
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps
|
|
(cd ${WRKSRC}/doc/html && ${INSTALL_DATA} logo${i}x${i}.png \
|
|
${STAGEDIR}${PREFIX}/share/icons/hicolor/${i}x${i}/apps/linkchecker.png)
|
|
.endfor
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
(cd ${WRKSRC}/cgi-bin/lconline && ${INSTALL_DATA} * \
|
|
${STAGEDIR}${EXAMPLESDIR})
|
|
.for i in linkchecker.apache2.conf linkchecker-completion
|
|
(cd ${WRKSRC}/config && ${INSTALL_DATA} ${i} \
|
|
${STAGEDIR}${EXAMPLESDIR})
|
|
.endfor
|
|
.for i in check_blacklist.sh check_for_x_errors.sh check_urls.sh
|
|
(cd ${WRKSRC}/doc/examples && ${INSTALL_DATA} ${i} \
|
|
${STAGEDIR}${EXAMPLESDIR})
|
|
.endfor
|
|
|
|
.include <bsd.port.mk>
|