Noux: add noux-pkg/less

Issue #2014
This commit is contained in:
Josef Söntgen 2012-10-04 11:33:57 +02:00 committed by Christian Helmuth
parent 7556663e7e
commit b80939cc0a
5 changed files with 51 additions and 2 deletions

View File

@ -0,0 +1 @@
58e87934afd2c2ed0f9bc808f23d838bdf578f69

View File

@ -0,0 +1,11 @@
LICENSE := GPLv3
VERSION := 481
DOWNLOADS := less.archive
URL(less) := http://ftp.gnu.org/gnu/less/less-$(VERSION).tar.gz
SHA(less) := 58e7e62a760a9ca3636349de8e3357f7102aea1d
SIG(less) := ${URL(less)}.sig
KEY(less) := GNU
DIR(less) := src/noux-pkg/less
PATCHES := src/noux-pkg/less/tty_fd.patch

View File

@ -24,7 +24,7 @@ lappend_if [have_spec gpio] build_components drivers/gpio
#
# Build Noux packages only once
#
foreach pkg {bash coreutils vim diffutils} {
foreach pkg {bash coreutils vim diffutils less} {
lappend_if [expr ![file exists bin/$pkg]] build_components noux-pkg/$pkg }
source ${genode_dir}/repos/base/run/platform_drv.inc
@ -50,6 +50,7 @@ exec tar cfv bin/bash.tar -h -C bin/bash .
exec tar cfv bin/coreutils.tar -h -C bin/coreutils .
exec tar cfv bin/vim.tar -h -C bin/vim .
exec tar cfv bin/diffutils.tar -h -C bin/diffutils .
exec tar cfv bin/less.tar -h -C bin/less .
create_boot_directory
@ -137,6 +138,12 @@ append config {
<dir name="user">
<!-- just a place holder -->
<rom name="timer" />
<inline name="diff_me_a.txt">
Hello world ?!
</inline>
<inline name="diff_me_b.txt">
Hello world !!
</inline>
</dir>
</dir>
</content>
@ -153,6 +160,7 @@ append config {
<tar name="coreutils.tar" />
<tar name="vim.tar" />
<tar name="diffutils.tar" />
<tar name="less.tar" />
<tar name="bash.tar" />
<!-- Example of how to impose policy onto a file system
@ -189,7 +197,7 @@ install_config $config
set boot_modules {
core init timer ld.lib.so noux terminal ram_fs
libc.lib.so libm.lib.so libc_noux.lib.so ncurses.lib.so
bash.tar coreutils.tar diffutils.tar vim.tar
bash.tar coreutils.tar diffutils.tar less.tar vim.tar
rtc_drv
}

View File

@ -0,0 +1,17 @@
TARGET = less
LIBS = ncurses
#
# Make the ncurses linking test succeed and copy the actual Makefile
#
Makefile: dummy_libs
NOUX_LDFLAGS += -L$(PWD)
dummy_libs: libncursesw.a
libncursesw.a:
$(VERBOSE)$(AR) -rc $@
include $(REP_DIR)/mk/noux.mk

View File

@ -0,0 +1,12 @@
+++ src/noux-pkg/less/ttyin.c 2012-06-15 14:49:18.465893032 +0200
@@ -74,7 +74,9 @@
/* The __open() system call translates "/dev/tty" to "con". */
tty = __open("/dev/tty", OPEN_READ);
#else
- tty = open("/dev/tty", OPEN_READ);
+ //tty = open("/dev/tty", OPEN_READ);
+ /* we currently do not have actual terminal devs on NOUX. */
+ tty = 0;
#endif
if (tty < 0)
tty = 2;