summaryrefslogtreecommitdiffstats
path: root/devel/libgit2/Makefile
blob: 0267e18f331f62bbbc4422f770d28a226c5ee1ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $FreeBSD$

PORTNAME=	libgit2
PORTVERSION=	0.24.0
DISTVERSIONPREFIX=	v
CATEGORIES=	devel

MAINTAINER=	wg@FreeBSD.org
COMMENT=	Portable, pure C implementation of the Git core

LICENSE=	GPLv2

USE_GITHUB=	yes
GH_ACCOUNT=	libgit2

USES=		cmake pkgconfig python:build
USE_LDCONFIG=	yes
USE_OPENSSL=	yes

PLIST_SUB=	PORTVERSION=${PORTVERSION} SHLIB_VER=${PORTVERSION:R:E}

OPTIONS_DEFINE=	SSH THREADS CURL
OPTIONS_DEFAULT=SSH THREADS CURL
SSH_DESC=	Enable SSH support through libssh2
CURL_DESC=	Enable HTTP support through cURL

SSH_LIB_DEPENDS=	libssh2.so:security/libssh2
SSH_CMAKE_ON=		-DUSE_SSH=ON
SSH_CMAKE_OFF=		-DUSE_SSH=OFF
THREADS_CMAKE_ON=	-DTHREADSAFE=ON
THREADS_CMAKE_OFF=	-DTHREADSAFE=OFF
CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
CURL_CMAKE_ON=		-DCURL=ON
CURL_CMAKE_OFF=		-DCURL=OFF

BROKEN_sparc64=	does not install: thread-local storage not supported

.include <bsd.port.pre.mk>

post-patch:
	@${REINPLACE_CMD} -e "s|/pkgconfig|/../libdata/pkgconfig|; \
		/LIBGIT2_PC_REQUIRES.*zlib/ d" ${WRKSRC}/CMakeLists.txt
.if defined(WITH_OPENSSL_BASE)
	@${REINPLACE_CMD} -e "/LIBGIT2_PC_REQUIRES.*openssl/ d" \
		${WRKSRC}/CMakeLists.txt
.endif

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud