Patchwork Added the empty package

login
register
mail settings
Submitter Simon Dawson
Date April 10, 2012, 9:15 a.m.
Message ID <1334049334-9276-1-git-send-email-spdawson@gmail.com>
Download mbox | patch
Permalink /patch/151526/
State Changes Requested
Headers show

Comments

Simon Dawson - April 10, 2012, 9:15 a.m.
From: Simon Dawson <spdawson@gmail.com>

Signed-off-by: Simon Dawson <spdawson@gmail.com>
---
 Improved patch in response to comments

 package/Config.in       |    1 +
 package/empty/Config.in |    6 ++++++
 package/empty/empty.mk  |   19 +++++++++++++++++++
 3 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 package/empty/Config.in
 create mode 100644 package/empty/empty.mk

1.7.5.4
Peter Korsgaard - May 5, 2012, 10:36 p.m.
>>>>> "spdawson" == spdawson  <spdawson@gmail.com> writes:

 spdawson> From: Simon Dawson <spdawson@gmail.com>
 spdawson> Signed-off-by: Simon Dawson <spdawson@gmail.com>

I was about to commit this, but noticed a few errors. Care to fix and
resubmit?

 spdawson> new file mode 100644
 spdawson> index 0000000..d15a18f
 spdawson> --- /dev/null
 spdawson> +++ b/package/empty/empty.mk
 spdawson> @@ -0,1 +1,18 @@

I don't know where this first 0,1 comes from, but git am andn patch very
much dislikes it. I had to change it to to 0,0 to get the patch to
apply.


 spdawson> +#############################################################
 spdawson> +#
 spdawson> +# empty
 spdawson> +#
 spdawson> +#############################################################
 spdawson> +EMPTY_VERSION = 0.6.18b
 spdawson> +EMPTY_SOURCE = empty-$(EMPTY_VERSION).tgz
 spdawson> +EMPTY_SITE = http://downloads.sourceforge.net/project/empty/empty/empty-$(EMPTY_VERSION)
 spdawson> +
 spdawson> +define EMPTY_BUILD_CMDS
 spdawson> +	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all

variables passed in the environment do not override settings in the
Makefile (unless ?= is used), so it ends up using my host compiler:

make[1]: Entering directory `/home/peko/source/buildroot/output/build/empty-0.6.18b'
gcc  -pipe -Os  -Wall -lutil -o empty empty.c
empty.c: In function ‘pidbyppid’:
empty.c:689:9: warning: array subscript is above array bounds [-Warray-bounds]
make[1]: Leaving directory `/home/peko/source/buildroot/output/build/empty-0.6.18b'

I suggest you add TARGET_CONFIGURE_OPTS as a make argument instead.

 spdawson> +endef
 spdawson> +
 spdawson> +define EMPTY_INSTALL_TARGET_CMDS
 spdawson> +	$(INSTALL) -D $(@D)/empty $(TARGET_DIR)/usr/bin/empty

We normally add explicit -m 0755 for installation of binaries.

Patch

diff --git a/package/Config.in b/package/Config.in
index 4c6d4d8..205fa8a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -426,6 +426,7 @@  endmenu
 endmenu
 
 menu "Miscellaneous"
+source "package/empty/Config.in"
 source "package/shared-mime-info/Config.in"
 endmenu
 
diff --git a/package/empty/Config.in b/package/empty/Config.in
new file mode 100644
index 0000000..67b09fc
--- /dev/null
+++ b/package/empty/Config.in
@@ -0,0 +1,6 @@ 
+config BR2_PACKAGE_EMPTY
+	bool "empty"
+	help
+	  Run processes and applications under pseudo-terminal (PTY) sessions.
+
+	  http://empty.sourceforge.net/
diff --git a/package/empty/empty.mk b/package/empty/empty.mk
new file mode 100644
index 0000000..d15a18f
--- /dev/null
+++ b/package/empty/empty.mk
@@ -0,1 +1,18 @@ 
+#############################################################
+#
+# empty
+#
+#############################################################
+EMPTY_VERSION = 0.6.18b
+EMPTY_SOURCE = empty-$(EMPTY_VERSION).tgz
+EMPTY_SITE = http://downloads.sourceforge.net/project/empty/empty/empty-$(EMPTY_VERSION)
+
+define EMPTY_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all
+endef
+
+define EMPTY_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/empty $(TARGET_DIR)/usr/bin/empty
+endef
+
+$(eval $(call GENTARGETS))
--