Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cookbook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
cookbook
Commits
2c3e7f0f
Verified
Commit
2c3e7f0f
authored
6 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Fix cmatrix and ncdu
parent
3c63fd2b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
recipes/cmatrix/cmatrix.patch
+0
-101
0 additions, 101 deletions
recipes/cmatrix/cmatrix.patch
recipes/cmatrix/recipe.sh
+2
-2
2 additions, 2 deletions
recipes/cmatrix/recipe.sh
recipes/ncdu/recipe.sh
+2
-8
2 additions, 8 deletions
recipes/ncdu/recipe.sh
with
4 additions
and
111 deletions
recipes/cmatrix/cmatrix.patch
deleted
100644 → 0
+
0
−
101
View file @
3c63fd2b
diff -ru source/cmatrix.c source-new/cmatrix.c
--- source/cmatrix.c 2017-11-18 13:21:42.992870796 -0800
+++ source-new/cmatrix.c 2017-11-18 13:20:45.446407288 -0800
@@ -37,7 +37,7 @@
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
-#include <curses.h>
+#include <ncurses/curses.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
@@ -215,47 +215,49 @@
void handle_sigwinch(int s) {
- char *tty = NULL;
- int fd = 0;
- int result = 0;
- struct winsize win;
-
- tty = ttyname(0);
- if (!tty) {
- return;
- }
- fd = open(tty, O_RDWR);
- if (fd == -1) {
- return;
- }
- result = ioctl(fd, TIOCGWINSZ, &win);
- if (result == -1) {
- return;
- }
-
- COLS = win.ws_col;
- LINES = win.ws_row;
-
- if(LINES <10){
- LINES = 10;
- }
- if(COLS <10){
- COLS = 10;
- }
-
-#ifdef HAVE_RESIZETERM
- resizeterm(LINES, COLS);
-#ifdef HAVE_WRESIZE
- if (wresize(stdscr, LINES, COLS) == ERR) {
- c_die("Cannot resize window!");
- }
-#endif /* HAVE_WRESIZE */
-#endif /* HAVE_RESIZETERM */
-
- var_init();
- /* Do these because width may have changed... */
- clear();
- refresh();
+/*
+ * char *tty = NULL;
+ * int fd = 0;
+ * int result = 0;
+ * struct winsize win;
+ *
+ * tty = ttyname(0);
+ * if (!tty) {
+ * return;
+ * }
+ * fd = open(tty, O_RDWR);
+ * if (fd == -1) {
+ * return;
+ * }
+ * result = ioctl(fd, TIOCGWINSZ, &win);
+ * if (result == -1) {
+ * return;
+ * }
+ *
+ * COLS = win.ws_col;
+ * LINES = win.ws_row;
+ *
+ * if(LINES <10){
+ * LINES = 10;
+ * }
+ * if(COLS <10){
+ * COLS = 10;
+ * }
+ *
+ *#ifdef HAVE_RESIZETERM
+ * resizeterm(LINES, COLS);
+ *#ifdef HAVE_WRESIZE
+ * if (wresize(stdscr, LINES, COLS) == ERR) {
+ * c_die("Cannot resize window!");
+ * }
+ *#endif [> HAVE_WRESIZE <]
+ *#endif [> HAVE_RESIZETERM <]
+ *
+ * var_init();
+ * [> Do these because width may have changed... <]
+ * clear();
+ * refresh();
+ */
}
This diff is collapsed.
Click to expand it.
recipes/cmatrix/recipe.sh
+
2
−
2
View file @
2c3e7f0f
...
@@ -15,7 +15,8 @@ function recipe_update {
...
@@ -15,7 +15,8 @@ function recipe_update {
function
recipe_build
{
function
recipe_build
{
sysroot
=
"
$(
realpath
../sysroot
)
"
sysroot
=
"
$(
realpath
../sysroot
)
"
export
LDFLAGS
=
"-L
$sysroot
/lib"
export
LDFLAGS
=
"-L
$sysroot
/lib"
export
CPPFLAGS
=
"-I
$sysroot
/include"
export
CPPFLAGS
=
"-I
$sysroot
/include -I
$sysroot
/include/ncurses"
autoreconf
-i
./configure
--build
=
${
BUILD
}
--host
=
${
HOST
}
--prefix
=
/
--without-fonts
./configure
--build
=
${
BUILD
}
--host
=
${
HOST
}
--prefix
=
/
--without-fonts
make
-j
"
$(
nproc
)
"
make
-j
"
$(
nproc
)
"
skip
=
1
skip
=
1
...
@@ -34,6 +35,5 @@ function recipe_clean {
...
@@ -34,6 +35,5 @@ function recipe_clean {
function
recipe_stage
{
function
recipe_stage
{
dest
=
"
$(
realpath
$1
)
"
dest
=
"
$(
realpath
$1
)
"
make
DESTDIR
=
"
$dest
"
install
make
DESTDIR
=
"
$dest
"
install
rm
-rf
$1
/share/man
skip
=
1
skip
=
1
}
}
This diff is collapsed.
Click to expand it.
recipes/ncdu/recipe.sh
+
2
−
8
View file @
2c3e7f0f
...
@@ -17,7 +17,8 @@ function recipe_build {
...
@@ -17,7 +17,8 @@ function recipe_build {
export
CPPFLAGS
=
"-I
$sysroot
/include -I
$sysroot
/include/ncurses"
export
CPPFLAGS
=
"-I
$sysroot
/include -I
$sysroot
/include/ncurses"
./configure
\
./configure
\
--build
=
${
BUILD
}
\
--build
=
${
BUILD
}
\
--host
"
$HOST
"
--host
=
"
$HOST
"
\
--prefix
=
/
make
-j
"
$(
nproc
)
"
make
-j
"
$(
nproc
)
"
skip
=
1
skip
=
1
}
}
...
@@ -32,12 +33,5 @@ function recipe_clean {
...
@@ -32,12 +33,5 @@ function recipe_clean {
function
recipe_stage
{
function
recipe_stage
{
dest
=
"
$(
realpath
"
$1
"
)
"
dest
=
"
$(
realpath
"
$1
"
)
"
make
DESTDIR
=
"
$dest
"
install
make
DESTDIR
=
"
$dest
"
install
cd
"
$dest
/usr/local/bin/"
find
.
-type
f
-exec
install
-D
"{}"
"
$dest
/usr/bin/{}"
\;
cd
-
cd
"
$dest
/usr/local/share/"
find
.
-type
f
-exec
install
-D
"{}"
"
$dest
/share/{}"
\;
cd
-
rm
-r
"
$dest
/usr/local/"
skip
=
1
skip
=
1
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment