summaryrefslogtreecommitdiff
path: root/databases/cockroach/Makefile
blob: 1375ade1a361f1deaf451b4a3455207fff75f97f (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
49

PORTNAME=	cockroach
DISTVERSIONPREFIX=	v
DISTVERSION=	19.1.11
CATEGORIES=	databases
MASTER_SITES=	https://binaries.cockroachdb.com/
EXTRACT_SUFX=	.src.tgz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Cloud-native SQL database that survive disasters

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/src/github.com/cockroachdb/cockroach/LICENSE

ONLY_FOR_ARCHS=	amd64
ONLY_FOR_ARCHS_REASON=	"A 64-bit system is strongly recommended"

BUILD_DEPENDS=	autoconf:devel/autoconf \
		bash:shells/bash \
		cmake:devel/cmake

USES=		gmake go libedit

USE_GCC=	yes # RocksDB is broken with clang - See PR 236213
USE_RC_SUBR=	cockroach

NO_CCACHE=	yes
ALL_TARGET=	build

PLIST_FILES=	bin/cockroach

USERS=		cockroach
GROUPS=		cockroach

post-patch:
	@${REINPLACE_CMD} -e 's|LDFLAGS: -ledit|LDFLAGS: -L${LOCALBASE}/lib -ledit|g' \
			  -e 's|CPPFLAGS: -Ishim|CPPFLAGS: -I${LOCALBASE}/include -Ishim|g' \
		${WRKSRC}/src/github.com/cockroachdb/cockroach/vendor/github.com/knz/go-libedit/unix/editline_unix.go
	@${REINPLACE_CMD} -e 's|build -i -o|build -o|g' \
		${WRKSRC}/src/github.com/cockroachdb/cockroach/Makefile

do-build:
	@${SETENV} -i ${MAKE_ENV} ${GO_ENV} \
		${MAKE_CMD} -C ${WRKSRC} buildoss

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/cockroachdb/cockroach/cockroachoss ${STAGEDIR}${PREFIX}/bin/cockroach

.include <bsd.port.mk>