From 761905abbfd26e0a6c5a6133e1654b35f8814cac Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 16 Dec 2016 17:47:08 +0000 Subject: devel/protobuf: unbreak |make test| $ make test ===> Testing for protobuf-3.1.0 gmake[1]: Entering directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' Making check in . gmake[2]: Entering directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' gmake check-local gmake[3]: Entering directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' Making lib/libgmock.a lib/libgmock_main.a in gmock cd: gmock: No such file or directory gmake[3]: *** [Makefile:1752: check-local] Error 2 gmake[3]: Leaving directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' gmake[2]: *** [Makefile:1613: check-am] Error 2 gmake[2]: Leaving directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' gmake[1]: *** [Makefile:1325: check-recursive] Error 1 gmake[1]: Leaving directory '/usr/ports/devel/protobuf/work/protobuf-3.1.0' *** Error code 1 PR: 215346 Approved by: sunpoet (maintainer) --- devel/protobuf/Makefile | 12 +++++++++++- .../files/patch-src_google_protobuf_testing_zcgunzip.cc | 10 ++++++++++ .../files/patch-src_google_protobuf_testing_zcgzip.cc | 10 ++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 devel/protobuf/files/patch-src_google_protobuf_testing_zcgunzip.cc create mode 100644 devel/protobuf/files/patch-src_google_protobuf_testing_zcgzip.cc diff --git a/devel/protobuf/Makefile b/devel/protobuf/Makefile index fb33fa87dcaf..71ed8213f834 100644 --- a/devel/protobuf/Makefile +++ b/devel/protobuf/Makefile @@ -12,17 +12,27 @@ COMMENT= Data interchange format library LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE +TEST_DEPENDS= googletest>0:devel/googletest \ + googlemock>0:devel/googlemock + BROKEN_sparc64= fails to compile: no atomic ops available CFLAGS+= -DGOOGLE_PROTOBUF_NO_RTTI GNU_CONFIGURE= yes INSTALL_TARGET= install-strip TEST_TARGET= check +TEST_ARGS= ${MAKE_ARGS} ${_MAKE_JOBS} USE_CSTD= c99 # for audio/clementine-player support USE_LDCONFIG= yes -USES= autoreconf gmake libtool pathfix pkgconfig +USES= autoreconf gmake libtool localbase pathfix pkgconfig GH_ACCOUNT= google USE_GITHUB= yes +post-patch: + @${REINPLACE_CMD} -e 's/^check-local/&-disabled/' \ + ${WRKSRC}/Makefile.am + @${REINPLACE_CMD} -Ee '/gtest|mock/s/.*lib(.*)\.la/ -l\1/' \ + ${WRKSRC}/src/Makefile.am + .include diff --git a/devel/protobuf/files/patch-src_google_protobuf_testing_zcgunzip.cc b/devel/protobuf/files/patch-src_google_protobuf_testing_zcgunzip.cc new file mode 100644 index 000000000000..29f00838fbdc --- /dev/null +++ b/devel/protobuf/files/patch-src_google_protobuf_testing_zcgunzip.cc @@ -0,0 +1,10 @@ +--- src/google/protobuf/testing/zcgunzip.cc.orig 2014-10-21 00:06:06 UTC ++++ src/google/protobuf/testing/zcgunzip.cc +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include // STDOUT_FILENO + + #include + #include diff --git a/devel/protobuf/files/patch-src_google_protobuf_testing_zcgzip.cc b/devel/protobuf/files/patch-src_google_protobuf_testing_zcgzip.cc new file mode 100644 index 000000000000..5b9c5c02e293 --- /dev/null +++ b/devel/protobuf/files/patch-src_google_protobuf_testing_zcgzip.cc @@ -0,0 +1,10 @@ +--- src/google/protobuf/testing/zcgzip.cc.orig 2014-10-21 00:06:06 UTC ++++ src/google/protobuf/testing/zcgzip.cc +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include // STDOUT_FILENO + + #include + #include