summaryrefslogtreecommitdiff
path: root/net/libquic/Makefile
blob: e3e9ed268524c1d11bd6b9d3b8c211b1cc682f78 (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
50
51
# $NetBSD: Makefile,v 1.13 2022/06/28 11:35:01 wiz Exp $

DISTNAME=	libquic-0.0.3
PKGREVISION=	7
CATEGORIES=	net
MASTER_SITES=	${MASTER_SITE_GITHUB:=devsisters/}
GITHUB_TAG=	v0.0.3-6e3a05d

MAINTAINER=	agc@NetBSD.org
COMMENT=	Multiplexed stream transport over UDP
LICENSE=	modified-bsd

.include "../../lang/go/version.mk"
BUILD_DEPENDS+=		${GO_PACKAGE_DEP}

SUBST_CLASSES+=		path go
SUBST_STAGE.link=	pre-configure
SUBST_MESSAGE.link=	Fix paths
SUBST_FILES.link=	src/base/base_paths_posix.cc
SUBST_SED.link=		-e 's|@PREFIX@|'${PREFIX}'|'
SUBST_STAGE.go=		pre-configure
SUBST_FILES.go=		boringssl/CMakeLists.txt
SUBST_SED.go=		-e '/find_program.GO_EXECUTABLE/s,go,${GO},'

BUILDLINK_TRANSFORM+=	rm:-Werror

USE_LANGUAGES+=	c c++
USE_TOOLS+=	cmake gmake perl

AUTO_MKDIRS=	yes

pre-build:
	mkdir -p ${WRKSRC}/build

do-build:
	cd ${WRKSRC}/build && ${SETENV} ${MAKE_ENV} cmake -DCMAKE_BUILD_TYPE=Release ..
	cd ${WRKSRC}/build && ${SETENV} ${MAKE_ENV} gmake

INSTLIBS+=	build/boringssl/crypto/libcrypto.a
INSTLIBS+=	build/boringssl/ssl/libssl.a
INSTLIBS+=	build/boringssl/decrepit/libdecrepit.a
INSTLIBS+=	build/protobuf/libprotobuf.a
INSTLIBS+=	build/libquic.a

do-install:
	mkdir -p ${DESTDIR}${PREFIX}/quic/lib
	for f in ${INSTLIBS}; do					\
		${INSTALL_LIB} ${WRKSRC}/$$f ${DESTDIR}${PREFIX}/quic/lib/; \
	done

.include "../../mk/bsd.pkg.mk"