fixup! Add ports to the Sortix repository.

This commit is contained in:
Jonas 'Sortie' Termansen 2022-01-30 01:22:15 +01:00
parent 12f72aa93b
commit 3e4ce59720
3 changed files with 12 additions and 3 deletions

View File

@ -291,6 +291,7 @@ extract_package() {(
PACKAGE="$1" PACKAGE="$1"
unset ARCHIVE unset ARCHIVE
unset ARCHIVE_2 unset ARCHIVE_2
unset NEED_WRITABLE
. "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info" . "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info"
# TODO: Only reextract if actually needed. # TODO: Only reextract if actually needed.
rm -rf "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" rm -rf "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
@ -312,7 +313,9 @@ extract_package() {(
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize" ]; then if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize" ]; then
tix-rmpatch --directory "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize" tix-rmpatch --directory "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize"
fi fi
find "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" '!' -type d -exec chmod -w '{}' + if [ "$NEED_WRITABLE" != true ]; then
find "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" '!' -type d -exec chmod -w '{}' +
fi
)} )}
# Build all the packages (if needed) and otherwise install them. # Build all the packages (if needed) and otherwise install them.

View File

@ -6,3 +6,4 @@ ARCHIVE='Python-3.6.0.tar.xz'
SHA256SUM='b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622' SHA256SUM='b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622'
UPSTREAM_SITE='https://www.python.org/ftp/python/3.6.0' UPSTREAM_SITE='https://www.python.org/ftp/python/3.6.0'
UPSTREAM_ARCHIVE='Python-3.6.0.tar.xz' UPSTREAM_ARCHIVE='Python-3.6.0.tar.xz'
NEED_WRITABLE=true

View File

@ -20,7 +20,6 @@ for port in $ports; do
esac esac
if [ -e "$portsdir/$port/$port.info" ]; then if [ -e "$portsdir/$port/$port.info" ]; then
continue continue
:
fi fi
tar -xf "$porttixdir/$port.porttix.tar.xz" tar -xf "$porttixdir/$port.porttix.tar.xz"
tar -xf "$srctixdir/$port.srctix.tar.xz" "$port/tixbuildinfo" tar -xf "$srctixdir/$port.srctix.tar.xz" "$port/tixbuildinfo"
@ -54,6 +53,7 @@ for port in $ports; do
rm -rf "$port.srctix" rm -rf "$port.srctix"
files="sortix-libSDL-1.2.15.tar.xz" files="sortix-libSDL-1.2.15.tar.xz"
fi fi
NEED_WRITABLE=
case "$port" in case "$port" in
bison|grep|tar|wget) bison|grep|tar|wget)
echo "rm -rf -- 'doc/stamp-vti'" >> "patch.normalize" echo "rm -rf -- 'doc/stamp-vti'" >> "patch.normalize"
@ -81,8 +81,9 @@ for port in $ports; do
;; ;;
python) python)
echo "rm -rf -- 'Python/graminit.c'" >> "patch.normalize" echo "rm -rf -- 'Python/graminit.c'" >> "patch.normalize"
# TODO: This file has to exist and be writeable. Sigh. # This file has to exist and be writeable. Sigh.
#echo "rm -rf -- 'Include/graminit.h'" >> "patch.normalize" #echo "rm -rf -- 'Include/graminit.h'" >> "patch.normalize"
NEED_WRITABLE=true
echo "rm -rf -- 'Python/importlib_external.h'" >> "patch.normalize" echo "rm -rf -- 'Python/importlib_external.h'" >> "patch.normalize"
echo "rm -rf -- 'Python/importlib.h'" >> "patch.normalize" echo "rm -rf -- 'Python/importlib.h'" >> "patch.normalize"
;; ;;
@ -105,6 +106,7 @@ for port in $ports; do
rmdir "$port.normalized" rmdir "$port.normalized"
rm -rf "$port.srctix" rm -rf "$port.srctix"
fi fi
# TODO: Extract post-install.sortix from patch.
file_number=0 file_number=0
for file in $files; do for file in $files; do
file_number=$(expr $file_number + 1) file_number=$(expr $file_number + 1)
@ -202,6 +204,9 @@ for port in $ports; do
touch -r "$mirrordir/$port/$file" "$mirrordir/$port" touch -r "$mirrordir/$port/$file" "$mirrordir/$port"
fi fi
done done
if [ -n "$NEED_WRITABLE" ]; then
echo "NEED_WRITABLE=$NEED_WRITABLE" >> "$port.info.new"
fi
rm -f "$portsdir/$port/porttixinfo" rm -f "$portsdir/$port/porttixinfo"
rm -f "$portsdir/$port/tixbuildinfo" rm -f "$portsdir/$port/tixbuildinfo"
if [ "$port" != patch ]; then if [ "$port" != patch ]; then