aboutsummaryrefslogtreecommitdiff
path: root/src/tesserae
diff options
context:
space:
mode:
authoraethrvmn <me@aethrvmn.gr>2025-11-16 20:43:09 +0000
committeraethrvmn <me@aethrvmn.gr>2025-11-16 20:43:09 +0000
commit0a3faf19759472e962029aab5996ac1ebe17d484 (patch)
treeb834bfaf0100161a3462811fcea1579af86d577a /src/tesserae
parentreordered/redefined tasks (diff)
moved core LFS tessera to core/
Diffstat (limited to 'src/tesserae')
-rw-r--r--src/tesserae/core/cmake.nim26
-rw-r--r--src/tesserae/core/glibc.nim87
-rw-r--r--src/tesserae/core/iana_etc.nim13
-rw-r--r--src/tesserae/core/manpages.nim17
-rw-r--r--src/tesserae/core/ncurses.nim35
-rw-r--r--src/tesserae/core/zlib.nim23
6 files changed, 201 insertions, 0 deletions
diff --git a/src/tesserae/core/cmake.nim b/src/tesserae/core/cmake.nim
new file mode 100644
index 0000000..91317c4
--- /dev/null
+++ b/src/tesserae/core/cmake.nim
@@ -0,0 +1,26 @@
+import .. / lapis
+
+tessera "cmake":
+ source: "https://cmake.org/files/v4.1/cmake-4.1.0.tar.gz"
+ patches: @[""]
+ dependencies: @[
+ "libarchive",
+ "libuv",
+ "nghttp2",
+ "gcc"
+ ]
+ build: @[
+ "sed -i '/\"lib64\"/s/64//' Modules/GNUInstallDirs.cmake",
+ """
+ ./bootstrap --prefix=/usr \
+ --system-libs \
+ --mandir=/share/man \
+ --no-system-jsoncpp \
+ --no-system-cppdap \
+ --no-system-librhash \
+ --docdir=/share/doc/cmake-4.1.0
+ """,
+ "make",
+ "make install"
+ ]
+ result: "cmake"
diff --git a/src/tesserae/core/glibc.nim b/src/tesserae/core/glibc.nim
new file mode 100644
index 0000000..8e7d68d
--- /dev/null
+++ b/src/tesserae/core/glibc.nim
@@ -0,0 +1,87 @@
+import .. / lapis
+
+tessera "glibc":
+ source: "https://ftp.gnu.org/gnu/glibc/glibc-2.42.tar.xz"
+ patches: @[
+ "https://www.linuxfromscratch.org/patches/lfs/12.4/glibc-2.42-fhs-1.patch"
+ ]
+ dependencies: @[
+ "bash",
+ "binutils",
+ "bison",
+ "coreutils",
+ "diffutils",
+ "gawk",
+ "gcc",
+ "gettext",
+ "grep",
+ "gzip",
+ "make",
+ "perl",
+ "python",
+ "sed",
+ "texinfo"
+ ]
+ build: @[
+ "patch -Np1 -i ../glibc-2.42-fhs-1.patch",
+ """
+ sed -e '/unistd.h/i #include <string.h>' \
+ -e '/libc_rwlock_init/c\
+ __libc_rwlock_define_initialized (, reset_lock);\
+ memcpy (&lock, &reset_lock, sizeof (lock));' \
+ -i stdlib/abort.c
+ """,
+ "mkdir -v build",
+ "cd build",
+ "echo \"rootsbindir=/usr/sbin\" > configparms",
+ """
+ ./configure --prefix=/usr \
+ --disable-werror \
+ --disable-nscd \
+ libc_cv_slibdir=/usr/lib \
+ --enable-stack-protector=strong \
+ --enable-kernel=5.4
+ """,
+ "make",
+ "make check",
+ "touch /etc/ld.so.conf",
+ "sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile",
+ "make install",
+ "sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd",
+ "localedef -i C -f UTF-8 C.UTF-8 ",
+ "localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8",
+ "localedef -i de_DE -f ISO-8859-1 deDE ",
+ "localedef -i de_DE@euro -f ISO-8859-15 de_DE",
+ "localedef -i de_DE -f UTF-8 deDE.UTF-8",
+ "localedef -i el_GR -f ISO-8859-7 el_GR",
+ "localedef -i en_GB -f ISO-8859-1 en_GB",
+ "localedef -i en_GB -f UTF-8 en_GB.UTF-8",
+ "localedef -i en_HK -f ISO-8859-1 en_HK",
+ "localedef -i en_PH -f ISO-8859-1 en_PH",
+ "localedef -i en_US -f ISO-8859-1 en_US",
+ "localedef -i en_US -f UTF-8 en_US.UTF-8",
+ "localedef -i es_ES -f ISO-8859-15 es_ES@euro",
+ "localedef -i es_MX -f ISO-8859-1 es_MX",
+ "localedef -i fa_IR -f UTF-8 fa_IR",
+ "localedef -i fr_FR -f ISO-8859-1 fr_FR",
+ "localedef -i fr_FR@euro -f ISO-8859-15 fr_FR",
+ "localedef -i fr_FR -f UTF-8 fr_FR.UTF-8",
+ "localedef -i is_IS -f ISO-8859-1 is_IS",
+ "localedef -i is_IS -f UTF-8 is_IS.UTF-8",
+ "localedef -i it_IT -f ISO-8859-1 it_IT",
+ "localedef -i it_IT -f ISO-8859-15 it_IT@euro",
+ "localedef -i it_IT -f UTF-8 it_IT.UTF-8",
+ "localedef -i ja_JP -f EUC-JP ja_JP",
+ "localedef -i ja_JP -f UTF-8 ja_JP.UTF-8",
+ "localedef -i nl_NL@euro -f ISO-8859-15 nl_NL",
+ "localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R",
+ "localedef -i ru_RU -f UTF-8 ru_RU.UTF-8",
+ "localedef -i se_NO -f UTF-8 se_NNO.UTF-8",
+ "localedef -i ta_IN -f UTF-8 ta_IN.UTF-8",
+ "localedef -i tr_TR -f UTF-8 tr_TR.UTF-8",
+ "localedef -i zh_CN -f GB18030 zh_CN.GB18030",
+ "localedef -i zh_HK -f BIG5-HKSCS zh_GK.BIG5-HKSCS",
+ "localedef -i zh_TW -f UTF-8 zh_TW.UTF-8",
+ "make localedata/install-locales"
+ ]
+ result: ""
diff --git a/src/tesserae/core/iana_etc.nim b/src/tesserae/core/iana_etc.nim
new file mode 100644
index 0000000..bba7f85
--- /dev/null
+++ b/src/tesserae/core/iana_etc.nim
@@ -0,0 +1,13 @@
+import .. / lapis
+
+tessera "iana_etc":
+ source: "https://github.com/Mic92/iana-etc/releases/download/20250807/iana-etc-20250807.tar.gz"
+ patches: @[""]
+ dependencies: @[
+ "coreutils"
+ ]
+ build: @[
+ "cp services protocols /etc"
+ ]
+ # TODO: Better definition for result
+ result: ""
diff --git a/src/tesserae/core/manpages.nim b/src/tesserae/core/manpages.nim
new file mode 100644
index 0000000..38abd1a
--- /dev/null
+++ b/src/tesserae/core/manpages.nim
@@ -0,0 +1,17 @@
+import .. / lapis
+
+tessera "manpages":
+ source: "https://www.kernel.org/pub/linux/docs/man-pages/man-pages-6.15.tar.xz"
+ patches: @[""]
+ dependencies: @[
+ "bash",
+ "coreutils",
+ "make",
+ "sed"
+ ]
+ build: @[
+ "rm -v man3/crypt*",
+ "make -R GIT=false prefix=/usr install"
+ ]
+ # TODO: Better define result
+ result: "man"
diff --git a/src/tesserae/core/ncurses.nim b/src/tesserae/core/ncurses.nim
new file mode 100644
index 0000000..e17b2a2
--- /dev/null
+++ b/src/tesserae/core/ncurses.nim
@@ -0,0 +1,35 @@
+import .. / lapis
+
+tessera "ncurses":
+ source: ""
+ patches: @[""]
+ dependencies: @[""]
+ build: @[
+ """
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-shared \
+ --without-debug \
+ --without-normal \
+ --with-cxx-shared \
+ --enable-pc-files \
+ --with-pkg-config-libdir=/usr/lib/pkgconfig
+ """,
+ "make",
+ "make DESTDIR=$PWD/dest install",
+ "install -vm755 dest/usr/lib/libncursesw.so.6.5 /usr/lib",
+ "rm -v dest/usr/lib/libncursesw.so.6.5",
+ """
+ sed -e 's/^\#if.*XOPEN.*$/\#if 1/' \
+ -i dest/usr/include/curses.h
+ """,
+ "cp -av dest/* /",
+ """
+ for lib in ncurses form panel menu ; do
+ ln -sfv lib${lib}w.so /usr/lib/lib${lib}.so
+ ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
+ done
+ """,
+ "ln -sfv libncursesw.so /usr/libcurses.so"
+ ]
+ result: "libcurses.so"
diff --git a/src/tesserae/core/zlib.nim b/src/tesserae/core/zlib.nim
new file mode 100644
index 0000000..aa461ab
--- /dev/null
+++ b/src/tesserae/core/zlib.nim
@@ -0,0 +1,23 @@
+import .. / lapis
+
+tessera "zlib":
+ source: "https://zlib.net/fossils/zlib-1.3.1.tar.gz"
+ patches: @[""]
+ dependencies: @[
+ "bash",
+ "binutils",
+ "coreutils",
+ "gcc",
+ "glibc",
+ "make",
+ "sed"
+ ]
+ build: @[
+ "./configure --prefix=/usr",
+ "make",
+ "make check",
+ "make install",
+ "rm -fv /usr/lib/libz.a"
+ ]
+ result: "libz.so"
+
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.