mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit d62ce7be9942068ba056aa75c22a32c34f130fc7
parent 85ae15242e8ab3c3de6ad3fbd8d3a162a26ae254
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Wed, 10 Dec 2025 16:13:25 +0000

remove nvi, add vis

Diffstat:
M.gitmodules | 3+++
Mcommitlist.sha1 | 13+++++++++++++
Mfilelist.sha256 | 1-
Dfiles/nvi-configure-implicit-return.patch | 165-------------------------------------------------------------------------------
Asources/vis | 1+
Mtemplates/package_sets | 2+-
Dtemplates/pkg/nvi | 49-------------------------------------------------
Atemplates/pkg/vis | 29+++++++++++++++++++++++++++++
Mvariants/ccx-x86_64/default.environment | 1-
Dvariants/ccx-x86_64/nvi | 182-------------------------------------------------------------------------------
Mvariants/ccx-x86_64/userspace.environment | 1-
Avariants/ccx-x86_64/vis | 147+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/root-x86_64/default.environment | 1-
Dvariants/root-x86_64/nvi | 182-------------------------------------------------------------------------------
Mvariants/root-x86_64/userspace.environment | 1-
Avariants/root-x86_64/vis | 147+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16 files changed, 341 insertions(+), 584 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -120,3 +120,6 @@ [submodule "sources/lnstools"] path = sources/lnstools url = https://ccx.te2000.cz/git/lnstools +[submodule "sources/vis"] + path = sources/vis + url = https://git.sr.ht/martanne/vis diff --git a/commitlist.sha1 b/commitlist.sha1 @@ -2306,6 +2306,19 @@ f5bbc15a200165fa73b34d409d17dd4554ad19a2 sources/tcb f6fc702ad0833406f52786bee72618b1554fc73c sources/tcb fa0a135baf988fcee2253accf5038bfa40dcb77d sources/tcb fe8edd32b566505b1e892e8b7ada1e6a26720e3b sources/tcb +017012bedd50f06b82376f54a9d0b9f8f7584621 sources/vis +0a8fce8b511d3c0919e82aa22815ed252b7e804e sources/vis +0eb069f51fff4dc934d4043b2540fa20147307b6 sources/vis +3d5f1d23dbdec5334b1fc0608e26c608a4d234a7 sources/vis +5a0e035d43fc1ad563d81e54158b5516511a504f sources/vis +614609082ce1b9fe8f006e18a757ce7d620f7da3 sources/vis +688f730c248343a000801b1a925b6267a9f9e8f6 sources/vis +6c519e91c684838bebcc6d49d894af956f6815b4 sources/vis +b1bba35b097639865a4f2accc92194d9ce8e39e0 sources/vis +bdfea7e6c1d1a7ad5b3d479bb2c30c7e610f2ee6 sources/vis +be402b5fe822c21d01003fa82a83a15df5e49f20 sources/vis +c3cfeacc22abae245047dbf429413e265f92bc3c sources/vis +fbf2cb0979fb1e2eb256d2f3b61b4450aab8abae sources/vis 000fe2060b74bb396651baad6a1a8c0f31537b08 sources/zsh 043c302261dfee52e54e9a6c42b4ebcc2f7ccd33 sources/zsh 04a89199d02a3ee6c4b3d89a6c782bdb0a4f1bc8 sources/zsh diff --git a/filelist.sha256 b/filelist.sha256 @@ -93,7 +93,6 @@ a21336df3bc3b267fbda940d9f533f66b0eacb520b8421cca3ddc943f620a791 files/mcm-musl e91027b085cc83c7724fd6b624641a74256288b16e9f48a37d3ceeab6e498f3f files/nawk-20250116-proctab.c 98a8ddd1004034aeff4cc6d18e5df23f55d2869d879735c3b571594a44ba1212 files/nlist.h ff3ddd131d73fee6838b11a6c4773bdb85c5f60fdd4b9ac4120ced021c341417 files/noobjtool.patch -95a10f2b9e6b31298a1485a17a63bd967986b50996bfd8eb35ebb11cfb2037da files/nvi-configure-implicit-return.patch 1e021bddaf5c020ede9107656494715236a894557b99035365fc999605541b2d files/pthbs-banginstall 627d1273036dc35239ba9dd1da45132e3bfce1ab8171dd27dc7952cdf09b698e files/s6_clone3_newpid.patch 2a782825cd870e1fdf77a579c80701c0530bc6d8fa94100cab24bf31f0f457d3 files/s6_clone_newpid.patch diff --git a/files/nvi-configure-implicit-return.patch b/files/nvi-configure-implicit-return.patch @@ -1,165 +0,0 @@ -diff -ru --no-dereference --show-c-function nvi-1.79.orig/build/configure nvi-1.79/build/configure ---- nvi-1.79.orig/build/configure 1996-10-23 13:53:07.000000000 +0000 -+++ nvi-1.79/build/configure 2025-12-09 23:27:04.166164996 +0000 -@@ -837,7 +837,7 @@ else - cat > conftest.$ac_ext <<EOF - #line 839 "configure" - #include "confdefs.h" --main(){return(0);} -+int main(){return(0);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -886,7 +886,9 @@ else - cat > conftest.$ac_ext <<EOF - #line 888 "configure" - #include "confdefs.h" --main() { exit(0); } -+#include <stdlib.h> -+#include <stdlib.h> -+int main() { exit(0); } - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -1868,6 +1870,7 @@ cat > conftest.$ac_ext <<EOF - #line 1869 "configure" - #include "confdefs.h" - #include <ctype.h> -+#include <stdlib.h> - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') - #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) - #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -@@ -1980,7 +1983,7 @@ else - cat > conftest.$ac_ext <<EOF - #line 1982 "configure" - #include "confdefs.h" --main () { -+int main () { - /* Are we little or big endian? From Harbison&Steele. */ - union - { -@@ -2845,6 +2848,7 @@ else - cat > conftest.$ac_ext <<EOF - #line 2847 "configure" - #include "confdefs.h" -+#include <stdlib.h> - - /* Thanks to Mike Haertel and Jim Avera for this test. */ - #include <sys/types.h> -@@ -3015,6 +3019,7 @@ else - cat > conftest.$ac_ext <<EOF - #line 3017 "configure" - #include "confdefs.h" -+#include <stdlib.h> - /* Thanks to Paul Eggert for this test. */ - #include <stdio.h> - #include <sys/types.h> -@@ -3050,7 +3055,7 @@ sparc_address_test (arg) int arg; - } - } - } --main() { -+int main() { - pid_t parent = getpid (); - pid_t child; - -@@ -3637,7 +3642,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3639 "configure" - #include "confdefs.h" --main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} -+#include <stdlib.h> -+int main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -3838,7 +3844,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3840 "configure" - #include "confdefs.h" --main(){exit(sizeof(unsigned char) != 1);} -+#include <stdlib.h> -+int main(){exit(sizeof(unsigned char) != 1);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -3888,7 +3895,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3890 "configure" - #include "confdefs.h" --main(){exit(sizeof(unsigned short) != 2);} -+#include <stdlib.h> -+int main(){exit(sizeof(unsigned short) != 2);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -3900,7 +3908,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3902 "configure" - #include "confdefs.h" --main(){exit(sizeof(unsigned int) != 2);} -+#include <stdlib.h> -+int main(){exit(sizeof(unsigned int) != 2);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -3953,7 +3962,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3955 "configure" - #include "confdefs.h" --main(){exit(sizeof(short) != 2);} -+#include <stdlib.h> -+int main(){exit(sizeof(short) != 2);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -3965,7 +3975,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 3967 "configure" - #include "confdefs.h" --main(){exit(sizeof(int) != 2);} -+#include <stdlib.h> -+int main(){exit(sizeof(int) != 2);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -4018,7 +4029,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 4020 "configure" - #include "confdefs.h" --main(){exit(sizeof(unsigned int) != 4);} -+#include <stdlib.h> -+int main(){exit(sizeof(unsigned int) != 4);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -4030,7 +4042,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 4032 "configure" - #include "confdefs.h" --main(){exit(sizeof(unsigned long) != 4);} -+#include <stdlib.h> -+int main(){exit(sizeof(unsigned long) != 4);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -4083,7 +4096,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 4085 "configure" - #include "confdefs.h" --main(){exit(sizeof(int) != 4);} -+#include <stdlib.h> -+int main(){exit(sizeof(int) != 4);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then -@@ -4095,7 +4109,8 @@ else - cat > conftest.$ac_ext <<EOF - #line 4097 "configure" - #include "confdefs.h" --main(){exit(sizeof(long) != 4);} -+#include <stdlib.h> -+int main(){exit(sizeof(long) != 4);} - EOF - eval $ac_link - if test -s conftest && (./conftest; exit) 2>/dev/null; then diff --git a/sources/vis b/sources/vis @@ -0,0 +1 @@ +Subproject commit 6c519e91c684838bebcc6d49d894af956f6815b4 diff --git a/templates/package_sets b/templates/package_sets @@ -244,7 +244,7 @@ #+{{pkg_install_name("mlog")}} #+{{pkg_install_name("findutils")}} #+{{pkg_install_name("nawk")}} -#+{{pkg_install_name("nvi")}} +{# #+{{pkg_install_name("vis")}} -#} #+{{pkg_install_name("squashfs-tools")}} #+{{pkg_install_name("mandoc")}} #+{{pkg_install_name("tinyssh")}} diff --git a/templates/pkg/nvi b/templates/pkg/nvi @@ -1,49 +0,0 @@ -{%- set pkg_version="1.79" -%} -{%- set pkg_source="tar.gz" -%} -{% extends "autotools_static_mini" %} -{% block package_deps -%} -#+{{pkg_install_name("netbsd-curses")}} -#@sha256:{{files["nvi-configure-implicit-return.patch"]}}:nvi-configure-implicit-return.patch -#+{{pkg_install_name("patch")}} -{% endblock package_deps %} -{%- block configure -%} -build_env_static -patch -p1 <../nvi-configure-implicit-return.patch -CFLAGS="-std=c99 $CFLAGS" -export CPPFLAGS="-D_POSIX_SOURCE" -cd build -./configure \ - --prefix="$prefix" \ - --build="$(${CC:-gcc} -dumpmachine)" \ - --bindir="$prefix/{{bindir}}" \ - --sbindir="$prefix/{{sbindir}}" \ - --infodir="$prefix/{{infodir}}" \ - --mandir="$prefix/{{mandir}}" \ - --libdir="$prefix/{{libdir}}" \ - --datadir="$prefix/{{datadir}}" \ - --localstatedir='{{var_dir}}' \ - --enable-static \ - --disable-shared \ - --disable-nls \ - --disable-curses # use system curses -{%- endblock configure %} -{%- block build -%} -make V=1 -j$MAKE_THREADS -{% endblock build %} -{%- block install -%} -# make install is broken -install -Dm755 nvi "$dest/{{bindir}}/nvi" -install -Dm755 nex "$dest/{{bindir}}/nex" -install -Dm644 ../docs/USD.doc/vi.man/vi.1 "$dest/{{mandir}}/man1/nvi.1" -{% endblock install %} -{% block check -%} -check_static "$dest/{{bindir}}/nvi" -check_static "$dest/{{bindir}}/nex" - -{% endblock check %} -{% block genlinks_begin %} - {{- super() }} - x["./{{bindir}}/nvi"]=1 - x["./{{bindir}}/nex"]=1 - x["./{{mandir}}/man1/nvi.1"]=1 -{% endblock %} diff --git a/templates/pkg/vis b/templates/pkg/vis @@ -0,0 +1,29 @@ +{%- set pkg_source="git" -%} +{% extends "genlinks_mini" %} +{%- do import_functions.update(["build_env_static", "check_static"]) %} +{% block package_deps -%} +{{ ps.toolchain() }} +#+{{ pkg_install_name(make_impl|default("gnu-make")) }} +#+{{ pkg_install_name("netbsd-curses") }} +{% endblock package_deps -%} +{%- block configure %} +build_env_static +./configure \ + --prefix="$prefix" \ + --bindir="$prefix/{{bindir}}" \ + --mandir="$prefix/{{mandir}}" \ + --docdir="$prefix/{{docdir}}/{{shortname}}" \ + --sharedir="$prefix/{{datadir}}" \ + --enable-curses \ + --disble-lua \ + --disble-lpeg-static \ + --disble-tre \ + --disble-selinux \ + --enable-acl \ + --enable-help + +{% endblock configure %} +{% block check -%} +check_static command/chacl + +{% endblock %} diff --git a/variants/ccx-x86_64/default.environment b/variants/ccx-x86_64/default.environment @@ -83,7 +83,6 @@ #+mlog.13adb42c1c505e3026114651c2f36d0a8c0723cc44e5c60f023d36db089806c5 #+findutils.89e63f707a8d7be6a083e58b937c21752b28c1a5d7760dd85dd985fa85366e3b #+nawk.4028835d6434ac7d8655c7f9e74ff307e2db89bf2c94002a309babd8a6780007 -#+nvi.0b7c97d2b695ebd933c2f902a856b8df98ba1bf50d9044c3d76f63a298f749bd #+squashfs-tools.d674abf818e01e9a46d0a6e995c2fa8f4e6086671e2b4d8345e8f592e0558128 #+mandoc.e037587ebdf49fabbb28d83caa5b22be308fa7406c22f4f7545106426c458bdc #+tinyssh.0ac46feb5c124a8975937476f186cccae55fefec0cb8865ff2bac544a2af31af diff --git a/variants/ccx-x86_64/nvi b/variants/ccx-x86_64/nvi @@ -1,182 +0,0 @@ -#!/usr/bin/env pthbs-build -#+busybox.56c53c92327b9fadf0d6015842344b63e07c8b93e2a047453128d7575529d5c4 -#+busybox-bzip2.0126bb7b1e717e04f34279b95c4e6174eee34f87a5d07231c8ecdc34f6ab1fea -#+busybox-gzip.ce3b1b66526fe19bb5f8a2d8ac1ca8e16313b1160e0476161a2952caa3e9ab4f -#+busybox-lzop.b010a9d4f7f9b29d1f839e5ebac7dbc1f2d57626ce3e48adbc5011a20e5bba71 -#+busybox-unzip.6e78fc97ae94aa9ceb41caff369bbf0db7e4500d924171acfc5cfdb83e357c38 -#+busybox-xz.b41b61d24d06de8007f02a0ef1d043730f1f70ad127eb3d0176e377240f7a763 -#+busybox-cpio.a6bac71dd44c8cae7212a9007bd04db49a6d49a4a48a1b67c857274276c89a7e -#+busybox-dpkg.e12f71bf6e1dc2477f5c8e429d9d764ad6d2aa1de36b3c9ffa2f645ae098a5a2 -#+busybox-rpm.355d32d3317387a12b93fa6dedb8c027f79e586791623572f7c56dc3469f3503 -#+busybox-tar.bde77d83984306e943d75ffde3387a310b4de0bdfbfe0d48bd41ecf61b2d39cb -#+busybox-ed.3938862a5aa8e2d37111074db3b84c2db7e69dd01828e3426a87d115d47758b7 -#+busybox-sed.c6ecd5eb36f90083161e1e684196e5247c1dac4f83a56e3d6fb243d2e962fe28 -#+busybox-vi.a3833e7313e010e3d82156f4ddb47a02afac77d320e5f4e094fa521519b3a800 -#+busybox-xxd.a14a03f5ae2935cb9b4a688b65856a311c0f97319d84fa534fe9e47e2220a6dd -#+busybox-process-extra.e159e8e0bd46ffa367b72cd8947a4e3d3e2029e6bf9750ae7396db188adc77a7 -#+busybox-procps.35788f743842a4b5698474c35c24bdea9e359839fffe0deaa9cd014d601680ee -#+busybox-psmisc.678fb27ab7d03ae8e0953cbbee399fde320210f5cbe9794293fdd7a2d7580ce8 -#+busybox-ash.ef8b72a477ae2545b8aec04f6e5fedfd2de30aa6204906bad3af7415a413831d -#+busybox-bc.5f47a5242eb7add52420ff987f1defc73bb4e06fa0641e14a4b2b286bfc576ae -#+busybox-coreutils.9fc74c9c472cc7b14f4af6e101ff765d23da777a114b2305538f53d2909d923e -#+busybox-coreutils-extra.40cc65cc10c9ac7aff1cd5ef397cc88c5151feae214bb9c1ed4ef7c436da6f7e -#+busybox-daemontools.39fc13baeda4b241771a111fddefdbf787ca265f599e1bd93b05efb453d70cc2 -#+busybox-grep.ea484e3da880feaf17131558a42311bd0239f74c229c2c2134675f6fe7ae25fa -#+busybox-misc.4b3d2e82871dcd5355bbafdafdfc911c0e71d7b79981a3823175464af3416462 -#+busybox-sh.55f2510c8bdd1614ba02243f8efb5f23f9273b585fd697111b723309bdc6fbbd -#+busybox-util-linux-unpriv.656023a8d03b987a561608ab67eabbdd670c91c41cdf629aa4b76a3f07e0cd50 -#+busybox-findutils.b2b8e511be4dca01dcc369198cb5a87e68c6fab6c16d34caa2515ff93ca07381 -#+nawk.4028835d6434ac7d8655c7f9e74ff307e2db89bf2c94002a309babd8a6780007 -#+busybox-diffutils.59467ff733b5e802f382c98960aae2c6ecfc7b82fa42db3df679593dc1ec8036 -#+musl-cross-make.14e02e45cc77fb5c9787349ef554dda78766f71652b100aee3b00e24a3d02cd1 -#+gnu-make.4034f4d785c5108ad387088199242aa8aa6920e7aab1f79ce51d1f43e97cb580 -#+m4.3c2c0285db6a9478ec3d15df2ed5a84329ebf2770be190cdd64b375b505b336a -#+netbsd-curses.62fbfa6e36ad4c26813723d03cbfe75c3e7d20f081b985904d933a07a84a541e -#@sha256:95a10f2b9e6b31298a1485a17a63bd967986b50996bfd8eb35ebb11cfb2037da:nvi-configure-implicit-return.patch -#+patch.2107bae5d78ad951bd28615d44c983d64e686d320b40f74e4f5137fd9bcc2c6a -#@untar:-z:sha256:755b87aa1e25c24c4c1668de5573d7d9a327b529423ce3ad9ee753bfb2296e33:. - - -# - build script start - - -autotools_config() { - prefix=/home/ccx/versions/$pthbs_package - ./configure -C \ - --prefix="$prefix" \ - --build="$(${CC:-gcc} -dumpmachine)" \ - --bindir="$prefix/command" \ - --sbindir="$prefix/command" \ - --infodir="$prefix/info" \ - --localedir="$prefix/locale" \ - --mandir="$prefix/man" \ - --libdir="$prefix/library" \ - --docdir="$prefix/doc/nvi" \ - --datadir="$prefix/data" \ - --datarootdir="$prefix/data" \ - --localstatedir='/var/pthbs' \ - "$@" - -} - -autotools_config_static() { - autotools_config "$@" --enable-static --disable-shared -} - -build_env_static() { - export CFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CFLAGS" - export CXXFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CXXFLAGS" - export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" -} - -check_static() { - local exe || true - exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 - if ! test -f $exe; then - printf '%s\n' "Error: file '$1' doesn't exist!" - exit 1 - fi - local interp_info || true - interp_info=$(readelf --string-dump=.interp "$exe") || exit $? - if test x '!=' "x$interp_info"; then - printf '%s\n' "Error: '$1' is a dynamic binary!" - exit 1 - fi -} - -prefix=/home/ccx/versions/$pthbs_package -dest=${pthbs_destdir%/}${prefix} -cd 'nvi-1.79' - -build_env_static -patch -p1 <../nvi-configure-implicit-return.patch -CFLAGS="-std=c99 $CFLAGS" -export CPPFLAGS="-D_POSIX_SOURCE" -cd build -./configure \ - --prefix="$prefix" \ - --build="$(${CC:-gcc} -dumpmachine)" \ - --bindir="$prefix/command" \ - --sbindir="$prefix/command" \ - --infodir="$prefix/info" \ - --mandir="$prefix/man" \ - --libdir="$prefix/library" \ - --datadir="$prefix/data" \ - --localstatedir='/var/pthbs' \ - --enable-static \ - --disable-shared \ - --disable-nls \ - --disable-curses # use system curses -make V=1 -j$MAKE_THREADS -# make install is broken -install -Dm755 nvi "$dest/command/nvi" -install -Dm755 nex "$dest/command/nex" -install -Dm644 ../docs/USD.doc/vi.man/vi.1 "$dest/man/man1/nvi.1" - - -check_static "$dest/command/nvi" -check_static "$dest/command/nex" - - - -cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" -find -type d -o -print | awk -F/ ' -BEGIN { - x["./command/nvi"]=1 - x["./command/nex"]=1 - x["./man/man1/nvi.1"]=1 -} - -function r1(s) { - sub("^[.]/[^/]*", ".", s) - return s -} -function s1(repl, s) { - sub("^[.]/[^/]*", "./"repl, s) - return s -} -function link(src) { - x[$0]=0 - printf "%s\t%s\n", $0, src - printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" -} -$1!="."{exit 1} -$2 == "env" { link($0); next } -$2 == ".env-template" { link($0); next } - -$2 == "command" { link($0); next } -$2 == "command" { link($0); next } -$2 == "bin" { link(s1("command", $0)); next } -$2 == "sbin" { link(s1("command", $0)); next } - -$2 == "library.so" { link($0); next } -$2 == "library" { link($0); next } -$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } -$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } - -$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } -$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } -$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } - -$2 == "config" { link($0); next } -$2 == "man" { link($0); next } -$2 == "info" { link($0); next } -$2 == "doc" { link($0); next } -$2 == "data" { link($0); next } -$2 == "include" { link($0); next } - - -{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } - -END { - for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } - retcode = 0 - for(fname in x) { - if(x[fname]) { - printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" - retcode = 3 - } - } - exit retcode -}' >.install-links.new -mv .install-links.new .install-links - diff --git a/variants/ccx-x86_64/userspace.environment b/variants/ccx-x86_64/userspace.environment @@ -83,7 +83,6 @@ #+mlog.13adb42c1c505e3026114651c2f36d0a8c0723cc44e5c60f023d36db089806c5 #+findutils.89e63f707a8d7be6a083e58b937c21752b28c1a5d7760dd85dd985fa85366e3b #+nawk.4028835d6434ac7d8655c7f9e74ff307e2db89bf2c94002a309babd8a6780007 -#+nvi.0b7c97d2b695ebd933c2f902a856b8df98ba1bf50d9044c3d76f63a298f749bd #+squashfs-tools.d674abf818e01e9a46d0a6e995c2fa8f4e6086671e2b4d8345e8f592e0558128 #+mandoc.e037587ebdf49fabbb28d83caa5b22be308fa7406c22f4f7545106426c458bdc #+tinyssh.0ac46feb5c124a8975937476f186cccae55fefec0cb8865ff2bac544a2af31af \ No newline at end of file diff --git a/variants/ccx-x86_64/vis b/variants/ccx-x86_64/vis @@ -0,0 +1,147 @@ +#!/usr/bin/env pthbs-build +#+busybox.56c53c92327b9fadf0d6015842344b63e07c8b93e2a047453128d7575529d5c4 +#+busybox-bzip2.0126bb7b1e717e04f34279b95c4e6174eee34f87a5d07231c8ecdc34f6ab1fea +#+busybox-gzip.ce3b1b66526fe19bb5f8a2d8ac1ca8e16313b1160e0476161a2952caa3e9ab4f +#+busybox-lzop.b010a9d4f7f9b29d1f839e5ebac7dbc1f2d57626ce3e48adbc5011a20e5bba71 +#+busybox-unzip.6e78fc97ae94aa9ceb41caff369bbf0db7e4500d924171acfc5cfdb83e357c38 +#+busybox-xz.b41b61d24d06de8007f02a0ef1d043730f1f70ad127eb3d0176e377240f7a763 +#+busybox-cpio.a6bac71dd44c8cae7212a9007bd04db49a6d49a4a48a1b67c857274276c89a7e +#+busybox-dpkg.e12f71bf6e1dc2477f5c8e429d9d764ad6d2aa1de36b3c9ffa2f645ae098a5a2 +#+busybox-rpm.355d32d3317387a12b93fa6dedb8c027f79e586791623572f7c56dc3469f3503 +#+busybox-tar.bde77d83984306e943d75ffde3387a310b4de0bdfbfe0d48bd41ecf61b2d39cb +#+busybox-ed.3938862a5aa8e2d37111074db3b84c2db7e69dd01828e3426a87d115d47758b7 +#+busybox-sed.c6ecd5eb36f90083161e1e684196e5247c1dac4f83a56e3d6fb243d2e962fe28 +#+busybox-vi.a3833e7313e010e3d82156f4ddb47a02afac77d320e5f4e094fa521519b3a800 +#+busybox-xxd.a14a03f5ae2935cb9b4a688b65856a311c0f97319d84fa534fe9e47e2220a6dd +#+busybox-process-extra.e159e8e0bd46ffa367b72cd8947a4e3d3e2029e6bf9750ae7396db188adc77a7 +#+busybox-procps.35788f743842a4b5698474c35c24bdea9e359839fffe0deaa9cd014d601680ee +#+busybox-psmisc.678fb27ab7d03ae8e0953cbbee399fde320210f5cbe9794293fdd7a2d7580ce8 +#+busybox-ash.ef8b72a477ae2545b8aec04f6e5fedfd2de30aa6204906bad3af7415a413831d +#+busybox-bc.5f47a5242eb7add52420ff987f1defc73bb4e06fa0641e14a4b2b286bfc576ae +#+busybox-coreutils.9fc74c9c472cc7b14f4af6e101ff765d23da777a114b2305538f53d2909d923e +#+busybox-coreutils-extra.40cc65cc10c9ac7aff1cd5ef397cc88c5151feae214bb9c1ed4ef7c436da6f7e +#+busybox-daemontools.39fc13baeda4b241771a111fddefdbf787ca265f599e1bd93b05efb453d70cc2 +#+busybox-grep.ea484e3da880feaf17131558a42311bd0239f74c229c2c2134675f6fe7ae25fa +#+busybox-misc.4b3d2e82871dcd5355bbafdafdfc911c0e71d7b79981a3823175464af3416462 +#+busybox-sh.55f2510c8bdd1614ba02243f8efb5f23f9273b585fd697111b723309bdc6fbbd +#+busybox-util-linux-unpriv.656023a8d03b987a561608ab67eabbdd670c91c41cdf629aa4b76a3f07e0cd50 +#+busybox-findutils.b2b8e511be4dca01dcc369198cb5a87e68c6fab6c16d34caa2515ff93ca07381 +#+nawk.4028835d6434ac7d8655c7f9e74ff307e2db89bf2c94002a309babd8a6780007 +#+musl-cross-make.14e02e45cc77fb5c9787349ef554dda78766f71652b100aee3b00e24a3d02cd1 +#+gnu-make.4034f4d785c5108ad387088199242aa8aa6920e7aab1f79ce51d1f43e97cb580 +#+netbsd-curses.62fbfa6e36ad4c26813723d03cbfe75c3e7d20f081b985904d933a07a84a541e +#@git:6c519e91c684838bebcc6d49d894af956f6815b4:vis + + +# - build script start - + +build_env_static() { + export CFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CFLAGS" + export CXXFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CXXFLAGS" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/home/ccx/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'vis' + + +build_env_static +./configure \ + --prefix="$prefix" \ + --bindir="$prefix/command" \ + --mandir="$prefix/man" \ + --docdir="$prefix/doc/vis" \ + --sharedir="$prefix/data" \ + --enable-curses \ + --disble-lua \ + --disble-lpeg-static \ + --disble-tre \ + --disble-selinux \ + --enable-acl \ + --enable-help + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + +check_static command/chacl + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN {} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/default.environment b/variants/root-x86_64/default.environment @@ -83,7 +83,6 @@ #+mlog.4b3d68ba77440437786ec8ab629cd919074551e60c520d8ae8eb4b67a02223c2 #+findutils.519e93628e65c4e5ef4d7ac1cf4396e1689e3c8e192bd8678571d90fb9d1152b #+nawk.48e7e5c0112e297121356bf98ff987d3d85d92b2696452ecea8ae4cffc57c10d -#+nvi.e64d574118a3f36e62b385a51a6505cdd70afcd613aa30885fadb4bcce19144f #+squashfs-tools.d17a5fe5700099cda5f27c79c24f4a75314d9c2160d9e5a31b1b4baf5b6c3365 #+mandoc.6f6a20cc42e1e71817249856c921d8e3686a869c979a34fcbd19de2ab00130ac #+tinyssh.7b2b9a4c3ff2d42a7b138c3830eb3c0a275aa391fb0812ccaecca383d2e6caa8 diff --git a/variants/root-x86_64/nvi b/variants/root-x86_64/nvi @@ -1,182 +0,0 @@ -#!/usr/bin/env pthbs-build -#+busybox.d606402a9b19703f3101fbbf1d8feba6c5330e680c0f00072c0dc3f7b0accb75 -#+busybox-bzip2.b36138bf256b42638bcace8cf6a08739b1754692010aa1a5a908e8df37be7fad -#+busybox-gzip.0c5d125d9d3cdf56cf21713e48d8b694b3452a287f0ac043c9a369b7d2f3b334 -#+busybox-lzop.c6936c52c87572853743ab163d57e3392ce429156552c898c021f4e2ac7af1b5 -#+busybox-unzip.e3a84bbc97bd08fe5090680838fc5b1d9abf069cde1b5709f166a2d2eebc427e -#+busybox-xz.f3842d8a5caff601be0a35d05e665d0544754f58faf5658ea439be0c1c040a99 -#+busybox-cpio.d1cbd26a4fa257de9a55ada14c4f080885059c8f51a7070a3a023cdd28507584 -#+busybox-dpkg.e1da550577c100cbf7465e94effbb497ddb432f2e4a4bb3eb90fc27d6d8926b2 -#+busybox-rpm.c0c0623d52e5057d4e7fb415b80a8b51a017ca4192b62f26e12ea544d011f927 -#+busybox-tar.7702b875f538a77796dd4587413edea7413d6e32c30ae04d7af5971d8d24ef3a -#+busybox-ed.c3bede943dff025dc5cc50be3040293b7db22573896736222b2313a0c98e590a -#+busybox-sed.3b94dd6f9471c2293f9022def3eed4b9aeced5f727c55e5f2b5f1eb171f23dce -#+busybox-vi.370e3d4d8985b698a5f6025b55f7ba803fb73c89b40924931ad5258d50015821 -#+busybox-xxd.b1385c052421a3a6858382738234f70c4cbf300d704dc6e03fc7dffc56e8b622 -#+busybox-process-extra.4bf3085bc662f3d1f8bd09f9db8c94425c4c0959f6bbf018de33cf34b5e1bcf4 -#+busybox-procps.6d8ca3e57677b8f922227712b35dc58cb0f95c8c1382108098226e9f3103c0a9 -#+busybox-psmisc.db3e795596b707b0d4c50347c7433d19c25e489ac15b973fecd50c360a3fb24d -#+busybox-ash.dfd3539b634f7d382b6e3925f69287a00262f4722841eab4e26fb974fd7ac622 -#+busybox-bc.e078e39a374f04666d1b7e64cf48130c795d452983e4eb1b326ab0affbb6ea7e -#+busybox-coreutils.2c73238b94522195571b87a2fe57c6b9252a36212f23280b14c4d513beacddc3 -#+busybox-coreutils-extra.e04a30916dd192201f931c20dcbc73c3dbe923bece439d0871d9db8b72ff7054 -#+busybox-daemontools.098138809572ced9375c0fff8f3e122eccafc1ac5d77f0353b8c7287943cd92d -#+busybox-grep.404137a4bd5f423fb4fdefc745cb2cbe2d52768359616313735c5f4f222ebc1c -#+busybox-misc.22016926318af042fb7857053cdf0f5d470b10f05c00e0035d63885c933597ff -#+busybox-sh.0731e0dad061cff997b5fc805e9e2fe92ecea581115d2b126006b85d702e866a -#+busybox-util-linux-unpriv.a209874278faaef4d767c83c2b15c82bc865e14c18629ff0be811ef73f9ad6ee -#+busybox-findutils.4b6b2da77a78596fabbeb11cc0dac80b1b039580baa5e2ff5fe4a2857f931b61 -#+nawk.48e7e5c0112e297121356bf98ff987d3d85d92b2696452ecea8ae4cffc57c10d -#+busybox-diffutils.7297c795754c245870d8ba99b3907f9ec3932726a5af6b8d15980adcbf6c0059 -#+musl-cross-make.581e6f7496a630a91679f40945ae85b1c9a3f1f5afd725bb7608ad60c058d8f9 -#+gnu-make.98dc2bc139672e6347bc2b2220304949f81b1851d2dc14778379568a0734db59 -#+m4.9525a842f294db9ba4dff2f5c09131b12ebd35df0c9e06c5404c3b046ba13748 -#+netbsd-curses.d3d7d0cf449972d5ce479a15d7298bad50ba445982cca9b12dc99d950330ce2c -#@sha256:95a10f2b9e6b31298a1485a17a63bd967986b50996bfd8eb35ebb11cfb2037da:nvi-configure-implicit-return.patch -#+patch.05e92009b5904e5104c194a4a2b66427c75b14619e0bdd0f541954e8b13d30f4 -#@untar:-z:sha256:755b87aa1e25c24c4c1668de5573d7d9a327b529423ce3ad9ee753bfb2296e33:. - - -# - build script start - - -autotools_config() { - prefix=/versions/$pthbs_package - ./configure -C \ - --prefix="$prefix" \ - --build="$(${CC:-gcc} -dumpmachine)" \ - --bindir="$prefix/command" \ - --sbindir="$prefix/command" \ - --infodir="$prefix/info" \ - --localedir="$prefix/locale" \ - --mandir="$prefix/man" \ - --libdir="$prefix/library" \ - --docdir="$prefix/doc/nvi" \ - --datadir="$prefix/data" \ - --datarootdir="$prefix/data" \ - --localstatedir='/var/pthbs' \ - "$@" - -} - -autotools_config_static() { - autotools_config "$@" --enable-static --disable-shared -} - -build_env_static() { - export CFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CFLAGS" - export CXXFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CXXFLAGS" - export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" -} - -check_static() { - local exe || true - exe=$pthbs_destdir'/versions'/$pthbs_package/$1 - if ! test -f $exe; then - printf '%s\n' "Error: file '$1' doesn't exist!" - exit 1 - fi - local interp_info || true - interp_info=$(readelf --string-dump=.interp "$exe") || exit $? - if test x '!=' "x$interp_info"; then - printf '%s\n' "Error: '$1' is a dynamic binary!" - exit 1 - fi -} - -prefix=/versions/$pthbs_package -dest=${pthbs_destdir%/}${prefix} -cd 'nvi-1.79' - -build_env_static -patch -p1 <../nvi-configure-implicit-return.patch -CFLAGS="-std=c99 $CFLAGS" -export CPPFLAGS="-D_POSIX_SOURCE" -cd build -./configure \ - --prefix="$prefix" \ - --build="$(${CC:-gcc} -dumpmachine)" \ - --bindir="$prefix/command" \ - --sbindir="$prefix/command" \ - --infodir="$prefix/info" \ - --mandir="$prefix/man" \ - --libdir="$prefix/library" \ - --datadir="$prefix/data" \ - --localstatedir='/var/pthbs' \ - --enable-static \ - --disable-shared \ - --disable-nls \ - --disable-curses # use system curses -make V=1 -j$MAKE_THREADS -# make install is broken -install -Dm755 nvi "$dest/command/nvi" -install -Dm755 nex "$dest/command/nex" -install -Dm644 ../docs/USD.doc/vi.man/vi.1 "$dest/man/man1/nvi.1" - - -check_static "$dest/command/nvi" -check_static "$dest/command/nex" - - - -cd "$pthbs_destdir/versions/$pthbs_package" -find -type d -o -print | awk -F/ ' -BEGIN { - x["./command/nvi"]=1 - x["./command/nex"]=1 - x["./man/man1/nvi.1"]=1 -} - -function r1(s) { - sub("^[.]/[^/]*", ".", s) - return s -} -function s1(repl, s) { - sub("^[.]/[^/]*", "./"repl, s) - return s -} -function link(src) { - x[$0]=0 - printf "%s\t%s\n", $0, src - printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" -} -$1!="."{exit 1} -$2 == "env" { link($0); next } -$2 == ".env-template" { link($0); next } - -$2 == "command" { link($0); next } -$2 == "command" { link($0); next } -$2 == "bin" { link(s1("command", $0)); next } -$2 == "sbin" { link(s1("command", $0)); next } - -$2 == "library.so" { link($0); next } -$2 == "library" { link($0); next } -$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } -$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } - -$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } -$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } -$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } - -$2 == "config" { link($0); next } -$2 == "man" { link($0); next } -$2 == "info" { link($0); next } -$2 == "doc" { link($0); next } -$2 == "data" { link($0); next } -$2 == "include" { link($0); next } - - -{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } - -END { - for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } - retcode = 0 - for(fname in x) { - if(x[fname]) { - printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" - retcode = 3 - } - } - exit retcode -}' >.install-links.new -mv .install-links.new .install-links - diff --git a/variants/root-x86_64/userspace.environment b/variants/root-x86_64/userspace.environment @@ -83,7 +83,6 @@ #+mlog.4b3d68ba77440437786ec8ab629cd919074551e60c520d8ae8eb4b67a02223c2 #+findutils.519e93628e65c4e5ef4d7ac1cf4396e1689e3c8e192bd8678571d90fb9d1152b #+nawk.48e7e5c0112e297121356bf98ff987d3d85d92b2696452ecea8ae4cffc57c10d -#+nvi.e64d574118a3f36e62b385a51a6505cdd70afcd613aa30885fadb4bcce19144f #+squashfs-tools.d17a5fe5700099cda5f27c79c24f4a75314d9c2160d9e5a31b1b4baf5b6c3365 #+mandoc.6f6a20cc42e1e71817249856c921d8e3686a869c979a34fcbd19de2ab00130ac #+tinyssh.7b2b9a4c3ff2d42a7b138c3830eb3c0a275aa391fb0812ccaecca383d2e6caa8 \ No newline at end of file diff --git a/variants/root-x86_64/vis b/variants/root-x86_64/vis @@ -0,0 +1,147 @@ +#!/usr/bin/env pthbs-build +#+busybox.d606402a9b19703f3101fbbf1d8feba6c5330e680c0f00072c0dc3f7b0accb75 +#+busybox-bzip2.b36138bf256b42638bcace8cf6a08739b1754692010aa1a5a908e8df37be7fad +#+busybox-gzip.0c5d125d9d3cdf56cf21713e48d8b694b3452a287f0ac043c9a369b7d2f3b334 +#+busybox-lzop.c6936c52c87572853743ab163d57e3392ce429156552c898c021f4e2ac7af1b5 +#+busybox-unzip.e3a84bbc97bd08fe5090680838fc5b1d9abf069cde1b5709f166a2d2eebc427e +#+busybox-xz.f3842d8a5caff601be0a35d05e665d0544754f58faf5658ea439be0c1c040a99 +#+busybox-cpio.d1cbd26a4fa257de9a55ada14c4f080885059c8f51a7070a3a023cdd28507584 +#+busybox-dpkg.e1da550577c100cbf7465e94effbb497ddb432f2e4a4bb3eb90fc27d6d8926b2 +#+busybox-rpm.c0c0623d52e5057d4e7fb415b80a8b51a017ca4192b62f26e12ea544d011f927 +#+busybox-tar.7702b875f538a77796dd4587413edea7413d6e32c30ae04d7af5971d8d24ef3a +#+busybox-ed.c3bede943dff025dc5cc50be3040293b7db22573896736222b2313a0c98e590a +#+busybox-sed.3b94dd6f9471c2293f9022def3eed4b9aeced5f727c55e5f2b5f1eb171f23dce +#+busybox-vi.370e3d4d8985b698a5f6025b55f7ba803fb73c89b40924931ad5258d50015821 +#+busybox-xxd.b1385c052421a3a6858382738234f70c4cbf300d704dc6e03fc7dffc56e8b622 +#+busybox-process-extra.4bf3085bc662f3d1f8bd09f9db8c94425c4c0959f6bbf018de33cf34b5e1bcf4 +#+busybox-procps.6d8ca3e57677b8f922227712b35dc58cb0f95c8c1382108098226e9f3103c0a9 +#+busybox-psmisc.db3e795596b707b0d4c50347c7433d19c25e489ac15b973fecd50c360a3fb24d +#+busybox-ash.dfd3539b634f7d382b6e3925f69287a00262f4722841eab4e26fb974fd7ac622 +#+busybox-bc.e078e39a374f04666d1b7e64cf48130c795d452983e4eb1b326ab0affbb6ea7e +#+busybox-coreutils.2c73238b94522195571b87a2fe57c6b9252a36212f23280b14c4d513beacddc3 +#+busybox-coreutils-extra.e04a30916dd192201f931c20dcbc73c3dbe923bece439d0871d9db8b72ff7054 +#+busybox-daemontools.098138809572ced9375c0fff8f3e122eccafc1ac5d77f0353b8c7287943cd92d +#+busybox-grep.404137a4bd5f423fb4fdefc745cb2cbe2d52768359616313735c5f4f222ebc1c +#+busybox-misc.22016926318af042fb7857053cdf0f5d470b10f05c00e0035d63885c933597ff +#+busybox-sh.0731e0dad061cff997b5fc805e9e2fe92ecea581115d2b126006b85d702e866a +#+busybox-util-linux-unpriv.a209874278faaef4d767c83c2b15c82bc865e14c18629ff0be811ef73f9ad6ee +#+busybox-findutils.4b6b2da77a78596fabbeb11cc0dac80b1b039580baa5e2ff5fe4a2857f931b61 +#+nawk.48e7e5c0112e297121356bf98ff987d3d85d92b2696452ecea8ae4cffc57c10d +#+musl-cross-make.581e6f7496a630a91679f40945ae85b1c9a3f1f5afd725bb7608ad60c058d8f9 +#+gnu-make.98dc2bc139672e6347bc2b2220304949f81b1851d2dc14778379568a0734db59 +#+netbsd-curses.d3d7d0cf449972d5ce479a15d7298bad50ba445982cca9b12dc99d950330ce2c +#@git:6c519e91c684838bebcc6d49d894af956f6815b4:vis + + +# - build script start - + +build_env_static() { + export CFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CFLAGS" + export CXXFLAGS="-ffile-prefix-map=${pthbs_workdir}=builddir $CXXFLAGS" + export LDFLAGS="-static -L$pthbs_build_environment/library $LDFLAGS" +} + +check_static() { + local exe || true + exe=$pthbs_destdir'/versions'/$pthbs_package/$1 + if ! test -f $exe; then + printf '%s\n' "Error: file '$1' doesn't exist!" + exit 1 + fi + local interp_info || true + interp_info=$(readelf --string-dump=.interp "$exe") || exit $? + if test x '!=' "x$interp_info"; then + printf '%s\n' "Error: '$1' is a dynamic binary!" + exit 1 + fi +} + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd 'vis' + + +build_env_static +./configure \ + --prefix="$prefix" \ + --bindir="$prefix/command" \ + --mandir="$prefix/man" \ + --docdir="$prefix/doc/vis" \ + --sharedir="$prefix/data" \ + --enable-curses \ + --disble-lua \ + --disble-lpeg-static \ + --disble-tre \ + --disble-selinux \ + --enable-acl \ + --enable-help + + +make -j${JOBS:-1} -l$((1+${JOBS:-1})) + +make DESTDIR="$pthbs_destdir" install + + + +check_static command/chacl + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN {} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links +