diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-25 18:59:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-25 18:59:12 +0200 |
commit | b9e65f600b32af0d5bae95fd71d49dd34bf6e405 (patch) | |
tree | ad5e6770a4a9db6d7dbfcf5c9d36465398b322c5 | |
parent | 23db3d0b1788edf01e9060f77d009a3a671b62c5 (diff) | |
download | i486tcc-linux-b9e65f600b32af0d5bae95fd71d49dd34bf6e405.tar.gz i486tcc-linux-b9e65f600b32af0d5bae95fd71d49dd34bf6e405.tar.bz2 |
got notion building statically and preloaded modules, issues with precompiled lua code
-rw-r--r-- | patches/notion-minimal.patch | 45 | ||||
-rwxr-xr-x | scripts/build.sh | 9 | ||||
-rwxr-xr-x | scripts/create_root.sh | 2 |
3 files changed, 53 insertions, 3 deletions
diff --git a/patches/notion-minimal.patch b/patches/notion-minimal.patch index 9f32135..b599413 100644 --- a/patches/notion-minimal.patch +++ b/patches/notion-minimal.patch @@ -1,3 +1,36 @@ +diff -rauN notion/ioncore/bindmaps.c notion-minimal-patch/ioncore/bindmaps.c +--- notion/ioncore/bindmaps.c 2023-07-24 05:52:11.000000000 +0200 ++++ notion-minimal-patch/ioncore/bindmaps.c 2023-07-25 16:15:07.594406076 +0200 +@@ -208,6 +208,7 @@ + if(bindmap==NULL) + return NULL; + ++#ifdef HAVE_X11_XCB + b.ksb=XkbKeycodeToKeysym(ioncore_g.dpy, kcb, 0, 0); + b.kcb=kcb; + b.state=state; +@@ -228,6 +229,9 @@ + b.state|=ShiftMask; + bindmap_add_binding(bindmap, &b); + } ++#else ++ return NULL; ++#endif + + return bindmap; + } +diff -rauN notion/mod_sm/Makefile notion-minimal-patch/mod_sm/Makefile +--- notion/mod_sm/Makefile 2023-07-24 05:52:11.000000000 +0200 ++++ notion-minimal-patch/mod_sm/Makefile 2023-07-25 16:31:41.145863309 +0200 +@@ -10,7 +10,7 @@ + + INCLUDES += $(X11_INCLUDES) $(LIBTU_INCLUDES) $(LIBEXTL_INCLUDES) -I.. + CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE) +-LIBS += $(X11_LIBS) -lSM -lICE ++LIBS += $(X11_LIBS) @@BASE@@/build/stage1/lib/libSM.a @@BASE@@/build/stage1/lib/libICE.a + + SOURCES=sm.c sm_matchwin.c sm_session.c + 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 @@ -8,6 +41,18 @@ diff -rauN notion/modulelist.mk notion-minimal-patch/modulelist.mk - de mod_xinerama mod_xrandr mod_xkbevents mod_notionflux + de mod_xkbevents +# mod_xinerama mod_xrandr mod_notionflux +diff -rauN notion/notion/Makefile notion-minimal-patch/notion/Makefile +--- notion/notion/Makefile 2023-07-24 05:52:11.000000000 +0200 ++++ notion-minimal-patch/notion/Makefile 2023-07-25 16:34:22.066099329 +0200 +@@ -19,7 +19,7 @@ + INCLUDES += $(LIBMAINLOOP_INCLUDES) $(LIBTU_INCLUDES) $(LIBEXTL_INCLUDES) + INCLUDES += -I.. + +-LIBS += $(X11_LIBS) -lSM -lICE ++LIBS += $(X11_LIBS) @@BASE@@/build/stage1/lib/libSM.a @@BASE@@/build/stage1/lib/libICE.a + LIBS += $(WHOLEA) $(LIBMAINLOOP_LIBS) $(LIBEXTL_LIBS) $(LIBTU_LIBS) $(NO_WHOLEA) + LIBS += $(LUA_LIBS) $(DL_LIBS) + LIBS += -lm 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 diff --git a/scripts/build.sh b/scripts/build.sh index a6e700c..8a26754 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -482,13 +482,18 @@ if [ ! -f "${BASE}/build/stage1/bin/notion" ]; then 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/ + sed -i "s|@@BASE@@|${BASE}|g" \ + mod_sm/Makefile notion/Makefile CC="${BASE}/build/stage1/bin/i386-tcc" \ + LDFLAGS="-static" \ 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" \ + X11_LIBS="${BASE}/build/stage1/lib/libX11.a ${BASE}/build/stage1/lib/libXext.a ${BASE}/build/stage1/lib/libSM.a ${BASE}/build/stage1/lib/libICE.a ${BASE}/build/stage1/lib/libX11.a" \ USE_XFT=0 \ + PRELOAD_MODULES=1 \ LUA_VERSION=5.1 PREFIX=/ ETCDIR=/etc/notion + #make -j$CPUS DESTDIR="${BASE}/build/stage1" PREFIX=/ -j$CPUS install + cp "${BASE}/src/stage1/notion-435631f/notion/notion" "${BASE}/build/stage1/bin" cd .. else echo "stage1 notion exists" diff --git a/scripts/create_root.sh b/scripts/create_root.sh index fc30df0..f6cb8a8 100755 --- a/scripts/create_root.sh +++ b/scripts/create_root.sh @@ -26,7 +26,7 @@ test -f /dev/loop0 && losetup -d /dev/loop0 test -d "${ROOT}" && rmdir "${ROOT}" test -f root.img && rm -f root.img -dd if=/dev/zero of=root.img bs=512 count=128520 +dd if=/dev/zero of=root.img bs=512 count=257040 chmod 666 root.img losetup /dev/loop0 root.img mke2fs /dev/loop0 |