On Mon, Oct 16, 2023 at 09:47:42PM +0200, Theo Buehler wrote:
> For some reason ports-gcc can't find "lz4.h", so pass -I in CXXFLAGS.
> Then there's the usual missing include thing in gtest. I should see if I
> can upstream that...
You could contain it with to avoid subtle change on clang archs, no?
.if ${CHOSEN_COMPILER} == "ports-gcc"
CXXFLAGS += -I/usr/local/include
.endif
>
> I don't think this changes the package where it already builds, but I
> can bump REVISION if that's preferred.
Generally, I'd say bump if in doubt.
On amd64, this diff tripples the *built* libsnappy.so.* in size.
I've built twice without and twice with the diff:
$ size lib*
text data bss dec hex
38075 1648 40 39763 9b53 libsnappy.so.3.0.cur
38075 1648 40 39763 9b53 libsnappy.so.3.0.cur2
109844 5208 32 115084 1c18c libsnappy.so.3.0.new
109844 5208 32 115084 1c18c libsnappy.so.3.0.new2
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/snappy/Makefile,v
> retrieving revision 1.18
> diff -u -p -r1.18 Makefile
> --- Makefile 15 Oct 2023 07:31:06 -0000 1.18
> +++ Makefile 16 Oct 2023 19:35:14 -0000
> @@ -24,6 +24,8 @@ MODULES = devel/cmake
> CONFIGURE_ARGS += -DBUILD_SHARED_LIBS=ON \
> -DSNAPPY_BUILD_BENCHMARKS=OFF
>
> +CONFIGURE_ENV += CXXFLAGS="-I${LOCALBASE}/include"
> +
Need to investigate why that adds so many symbols.
> # expects submodule/cannot use system library
> DIST_TUPLE = github google googletest
> e40661d89b051e9ef4eb8a2420b74bf78b39ef41 \
> third_party/googletest/ # BSD
> Index: patches/patch-third_party_googletest_googletest_src_gtest_cc
> ===================================================================
> RCS file: patches/patch-third_party_googletest_googletest_src_gtest_cc
> diff -N patches/patch-third_party_googletest_googletest_src_gtest_cc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-third_party_googletest_googletest_src_gtest_cc 16 Oct
> 2023 19:38:50 -0000
> @@ -0,0 +1,17 @@
> +Fix build on sparc64:
> +
> +gtest.cc:5342:7:
> + error: 'raise' was not declared in this scope
> + raise(SIGTRAP);
That part is OK kn and clearly unrelated.
> +
> +Index: third_party/googletest/googletest/src/gtest.cc
> +--- third_party/googletest/googletest/src/gtest.cc.orig
> ++++ third_party/googletest/googletest/src/gtest.cc
> +@@ -43,6 +43,7 @@
> + #include <algorithm>
> + #include <chrono> // NOLINT
> + #include <cmath>
> ++#include <csignal>
> + #include <cstdint>
> + #include <cstdlib>
> + #include <cstring>