pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/snappy snappy: Conditionalise googletest depende...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/33f26ab35dea
branches:  trunk
changeset: 455062:33f26ab35dea
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sun Jun 27 11:45:54 2021 +0000

description:
snappy: Conditionalise googletest dependency. Bump.

Only build unit tests (and depend on googletest) if the user wants
to run tests.

diffstat:

 devel/snappy/Makefile |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 8bad27421dcf -r 33f26ab35dea devel/snappy/Makefile
--- a/devel/snappy/Makefile     Sun Jun 27 11:30:08 2021 +0000
+++ b/devel/snappy/Makefile     Sun Jun 27 11:45:54 2021 +0000
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2020/01/18 23:30:41 rillig Exp $
+# $NetBSD: Makefile,v 1.15 2021/06/27 11:45:54 tnn Exp $
 
+GITHUB_TAG=    ${PKGVERSION_NOREV}
 DISTNAME=      snappy-1.1.8
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=google/}
 
@@ -9,7 +11,6 @@
 COMMENT=       General purpose data compression library
 LICENSE=       apache-2.0
 
-GITHUB_TAG=    ${PKGVERSION_NOREV}
 
 USE_CMAKE=             yes
 USE_LANGUAGES=         c c++
@@ -18,7 +19,15 @@
 
 CMAKE_ARGS+=   -DBUILD_SHARED_LIBS=ON
 
+.include "../../mk/bsd.prefs.mk"
+
+.if !empty(PKGSRC_RUN_TEST:M[Yy][Ee][Ss])
+CMAKE_ARGS+=   -DSNAPPY_BUILD_TESTS=ON
+.include "../../devel/googletest/buildlink3.mk"
+.else
+CMAKE_ARGS+=   -DSNAPPY_BUILD_TESTS=OFF
+.endif
+
 .include "../../archivers/lzo/buildlink3.mk"
-.include "../../devel/googletest/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index