Index: devel/googletest/Makefile =================================================================== --- devel/googletest/Makefile +++ devel/googletest/Makefile @@ -4,7 +4,7 @@ PORTNAME= googletest DISTVERSIONPREFIX= release- DISTVERSION= 1.8.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= jbeich@FreeBSD.org @@ -16,22 +16,24 @@ USE_GITHUB= yes GH_ACCOUNT= google -USES= autoreconf compiler:c++11-lang libtool -WRKSRC_SUBDIR= ${PORTNAME} -GNU_CONFIGURE= yes -# fused-src python tests are only useful for bundling. There's no point in -# running them before installing system-wide without source files. -CONFIGURE_ENV= ac_cv_path_PYTHON=":" +USES= cmake:noninja compiler:c++11-lang libtool +CMAKE_ON= BUILD_SHARED_LIBS gtest_build_tests +CMAKE_OFF= BUILD_GMOCK TEST_TARGET= check -INSTALL_TARGET= install-strip USE_LDCONFIG= yes -post-patch: -# enable vendor make install again (revert 661758e) - @${REINPLACE_CMD} -E 's/install-(exec|data)-local/&-dummy/' \ - ${WRKSRC}/Makefile.am - -post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/scripts/gtest-config ${STAGEDIR}${PREFIX}/bin +CXXFLAGS+= -DGTESTS_HAS_POSIX_RE=1 +CXXFLAGS+= -DGTESTS_HAS_STREAM_REDIRECTION=1 +CXXFLAGS+= -frtti +CXXFLAGS+= -std=c++11 + +pre-install: + ${MKDIR} ${STAGEDIR}${LOCALBASE}/tests/googletest + tests="$$(${GREP} -E "^tests/googletest" "${PKGDIR}/pkg-plist")"; \ + for test in $$tests; do \ + ${INSTALL_PROGRAM} \ + "${CONFIGURE_WRKSRC}/googletest/$$(basename $$test)" \ + "${STAGEDIR}${LOCALBASE}/$$test"; \ + done .include Index: devel/googletest/files/patch-Makefile.am =================================================================== --- devel/googletest/files/patch-Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -Move custom headers into their own directory - ---- Makefile.am.orig 2017-09-23 23:21:02 UTC -+++ Makefile.am -@@ -208,7 +208,10 @@ pkginclude_internal_HEADERS = \ - include/gtest/internal/gtest-port-arch.h \ - include/gtest/internal/gtest-string.h \ - include/gtest/internal/gtest-tuple.h \ -- include/gtest/internal/gtest-type-util.h \ -+ include/gtest/internal/gtest-type-util.h -+ -+pkginclude_internal_customdir = $(pkgincludedir)/internal/custom -+pkginclude_internal_custom_HEADERS = \ - include/gtest/internal/custom/gtest.h \ - include/gtest/internal/custom/gtest-port.h \ - include/gtest/internal/custom/gtest-printers.h Index: devel/googletest/files/patch-bsd-defines =================================================================== --- devel/googletest/files/patch-bsd-defines +++ devel/googletest/files/patch-bsd-defines @@ -1,8 +1,8 @@ o Add DragonFly and GNU/kFreeBSD support o Implement GetThreadCount() for BSDs ---- include/gtest/internal/gtest-port-arch.h.orig 2017-09-23 23:21:02 UTC -+++ include/gtest/internal/gtest-port-arch.h +--- googletest/include/gtest/internal/gtest-port-arch.h.orig 2017-09-23 23:21:02 UTC ++++ googletest/include/gtest/internal/gtest-port-arch.h @@ -67,6 +67,10 @@ # if TARGET_OS_IPHONE # define GTEST_OS_IOS 1 @@ -14,8 +14,8 @@ #elif defined __FreeBSD__ # define GTEST_OS_FREEBSD 1 #elif defined __Fuchsia__ ---- include/gtest/internal/gtest-port.h.orig 2018-08-31 15:21:57 UTC -+++ include/gtest/internal/gtest-port.h +--- googletest/include/gtest/internal/gtest-port.h.orig 2018-08-31 15:21:57 UTC ++++ googletest/include/gtest/internal/gtest-port.h @@ -125,7 +125,9 @@ // // GTEST_OS_AIX - IBM AIX @@ -54,8 +54,8 @@ # define GTEST_CAN_STREAM_RESULTS_ 1 #endif ---- src/gtest-port.cc.orig 2017-09-23 23:21:02 UTC -+++ src/gtest-port.cc +--- googletest/src/gtest-port.cc.orig 2017-09-23 23:21:02 UTC ++++ googletest/src/gtest-port.cc @@ -52,6 +52,14 @@ # include #endif // GTEST_OS_MAC @@ -152,8 +152,8 @@ #elif GTEST_OS_QNX // Returns the number of threads running in the process, or 0 to indicate that ---- src/gtest.cc.orig 2017-09-23 23:21:02 UTC -+++ src/gtest.cc +--- googletest/src/gtest.cc.orig 2017-09-23 23:21:02 UTC ++++ googletest/src/gtest.cc @@ -127,7 +127,7 @@ #endif @@ -163,8 +163,8 @@ # include // NOLINT # include // NOLINT # include // NOLINT ---- test/googletest-port-test.cc.orig 2018-08-31 15:21:57 UTC -+++ test/googletest-port-test.cc +--- googletest/test/googletest-port-test.cc.orig 2018-08-31 15:21:57 UTC ++++ googletest/test/googletest-port-test.cc @@ -293,7 +293,9 @@ TEST(FormatCompilerIndependentFileLocationTest, Format EXPECT_EQ("unknown file", FormatCompilerIndependentFileLocation(NULL, -1)); } Index: devel/googletest/pkg-plist =================================================================== --- devel/googletest/pkg-plist +++ devel/googletest/pkg-plist @@ -1,4 +1,3 @@ -bin/gtest-config include/gtest/gtest-death-test.h include/gtest/gtest-message.h include/gtest/gtest-param-test.h @@ -23,12 +22,29 @@ include/gtest/internal/gtest-string.h include/gtest/internal/gtest-tuple.h include/gtest/internal/gtest-type-util.h -lib/libgtest.a lib/libgtest.so -lib/libgtest.so.0 -lib/libgtest.so.0.0.0 -lib/libgtest_main.a lib/libgtest_main.so -lib/libgtest_main.so.0 -lib/libgtest_main.so.0.0.0 -share/aclocal/gtest.m4 +@dir tests/googletest +tests/googletest/googletest-catch-exceptions-ex-test_ +tests/googletest/googletest-catch-exceptions-no-ex-test_ +tests/googletest/googletest-color-test_ +tests/googletest/googletest-death-test-test +tests/googletest/googletest-env-var-test_ +tests/googletest/googletest-filepath-test +tests/googletest/googletest-linked-ptr-test +tests/googletest/googletest-list-tests-unittest_ +tests/googletest/googletest-listener-test +tests/googletest/googletest-message-test +tests/googletest/googletest-options-test +tests/googletest/googletest-output-test_ +tests/googletest/googletest-param-test-test +tests/googletest/googletest-port-test +tests/googletest/googletest-printers-test +tests/googletest/googletest-shuffle-test_ +tests/googletest/googletest-test-part-test +tests/googletest/googletest-throw-on-failure-test_ +tests/googletest/googletest-tuple-test +tests/googletest/googletest-uninitialized-test_ +tests/googletest/gtest-death-test_ex_catch_test +tests/googletest/gtest-death-test_ex_nocatch_test +tests/googletest/gtest-typed-test_test