<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/d9f8527fdcc3b5dccfa1e042acdc230178046e16">https://github.com/macports/macports-ports/commit/d9f8527fdcc3b5dccfa1e042acdc230178046e16</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit d9f8527fdcc3b5dccfa1e042acdc230178046e16
</span>Author: Ryan Schmidt <ryandesign@macports.org>
AuthorDate: Thu May 14 00:33:12 2020 -0500
<span style='display:block; white-space:pre;color:#404040;'> librdkafka: Use the right C++ standard library
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Revbump because this changes the installed rdkafka++.pc file.
</span>---
net/librdkafka/Portfile | 7 +++
net/librdkafka/files/CXX.patch | 126 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 133 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/librdkafka/Portfile b/net/librdkafka/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 4e309f7..774e8db 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/librdkafka/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/librdkafka/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4,6 +4,7 @@ PortSystem 1.0
</span> PortGroup github 1.0
github.setup edenhill librdkafka 1.4.2 v
<span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories net
platforms darwin
license BSD-2-clause (Fold License)
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -15,6 +16,12 @@ checksums sha256 d6e553b1216b76de9e3a3c4b9c53fbecd87a5220aa5db2f3a8333
</span> rmd160 99496ebe9eefa3d197bdd893baca273ad142b758 \
size 2733040
<span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles CXX.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[string match *clang* ${configure.cxx}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.ldflags-append -stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.ldflags-prepend -L../src
configure.args --enable-ssl --enable-sasl
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/librdkafka/files/CXX.patch b/net/librdkafka/files/CXX.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..1d4b2c9
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/librdkafka/files/CXX.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,126 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Use CXX instead of CC to link C++ libs/programs so that -lstdc++ is not needed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+It should be possible to remove this patch when updating the port to 1.5.0.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/edenhill/librdkafka/issues/2878
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/edenhill/librdkafka/commit/e68ef8dc37db37c4682c95f79ad0af6dfc45bb56
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- examples/Makefile.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ examples/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -35,7 +35,7 @@ producer: ../src/librdkafka.a producer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ producer_cpp: ../src-cpp/librdkafka++.a ../src/librdkafka.a producer.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) producer.cpp -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS) -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ consumer: ../src/librdkafka.a consumer.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CC) $(CPPFLAGS) $(CFLAGS) $@.c -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -78,20 +78,20 @@ rdkafka_performance: ../src/librdkafka.a rdkafka_performance.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rdkafka_example_cpp: ../src-cpp/librdkafka++.a ../src/librdkafka.a rdkafka_example.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) rdkafka_example.cpp -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS) -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kafkatest_verifiable_client: ../src-cpp/librdkafka++.a ../src/librdkafka.a kafkatest_verifiable_client.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) kafkatest_verifiable_client.cpp -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS) -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rdkafka_complex_consumer_example_cpp: ../src-cpp/librdkafka++.a ../src/librdkafka.a rdkafka_complex_consumer_example.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) rdkafka_complex_consumer_example.cpp -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS) -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rdkafka_consume_batch: ../src-cpp/librdkafka++.a ../src/librdkafka.a rdkafka_consume_batch.cpp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) rdkafka_consume_batch.cpp -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS) -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ../src-cpp/librdkafka++.a ../src/librdkafka.a $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rdkafka_zookeeper_example: ../src/librdkafka.a rdkafka_zookeeper_example.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(CC) $(CPPFLAGS) $(CFLAGS) -I/usr/include/zookeeper rdkafka_zookeeper_example.c -o $@ $(LDFLAGS) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- mklove/Makefile.base.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ mklove/Makefile.base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -25,6 +25,10 @@ ifndef MKL_MAKEFILE_CONFIG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -include $(TOPDIR)/Makefile.config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Use C compiler as default linker.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# C++ libraries will need to override this CXX after including Makefile.base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CC_LD?=$(CC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _UNAME_S := $(shell uname -s)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifeq ($(_UNAME_S),Darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBFILENAME=$(LIBNAME).$(LIBVER)$(SOLIB_EXT)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -100,7 +104,7 @@ $(LIBNAME_LDS):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(LIBFILENAME): $(OBJS) $(LIBNAME_LDS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @printf "$(MKL_YELLOW)Creating shared library $@$(MKL_CLR_RESET)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(CC) $(LDFLAGS) $(LIB_LDFLAGS) $(OBJS) -o $@ $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC_LD) $(LDFLAGS) $(LIB_LDFLAGS) $(OBJS) -o $@ $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(LIBNAME).a: $(OBJS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @printf "$(MKL_YELLOW)Creating static library $@$(MKL_CLR_RESET)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -196,7 +200,7 @@ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ $(BIN): $(OBJS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @printf "$(MKL_YELLOW)Creating program $@$(MKL_CLR_RESET)\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- $(CC) $(CPPFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ $(CC_LD) $(CPPFLAGS) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file-check:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src-cpp/CMakeLists.txt.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src-cpp/CMakeLists.txt
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -54,7 +54,7 @@ set(PKG_CONFIG_LIBS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "-L\${libdir} -lrdkafka++"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set(PKG_CONFIG_LIBS_PRIVATE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "-lrdkafka -lstdc++"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "-lrdkafka"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure_file(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "../packaging/cmake/rdkafka.pc.in"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src-cpp/Makefile.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src-cpp/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,6 +21,9 @@ DISABLE_LDS=y
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MKL_NO_SELFCONTAINED_STATIC_LIB=y
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include ../mklove/Makefile.base
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Use C++ compiler as linker rather than the default C compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CC_LD=$(CXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # OSX and Cygwin requires linking required libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ifeq ($(_UNAME_S),Darwin)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ FWD_LINKING_REQ=y
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -34,7 +37,7 @@ endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Ignore previously defined library dependencies for the C library,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # we'll get those dependencies through the C library linkage.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-LIBS := -L../src -lrdkafka -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LIBS := -L../src -lrdkafka
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CHECK_FILES+= $(LIBFILENAME) $(LIBNAME).a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tests/Makefile.orig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tests/Makefile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -3,7 +3,7 @@ TESTSRCS_CXX= $(wildcard [08]*-*.cpp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OBJS = $(TESTSRCS_C:%.c=%.o) $(TESTSRCS_CXX:%.cpp=%.o)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ BIN = test-runner
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-LIBS += -lrdkafka++ -lrdkafka -lstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++LIBS += -lrdkafka++ -lrdkafka
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ OBJS += test.o rusage.o testcpp.o \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tinycthread.o tinycthread_extra.o rdlist.o sockem.o \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sockem_ctrl.o
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -21,6 +21,9 @@ SCENARIOS?=noautocreate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -include ../Makefile.config
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Use C++ compiler as linker
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++CC_LD=$(CXX)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ all: $(BIN) run_par
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span></pre><pre style='margin:0'>
</pre>