* [ptxdist] [PATCH] Add 'libpipeline'
@ 2011-12-25 17:55 Juergen Beisert
2012-01-04 9:45 ` Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Juergen Beisert @ 2011-12-25 17:55 UTC (permalink / raw)
To: ptxdist
From its README:
libpipeline is a C library for setting up and running pipelines of processes,
without needing to involve shell command-line parsing which is often
error-prone and insecure. This alleviates programmers of the need to
laboriously construct pipelines using lower-level primitives such as fork and
execve.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
diff --git a/rules/libpipeline.in b/rules/libpipeline.in
new file mode 100644
index 0000000..03abcdb
--- /dev/null
+++ b/rules/libpipeline.in
@@ -0,0 +1,20 @@
+## SECTION=system_libraries
+
+menuconfig LIBPIPELINE
+ tristate
+ prompt "libpipeline "
+ help
+ libpipeline is a C library for setting up and running pipelines of
+ processes, without needing to involve shell command-line parsing which
+ is often error-prone and insecure. This alleviates programmers of the
+ need to laboriously construct pipelines using lower-level primitives
+ such as fork and execve.
+
+if LIBPIPELINE
+config LIBPIPELINE_SOCKETPAIR
+ bool
+ prompt "Use socketpair"
+ help
+ Use socketpair(2) as fast replacement for pipe(2)
+
+endif
diff --git a/rules/libpipeline.make b/rules/libpipeline.make
new file mode 100644
index 0000000..4228de9
--- /dev/null
+++ b/rules/libpipeline.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2011 by Juergen Beisert <jbe@pengutronix.de>
+#
+# 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_LIBPIPELINE) += libpipeline
+
+#
+# Paths and names
+#
+LIBPIPELINE_VERSION := 1.2.0
+LIBPIPELINE_MD5 := dd3a987a0d2b594716baee2f73d61ae3
+LIBPIPELINE := libpipeline-$(LIBPIPELINE_VERSION)
+LIBPIPELINE_SUFFIX := tar.gz
+LIBPIPELINE_URL := http://download.savannah.gnu.org/releases/libpipeline/$(LIBPIPELINE).$(LIBPIPELINE_SUFFIX)
+LIBPIPELINE_SOURCE := $(SRCDIR)/$(LIBPIPELINE).$(LIBPIPELINE_SUFFIX)
+LIBPIPELINE_DIR := $(BUILDDIR)/$(LIBPIPELINE)
+LIBPIPELINE_LICENSE := GPLv3
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+LIBPIPELINE_CONF_ENV := $(CROSS_ENV)
+LIBPIPELINE_CONF_TOOL := autoconf
+LIBPIPELINE_CONF_OPT := $(CROSS_AUTOCONF_USR) \
+ --enable-silent-rules \
+ --disable-dependency-tracking \
+ --disable-static \
+ --enable-shared \
+ --enable-fast-install \
+ --enable-threads=posix \
+ --disable-rpath
+
+ifdef PTXCONF_LIBPIPELINE_SOCKETPAIR
+LIBPIPELINE_CONF_OPT += --enable-socketpair-pipe
+# we know it works on our system
+# (but 'configure' cannot check it due to cross compiling)
+LIBPIPELINE_CONF_ENV += pipeline_cv_socketpair_pipe=yes \
+ pipeline_cv_socketpair_mode=yes
+else
+LIBPIPELINE_CONF_OPT += --disable-socketpair-pipe
+endif
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/libpipeline.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, libpipeline)
+ @$(call install_fixup, libpipeline,PRIORITY,optional)
+ @$(call install_fixup, libpipeline,SECTION,base)
+ @$(call install_fixup, libpipeline,AUTHOR,"Juergen Beisert <jbe@pengutronix.de>")
+ @$(call install_fixup, libpipeline,DESCRIPTION,"pipeline manipulation library")
+
+ @$(call install_lib, libpipeline, 0, 0, 0644, libpipeline)
+
+ @$(call install_finish, libpipeline)
+
+ @$(call touch)
+
+# vim: syntax=make
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [PATCH] Add 'libpipeline'
2011-12-25 17:55 [ptxdist] [PATCH] Add 'libpipeline' Juergen Beisert
@ 2012-01-04 9:45 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-01-04 9:45 UTC (permalink / raw)
To: ptxdist
On Sun, Dec 25, 2011 at 06:55:41PM +0100, Juergen Beisert wrote:
> >From its README:
> libpipeline is a C library for setting up and running pipelines of processes,
> without needing to involve shell command-line parsing which is often
> error-prone and insecure. This alleviates programmers of the need to
> laboriously construct pipelines using lower-level primitives such as fork and
> execve.
>
> Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
>
> diff --git a/rules/libpipeline.in b/rules/libpipeline.in
> new file mode 100644
> index 0000000..03abcdb
> --- /dev/null
> +++ b/rules/libpipeline.in
> @@ -0,0 +1,20 @@
> +## SECTION=system_libraries
> +
> +menuconfig LIBPIPELINE
> + tristate
> + prompt "libpipeline "
> + help
> + libpipeline is a C library for setting up and running pipelines of
> + processes, without needing to involve shell command-line parsing which
> + is often error-prone and insecure. This alleviates programmers of the
> + need to laboriously construct pipelines using lower-level primitives
> + such as fork and execve.
> +
> +if LIBPIPELINE
> +config LIBPIPELINE_SOCKETPAIR
> + bool
> + prompt "Use socketpair"
> + help
> + Use socketpair(2) as fast replacement for pipe(2)
> +
> +endif
> diff --git a/rules/libpipeline.make b/rules/libpipeline.make
> new file mode 100644
> index 0000000..4228de9
> --- /dev/null
> +++ b/rules/libpipeline.make
> @@ -0,0 +1,75 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2011 by Juergen Beisert <jbe@pengutronix.de>
> +#
> +# 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_LIBPIPELINE) += libpipeline
> +
> +#
> +# Paths and names
> +#
> +LIBPIPELINE_VERSION := 1.2.0
> +LIBPIPELINE_MD5 := dd3a987a0d2b594716baee2f73d61ae3
> +LIBPIPELINE := libpipeline-$(LIBPIPELINE_VERSION)
> +LIBPIPELINE_SUFFIX := tar.gz
> +LIBPIPELINE_URL := http://download.savannah.gnu.org/releases/libpipeline/$(LIBPIPELINE).$(LIBPIPELINE_SUFFIX)
> +LIBPIPELINE_SOURCE := $(SRCDIR)/$(LIBPIPELINE).$(LIBPIPELINE_SUFFIX)
> +LIBPIPELINE_DIR := $(BUILDDIR)/$(LIBPIPELINE)
> +LIBPIPELINE_LICENSE := GPLv3
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +#
> +# autoconf
> +#
> +LIBPIPELINE_CONF_ENV := $(CROSS_ENV)
> +LIBPIPELINE_CONF_TOOL := autoconf
> +LIBPIPELINE_CONF_OPT :=
break
$(CROSS_AUTOCONF_USR) \
> + --enable-silent-rules \
> + --disable-dependency-tracking \
Don't do this. It's not worth much and the prossible errors are hard to
track.
> + --disable-static \
> + --enable-shared \
> + --enable-fast-install \
> + --enable-threads=posix \
> + --disable-rpath
> +
> +ifdef PTXCONF_LIBPIPELINE_SOCKETPAIR
> +LIBPIPELINE_CONF_OPT += --enable-socketpair-pipe
> +# we know it works on our system
> +# (but 'configure' cannot check it due to cross compiling)
> +LIBPIPELINE_CONF_ENV += pipeline_cv_socketpair_pipe=yes \
> + pipeline_cv_socketpair_mode=yes
> +else
> +LIBPIPELINE_CONF_OPT += --disable-socketpair-pipe
> +endif
the cache variables are only checked for --enable-..., right?
So always define them and use
--$(call ptx/endis, PTXCONF_LIBPIPELINE_SOCKETPAIR)-socketpair-pipe
Michael
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libpipeline.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, libpipeline)
> + @$(call install_fixup, libpipeline,PRIORITY,optional)
> + @$(call install_fixup, libpipeline,SECTION,base)
> + @$(call install_fixup, libpipeline,AUTHOR,"Juergen Beisert <jbe@pengutronix.de>")
> + @$(call install_fixup, libpipeline,DESCRIPTION,"pipeline manipulation library")
> +
> + @$(call install_lib, libpipeline, 0, 0, 0644, libpipeline)
> +
> + @$(call install_finish, libpipeline)
> +
> + @$(call touch)
> +
> +# vim: syntax=make
>
> --
> Pengutronix e.K. | Juergen Beisert |
> Linux Solutions for Science and Industry | http://www.pengutronix.de/ |
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-04 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-25 17:55 [ptxdist] [PATCH] Add 'libpipeline' Juergen Beisert
2012-01-04 9:45 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox