SF.net SVN: gar:[26720] csw/mgar/pkg
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Tue Dec 29 14:17:33 CET 2020
Revision: 26720
http://sourceforge.net/p/gar/code/26720
Author: dmichelsen
Date: 2020-12-29 13:17:31 +0000 (Tue, 29 Dec 2020)
Log Message:
-----------
librdkafka/trunk: Initial commit
Added Paths:
-----------
csw/mgar/pkg/librdkafka/
csw/mgar/pkg/librdkafka/Makefile
csw/mgar/pkg/librdkafka/branches/
csw/mgar/pkg/librdkafka/tags/
csw/mgar/pkg/librdkafka/trunk/
csw/mgar/pkg/librdkafka/trunk/Makefile
csw/mgar/pkg/librdkafka/trunk/checksums
csw/mgar/pkg/librdkafka/trunk/files/
csw/mgar/pkg/librdkafka/trunk/files/0001-Add-workaround-for-dirent-d_type.patch
csw/mgar/pkg/librdkafka/trunk/files/0002-Do-not-downrev-_POSIX_C_SOURCE.patch
csw/mgar/pkg/librdkafka/trunk/files/0003-Use-POSIX-compliant-__typeof__.patch
Added: csw/mgar/pkg/librdkafka/Makefile
===================================================================
--- csw/mgar/pkg/librdkafka/Makefile (rev 0)
+++ csw/mgar/pkg/librdkafka/Makefile 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1,2 @@
+%:
+ $(MAKE) -C trunk $*
Index: csw/mgar/pkg/librdkafka/trunk
===================================================================
--- csw/mgar/pkg/librdkafka/trunk 2020-12-18 20:24:29 UTC (rev 26719)
+++ csw/mgar/pkg/librdkafka/trunk 2020-12-29 13:17:31 UTC (rev 26720)
Property changes on: csw/mgar/pkg/librdkafka/trunk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+work
Added: csw/mgar/pkg/librdkafka/trunk/Makefile
===================================================================
--- csw/mgar/pkg/librdkafka/trunk/Makefile (rev 0)
+++ csw/mgar/pkg/librdkafka/trunk/Makefile 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1,70 @@
+# $Id$
+# TODO (release-critical prefixed with !, non release-critical with *)
+#
+NAME = librdkafka
+VERSION = 1.5.3
+GARTYPE = v2
+
+DESCRIPTION = Brief description
+define BLURB
+ Long description
+endef
+
+MASTER_SITES = https://github.com/edenhill/librdkafka/archive/
+DISTFILES += $(DISTNAME).tar.gz
+
+GARCOMPILER = GNU
+
+PATCHFILES += 0001-Add-workaround-for-dirent-d_type.patch
+PATCHFILES += 0002-Do-not-downrev-_POSIX_C_SOURCE.patch
+PATCHFILES += 0003-Use-POSIX-compliant-__typeof__.patch
+
+PACKAGES += CSWlibrdkafka1
+SPKG_DESC_CSWlibrdkafka1 = The Apache Kafka C client library, librdkafka.so.1
+PKGFILES_CSWlibrdkafka1 += $(call pkgfiles_lib,librdkafka.so.1)
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWlibssl1-0-0
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWlibz1
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWlibsasl2-2
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWliblz4-1
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWlibgcc-s1
+RUNTIME_DEP_PKGS_CSWlibrdkafka1 += CSWlibzstd1
+
+PACKAGES += CSWlibrdkafka++1
+SPKG_DESC_CSWlibrdkafka++1 = The Apache Kafka C++ client library, librdkafka++.so.1
+PKGFILES_CSWlibrdkafka++1 += $(call pkgfiles_lib,librdkafka++.so.1)
+RUNTIME_DEP_PKGS_CSWlibrdkafka++1 += CSWlibrdkafka1
+RUNTIME_DEP_PKGS_CSWlibrdkafka++1 += CSWlibstdc++6
+RUNTIME_DEP_PKGS_CSWlibrdkafka++1 += CSWlibgcc-s1
+
+PACKAGES += CSWlibrdkafka-dev
+SPKG_DESC_CSWlibrdkafka-dev = Development files for librdkafka.so.1 and librdkafka++.so.1
+# PKGFILES is catchall
+RUNTIME_DEP_PKGS_CSWlibrdkafka-dev += CSWlibrdkafka1
+RUNTIME_DEP_PKGS_CSWlibrdkafka-dev += CSWlibrdkafka++1
+
+# First special case /usr/local/etc
+REINPLACEMENTS += etc
+REINPLACE_MATCH_etc = /usr/local/etc
+REINPLACE_WITH_etc = /etc/opt/csw
+REINPLACE_FILES_etc += src/rdkafka_ssl.c
+
+# Now the other occurrences
+REINPLACE_USRLOCAL += src/rdkafka_ssl.c
+
+BUILD64 = 1
+
+# Relocate documentation to subdir
+docdir = $(sharedstatedir)/doc/librdkafka_dev
+
+CONFIGURE_ARGS = $(DIRPATHS)
+
+# We have bashisms in the Makefile
+BUILD_ARGS += SHELL=/opt/csw/bin/bash
+TEST_ARGS += SHELL=/opt/csw/bin/bash
+INSTALL_ARGS += SHELL=/opt/csw/bin/bash
+
+# Static libraries are already excluded, also skip the corresponding pkgconfig-files
+EXTRA_MERGE_EXCLUDE_FILES += .*-static\.pc
+
+include gar/category.mk
+
Property changes on: csw/mgar/pkg/librdkafka/trunk/Makefile
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: csw/mgar/pkg/librdkafka/trunk/checksums
===================================================================
--- csw/mgar/pkg/librdkafka/trunk/checksums (rev 0)
+++ csw/mgar/pkg/librdkafka/trunk/checksums 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1 @@
+17017d9bdaf1398087d1f0dcad2e5cc7 librdkafka-1.5.3.tar.gz
Added: csw/mgar/pkg/librdkafka/trunk/files/0001-Add-workaround-for-dirent-d_type.patch
===================================================================
--- csw/mgar/pkg/librdkafka/trunk/files/0001-Add-workaround-for-dirent-d_type.patch (rev 0)
+++ csw/mgar/pkg/librdkafka/trunk/files/0001-Add-workaround-for-dirent-d_type.patch 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1,33 @@
+From baae4431152352cb84e941f3a31ee0b5f18a3308 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Mon, 28 Dec 2020 20:40:40 +0100
+Subject: [PATCH 1/2] Add workaround for dirent->d_type
+
+---
+ src/rdkafka.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/rdkafka.c b/src/rdkafka.c
+index 789d04b..c1ceea6 100644
+--- a/src/rdkafka.c
++++ b/src/rdkafka.c
+@@ -4579,13 +4579,14 @@ rd_bool_t rd_kafka_dir_is_empty (const char *path) {
+ return rd_true;
+
+ while ((d = readdir(dir))) {
++ struct stat st;
+
+ if (!strcmp(d->d_name, ".") ||
+ !strcmp(d->d_name, ".."))
+ continue;
+
+- if (d->d_type == DT_REG || d->d_type == DT_LNK ||
+- d->d_type == DT_DIR) {
++ if (stat(d->d_name, &st) == 0 &&
++ (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode) || S_ISDIR(st.st_mode))) {
+ closedir(dir);
+ return rd_false;
+ }
+--
+2.4.0
+
Added: csw/mgar/pkg/librdkafka/trunk/files/0002-Do-not-downrev-_POSIX_C_SOURCE.patch
===================================================================
--- csw/mgar/pkg/librdkafka/trunk/files/0002-Do-not-downrev-_POSIX_C_SOURCE.patch (rev 0)
+++ csw/mgar/pkg/librdkafka/trunk/files/0002-Do-not-downrev-_POSIX_C_SOURCE.patch 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1,25 @@
+From 25fce56c0c725ba3c473cadb4c362e2bffd8fb18 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Tue, 29 Dec 2020 09:22:41 +0100
+Subject: [PATCH 2/2] Do not downrev _POSIX_C_SOURCE
+
+---
+ src/rd.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rd.h b/src/rd.h
+index 6500d3e..c5d577e 100644
+--- a/src/rd.h
++++ b/src/rd.h
+@@ -41,7 +41,7 @@
+
+ #define __need_IOV_MAX
+ #ifndef _POSIX_C_SOURCE
+-#define _POSIX_C_SOURCE 200809L /* for timespec on solaris */
++// define _POSIX_C_SOURCE 200809L /* for timespec on solaris */
+ #endif
+ #endif
+
+--
+2.4.0
+
Added: csw/mgar/pkg/librdkafka/trunk/files/0003-Use-POSIX-compliant-__typeof__.patch
===================================================================
--- csw/mgar/pkg/librdkafka/trunk/files/0003-Use-POSIX-compliant-__typeof__.patch (rev 0)
+++ csw/mgar/pkg/librdkafka/trunk/files/0003-Use-POSIX-compliant-__typeof__.patch 2020-12-29 13:17:31 UTC (rev 26720)
@@ -0,0 +1,30 @@
+From f8af523f2fda0fa39c4406c433f1d33a4296b7fd Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Tue, 29 Dec 2020 13:38:18 +0100
+Subject: [PATCH] Use POSIX-compliant __typeof__
+
+---
+ src/snappy_compat.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/snappy_compat.h b/src/snappy_compat.h
+index 388c3b6..9f63a9f 100644
+--- a/src/snappy_compat.h
++++ b/src/snappy_compat.h
+@@ -75,11 +75,11 @@ struct iovec {
+ #endif
+
+ #define get_unaligned_memcpy(x) ({ \
+- typeof(*(x)) _ret; \
++ __typeof__(*(x)) _ret; \
+ memcpy(&_ret, (x), sizeof(*(x))); \
+ _ret; })
+ #define put_unaligned_memcpy(v,x) ({ \
+- typeof((v)) _v = (v); \
++ __typeof__((v)) _v = (v); \
+ memcpy((x), &_v, sizeof(*(x))); })
+
+ #define get_unaligned_direct(x) (*(x))
+--
+2.4.0
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list