summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2023-07-24 18:49:42 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2023-07-24 18:49:42 +0200
commit23db3d0b1788edf01e9060f77d009a3a671b62c5 (patch)
tree87dd048a9b49ca16fbc99a69f6468d87d74bb530
parent6b77186c9cfe1826cdf07660a96dcb70c7a42b42 (diff)
downloadi486tcc-linux-23db3d0b1788edf01e9060f77d009a3a671b62c5.tar.gz
i486tcc-linux-23db3d0b1788edf01e9060f77d009a3a671b62c5.tar.bz2
added lua 5.1 and notion
-rw-r--r--README7
-rw-r--r--configs/versions2
-rw-r--r--patches/lua51-no-readline.patch24
-rw-r--r--patches/notion-minimal.patch34
-rw-r--r--patches/tinyxlib-tcc.patch11
-rwxr-xr-xscripts/build.sh35
-rwxr-xr-xscripts/download.sh5
7 files changed, 102 insertions, 16 deletions
diff --git a/README b/README
index f230af0..1e90d26 100644
--- a/README
+++ b/README
@@ -84,6 +84,10 @@ dependencies
some non-compiling fallback when there is no curses?)
- mandoc
- zlib
+- lua51
+- tinyxserver
+ - tinyxlib
+ - some basic fonts for default and cursor
kernel options
--------------
@@ -445,6 +449,7 @@ EOF
- we need to set the video mode for the floppy loading mode with rdev,
vga=? seems not to be used when booting via Linux real mode boot mode
(qemu_direct works fine with vga=?)
+- notion: keyboard XCB missing in tinyxlib? tcc: error: undefined symbol 'XkbKeycodeToKeysym'
tools
-----
@@ -747,6 +752,8 @@ links
- https://www.x.org/archive/X11R6.8.0/doc/fonts2.html
- https://www.x.org/archive/X11R7.5/doc/man/man1/mkfontdir.1.html
- https://www.x.org/archive//individual/font
+ - X apps and stuff
+ - https://www.x.org/archive/individual/app/
- terminal multiplexing
- tmux: newer
- screen: looks a little bit aged, might habe more features but also more code
diff --git a/configs/versions b/configs/versions
index 6513275..0ad6b80 100644
--- a/configs/versions
+++ b/configs/versions
@@ -23,3 +23,5 @@ DROPBEAR_VERSION="2022.83"
TINYXLIB_VERSION="9862f35"
TINYXSERVER_VERSION="b010434"
RXVT_VERSION="2.6.4"
+LUA_VERSION="5.1.5"
+NOTION_VERSION="435631f"
diff --git a/patches/lua51-no-readline.patch b/patches/lua51-no-readline.patch
new file mode 100644
index 0000000..baf5bc3
--- /dev/null
+++ b/patches/lua51-no-readline.patch
@@ -0,0 +1,24 @@
+diff -rauN lua/src/luaconf.h lua-no-readline-patch/src/luaconf.h
+--- lua/src/luaconf.h 2008-02-11 17:25:08.000000000 +0100
++++ lua-no-readline-patch/src/luaconf.h 2023-07-23 21:16:25.984847390 +0200
+@@ -36,7 +36,7 @@
+ #if defined(LUA_USE_LINUX)
+ #define LUA_USE_POSIX
+ #define LUA_USE_DLOPEN /* needs an extra library: -ldl */
+-#define LUA_USE_READLINE /* needs some extra libraries */
++//#define LUA_USE_READLINE /* needs some extra libraries */
+ #endif
+
+ #if defined(LUA_USE_MACOSX)
+diff -rauN lua/src/Makefile lua-no-readline-patch/src/Makefile
+--- lua/src/Makefile 2012-02-13 21:41:22.000000000 +0100
++++ lua-no-readline-patch/src/Makefile 2023-07-23 21:20:19.495189877 +0200
+@@ -96,7 +96,7 @@
+ $(MAKE) all MYCFLAGS=
+
+ linux:
+- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
++ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-rdynamic -ldl -lncurses"
+
+ macosx:
+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
diff --git a/patches/notion-minimal.patch b/patches/notion-minimal.patch
new file mode 100644
index 0000000..9f32135
--- /dev/null
+++ b/patches/notion-minimal.patch
@@ -0,0 +1,34 @@
+diff -rauN notion/modulelist.mk notion-minimal-patch/modulelist.mk
+--- notion/modulelist.mk 2023-07-24 05:52:11.000000000 +0200
++++ notion-minimal-patch/modulelist.mk 2023-07-24 18:29:19.240836995 +0200
+@@ -4,4 +4,5 @@
+
+ MODULE_LIST = mod_tiling mod_query mod_menu \
+ mod_dock mod_sp mod_sm mod_statusbar \
+- de mod_xinerama mod_xrandr mod_xkbevents mod_notionflux
++ de mod_xkbevents
++# mod_xinerama mod_xrandr mod_notionflux
+diff -rauN notion/system-autodetect.mk notion-minimal-patch/system-autodetect.mk
+--- notion/system-autodetect.mk 2023-07-24 05:52:11.000000000 +0200
++++ notion-minimal-patch/system-autodetect.mk 2023-07-24 18:31:38.701041540 +0200
+@@ -174,7 +174,8 @@
+ -DHAS_SYSTEM_ASPRINTF=$(HAS_SYSTEM_ASPRINTF)
+
+ LDFLAGS += -Wl,--as-needed $(LIBS) $(EXTRA_LIBS)
+-EXPORT_DYNAMIC=-Xlinker --export-dynamic
++#EXPORT_DYNAMIC=-Xlinker --export-dynamic
++EXPORT_DYNAMIC=-rdynamic
+
+ # The following options are mainly for development use and can be used
+ # to check that the code seems to conform to some standards. Depending
+@@ -230,7 +231,7 @@
+ INSTALL_STRIP =
+ CFLAGS += -g
+
+-ifeq ($(PRELOAD_MODULES),1)
+-X11_LIBS += -lXinerama -lXrandr
+-endif
++#ifeq ($(PRELOAD_MODULES),1)
++#X11_LIBS += -lXinerama -lXrandr
++#endif
+
diff --git a/patches/tinyxlib-tcc.patch b/patches/tinyxlib-tcc.patch
index 38e7c29..e69de29 100644
--- a/patches/tinyxlib-tcc.patch
+++ b/patches/tinyxlib-tcc.patch
@@ -1,11 +0,0 @@
-diff -rauN tinyxlib/libXfont/bitmap/bdfread.c tinyxlib-tcc-patch/libXfont/bitmap/bdfread.c
---- tinyxlib/libXfont/bitmap/bdfread.c 2023-07-13 15:03:17.000000000 +0200
-+++ tinyxlib-tcc-patch/libXfont/bitmap/bdfread.c 2023-07-13 15:24:35.465753463 +0200
-@@ -60,6 +60,7 @@
- /* use bitmap structure */
- #include "../include/bitmap.h"
- #include "bdfint.h"
-+#include <stdint.h>
-
- #define INDICES 256
- #define MAXENCODING 0xFFFF
diff --git a/scripts/build.sh b/scripts/build.sh
index 0415bd7..a6e700c 100755
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -464,6 +464,36 @@ else
echo "stage1 rxvt exists"
fi
+if [ ! -f "${BASE}/build/stage1/bin/lua" ]; then
+ rm -rf "lua-${LUA_VERSION}"
+ tar xf "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz"
+ cd "lua-${LUA_VERSION}"
+ patch -Np1 < "${BASE}/patches/lua51-no-readline.patch"
+ make -j$CPUS linux CC="${BASE}/build/stage1/bin/i386-tcc" \
+ MYLDFLAGS=-static AR="${BASE}/build/stage1/bin/i386-tcc -ar" RANLIB=echo
+ make -j$CPUS install INSTALL_TOP="${BASE}/build/stage1"
+ cd ..
+else
+ echo "stage1 lua exists"
+fi
+
+if [ ! -f "${BASE}/build/stage1/bin/notion" ]; then
+ rm -rf "notion-${NOTION_VERSION}"
+ tar xf "${BASE}/downloads/notion-${NOTION_VERSION}.tar.gz"
+ cd "notion-${NOTION_VERSION}"
+ patch -Np1 < "${BASE}/patches/notion-minimal.patch"
+# sed -i "s|@@BASE@@|${BASE}|g" mod_tiling/
+ CC="${BASE}/build/stage1/bin/i386-tcc" \
+ make INCLUDE="-I${BASE}/src/stage1/notion-${NOTION_VERSION}" \
+ X11_INCLUDES="-I${BASE}/build/stage1/include" \
+ X11_LIBS="-W,-static -L${BASE}/build/stage1/lib -lX11 -lXext -lX11 -W,-dynamic" \
+ USE_XFT=0 \
+ LUA_VERSION=5.1 PREFIX=/ ETCDIR=/etc/notion
+ cd ..
+else
+ echo "stage1 notion exists"
+fi
+
# TODO FROM HERE
# TODO: have some way to deal with dependencies and with the user
@@ -505,11 +535,6 @@ fi
#~ make LDFLAGS=-static
#~ make install
-#~ cd ../lua
-#~ make linux CC=/data/work/i486/build/stage1/bin/i386-tcc \
- #~ MYLDFLAGS=-static AR='/data/work/i486/build/stage0/bin/i386-tcc -ar' RANLIB=echo
-#~ make install INSTALL_TOP=/data/work/i486/build/stage1
-
#~ cd ../iproute2
#~ PKG_CONFIG=false CC=/data/work/i486/build/stage1/bin/i386-tcc \
#~ ./configure --prefix=/data/work/i486/build/stage1
diff --git a/scripts/download.sh b/scripts/download.sh
index cf5c161..52d2729 100755
--- a/scripts/download.sh
+++ b/scripts/download.sh
@@ -148,6 +148,11 @@ if [ ! -f "${BASE}/downloads/rxvt-${RXVT_VERSION}.tar.gz" ]; then
"https://sourceforge.net/projects/rxvt/files/rxvt/${RXVT_VERSION}/rxvt-${RXVT_VERSION}.tar.gz/download"
fi
+if [ ! -f "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz" ]; then
+ wget -O "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz" \
+ "https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz"
+fi
+
if [ ! -f "${BASE}/downloads/uflbbl-${UFLBBL_VERSION}.tar.gz" ]; then
git clone git://git.andreasbaumann.cc/uflbbl.git "uflbbl-${UFLBBL_VERSION}"
git -C "uflbbl-${UFLBBL_VERSION}" checkout "${UFLBBL_VERSION}"