mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-02 06:03:50 +00:00
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
89 lines
2.6 KiB
Makefile
89 lines
2.6 KiB
Makefile
# Created by: Anders F Bjorklund <afb@rpm5.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= yum
|
|
PORTVERSION= 3.4.3
|
|
PORTREVISION= 3
|
|
CATEGORIES= sysutils
|
|
MASTER_SITES= http://yum.baseurl.org/download/${PORTVERSION:R}/
|
|
|
|
MAINTAINER= ports@FreeBSD.org
|
|
COMMENT= Installer/updater for rpm
|
|
|
|
LICENSE= GPLv2
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
BUILD_DEPENDS= bash:shells/bash \
|
|
intltool-update:textproc/intltool
|
|
RUN_DEPENDS= bash:shells/bash \
|
|
${PYTHON_SITELIBDIR}/rpm/__init__.py:archivers/rpm4 \
|
|
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${FLAVOR} \
|
|
${PYTHON_SITELIBDIR}/sqlitecachec.py:devel/py-yum-metadata-parser@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}iniparse>0:devel/py-iniparse@${FLAVOR} \
|
|
${PYTHON_PKGNAMEPREFIX}urlgrabber>0:www/py-urlgrabber@${FLAVOR}
|
|
|
|
ONLY_FOR_ARCHS= aarch64 amd64 armv6 armv7 i386
|
|
ONLY_FOR_ARCHS_REASON= linux is not available for ${ARCH}
|
|
|
|
USES= cpe gettext gmake python:2.7 shebangfix
|
|
USE_PYTHON= flavors
|
|
SHEBANG_FILES= etc/yum-updatesd.init
|
|
CPE_VENDOR= baseurl
|
|
|
|
MAKE_ARGS= MAKE=${MAKE_CMD} PYTHON=${PYTHON_CMD} \
|
|
prefix=${PREFIX} mandir=${MANPREFIX}/man sysconfdir=${PREFIX}/etc
|
|
|
|
RPMDIR?= /var/lib/rpm
|
|
|
|
post-patch:
|
|
${REINPLACE_CMD} -e 's|@PREFIX@|${PREFIX}|g' -e \
|
|
's|@RPMDIR@|${RPMDIR}|g' -e \
|
|
's|@LOCALBASE@|${LOCALBASE}|g' \
|
|
${WRKSRC}/bin/yum.py \
|
|
${WRKSRC}/bin/yum-updatesd.py \
|
|
${WRKSRC}/cli.py \
|
|
${WRKSRC}/yum-updatesd.py \
|
|
${WRKSRC}/yum/__init__.py \
|
|
${WRKSRC}/yum/config.py \
|
|
${WRKSRC}/yum/rpmsack.py \
|
|
${WRKSRC}/yum/plugins.py
|
|
${REINPLACE_CMD} -e 's|#!/usr/bin/python|#!${PYTHON_CMD}|' \
|
|
${WRKSRC}/bin/yum.py \
|
|
${WRKSRC}/bin/yum-updatesd.py \
|
|
${WRKSRC}/callback.py \
|
|
${WRKSRC}/cli.py \
|
|
${WRKSRC}/output.py \
|
|
${WRKSRC}/yumcommands.py \
|
|
${WRKSRC}/yummain.py \
|
|
${WRKSRC}/yum-updatesd.py \
|
|
${WRKSRC}/utils.py \
|
|
${WRKSRC}/rpmUtils/__init__.py \
|
|
${WRKSRC}/rpmUtils/arch.py \
|
|
${WRKSRC}/rpmUtils/miscutils.py \
|
|
${WRKSRC}/rpmUtils/oldUtils.py \
|
|
${WRKSRC}/rpmUtils/transaction.py \
|
|
${WRKSRC}/rpmUtils/updates.py \
|
|
${WRKSRC}/yum/__init__.py \
|
|
${WRKSRC}/yum/Errors.py \
|
|
${WRKSRC}/yum/callbacks.py \
|
|
${WRKSRC}/yum/config.py \
|
|
${WRKSRC}/yum/depsolve.py \
|
|
${WRKSRC}/yum/failover.py \
|
|
${WRKSRC}/yum/history.py \
|
|
${WRKSRC}/yum/i18n.py \
|
|
${WRKSRC}/yum/metalink.py \
|
|
${WRKSRC}/yum/packageSack.py \
|
|
${WRKSRC}/yum/packages.py \
|
|
${WRKSRC}/yum/pkgtag_db.py \
|
|
${WRKSRC}/yum/repoMDObject.py \
|
|
${WRKSRC}/yum/repos.py \
|
|
${WRKSRC}/yum/rpmsack.py \
|
|
${WRKSRC}/yum/rpmtrans.py \
|
|
${WRKSRC}/yum/sqlitesack.py \
|
|
${WRKSRC}/yum/sqlutils.py \
|
|
${WRKSRC}/yum/update_md.py
|
|
${REINPLACE_CMD} -e 's|%%PYTHONPREFIX_SITELIBDIR%%|${PYTHONPREFIX_SITELIBDIR}|' \
|
|
${WRKSRC}/yum/Makefile ${WRKSRC}/rpmUtils/Makefile
|
|
|
|
.include <bsd.port.mk>
|