diff --git a/build-aux/build-ports.sh b/build-aux/build-ports.sh index d3f584cb..5f21d35f 100755 --- a/build-aux/build-ports.sh +++ b/build-aux/build-ports.sh @@ -291,6 +291,7 @@ extract_package() {( PACKAGE="$1" unset ARCHIVE unset ARCHIVE_2 + unset NEED_WRITABLE . "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info" # TODO: Only reextract if actually needed. rm -rf "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" @@ -312,7 +313,9 @@ extract_package() {( if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize" ]; then tix-rmpatch --directory "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.normalize" 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. diff --git a/ports/python/python.info b/ports/python/python.info index 49db35de..087a65b9 100644 --- a/ports/python/python.info +++ b/ports/python/python.info @@ -6,3 +6,4 @@ ARCHIVE='Python-3.6.0.tar.xz' SHA256SUM='b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622' UPSTREAM_SITE='https://www.python.org/ftp/python/3.6.0' UPSTREAM_ARCHIVE='Python-3.6.0.tar.xz' +NEED_WRITABLE=true diff --git a/portsify.sh b/portsify.sh index 12ffef9d..d72a13ae 100755 --- a/portsify.sh +++ b/portsify.sh @@ -20,7 +20,6 @@ for port in $ports; do esac if [ -e "$portsdir/$port/$port.info" ]; then continue - : fi tar -xf "$porttixdir/$port.porttix.tar.xz" tar -xf "$srctixdir/$port.srctix.tar.xz" "$port/tixbuildinfo" @@ -54,6 +53,7 @@ for port in $ports; do rm -rf "$port.srctix" files="sortix-libSDL-1.2.15.tar.xz" fi + NEED_WRITABLE= case "$port" in bison|grep|tar|wget) echo "rm -rf -- 'doc/stamp-vti'" >> "patch.normalize" @@ -81,8 +81,9 @@ for port in $ports; do ;; python) 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" + NEED_WRITABLE=true echo "rm -rf -- 'Python/importlib_external.h'" >> "patch.normalize" echo "rm -rf -- 'Python/importlib.h'" >> "patch.normalize" ;; @@ -105,6 +106,7 @@ for port in $ports; do rmdir "$port.normalized" rm -rf "$port.srctix" fi + # TODO: Extract post-install.sortix from patch. file_number=0 for file in $files; do file_number=$(expr $file_number + 1) @@ -202,6 +204,9 @@ for port in $ports; do touch -r "$mirrordir/$port/$file" "$mirrordir/$port" fi done + if [ -n "$NEED_WRITABLE" ]; then + echo "NEED_WRITABLE=$NEED_WRITABLE" >> "$port.info.new" + fi rm -f "$portsdir/$port/porttixinfo" rm -f "$portsdir/$port/tixbuildinfo" if [ "$port" != patch ]; then