* [ptxdist] [PATCH] jq: Add new package
@ 2018-04-04 7:58 Alexander Dahl
0 siblings, 0 replies; only message in thread
From: Alexander Dahl @ 2018-04-04 7:58 UTC (permalink / raw)
To: ptxdist
Tested with OSELAS.Toolchain-2014.12.3/arm-v5te-linux-gnueabi and
ptxdist 2017.09.0.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
.../jq-1.5/0001-Support-without-oniguruma.patch | 60 +++++++++++++++++++
patches/jq-1.5/autogen.sh | 1 +
patches/jq-1.5/series | 4 ++
rules/jq.in | 9 +++
rules/jq.make | 68 ++++++++++++++++++++++
5 files changed, 142 insertions(+)
create mode 100644 patches/jq-1.5/0001-Support-without-oniguruma.patch
create mode 120000 patches/jq-1.5/autogen.sh
create mode 100644 patches/jq-1.5/series
create mode 100644 rules/jq.in
create mode 100644 rules/jq.make
diff --git a/patches/jq-1.5/0001-Support-without-oniguruma.patch b/patches/jq-1.5/0001-Support-without-oniguruma.patch
new file mode 100644
index 0000000000..7e85d1b40a
--- /dev/null
+++ b/patches/jq-1.5/0001-Support-without-oniguruma.patch
@@ -0,0 +1,60 @@
+From: David Tolnay <dtolnay@gmail.com>
+Date: Sat, 21 Nov 2015 10:05:37 -0800
+Subject: [PATCH] Support --without-oniguruma
+
+---
+ configure.ac | 41 ++++++++++++++++++++---------------------
+ 1 file changed, 20 insertions(+), 21 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4bb436ee34d6..f802ecfca45b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -52,27 +52,26 @@ fi
+ AC_ARG_WITH([oniguruma],
+ [AS_HELP_STRING([--with-oniguruma=prefix],
+ [try this for a non-standard install prefix of the oniguruma library])],
+- [ONIGURUMAPATHSET=1],
+- [ONIGURUMAPATHSET=0])
+-
+-if test $ONIGURUMAPATHSET = 1; then
+- CFLAGS="$CFLAGS -I${with_oniguruma}/include"
+- LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
+-fi
+-
+-# check for ONIGURUMA library
+-HAVE_ONIGURUMA=0
+-AC_CHECK_HEADER("oniguruma.h",
+- AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; HAVE_ONIGURUMA=1;]))
+-
+-# handle check results
+-if test $HAVE_ONIGURUMA != 1; then
+- AC_MSG_NOTICE([Oniguruma was not found.])
+- AC_MSG_NOTICE([ Try setting the location using '--with-oniguruma=PREFIX' ])
+-else
+- AC_DEFINE([HAVE_ONIGURUMA],1,[Define to 1 if Oniguruma is installed])
+-fi
+-
++ [],
++ [with_oniguruma=yes])
++
++AS_IF([test "x$with_oniguruma" != xno], [
++ AS_IF([test "x$with_oniguruma" != xyes], [
++ CFLAGS="$CFLAGS -I${with_oniguruma}/include"
++ LDFLAGS="$LDFLAGS -L${with_oniguruma}/lib"
++ ])
++ # check for ONIGURUMA library
++ have_oniguruma=0
++ AC_CHECK_HEADER("oniguruma.h",
++ AC_CHECK_LIB([onig],[onig_version],[LIBS="$LIBS -lonig"; have_oniguruma=1;]))
++ # handle check results
++ AS_IF([test $have_oniguruma = 1], [
++ AC_DEFINE([HAVE_ONIGURUMA], 1, [Define to 1 if Oniguruma is installed])
++ ], [
++ AC_MSG_NOTICE([Oniguruma was not found.])
++ AC_MSG_NOTICE([Try setting the location using '--with-oniguruma=PREFIX'])
++ ])
++])
+
+ dnl Check for valgrind
+ AC_CHECK_PROGS(valgrind_cmd, valgrind)
diff --git a/patches/jq-1.5/autogen.sh b/patches/jq-1.5/autogen.sh
new file mode 120000
index 0000000000..9f8a4cb7dd
--- /dev/null
+++ b/patches/jq-1.5/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/jq-1.5/series b/patches/jq-1.5/series
new file mode 100644
index 0000000000..e9b5518aba
--- /dev/null
+++ b/patches/jq-1.5/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Support-without-oniguruma.patch
+# b1ba38754fe362c3d5862f8f541586c8 - git-ptx-patches magic
diff --git a/rules/jq.in b/rules/jq.in
new file mode 100644
index 0000000000..03354642b4
--- /dev/null
+++ b/rules/jq.in
@@ -0,0 +1,9 @@
+## SECTION=shell_and_console
+
+config JQ
+ tristate
+ prompt "jq"
+ help
+ lightweight and flexible command-line JSON processor
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/jq.make b/rules/jq.make
new file mode 100644
index 0000000000..9f0f87511f
--- /dev/null
+++ b/rules/jq.make
@@ -0,0 +1,68 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Alexander Dahl <ada@thorsis.com>
+#
+# 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_JQ) += jq
+
+#
+# Paths and names
+#
+JQ_VERSION := 1.5
+JQ_MD5 := 0933532b086bd8b6a41c1b162b1731f9
+JQ := jq-$(JQ_VERSION)
+JQ_SUFFIX := tar.gz
+JQ_URL := https://github.com/stedolan/jq/releases/download/$(JQ)/$(JQ).$(JQ_SUFFIX)
+JQ_SOURCE := $(SRCDIR)/$(JQ).$(JQ_SUFFIX)
+JQ_DIR := $(BUILDDIR)/$(JQ)
+JQ_LICENSE := MIT AND CC-BY-3.0
+JQ_LICENSE_FILES := file://COPYING;md5=29dd0c35d7e391bb8d515eacf7592e00
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+JQ_CONF_TOOL := autoconf
+JQ_CONF_OPT := \
+ $(CROSS_AUTOCONF_USR) \
+ --disable-maintainer-mode \
+ --disable-valgrind \
+ --disable-gcov \
+ --disable-docs \
+ --disable-error-injection \
+ --disable-all-static \
+ --enable-pthread-tls \
+ --without-oniguruma
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/jq.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, jq)
+ @$(call install_fixup, jq,PRIORITY,optional)
+ @$(call install_fixup, jq,SECTION,base)
+ @$(call install_fixup, jq,AUTHOR,"Alexander Dahl <ada@thorsis.com>")
+ @$(call install_fixup, jq,DESCRIPTION,missing)
+
+ @$(call install_lib, jq, 0, 0, 0644, libjq)
+ @$(call install_copy, jq, 0, 0, 0755, -, /usr/bin/jq)
+
+ @$(call install_finish, jq)
+
+ @$(call touch)
+
+# vim: ft=make noet ts=8 sw=8
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-04 7:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04 7:58 [ptxdist] [PATCH] jq: Add new package Alexander Dahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox