[ptxdist] [PATCH v5] jimtcl: new package
Jim is an opensource small-footprint implementation of the Tcl programming language. This package is intended to replace Tcl (which is in staging already) as it fits PTXdist more due to its small size. Signed-off-by: Ladislav Michl --- Changes: -v2: use http url to help poor firewalled developers in corporate -v3: bootstrap using host-jimtcl. If no tclsh is found inside host-jimtcl package just compiles its own bootsrap shell. Add config support for build options. -v4: set CCACHE=none to prevent jimtcl to discover ccache on its own (squashed patch by Roland Hieber) -v5: fix trailing space, add !TCL dependency for jim shell rules/host-jimtcl.in | 6 +++ rules/host-jimtcl.make | 40 +++ rules/jimtcl.in| 51 +++ rules/jimtcl.make | 91 ++ 4 files changed, 188 insertions(+) create mode 100644 rules/host-jimtcl.in create mode 100644 rules/host-jimtcl.make create mode 100644 rules/jimtcl.in create mode 100644 rules/jimtcl.make diff --git a/rules/host-jimtcl.in b/rules/host-jimtcl.in new file mode 100644 index 0..ccd2d23bd --- /dev/null +++ b/rules/host-jimtcl.in @@ -0,0 +1,6 @@ +## SECTION=hosttools_noprompt +## SECTION=hosttools_platform + +config HOST_JIMTCL + tristate + default ALLYES diff --git a/rules/host-jimtcl.make b/rules/host-jimtcl.make new file mode 100644 index 0..60738f752 --- /dev/null +++ b/rules/host-jimtcl.make @@ -0,0 +1,40 @@ +# -*-makefile-*- +# +# Copyright (C) 2018 by Ladislav Michl +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +HOST_PACKAGES-$(PTXCONF_HOST_JIMTCL) += host-jimtcl + +# +# Paths and names +# +HOST_JIMTCL:= $(JIMTCL) +HOST_JIMTCL_DIR:= $(HOST_BUILDDIR)/$(HOST_JIMTCL) + +# +# Prepare +# + +# +# Package is not using autoconf but autosetup which is enough compatible... +# +HOST_JIMTCL_CONF_TOOL := autoconf +# autosetup/cc.tcl tries to discover ccache on its own, so use 'CCACHE=none' +# to prevent that and leave PTXCONF_SETUP_CCACHE in charge. +HOST_JIMTCL_CONF_ENV := \ + $(HOST_ENV) \ + CCACHE=none +HOST_JIMTCL_CONF_OPT := \ + --prefix=/usr \ + --disable-lineedit \ + --disable-docs + +# vim: syntax=make diff --git a/rules/jimtcl.in b/rules/jimtcl.in new file mode 100644 index 0..ce9e4993c --- /dev/null +++ b/rules/jimtcl.in @@ -0,0 +1,51 @@ +## SECTION=scripting_languages + +menuconfig JIMTCL + tristate + prompt "jimtcl" + select HOST_JIMTCL + select LIBC_M if JIMTCL_MATH + select OPENSSL if JIMTCL_SSL + help + Jim provides a powerful Tcl language implemented in roughly + 10k lines of code making it suitable for deployment on + Embedded Systems. + +if JIMTCL + +config JIMTCL_SHELL + bool "install jimsh" + help + Install Tcl shell on the target + +config JIMTCL_SYMLINK + bool "install tclsh symlink" + depends on JIMTCL_SHELL + depends on !TCL + help + Make tclsh symlink to jimsh + +config JIMTCL_UTF8 + bool "support utf8" + +config JIMTCL_LINEEDIT + bool "line editing" + default y + +config JIMTCL_REFERENCES + bool "support references" + default y + +config JIMTCL_MATH + bool "support math functions" + +config JIMTCL_SSL + bool "ssl/tls support in the aio extension" + +config JIMTCL_POSIX_REGEX + bool "use POSIX regex instead the built-in (Tcl-compatible) regex" + +config JIMTCL_RANDOM_HASH + bool "randomise hash tables" + +endif diff --git a/rules/jimtcl.make b/rules/jimtcl.make new file mode 100644 index 0..ad8b3608b --- /dev/null +++ b/rules/jimtcl.make @@ -0,0 +1,91 @@ +# -*-makefile-*- +# +# Copyright (C) 2018 by Ladislav Michl +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_JIMTCL) += jimtcl + +# +# Paths and names +# +JIMTCL_VERSION := 0.78 +JIMTCL_MD5 := bde9021d78a77fe28e1bbc423142ab23 +JIMTCL := jimtcl-$(JIMTCL_VERSION) +JIMTCL_SUFFIX := tar.xz +JIMTCL_URL := http://repo.or.cz/jimtcl.git;tag=$(JIMTCL_VERSION) +JIMTCL_SOURCE := $(SRCDIR)/$(JIMTCL).$(JIMTCL_SUFFIX) +JIMTCL_DIR := $(BUILDDIR)/$(JIMTCL) +JIMTCL_LICENSE := BSD-2-Clause + +# +# Prepare +# + +# +# Package is not using
[ptxdist] [RFC 1/1] grpc: new package
gRPC is a modern, open source, high-performance remote procedure call (RPC) framework. Patches are necessary to fix building with GCC 8, cross-compilation in general and problems in the template-generated Makefile. Signed-off-by: Clemens Gruber --- ...rtability-test-for-c-and-make-it-pas.patch | 41 ++ ...vent-shell-calls-longer-than-ARG_MAX.patch | 71 ...d-proto-plugins-when-cross-compiling.patch | 25 ++ ...0004-Fix-libgrpc-major-version-links.patch | 72 + patches/grpc-1.15.1/series| 7 ++ rules/grpc.in | 19 + rules/grpc.make | 80 +++ rules/host-grpc.in| 6 ++ rules/host-grpc.make | 30 +++ 9 files changed, 351 insertions(+) create mode 100644 patches/grpc-1.15.1/0001-Add-a-gcc-8.1-portability-test-for-c-and-make-it-pas.patch create mode 100644 patches/grpc-1.15.1/0002-Prevent-shell-calls-longer-than-ARG_MAX.patch create mode 100644 patches/grpc-1.15.1/0003-Do-not-build-proto-plugins-when-cross-compiling.patch create mode 100644 patches/grpc-1.15.1/0004-Fix-libgrpc-major-version-links.patch create mode 100644 patches/grpc-1.15.1/series create mode 100644 rules/grpc.in create mode 100644 rules/grpc.make create mode 100644 rules/host-grpc.in create mode 100644 rules/host-grpc.make diff --git a/patches/grpc-1.15.1/0001-Add-a-gcc-8.1-portability-test-for-c-and-make-it-pas.patch b/patches/grpc-1.15.1/0001-Add-a-gcc-8.1-portability-test-for-c-and-make-it-pas.patch new file mode 100644 index 0..a7d4b17b3 --- /dev/null +++ b/patches/grpc-1.15.1/0001-Add-a-gcc-8.1-portability-test-for-c-and-make-it-pas.patch @@ -0,0 +1,41 @@ +From: Alexander Polcyn +Date: Wed, 23 May 2018 18:04:20 -0700 +Subject: [PATCH] Add a gcc-8.1 portability test for c and make it pass + +Signed-off-by: Clemens Gruber +[cg: Reduced patch to Makefile changes in order to avoid conflicts] +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 54823a31167d..4c0ea191eb21 100644 +--- a/Makefile b/Makefile +@@ -348,7 +348,7 @@ HOST_LD ?= $(LD) + HOST_LDXX ?= $(LDXX) + + CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI) +-CXXFLAGS += -std=c++11 ++CXXFLAGS += -std=c++11 -Wno-class-memaccess -Wno-ignored-qualifiers -Wno-stringop-truncation -Wno-sizeof-pointer-div + ifeq ($(SYSTEM),Darwin) + CXXFLAGS += -stdlib=libc++ + endif +@@ -7864,7 +7864,7 @@ LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename + + $(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX + $(LIBBORINGSSL_OBJS): CXXFLAGS += -fno-rtti -fno-exceptions +-$(LIBBORINGSSL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough $(NO_W_EXTRA_SEMI) ++$(LIBBORINGSSL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -Wno-implicit-fallthrough -Wno-cast-function-type $(NO_W_EXTRA_SEMI) + + $(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(LIBBORINGSSL_OBJS) + $(E) "[AR] Creating $@" +@@ -10059,7 +10059,7 @@ PUBLIC_HEADERS_C += \ + LIBARES_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBARES_SRC + + $(LIBARES_OBJS): CPPFLAGS += -Ithird_party/cares -Ithird_party/cares/cares -fvisibility=hidden -D_GNU_SOURCE $(if $(subst Darwin,,$(SYSTEM)),,-Ithird_party/cares/config_darwin) $(if $(subst FreeBSD,,$(SYSTEM)),,-Ithird_party/cares/config_freebsd) $(if $(subst Linux,,$(SYSTEM)),,-Ithird_party/cares/config_linux) $(if $(subst OpenBSD,,$(SYSTEM)),,-Ithird_party/cares/config_openbsd) -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(if $(subst MINGW32,,$(SYSTEM)),-DHAVE_CONFIG_H,) +-$(LIBARES_OBJS): CFLAGS += -Wno-sign-conversion $(if $(subst Darwin,,$(SYSTEM)),,-Wno-shorten-64-to-32) $(if $(subst MINGW32,,$(SYSTEM)),-Wno-invalid-source-encoding,) ++$(LIBARES_OBJS): CFLAGS += -Wno-sign-conversion -Wno-sizeof-pointer-memaccess -Wno-stringop-overflow $(if $(subst Darwin,,$(SYSTEM)),,-Wno-shorten-64-to-32) $(if $(subst MINGW32,,$(SYSTEM)),-Wno-invalid-source-encoding,) + + $(LIBDIR)/$(CONFIG)/libares.a: $(LIBARES_OBJS) + $(E) "[AR] Creating $@" diff --git a/patches/grpc-1.15.1/0002-Prevent-shell-calls-longer-than-ARG_MAX.patch b/patches/grpc-1.15.1/0002-Prevent-shell-calls-longer-than-ARG_MAX.patch new file mode 100644 index 0..4dc8135fe --- /dev/null +++ b/patches/grpc-1.15.1/0002-Prevent-shell-calls-longer-than-ARG_MAX.patch @@ -0,0 +1,71 @@ +From:
[ptxdist] [RFC 0/1] grpc
Hi, I am sending the current state of my grpc package for PTXdist. gRPC is a RPC library, using HTTP/2 and protocol buffers. See grpc.io for more information. Because I am not entirely happy with it, I am flagging it as RFC. Pain points: - I had to patch the template-generated Makefile for cross-compiling (separate target and host packages), see patch 3 - I had to patch version numbers in said Makefile, see patch 4 I tested it successfully with an in-house C++ application which uses gRPC and the meson build system. I could also send another patch, adding support for the collectd grpc plugin, for PTXdist to have a testcase within. When building the host package, there are several warnings about the missing c-ares, but it just falls back to using getaddrinfo and is not important for the host tools/plugins, in my opinion. Also, host-openssl and host-zlib is not necessary, so the warnings can be ignored. Would be great if some of you could test it and maybe suggest improvements. Thanks, Clemens Clemens Gruber (1): grpc: new package ...rtability-test-for-c-and-make-it-pas.patch | 41 ++ ...vent-shell-calls-longer-than-ARG_MAX.patch | 71 ...d-proto-plugins-when-cross-compiling.patch | 25 ++ ...0004-Fix-libgrpc-major-version-links.patch | 72 + patches/grpc-1.15.1/series| 7 ++ rules/grpc.in | 19 + rules/grpc.make | 80 +++ rules/host-grpc.in| 6 ++ rules/host-grpc.make | 30 +++ 9 files changed, 351 insertions(+) create mode 100644 patches/grpc-1.15.1/0001-Add-a-gcc-8.1-portability-test-for-c-and-make-it-pas.patch create mode 100644 patches/grpc-1.15.1/0002-Prevent-shell-calls-longer-than-ARG_MAX.patch create mode 100644 patches/grpc-1.15.1/0003-Do-not-build-proto-plugins-when-cross-compiling.patch create mode 100644 patches/grpc-1.15.1/0004-Fix-libgrpc-major-version-links.patch create mode 100644 patches/grpc-1.15.1/series create mode 100644 rules/grpc.in create mode 100644 rules/grpc.make create mode 100644 rules/host-grpc.in create mode 100644 rules/host-grpc.make -- 2.19.1 ___ ptxdist mailing list ptxdist@pengutronix.de