ports/devel/svn2git/Makefile
Michael Osipov e83f0a9c84 */*: Properly depend on Subversion LTS or latest with WITH_SUBVERSION_VER
When LTS version of Subversion is set in make.conf (WITH_SUBVERSION_VER)
depending ports will still depend on latest version (devel/subversion)
instead of LTS one (devel/subversion-lts). This will cause dependency
conflicts when packages are distributed with Poudriere, namely pkg(8)
will report them and fail to install.
Make all affected ports properly depend on the right port based on the
value set in WITH_SUBVERSION_VER.

Approved by:	jrm (mentor), otis (mentor), lev (maintainer timeout)
Differential Revision:	https://reviews.freebsd.org/D43864
2024-02-28 16:53:37 +01:00

49 lines
1.3 KiB
Makefile

PORTNAME= svn2git
PORTVERSION= 1.0.18
PORTREVISION= 1
CATEGORIES= devel kde
MAINTAINER= ports@FreeBSD.org
COMMENT= Imports svn repositories into git
WWW= http://gitorious.org/svn2git/svn2git
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libapr-1.so:devel/apr1
.if ${WITH_SUBVERSION_VER:U} == LTS
LIB_DEPENDS+= libsvn_client-1.so:devel/subversion-lts
.else
LIB_DEPENDS+= libsvn_client-1.so:devel/subversion
.endif
RUN_DEPENDS= git:devel/git \
p5-Term-ReadKey>=0:devel/p5-Term-ReadKey
.if ${WITH_SUBVERSION_VER:U} == LTS
RUN_DEPENDS+= p5-subversion-lts>=0:devel/p5-subversion
.else
RUN_DEPENDS+= p5-subversion>=0:devel/p5-subversion
.endif
USES= compiler:c++11-lang qmake qt:5
USE_GITHUB= yes
USE_QT= core
GH_ACCOUNT= svn-all-fast-export
OPTIONS_DEFINE= FREEBSD_REPO
FREEBSD_REPO_DESC= FreeBSD-repo only mode
QMAKE_ARGS= SVN_INCLUDE=${LOCALBASE}/include/subversion-1 \
SVN_LIBDIR=${LOCALBASE}/lib \
APR_INCLUDE=${LOCALBASE}/include/apr-1
PLIST_FILES= bin/svn2git
FREEBSD_REPO_EXTRA_PATCHES= ${PATCHDIR}/freebsd-export-patch
post-patch:
@${REINPLACE_CMD} -e "s|/usr/local|${LOCALBASE}|" \
-e "s/VERSION = .*/VERSION = ${PORTVERSION}/" ${WRKSRC}/src/src.pro
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/svn2git ${STAGEDIR}${PREFIX}/bin/
.include <bsd.port.mk>