diff options
author | davidovski <david@davidovski.xyz> | 2022-04-07 12:01:06 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-04-07 12:01:06 +0100 |
commit | 65f2daa1e41f38db5e29a73af9c02d6c390b1d24 (patch) | |
tree | 61eaf6f75c3c689563b548aaa0c58771b573c1bb | |
parent | 263f6e08dd1b5e79a54b6928a1d2559261950e72 (diff) |
added neovim and its dependencies
-rw-r--r-- | extra/lua/lua5.4.pc | 24 | ||||
-rw-r--r-- | extra/lua5-1/lua.pc | 32 | ||||
-rw-r--r-- | extra/xf86-video-qxl/buildfix.patch | 101 | ||||
-rw-r--r-- | extra/xf86-video-qxl/convert-xspice-python3.patch | 154 | ||||
-rw-r--r-- | repo/apps/neovim.xibuild | 26 | ||||
-rw-r--r-- | repo/apps/xterm.xibuild | 49 | ||||
-rw-r--r-- | repo/system/ljx.xibuild | 19 | ||||
-rw-r--r-- | repo/system/lua-lpeg.xibuild | 50 | ||||
-rw-r--r-- | repo/system/lua-mpack.xibuild | 56 | ||||
-rw-r--r-- | repo/system/lua.xibuild | 67 | ||||
-rw-r--r-- | repo/system/lua5-1.xibuild | 77 | ||||
-rw-r--r-- | repo/system/luajit.xibuild | 32 | ||||
-rw-r--r-- | repo/system/tree-sitter.xibuild | 22 | ||||
-rw-r--r-- | repo/x11/bspwm.xibuild | 4 | ||||
-rw-r--r-- | repo/x11/spice-protocol.xibuild | 20 | ||||
-rw-r--r-- | repo/x11/xf86-video-qxl.xibuild (renamed from repo/skip/xf86-video-qxl.xibuild) | 11 |
16 files changed, 690 insertions, 54 deletions
diff --git a/extra/lua/lua5.4.pc b/extra/lua/lua5.4.pc new file mode 100644 index 0000000..06c8abc --- /dev/null +++ b/extra/lua/lua5.4.pc @@ -0,0 +1,24 @@ +# lua.pc -- pkg-config data for Lua + +# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +prefix=/usr +INSTALL_BIN=${prefix}/bin +INSTALL_INC=${prefix}/include +INSTALL_LIB=${prefix}/lib +INSTALL_MAN=${prefix}/man/man1 +INSTALL_LMOD=${prefix}/share/lua/@MAJOR_VER@ +INSTALL_CMOD=${prefix}/lib/lua/@MAJOR_VER@ + +# canonical vars +exec_prefix=${prefix} +libdir=${exec_prefix}/lib/lua@MAJOR_VER@ +includedir=${prefix}/include/lua@MAJOR_VER@ + +Name: Lua +Description: An Extensible Extension Language +Version: @MINOR_VER@ +Requires: +Libs: -L${libdir} -llua -lm +Cflags: -I${includedir} + +# (end of lua@MAJOR_VER@.pc) diff --git a/extra/lua5-1/lua.pc b/extra/lua5-1/lua.pc new file mode 100644 index 0000000..1e78955 --- /dev/null +++ b/extra/lua5-1/lua.pc @@ -0,0 +1,32 @@ +# lua.pc -- pkg-config data for Lua + +# vars from install Makefile + +# grep '^V=' ../Makefile +V= 5.1 +# grep '^R=' ../Makefile +R= 5.1.5 + +# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +prefix= /usr +INSTALL_BIN= ${prefix}/bin +INSTALL_INC= ${prefix}/include +INSTALL_LIB= ${prefix}/lib +INSTALL_MAN= ${prefix}/man/man1 +INSTALL_LMOD= ${prefix}/share/lua/${V} +INSTALL_CMOD= ${prefix}/lib/lua/${V} + +# canonical vars +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Lua +Description: An Extensible Extension Language +Version: ${R} +Requires: +Libs: -L${libdir} -llua -lm +Cflags: -I${includedir} + +# (end of lua.pc) + diff --git a/extra/xf86-video-qxl/buildfix.patch b/extra/xf86-video-qxl/buildfix.patch new file mode 100644 index 0000000..d1a8d7e --- /dev/null +++ b/extra/xf86-video-qxl/buildfix.patch @@ -0,0 +1,101 @@ +From 4b083ede3c4a827a84295ff223e34ee3c2e581b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= + <zboszor@gmail.com> +Date: Sat, 28 Aug 2021 15:38:40 +0200 +Subject: [PATCH] Fix a build error with Xorg master +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use xf86ReturnOptValBool() in get_bool_option() instead of +options[option_index].value.bool to fix a compiler error with +current Xorg xserver master branch. + +Also use xf86GetOptValInteger() in get_int_option() and +xf86GetOptValString() in get_str_option() for consistency. + +The change causes a slight performance drop during option parsing +because the passed-in index_value is no longer used as an index +into the options array. + +Instead, it's used as a token now for the standard option getter +functions which works since the index_value to the get_*_option() +functions are identical to the value of options[n].token in the +passed-in OptionInfoRec array. + +Also rename "int option_index" to "int token" for clarity in all +three functions. + +Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> +--- + src/qxl_option_helpers.c | 13 +++++++------ + src/qxl_option_helpers.h | 6 +++--- + 2 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/src/qxl_option_helpers.c b/src/qxl_option_helpers.c +index 2aba677..7707b7c 100644 +--- a/src/qxl_option_helpers.c ++++ b/src/qxl_option_helpers.c +@@ -10,31 +10,32 @@ + + #include "qxl_option_helpers.h" + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name) + { ++ int value; + if (env_name && getenv(env_name)) { + return atoi(getenv(env_name)); + } +- return options[option_index].value.num; ++ return xf86GetOptValInteger(options, token, &value) ? value : 0; + } + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name) + { + if (getenv(env_name)) { + return getenv(env_name); + } +- return options[option_index].value.str; ++ return xf86GetOptValString(options, token); + } + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name) + { + const char* value = getenv(env_name); + + if (!value) { +- return options[option_index].value.bool; ++ return xf86ReturnOptValBool(options, token, FALSE); + } + if (strcmp(value, "0") == 0 || + strcasecmp(value, "off") == 0 || +diff --git a/src/qxl_option_helpers.h b/src/qxl_option_helpers.h +index 7c54c72..66d0a17 100644 +--- a/src/qxl_option_helpers.h ++++ b/src/qxl_option_helpers.h +@@ -4,13 +4,13 @@ + #include <xf86Crtc.h> + #include <xf86Opt.h> + +-int get_int_option(OptionInfoPtr options, int option_index, ++int get_int_option(OptionInfoPtr options, int token, + const char *env_name); + +-const char *get_str_option(OptionInfoPtr options, int option_index, ++const char *get_str_option(OptionInfoPtr options, int token, + const char *env_name); + +-int get_bool_option(OptionInfoPtr options, int option_index, ++int get_bool_option(OptionInfoPtr options, int token, + const char *env_name); + + #endif // OPTION_HELPERS_H +-- +GitLab + diff --git a/extra/xf86-video-qxl/convert-xspice-python3.patch b/extra/xf86-video-qxl/convert-xspice-python3.patch new file mode 100644 index 0000000..145d3e3 --- /dev/null +++ b/extra/xf86-video-qxl/convert-xspice-python3.patch @@ -0,0 +1,154 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau <cfergeau@redhat.com> +Date: Wed, 8 Feb 2017 15:23:56 +0100 +Subject: [PATCH] Xspice: Use print("") instead of print "" + +This allows Xspice to run when using python3 instead of python2 +--- + scripts/Xspice | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/scripts/Xspice b/scripts/Xspice +index ada99d1..30d10fa 100755 +--- a/scripts/Xspice ++++ b/scripts/Xspice +@@ -34,7 +34,7 @@ def which(x): + candidate = os.path.join(p, x) + if os.path.exists(candidate): + return candidate +- print 'Warning: failed to find executable %s' % x ++ print('Warning: failed to find executable %s' % x) + return None + + if 'XSPICE_ENABLE_GDB' in os.environ: +@@ -128,10 +128,10 @@ args, xorg_args = parser.parse_known_args(sys.argv[1:]) + def agents_new_enough(args): + for f in [args.vdagent_exec, args.vdagentd_exec]: + if not f: +- print 'please specify path to vdagent/vdagentd executables' ++ print('please specify path to vdagent/vdagentd executables') + return False + if not os.path.exists(f): +- print 'error: file not found ', f ++ print('error: file not found ', f) + return False + + for f in [args.vdagent_exec, args.vdagentd_exec]: +@@ -169,11 +169,11 @@ def tls_files(args): + # and it isn't supplied spice will still abort, and Xorg with it. + for key, filename in tls_files(args).items(): + if not os.path.exists(filename): +- print "missing %s - %s does not exist" % (key, filename) ++ print("missing %s - %s does not exist" % (key, filename)) + sys.exit(1) + + def error(msg, exit_code=1): +- print "Xspice: %s" % msg ++ print("Xspice: %s" % msg) + sys.exit(exit_code) + + if not args.xorg: +@@ -319,7 +319,7 @@ for arg in xorg_args: + if arg.startswith(":"): + display = arg + if not display: +- print "Error: missing display on line (i.e. :3)" ++ print("Error: missing display on line (i.e. :3)") + raise SystemExit + os.environ ['DISPLAY'] = display + +@@ -343,7 +343,7 @@ time.sleep(2) + + retpid,rc = os.waitpid(xorg.pid, os.WNOHANG) + if retpid != 0: +- print "Error: X server is not running" ++ print("Error: X server is not running") + else: + if args.vdagent_enabled and args.vdagent_launch: + # XXX use systemd --user for this? +@@ -361,4 +361,4 @@ else: + xorg.wait() + except KeyboardInterrupt: + # Catch Ctrl-C as that is the common way of ending this script +- print "Keyboard Interrupt" ++ print("Keyboard Interrupt") + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau <cfergeau@redhat.com> +Date: Wed, 8 Feb 2017 17:07:39 +0100 +Subject: [PATCH] Xspice: Remove extra space before assignment + +--- + scripts/Xspice | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/scripts/Xspice b/scripts/Xspice +index 30d10fa..41fd80c 100755 +--- a/scripts/Xspice ++++ b/scripts/Xspice +@@ -211,7 +211,7 @@ signal.signal(signal.SIGTERM, cleanup) + atexit.register(cleanup) + + if args.auto: +- temp_dir = tempfile.mkdtemp(prefix="Xspice-") ++ temp_dir = tempfile.mkdtemp(prefix="Xspice-") + cleanup_dirs.append(temp_dir) + + args.config = temp_dir + "/xorg.conf" +@@ -275,7 +275,7 @@ if args.vdagent_enabled: + os.unlink(f) + + if not temp_dir: +- temp_dir = tempfile.mkdtemp(prefix="Xspice-") ++ temp_dir = tempfile.mkdtemp(prefix="Xspice-") + cleanup_dirs.append(temp_dir) + + # Auto generate temporary files for vdagent + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau <cfergeau@redhat.com> +Date: Wed, 8 Feb 2017 17:07:56 +0100 +Subject: [PATCH] Xspice: Fix Python3 str() vs bytes() confusion + +With python3, without universal_newlines=True, Popen().stdout.read() +will return a byte array, while find(str) expects to operate on a +string. +I've checked that this still works with python2 as well. +--- + scripts/Xspice | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/Xspice b/scripts/Xspice +index 41fd80c..927dcb1 100755 +--- a/scripts/Xspice ++++ b/scripts/Xspice +@@ -135,7 +135,7 @@ def agents_new_enough(args): + return False + + for f in [args.vdagent_exec, args.vdagentd_exec]: +- if Popen(args=[f, '-h'], stdout=PIPE).stdout.read().find('-S') == -1: ++ if Popen(args=[f, '-h'], stdout=PIPE, universal_newlines=True).stdout.read().find('-S') == -1: + return False + return True + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christophe Fergeau <cfergeau@redhat.com> +Date: Thu, 17 May 2018 15:31:05 +0200 +Subject: [PATCH] Xspice: Adjust shebang to explicitly mention python3 + +--- + scripts/Xspice | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/Xspice b/scripts/Xspice +index 927dcb1..78d0794 100755 +--- a/scripts/Xspice ++++ b/scripts/Xspice +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + """ + Xspice + + diff --git a/repo/apps/neovim.xibuild b/repo/apps/neovim.xibuild new file mode 100644 index 0000000..0b22d0e --- /dev/null +++ b/repo/apps/neovim.xibuild @@ -0,0 +1,26 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="libintl libluv libtermkey libuv libvterm luajit msgpack-c musl tree-sitter unibilium lua-lpeg lua-mpack" + +PKG_VER=0.6.1 +SOURCE=https://github.com/neovim/neovim/archive/v$PKG_VER.tar.gz +DESC="Vim-fork focused on extensibility and agility" + +build () { + mkdir build + cmake -B build \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib \ + -DENABLE_JEMALLOC=FALSE \ + -DENABLE_LTO=TRUE \ + -DUSE_BUNDLED=ON \ + -DCMAKE_VERBOSE_MAKEFILE=TRUE + cmake --build build +} + + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} diff --git a/repo/apps/xterm.xibuild b/repo/apps/xterm.xibuild index 69ae2ff..bceb89d 100644 --- a/repo/apps/xterm.xibuild +++ b/repo/apps/xterm.xibuild @@ -5,8 +5,8 @@ DEPS="libxft libxaw ncurses luit xbitmaps libutempter libxkbfile" DESC="X Terminal Emulator" -PKG_VER=370 -SOURCE=https://invisible-mirror.net/archives/xterm/xterm-$PKG_VER.tgz +PKG_VER=371 +SOURCE=ftp://ftp.invisible-island.net/xterm/xterm-$PKG_VER.tgz ADDITIONAL=" posix-ptys.patch " @@ -20,8 +20,37 @@ prepare () { } build () { - ./configure $XORG_CONFIG \ - --with-tty-group=tty + ./configure \ + $XORG_CONFIG \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-x \ + --disable-full-tgetent \ + --disable-imake \ + --enable-ansi-color \ + --enable-88-color \ + --enable-256-color \ + --enable-broken-osc \ + --enable-broken-st \ + --enable-load-vt-fonts \ + --enable-i18n \ + --enable-wide-chars \ + --enable-doublechars \ + --enable-warnings \ + --enable-tcap-query \ + --enable-logging \ + --enable-dabbrev \ + --enable-freetype \ + --enable-luit \ + --enable-mini-luit \ + --enable-narrowproto \ + --enable-exec-xterm \ + --enable-sixel-graphics \ + --with-tty-group=tty \ + --with-utempter make } @@ -31,16 +60,4 @@ package () { mkdir -p $PKG_DEST/usr/share/applications && cp *.desktop $PKG_DEST/usr/share/applications/ - - - mkdir -p $PKG_DEST/etc/X11/app-defaults - cat >> $PKG_DEST/etc/X11/app-defaults/XTerm << "EOF" -*VT100*locale: true -*VT100*faceName: Monospace -*VT100*faceSize: 10 -*backarrowKeyIsErase: true -*ptyInitialErase: true -EOF - - } diff --git a/repo/system/ljx.xibuild b/repo/system/ljx.xibuild new file mode 100644 index 0000000..c28cd7b --- /dev/null +++ b/repo/system/ljx.xibuild @@ -0,0 +1,19 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=1.3 +SOURCE=https://github.com/katlogic/ljx/archive/refs/tags/LJX-v$PKG_VER.tar.gz + +DESC="LuaJIT experimental 5.2/5.3 port" + + +build () { + make PREFIX=/usr + +} + +package () { + make install DESTDIR="$PKG_DEST" PREFIX=/usr +} diff --git a/repo/system/lua-lpeg.xibuild b/repo/system/lua-lpeg.xibuild new file mode 100644 index 0000000..f2b3b4d --- /dev/null +++ b/repo/system/lua-lpeg.xibuild @@ -0,0 +1,50 @@ +#!/bin/sh + +MAKEDEPS="make tar patch lua lua5-1" +DEPS="musl" + +PKG_VER=1.0.2 +SOURCE=http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-$PKG_VER.tar.gz +DESC="Pattern-matching library for Lua" +ADDITIONAL=" + build-static-lib.patch + test-fix-setlocale.patch +" + +luaversions="5.1 5.4" + +prepare () { + apply_patches + +# lver=$(lua -v | cut -d" " -f2 | cut -d. -f-2) + sed -i -e 's/^CFLAGS =/CFLAGS +=/' \ + -e 's/^COPT =/# COPT =/' \ + makefile + + for lver in $luaversions; do + tar xf lpeg-$PKG_VER.tar.gz + mv lpeg-$PKG_VER build-$lver + done +} + +build () { + for lver in $luaversions; do + echo building for $lver + make -C build-$lver LUADIR=/usr/include/lua$lver + done +} + +package () { + for lver in $luaversions; do + cd build-$lver + install -Dm755 lpeg.so \ + $PKG_DEST/usr/lib/lua/$lver/lpeg.so + install -Dm644 re.lua \ + $PKG_DEST/usr/share/lua/$lver/re.lua + + local rockdir="$PKG_DEST/usr/lib/luarocks/rocks-$lver/lua-lpeg/$PKG_VER-1" + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest + cd .. + done +} diff --git a/repo/system/lua-mpack.xibuild b/repo/system/lua-mpack.xibuild new file mode 100644 index 0000000..85c5195 --- /dev/null +++ b/repo/system/lua-mpack.xibuild @@ -0,0 +1,56 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl libmpack" + +PKG_VER=1.0.9 +SOURCE=https://github.com/libmpack/libmpack-lua/archive/$PKG_VER.tar.gz +DESC="Libmpack bindings for Lua" +ADDITIONAL=" +dont-install-busted.patch +skip-memleak-test.patch +" + +luaversions="5.1 " + +prepare () { + apply_patches + + for lver in $luaversions; do + tar xf $PKG_VER.tar.gz + mv libmpack-lua-$PKG_VER build-$lver + done + +} + +build () { + for lver in $luaversions; do + echo "building for lua $lver" + make -C build-$lver \ + FETCH=false \ + USE_SYSTEM_LUA=yes \ + USE_SYSTEM_MPACK=yes \ + LUA=lua$lver \ + LUA_IMPL=lua$lver + #LUA_INCLUDE="$(pkg-config --cflags lua$lver)" \ + #LUA_LIB="$(pkg-config --libs lua$lver)" + done + +} + +package () { + for lver in $luaversions; do + echo "building for lua $lver" + local rockdir="$PKG_DEST/usr/lib/luarocks/rocks-$lver/mpack/$PKG_VER-0" + + make -C build-$lver \ + USE_SYSTEM_LUA=yes \ + USE_SYSTEM_MPACK=yes \ + LUA_CMOD_INSTALLDIR="$(pkg-config --variable=INSTALL_CMOD lua$lver)" \ + DESTDIR="$subpkgdir" \ + install || exit 1 + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest + done +} diff --git a/repo/system/lua.xibuild b/repo/system/lua.xibuild index c8c992f..fdcf8ab 100644 --- a/repo/system/lua.xibuild +++ b/repo/system/lua.xibuild @@ -7,53 +7,50 @@ PKG_VER=5.4.4 SOURCE=https://www.lua.org/ftp/lua-$PKG_VER.tar.gz ADDITIONAL=" https://www.linuxfromscratch.org/patches/blfs/svn/lua-$PKG_VER-shared_library-1.patch + lua5.4.pc " + DESC="A powerful lightweight scripting language" prepare () { - cat > lua.pc << "EOF" -V=5.4 -R=5.4.4 - -prefix=/usr -INSTALL_BIN=${prefix}/bin -INSTALL_INC=${prefix}/include -INSTALL_LIB=${prefix}/lib -INSTALL_MAN=${prefix}/share/man/man1 -INSTALL_LMOD=${prefix}/share/lua/${V} -INSTALL_CMOD=${prefix}/lib/lua/${V} -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: Lua -Description: An Extensible Extension Language -Version: ${R} -Requires: -Libs: -L${libdir} -llua -lm -ldl -Cflags: -I${includedir} -EOF - -patch -Np1 -i lua-$PKG_VER-shared_library-1.patch + sed -e "s|@MAJOR_VER@|${PKG_VER%.*}|g" \ + -e "s|@MINOR_VER@|${PKG_VER}|g" \ + -i lua5.4.pc + + patch -Np1 -i lua-$PKG_VER-shared_library-1.patch + cat > configure.ac <<-EOF + top_buildir=. + + AC_INIT(src/luaconf.h) + AC_PROG_LIBTOOL + AC_OUTPUT() + EOF + libtoolize --force --install && aclocal && autoconf + } build () { - make linux + ./configure \ + --prefix=/usr + cd src + CFLAGS="$CFLAGS -DLUA_USE_LINUX -DLUA_COMPAT_5_2" \ + SYSLDFLAGS="$LDFLAGS" \ + RPATH="/usr/lib" make } package () { - make INSTALL_TOP=/usr \ - DESTDIR=$PKG_DEST \ - INSTALL="install" \ - INSTALL_MAN=/usr/share/man/man1 \ - TO_LIB="liblua.so liblua.so.${PKG_VER} liblua.so.5.4.4" \ - install && - - mkdir -p $PKG_DEST/usr/share/doc/lua-$PKG_VER && + cd .. + sed -i "s/INSTALL= install -p/INSTALL= install/g" Makefile + make V=${PKG_VER%.*} \ + INSTALL_TOP="$PKG_DEST"/usr \ + INSTALL_INC="$PKG_DEST"/usr/include/lua${PKG_VER%.*} \ + INSTALL_LIB="$PKG_DEST"/usr/lib/lua${PKG_VER%.*} install + + + mkdir -p $PKG_DEST/usr/share/doc/lua-$PKG_VER for s in html css gif png; do cp doc/*.$s $PKG_DEST/usr/share/doc/lua-$PKG_VER done - - install -m644 -D lua.pc $PKG_DEST/usr/lib/pkgconfig/lua.pc + install -Dm644 lua5.4.pc "$PKG_DEST"/usr/lib/pkgconfig/lua5.4.pc } diff --git a/repo/system/lua5-1.xibuild b/repo/system/lua5-1.xibuild new file mode 100644 index 0000000..5fc5f80 --- /dev/null +++ b/repo/system/lua5-1.xibuild @@ -0,0 +1,77 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="readline" + +PKG_VER=5.1.5 +SOURCE=https://www.lua.org/ftp/lua-$PKG_VER.tar.gz + +# use alpinelinux's makefile +ADDITIONAL=" + lua-5.1-make.patch + lua-5.1-module_paths.patch + lua-5.1-readline.patch +" + +DESC="A powerful lightweight scripting language" + +prepare () { + + apply_patches + + # we want packages to find our things + sed -i 's:/usr/local:/usr:' etc/lua.pc + + # correct lua versioning + sed -i 's/\(LIB_VERSION = \).*/\16:4:1/' src/Makefile + + cat > configure.ac <<-EOF + top_buildir=. + + AC_INIT(src/luaconf.h) + AC_PROG_LIBTOOL + AC_OUTPUT() + EOF + libtoolize --force --install && aclocal && autoconf + + +} + +build () { + ./configure \ + --prefix=/usr + cd src + make CFLAGS="$CFLAGS -DLUA_USE_LINUX" \ + SYSLDFLAGS="$LDFLAGS" \ + LIB_LIBS="-lpthread -lm -ldl" \ + RPATH="/usr/lib" \ + V=${PKG_VER%.*} alpine_all +} + +package () { + cd .. + sed -i "s/INSTALL= install -p/INSTALL= install/g" Makefile + make V=$PKG_VER \ + INSTALL_TOP="$PKG_DEST/usr" \ + INSTALL_INC="$PKG_DEST/usr/include" \ + INSTALL_LIB="$PKG_DEST/usr/lib" \ + alpine_install + + install -D -m 644 etc/lua.pc "$PKG_DEST"/usr/lib/pkgconfig/lua5.1.pc + install -D -m 644 doc/lua.1 "$PKG_DEST"/usr/share/man/man1/lua5.1.1 + install -D -m 644 doc/luac.1 "$PKG_DEST"/usr/share/man/man1/luac5.1.1 + + mkdir -p "$PKG_DEST"/usr/share/doc/lua5-1/ + install -m644 doc/*.html doc/*.css doc/logo.gif doc/cover.png \ + "$PKG_DEST"/usr/share/doc/lua5-1/ + + # Create symlinks without version suffix. + ln -s lua5.1 "$PKG_DEST"/usr/bin/lua + ln -s luac5.1 "$PKG_DEST"/usr/bin/luac + ln -s lua5.1.pc "$PKG_DEST"/usr/lib/pkgconfig/lua.pc + ln -s lua5.1.1 "$PKG_DEST"/usr/share/man/man1/lua.1 + ln -s luac5.1.1 "$PKG_DEST"/usr/share/man/man1/luac.1 + + + install -m644 -D etc/lua.pc $PKG_DEST/usr/lib/pkgconfig/lua5.1.pc +} diff --git a/repo/system/luajit.xibuild b/repo/system/luajit.xibuild new file mode 100644 index 0000000..09f6015 --- /dev/null +++ b/repo/system/luajit.xibuild @@ -0,0 +1,32 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl lua5-1" + +PKG_VER=2.1 +SUBVER=20220310 +SOURCE=https://github.com/openresty/luajit2/archive/refs/tags/v$PKG_VER-$SUBVER.tar.gz +ADDITIONAL=" +module-paths.patch +" + +DESC="OpenResty's branch of LuaJIT" + +prepare () { + apply_patches +} + +build () { + local xcflags="-DLUAJIT_ENABLE_LUA52COMPAT -DLUAJIT_NUMMODE=2" + [ "$CARCH" = x86_64 ] && xcflags="$xcflags -msse4.2" + make amalg PREFIX=/usr XCFLAGS="$xcflags" + +} + +package () { + make install DESTDIR="$PKG_DEST" PREFIX=/usr + + install -Dm644 COPYRIGHT \ + $PKG_DEST/usr/share/licenses/luajit/COPYRIGHT + +} diff --git a/repo/system/tree-sitter.xibuild b/repo/system/tree-sitter.xibuild new file mode 100644 index 0000000..ccd2b77 --- /dev/null +++ b/repo/system/tree-sitter.xibuild @@ -0,0 +1,22 @@ +#!/bin/sh + +MAKEDEPS="make " +DEPS="musl" + +PKG_VER=0.20.6 +SOURCE=https://github.com/tree-sitter/tree-sitter/archive/v$PKG_VER/tree-sitter-$PKG_VER.tar.gz +DESC="Incremental parsing system for programming tools" + +prepare () { + cargo fetch --locked +} + +build () { + make + cargo build -p tree-sitter-cli --frozen --release +} + +package () { + make DESTDIR=$PKG_DEST PREFIX=/usr install + install -D -m755 target/release/tree-sitter $PKG_DEST/usr/bin/ +} diff --git a/repo/x11/bspwm.xibuild b/repo/x11/bspwm.xibuild index b91a965..5512061 100644 --- a/repo/x11/bspwm.xibuild +++ b/repo/x11/bspwm.xibuild @@ -9,9 +9,9 @@ SOURCE=https://github.com/baskerville/bspwm/archive/refs/tags/$PKG_VER.tar.gz DESC="Tiling window manager based on binary space partitioning" build () { - make + make PREFIX=/usr } package () { - make DESTDIR=$PKG_DEST install + make PREFIX=/usr DESTDIR=$PKG_DEST install } diff --git a/repo/x11/spice-protocol.xibuild b/repo/x11/spice-protocol.xibuild new file mode 100644 index 0000000..8656080 --- /dev/null +++ b/repo/x11/spice-protocol.xibuild @@ -0,0 +1,20 @@ +#!/bin/sh + +MAKEDEPS="make" +DEPS="xorg-server" + +DESC="Spice protocol headers" + +PKG_VER=0.14.3 +SOURCE=https://www.spice-space.org/download/releases/spice-protocol-$PKG_VER.tar.xz + +build () { + mkdir build + cd build + meson --prefix=/usr .. + ninja +} + +package () { + DESTDIR=$PKG_DEST ninja install +} diff --git a/repo/skip/xf86-video-qxl.xibuild b/repo/x11/xf86-video-qxl.xibuild index ca70116..f7fd090 100644 --- a/repo/skip/xf86-video-qxl.xibuild +++ b/repo/x11/xf86-video-qxl.xibuild @@ -1,18 +1,27 @@ #!/bin/sh -MAKEDEPS="make" +MAKEDEPS="make spice-protocol" DEPS="xorg-server" DESC="X.org qxl video driver" PKG_VER=0.1.5 SOURCE=https://www.x.org/pub/individual/driver/xf86-video-qxl-$PKG_VER.tar.bz2 +ADDITIONAL=" + buildfix.patch + convert-xspice-python3.patch +" + +prepare () { + apply_patches +} build () { ./configure $XORG_CONFIG make } + package () { make DESTDIR=$PKG_DEST install } |