vimium
This commit is contained in:
+3
-1
@@ -13,7 +13,7 @@ index "local" {
|
|||||||
ninja { version = "1.13.2" }
|
ninja { version = "1.13.2" }
|
||||||
meson { version = "1.12.0" }
|
meson { version = "1.12.0" }
|
||||||
openrc { version = "0.63.3" }
|
openrc { version = "0.63.3" }
|
||||||
tcc { version = "0.9.27" }
|
tcc { version = "0.9.28rc" }
|
||||||
musl { version = "1.2.6" }
|
musl { version = "1.2.6" }
|
||||||
perl { version = "5.42.3" }
|
perl { version = "5.42.3" }
|
||||||
cmake { version = "4.4.1" }
|
cmake { version = "4.4.1" }
|
||||||
@@ -24,4 +24,6 @@ index "local" {
|
|||||||
bash { version = "5.3" }
|
bash { version = "5.3" }
|
||||||
ncurses { version = "6.6" }
|
ncurses { version = "6.6" }
|
||||||
readline { version = "8.3" }
|
readline { version = "8.3" }
|
||||||
|
vim { version = "9.2.0967" }
|
||||||
|
links { version = "2.30" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* links — the text-mode web browser.
|
||||||
|
*
|
||||||
|
* Two modern-compiler fixes (verified):
|
||||||
|
* - ftp.c: const-correct strchr (clang 16+) rejects assigning through
|
||||||
|
* the const result; sed casts the operand to char*.
|
||||||
|
* - CFLAGS=-std=gnu17 keeps pre-C23 strchr semantics everywhere else.
|
||||||
|
*
|
||||||
|
* Optional deps (openssl/libevent/libjpeg/libpng/libtiff) disabled —
|
||||||
|
* http-only until an openssl package exists. Terminfo from store ncurses.
|
||||||
|
*/
|
||||||
|
package "links" {
|
||||||
|
const version = "2.30"
|
||||||
|
const source = "https://fossies.org/linux/www/links-${version}.tar.gz"
|
||||||
|
sha256 = "19bea8eaff960314cd9583749accc78ef22277581783fbfab8130c9dff077095"
|
||||||
|
license = "GPL-2.0-or-later"
|
||||||
|
|
||||||
|
provides = ["links"]
|
||||||
|
|
||||||
|
depends = [
|
||||||
|
{ name = "ncurses" },
|
||||||
|
{ name = "make" },
|
||||||
|
]
|
||||||
|
|
||||||
|
prepare {
|
||||||
|
curl -L -o links-${version}.tar.gz ${source}
|
||||||
|
echo "19bea8eaff960314cd9583749accc78ef22277581783fbfab8130c9dff077095 links-${version}.tar.gz" | sha256sum -c -
|
||||||
|
tar xf links-${version}.tar.gz --strip-components=1
|
||||||
|
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/ncurses/destdir/usr ]; then echo $ROOT/temp/ncurses/destdir/usr; else echo $ROOT/bin/$(grep '^ncurses ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > ncurses.path
|
||||||
|
}
|
||||||
|
|
||||||
|
build {
|
||||||
|
// note: no "= 0" in the pattern — the DSL strips spaces before '='.
|
||||||
|
sed -i 's/strchr(cast_const_char ud, POST_CHAR)/strchr((char *)ud, POST_CHAR)/g' ftp.c
|
||||||
|
CFLAGS=-std=gnu17 CPPFLAGS=-I$(cat ncurses.path)/include LDFLAGS=-L$(cat ncurses.path)/lib ./configure --prefix=${prefix} --without-ssl --without-libevent --without-libjpeg --without-libpng --without-libtiff
|
||||||
|
make -j${jobs}
|
||||||
|
}
|
||||||
|
|
||||||
|
install {
|
||||||
|
make DESTDIR=${destdir} install
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
-7
@@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* ncurses — terminal handling library + terminfo database.
|
* ncurses — terminal handling library + terminfo database.
|
||||||
*
|
*
|
||||||
* Built wide-char (ncurses 6.x default) with --with-termlib so the
|
* Wide-char default (ncurses 6.x). Deliberately WITHOUT --with-termlib:
|
||||||
* terminal-capability code is split into libtinfow. The narrow names
|
* keeping the termcap functions (tgetent & co) inside libncursesw lets
|
||||||
* (libncurses, libtinfo, ...) are symlinked to the wide libs — the
|
* consumers link just -lncurses (vim does exactly this). The narrow
|
||||||
* standard distro arrangement — so consumers linking -lncurses/-ltinfo
|
* names (libncurses, libtinfo, ...) are symlinked to the wide lib — the
|
||||||
* resolve to the wide implementations (symbols are compatible).
|
* standard distro arrangement — so -ltinfo consumers (readline) resolve
|
||||||
|
* to the same archive (symbols are compatible).
|
||||||
*/
|
*/
|
||||||
package "ncurses" {
|
package "ncurses" {
|
||||||
const version = "6.6"
|
const version = "6.6"
|
||||||
@@ -26,14 +27,14 @@ package "ncurses" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
./configure --prefix=${prefix} --with-termlib
|
./configure --prefix=${prefix}
|
||||||
make -j${jobs}
|
make -j${jobs}
|
||||||
}
|
}
|
||||||
|
|
||||||
install {
|
install {
|
||||||
make DESTDIR=${destdir} install
|
make DESTDIR=${destdir} install
|
||||||
ln -sf libncursesw.a ${destdir}/usr/lib/libncurses.a
|
ln -sf libncursesw.a ${destdir}/usr/lib/libncurses.a
|
||||||
ln -sf libtinfow.a ${destdir}/usr/lib/libtinfo.a
|
ln -sf libncursesw.a ${destdir}/usr/lib/libtinfo.a
|
||||||
ln -sf libpanelw.a ${destdir}/usr/lib/libpanel.a
|
ln -sf libpanelw.a ${destdir}/usr/lib/libpanel.a
|
||||||
ln -sf libmenuw.a ${destdir}/usr/lib/libmenu.a
|
ln -sf libmenuw.a ${destdir}/usr/lib/libmenu.a
|
||||||
ln -sf libformw.a ${destdir}/usr/lib/libform.a
|
ln -sf libformw.a ${destdir}/usr/lib/libform.a
|
||||||
|
|||||||
+25
-16
@@ -1,18 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* tcc — Tiny C Compiler. The fast, tiny, self-hosting C compiler.
|
* tcc — Tiny C Compiler. The fast, tiny, self-hosting C compiler.
|
||||||
*
|
*
|
||||||
* Built with the stable 0.9.27 release plus the glibc-2.34 patch
|
* Built from the MOB branch (0.9.28rc, commit d9d02c56 — the same
|
||||||
* (bcheck.c's __malloc_hook was removed from glibc; the bounds checker
|
* snapshot Alpine ships): the 0.9.27 release segfaults when compiling on
|
||||||
* is disabled on glibc >= 2.34, where the API no longer exists).
|
* modern glibc/kernel (verified — even hello world crashed), while mob
|
||||||
* The patch lives in the repo: patches/tcc-0.9.27-glibc-2.34.patch.
|
* carries the codegen and glibc-2.34 fixes (__malloc_hook is already
|
||||||
|
* handled, so no patch is needed). Pinned commit = reproducible.
|
||||||
|
* Hosted on Alpine's stable archive (dev.alpinelinux.org).
|
||||||
*
|
*
|
||||||
* The check phase verifies self-hosting: tcc compiles its own compiler
|
* The check phase proves self-hosting: tcc compiles its own compiler
|
||||||
* and the result runs.
|
* (-B. points at the uninstalled include dir) and the result runs.
|
||||||
*/
|
*/
|
||||||
package "tcc" {
|
package "tcc" {
|
||||||
const version = "0.9.27"
|
const version = "0.9.28rc"
|
||||||
const source = "https://download.savannah.nongnu.org/releases/tinycc/tcc-${version}.tar.bz2"
|
const source = "https://dev.alpinelinux.org/archive/tcc/tcc-d9d02c56401e43be43760b63f7d82f771a7ed1f6.tar.gz"
|
||||||
sha256 = "de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c"
|
sha256 = "b25f68a46930549553f6d679106d99d5a00b4d8f39a178baaeae6a50018e37ae"
|
||||||
license = "LGPL-2.1-or-later"
|
license = "LGPL-2.1-or-later"
|
||||||
|
|
||||||
provides = ["tcc", "cc"]
|
provides = ["tcc", "cc"]
|
||||||
@@ -22,12 +24,9 @@ package "tcc" {
|
|||||||
]
|
]
|
||||||
|
|
||||||
prepare {
|
prepare {
|
||||||
curl -L -O ${source}
|
curl -L -o tcc-${version}.tar.gz ${source}
|
||||||
echo "de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c tcc-${version}.tar.bz2" | sha256sum -c -
|
echo "b25f68a46930549553f6d679106d99d5a00b4d8f39a178baaeae6a50018e37ae tcc-${version}.tar.gz" | sha256sum -c -
|
||||||
tar xf tcc-${version}.tar.bz2 --strip-components=1
|
tar xf tcc-${version}.tar.gz --strip-components=1
|
||||||
curl -L -O https://files.spectoria.dev/kappa-packages/patches/tcc-0.9.27-glibc-2.34.patch
|
|
||||||
echo "d5c2b6865cd4f80c646ffc85a0fe53e15e3a1877e0a8d29556d01742e5094d6e tcc-0.9.27-glibc-2.34.patch" | sha256sum -c -
|
|
||||||
patch -p1 < tcc-0.9.27-glibc-2.34.patch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
build {
|
||||||
@@ -36,11 +35,21 @@ package "tcc" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check {
|
check {
|
||||||
./tcc -o tcc-selfhost tcc.c -I. -DONE_SOURCE -lm -ldl
|
./tcc -B. -o tcc-selfhost tcc.c -I. -DONE_SOURCE -lm -ldl
|
||||||
./tcc-selfhost -v
|
./tcc-selfhost -v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The store is not a standard /usr tree, but tcc bakes absolute paths
|
||||||
|
// (configure --prefix). A tiny wrapper injects -B<self>/../lib/tcc so
|
||||||
|
// the plain `tcc` invocation finds its includes and runtime from any
|
||||||
|
// store location. $@ is deliberately unquoted (word-split; tcc args
|
||||||
|
// are paths/flags).
|
||||||
install {
|
install {
|
||||||
make DESTDIR=${destdir} install
|
make DESTDIR=${destdir} install
|
||||||
|
mv ${destdir}/usr/bin/tcc ${destdir}/usr/bin/tcc.real
|
||||||
|
echo '#!/bin/sh' > ${destdir}/usr/bin/tcc
|
||||||
|
echo 'DIR=$(dirname $(readlink -f $0))' >> ${destdir}/usr/bin/tcc
|
||||||
|
echo 'exec $DIR/tcc.real -B$DIR/../lib/tcc $@' >> ${destdir}/usr/bin/tcc
|
||||||
|
chmod 755 ${destdir}/usr/bin/tcc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* vim — the editor.
|
||||||
|
*
|
||||||
|
* Links the store ncurses for the terminal UI (--with-tlib=ncurses).
|
||||||
|
* The GitHub archive URL needs the explicit -o name (basename would be
|
||||||
|
* the tag). The sh/vi symlinks are distro-managed.
|
||||||
|
*/
|
||||||
|
package "vim" {
|
||||||
|
const version = "9.2.0967"
|
||||||
|
const source = "https://github.com/vim/vim/archive/refs/tags/v${version}.tar.gz"
|
||||||
|
sha256 = "12873dde4981e771c51f20a5afba96f5982f4b022cbea1beb392924a0a4de0f7"
|
||||||
|
license = "Vim"
|
||||||
|
|
||||||
|
provides = ["vim"]
|
||||||
|
|
||||||
|
depends = [
|
||||||
|
{ name = "ncurses" },
|
||||||
|
{ name = "make" },
|
||||||
|
]
|
||||||
|
|
||||||
|
prepare {
|
||||||
|
curl -L -o vim-${version}.tar.gz ${source}
|
||||||
|
echo "12873dde4981e771c51f20a5afba96f5982f4b022cbea1beb392924a0a4de0f7 vim-${version}.tar.gz" | sha256sum -c -
|
||||||
|
tar xf vim-${version}.tar.gz --strip-components=1
|
||||||
|
ROOT=$KAPPA_ROOT; [ -z $ROOT ] && ROOT=/usr/local/kappa; if [ -d $ROOT/temp/ncurses/destdir/usr ]; then echo $ROOT/temp/ncurses/destdir/usr; else echo $ROOT/bin/$(grep '^ncurses ' $ROOT/db/installed | tail -1 | cut -d' ' -f3)/usr; fi > ncurses.path
|
||||||
|
}
|
||||||
|
|
||||||
|
build {
|
||||||
|
CPPFLAGS=-I$(cat ncurses.path)/include LDFLAGS=-L$(cat ncurses.path)/lib ./configure --prefix=${prefix} --with-tlib=ncurses
|
||||||
|
make -j${jobs}
|
||||||
|
}
|
||||||
|
|
||||||
|
install {
|
||||||
|
make DESTDIR=${destdir} install
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user