Add ports to the Sortix repository.

This commit is contained in:
Jonas 'Sortie' Termansen 2021-11-28 21:30:22 +01:00
parent 23832546d5
commit fa1a0d8794
185 changed files with 25351 additions and 21 deletions

7
.gitignore vendored
View File

@ -5,10 +5,11 @@
/*.so
/*.a
builds
mirror
ports/*/*/
release
repository
sysroot
sysroot.destdir
sysroot-overlay
sysroot-overlay-*
release
ports
repository

View File

@ -43,11 +43,14 @@ ifndef SYSROOT_OVERLAY
endif
SORTIX_BUILDS_DIR?=builds
SORTIX_MIRROR_DIR?=mirror
SORTIX_PORTS_DIR?=ports
SORTIX_RELEASE_DIR?=release
SORTIX_REPOSITORY_DIR?=repository
SORTIX_ISO_COMPRESSION?=xz
SORTIX_PORTS_MIRROR?=https://pub.sortix.org/mirror
SORTIX_INCLUDE_SOURCE_GIT_REPO?=$(shell test -d .git && echo "file://`pwd`")
SORTIX_INCLUDE_SOURCE_GIT_REPO:=$(SORTIX_INCLUDE_SOURCE_GIT_REPO)
SORTIX_INCLUDE_SOURCE_GIT_ORIGIN?=
@ -227,8 +230,10 @@ endif
.PHONY: sysroot-ports
sysroot-ports: sysroot-fsh sysroot-base-headers sysroot-system sysroot-source
@SORTIX_PORTS_DIR="$(SORTIX_PORTS_DIR)" \
@SORTIX_MIRROR_DIR="$(SORTIX_MIRROR_DIR)" \
SORTIX_PORTS_DIR="$(SORTIX_PORTS_DIR)" \
SORTIX_REPOSITORY_DIR="$(SORTIX_REPOSITORY_DIR)" \
SORTIX_PORTS_MIRROR="$(SORTIX_PORTS_MIRROR)" \
SYSROOT="$(SYSROOT)" \
HOST="$(HOST)" \
MAKE="$(MAKE)" \
@ -248,6 +253,10 @@ $(SORTIX_REPOSITORY_DIR)/$(HOST): $(SORTIX_REPOSITORY_DIR)
clean-core:
(for D in $(MODULES); do $(MAKE) clean -C $$D || exit $$?; done)
.PHONY: clean-mirror
clean-mirror:
rm -rf "$(SORTIX_MIRROR_DIR)"
.PHONY: clean-ports
clean-ports:
@SORTIX_PORTS_DIR="$(SORTIX_PORTS_DIR)" \
@ -281,7 +290,7 @@ clean: clean-core clean-ports
mostlyclean: clean-core clean-ports clean-builds clean-release clean-sysroot
.PHONY: distclean
distclean: clean-core clean-ports clean-builds clean-release clean-repository clean-sysroot
distclean: clean-core clean-ports clean-builds clean-release clean-mirror clean-repository clean-sysroot
.PHONY: most-things
most-things: sysroot iso

View File

@ -18,6 +18,9 @@ elif [ -z "$SYSROOT" ]; then
elif [ -z "$SORTIX_PORTS_DIR" ]; then
echo "$0: error: You need to set \$SORTIX_PORTS_DIR" >&2
exit 1
elif [ -z "$SORTIX_MIRROR_DIR" ]; then
echo "$0: error: You need to set \$SORTIX_MIRROR_DIR" >&2
exit 1
elif [ -z "$SORTIX_REPOSITORY_DIR" ]; then
echo "$0: error: You need to set \$SORTIX_REPOSITORY_DIR" >&2
exit 1
@ -31,12 +34,16 @@ elif ! has_command tix-collection ||
exit 1
fi
# Create the mirror directory for downloaded archives.
mkdir -p "$SORTIX_MIRROR_DIR"
# Add the platform triplet to the binary repository path.
SORTIX_REPOSITORY_DIR="$SORTIX_REPOSITORY_DIR/$HOST"
mkdir -p "$SORTIX_REPOSITORY_DIR"
# Make paths absolute for later use.
SYSROOT=$(make_dir_path_absolute "$SYSROOT")
SORTIX_MIRROR_DIR=$(make_dir_path_absolute "$SORTIX_MIRROR_DIR")
SORTIX_PORTS_DIR=$(make_dir_path_absolute "$SORTIX_PORTS_DIR")
SORTIX_REPOSITORY_DIR=$(make_dir_path_absolute "$SORTIX_REPOSITORY_DIR")
@ -55,9 +62,6 @@ export CXXFLAGS
# Create the system root if absent.
mkdir -p "$SYSROOT"
# Create the binary package repository.
mkdir -p "$SORTIX_REPOSITORY_DIR"
# Initialize Tix package management in the system root if absent.
[ -e "$SYSROOT/tix/collection.conf" ] ||
tix-collection "$SYSROOT" create --platform=$HOST --prefix= --generation=2
@ -65,8 +69,9 @@ tix-collection "$SYSROOT" create --platform=$HOST --prefix= --generation=2
# Detect all packages.
get_all_packages() {
for PACKAGE in $(ls "$SORTIX_PORTS_DIR"); do
! [ -f "$SORTIX_PORTS_DIR/$PACKAGE/tixbuildinfo" ] ||
echo $PACKAGE
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info" ]; then
echo $PACKAGE
fi
done
}
@ -83,9 +88,11 @@ fi
# Detect the build-time dependencies for a package.
get_package_dependencies_raw() {(
PACKAGE_DIR=$(echo $1 | grep -Eo '^[^\.]*')
! [ -f "$SORTIX_PORTS_DIR/$PACKAGE_DIR/tixbuildinfo" ] ||
grep -E "^(pkg\.build-libraries|pkg\.alias-of)=.*" "$SORTIX_PORTS_DIR/$PACKAGE_DIR/tixbuildinfo" | \
sed 's/^[^=]*=//'
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE_DIR/$PACKAGE_DIR.info" ]; then
(BUILD_LIBRARIES= &&
. $SORTIX_PORTS_DIR/$PACKAGE_DIR/$PACKAGE_DIR.info &&
echo "$BUILD_LIBRARIES")
fi
)}
# Detect the build-time dependencies for a package with missing optional
@ -148,19 +155,105 @@ strip_tix() {
rm -rf "$DIR"
}
download_archive_from_url() {(
PACKAGE="$1"
ARCHIVE="$2"
URL="$3"
SHA256SUM="$4"
mkdir -p "$SORTIX_MIRROR_DIR/$PACKAGE"
if [ ! -e "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha256sum" ]; then
(if echo "$URL" | grep -Eq '^[a-z][a-z0-9.+-]*://'; then
if ! wget -O "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.untrusted" -- "$URL"; then
echo "warning: Failed to download $ARCHIVE from $URL" >&2
exit 1
fi
else
if ! cp -- "$URL" "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.untrusted"; then
echo "warning: Failed to copy $ARCHIVE from $URL" >&2
exit 1
fi
fi
if ! echo "$SHA256SUM $SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.untrusted" | sha256sum -c; then
echo "warning: Wrong sha256sum after downloading $ARCHIVE from $URL" >&2
exit 1
fi
mv "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.untrusted" "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE"
echo "$URL" > "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.url"
echo "$SHA256SUM $ARCHIVE" > "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha256sum.new"
mv "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha256sum.new" \
"$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha256sum"
) || (
rm -f "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.untrusted"
rm -f "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.url"
rm -f "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha56sum.new"
rm -f "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE.sha56sum"
exit 1
)
fi
)}
download_archive() {(
PACKAGE="$1"
ARCHIVE="$2"
UPSTREAM_SITE="$3"
UPSTREAM_ARCHIVE="$4"
SHA256SUM="$5"
if ! ([ -n "$SORTIX_PORTS_MIRROR" ] &&
download_archive_from_url "$PACKAGE" "$ARCHIVE" "$SORTIX_PORTS_MIRROR/$PACKAGE/$ARCHIVE" "$SHA256SUM") &&
! download_archive_from_url "$PACKAGE" "$ARCHIVE" "$UPSTREAM_SITE/$UPSTREAM_ARCHIVE" "$SHA256SUM"; then
echo "error: Failed to download $ARCHIVE with sha256sum $SHA256SUM" >&2
false
fi
)}
extract_package() {(
PACKAGE="$1"
unset ARCHIVE
unset ARCHIVE_2
. "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info"
if [ -n "$ARCHIVE" ]; then
download_archive "$PACKAGE" "$ARCHIVE" "$UPSTREAM_SITE" "$UPSTREAM_ARCHIVE" "$SHA256SUM"
if [ -n "$ARCHIVE_2" ]; then
download_archive "$PACKAGE" "$ARCHIVE_2" "$UPSTREAM_SITE_2" "$UPSTREAM_ARCHIVE_2" "$SHA256SUM_2"
fi
fi
rm -rf "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
mkdir "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
if [ -n "$ARCHIVE" ]; then
tar -C "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" -xf "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE" --strip-components=1
if [ -n "$ARCHIVE_2" ]; then
tar -C "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" -xf "$SORTIX_MIRROR_DIR/$PACKAGE/$ARCHIVE_2" --strip-components=1
fi
fi
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.patch" ]; then
patch -d "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" -p1 < "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.patch"
fi
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.execpatch" ]; then
tix-execpatch --directory "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.execpatch"
fi
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.rmpatch" ]; then
tix-rmpatch --directory "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE" "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.rmpatch"
fi
)}
# Build all the packages (if needed) and otherwise install them.
for PACKAGE in $PACKAGES; do
if ! [ -f "$SORTIX_REPOSITORY_DIR/$PACKAGE.tix.tar.xz" ]; then
SOURCE_PACKAGE=$(grep -E "^pkg.source-package=" "$SORTIX_PORTS_DIR/$PACKAGE/tixbuildinfo" | \
sed 's/^[^=]*=//')
SOURCE_PACKAGE=$( (SOURCE_PACKAGE= &&
. $SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info &&
echo "$SOURCE_PACKAGE") )
if [ -n "$SOURCE_PACKAGE" ]; then
extract_package "$SOURCE_PACKAGE"
fi
extract_package "$PACKAGE"
tix-build \
--sysroot="$SYSROOT" \
--host=$HOST \
--prefix= \
--destination="$SORTIX_REPOSITORY_DIR" \
--generation=2 \
${SOURCE_PACKAGE:+--source-package "$SORTIX_PORTS_DIR/$SOURCE_PACKAGE"} \
"$SORTIX_PORTS_DIR/$PACKAGE"
${SOURCE_PACKAGE:+--source-package "$SORTIX_PORTS_DIR/$SOURCE_PACKAGE/$SOURCE_PACKAGE"} \
"$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
strip_tix "$SORTIX_REPOSITORY_DIR/$PACKAGE.tix.tar.xz"
fi
tix-install \

View File

@ -26,14 +26,16 @@ SORTIX_PORTS_DIR=$(make_dir_path_absolute "$SORTIX_PORTS_DIR")
# Detect all packages.
get_all_packages() {
for PACKAGE in $(ls "$SORTIX_PORTS_DIR"); do
! [ -f "$SORTIX_PORTS_DIR/$PACKAGE/tixbuildinfo" ] ||
echo $PACKAGE
if [ -f "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE.info" ]; then
echo $PACKAGE
fi
done
}
# Clean all the packages.
for PACKAGE in $(get_all_packages); do
[ -f "$SORTIX_REPOSITORY_DIR/$PACKAGE.tix.tar.xz" ] ||
# TODO: Check for marker the source code was correctly extracted.
[ ! -e "$SORTIX_PORTS_DIR/$PACKAGE/tixbuildinfo" ] ||
tix-build \
--sysroot="/" \
--host=$HOST \
@ -41,5 +43,7 @@ for PACKAGE in $(get_all_packages); do
--destination="/" \
--start=clean \
--end=clean \
"$SORTIX_PORTS_DIR/$PACKAGE"
"$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
# TODO: New top-level makefile target for this.
rm -rf "$SORTIX_PORTS_DIR/$PACKAGE/$PACKAGE"
done

8
ports/ag/ag.info Normal file
View File

@ -0,0 +1,8 @@
NAME='ag'
BUILD_LIBRARIES='libpcre libz xz'
VERSION='0.33.0'
DISTNAME='the_silver_searcher-0.33.0'
ARCHIVE='the_silver_searcher-0.33.0.tar.gz'
SHA256SUM='8ca680399df5ee8846a509c8a67c10ee1d5fc1a94456806a0ff9dd913b961db3'
UPSTREAM_SITE='https://geoff.greer.fm/ag/releases'
UPSTREAM_ARCHIVE='the_silver_searcher-0.33.0.tar.gz'

1
ports/ag/ag.normalize Normal file
View File

@ -0,0 +1 @@
rm -rf -- 'the_silver_searcher.spec'

73
ports/ag/ag.patch Normal file
View File

@ -0,0 +1,73 @@
diff --no-dereference -Naur -- ag.normalized/config.sub ag.srctix/config.sub
--- ag.normalized/config.sub 2015-09-11 16:57:50.000000000 +0200
+++ ag.srctix/config.sub 2016-09-29 14:51:16.000000000 +0200
@@ -1373,7 +1373,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- ag.normalized/configure ag.srctix/configure
--- ag.normalized/configure 2016-09-24 22:33:17.000000000 +0200
+++ ag.srctix/configure 2016-09-30 01:18:35.280663396 +0200
@@ -4992,8 +4992,7 @@
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
- pthread_cleanup_push(routine, 0);
- pthread_cleanup_pop(0) /* ; */
+ /* ; */
;
return 0;
}
@@ -5216,7 +5215,7 @@
# Run CFLAGS="-pg" ./configure if you want debug symbols
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS $PCRE_CFLAGS -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -Wno-missing-braces -std=gnu89 -D_GNU_SOURCE -O2"
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS $PCRE_CFLAGS -Wall -Wextra -Wformat=2 -Wno-format-nonliteral -Wshadow -Wpointer-arith -Wmissing-prototypes -Wno-missing-braces -std=gnu89 -D_GNU_SOURCE"
LDFLAGS="$LDFLAGS"
case $host in
diff --no-dereference -Naur -- ag.normalized/src/main.c ag.srctix/src/main.c
--- ag.normalized/src/main.c 2016-09-24 02:56:42.000000000 +0200
+++ ag.srctix/src/main.c 2016-09-30 01:12:20.405612978 +0200
@@ -69,8 +69,10 @@
GetSystemInfo(&si);
num_cores = si.dwNumberOfProcessors;
}
-#else
+#elif defined(_SC_NPROCESSORS_ONLN)
num_cores = (int)sysconf(_SC_NPROCESSORS_ONLN);
+#else
+ num_cores = 1;
#endif
workers_len = num_cores < 8 ? num_cores : 8;
diff --no-dereference -Naur -- ag.normalized/src/options.c ag.srctix/src/options.c
--- ag.normalized/src/options.c 2016-09-25 01:55:10.000000000 +0200
+++ ag.srctix/src/options.c 2016-09-29 14:53:23.000000000 +0200
@@ -4,7 +4,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/param.h>
#include <sys/stat.h>
#include <unistd.h>
diff --no-dereference -Naur -- ag.normalized/tixbuildinfo ag.srctix/tixbuildinfo
--- ag.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ ag.srctix/tixbuildinfo 2016-09-30 00:17:23.748315753 +0200
@@ -0,0 +1,9 @@
+tix.version=1
+tix.class=srctix
+pkg.name=ag
+pkg.build-libraries=libpcre libz xz
+pkg.runtime-programs=git
+pkg.build-system=configure
+pkg.configure.args=
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1 @@
chmod +x -- './post-install.sortix'

View File

@ -0,0 +1,8 @@
NAME='binutils'
BUILD_LIBRARIES='gettext'
VERSION='1.1-rc1'
DISTNAME='sortix-binutils-1.1-rc1'
ARCHIVE='sortix-binutils-1.1-rc1.tar.xz'
SHA256SUM='c7ee1a05728882a2da6c2658d3cd3099e45525e3d3d0d9b29477ed0486f59f30'
UPSTREAM_SITE='https://pub.sortix.org/sortix/toolchain'
UPSTREAM_ARCHIVE='sortix-binutils-1.1-rc1.tar.xz'

View File

@ -0,0 +1,26 @@
diff --no-dereference -Naur -- binutils.normalized/post-install.sortix binutils.srctix/post-install.sortix
--- binutils.normalized/post-install.sortix 1970-01-01 01:00:00.000000000 +0100
+++ binutils.srctix/post-install.sortix 2019-04-17 00:59:00.057416769 +0200
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+tix-eradicate-libtool-la
+programs=$(ls "$TIX_INSTALL_DIR$EXEC_PREFIX/bin")
+for program in $programs; do
+ ln "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/$program" "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/$TARGET-$program"
+done
diff --no-dereference -Naur -- binutils.normalized/tixbuildinfo binutils.srctix/tixbuildinfo
--- binutils.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ binutils.srctix/tixbuildinfo 2019-04-17 02:00:35.047317495 +0200
@@ -0,0 +1,12 @@
+tix.version=1
+tix.class=srctix
+pkg.name=binutils
+pkg.build-libraries=gettext
+pkg.build-system=configure
+pkg.configure.with-sysroot=true
+pkg.configure.with-sysroot-ld-bug=true
+pkg.configure.with-build-sysroot=true
+pkg.configure.args=--disable-werror
+pkg.configure.use-build-directory=true
+pkg.make.args=tooldir="$(EXEC_PREFIX)"
+pkg.post-install.cmd=./post-install.sortix

8
ports/bison/bison.info Normal file
View File

@ -0,0 +1,8 @@
NAME='bison'
BUILD_LIBRARIES='libstdc++? libiconv?'
VERSION='3.0.2'
DISTNAME='bison-3.0.2'
ARCHIVE='bison-3.0.2.tar.xz'
SHA256SUM='a2c3e8528bdb50567d6fa26deeb493dc5ccd7e277b865251608a9e43ac928f3c'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/bison'
UPSTREAM_ARCHIVE='bison-3.0.2.tar.xz'

View File

@ -0,0 +1,2 @@
rm -rf -- 'doc/bison.info'
rm -rf -- 'doc/cross-options.texi'

280
ports/bison/bison.patch Normal file
View File

@ -0,0 +1,280 @@
diff --no-dereference -Naur -- bison.normalized/build-aux/config.sub bison.srctix/build-aux/config.sub
--- bison.normalized/build-aux/config.sub 2013-10-23 10:25:42.000000000 +0200
+++ bison.srctix/build-aux/config.sub 2014-06-23 20:02:03.758213026 +0200
@@ -1356,7 +1356,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- bison.normalized/configure bison.srctix/configure
--- bison.normalized/configure 2013-12-05 14:58:51.000000000 +0100
+++ bison.srctix/configure 2014-12-27 01:30:10.285708525 +0100
@@ -1,4 +1,122 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GNU Bison 3.0.2.
#
diff --no-dereference -Naur -- bison.normalized/lib/spawn_faction_addclose.c bison.srctix/lib/spawn_faction_addclose.c
--- bison.normalized/lib/spawn_faction_addclose.c 2013-08-02 17:03:13.000000000 +0200
+++ bison.srctix/lib/spawn_faction_addclose.c 2014-06-23 20:02:03.762213026 +0200
@@ -22,10 +22,6 @@
#include <errno.h>
#include <unistd.h>
-#if !_LIBC
-# define __sysconf(open_max) getdtablesize ()
-#endif
-
#if !HAVE_WORKING_POSIX_SPAWN
# include "spawn_int.h"
#endif
@@ -37,7 +33,7 @@
int fd)
#undef posix_spawn_file_actions_addclose
{
- int maxfd = __sysconf (_SC_OPEN_MAX);
+ int maxfd = sysconf (_SC_OPEN_MAX);
/* Test for the validity of the file descriptor. */
if (fd < 0 || fd >= maxfd)
diff --no-dereference -Naur -- bison.normalized/lib/spawn_faction_adddup2.c bison.srctix/lib/spawn_faction_adddup2.c
--- bison.normalized/lib/spawn_faction_adddup2.c 2013-08-02 17:03:13.000000000 +0200
+++ bison.srctix/lib/spawn_faction_adddup2.c 2014-06-23 20:02:03.766213026 +0200
@@ -22,10 +22,6 @@
#include <errno.h>
#include <unistd.h>
-#if !_LIBC
-# define __sysconf(open_max) getdtablesize ()
-#endif
-
#if !HAVE_WORKING_POSIX_SPAWN
# include "spawn_int.h"
#endif
@@ -37,7 +33,7 @@
int fd, int newfd)
#undef posix_spawn_file_actions_adddup2
{
- int maxfd = __sysconf (_SC_OPEN_MAX);
+ int maxfd = sysconf (_SC_OPEN_MAX);
/* Test for the validity of the file descriptor. */
if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
diff --no-dereference -Naur -- bison.normalized/lib/spawn_faction_addopen.c bison.srctix/lib/spawn_faction_addopen.c
--- bison.normalized/lib/spawn_faction_addopen.c 2013-08-02 17:03:13.000000000 +0200
+++ bison.srctix/lib/spawn_faction_addopen.c 2014-06-23 20:02:03.766213026 +0200
@@ -22,10 +22,6 @@
#include <errno.h>
#include <unistd.h>
-#if !_LIBC
-# define __sysconf(open_max) getdtablesize ()
-#endif
-
#if !HAVE_WORKING_POSIX_SPAWN
# include "spawn_int.h"
#endif
@@ -38,7 +34,7 @@
mode_t mode)
#undef posix_spawn_file_actions_addopen
{
- int maxfd = __sysconf (_SC_OPEN_MAX);
+ int maxfd = sysconf (_SC_OPEN_MAX);
/* Test for the validity of the file descriptor. */
if (fd < 0 || fd >= maxfd)
diff --no-dereference -Naur -- bison.normalized/Makefile.in bison.srctix/Makefile.in
--- bison.normalized/Makefile.in 2013-12-05 14:58:54.000000000 +0100
+++ bison.srctix/Makefile.in 2014-06-23 20:26:44.010173997 +0200
@@ -2297,7 +2297,7 @@
# Obfuscate with a variable.
doc_bison = doc/bison
TEXI2DVI = texi2dvi --build-dir=doc/bison.t2d -I doc
-CLEANDIRS = doc/bison.t2d doc/figs doc/html
+CLEANDIRS = doc/bison.t2d doc/html
CROSS_OPTIONS_PL = $(top_srcdir)/build-aux/cross-options.pl
CROSS_OPTIONS_TEXI = $(top_srcdir)/doc/cross-options.texi
MAINTAINERCLEANFILES = $(CROSS_OPTIONS_TEXI) \
@@ -4922,6 +4922,8 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf examples/calc++/$(DEPDIR) examples/mfcalc/$(DEPDIR) examples/rpcalc/$(DEPDIR) lib/$(DEPDIR) lib/glthread/$(DEPDIR) lib/uniwidth/$(DEPDIR) src/$(DEPDIR)
+ -rm -f $(INFO_DEPS)
+ -rm -f $(CROSS_OPTIONS_TEXI)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-local distclean-tags
@@ -5145,22 +5147,28 @@
doc/refcard.pdf: doc/refcard.tex
$(AM_V_GEN) cd doc && pdftex $(abs_top_srcdir)/doc/refcard.tex
$(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
- $(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
- $(AM_V_at) src/bison$(EXEEXT) --help >>doc/bison.help.tmp
- $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+ # PATCH: Nope! You can't run your programs after they have been potentially
+ # cross-compiled so don't even try!
+ #$(AM_V_GEN)src/bison$(EXEEXT) --version >doc/bison.help.tmp
+ #$(AM_V_at) src/bison$(EXEEXT) --help >>doc/bison.help.tmp
+ #$(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
+ touch $@
# Depend on configure to get version number changes.
$(top_srcdir)/doc/bison.1: doc/bison.help doc/bison.x $(top_srcdir)/configure
- $(AM_V_GEN)$(HELP2MAN) \
- --include=$(top_srcdir)/doc/bison.x \
- --output=$@.t src/bison$(EXEEXT)
- $(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
- $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
- touch $@; \
- else \
- mv $@.t $@; \
- fi
- $(AM_V_at)rm -f $@*.t
+ # PATCH: Nope! You can't run your programs after they have been potentially
+ # cross-compiled so don't even try!
+ #$(AM_V_GEN)$(HELP2MAN) \
+ # --include=$(top_srcdir)/doc/bison.x \
+ # --output=$@.t src/bison$(EXEEXT)
+ #$(AM_V_at)if $(remove_time_stamp) $@ >$@a.t 2>/dev/null && \
+ # $(remove_time_stamp) $@.t | cmp $@a.t - >/dev/null 2>&1; then \
+ # touch $@; \
+ #else \
+ # mv $@.t $@; \
+ #fi
+ #$(AM_V_at)rm -f $@*.t
+ touch $@
.gv.eps:
$(AM_V_GEN) $(MKDIR_P) `echo "./$@" | sed -e 's,/[^/]*$$,,'`
diff --no-dereference -Naur -- bison.normalized/tixbuildinfo bison.srctix/tixbuildinfo
--- bison.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ bison.srctix/tixbuildinfo 2014-06-23 20:16:02.138190921 +0200
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=bison
+pkg.build-libraries=libstdc++? libiconv?
+pkg.build-system=configure
+pkg.make.vars=V=1

8
ports/bochs/bochs.info Normal file
View File

@ -0,0 +1,8 @@
NAME='bochs'
BUILD_LIBRARIES='libstdc++ libiconv libSDL'
VERSION='2.6'
DISTNAME='bochs-2.6'
ARCHIVE='bochs-2.6.tar.gz'
SHA256SUM='65123e44a6d2c1148d741da025d16311b9ccd600ef268b911aba73c67eaf86e1'
UPSTREAM_SITE='https://sourceforge.net/projects/bochs/files/bochs/2.6'
UPSTREAM_ARCHIVE='bochs-2.6.tar.gz'

249
ports/bochs/bochs.patch Normal file
View File

@ -0,0 +1,249 @@
diff --no-dereference -Naur -- bochs.normalized/config.sub bochs.srctix/config.sub
--- bochs.normalized/config.sub 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/config.sub 2013-02-12 22:03:01.826871690 +0100
@@ -1297,7 +1297,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- bochs.normalized/configure bochs.srctix/configure
--- bochs.normalized/configure 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/configure 2013-11-23 01:39:10.809388604 +0100
@@ -23755,7 +23755,7 @@
if test "$with_sdl" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
- SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl-config --libs`"
+ SOUND_LINK_OPTS="$SOUND_LINK_OPTS `${PKG_CONFIG:-pkg-config} sdl --libs`"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: sdl" >&5
$as_echo "sdl" >&6; }
@@ -24199,7 +24199,7 @@
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
- SDL_CFLAGS=`sdl-config --cflags`
+ SDL_CFLAGS=`${PKG_CONFIG:-pkg-config} sdl --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
diff --no-dereference -Naur -- bochs.normalized/configure.in bochs.srctix/configure.in
--- bochs.normalized/configure.in 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/configure.in 2013-11-23 01:39:10.817388604 +0100
@@ -1805,7 +1805,7 @@
if test "$with_sdl" = yes; then
SOUNDLOW_OBJS="$SOUNDLOW_OBJS soundsdl.o"
if test "$bx_plugins" = 1; then
- SOUND_LINK_OPTS="$SOUND_LINK_OPTS `sdl-config --libs`"
+ SOUND_LINK_OPTS="$SOUND_LINK_OPTS `${PKG_CONFIG:-pkg-config} sdl --libs`"
fi
AC_MSG_RESULT(sdl)
else
@@ -2102,7 +2102,7 @@
SPECIFIC_GUI_OBJS="$SPECIFIC_GUI_OBJS \$(GUI_OBJS_SDL)"
# GUI_*FLAGS are added to the compilation of every bochs file, not just
# the files in gui/*.cc.
- SDL_CFLAGS=`sdl-config --cflags`
+ SDL_CFLAGS=`${PKG_CONFIG:-pkg-config} sdl --cflags`
GUI_CFLAGS="$GUI_CFLAGS $SDL_CFLAGS"
GUI_CXXFLAGS="$GUI_CXXFLAGS $SDL_CFLAGS"
GUI_LINK_OPTS="$GUI_LINK_OPTS \$(GUI_LINK_OPTS_SDL)"
diff --no-dereference -Naur -- bochs.normalized/cpu/debugstuff.cc bochs.srctix/cpu/debugstuff.cc
--- bochs.normalized/cpu/debugstuff.cc 2012-09-02 13:29:47.000000000 +0200
+++ bochs.srctix/cpu/debugstuff.cc 2015-02-07 16:38:47.621281077 +0100
@@ -256,8 +256,8 @@
(unsigned) BX_CPU_THIS_PTR cr0.get32(),
(unsigned) BX_CPU_THIS_PTR cr2, (unsigned) BX_CPU_THIS_PTR cr3));
#else
- BX_INFO(("| CR0=0x%08x CR2=0x%08x",
- BX_CPU_THIS_PTR cr0.get32(), BX_CPU_THIS_PTR cr2));
+ BX_INFO(("| CR0=0x%08x CR2=0x%08jx",
+ BX_CPU_THIS_PTR cr0.get32(), (uintmax_t)BX_CPU_THIS_PTR cr2));
BX_INFO(("| CR3=0x%08x CR4=0x%08x",
(unsigned) BX_CPU_THIS_PTR cr3,
(unsigned) BX_CPU_THIS_PTR cr4.get32()));
diff --no-dereference -Naur -- bochs.normalized/cpu/fetchdecode.cc bochs.srctix/cpu/fetchdecode.cc
--- bochs.normalized/cpu/fetchdecode.cc 2012-09-02 13:29:47.000000000 +0200
+++ bochs.srctix/cpu/fetchdecode.cc 2015-02-07 16:38:47.625281077 +0100
@@ -2010,8 +2010,8 @@
#endif
}
else {
- BX_DEBUG(("%s: instruction not supported - signalling #UD (features bitmask: 0x%08x)",
- get_bx_opcode_name(ia_opcode), BX_CPU_THIS_PTR isa_extensions_bitmask));
+ BX_DEBUG(("%s: instruction not supported - signalling #UD (features bitmask: 0x%08jx)",
+ get_bx_opcode_name(ia_opcode), (uintmax_t)BX_CPU_THIS_PTR isa_extensions_bitmask));
}
exception(BX_UD_EXCEPTION, 0);
diff --no-dereference -Naur -- bochs.normalized/doc/docbook/Makefile.in bochs.srctix/doc/docbook/Makefile.in
--- bochs.normalized/doc/docbook/Makefile.in 2012-09-02 13:29:51.000000000 +0200
+++ bochs.srctix/doc/docbook/Makefile.in 2014-06-22 22:30:19.322670941 +0200
@@ -15,7 +15,7 @@
TARGZ = bochsdoc.tar.gz
RENDERED_DOC_URL = http://bochs.sf.net/doc/docbook/$(TARGZ)
-DESTDIR=
+DESTDIR?=
# name of the major documentation sections
SECTIONS=user documentation development
diff --no-dereference -Naur -- bochs.normalized/fpu/fpu.cc bochs.srctix/fpu/fpu.cc
--- bochs.normalized/fpu/fpu.cc 2012-09-02 13:30:08.000000000 +0200
+++ bochs.srctix/fpu/fpu.cc 2015-02-07 16:38:47.625281077 +0100
@@ -582,7 +582,7 @@
f *= fp.fraction*scale_factor;
#endif
float_class_t f_class = floatx80_class(fp);
- fprintf(stderr, "%sFP%d ST%d(%c): raw 0x%04x:%08lx%08lx (%.10f) (%s)\n",
+ fprintf(stderr, "%sFP%d ST%d(%c): raw 0x%04x:%08x%08x (%.10f) (%s)\n",
i==tos?"=>":" ", i, (i-tos)&7,
"v0se"[tag],
fp.exp & 0xffff, GET32H(fp.fraction), GET32L(fp.fraction),
diff --no-dereference -Naur -- bochs.normalized/gui/Makefile.in bochs.srctix/gui/Makefile.in
--- bochs.normalized/gui/Makefile.in 2012-09-02 13:29:57.000000000 +0200
+++ bochs.srctix/gui/Makefile.in 2013-11-23 01:39:10.833388605 +0100
@@ -69,7 +69,7 @@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS)
-GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
+GUI_LINK_OPTS_SDL = `$${PKG_CONFIG:-pkg-config} sdl --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@
GUI_LINK_OPTS_AMIGAOS =
diff --no-dereference -Naur -- bochs.normalized/iodev/serial.cc bochs.srctix/iodev/serial.cc
--- bochs.normalized/iodev/serial.cc 2012-09-02 13:30:13.000000000 +0200
+++ bochs.srctix/iodev/serial.cc 2014-12-27 14:52:01.203450041 +0100
@@ -39,6 +39,18 @@
typedef int SOCKET;
#endif
+#if defined(__sortix__)
+struct hostent
+{
+ char *h_name;
+ char **h_aliases;
+ int h_addrtype;
+ int h_length;
+ char **h_addr_list;
+};
+#define gethostbyname(a) ((void) a, (struct hostent*) NULL)
+#endif
+
#include "iodev.h"
#include "serial.h"
@@ -462,9 +474,9 @@
memset ((char*) &sin, 0, sizeof (sin));
#if BX_HAVE_SOCKADDR_IN_SIN_LEN
- sin.sin_len = sizeof sin;
+ sin.sin_len = sizeof sin;
#endif
- memcpy ((char*) &(sin.sin_addr), hp->h_addr, hp->h_length);
+ memcpy ((char*) &(sin.sin_addr), hp->h_addr_list[0], hp->h_length);
sin.sin_family = hp->h_addrtype;
sin.sin_port = htons (port);
diff --no-dereference -Naur -- bochs.normalized/iodev/vgacore.cc bochs.srctix/iodev/vgacore.cc
--- bochs.normalized/iodev/vgacore.cc 2012-09-02 13:30:13.000000000 +0200
+++ bochs.srctix/iodev/vgacore.cc 2013-03-30 15:31:57.906642341 +0100
@@ -387,9 +387,9 @@
void bx_vgacore_c::determine_screen_dimensions(unsigned *piHeight, unsigned *piWidth)
{
- int ai[0x20];
+ int ai[20];
int i,h,v;
- for (i = 0 ; i < 0x20 ; i++)
+ for (i = 0 ; i < 20 ; i++)
ai[i] = BX_VGA_THIS s.CRTC.reg[i];
h = (ai[1] + 1) * 8;
diff --no-dereference -Naur -- bochs.normalized/Makefile.in bochs.srctix/Makefile.in
--- bochs.normalized/Makefile.in 2012-09-02 13:30:15.000000000 +0200
+++ bochs.srctix/Makefile.in 2013-11-23 01:39:10.837388604 +0100
@@ -35,7 +35,7 @@
top_builddir = .
top_srcdir = $(srcdir)
-DESTDIR =
+DESTDIR ?=
VERSION=@VERSION@
VER_STRING=@VER_STRING@
@@ -96,7 +96,7 @@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
GUI_LINK_OPTS_X = $(X_LIBS) $(X_PRE_LIBS)
-GUI_LINK_OPTS_SDL = `sdl-config --cflags --libs`
+GUI_LINK_OPTS_SDL = `$${PKG_CONFIG:-pkg-config} sdl --cflags --libs`
GUI_LINK_OPTS_SVGA = -lvga -lvgagl
GUI_LINK_OPTS_RFB = @RFB_LIBS@
GUI_LINK_OPTS_AMIGAOS =
@@ -623,6 +623,8 @@
@CD_UP_THREE@
@RMCOMMAND@ Makefile
+distclean: dist-clean
+
###########################################
# Build app on MacOS X
###########################################
diff --no-dereference -Naur -- bochs.normalized/memory/misc_mem.cc bochs.srctix/memory/misc_mem.cc
--- bochs.normalized/memory/misc_mem.cc 2012-09-02 13:29:51.000000000 +0200
+++ bochs.srctix/memory/misc_mem.cc 2016-01-26 17:03:48.524277893 +0100
@@ -158,12 +158,12 @@
const Bit64u block_address = ((Bit64u)block)*BX_MEM_BLOCK_LEN;
if (fseeko64(BX_MEM_THIS overflow_file, block_address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%lx in memory overflow file!", block_address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in memory overflow file!", (unsigned long long) block_address));
// We could legitimately get an EOF condition if we are reading the last bit of memory.ram
if ((fread(BX_MEM_THIS blocks[block], BX_MEM_BLOCK_LEN, 1, BX_MEM_THIS overflow_file) != 1) &&
(!feof(BX_MEM_THIS overflow_file)))
- BX_PANIC(("FATAL ERROR: Could not read from 0x%lx in memory overflow file!", block_address));
+ BX_PANIC(("FATAL ERROR: Could not read from 0x%llx in memory overflow file!", (unsigned long long) block_address));
}
#endif
@@ -208,9 +208,9 @@
}
// Write swapped out block
if (fseeko64(BX_MEM_THIS overflow_file, address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", (unsigned long long)address));
if (1 != fwrite (BX_MEM_THIS blocks[BX_MEM_THIS next_swapout_idx], BX_MEM_BLOCK_LEN, 1, BX_MEM_THIS overflow_file))
- BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", (unsigned long long)address));
// Mark swapped out block
BX_MEM_THIS blocks[BX_MEM_THIS next_swapout_idx] = BX_MEM_C::swapped_out;
BX_MEM_THIS blocks[block] = buffer;
@@ -245,9 +245,9 @@
{
bx_phy_address address = ((bx_phy_address)idx)*BX_MEM_BLOCK_LEN;
if (fseeko64(fp, address, SEEK_SET))
- BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not seek to 0x%llx in overflow file!", (unsigned long long)address));
if (1 != fwrite (BX_MEM(0)->blocks[idx], BX_MEM_BLOCK_LEN, 1, fp))
- BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", address));
+ BX_PANIC(("FATAL ERROR: Could not write at 0x%llx in overflow file!", (unsigned long long)address));
}
}
}
diff --no-dereference -Naur -- bochs.normalized/tixbuildinfo bochs.srctix/tixbuildinfo
--- bochs.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ bochs.srctix/tixbuildinfo 2013-11-23 01:39:10.849388605 +0100
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=bochs
+pkg.build-libraries=libstdc++ libiconv libSDL
+pkg.build-system=configure
+pkg.configure.args=--with-sdl --enable-x86-64

View File

@ -0,0 +1 @@
chmod +x -- './make.sortix'

8
ports/bzip2/bzip2.info Normal file
View File

@ -0,0 +1,8 @@
NAME='bzip2'
BUILD_LIBRARIES=''
VERSION='1.0.6'
DISTNAME='bzip2-1.0.6'
ARCHIVE='bzip2-1.0.6.tar.gz'
SHA256SUM='a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd'
UPSTREAM_SITE='https://sourceware.org/pub/bzip2'
UPSTREAM_ARCHIVE='bzip2-1.0.6.tar.gz'

View File

@ -0,0 +1,3 @@
rm -rf -- 'manual.html'
rm -rf -- 'manual.pdf'
rm -rf -- 'manual.ps'

139
ports/bzip2/bzip2.patch Normal file
View File

@ -0,0 +1,139 @@
diff -Naur -- bzip2.normalized/bzip2.c bzip2.srctix/bzip2.c
--- bzip2.normalized/bzip2.c 2010-09-11 01:04:53.000000000 +0200
+++ bzip2.srctix/bzip2.c 2013-01-13 17:40:12.617967829 +0100
@@ -72,7 +72,9 @@
# include <utime.h>
# include <unistd.h>
# include <sys/stat.h>
+#if !defined(__sortix__)
# include <sys/times.h>
+#endif
# define PATH_SEP '/'
# define MY_LSTAT lstat
diff -Naur -- bzip2.normalized/Makefile bzip2.srctix/Makefile
--- bzip2.normalized/Makefile 2010-09-11 00:46:02.000000000 +0200
+++ bzip2.srctix/Makefile 2013-03-06 12:51:21.232712590 +0100
@@ -25,6 +25,8 @@
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
+EXEC_PREFIX=$(PREFIX)
+DESTDIR=
OBJS= blocksort.o \
@@ -35,7 +37,7 @@
decompress.o \
bzlib.o
-all: libbz2.a bzip2 bzip2recover test
+all: libbz2.a bzip2 bzip2recover
bzip2: libbz2.a bzip2.o
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
@@ -70,43 +72,43 @@
@cat words3
install: bzip2 bzip2recover
- if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
- if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
- if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
- cp -f bzip2 $(PREFIX)/bin/bzip2
- cp -f bzip2 $(PREFIX)/bin/bunzip2
- cp -f bzip2 $(PREFIX)/bin/bzcat
- cp -f bzip2recover $(PREFIX)/bin/bzip2recover
- chmod a+x $(PREFIX)/bin/bzip2
- chmod a+x $(PREFIX)/bin/bunzip2
- chmod a+x $(PREFIX)/bin/bzcat
- chmod a+x $(PREFIX)/bin/bzip2recover
- cp -f bzip2.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzip2.1
- cp -f bzlib.h $(PREFIX)/include
- chmod a+r $(PREFIX)/include/bzlib.h
- cp -f libbz2.a $(PREFIX)/lib
- chmod a+r $(PREFIX)/lib/libbz2.a
- cp -f bzgrep $(PREFIX)/bin/bzgrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
- chmod a+x $(PREFIX)/bin/bzgrep
- cp -f bzmore $(PREFIX)/bin/bzmore
- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
- chmod a+x $(PREFIX)/bin/bzmore
- cp -f bzdiff $(PREFIX)/bin/bzdiff
- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
- chmod a+x $(PREFIX)/bin/bzdiff
- cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- chmod a+r $(PREFIX)/man/man1/bzgrep.1
- chmod a+r $(PREFIX)/man/man1/bzmore.1
- chmod a+r $(PREFIX)/man/man1/bzdiff.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
+ if ( test ! -d $(DESTDIR)$(EXEC_PREFIX)/bin ) ; then mkdir -p $(DESTDIR)$(EXEC_PREFIX)/bin ; fi
+ if ( test ! -d $(DESTDIR)$(EXEC_PREFIX)/lib ) ; then mkdir -p $(DESTDIR)$(EXEC_PREFIX)/lib ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/share/man ) ; then mkdir -p $(DESTDIR)$(PREFIX)/share/man ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/share/man/man1 ) ; then mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1 ; fi
+ if ( test ! -d $(DESTDIR)$(PREFIX)/include ) ; then mkdir -p $(DESTDIR)$(PREFIX)/include ; fi
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bunzip2
+ cp -f bzip2 $(DESTDIR)$(EXEC_PREFIX)/bin/bzcat
+ cp -f bzip2recover $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2recover
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bunzip2
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzcat
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzip2recover
+ cp -f bzip2.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzip2.1
+ cp -f bzlib.h $(DESTDIR)$(PREFIX)/include
+ chmod a+r $(DESTDIR)$(PREFIX)/include/bzlib.h
+ cp -f libbz2.a $(DESTDIR)$(EXEC_PREFIX)/lib
+ chmod a+r $(DESTDIR)$(EXEC_PREFIX)/lib/libbz2.a
+ cp -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzgrep
+ ln -s -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzegrep
+ ln -s -f bzgrep $(DESTDIR)$(EXEC_PREFIX)/bin/bzfgrep
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzgrep
+ cp -f bzmore $(DESTDIR)$(EXEC_PREFIX)/bin/bzmore
+ ln -s -f bzmore $(DESTDIR)$(EXEC_PREFIX)/bin/bzless
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzmore
+ cp -f bzdiff $(DESTDIR)$(EXEC_PREFIX)/bin/bzdiff
+ ln -s -f bzdiff $(DESTDIR)$(EXEC_PREFIX)/bin/bzcmp
+ chmod a+x $(DESTDIR)$(EXEC_PREFIX)/bin/bzdiff
+ cp -f bzgrep.1 bzmore.1 bzdiff.1 $(DESTDIR)$(PREFIX)/share/man/man1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzgrep.1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzmore.1
+ chmod a+r $(DESTDIR)$(PREFIX)/share/man/man1/bzdiff.1
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzegrep.1
+ echo ".so man1/bzgrep.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzfgrep.1
+ echo ".so man1/bzmore.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzless.1
+ echo ".so man1/bzdiff.1" > $(DESTDIR)$(PREFIX)/share/man/man1/bzcmp.1
clean:
rm -f *.o libbz2.a bzip2 bzip2recover \
diff -Naur -- bzip2.normalized/make.sortix bzip2.srctix/make.sortix
--- bzip2.normalized/make.sortix 1970-01-01 01:00:00.000000000 +0100
+++ bzip2.srctix/make.sortix 2013-03-29 19:33:32.380410346 +0100
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec "$MAKE" "$@" \
+ PREFIX="$PREFIX" \
+ EXEC_PREFIX="$EXEC_PREFIX" \
+ DESTDIR="$DESTDIR" \
+ CC=${HOST}-gcc \
+ AR=${HOST}-ar \
+ RANLIB=${HOST}-ranlib \
+ BIGFILES= \
+#
diff -Naur -- bzip2.normalized/tixbuildinfo bzip2.srctix/tixbuildinfo
--- bzip2.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ bzip2.srctix/tixbuildinfo 2013-10-30 15:54:17.432628449 +0100
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=bzip2
+pkg.build-libraries=
+pkg.build-system=sortix-usual-makefile
+pkg.make.cmd=./make.sortix

2
ports/cut/cut.info Normal file
View File

@ -0,0 +1,2 @@
NAME='cut'
BUILD_LIBRARIES=''

340
ports/cut/cut.patch Normal file
View File

@ -0,0 +1,340 @@
diff --no-dereference -Naur cut.normalized/cut.c cut.srctix/cut.c
--- cut.normalized/cut.c 1970-01-01 01:00:00.000000000 +0100
+++ cut.srctix/cut.c 2016-02-20 14:54:38.000000000 +0100
@@ -0,0 +1,298 @@
+/* $OpenBSD: cut.c,v 1.18 2014/02/02 11:44:01 sobrado Exp $ */
+/* $NetBSD: cut.c,v 1.9 1995/09/02 05:59:23 jtc Exp $ */
+
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam S. Moskowitz of Menlo Consulting and Marciano Pitargue.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <ctype.h>
+#include <error.h>
+#include <errno.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#define err(eval, ...) error(eval, errno, __VA_ARGS__)
+#define errx(eval, ...) error(eval, 0, __VA_ARGS__)
+#define warn(...) error(0, errno, __VA_ARGS__)
+#define warnx(...) error(0, 0, __VA_ARGS__)
+
+#define _POSIX2_LINE_MAX 2048
+
+int cflag;
+char dchar;
+int dflag;
+int fflag;
+int sflag;
+
+void c_cut(FILE *, char *);
+void f_cut(FILE *, char *);
+void get_list(char *);
+void usage(void);
+
+int
+main(int argc, char *argv[])
+{
+ FILE *fp;
+ void (*fcn)(FILE *, char *);
+ int ch, rval;
+
+ setlocale (LC_ALL, "");
+
+ dchar = '\t'; /* default delimiter is \t */
+
+ /* Since we don't support multi-byte characters, the -c and -b
+ options are equivalent, and the -n option is meaningless. */
+ while ((ch = getopt(argc, argv, "b:c:d:f:sn")) != -1)
+ switch(ch) {
+ case 'b':
+ case 'c':
+ fcn = c_cut;
+ get_list(optarg);
+ cflag = 1;
+ break;
+ case 'd':
+ dchar = *optarg;
+ dflag = 1;
+ break;
+ case 'f':
+ get_list(optarg);
+ fcn = f_cut;
+ fflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ case 'n':
+ break;
+ case '?':
+ default:
+ usage();
+ }
+ argc -= optind;
+ argv += optind;
+
+ if (fflag) {
+ if (cflag)
+ usage();
+ } else if (!cflag || dflag || sflag)
+ usage();
+
+ rval = 0;
+ if (*argv)
+ for (; *argv; ++argv) {
+ if (strcmp(*argv, "-") == 0)
+ fcn(stdin, "stdin");
+ else {
+ if ((fp = fopen(*argv, "r"))) {
+ fcn(fp, *argv);
+ (void)fclose(fp);
+ } else {
+ rval = 1;
+ warn("%s", *argv);
+ }
+ }
+ }
+ else
+ fcn(stdin, "stdin");
+ exit(rval);
+}
+
+int autostart, autostop, maxval;
+
+char positions[_POSIX2_LINE_MAX + 1];
+
+void
+get_list(char *list)
+{
+ int setautostart, start, stop;
+ char *pos;
+ char *p;
+
+ /*
+ * set a byte in the positions array to indicate if a field or
+ * column is to be selected; use +1, it's 1-based, not 0-based.
+ * This parser is less restrictive than the Draft 9 POSIX spec.
+ * POSIX doesn't allow lists that aren't in increasing order or
+ * overlapping lists. We also handle "-3-5" although there's no
+ * real reason too.
+ */
+ while ((p = strsep(&list, ", \t"))) {
+ setautostart = start = stop = 0;
+ if (*p == '-') {
+ ++p;
+ setautostart = 1;
+ }
+ if (isdigit((unsigned char)*p)) {
+ start = stop = strtol(p, &p, 10);
+ if (setautostart && start > autostart)
+ autostart = start;
+ }
+ if (*p == '-') {
+ if (isdigit((unsigned char)p[1]))
+ stop = strtol(p + 1, &p, 10);
+ if (*p == '-') {
+ ++p;
+ if (!autostop || autostop > stop)
+ autostop = stop;
+ }
+ }
+ if (*p)
+ errx(1, "[-bcf] list: illegal list value");
+ if (!stop || !start)
+ errx(1, "[-bcf] list: values may not include zero");
+ if (stop > _POSIX2_LINE_MAX)
+ errx(1, "[-bcf] list: %d too large (max %d)",
+ stop, _POSIX2_LINE_MAX);
+ if (maxval < stop)
+ maxval = stop;
+ for (pos = positions + start; start++ <= stop; *pos++ = 1)
+ ;
+ }
+
+ /* overlapping ranges */
+ if (autostop && maxval > autostop)
+ maxval = autostop;
+
+ /* set autostart */
+ if (autostart)
+ memset(positions + 1, '1', autostart);
+}
+
+/* ARGSUSED */
+void
+c_cut(FILE *fp, char *fname)
+{
+ (void)fname;
+ int ch, col;
+ char *pos;
+
+ for (;;) {
+ pos = positions + 1;
+ for (col = maxval; col; --col) {
+ if ((ch = getc(fp)) == EOF)
+ return;
+ if (ch == '\n')
+ break;
+ if (*pos++)
+ (void)putchar(ch);
+ }
+ if (ch != '\n') {
+ if (autostop)
+ while ((ch = getc(fp)) != EOF && ch != '\n')
+ (void)putchar(ch);
+ else
+ while ((ch = getc(fp)) != EOF && ch != '\n')
+ ;
+ }
+ (void)putchar('\n');
+ }
+}
+
+void
+f_cut(FILE *fp, char *fname)
+{
+ (void)fname;
+ int ch, field, isdelim;
+ char *pos, *p, sep;
+ int output;
+ size_t len;
+ ssize_t slen;
+ size_t lbuf_raw_length = 0;
+ char *lbuf = NULL, *tbuf;
+
+ for (sep = dchar, tbuf = NULL; 0 <= (slen = getline(&lbuf, &lbuf_raw_length, fp));) {
+ len = slen;
+ output = 0;
+ if (lbuf[len - 1] != '\n') {
+ /* no newline at the end of the last line so add one */
+ if ((tbuf = (char *)malloc(len + 1)) == NULL)
+ err(1, NULL);
+ memcpy(tbuf, lbuf, len);
+ tbuf[len] = '\n';
+ lbuf = tbuf;
+ }
+ for (isdelim = 0, p = lbuf;; ++p) {
+ ch = *p;
+ /* this should work if newline is delimiter */
+ if (ch == sep)
+ isdelim = 1;
+ if (ch == '\n') {
+ if (!isdelim && !sflag)
+ (void)fwrite(lbuf, len, 1, stdout);
+ break;
+ }
+ }
+ if (!isdelim)
+ continue;
+
+ pos = positions + 1;
+ for (field = maxval, p = lbuf; field; --field, ++pos) {
+ if (*pos) {
+ if (output++)
+ (void)putchar(sep);
+ while ((ch = *p++) != '\n' && ch != sep)
+ (void)putchar(ch);
+ } else
+ while ((ch = *p++) != '\n' && ch != sep)
+ ;
+ if (ch == '\n')
+ break;
+ }
+ if (ch != '\n') {
+ if (autostop) {
+ if (output)
+ (void)putchar(sep);
+ for (; (ch = *p) != '\n'; ++p)
+ (void)putchar(ch);
+ } else
+ for (; (ch = *p) != '\n'; ++p)
+ ;
+ }
+ (void)putchar('\n');
+ }
+ if (tbuf)
+ free(tbuf);
+ free(lbuf);
+}
+
+void
+usage(void)
+{
+ (void)fprintf(stderr,
+ "usage: cut -b list [-n] [file ...]\n"
+ " cut -c list [file ...]\n"
+ " cut -f list [-s] [-d delim] [file ...]\n");
+ exit(1);
+}
diff --no-dereference -Naur cut.normalized/Makefile cut.srctix/Makefile
--- cut.normalized/Makefile 1970-01-01 01:00:00.000000000 +0100
+++ cut.srctix/Makefile 2021-11-29 23:39:17.724298321 +0100
@@ -0,0 +1,25 @@
+include ../../../build-aux/compiler.mak
+include ../../../build-aux/version.mak
+include ../../../build-aux/dirs.mak
+
+OPTLEVEL?=-g -O2
+CFLAGS?=$(OPTLEVEL)
+
+CFLAGS:=$(CXXFLAGS) -Wall -Wextra
+CPPFLAGS:=$(CPPFLAGS)
+
+BINARY:=cut
+
+all: $(BINARY)
+
+.PHONY: all install clean
+
+%: %.c
+ $(CC) -std=gnu11 $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LIBS)
+
+install: all
+ mkdir -p $(DESTDIR)$(BINDIR)
+ install $(BINARY) $(DESTDIR)$(BINDIR)
+
+clean:
+ rm -f $(BINARY)
diff --no-dereference -Naur cut.normalized/tixbuildinfo cut.srctix/tixbuildinfo
--- cut.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ cut.srctix/tixbuildinfo 2016-02-20 14:55:07.000000000 +0100
@@ -0,0 +1,5 @@
+tix.version=1
+tix.class=srctix
+pkg.name=cut
+pkg.build-libraries=
+pkg.build-system=sortix-usual-makefile

8
ports/dash/dash.info Normal file
View File

@ -0,0 +1,8 @@
NAME='dash'
BUILD_LIBRARIES=''
VERSION='0.5.7'
DISTNAME='dash-0.5.7'
ARCHIVE='dash-0.5.7.tar.gz'
SHA256SUM='ae89fa9f1145b7748cf0740e1df04cd52fdf8a285da4911dd0f04983efba4e39'
UPSTREAM_SITE='http://gondor.apana.org.au/~herbert/dash/files'
UPSTREAM_ARCHIVE='dash-0.5.7.tar.gz'

227
ports/dash/dash.patch Normal file
View File

@ -0,0 +1,227 @@
diff --no-dereference -Naur -- dash.normalized/src/cd.c dash.srctix/src/cd.c
--- dash.normalized/src/cd.c 2011-03-15 08:18:06.000000000 +0100
+++ dash.srctix/src/cd.c 2014-03-05 22:37:01.573462868 +0100
@@ -252,7 +252,7 @@
STATIC char *
getpwd()
{
-#ifdef __GLIBC__
+#if defined(__GLIBC__) || defined(__sortix__)
char *dir = getcwd(0, 0);
if (dir)
diff --no-dereference -Naur -- dash.normalized/src/exec.c dash.srctix/src/exec.c
--- dash.normalized/src/exec.c 2011-03-15 08:45:32.000000000 +0100
+++ dash.srctix/src/exec.c 2014-07-06 21:34:58.557495010 +0200
@@ -151,6 +151,9 @@
STATIC void
tryexec(char *cmd, char **argv, char **envp)
{
+#if defined(__sortix__)
+ execvpe((const char*) cmd, argv, envp);
+#else
char *const path_bshell = _PATH_BSHELL;
repeat:
@@ -166,6 +169,7 @@
*argv = cmd = path_bshell;
goto repeat;
}
+#endif
}
diff --no-dereference -Naur -- dash.normalized/src/histedit.c dash.srctix/src/histedit.c
--- dash.normalized/src/histedit.c 2011-03-15 08:18:06.000000000 +0100
+++ dash.srctix/src/histedit.c 2021-02-13 23:06:09.234182385 +0100
@@ -32,7 +32,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
diff --no-dereference -Naur -- dash.normalized/src/jobs.c dash.srctix/src/jobs.c
--- dash.normalized/src/jobs.c 2011-03-15 08:45:32.000000000 +0100
+++ dash.srctix/src/jobs.c 2021-02-13 23:06:09.246182457 +0100
@@ -40,7 +40,6 @@
#include <paths.h>
#endif
#include <sys/types.h>
-#include <sys/param.h>
#ifdef BSD
#include <sys/wait.h>
#include <sys/time.h>
@@ -207,7 +206,7 @@
mflag = on = 0;
goto close;
}
- if (pgrp == getpgrp())
+ if (pgrp == getpgid(0))
break;
killpg(0, SIGTTIN);
} while (1);
@@ -457,7 +456,7 @@
if (mode & SHOW_PGID) {
/* just output process (group) id of pipeline */
- outfmt(out, "%d\n", ps->pid);
+ outfmt(out, "%jd\n", (intmax_t) ps->pid);
return;
}
@@ -470,7 +469,7 @@
s[col - 2] = '-';
if (mode & SHOW_PID)
- col += fmtstr(s + col, 16, "%d ", ps->pid);
+ col += fmtstr(s + col, 16, "%jd ", (intmax_t) ps->pid);
psend = ps + jp->nprocs;
@@ -490,7 +489,7 @@
do {
/* for each process */
- col = fmtstr(s, 48, " |\n%*c%d ", indent, ' ', ps->pid) - 3;
+ col = fmtstr(s, 48, " |\n%*c%jd ", indent, ' ', (intmax_t) ps->pid) - 3;
start:
outfmt(
@@ -1136,7 +1135,7 @@
do {
gotsigchld = 0;
- err = wait3(status, flags, NULL);
+ err = waitpid(-1, status, flags);
if (err || !block)
break;
diff --no-dereference -Naur -- dash.normalized/src/Makefile.in dash.srctix/src/Makefile.in
--- dash.normalized/src/Makefile.in 2011-07-08 11:00:39.000000000 +0200
+++ dash.srctix/src/Makefile.in 2014-06-22 22:50:53.966698841 +0200
@@ -170,9 +170,9 @@
AM_CFLAGS = $(COMMON_CFLAGS)
AM_CPPFLAGS = $(COMMON_CPPFLAGS)
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS)
-AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
+AM_CPPFLAGS_FOR_BUILD = -DBSD=1 -DSHELL -DIFS_BROKEN
COMPILE_FOR_BUILD = \
- $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \
+ unset HOST_SYSTEM_ROOT && $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \
$(CPPFLAGS_FOR_BUILD) \
$(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
@@ -542,7 +542,11 @@
info-am:
-install-data-am: install-man
+install-data-am: install-man install-proper-shells
+
+install-proper-shells:
+ mkdir -p "$(DESTDIR)$(sysconfdir)/proper-shells"
+ echo dash > "$(DESTDIR)$(sysconfdir)/proper-shells/dash"
install-dvi: install-dvi-am
diff --no-dereference -Naur -- dash.normalized/src/miscbltin.c dash.srctix/src/miscbltin.c
--- dash.normalized/src/miscbltin.c 2011-03-15 08:18:06.000000000 +0100
+++ dash.srctix/src/miscbltin.c 2021-02-13 23:06:09.246182457 +0100
@@ -37,7 +37,6 @@
*/
#include <sys/types.h> /* quad_t */
-#include <sys/param.h> /* BSD4_4 */
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/resource.h>
diff --no-dereference -Naur -- dash.normalized/src/output.c dash.srctix/src/output.c
--- dash.normalized/src/output.c 2011-03-15 08:18:06.000000000 +0100
+++ dash.srctix/src/output.c 2021-02-13 23:06:09.250182482 +0100
@@ -44,7 +44,6 @@
*/
#include <sys/types.h> /* quad_t */
-#include <sys/param.h> /* BSD4_4 */
#include <sys/ioctl.h>
#include <stdio.h> /* defines BUFSIZ */
diff --no-dereference -Naur -- dash.normalized/src/parser.c dash.srctix/src/parser.c
--- dash.normalized/src/parser.c 2011-07-07 07:54:12.000000000 +0200
+++ dash.srctix/src/parser.c 2021-02-13 23:06:09.250182482 +0100
@@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
-#if HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-
#include <stdlib.h>
#include "shell.h"
@@ -1090,10 +1086,12 @@
if (len) {
char *str;
- str = alloca(len + 1);
+ str = ckmalloc(len + 1);
*(char *)mempcpy(str, p, len) = 0;
pushstring(str, NULL);
+
+ ckfree(str);
}
}
}
@@ -1300,7 +1298,7 @@
str = NULL;
savelen = out - (char *)stackblock();
if (savelen > 0) {
- str = alloca(savelen);
+ str = ckmalloc(savelen);
memcpy(str, stackblock(), savelen);
}
if (oldstyle) {
@@ -1400,6 +1398,7 @@
if (str) {
memcpy(out, str, savelen);
STADJUST(savelen, out);
+ ckfree(str);
}
USTPUTC(CTLBACKQ, out);
if (oldstyle)
diff --no-dereference -Naur -- dash.normalized/src/redir.c dash.srctix/src/redir.c
--- dash.normalized/src/redir.c 2011-03-10 09:49:46.000000000 +0100
+++ dash.srctix/src/redir.c 2021-02-13 23:06:09.250182482 +0100
@@ -34,7 +34,6 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include <sys/param.h> /* PIPE_BUF */
#include <signal.h>
#include <string.h>
#include <fcntl.h>
diff --no-dereference -Naur -- dash.normalized/src/shell.h dash.srctix/src/shell.h
--- dash.normalized/src/shell.h 2008-05-02 08:09:44.000000000 +0200
+++ dash.srctix/src/shell.h 2021-02-13 23:06:09.250182482 +0100
@@ -49,8 +49,6 @@
* a quit signal will generate a core dump.
*/
-#include <sys/param.h>
-
#ifndef JOBS
#define JOBS 1
#endif
diff --no-dereference -Naur -- dash.normalized/tixbuildinfo dash.srctix/tixbuildinfo
--- dash.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ dash.srctix/tixbuildinfo 2014-03-05 22:44:41.053476982 +0100
@@ -0,0 +1,5 @@
+tix.version=1
+tix.class=srctix
+pkg.name=dash
+pkg.build-libraries=
+pkg.build-system=configure

View File

@ -0,0 +1,8 @@
NAME='diffutils'
BUILD_LIBRARIES='libiconv?'
VERSION='3.2'
DISTNAME='diffutils-3.2'
ARCHIVE='diffutils-3.2.tar.xz'
SHA256SUM='ab4fb75d0ef35f3c8c9a148cd3526ba6f4db71d10467a041eb45006436079149'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/diffutils'
UPSTREAM_ARCHIVE='diffutils-3.2.tar.xz'

View File

@ -0,0 +1,63 @@
diff --no-dereference -Naur -- diffutils.normalized/build-aux/config.sub diffutils.srctix/build-aux/config.sub
--- diffutils.normalized/build-aux/config.sub 2011-08-28 13:55:52.000000000 +0200
+++ diffutils.srctix/build-aux/config.sub 2013-01-13 19:25:11.342161312 +0100
@@ -1330,7 +1330,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- diffutils.normalized/lib/sigaction.c diffutils.srctix/lib/sigaction.c
--- diffutils.normalized/lib/sigaction.c 2011-03-26 13:45:45.000000000 +0100
+++ diffutils.srctix/lib/sigaction.c 2013-01-13 19:33:30.278176638 +0100
@@ -19,6 +19,7 @@
/* Specification. */
#include <signal.h>
+#define NSIG SIG_MAX_NUM
#include <errno.h>
#include <stdint.h>
@@ -51,9 +52,11 @@
with this module should stick with only sigaction(). */
/* Check some of our assumptions. */
+#if !defined(__sortix__)
#if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT
# error "Revisit the assumptions made in the sigaction module"
#endif
+#endif
/* Out-of-range substitutes make a good fallback for uncatchable
signals. */
diff --no-dereference -Naur -- diffutils.normalized/lib/stdio.in.h diffutils.srctix/lib/stdio.in.h
--- diffutils.normalized/lib/stdio.in.h 2011-08-28 13:57:28.000000000 +0200
+++ diffutils.srctix/lib/stdio.in.h 2014-02-15 20:43:10.975751117 +0100
@@ -1,3 +1,4 @@
+
/* -*- buffer-read-only: t -*- vi: set ro: */
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A GNU-like <stdio.h>.
@@ -681,7 +682,7 @@
# endif
#endif
-#if @GNULIB_GETS@
+#if @GNULIB_GETS@ && !defined(__sortix__)
# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef gets
diff --no-dereference -Naur -- diffutils.normalized/tixbuildinfo diffutils.srctix/tixbuildinfo
--- diffutils.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ diffutils.srctix/tixbuildinfo 2013-12-13 18:25:58.890943575 +0100
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=diffutils
+pkg.build-libraries=libiconv?
+pkg.build-system=configure
+pkg.configure.vars=gt_cv_locale_fr=false gt_cv_locale_ja=false gt_cv_locale_fr_utf8=false gt_cv_locale_ja_utf8=false gt_cv_locale_tr_utf8=false gt_cv_locale_zh_CN=false gl_cv_func_fchownat_nofollow_works=yes gl_cv_func_fchownat_empty_filename_works=yes
+pkg.make.vars=V=1

View File

@ -0,0 +1,8 @@
NAME='e2fsprogs'
BUILD_LIBRARIES='libiconv gettext'
VERSION='1.42.13'
DISTNAME='e2fsprogs-1.42.13'
ARCHIVE='e2fsprogs-1.42.13.tar.xz'
SHA256SUM='e16474b5a3a30f9197160c4b91bd48d5a463583049c0fcc405b6f0f7075aa0c7'
UPSTREAM_SITE='https://kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.13'
UPSTREAM_ARCHIVE='e2fsprogs-1.42.13.tar.xz'

View File

@ -0,0 +1 @@
rm -rf -- 'e2fsprogs.spec'

File diff suppressed because it is too large Load Diff

2
ports/ed/ed.info Normal file
View File

@ -0,0 +1,2 @@
NAME='ed'
BUILD_LIBRARIES=''

4112
ports/ed/ed.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
chmod +x -- './post-install.sortix'

8
ports/emacs/emacs.info Normal file
View File

@ -0,0 +1,8 @@
NAME='emacs'
BUILD_LIBRARIES='libcurses libcairo? libdbus? libfontconfig? libfreetype? libgconf? libgif? libgnutls? libgobject-introspection? libgpm? libgtk? libjpeg? liblcms2? libMagick? libm17t? libotf? libpng? librsvg? libtiff? libxml2? libxpm? libz?'
VERSION='26.2'
DISTNAME='emacs-26.2'
ARCHIVE='emacs-26.2.tar.xz'
SHA256SUM='151ce69dbe5b809d4492ffae4a4b153b2778459de6deb26f35691e1281a9c58e'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/emacs'
UPSTREAM_ARCHIVE='emacs-26.2.tar.xz'

View File

@ -0,0 +1,6 @@
rm -rf -- 'src/emacs-module.h'
rm -rf -- 'lisp/leim/leim-list.el'
rm -rf -- 'admin/unidata/unidata-gen.elc'
rm -rf -- 'admin/unidata/uvs.elc'
rm -rf -- 'admin/unidata/unidata.txt'
rm -rf -- 'admin/charsets/jisx2131-filter'

658
ports/emacs/emacs.patch Normal file
View File

@ -0,0 +1,658 @@
diff --no-dereference -Naur -- emacs.normalized/configure emacs.srctix/configure
--- emacs.normalized/configure 2019-04-11 22:47:05.000000000 +0200
+++ emacs.srctix/configure 2019-04-16 01:01:14.677391541 +0200
@@ -1,4 +1,124 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes # Not needed since February 2015
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypotl_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
+export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GNU Emacs 26.2.
#
@@ -626,6 +746,7 @@
ac_header_list=
gl_getopt_required=POSIX
ac_subst_vars='gltests_LTLIBOBJS
+cross_compiling
gltests_LIBOBJS
gl_LTLIBOBJS
gl_LIBOBJS
@@ -3979,11 +4100,11 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_MAKE" >&5
$as_echo "$ac_cv_path_MAKE" >&6; }
-$ac_path_MAKE_found || {
-as_fn_error $? "Building Emacs requires GNU Make, at least version 3.81.
-If you have it installed under another name, configure with 'MAKE=...'.
-For example, run '$0 MAKE=gnu-make'." "$LINENO" 5
-}
+#$ac_path_MAKE_found || {
+#as_fn_error $? "Building Emacs requires GNU Make, at least version 3.81.
+#If you have it installed under another name, configure with 'MAKE=...'.
+#For example, run '$0 MAKE=gnu-make'." "$LINENO" 5
+#}
MAKE=$ac_cv_path_MAKE
export MAKE
@@ -4791,6 +4912,11 @@
opsys=openbsd
;;
+ ## Sortix ports
+ *-sortix)
+ opsys=sortix
+ ;;
+
## Apple Darwin / macOS
*-apple-darwin* )
case "${canonical}" in
@@ -9190,6 +9316,7 @@
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
case "$opsys" in
nacl) CANNOT_DUMP=yes ;;
+ sortix) CANNOT_DUMP=yes ;;
esac
if test "$CANNOT_DUMP" = "yes"; then
@@ -11306,8 +11433,8 @@
fi
# Does the opsystem file prohibit the use of the GNU malloc?
-# Assume not, until told otherwise.
-GNU_MALLOC=yes
+GNU_MALLOC_reason=" because that would undermine the system malloc's improvements"
+GNU_MALLOC=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
@@ -15813,8 +15940,10 @@
test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
fi
-test "${with_gnutls}" != "no" && test "${HAVE_GNUTLS}" != "yes" &&
- MISSING="$MISSING gnutls" && WITH_NO="$WITH_NO --with-gnutls=no"
+# PATCH: Emacs works without libgnutls and there's an option --with-gnutls=no,
+# so this hard error is just in the way, so this patch removes the error.
+#test "${with_gnutls}" != "no" && test "${HAVE_GNUTLS}" != "yes" &&
+# MISSING="$MISSING gnutls" && WITH_NO="$WITH_NO --with-gnutls=no"
if test "X${MISSING}" != X; then
as_fn_error $? "The following required libraries were not found:
$MISSING
@@ -18588,7 +18717,7 @@
;;
- gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl )
+ gnu-linux | gnu-kfreebsd | dragonfly | freebsd | netbsd | darwin | nacl | sortix )
if test "x$ac_cv_func_grantpt" = xyes; then
$as_echo "#define UNIX98_PTYS 1" >>confdefs.h
@@ -18598,7 +18727,7 @@
$as_echo "#define PTY_TTY_NAME_SPRINTF { char *ptyname = 0; sigset_t blocked; sigemptyset (&blocked); sigaddset (&blocked, SIGCHLD); pthread_sigmask (SIG_BLOCK, &blocked, 0); if (grantpt (fd) != -1 && unlockpt (fd) != -1) ptyname = ptsname(fd); pthread_sigmask (SIG_UNBLOCK, &blocked, 0); if (!ptyname) { emacs_close (fd); return -1; } snprintf (pty_name, PTY_NAME_SIZE, \"%s\", ptyname); }" >>confdefs.h
if test "x$ac_cv_func_posix_openpt" = xyes; then
- $as_echo "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); if (fd < 0 && errno == EINVAL) fd = posix_openpt (O_RDWR | O_NOCTTY); } while (false)" >>confdefs.h
+ $as_echo "#define PTY_OPEN do { fd = posix_openpt (O_RDWR | O_CLOEXEC | O_NOCTTY); } while (false)" >>confdefs.h
$as_echo "#define PTY_NAME_SPRINTF /**/" >>confdefs.h
diff --no-dereference -Naur -- emacs.normalized/lib-src/emacsclient.c emacs.srctix/lib-src/emacsclient.c
--- emacs.normalized/lib-src/emacsclient.c 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/lib-src/emacsclient.c 2020-07-26 23:26:54.806611061 +0200
@@ -1008,7 +1008,8 @@
}
server->sin_family = AF_INET;
- server->sin_addr.s_addr = inet_addr (dotted);
+ /* PATCH: Sortix only has the modern inet_pton. */
+ inet_pton (AF_INET, dotted, &server->sin_addr.s_addr);
server->sin_port = htons (atoi (port));
if (! fread (authentication, AUTH_KEY_LENGTH, 1, config))
@@ -1029,13 +1030,18 @@
struct sockaddr_in server;
struct linger l_arg = {1, 1};
char auth_string[AUTH_KEY_LENGTH + 1];
+ char addr[INET_ADDRSTRLEN];
if (! get_server_config (local_server_file, &server, auth_string))
return INVALID_SOCKET;
- if (server.sin_addr.s_addr != inet_addr ("127.0.0.1") && !quiet)
- message (false, "%s: connected to remote socket at %s\n",
- progname, inet_ntoa (server.sin_addr));
+ /* PATCH: Sortix doesn't have inet_addr and this is a constant anyway. */
+ if (server.sin_addr.s_addr != INADDR_LOOPBACK && !quiet)
+ {
+ inet_ntop (AF_INET, &server.sin_addr, addr, sizeof(addr));
+ message (false, "%s: connected to remote socket at %s\n",
+ progname, addr);
+ }
/* Open up an AF_INET socket. */
if ((s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
@@ -1179,7 +1185,7 @@
handle_sigcont (int signalnum)
{
int old_errno = errno;
- pid_t pgrp = getpgrp ();
+ pid_t pgrp = getpgid (0);
pid_t tcpgrp = tcgetpgrp (1);
if (tcpgrp == pgrp)
@@ -1704,7 +1710,7 @@
#ifndef WINDOWSNT
if (tty)
{
- pid_t pgrp = getpgrp ();
+ pid_t pgrp = getpgid (0);
pid_t tcpgrp = tcgetpgrp (1);
if (0 <= tcpgrp && tcpgrp != pgrp)
kill (-pgrp, SIGTTIN);
diff --no-dereference -Naur -- emacs.normalized/lib-src/Makefile.in emacs.srctix/lib-src/Makefile.in
--- emacs.normalized/lib-src/Makefile.in 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/lib-src/Makefile.in 2019-04-16 00:24:40.665769459 +0200
@@ -20,13 +20,20 @@
SHELL = @SHELL@
+cross_compiling = @cross_compiling@
+
# Following ../lisp/Makefile.in.
+ifeq ($(cross_compiling),yes)
+EMACS = emacs
+else
EMACS = ../src/emacs${EXEEXT}
+endif
EMACSOPT = -batch --no-site-file --no-site-lisp
# ==================== Things 'configure' will edit ====================
CC=@CC@
+CC_FOR_BUILD?=cc
CFLAGS=@CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
@@ -389,7 +396,7 @@
$(NTLIB) $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o $@
make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h)
- $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(NTLIB) $(LOADLIBES) -o $@
+ $(AM_V_CCLD)$(CC_FOR_BUILD) -std=gnu11 ${ALL_CFLAGS} $< $(NTLIB) $(LOADLIBES) -o $@
movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} $< pop.o \
diff --no-dereference -Naur -- emacs.normalized/lib-src/movemail.c emacs.srctix/lib-src/movemail.c
--- emacs.normalized/lib-src/movemail.c 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/lib-src/movemail.c 2019-04-16 00:29:19.871103954 +0200
@@ -58,7 +58,9 @@
#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef MAIL_USE_FLOCK
#include <sys/file.h>
+#endif
#include <stdlib.h>
#include <errno.h>
#include <time.h>
@@ -76,6 +78,10 @@
#include "pop.h"
#endif
+#if defined(__sortix__)
+#define setregid(a, b) (0 <= (a) ? setgid(a) : setgid(b))
+#endif
+
#ifdef MSDOS
#undef access
#endif /* MSDOS */
diff --no-dereference -Naur -- emacs.normalized/lib-src/pop.c emacs.srctix/lib-src/pop.c
--- emacs.normalized/lib-src/pop.c 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/lib-src/pop.c 2019-04-16 00:24:40.665769459 +0200
@@ -240,7 +240,11 @@
{
if (! (flags & POP_NO_GETPASS))
{
+#if defined(__sortix__)
+ password = NULL;
+#else
password = getpass ("Enter POP password:");
+#endif
}
if (! password)
{
diff --no-dereference -Naur -- emacs.normalized/lisp/Makefile.in emacs.srctix/lisp/Makefile.in
--- emacs.normalized/lisp/Makefile.in 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/lisp/Makefile.in 2019-04-16 00:24:40.665769459 +0200
@@ -56,7 +56,12 @@
# We never change directory before running Emacs, so a relative file
# name is fine, and makes life easier. If we need to change
# directory, we can use emacs --chdir.
+cross_compiling = @cross_compiling@
+ifeq ($(cross_compiling),yes)
+EMACS = emacs
+else
EMACS = ../src/emacs${EXEEXT}
+endif
# Command line flags for Emacs.
@@ -458,6 +463,7 @@
distclean:
-rm -f ./Makefile $(lisp)/loaddefs.el~
+ -rm -f leim/leim-list.el
maintainer-clean: distclean bootstrap-clean
rm -f TAGS
diff --no-dereference -Naur -- emacs.normalized/Makefile.in emacs.srctix/Makefile.in
--- emacs.normalized/Makefile.in 2019-01-07 15:26:06.000000000 +0100
+++ emacs.srctix/Makefile.in 2019-04-16 01:42:25.282868475 +0200
@@ -687,9 +687,6 @@
dest=`echo "$${page}" | sed -e 's/\.1$$//' -e '$(TRANSFORM)'`.1; \
(cd "$${thisdir}"; \
${INSTALL_DATA} ${mansrcdir}/$${page} "$(DESTDIR)${man1dir}/$${dest}"); \
- [ -n "${GZIP_PROG}" ] || continue ; \
- rm -f "$(DESTDIR)${man1dir}/$${dest}.gz"; \
- ${GZIP_PROG} -9n "$(DESTDIR)${man1dir}/$${dest}" || true; \
done
## Install those items from etc/ that need to end up elsewhere.
@@ -712,16 +709,7 @@
${srcdir}/etc/emacs.appdata.xml > $${tmp}; \
${INSTALL_DATA} $${tmp} "$(DESTDIR)${appdatadir}/${EMACS_NAME}.appdata.xml"; \
rm -f $${tmp}
- umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
- tmp=etc/emacs.tmpservice; rm -f $${tmp}; \
- client_name=`echo emacsclient | sed '$(TRANSFORM)'`${EXEEXT}; \
- sed -e '/^##/d' \
- -e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \
- -e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \
- -e "/^ExecStop/ s|emacsclient|${bindir}/$${client_name}|" \
- ${srcdir}/etc/emacs.service > $${tmp}; \
- $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \
- rm -f $${tmp}
+ # Patch: Don't install systemd emacs.service.
thisdir=`/bin/pwd`; \
cd ${iconsrcdir} || exit 1; umask 022 ; \
for dir in */*/apps */*/mimetypes; do \
diff --no-dereference -Naur -- emacs.normalized/post-install.sortix emacs.srctix/post-install.sortix
--- emacs.normalized/post-install.sortix 1970-01-01 01:00:00.000000000 +0100
+++ emacs.srctix/post-install.sortix 2019-04-16 00:24:40.665769459 +0200
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -e
+cd "$TIX_INSTALL_DIR/$PREFIX"
+find -type f -name '*.el.gz' -delete
diff --no-dereference -Naur -- emacs.normalized/src/buffer.c emacs.srctix/src/buffer.c
--- emacs.normalized/src/buffer.c 2019-03-18 12:58:19.000000000 +0100
+++ emacs.srctix/src/buffer.c 2019-04-16 00:24:40.669769362 +0200
@@ -22,7 +22,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/param.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --no-dereference -Naur -- emacs.normalized/src/callproc.c emacs.srctix/src/callproc.c
--- emacs.normalized/src/callproc.c 2019-02-20 14:44:42.000000000 +0100
+++ emacs.srctix/src/callproc.c 2019-04-16 00:24:40.673769267 +0200
@@ -26,7 +26,6 @@
#include <sys/types.h>
#include <unistd.h>
-#include <sys/file.h>
#include <fcntl.h>
#include "lisp.h"
diff --no-dereference -Naur -- emacs.normalized/src/doc.c emacs.srctix/src/doc.c
--- emacs.normalized/src/doc.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/doc.c 2019-04-16 00:24:40.673769267 +0200
@@ -23,7 +23,6 @@
#include <errno.h>
#include <sys/types.h>
-#include <sys/file.h> /* Must be after sys/types.h for USG. */
#include <fcntl.h>
#include <unistd.h>
diff --no-dereference -Naur -- emacs.normalized/src/emacs.c emacs.srctix/src/emacs.c
--- emacs.normalized/src/emacs.c 2019-04-11 21:45:31.000000000 +0200
+++ emacs.srctix/src/emacs.c 2019-04-16 00:30:15.093785616 +0200
@@ -25,7 +25,6 @@
#include <fcntl.h>
#include <stdlib.h>
-#include <sys/file.h>
#include <unistd.h>
#include <close-stream.h>
@@ -2081,7 +2080,7 @@
/* If we are controlling the terminal, reset terminal modes. */
#ifndef DOS_NT
{
- pid_t pgrp = getpgrp ();
+ pid_t pgrp = getpgid (0);
pid_t tpgrp = tcgetpgrp (0);
if ((tpgrp != -1) && tpgrp == pgrp)
{
diff --no-dereference -Naur -- emacs.normalized/src/filelock.c emacs.srctix/src/filelock.c
--- emacs.normalized/src/filelock.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/filelock.c 2019-04-16 00:24:40.945762774 +0200
@@ -33,7 +33,6 @@
#include <pwd.h>
#endif
-#include <sys/file.h>
#include <fcntl.h>
#include <unistd.h>
diff --no-dereference -Naur -- emacs.normalized/src/fns.c emacs.srctix/src/fns.c
--- emacs.normalized/src/fns.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/fns.c 2019-04-16 00:32:40.710309295 +0200
@@ -4526,7 +4526,8 @@
else if (FLOATP (args[i]) && 0 < (float) (XFLOAT_DATA (args[i]) - 1))
rehash_size = (float) (XFLOAT_DATA (args[i]) - 1);
else
- signal_error ("Invalid hash table rehash size", args[i]);
+ /*signal_error ("Invalid hash table rehash size", args[i]);*/
+ rehash_size = make_float (DEFAULT_REHASH_SIZE);
/* Look for `:rehash-threshold THRESHOLD'. */
i = get_key_arg (QCrehash_threshold, nargs, args, used);
@@ -4534,7 +4535,8 @@
: !FLOATP (args[i]) ? 0
: (float) XFLOAT_DATA (args[i]));
if (! (0 < rehash_threshold && rehash_threshold <= 1))
- signal_error ("Invalid hash table rehash threshold", args[i]);
+ /*signal_error ("Invalid hash table rehash threshold", args[i]);*/
+ rehash_threshold = make_float (DEFAULT_REHASH_THRESHOLD);
/* Look for `:weakness WEAK'. */
i = get_key_arg (QCweakness, nargs, args, used);
diff --no-dereference -Naur -- emacs.normalized/src/keyboard.c emacs.srctix/src/keyboard.c
--- emacs.normalized/src/keyboard.c 2019-02-20 14:44:42.000000000 +0100
+++ emacs.srctix/src/keyboard.c 2019-04-16 00:24:40.949762679 +0200
@@ -7073,7 +7073,7 @@
return 0;
if (n_to_read > sizeof cbuf)
n_to_read = sizeof cbuf;
-#elif defined USG || defined CYGWIN
+#elif defined USG || defined CYGWIN || defined (__sortix__)
/* Read some input if available, but don't wait. */
n_to_read = sizeof cbuf;
fcntl (fileno (tty->input), F_SETFL, O_NONBLOCK);
@@ -7107,7 +7107,7 @@
#endif
#ifndef USABLE_FIONREAD
-#if defined (USG) || defined (CYGWIN)
+#if defined (USG) || defined (CYGWIN) || defined (__sortix__)
fcntl (fileno (tty->input), F_SETFL, 0);
#endif /* USG or CYGWIN */
#endif /* no FIONREAD */
diff --no-dereference -Naur -- emacs.normalized/src/lread.c emacs.srctix/src/lread.c
--- emacs.normalized/src/lread.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/lread.c 2019-04-16 00:24:40.949762679 +0200
@@ -26,7 +26,6 @@
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/file.h>
#include <errno.h>
#include <math.h>
#include <stat-time.h>
diff --no-dereference -Naur -- emacs.normalized/src/Makefile.in emacs.srctix/src/Makefile.in
--- emacs.normalized/src/Makefile.in 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/Makefile.in 2019-04-16 00:24:40.949762679 +0200
@@ -25,6 +25,8 @@
SHELL = @SHELL@
+cross_compiling = @cross_compiling@
+
# Here are the things that we expect ../configure to edit.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir = @srcdir@
@@ -501,7 +503,11 @@
## in practice this rule was always run anyway.
$(srcdir)/macuvs.h $(lispsource)/international/charprop.el: \
bootstrap-emacs$(EXEEXT) FORCE
+ifeq ($(cross_compiling),yes)
+ $(MAKE) -C ../admin/unidata all EMACS=emacs
+else
$(MAKE) -C ../admin/unidata all EMACS="../$(bootstrap_exe)"
+endif
## We require charprop.el to exist before ucs-normalize.el is
## byte-compiled, because ucs-normalize.el needs to load 2 uni-*.el files.
diff --no-dereference -Naur -- emacs.normalized/src/process.c emacs.srctix/src/process.c
--- emacs.normalized/src/process.c 2019-02-20 14:44:42.000000000 +0100
+++ emacs.srctix/src/process.c 2019-04-16 00:24:40.953762583 +0200
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <errno.h>
#include <sys/types.h> /* Some typedefs are used in sys/file.h. */
-#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
@@ -2821,7 +2820,7 @@
#ifdef SO_BINDTODEVICE
case SOPT_IFNAME:
{
- char devname[IFNAMSIZ + 1];
+ char devname[IF_NAMESIZE + 1];
/* This is broken, at least in the Linux 2.4 kernel.
To unbind, the arg must be a zero integer, not the empty string.
@@ -2830,13 +2829,13 @@
if (STRINGP (val))
{
char *arg = SSDATA (val);
- int len = min (strlen (arg), IFNAMSIZ);
+ int len = min (strlen (arg), IF_NAMESIZE);
memcpy (devname, arg, len);
}
else if (!NILP (val))
error ("Bad option value for %s", name);
ret = setsockopt (s, sopt->optlevel, sopt->optnum,
- devname, IFNAMSIZ);
+ devname, IF_NAMESIZE);
break;
}
#endif
diff --no-dereference -Naur -- emacs.normalized/src/sysdep.c emacs.srctix/src/sysdep.c
--- emacs.normalized/src/sysdep.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/sysdep.c 2019-04-16 00:24:40.953762583 +0200
@@ -87,8 +87,6 @@
#include "msdos.h"
#endif
-#include <sys/param.h>
-#include <sys/file.h>
#include <fcntl.h>
#include "systty.h"
@@ -96,7 +94,6 @@
#ifdef HAVE_SYS_UTSNAME_H
#include <sys/utsname.h>
-#include <memory.h>
#endif /* HAVE_SYS_UTSNAME_H */
#include "keyboard.h"
@@ -529,7 +526,9 @@
#ifdef OLCUC
s.main.c_oflag &= ~OLCUC; /* Disable upcasing on output. */
#endif
+#ifdef TAB3
s.main.c_oflag &= ~TAB3; /* Disable tab expansion */
+#endif
s.main.c_cflag = (s.main.c_cflag & ~CSIZE) | CS8; /* Don't strip 8th bit */
s.main.c_cc[VERASE] = CDISABLE; /* disable erase processing */
s.main.c_cc[VKILL] = CDISABLE; /* disable kill processing */
@@ -877,7 +876,7 @@
void
init_foreground_group (void)
{
- pid_t pgrp = getpgrp ();
+ pid_t pgrp = getpgid (0);
inherited_pgroup = getpid () == pgrp ? 0 : pgrp;
}
@@ -1120,7 +1119,9 @@
tty.main.c_iflag &= ~IXON; /* Disable start/stop output control */
tty.main.c_oflag &= ~ONLCR; /* Disable map of NL to CR-NL
on output */
+#ifdef TAB3
tty.main.c_oflag &= ~TAB3; /* Disable tab expansion */
+#endif
#ifdef CS8
if (tty_out->meta_key)
{
diff --no-dereference -Naur -- emacs.normalized/src/term.c emacs.srctix/src/term.c
--- emacs.normalized/src/term.c 2019-01-07 15:26:07.000000000 +0100
+++ emacs.srctix/src/term.c 2019-04-16 00:34:17.004010462 +0200
@@ -23,7 +23,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
-#include <sys/file.h>
#include <sys/time.h>
#include <unistd.h>
diff --no-dereference -Naur -- emacs.normalized/tixbuildinfo emacs.srctix/tixbuildinfo
--- emacs.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ emacs.srctix/tixbuildinfo 2019-04-16 01:01:27.685081007 +0200
@@ -0,0 +1,12 @@
+tix.version=1
+tix.class=srctix
+pkg.name=emacs
+pkg.build-libraries=libcurses libcairo? libdbus? libfontconfig? libfreetype? libgconf? libgif? libgnutls? libgobject-introspection? libgpm? libgtk? libjpeg? liblcms2? libMagick? libm17t? libotf? libpng? librsvg? libtiff? libxml2? libxpm? libz?
+pkg.build-system=configure
+pkg.use-bootstrap=true
+pkg.configure.args=--without-x
+pkg.make.vars=V=1
+pkg.post-install.cmd=./post-install.sortix
+bootstrap.build-system=configure
+bootstrap.configure.args=--without-x
+bootstrap.make.vars=V=1

8
ports/ffmpeg/ffmpeg.info Normal file
View File

@ -0,0 +1,8 @@
NAME='ffmpeg'
BUILD_LIBRARIES='libavcodec libGL? libSDL? libSDL2?'
VERSION='4.3.1'
DISTNAME='ffmpeg-4.3.1'
ARCHIVE='ffmpeg-4.3.1.tar.xz'
SHA256SUM='ad009240d46e307b4e03a213a0f49c11b650e445b1f8be0dda2a9212b34d2ffb'
UPSTREAM_SITE='https://ffmpeg.org/releases'
UPSTREAM_ARCHIVE='ffmpeg-4.3.1.tar.xz'

212
ports/ffmpeg/ffmpeg.patch Normal file
View File

@ -0,0 +1,212 @@
diff --no-dereference -Naur -- ffmpeg.normalized/configure ffmpeg.srctix/configure
--- ffmpeg.normalized/configure 2020-07-11 12:39:30.000000000 +0200
+++ ffmpeg.srctix/configure 2020-12-07 20:20:55.317731786 +0100
@@ -81,10 +81,12 @@
--disable-logging do not log configure debug information
--fatal-warnings fail if any configure warning is generated
--prefix=PREFIX install in PREFIX [$prefix_default]
- --bindir=DIR install binaries in DIR [PREFIX/bin]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+ --bindir=DIR install binaries in DIR [EPREFIX/bin]
--datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--docdir=DIR install documentation in DIR [PREFIX/share/doc/ffmpeg]
- --libdir=DIR install libs in DIR [PREFIX/lib]
+ --libdir=DIR install libs in DIR [EPREFIX/lib]
--shlibdir=DIR install shared libs in DIR [LIBDIR]
--incdir=DIR install includes in DIR [PREFIX/include]
--mandir=DIR install man page in DIR [PREFIX/share/man]
@@ -770,7 +772,9 @@
set_default(){
for opt; do
- eval : \${$opt:=\$${opt}_default}
+ if [ -z "$(eval "echo \${${opt}_set}")" ]; then
+ eval : \${$opt:=\$${opt}_default}
+ fi
done
}
@@ -2444,6 +2448,8 @@
"
PATHS_LIST="
+ prefix
+ exec_prefix
bindir
datadir
docdir
@@ -2462,6 +2468,7 @@
arch
as
assert_level
+ build
build_suffix
cc
objcc
@@ -2474,6 +2481,7 @@
env
extra_version
gas
+ host
host_cc
host_cflags
host_extralibs
@@ -2500,6 +2508,7 @@
sws_max_filter_size
sysinclude
sysroot
+ target
target_exec
target_os
target_path
@@ -3714,11 +3723,12 @@
# installation paths
prefix_default="/usr/local"
-bindir_default='${prefix}/bin'
+exec_prefix_default='${prefix}'
+bindir_default='${exec_prefix}/bin'
datadir_default='${prefix}/share/ffmpeg'
docdir_default='${prefix}/share/doc/ffmpeg'
incdir_default='${prefix}/include'
-libdir_default='${prefix}/lib'
+libdir_default='${exec_prefix}/lib'
mandir_default='${prefix}/share/man'
# toolchain
@@ -4075,8 +4085,10 @@
optname="${opt%%=*}"
optname="${optname#--}"
optname=$(echo "$optname" | sed 's/-/_/g')
+ optname_set="${optname}_set"
if is_in $optname $CMDLINE_SET; then
eval $optname='$optval'
+ eval $optname_set=true
elif is_in $optname $CMDLINE_APPEND; then
append $optname "$optval"
else
@@ -4279,6 +4291,16 @@
;;
esac
+# TODO: This is pretty spotty and should be combined with config.sub and
+# possibly also config.guess.
+if [ -n "$build" -a -n "$host" -a "$build" != "$host" ]; then
+ cross_prefix=${host}-
+ arch=$(echo "$host" | grep -o '^[^-]*')
+ if echo "$host" | grep -- "-sortix$" > /dev/null; then
+ target_os="sortix"
+ fi
+fi
+
if test -n "$cross_prefix"; then
test -n "$arch" && test -n "$target_os" ||
die "Must specify target arch (--arch) and OS (--target-os) when cross-compiling"
@@ -5541,6 +5563,9 @@
;;
minix)
;;
+ sortix)
+ add_cppflags -D_SORTIX_SOURCE -D_POSIX_SOURCE=200809L
+ ;;
none)
;;
*)
@@ -7214,6 +7239,7 @@
if test "$quiet" != "yes"; then
echo "install prefix $prefix"
+echo "install exec-prefix $exec_prefix"
echo "source path $source_path"
echo "C compiler $cc"
echo "C library $libc_type"
@@ -7367,6 +7393,7 @@
FFMPEG_CONFIG_MAK=1
FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
prefix=$prefix
+exec_prefix=$exec_prefix
LIBDIR=\$(DESTDIR)$libdir
SHLIBDIR=\$(DESTDIR)$shlibdir
INCDIR=\$(DESTDIR)$incdir
@@ -7628,6 +7655,7 @@
shared=$shared
build_suffix=$build_suffix
prefix=$prefix
+exec_prefix=$exec_prefix
libdir=$libdir
incdir=$incdir
rpath=$(enabled rpath && echo "-Wl,-rpath,\${libdir}")
diff --no-dereference -Naur -- ffmpeg.normalized/ffbuild/pkgconfig_generate.sh ffmpeg.srctix/ffbuild/pkgconfig_generate.sh
--- ffmpeg.normalized/ffbuild/pkgconfig_generate.sh 2020-07-09 11:17:46.000000000 +0200
+++ ffmpeg.srctix/ffbuild/pkgconfig_generate.sh 2020-12-06 20:51:47.738951451 +0100
@@ -28,7 +28,7 @@
cat <<EOF > $name/$fullname.pc
prefix=$prefix
-exec_prefix=\${prefix}
+exec_prefix=$exec_prefix
libdir=$libdir
includedir=$incdir
diff --no-dereference -Naur -- ffmpeg.normalized/fftools/Makefile ffmpeg.srctix/fftools/Makefile
--- ffmpeg.normalized/fftools/Makefile 2020-07-11 12:39:30.000000000 +0200
+++ ffmpeg.srctix/fftools/Makefile 2020-12-07 21:35:43.428835134 +0100
@@ -30,6 +30,8 @@
all: $(AVPROGS)
+progs: $(AVPROGS)
+
fftools/ffprobe.o fftools/cmdutils.o: libavutil/ffversion.h | fftools
OUTDIRS += fftools
diff --no-dereference -Naur -- ffmpeg.normalized/libavformat/codec2.c ffmpeg.srctix/libavformat/codec2.c
--- ffmpeg.normalized/libavformat/codec2.c 2020-07-09 11:17:46.000000000 +0200
+++ ffmpeg.srctix/libavformat/codec2.c 2020-12-06 21:07:58.676802151 +0100
@@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <memory.h>
#include "libavcodec/codec2utils.h"
#include "libavutil/intreadwrite.h"
#include "avio_internal.h"
diff --no-dereference -Naur -- ffmpeg.normalized/libavformat/udp.c ffmpeg.srctix/libavformat/udp.c
--- ffmpeg.normalized/libavformat/udp.c 2020-07-11 12:39:30.000000000 +0200
+++ ffmpeg.srctix/libavformat/udp.c 2020-12-06 21:09:01.937183347 +0100
@@ -252,7 +252,9 @@
struct sockaddr_storage *sources,
int nb_sources, int include)
{
+#if HAVE_STRUCT_IP_MREQ_SOURCE && defined(IP_BLOCK_SOURCE)
int i;
+#endif
if (addr->sa_family != AF_INET) {
#if HAVE_STRUCT_GROUP_SOURCE_REQ && defined(MCAST_BLOCK_SOURCE)
/* For IPv4 prefer the old approach, as that alone works reliably on
@@ -791,8 +793,10 @@
if (dscp >= 0) {
dscp <<= 2;
+#ifdef IP_TOS
if (setsockopt (udp_fd, IPPROTO_IP, IP_TOS, &dscp, sizeof(dscp)) != 0)
goto fail;
+#endif
}
/* If multicast, try binding the multicast address first, to avoid
diff --no-dereference -Naur -- ffmpeg.normalized/tixbuildinfo ffmpeg.srctix/tixbuildinfo
--- ffmpeg.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ ffmpeg.srctix/tixbuildinfo 2020-12-07 21:35:54.296889197 +0100
@@ -0,0 +1,10 @@
+tix.version=1
+tix.class=srctix
+pkg.name=ffmpeg
+pkg.build-libraries=libavcodec libGL? libSDL? libSDL2?
+pkg.build-system=configure
+pkg.dirty-file=ffbuild/config.mak
+pkg.configure.args=--disable-x86asm --enable-version3 --optflags=" " --disable-debug
+pkg.make.vars=V=1
+pkg.make.target=progs
+pkg.make.install-target=install-progs install-data

8
ports/flex/flex.info Normal file
View File

@ -0,0 +1,8 @@
NAME='flex'
BUILD_LIBRARIES='libiconv? gettext?'
VERSION='2.6.0'
DISTNAME='flex-2.6.0'
ARCHIVE='flex-2.6.0.tar.xz'
SHA256SUM='d39b15a856906997ced252d76e9bfe2425d7503c6ed811669665627b248e4c73'
UPSTREAM_SITE='https://sourceforge.net/projects/flex/files'
UPSTREAM_ARCHIVE='flex-2.6.0.tar.xz'

76
ports/flex/flex.patch Normal file
View File

@ -0,0 +1,76 @@
diff --no-dereference -Naur -- flex.normalized/build-aux/config.sub flex.srctix/build-aux/config.sub
--- flex.normalized/build-aux/config.sub 2015-11-17 17:19:45.000000000 +0100
+++ flex.srctix/build-aux/config.sub 2015-12-18 02:43:10.029865387 +0100
@@ -1373,7 +1373,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- flex.normalized/configure flex.srctix/configure
--- flex.normalized/configure 2015-11-17 17:19:45.000000000 +0100
+++ flex.srctix/configure 2015-12-18 16:59:42.792240309 +0100
@@ -1,4 +1,6 @@
#! /bin/sh
+export ac_cv_func_malloc_0_nonnull=yes
+export ac_cv_func_realloc_0_nonnull=yes
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for the fast lexical analyser generator 2.6.0.
#
diff --no-dereference -Naur -- flex.normalized/Makefile.in flex.srctix/Makefile.in
--- flex.normalized/Makefile.in 2015-11-17 17:19:45.000000000 +0100
+++ flex.srctix/Makefile.in 2015-12-18 18:11:37.156337803 +0100
@@ -227,7 +227,7 @@
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
-DIST_SUBDIRS = $(SUBDIRS)
+DIST_SUBDIRS = $(SUBDIRS_REAL)
am__DIST_COMMON = $(srcdir)/Makefile.in \
$(top_srcdir)/build-aux/compile \
$(top_srcdir)/build-aux/config.guess \
@@ -444,15 +444,16 @@
.indent.pro \
autogen.sh
+# PATCH: Building documentation and test causes problems when cross-compiling.
SUBDIRS = \
lib \
src \
- doc \
examples \
po \
- tests \
tools
+SUBDIRS_REAL = lib src doc examples po tests tools
+
all: all-recursive
.SUFFIXES:
diff --no-dereference -Naur -- flex.normalized/src/main.c flex.srctix/src/main.c
--- flex.normalized/src/main.c 2015-11-11 00:10:20.000000000 +0100
+++ flex.srctix/src/main.c 2015-12-18 16:54:22.156233064 +0100
@@ -364,7 +364,7 @@
/* Setup the filter chain. */
output_chain = filter_create_int(NULL, filter_tee_header, headerfilename);
if ( !(m4 = getenv("M4")))
- m4 = M4;
+ m4 = "m4";
filter_create_ext(output_chain, m4, "-P", 0);
filter_create_int(output_chain, filter_fix_linedirs, NULL);
diff --no-dereference -Naur -- flex.normalized/tixbuildinfo flex.srctix/tixbuildinfo
--- flex.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ flex.srctix/tixbuildinfo 2015-12-18 03:04:27.681904634 +0100
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=flex
+pkg.build-libraries=libiconv? gettext?
+pkg.build-system=configure
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

8
ports/gawk/gawk.info Normal file
View File

@ -0,0 +1,8 @@
NAME='gawk'
BUILD_LIBRARIES='libiconv? libintl? libgmp? libmpfr? libreadline?'
VERSION='4.2.0'
DISTNAME='gawk-4.2.0'
ARCHIVE='gawk-4.2.0.tar.xz'
SHA256SUM='d4f3cd31c001fd0ed52832d4fbfbdfeaa38ad541c182f80ff8fdf87324a6a9f2'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/gawk'
UPSTREAM_ARCHIVE='gawk-4.2.0.tar.xz'

141
ports/gawk/gawk.patch Normal file
View File

@ -0,0 +1,141 @@
diff --no-dereference -Naur -- gawk.normalized/builtin.c gawk.srctix/builtin.c
--- gawk.normalized/builtin.c 2017-10-17 20:44:47.000000000 +0200
+++ gawk.srctix/builtin.c 2017-10-23 14:02:19.228454845 +0200
@@ -1192,10 +1192,18 @@
* Use snprintf return value to tell if there
* is enough room in the buffer or not.
*/
+/* PATCH: Until Sortix has floating point printing. */
+#if defined(__sortix__) && !__SORTIX_HAS_FLOAT_PARSE__
+ while ((i = snprintf(cpbufs[1].buf,
+ cpbufs[1].bufsize, "%lld",
+ (long long)tmpval)) >=
+ cpbufs[1].bufsize) {
+#else
while ((i = snprintf(cpbufs[1].buf,
cpbufs[1].bufsize, "%.0f",
tmpval)) >=
cpbufs[1].bufsize) {
+#endif
if (cpbufs[1].buf == cpbufs[1].stackbuf)
cpbufs[1].buf = NULL;
if (i > 0) {
diff --no-dereference -Naur -- gawk.normalized/extension/filefuncs.c gawk.srctix/extension/filefuncs.c
--- gawk.normalized/extension/filefuncs.c 2017-09-17 19:35:53.000000000 +0200
+++ gawk.srctix/extension/filefuncs.c 2017-10-23 14:20:41.490845940 +0200
@@ -414,8 +414,12 @@
/* for block and character devices, add rdev, major and minor numbers */
if (S_ISBLK(sbuf->st_mode) || S_ISCHR(sbuf->st_mode)) {
array_set_numeric(array, "rdev", sbuf->st_rdev);
+#ifdef major
array_set_numeric(array, "major", major(sbuf->st_rdev));
+#endif
+#ifdef minor
array_set_numeric(array, "minor", minor(sbuf->st_rdev));
+#endif
}
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
diff --no-dereference -Naur -- gawk.normalized/io.c gawk.srctix/io.c
--- gawk.normalized/io.c 2017-09-28 20:41:20.000000000 +0200
+++ gawk.srctix/io.c 2017-10-23 14:11:07.724176283 +0200
@@ -39,6 +39,8 @@
#include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */
+#include <sys/select.h>
+
#ifndef O_ACCMODE
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#endif
diff --no-dereference -Naur -- gawk.normalized/main.c gawk.srctix/main.c
--- gawk.normalized/main.c 2017-10-17 20:46:48.000000000 +0200
+++ gawk.srctix/main.c 2017-10-23 13:59:42.164103928 +0200
@@ -984,13 +984,7 @@
update_PROCINFO_num("api_minor", GAWK_API_MINOR_VERSION);
#endif
-#ifdef GETPGRP_VOID
-#define getpgrp_arg() /* nothing */
-#else
-#define getpgrp_arg() getpid()
-#endif
-
- value = getpgrp(getpgrp_arg());
+ value = getpgid(0);
update_PROCINFO_num("pgrpid", value);
/*
diff --no-dereference -Naur -- gawk.normalized/node.c gawk.srctix/node.c
--- gawk.normalized/node.c 2017-08-17 06:58:57.000000000 +0200
+++ gawk.srctix/node.c 2017-10-23 14:27:20.889566694 +0200
@@ -860,6 +860,8 @@
n->flags &= ~WSTRCUR;
}
+/* PATCH: Sortix doesn't have putwc(3) and this function is unused. */
+#if 0
static void __attribute__ ((unused))
dump_wstr(FILE *fp, const wchar_t *str, size_t len)
{
@@ -869,6 +871,7 @@
for (; len--; str++)
putwc(*str, fp);
}
+#endif
/* wstrstr --- walk haystack, looking for needle, wide char version */
diff --no-dereference -Naur -- gawk.normalized/support/getopt.c gawk.srctix/support/getopt.c
--- gawk.normalized/support/getopt.c 2017-08-17 06:58:57.000000000 +0200
+++ gawk.srctix/support/getopt.c 2017-10-23 14:07:18.365504982 +0200
@@ -55,18 +55,9 @@
#ifndef ELIDE_CODE
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#if defined (__GNU_LIBRARY__) || defined (__CYGWIN__) || defined(__DJGPP__) || defined(__APPLE__) || defined(__MINGW32__) || defined(__sun) /* Illumos */
-/* Don't include stdlib.h for
- * non-GNU C libraries
- * non-Cygwin
- * non-DJGPP
- * non-MinGW
- * because some of them contain conflicting prototypes for getopt. */
+/* PATCH: #&%!ing gnu portability: You need stdlib.h for malloc. */
# include <stdlib.h>
# include <unistd.h>
-#endif /* GNU C library. */
#include <string.h>
diff --no-dereference -Naur -- gawk.normalized/support/getopt.h gawk.srctix/support/getopt.h
--- gawk.normalized/support/getopt.h 2017-08-17 06:58:57.000000000 +0200
+++ gawk.srctix/support/getopt.h 2017-10-23 14:09:07.278974591 +0200
@@ -1,3 +1,16 @@
+/* PATCH: Gawk doesn't seem to work with Sortix libc's getopt for some reason.
+ Gawk wants to use GNU getopt unconditionally. This causes conflicting
+ symbols, so rename gawk's replacements to avoid collisions. */
+#if defined(__sortix__)
+#define getopt gawk_getopt
+#define optarg gawk_optarg
+#define optind gawk_optind
+#define opterr gawk_opterr
+#define optopt gawk_optopt
+#define getopt_long gawk_getopt_long
+#define getopt_long_only gawk_getopt_long_only
+#define option gawk_option
+#endif
/* Declarations for getopt.
Copyright (C) 1989-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --no-dereference -Naur -- gawk.normalized/tixbuildinfo gawk.srctix/tixbuildinfo
--- gawk.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ gawk.srctix/tixbuildinfo 2017-10-23 14:13:32.036823462 +0200
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=gawk
+pkg.build-libraries=libiconv? libintl? libgmp? libmpfr? libreadline?
+pkg.build-system=configure
+pkg.post-install.cmd=tix-eradicate-libtool-la

1
ports/gcc/gcc.execpatch Normal file
View File

@ -0,0 +1 @@
chmod +x -- './post-install.sortix'

8
ports/gcc/gcc.info Normal file
View File

@ -0,0 +1,8 @@
NAME='gcc'
BUILD_LIBRARIES='libstdc++ libiconv? libgmp libmpfr libmpc libz'
VERSION='1.1-rc2'
DISTNAME='sortix-gcc-1.1-rc2'
ARCHIVE='sortix-gcc-1.1-rc2.tar.xz'
SHA256SUM='556037f471157a4f28a117126121ee0cb6bbd78a32738f99a44fc5a181239443'
UPSTREAM_SITE='https://pub.sortix.org/sortix/toolchain'
UPSTREAM_ARCHIVE='sortix-gcc-1.1-rc2.tar.xz'

40
ports/gcc/gcc.patch Normal file
View File

@ -0,0 +1,40 @@
diff --no-dereference -Naur -- gcc.normalized/gcc/Makefile.in gcc.srctix/gcc/Makefile.in
--- gcc.normalized/gcc/Makefile.in 2015-11-23 01:29:00.000000000 +0100
+++ gcc.srctix/gcc/Makefile.in 2021-07-19 00:47:48.549925061 +0200
@@ -748,7 +748,10 @@
CC_FOR_BUILD = @CC_FOR_BUILD@
CXX_FOR_BUILD = @CXX_FOR_BUILD@
BUILD_CFLAGS= @BUILD_CFLAGS@ -DGENERATOR_FILE
-BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE
+# PATCH: genautomata can crash by https://gitlab.com/sortix/sortix/-/issues/740
+# since it uses pthread_create and pulls in operator new via vec.h under
+# some circumstances, so disable exceptions.
+BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -DGENERATOR_FILE -fno-exceptions
# Native compiler that we use. This may be C++ some day.
COMPILER_FOR_BUILD = $(CXX_FOR_BUILD)
diff --no-dereference -Naur -- gcc.normalized/post-install.sortix gcc.srctix/post-install.sortix
--- gcc.normalized/post-install.sortix 1970-01-01 01:00:00.000000000 +0100
+++ gcc.srctix/post-install.sortix 2019-04-17 23:19:45.665878206 +0200
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+tix-eradicate-libtool-la
+ln "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/gcc" "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/cc"
+ln "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/$TARGET-gcc" "$TIX_INSTALL_DIR$EXEC_PREFIX/bin/$TARGET-cc"
diff --no-dereference -Naur -- gcc.normalized/tixbuildinfo gcc.srctix/tixbuildinfo
--- gcc.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ gcc.srctix/tixbuildinfo 2021-07-19 21:58:52.786342665 +0200
@@ -0,0 +1,13 @@
+tix.version=1
+tix.class=srctix
+pkg.name=gcc
+pkg.build-libraries=libstdc++ libiconv? libgmp libmpfr libmpc libz
+pkg.build-system=configure
+pkg.configure.with-sysroot=true
+pkg.configure.with-sysroot-ld-bug=true
+pkg.configure.with-build-sysroot=true
+pkg.configure.args=--enable-languages=c,c++ --with-system-zlib
+pkg.configure.use-build-directory=true
+pkg.make.build-target=all-gcc all-target-libgcc
+pkg.make.install-target=install-gcc install-target-libgcc
+pkg.post-install.cmd=./post-install.sortix

View File

@ -0,0 +1,8 @@
NAME='gettext'
BUILD_LIBRARIES='libiconv libintl libxml2 libcroco? libcurses? libexpat? libunistring?'
VERSION='0.19.8'
DISTNAME='gettext-0.19.8'
ARCHIVE='gettext-0.19.8.tar.xz'
SHA256SUM='9c1781328238caa1685d7bc7a2e1dcf1c6c134e86b42ed554066734b621bd12f'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/gettext'
UPSTREAM_ARCHIVE='gettext-0.19.8.tar.xz'

714
ports/gettext/gettext.patch Normal file
View File

@ -0,0 +1,714 @@
diff --no-dereference -Naur -- gettext.normalized/gettext-runtime/configure gettext.srctix/gettext-runtime/configure
--- gettext.normalized/gettext-runtime/configure 2016-06-09 08:46:16.000000000 +0200
+++ gettext.srctix/gettext-runtime/configure 2021-04-17 12:13:46.336918141 +0200
@@ -1,4 +1,124 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes # Not needed since February 2015
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypotl_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
+export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gettext-runtime 0.19.8.
#
@@ -18912,6 +19032,8 @@
static char buf[100];
int main ()
{
+ /* PATCH: Never replace Sortix printf even if it doesn't have this feature. */
+ return 0;
sprintf (buf, format, 33, 55);
return (strcmp (buf, "55 33") != 0);
}
diff --no-dereference -Naur -- gettext.normalized/gettext-runtime/gnulib-lib/propername.c gettext.srctix/gettext-runtime/gnulib-lib/propername.c
--- gettext.normalized/gettext-runtime/gnulib-lib/propername.c 2016-06-09 08:44:35.000000000 +0200
+++ gettext.srctix/gettext-runtime/gnulib-lib/propername.c 2016-12-26 15:35:13.455984839 +0100
@@ -168,10 +168,10 @@
else
{
/* Return "TRANSLATION (NAME)". */
- char *result =
- XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+ size_t size = strlen (translation) + 2 + strlen (name) + 1 + 1;
+ char *result = XNMALLOC (size, char);
- sprintf (result, "%s (%s)", translation, name);
+ snprintf (result, size, "%s (%s)", translation, name);
return result;
}
}
@@ -270,10 +270,10 @@
else
{
/* Return "TRANSLATION (NAME)". */
- char *result =
- XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+ size_t size = strlen (translation) + 2 + strlen (name) + 1 + 1;
+ char *result = XNMALLOC (size, char);
- sprintf (result, "%s (%s)", translation, name);
+ snprintf (result, size, "%s (%s)", translation, name);
if (alloc_name_converted != NULL)
free (alloc_name_converted);
diff --no-dereference -Naur -- gettext.normalized/gettext-runtime/intl/dcigettext.c gettext.srctix/gettext-runtime/intl/dcigettext.c
--- gettext.normalized/gettext-runtime/intl/dcigettext.c 2016-05-19 08:49:42.000000000 +0200
+++ gettext.srctix/gettext-runtime/intl/dcigettext.c 2016-12-26 14:49:10.021254583 +0100
@@ -997,6 +997,8 @@
resultlen = domain->trans_sysdep_tab[act - nstrings].length;
}
+#if 0 /* PATCH: Disable iconv dependency to produce smaller programs. With luck
+ anything that matters at this time is already UTF-8. */
#if defined _LIBC || HAVE_ICONV
# ifdef IN_LIBGLOCALE
if (encoding != NULL)
@@ -1406,6 +1408,7 @@
/* The result string is converted. */
#endif /* _LIBC || HAVE_ICONV */
+#endif
*lengthp = resultlen;
return result;
diff --no-dereference -Naur -- gettext.normalized/gettext-runtime/libasprintf/configure gettext.srctix/gettext-runtime/libasprintf/configure
--- gettext.normalized/gettext-runtime/libasprintf/configure 2016-06-09 08:46:09.000000000 +0200
+++ gettext.srctix/gettext-runtime/libasprintf/configure 2021-04-17 12:13:46.420919020 +0200
@@ -18352,6 +18352,8 @@
static char buf[100];
int main ()
{
+ /* PATCH: Never replace Sortix printf even if it doesn't have this feature. */
+ return 0;
sprintf (buf, format, 33, 55);
return (strcmp (buf, "55 33") != 0);
}
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/configure gettext.srctix/gettext-tools/configure
--- gettext.normalized/gettext-tools/configure 2016-06-09 08:46:32.000000000 +0200
+++ gettext.srctix/gettext-tools/configure 2021-07-19 00:43:18.958908581 +0200
@@ -1,4 +1,124 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes # Not needed since February 2015
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypotl_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
+export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gettext-tools 0.19.8.
#
@@ -21267,6 +21387,8 @@
static char buf[100];
int main ()
{
+ /* PATCH: Never replace Sortix printf even if it doesn't have this feature. */
+ return 0;
sprintf (buf, format, 33, 55);
return (strcmp (buf, "55 33") != 0);
}
@@ -44404,7 +44526,9 @@
- use_additional=yes
+ # PATCH: It's just plain wrong to search for libxml2 in the prefix rather
+ # than using the pkg-config, or at least using the system root.
+ use_additional=no
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
@@ -44424,6 +44548,7 @@
if test "X$withval" = "Xno"; then
use_additional=no
else
+ use_additional=yes
if test "X$withval" = "X"; then
acl_save_prefix="$prefix"
@@ -44858,6 +44983,8 @@
+ LIBXML2="$LIBXML2 $(${PKG_CONFIG-pkg-config} --libs libxml-2.0)"
+ LTLIBXML2="$LTLIBXML2 $(${PKG_CONFIG-pkg-config} --libs libxml-2.0)"
LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -50550,6 +50677,8 @@
static char buf[100];
int main ()
{
+ /* PATCH: Never replace Sortix printf even if it doesn't have this feature. */
+ return 0;
sprintf (buf, format, 33, 55);
return (strcmp (buf, "55 33") != 0);
}
@@ -54324,6 +54453,8 @@
static char buf[100];
int main ()
{
+ /* PATCH: Never replace Sortix printf even if it doesn't have this feature. */
+ return 0;
sprintf (buf, format, 33, 55);
return (strcmp (buf, "55 33") != 0);
}
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/backupfile.c gettext.srctix/gettext-tools/gnulib-lib/backupfile.c
--- gettext.normalized/gettext-tools/gnulib-lib/backupfile.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/gnulib-lib/backupfile.c 2016-12-26 15:19:07.546721115 +0100
@@ -90,14 +90,15 @@
size_t numbered_suffix_size_max = INT_STRLEN_BOUND (int) + 4;
char *s;
const char *suffix = simple_backup_suffix;
+ size_t ssize;
/* Allow room for simple or '.~N~' backups. */
backup_suffix_size_max = strlen (simple_backup_suffix) + 1;
if (HAVE_DIR && backup_suffix_size_max < numbered_suffix_size_max)
backup_suffix_size_max = numbered_suffix_size_max;
- s = (char *) malloc (file_len + backup_suffix_size_max
- + numbered_suffix_size_max);
+ ssize = file_len + backup_suffix_size_max + numbered_suffix_size_max;
+ s = (char *) malloc (ssize);
if (s)
{
strcpy (s, file);
@@ -112,8 +113,10 @@
highest_backup = max_backup_version (file + dir_len, s);
if (! (backup_type == numbered_existing && highest_backup == 0))
{
- char *numbered_suffix = s + (file_len + backup_suffix_size_max);
- sprintf (numbered_suffix, ".~%d~", highest_backup + 1);
+ size_t off = file_len + backup_suffix_size_max;
+ size_t rem = ssize - off;
+ char *numbered_suffix = s + off;
+ snprintf (numbered_suffix, rem, ".~%d~", highest_backup + 1);
suffix = numbered_suffix;
}
strcpy (s, file);
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/html-ostream.c gettext.srctix/gettext-tools/gnulib-lib/html-ostream.c
--- gettext.normalized/gettext-tools/gnulib-lib/html-ostream.c 2016-06-09 08:51:17.000000000 +0200
+++ gettext.srctix/gettext-tools/gnulib-lib/html-ostream.c 2016-12-26 15:36:07.994701067 +0100
@@ -178,7 +178,7 @@
/* Output non-ASCII characters in #&nnn;
notation. */
char bytes[32];
- sprintf (bytes, "&#%d;", (int) uc);
+ snprintf (bytes, sizeof(bytes), "&#%d;", (int) uc);
ostream_write_str (stream->destination, bytes);
}
break;
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/html-ostream.oo.c gettext.srctix/gettext-tools/gnulib-lib/html-ostream.oo.c
--- gettext.normalized/gettext-tools/gnulib-lib/html-ostream.oo.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/gnulib-lib/html-ostream.oo.c 2016-12-26 15:03:57.856134390 +0100
@@ -177,7 +177,7 @@
/* Output non-ASCII characters in #&nnn;
notation. */
char bytes[32];
- sprintf (bytes, "&#%d;", (int) uc);
+ snprintf (bytes, sizeof(bytes), "&#%d;", (int) uc);
ostream_write_str (stream->destination, bytes);
}
break;
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/propername.c gettext.srctix/gettext-tools/gnulib-lib/propername.c
--- gettext.normalized/gettext-tools/gnulib-lib/propername.c 2016-06-09 08:45:10.000000000 +0200
+++ gettext.srctix/gettext-tools/gnulib-lib/propername.c 2016-12-26 15:34:33.860916856 +0100
@@ -168,10 +168,10 @@
else
{
/* Return "TRANSLATION (NAME)". */
- char *result =
- XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+ size_t size = strlen (translation) + 2 + strlen (name) + 1 + 1;
+ char *result = XNMALLOC (size, char);
- sprintf (result, "%s (%s)", translation, name);
+ snprintf (result, size, "%s (%s)", translation, name);
return result;
}
}
@@ -270,10 +270,10 @@
else
{
/* Return "TRANSLATION (NAME)". */
- char *result =
- XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+ size_t size = strlen (translation) + 2 + strlen (name) + 1 + 1;
+ char *result = XNMALLOC (size, char);
- sprintf (result, "%s (%s)", translation, name);
+ snprintf (result, size, "%s (%s)", translation, name);
if (alloc_name_converted != NULL)
free (alloc_name_converted);
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/tmpdir.c gettext.srctix/gettext-tools/gnulib-lib/tmpdir.c
--- gettext.normalized/gettext-tools/gnulib-lib/tmpdir.c 2016-06-09 08:45:11.000000000 +0200
+++ gettext.srctix/gettext-tools/gnulib-lib/tmpdir.c 2016-12-26 15:18:30.815585719 +0100
@@ -154,6 +154,7 @@
}
memcpy (tmpl, dir, dlen);
- sprintf (tmpl + dlen, &"/%.*sXXXXXX"[!add_slash], (int) plen, pfx);
+ snprintf (tmpl + dlen, 1 + tmpl_len - dlen, &"/%.*sXXXXXX"[!add_slash],
+ (int) plen, pfx);
return 0;
}
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/tparm.c gettext.srctix/gettext-tools/gnulib-lib/tparm.c
--- gettext.normalized/gettext-tools/gnulib-lib/tparm.c 2016-06-09 08:45:11.000000000 +0200
+++ gettext.srctix/gettext-tools/gnulib-lib/tparm.c 2016-12-26 15:13:25.534771641 +0100
@@ -496,7 +496,7 @@
char *s;
if (popstring (&s))
return OOPS;
- sprintf (sbuf, fmt, s);
+ snprintf (sbuf, sizeof(sbuf), fmt, s);
}
else
{
@@ -512,7 +512,7 @@
if (i == 0 && conv_char == 'c')
strcpy (sbuf, "\000");
else
- sprintf (sbuf, fmt, i);
+ snprintf (sbuf, sizeof(sbuf), fmt, i);
}
}
sp++;
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/gnulib-lib/uniname/uniname.c gettext.srctix/gettext-tools/gnulib-lib/uniname/uniname.c
--- gettext.normalized/gettext-tools/gnulib-lib/uniname/uniname.c 2016-06-09 08:45:11.000000000 +0200
+++ gettext.srctix/gettext-tools/gnulib-lib/uniname/uniname.c 2016-12-26 15:18:15.407948395 +0100
@@ -284,8 +284,8 @@
small. */
/* buf needs to have at least 19 + 3 bytes here. */
- sprintf (buf, "VARIATION SELECTOR-%d",
- c <= 0xFE0F ? c - 0xFE00 + 1 : c - 0xE0100 + 17);
+ snprintf (buf, UNINAME_MAX, "VARIATION SELECTOR-%d",
+ c <= 0xFE0F ? c - 0xFE00 + 1 : c - 0xE0100 + 17);
return buf;
}
else
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/cldr-plurals.c gettext.srctix/gettext-tools/src/cldr-plurals.c
--- gettext.normalized/gettext-tools/src/cldr-plurals.c 2016-05-30 07:49:40.000000000 +0200
+++ gettext.srctix/gettext-tools/src/cldr-plurals.c 2016-12-26 15:29:33.439988383 +0100
@@ -162,7 +162,7 @@
buffer = (char *) xrealloc (buffer, bufmax);
}
- sprintf (buffer + buflen, "%s: %s; ", count, content);
+ snprintf (buffer + buflen, bufmax - buflen, "%s: %s; ", count, content);
xmlFree (count);
xmlFree (content);
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/format.c gettext.srctix/gettext-tools/src/format.c
--- gettext.normalized/gettext-tools/src/format.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/src/format.c 2016-12-26 15:22:33.497873287 +0100
@@ -110,7 +110,7 @@
if (msgid_plural != NULL)
{
- sprintf (buf, "msgstr[%u]", j);
+ snprintf (buf, sizeof(buf), "msgstr[%u]", j);
pretty_msgstr = buf;
}
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/read-mo.c gettext.srctix/gettext-tools/src/read-mo.c
--- gettext.normalized/gettext-tools/src/read-mo.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/src/read-mo.c 2016-12-26 15:27:12.355309337 +0100
@@ -184,7 +184,8 @@
if (!(ss_length > 0 && bfp->data[ss_end - 1] == '\0'))
{
char location[30];
- sprintf (location, "sysdep_segment[%u]", (unsigned int) sysdepref);
+ snprintf (location, sizeof (location),
+ "sysdep_segment[%u]", (unsigned int) sysdepref);
error (EXIT_FAILURE, 0,
_("file \"%s\" contains a not NUL terminated string, at %s"),
bfp->filename, location);
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/search-path.c gettext.srctix/gettext-tools/src/search-path.c
--- gettext.normalized/gettext-tools/src/search-path.c 2016-05-20 10:33:50.000000000 +0200
+++ gettext.srctix/gettext-tools/src/search-path.c 2016-12-26 15:25:37.633538968 +0100
@@ -142,7 +142,7 @@
gettextdatadirs = getenv ("XDG_DATA_DIRS");
if (gettextdatadirs != NULL)
foreach_elements (gettextdatadirs, fill, &array);
- free (array.sub);
+ free ((char *)array.sub);
/* Append version specific directory. */
base = xasprintf ("%s%s", gettextdatadir, PACKAGE_SUFFIX);
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/write-csharp.c gettext.srctix/gettext-tools/src/write-csharp.c
--- gettext.normalized/gettext-tools/src/write-csharp.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/src/write-csharp.c 2016-12-26 15:26:34.480200869 +0100
@@ -716,10 +716,10 @@
{
char *class_name_part1 = construct_class_name (resource_name);
char *p;
+ size_t size = strlen (class_name_part1) + 1 + strlen (culture_name) + 1;
- class_name =
- XNMALLOC (strlen (class_name_part1) + 1 + strlen (culture_name) + 1, char);
- sprintf (class_name, "%s_%s", class_name_part1, culture_name);
+ class_name = XNMALLOC (size, char);
+ snprintf (class_name, size, "%s_%s", class_name_part1, culture_name);
for (p = class_name + strlen (class_name_part1) + 1; *p != '\0'; p++)
if (*p == '-')
*p = '_';
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/write-po.c gettext.srctix/gettext-tools/src/write-po.c
--- gettext.normalized/gettext-tools/src/write-po.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/src/write-po.c 2016-12-26 15:39:44.917594978 +0100
@@ -78,16 +78,16 @@
case possible:
if (debug)
{
- sprintf (result, "possible-%s-format", lang);
+ snprintf (result, sizeof(result), "possible-%s-format", lang);
break;
}
/* FALLTHROUGH */
case yes_according_to_context:
case yes:
- sprintf (result, "%s-format", lang);
+ snprintf (result, sizeof(result), "%s-format", lang);
break;
case no:
- sprintf (result, "no-%s-format", lang);
+ snprintf (result, sizeof(result), "no-%s-format", lang);
break;
default:
/* The others have already been filtered out by significant_format_p. */
@@ -399,7 +399,7 @@
|| pp->line_number == (size_t)(-1))
buffer[0] = '\0';
else
- sprintf (buffer, ":%ld", (long) pp->line_number);
+ snprintf (buffer, sizeof (buffer), ":%ld", (long) pp->line_number);
len = strlen (cp) + strlen (buffer) + 1;
if (column > 2 && column + len > page_width)
{
@@ -1375,7 +1375,7 @@
p < mp->msgstr + mp->msgstr_len;
p += strlen (p) + 1, i++)
{
- sprintf (prefix_buf, "msgstr[%u]", i);
+ snprintf (prefix_buf, sizeof (prefix_buf), "msgstr[%u]", i);
wrap (mp, stream, NULL, extra_indent, class_msgstr, prefix_buf, p,
mp->do_wrap, page_width, charset);
}
@@ -1499,7 +1499,7 @@
p < mp->msgstr + mp->msgstr_len;
p += strlen (p) + 1, i++)
{
- sprintf (prefix_buf, "msgstr[%u]", i);
+ snprintf (prefix_buf, sizeof (prefix_buf), "msgstr[%u]", i);
wrap (mp, stream, "#~ ", extra_indent, class_msgstr, prefix_buf, p,
mp->do_wrap, page_width, charset);
}
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/write-properties.c gettext.srctix/gettext-tools/src/write-properties.c
--- gettext.normalized/gettext-tools/src/write-properties.c 2016-01-05 01:52:49.000000000 +0100
+++ gettext.srctix/gettext-tools/src/write-properties.c 2016-12-26 15:17:46.892619610 +0100
@@ -96,7 +96,7 @@
else if (uc < 0x10000)
{
/* Single UCS-2 'char' */
- sprintf (newstr, "\\u%c%c%c%c",
+ snprintf (newstr, length + 1 - (newstr - result), "\\u%c%c%c%c",
hexdigit[(uc >> 12) & 0x0f], hexdigit[(uc >> 8) & 0x0f],
hexdigit[(uc >> 4) & 0x0f], hexdigit[uc & 0x0f]);
newstr += 6;
@@ -106,11 +106,11 @@
/* UTF-16 surrogate: two 'char's. */
ucs4_t uc1 = 0xd800 + ((uc - 0x10000) >> 10);
ucs4_t uc2 = 0xdc00 + ((uc - 0x10000) & 0x3ff);
- sprintf (newstr, "\\u%c%c%c%c",
+ snprintf (newstr, length + 1 - (newstr - result), "\\u%c%c%c%c",
hexdigit[(uc1 >> 12) & 0x0f], hexdigit[(uc1 >> 8) & 0x0f],
hexdigit[(uc1 >> 4) & 0x0f], hexdigit[uc1 & 0x0f]);
newstr += 6;
- sprintf (newstr, "\\u%c%c%c%c",
+ snprintf (newstr, length + 1 - (newstr - result), "\\u%c%c%c%c",
hexdigit[(uc2 >> 12) & 0x0f], hexdigit[(uc2 >> 8) & 0x0f],
hexdigit[(uc2 >> 4) & 0x0f], hexdigit[uc2 & 0x0f]);
newstr += 6;
diff --no-dereference -Naur -- gettext.normalized/gettext-tools/src/xgettext.c gettext.srctix/gettext-tools/src/xgettext.c
--- gettext.normalized/gettext-tools/src/xgettext.c 2016-05-30 11:12:33.000000000 +0200
+++ gettext.srctix/gettext-tools/src/xgettext.c 2016-12-26 15:28:41.161218959 +0100
@@ -2321,7 +2321,7 @@
if (line_number == (size_t)(-1))
buffer[0] = '\0';
else
- sprintf (buffer, ":%ld", (long) line_number);
+ snprintf (buffer, sizeof (buffer), ":%ld", (long) line_number);
switch (lcontext)
{
@@ -2441,7 +2441,7 @@
if (pos->line_number == (size_t)(-1))
buffer[0] = '\0';
else
- sprintf (buffer, ":%ld", (long) pos->line_number);
+ snprintf (buffer, sizeof (buffer), ":%ld", (long) pos->line_number);
multiline_warning (xasprintf (_("%s%s: warning: "),
pos->file_name, buffer),
xasprintf (is_format[i] == yes_according_to_context
@@ -2474,7 +2474,7 @@
if (pos->line_number == (size_t)(-1))
buffer[0] = '\0';
else
- sprintf (buffer, ":%ld", (long) pos->line_number);
+ snprintf (buffer, sizeof (buffer), ":%ld", (long) pos->line_number);
multiline_warning (xasprintf (_("%s%s: warning: "),
pos->file_name, buffer),
xasprintf (_("\
@@ -2539,7 +2539,7 @@
if (pos->line_number == (size_t)(-1))
buffer[0] = '\0';
else
- sprintf (buffer, ":%ld", (long) pos->line_number);
+ snprintf (buffer, sizeof (buffer), ":%ld", (long) pos->line_number);
multiline_warning (xasprintf (_("%s%s: warning: "), pos->file_name,
buffer),
xstrdup (_("\
diff --no-dereference -Naur -- gettext.normalized/tixbuildinfo gettext.srctix/tixbuildinfo
--- gettext.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ gettext.srctix/tixbuildinfo 2021-04-17 12:13:46.592920821 +0200
@@ -0,0 +1,10 @@
+tix.version=1
+tix.class=srctix
+pkg.name=gettext
+# TODO: libcroco and libunistring are bundled and are only marked as optional
+# here as there's no official port yet. Finish those and then remove
+# them as optional.
+pkg.build-libraries=libiconv libintl libxml2 libcroco? libcurses? libexpat? libunistring?
+pkg.subdir=gettext-tools
+pkg.build-system=configure
+pkg.post-install.cmd=tix-eradicate-libtool-la

8
ports/git/git.info Normal file
View File

@ -0,0 +1,8 @@
NAME='git'
BUILD_LIBRARIES='libiconv libz libcurl? libexpat? libintl? libpcre? libssl?'
VERSION='2.14.3'
DISTNAME='git-2.14.3'
ARCHIVE='git-2.14.3.tar.xz'
SHA256SUM='5330960dd52467f6e5bf1931b9fd42b76d3f8ce9bc75150b54ecfb57d407151d'
UPSTREAM_SITE='https://www.kernel.org/pub/software/scm/git'
UPSTREAM_ARCHIVE='git-2.14.3.tar.xz'

450
ports/git/git.patch Normal file
View File

@ -0,0 +1,450 @@
diff --no-dereference -Naur -- git.normalized/builtin/log.c git.srctix/builtin/log.c
--- git.normalized/builtin/log.c 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/builtin/log.c 2017-10-23 18:18:49.514316724 +0200
@@ -249,7 +249,12 @@
fprintf(rev->diffopt.file, _("Final output: %d %s\n"), nr, stage);
}
+/* PATCH: Sortix does not have obsolescent XSI itimers. */
+#if defined(__sortix__)
+static timer_t early_output_timer;
+#else
static struct itimerval early_output_timer;
+#endif
static void log_show_early(struct rev_info *revs, struct commit_list *list)
{
@@ -297,9 +302,18 @@
* trigger every second even if we're blocked on a
* reader!
*/
+#if defined(__sortix__)
+ struct itimerspec its;
+ its.it_value.tv_sec = 0;
+ its.it_value.tv_nsec = 500000000;
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0;
+ timer_settime(early_output_timer, 0, &its, NULL);
+#else
early_output_timer.it_value.tv_sec = 0;
early_output_timer.it_value.tv_usec = 500000;
setitimer(ITIMER_REAL, &early_output_timer, NULL);
+#endif
}
static void early_output(int signal)
@@ -309,6 +323,13 @@
static void setup_early_output(struct rev_info *rev)
{
+#if defined(__sortix__) && !defined(__SORTIX_HAS_RESTARTABLE_SYSCALLS__)
+ /* TODO: Sortix doesn't have restartable system calls at the moment and this
+ feature creates spurious failures, so this feature is disabled for
+ now. */
+ return;
+#endif
+
struct sigaction sa;
/*
@@ -331,13 +352,37 @@
*
* This is a one-time-only trigger.
*/
+#if defined(__sortix__)
+ struct sigevent sev;
+ memset(&sev, 0, sizeof(sev));
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGALRM;
+ timer_create(CLOCK_MONOTONIC, &sev, &early_output_timer);
+ struct itimerspec its;
+ its.it_value.tv_sec = 0;
+ its.it_value.tv_nsec = 100000000;
+ its.it_interval.tv_sec = 0;
+ its.it_interval.tv_nsec = 0;
+ timer_settime(early_output_timer, 0, &its, NULL);
+#else
early_output_timer.it_value.tv_sec = 0;
early_output_timer.it_value.tv_usec = 100000;
setitimer(ITIMER_REAL, &early_output_timer, NULL);
+#endif
}
static void finish_early_output(struct rev_info *rev)
{
+#if defined(__sortix__) && !defined(__SORTIX_HAS_RESTARTABLE_SYSCALLS__)
+ /* TODO: Sortix doesn't have restartable system calls at the moment and this
+ feature creates spurious failures, so this feature is disabled for
+ now. */
+ return;
+#endif
+
+#if defined(__sortix__)
+ timer_delete(early_output_timer);
+#endif
int n = estimate_commit_count(rev, rev->commits);
signal(SIGALRM, SIG_IGN);
show_early_header(rev, "done", n);
diff --no-dereference -Naur -- git.normalized/compat/hstrerror.c git.srctix/compat/hstrerror.c
--- git.normalized/compat/hstrerror.c 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/compat/hstrerror.c 2017-10-23 18:23:06.688341789 +0200
@@ -2,6 +2,10 @@
#include <stdio.h>
#include <netdb.h>
+/* PATCH: hstrerror(3) is not used by git when getaddrinfo(3) is available.
+ Sortix has the modern getaddrinfo(3), but does not have the obsolete
+ gethostbyname(3). */
+#ifdef NO_IPV6
const char *githstrerror(int err)
{
static char buffer[48];
@@ -19,3 +23,4 @@
snprintf(buffer, sizeof(buffer), "Name resolution error %d", err);
return buffer;
}
+#endif
diff --no-dereference -Naur -- git.normalized/config.mak.uname git.srctix/config.mak.uname
--- git.normalized/config.mak.uname 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/config.mak.uname 2017-10-23 17:54:30.480214519 +0200
@@ -17,6 +17,8 @@
# because maintaining the nesting to match is a pain. If
# we had "elif" things would have been much nicer...
+# PATCH: Assume unknown operating systems have /dev/tty as required by POSIX.
+HAVE_DEV_TTY = YesPlease
ifeq ($(uname_S),OSF1)
# Need this for u_short definitions et al
BASIC_CFLAGS += -D_OSF_SOURCE
diff --no-dereference -Naur -- git.normalized/configure git.srctix/configure
--- git.normalized/configure 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/configure 2020-03-15 16:59:06.854378752 +0100
@@ -5315,7 +5315,7 @@
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcurl $LIBS"
+LIBS="-lcurl -lssl -lcrypto -lz $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5364,52 +5364,13 @@
if test -z "$NO_CURL"; then
-# Extract the first word of "curl-config", so it can be a program name with args.
-set dummy curl-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CURL_CONFIG+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$CURL_CONFIG"; then
- ac_cv_prog_CURL_CONFIG="$CURL_CONFIG" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CURL_CONFIG="curl-config"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_CURL_CONFIG" && ac_cv_prog_CURL_CONFIG="no"
-fi
-fi
-CURL_CONFIG=$ac_cv_prog_CURL_CONFIG
-if test -n "$CURL_CONFIG"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CURL_CONFIG" >&5
-$as_echo "$CURL_CONFIG" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-if test $CURL_CONFIG != no; then
+# PATCH: pkg-config must be used instead of the bad curl-config.
config_appended_defs="$config_appended_defs${newline}CURL_CONFIG=${CURL_CONFIG}"
if test -z "${NO_OPENSSL}"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Curl supports SSL" >&5
$as_echo_n "checking if Curl supports SSL... " >&6; }
- if test $(curl-config --features|grep SSL) = SSL; then
+ if test -n "$(${PKG_CONFIG:-pkg-config} libcurl --variable=supported_features|grep SSL)"; then
NEEDS_SSL_WITH_CURL=YesPlease
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -5423,8 +5384,6 @@
fi
fi
-fi
-
#
# Define NO_EXPAT if you do not have expat installed. git-http-push is
diff --no-dereference -Naur -- git.normalized/git-compat-util.h git.srctix/git-compat-util.h
--- git.normalized/git-compat-util.h 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/git-compat-util.h 2017-10-23 15:40:04.312191127 +0200
@@ -325,6 +325,10 @@
typedef uintmax_t timestamp_t;
#define PRItime PRIuMAX
#define parse_timestamp strtoumax
+/* PATCH: Avoid conflicting Sortix macro. */
+#ifdef TIME_MAX
+#undef TIME_MAX
+#endif
#define TIME_MAX UINTMAX_MAX
#ifndef PATH_SEP
diff --no-dereference -Naur -- git.normalized/lockfile.c git.srctix/lockfile.c
--- git.normalized/lockfile.c 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/lockfile.c 2017-10-23 18:24:54.597834724 +0200
@@ -105,16 +105,10 @@
int n = 1;
int multiplier = 1;
long remaining_ms = 0;
- static int random_initialized = 0;
if (timeout_ms == 0)
return lock_file(lk, path, flags);
- if (!random_initialized) {
- srand((unsigned int)getpid());
- random_initialized = 1;
- }
-
if (timeout_ms > 0)
remaining_ms = timeout_ms;
@@ -133,7 +127,8 @@
backoff_ms = multiplier * INITIAL_BACKOFF_MS;
/* back off for between 0.75*backoff_ms and 1.25*backoff_ms */
- wait_ms = (750 + rand() % 500) * backoff_ms / 1000;
+ /* PATCH: Avoid rand(3) warning and modulo bias. */
+ wait_ms = (750 + arc4random_uniform(500)) * backoff_ms / 1000;
sleep_millisec(wait_ms);
remaining_ms -= wait_ms;
diff --no-dereference -Naur -- git.normalized/Makefile git.srctix/Makefile
--- git.normalized/Makefile 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/Makefile 2020-03-14 23:58:19.640856650 +0100
@@ -1176,9 +1176,7 @@
endif
ifdef NEEDS_SSL_WITH_CURL
CURL_LIBCURL += -lssl
- ifdef NEEDS_CRYPTO_WITH_SSL
- CURL_LIBCURL += -lcrypto
- endif
+ CURL_LIBCURL += -lcrypto
endif
ifdef NEEDS_IDN_WITH_CURL
CURL_LIBCURL += -lidn
@@ -1252,6 +1250,12 @@
LIB_4_CRYPTO += -framework Security -framework CoreFoundation
endif
endif
+# PATCH: Link with libintl first so it can statically link with libiconv.
+ifndef NO_GETTEXT
+ifndef LIBC_CONTAINS_LIBINTL
+ EXTLIBS += -lintl
+endif
+endif
ifdef NEEDS_LIBICONV
ifdef ICONVDIR
BASIC_CFLAGS += -I$(ICONVDIR)/include
@@ -1259,19 +1263,11 @@
else
ICONV_LINK =
endif
- ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
- ICONV_LINK += -lintl
- endif
EXTLIBS += $(ICONV_LINK) -liconv
endif
ifdef NEEDS_LIBGEN
EXTLIBS += -lgen
endif
-ifndef NO_GETTEXT
-ifndef LIBC_CONTAINS_LIBINTL
- EXTLIBS += -lintl
-endif
-endif
ifdef NEEDS_SOCKET
EXTLIBS += -lsocket
endif
@@ -2184,8 +2180,10 @@
doc:
$(MAKE) -C Documentation all
+# PATCH: Build manual pages if asciidoc and xmlto are installed.
+all:: man
man:
- $(MAKE) -C Documentation man
+ if which asciidoc 1>/dev/null 2>/dev/null && which xmlto 1>/dev/null 2>/dev/null; then $(MAKE) -C Documentation man; fi
html:
$(MAKE) -C Documentation html
@@ -2502,7 +2500,7 @@
profile-fast-install: profile-fast
$(MAKE) install
-install: all
+install: all install-man
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'
@@ -2570,8 +2568,9 @@
install-doc:
$(MAKE) -C Documentation install
+# PATCH: Install manual pages if asciidoc and xmlto are installed.
install-man:
- $(MAKE) -C Documentation install-man
+ if which asciidoc 1>/dev/null 2>/dev/null && which xmlto 1>/dev/null 2>/dev/null; then $(MAKE) -C Documentation install-man; fi
install-html:
$(MAKE) -C Documentation install-html
@@ -2638,8 +2637,8 @@
### Cleaning rules
+# PATCH: Don't delete configure when making distclean because it is in the dist.
distclean: clean
- $(RM) configure
$(RM) config.log config.status config.cache
$(RM) config.mak.autogen config.mak.append
$(RM) -r autom4te.cache
diff --no-dereference -Naur -- git.normalized/progress.c git.srctix/progress.c
--- git.normalized/progress.c 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/progress.c 2017-10-23 18:28:15.449168336 +0200
@@ -39,6 +39,10 @@
uint64_t start_ns;
};
+/* PATCH: Sortix does not have obsolescent XSI itimers. */
+#if defined(__sortix__)
+static timer_t progress_timer;
+#endif
static volatile sig_atomic_t progress_update;
static void progress_interval(int signum)
@@ -48,8 +52,19 @@
static void set_progress_signal(void)
{
+#if defined(__sortix__) && !defined(__SORTIX_HAS_RESTARTABLE_SYSCALLS__)
+ /* TODO: Sortix doesn't have restartable system calls at the moment and this
+ feature creates spurious failures, so this feature is disabled for
+ now. */
+ return;
+#endif
+
struct sigaction sa;
+#if defined(__sortix__)
+ struct itimerspec v;
+#else
struct itimerval v;
+#endif
progress_update = 0;
@@ -59,16 +74,39 @@
sa.sa_flags = SA_RESTART;
sigaction(SIGALRM, &sa, NULL);
+#if defined(__sortix__)
+ struct sigevent sev;
+ memset(&sev, 0, sizeof(sev));
+ sev.sigev_notify = SIGEV_SIGNAL;
+ sev.sigev_signo = SIGALRM;
+ timer_create(CLOCK_MONOTONIC, &sev, &progress_timer);
+ v.it_interval.tv_sec = 1;
+ v.it_interval.tv_nsec = 0;
+ v.it_value = v.it_interval;
+ timer_settime(progress_timer, 0, &v, NULL);
+#else
v.it_interval.tv_sec = 1;
v.it_interval.tv_usec = 0;
v.it_value = v.it_interval;
setitimer(ITIMER_REAL, &v, NULL);
+#endif
}
static void clear_progress_signal(void)
{
+#if defined(__sortix__) && !defined(__SORTIX_HAS_RESTARTABLE_SYSCALLS__)
+ /* TODO: Sortix doesn't have restartable system calls at the moment and this
+ feature creates spurious failures, so this feature is disabled for
+ now. */
+ return;
+#endif
+
+#if defined(__sortix__)
+ timer_delete(progress_timer);
+#else
struct itimerval v = {{0,},};
setitimer(ITIMER_REAL, &v, NULL);
+#endif
signal(SIGALRM, SIG_IGN);
progress_update = 0;
}
diff --no-dereference -Naur -- git.normalized/run-command.c git.srctix/run-command.c
--- git.normalized/run-command.c 2017-10-23 08:03:35.000000000 +0200
+++ git.srctix/run-command.c 2017-10-23 15:45:13.225014144 +0200
@@ -491,9 +491,12 @@
#else
bug_die(pthread_sigmask(SIG_SETMASK, &all, &as->old),
"blocking all signals");
+/* PATCH: Sortix doesn't have pthread cancelation. */
+#ifdef PTHREAD_CANCEL_DISABLE
bug_die(pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &as->cs),
"disabling cancellation");
#endif
+#endif
}
static void atfork_parent(struct atfork_state *as)
@@ -502,8 +505,11 @@
if (sigprocmask(SIG_SETMASK, &as->old, NULL))
die_errno("sigprocmask");
#else
+/* PATCH: Sortix doesn't have pthread cancelation. */
+#ifdef PTHREAD_CANCEL_DISABLE
bug_die(pthread_setcancelstate(as->cs, NULL),
"re-enabling cancellation");
+#endif
bug_die(pthread_sigmask(SIG_SETMASK, &as->old, NULL),
"restoring signal mask");
#endif
diff --no-dereference -Naur -- git.normalized/tixbuildinfo git.srctix/tixbuildinfo
--- git.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ git.srctix/tixbuildinfo 2017-10-23 18:44:29.710533284 +0200
@@ -0,0 +1,17 @@
+tix.version=1
+tix.class=srctix
+pkg.name=git
+pkg.build-libraries=libiconv libz libcurl? libexpat? libintl? libpcre? libssl?
+pkg.build-programs=asciidoc? dblatex? docbook2x? xmlto?
+pkg.build-system=configure
+pkg.dirty-file=config.mak.autogen
+pkg.configure.args=--with-editor=editor --with-pager=pager --with-shell=sh --with-perl=perl --with-python=python
+pkg.configure.vars=ac_cv_fread_reads_directories=no ac_cv_snprintf_returns_bogus=no
+# TODO: We force MAKE to make because I occasionally use a tool called colormake
+# that likes to colorize even when the output device is a pipe, which
+# causes trouble here. You can safely remove this sortie has learned the
+# error of his ways.
+# Perl is disabled because Sortix has no perl port at the moment and I'm not
+# confident it cross-compiles properly. It also installs stuff into /usr/local
+# when prefix is empty and not sure how that happens.
+pkg.make.vars=V=1 MAKE=make NO_PERL=NoThanks

8
ports/grep/grep.info Normal file
View File

@ -0,0 +1,8 @@
NAME='grep'
BUILD_LIBRARIES='libiconv? gettext?'
VERSION='2.20'
DISTNAME='grep-2.20'
ARCHIVE='grep-2.20.tar.xz'
SHA256SUM='f0af452bc0d09464b6d089b6d56a0a3c16672e9ed9118fbe37b0b6aeaf069a65'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/grep'
UPSTREAM_ARCHIVE='grep-2.20.tar.xz'

148
ports/grep/grep.patch Normal file
View File

@ -0,0 +1,148 @@
diff --no-dereference -Naur -- grep.normalized/build-aux/config.sub grep.srctix/build-aux/config.sub
--- grep.normalized/build-aux/config.sub 2014-05-11 07:19:39.000000000 +0200
+++ grep.srctix/build-aux/config.sub 2014-08-29 12:32:00.322185730 +0200
@@ -1360,7 +1360,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- grep.normalized/configure grep.srctix/configure
--- grep.normalized/configure 2014-06-03 15:48:42.000000000 +0200
+++ grep.srctix/configure 2014-08-29 12:37:00.270194943 +0200
@@ -1,4 +1,122 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.117-1717 for GNU grep 2.20.
#
diff --no-dereference -Naur -- grep.normalized/tixbuildinfo grep.srctix/tixbuildinfo
--- grep.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ grep.srctix/tixbuildinfo 2014-08-29 12:37:09.674195232 +0200
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=grep
+pkg.build-libraries=libiconv? gettext?
+pkg.build-system=configure
+pkg.make.vars=V=1

View File

@ -0,0 +1,3 @@
chmod +x -- './10_sortix'
chmod +x -- './update-grub'
chmod +x -- './post-install.sortix'

8
ports/grub/grub.info Normal file
View File

@ -0,0 +1,8 @@
NAME='grub'
BUILD_LIBRARIES='libiconv? gettext? libfreetype? xz?'
VERSION='1.0-rc1'
DISTNAME='sortix-grub-1.0-rc1'
ARCHIVE='sortix-grub-1.0-rc1.tar.gz'
SHA256SUM='82ac8faf257fb3476969a0b79a0b5fd53d4cdefb2e2aa5941381477e38c5f9c5'
UPSTREAM_SITE='https://pub.sortix.org/sortix/toolchain'
UPSTREAM_ARCHIVE='sortix-grub-1.0-rc1.tar.gz'

894
ports/grub/grub.patch Normal file
View File

@ -0,0 +1,894 @@
diff --no-dereference -Naur -- grub.normalized/10_sortix grub.srctix/10_sortix
--- grub.normalized/10_sortix 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/10_sortix 2016-10-04 00:42:15.673754535 +0200
@@ -0,0 +1,70 @@
+#!/bin/sh -e
+! [ -e /etc/sortix-release ] && exit 0
+. /etc/sortix-release
+find_mountpoint() {(
+ FILE="$1"
+ DEVICE=$(grub-probe -t device -- "$FILE")
+ while [ "$FILE" != "/" ]; do
+ PARENT="$(dirname -- "$FILE")"
+ if [ x"$(grub-probe -t device -- "$PARENT")" != x"$DEVICE" ]; then
+ echo "$FILE"
+ exit 0
+ fi
+ FILE="$PARENT"
+ done
+ echo "$FILE"
+ exit 0
+)}
+mountpoint_relative() {(
+ REL=""
+ FILE="$1"
+ DEVICE=$(grub-probe -t device -- "$FILE")
+ while [ "$FILE" != "/" ]; do
+ PARENT="$(dirname -- "$FILE")"
+ if [ x"$(grub-probe -t device -- "$PARENT")" != x"$DEVICE" ]; then
+ echo "$REL"
+ exit 0
+ fi
+ REL="/$(basename -- "$FILE")$REL"
+ FILE="$PARENT"
+ done
+ echo "$REL"
+ exit 0
+)}
+BOOT_MNT=$(find_mountpoint /boot)
+BOOT_REL=$(mountpoint_relative /boot)
+DEVICE=$(grub-probe -t device -- "$BOOT_MNT")
+FS_UUID=$(grub-probe -t fs_uuid -- "$BOOT_MNT")
+HINTS_STRING=$(grub-probe -t hints_string -- "$BOOT_MNT")
+PARTMAP=$(grub-probe -t partmap -- "$BOOT_MNT")
+FS=$(grub-probe -t fs -- "$BOOT_MNT")
+echo "Found $PRETTY_NAME on $DEVICE" >&2
+cat > "$0.cache" << EOF
+menuentry "$PRETTY_NAME (on $DEVICE)" --unrestricted {
+ insmod part_$PARTMAP
+ insmod $FS
+ search --no-floppy --fs-uuid --set=root $HINTS_STRING $FS_UUID
+ if [ -e $BOOT_REL/sortix.bin.xz ]; then
+ insmod xzio
+ multiboot $BOOT_REL/sortix.bin.xz
+ elif [ -e $BOOT_REL/sortix.bin.gz ]; then
+ insmod gzio
+ multiboot $BOOT_REL/sortix.bin.gz
+ else
+ multiboot $BOOT_REL/sortix.bin
+ fi
+ if [ -e $BOOT_REL/random.seed ]; then
+ module $BOOT_REL/random.seed --random-seed
+ fi
+ if [ -e $BOOT_REL/sortix.initrd.xz ]; then
+ insmod xzio
+ module $BOOT_REL/sortix.initrd.xz
+ elif [ -e $BOOT_REL/sortix.initrd.gz ]; then
+ insmod gzio
+ module $BOOT_REL/sortix.initrd.gz
+ else
+ module $BOOT_REL/sortix.initrd
+ fi
+}
+EOF
+cat "$0.cache"
diff --no-dereference -Naur -- grub.normalized/build-aux/config.sub grub.srctix/build-aux/config.sub
--- grub.normalized/build-aux/config.sub 2016-02-20 20:03:24.000000000 +0100
+++ grub.srctix/build-aux/config.sub 2016-02-20 20:08:31.806466603 +0100
@@ -1354,7 +1354,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- grub.normalized/configure grub.srctix/configure
--- grub.normalized/configure 2016-02-20 20:03:23.000000000 +0100
+++ grub.srctix/configure 2016-02-20 22:04:45.922680833 +0100
@@ -1,4 +1,126 @@
#! /bin/sh
+# CFLAGS containing -s produces a broken GRUB on boot.
+if [ -n "$CFLAGS" ]; then
+ CFLAGS=$(printf '%s\n' "$CFLAGS" | sed 's/\(^\|[[:space:]]\+\)-s\([[:space:]]\+\|$\)/ /g')
+fi
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GRUB 2.02~beta2.
#
@@ -26950,6 +27072,11 @@
fi
fi
+if ${PKG_CONFIG:-pkg-config} --exists freetype2; then
+ ac_cv_prog_FREETYPE="${PKG_CONFIG:-pkg-config} freetype2"
+else
+ ac_cv_prog_FREETYPE=
+fi
FREETYPE=$ac_cv_prog_FREETYPE
if test -n "$FREETYPE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE" >&5
diff --no-dereference -Naur -- grub.normalized/grub-core/lib/libgcrypt-grub/cipher/rijndael.c grub.srctix/grub-core/lib/libgcrypt-grub/cipher/rijndael.c
--- grub.normalized/grub-core/lib/libgcrypt-grub/cipher/rijndael.c 2016-02-20 20:03:14.000000000 +0100
+++ grub.srctix/grub-core/lib/libgcrypt-grub/cipher/rijndael.c 2016-02-20 20:21:58.850491394 +0100
@@ -180,8 +180,9 @@
static int initialized = 0;
static const char *selftest_failed=0;
int rounds;
- int i,j, r, t, rconpointer = 0;
+ int j, r, t, rconpointer = 0;
int KC;
+ unsigned i;
union
{
PROPERLY_ALIGNED_TYPE dummy;
@@ -226,7 +227,9 @@
KC = 4;
if (0)
- ;
+ {
+ ; /* [-Wempty-body] */
+ }
#ifdef USE_PADLOCK
else if ((_gcry_get_hw_features () & HWF_PADLOCK_AES))
{
@@ -349,7 +352,7 @@
else
{
#define W (ctx->keyschenc)
- for (i = 0; i < keylen; i++)
+ for (i = 0; i < keylen; i++) /* [-Wsign-compare] */
{
k[i >> 2][i & 3] = key[i];
}
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/getroot.c grub.srctix/grub-core/osdep/getroot.c
--- grub.normalized/grub-core/osdep/getroot.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/grub-core/osdep/getroot.c 2016-02-20 20:08:31.810466603 +0100
@@ -16,6 +16,8 @@
#include "aros/getroot.c"
#elif defined (__HAIKU__)
#include "haiku/getroot.c"
+#elif defined(__sortix__)
+#include "sortix/getroot.c"
#else
# warning "No getroot OS-specific functions is available for your system. Device detection may not work properly."
#include "basic/getroot.c"
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/hostdisk.c grub.srctix/grub-core/osdep/hostdisk.c
--- grub.normalized/grub-core/osdep/hostdisk.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/grub-core/osdep/hostdisk.c 2016-02-20 20:08:31.814466603 +0100
@@ -16,6 +16,8 @@
#include "aros/hostdisk.c"
#elif defined (__HAIKU__)
#include "haiku/hostdisk.c"
+#elif defined(__sortix__)
+#include "sortix/hostdisk.c"
#else
# warning "No hostdisk OS-specific functions is available for your system. Device detection may not work properly."
#include "basic/hostdisk.c"
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/random.c grub.srctix/grub-core/osdep/random.c
--- grub.normalized/grub-core/osdep/random.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/grub-core/osdep/random.c 2016-02-20 20:08:31.814466603 +0100
@@ -5,6 +5,8 @@
|| defined (__GNU__) || defined (__NetBSD__) \
|| defined (__APPLE__) || defined(__sun__) || defined (__HAIKU__)
#include "unix/random.c"
+#elif defined(__sortix__)
+#include "sortix/random.c"
#else
#include "basic/random.c"
#endif
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/sortix/getroot.c grub.srctix/grub-core/osdep/sortix/getroot.c
--- grub.normalized/grub-core/osdep/sortix/getroot.c 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/grub-core/osdep/sortix/getroot.c 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,162 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2006,2007,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config-util.h>
+#include <config.h>
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <assert.h>
+#include <dirent.h>
+#include <errno.h>
+#include <error.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include <grub/types.h>
+
+#include <grub/util/misc.h>
+
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/emu/misc.h>
+#include <grub/emu/hostdisk.h>
+#include <grub/emu/getroot.h>
+
+int
+is_sortix_partition_path (const char *path)
+{
+ const char *dev = "/dev/";
+ size_t devlen = strlen (dev);
+ if (memcmp (path, dev, devlen) != 0)
+ return 0;
+ path += devlen;
+ if (!*path || isdigit ((unsigned char)*path))
+ return 0;
+ while (*path && !isdigit ((unsigned char)*path))
+ path++;
+ if (!*path || !isdigit ((unsigned char)*path))
+ return 0;
+ while (*path && isdigit ((unsigned char)*path))
+ path++;
+ if (*path++ != 'p')
+ return 0;
+ if (!*path || !isdigit ((unsigned char)*path))
+ return 0;
+ while (*path && isdigit ((unsigned char)*path))
+ path++;
+ if (*path)
+ return 0;
+ return 1;
+}
+
+char *
+grub_util_part_to_disk (const char *os_dev,
+ struct stat *st,
+ int *is_part)
+{
+ if (! S_ISBLK (st->st_mode))
+ {
+ *is_part = 0;
+ return xstrdup (os_dev);
+ }
+
+ char *path = realpath (os_dev, NULL);
+
+ if (is_sortix_partition_path (path))
+ {
+ *strrchr (path, 'p') = '\0';
+ *is_part = 1;
+ return path;
+ }
+
+ return path;
+}
+
+enum grub_dev_abstraction_types
+grub_util_get_dev_abstraction_os (const char *os_dev __attribute__((unused)))
+{
+ return GRUB_DEV_ABSTRACTION_NONE;
+}
+
+int
+grub_util_pull_device_os (const char *os_dev __attribute__ ((unused)),
+ enum grub_dev_abstraction_types ab __attribute__ ((unused)))
+{
+ return 0;
+}
+
+char *
+grub_util_get_grub_dev_os (const char *os_dev __attribute__ ((unused)))
+{
+ return NULL;
+}
+
+
+grub_disk_addr_t
+grub_util_find_partition_start_os (const char *dev __attribute__ ((unused)))
+{
+ /* TODO: We need new system support for this in Sortix. */
+ return 0;
+}
+
+static char *
+find_sortix_root_device (const char *path)
+{
+ int fd = open (path, O_RDONLY);
+ if (fd < 0)
+ return 0;
+ ssize_t blob_size = tcgetblob (fd, "device-path", NULL, 0);
+ if (blob_size < 0)
+ return close (fd), (char *)0;
+ char *blob = malloc (blob_size + 1);
+ if (!blob)
+ return close (fd), (char *)0;
+ if (tcgetblob(fd, "device-path", blob, blob_size) != blob_size)
+ return free (blob), close (fd), (char *)0;
+ close (fd);
+ blob[blob_size] = '\0';
+ return blob;
+}
+
+char **
+grub_guess_root_devices (const char *dir)
+{
+ char **os_dev = NULL;
+
+ os_dev = xmalloc (2 * sizeof (os_dev[0]));
+
+ /* Sortix specific function. */
+ os_dev[0] = find_sortix_root_device (dir);
+
+ if (!os_dev[0])
+ {
+ free (os_dev);
+ return 0;
+ }
+
+ os_dev[1] = 0;
+
+ return os_dev;
+}
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/sortix/hostdisk.c grub.srctix/grub-core/osdep/sortix/hostdisk.c
--- grub.normalized/grub-core/osdep/sortix/hostdisk.c 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/grub-core/osdep/sortix/hostdisk.c 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,66 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1999,2000,2001,2002,2003,2004,2006,2007,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config-util.h>
+
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/msdos_partition.h>
+#include <grub/types.h>
+#include <grub/err.h>
+#include <grub/emu/misc.h>
+#include <grub/emu/hostdisk.h>
+#include <grub/emu/getroot.h>
+#include <grub/misc.h>
+#include <grub/i18n.h>
+#include <grub/list.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <limits.h>
+
+grub_int64_t
+grub_util_get_fd_size_os (grub_util_fd_t fd,
+ const char *name,
+ unsigned *log_secsize)
+{
+ struct stat st;
+ if (fstat (fd, &st))
+ return -1;
+ unsigned int sector_size = st.st_blksize;
+ unsigned int log_sector_size;
+ for (log_sector_size = 0;
+ (1 << log_sector_size) < sector_size;
+ log_sector_size++);
+ if (log_secsize)
+ *log_secsize = log_sector_size;
+ return st.st_size;
+}
+
+void
+grub_hostdisk_flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
+{
+}
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/sortix/random.c grub.srctix/grub-core/osdep/sortix/random.c
--- grub.normalized/grub-core/osdep/sortix/random.c 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/grub-core/osdep/sortix/random.c 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,35 @@
+/*
+ * GRUB -- GRand Unified Bootloader
+ * Copyright (C) 1992-1999,2001,2003,2004,2005,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
+ *
+ * GRUB is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GRUB is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+
+#include <grub/types.h>
+#include <grub/crypto.h>
+#include <grub/auth.h>
+#include <grub/emu/misc.h>
+#include <grub/util/misc.h>
+#include <grub/i18n.h>
+
+#include <stdlib.h>
+
+int
+grub_get_random (void *out, grub_size_t len)
+{
+ arc4random_buf(out, len);
+ return 0;
+}
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/unix/getroot.c grub.srctix/grub-core/osdep/unix/getroot.c
--- grub.normalized/grub-core/osdep/unix/getroot.c 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/grub-core/osdep/unix/getroot.c 2016-02-20 20:08:31.814466603 +0100
@@ -111,7 +111,8 @@
#include <sys/mount.h>
#endif
-#if !defined (__GNU__)
+/* Sortix implements these in grub-core/osdep/sortix/getroot.c instead. */
+#if !defined (__GNU__) && !defined(__sortix__)
static void
strip_extra_slashes (char *dir)
{
@@ -441,7 +442,7 @@
cwd = xgetcwd ();
res = xmalloc (strlen (cwd) + strlen (ent->d_name) + 3);
- sprintf (res,
+ snprintf (res, strlen (cwd) + strlen (ent->d_name) + 3,
#if defined(__NetBSD__) || defined(__OpenBSD__)
/* Convert this block device to its character (raw) device. */
"%s/r%s",
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/unix/hostdisk.c grub.srctix/grub-core/osdep/unix/hostdisk.c
--- grub.normalized/grub-core/osdep/unix/hostdisk.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/grub-core/osdep/unix/hostdisk.c 2016-02-20 20:23:49.278494786 +0100
@@ -200,16 +200,7 @@
char *
grub_canonicalize_file_name (const char *path)
{
-#if defined (PATH_MAX)
- char *ret;
-
- ret = xmalloc (PATH_MAX);
- if (!realpath (path, ret))
- return NULL;
- return ret;
-#else
- return realpath (path, NULL);
-#endif
+ return canonicalize_file_name (path);
}
FILE *
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/unix/password.c grub.srctix/grub-core/osdep/unix/password.c
--- grub.normalized/grub-core/osdep/unix/password.c 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/grub-core/osdep/unix/password.c 2016-02-20 20:08:31.814466603 +0100
@@ -37,9 +37,9 @@
grub_refresh ();
/* Disable echoing. Based on glibc. */
- in = fopen ("/dev/tty", "w+c");
+ in = fopen ("/dev/tty", "w+"); /* 'c' on glibc means no thread cancellation */
if (in == NULL)
- in = stdin;
+ return 0;
if (tcgetattr (fileno (in), &t) == 0)
{
diff --no-dereference -Naur -- grub.normalized/grub-core/osdep/unix/platform.c grub.srctix/grub-core/osdep/unix/platform.c
--- grub.normalized/grub-core/osdep/unix/platform.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/grub-core/osdep/unix/platform.c 2016-02-20 20:08:31.814466603 +0100
@@ -114,8 +114,14 @@
|| line[sizeof ("Boot") - 1] < '0'
|| line[sizeof ("Boot") - 1] > '9')
continue;
+#if defined(__sortix__)
+/* PATCH: Sortix doesn't have strcasestr yet. */
+ if (!strstr (line, efi_distributor))
+ continue;
+#else
if (!strcasestr (line, efi_distributor))
continue;
+#endif
bootnum = line + sizeof ("Boot") - 1;
bootnum[4] = '\0';
if (!verbosity)
diff --no-dereference -Naur -- grub.normalized/include/grub/emu/getroot.h grub.srctix/include/grub/emu/getroot.h
--- grub.normalized/include/grub/emu/getroot.h 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/include/grub/emu/getroot.h 2016-02-20 20:20:23.674488470 +0100
@@ -101,4 +101,8 @@
grub_util_fprint_full_disk_name (FILE *f,
const char *drive, grub_device_t dev);
+#if defined(__sortix__)
+int is_sortix_partition_path (const char *path);
+#endif
+
#endif /* ! GRUB_UTIL_GETROOT_HEADER */
diff --no-dereference -Naur -- grub.normalized/post-install.sortix grub.srctix/post-install.sortix
--- grub.normalized/post-install.sortix 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/post-install.sortix 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+cp update-grub "$TIX_INSTALL_DIR$EXEC_PREFIX/sbin/update-grub"
+cp 10_sortix "$TIX_INSTALL_DIR$PREFIX/etc/grub.d/10_sortix"
+if [ ! -e "$TIX_INSTALL_DIR$PREFIX/share/grub/unicode.pf2" ]; then
+ # Cheat as I'm not sure how to get this when cross-building.
+ [ -e /share/grub/unicode.pf2 ] &&
+ cp /share/grub/unicode.pf2 "$TIX_INSTALL_DIR$PREFIX/share/grub/unicode.pf2"
+ [ -e /usr/share/grub/unicode.pf2 ] &&
+ cp /usr/share/grub/unicode.pf2 "$TIX_INSTALL_DIR$PREFIX/share/grub/unicode.pf2"
+fi
diff --no-dereference -Naur -- grub.normalized/tixbuildinfo grub.srctix/tixbuildinfo
--- grub.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/tixbuildinfo 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=grub
+pkg.build-libraries=libiconv? gettext? libfreetype? xz?
+pkg.build-system=configure
+pkg.configure.args=--disable-werror --program-prefix=
+pkg.post-install.cmd=./post-install.sortix
diff --no-dereference -Naur -- grub.normalized/update-grub grub.srctix/update-grub
--- grub.normalized/update-grub 1970-01-01 01:00:00.000000000 +0100
+++ grub.srctix/update-grub 2016-02-20 20:08:31.814466603 +0100
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
diff --no-dereference -Naur -- grub.normalized/util/getroot.c grub.srctix/util/getroot.c
--- grub.normalized/util/getroot.c 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/util/getroot.c 2016-02-20 20:50:52.906544660 +0100
@@ -223,7 +223,7 @@
return convert_system_partition_to_system_disk (os_dev, &is_part);
}
-#if !defined(__APPLE__)
+#if !defined(__APPLE__) && !defined(__sortix__)
/* Context for grub_util_biosdisk_get_grub_dev. */
struct grub_util_biosdisk_get_grub_dev_ctx
{
@@ -314,6 +314,29 @@
return ret;
}
+#elif defined(__sortix__)
+
+ /* Sortix uses "/dev/[a-z]+[0-9]+(p[0-9]+)?". */
+ /*
+ * Note: we do not use the new partition naming scheme as dos_part does not
+ * necessarily correspond to an msdos partition.
+ */
+ {
+ char *dri;
+
+ dri = make_device_name (drive);
+
+ if (is_sortix_partition_path (os_dev))
+ {
+ long part = strtol (strrchr (os_dev, 'p') + 1, NULL, 10);
+ char *ret = xasprintf ("%s,%ld", dri, part);
+ free (dri);
+ return ret;
+ }
+
+ return dri;
+ }
+
#else
/* Linux counts partitions uniformly, whether a BSD partition or a DOS
diff --no-dereference -Naur -- grub.normalized/util/grub.d/00_header.in grub.srctix/util/grub.d/00_header.in
--- grub.normalized/util/grub.d/00_header.in 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/util/grub.d/00_header.in 2016-02-20 20:08:31.814466603 +0100
@@ -27,6 +27,13 @@
. "$pkgdatadir/grub-mkconfig_lib"
+if [ -f "/etc/grubpw" ]; then
+ echo 'insmod password_pbkdf2'
+ echo 'set superusers="root"'
+ echo "password_pbkdf2 root $(cat /etc/grubpw)"
+ echo
+fi
+
# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
diff --no-dereference -Naur -- grub.normalized/util/grub-fstest.c grub.srctix/util/grub-fstest.c
--- grub.normalized/util/grub-fstest.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/util/grub-fstest.c 2016-02-20 20:08:31.814466603 +0100
@@ -753,7 +753,7 @@
{
alloc_root = xmalloc (strlen (default_root) + strlen (root) + 2);
- sprintf (alloc_root, "%s,%s", default_root, root);
+ snprintf (alloc_root, strlen (default_root) + strlen (root) + 2, "%s,%s", default_root, root);
root = alloc_root;
}
}
diff --no-dereference -Naur -- grub.normalized/util/grub-mkconfig.in grub.srctix/util/grub-mkconfig.in
--- grub.normalized/util/grub-mkconfig.in 2016-02-20 20:00:29.000000000 +0100
+++ grub.srctix/util/grub-mkconfig.in 2016-02-20 20:08:31.818466603 +0100
@@ -102,27 +102,6 @@
esac
done
-if [ "x$EUID" = "x" ] ; then
- EUID=`id -u`
-fi
-
-if [ "$EUID" != 0 ] ; then
- root=f
- case "`uname 2>/dev/null`" in
- CYGWIN*)
- # Cygwin: Assume root if member of admin group
- for g in `id -G 2>/dev/null` ; do
- case $g in
- 0|544) root=t ;;
- esac
- done ;;
- esac
- if [ $root != t ] ; then
- gettext_printf "%s: You must run this as root\n" "$self" >&2
- exit 1
- fi
-fi
-
set $grub_probe dummy
if test -f "$1"; then
:
diff --no-dereference -Naur -- grub.normalized/util/misc.c grub.srctix/util/misc.c
--- grub.normalized/util/misc.c 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/util/misc.c 2016-02-20 20:08:38.846466819 +0100
@@ -68,9 +68,10 @@
grub_util_get_path (const char *dir, const char *file)
{
char *path;
+ size_t path_size = strlen (dir) + 1 + strlen (file) + 1;
- path = (char *) xmalloc (strlen (dir) + 1 + strlen (file) + 1);
- sprintf (path, "%s/%s", dir, file);
+ path = (char *) xmalloc (path_size);
+ snprintf (path, path_size, "%s/%s", dir, file);
return path;
}
diff --no-dereference -Naur -- grub.normalized/util/probe.c grub.srctix/util/probe.c
--- grub.normalized/util/probe.c 2015-08-11 20:56:01.000000000 +0200
+++ grub.srctix/util/probe.c 2016-02-20 20:08:38.846466819 +0100
@@ -81,6 +81,22 @@
ptr++;
else
ptr = canon;
+#if defined(__sortix__)
+ if (! strncmp(ptr, "ata", strlen ("ata")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ata"))))
+ {
+ int num = strtol(ptr + strlen("ata"), NULL, 10);
+ free (canon);
+ return xasprintf ("hd%d", num);
+ }
+ if (! strncmp(ptr, "ahci", strlen ("ahci")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ahci"))))
+ {
+ int num = strtol(ptr + strlen("ahci"), NULL, 10);
+ free (canon);
+ return xasprintf ("hd%d", num);
+ }
+#endif
if ((ptr[0] == 's' || ptr[0] == 'h') && ptr[1] == 'd')
{
int num = ptr[2] - 'a';
@@ -110,6 +126,22 @@
ptr++;
else
ptr = canon;
+#if defined(__sortix__)
+ if (! strncmp(ptr, "ata", strlen ("ata")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ata"))))
+ {
+ int num = strtol(ptr + strlen("ata"), NULL, 10);
+ free (canon);
+ return xasprintf ("hd%d", num);
+ }
+ if (! strncmp(ptr, "ahci", strlen ("ahci")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ahci"))))
+ {
+ int num = strtol(ptr + strlen("ahci"), NULL, 10);
+ free (canon);
+ return xasprintf ("hd%d", num);
+ }
+#endif
if ((ptr[0] == 's' || ptr[0] == 'h') && ptr[1] == 'd')
{
int num = ptr[2] - 'a';
@@ -139,6 +171,22 @@
ptr++;
else
ptr = canon;
+#if defined(__sortix__)
+ if (! strncmp(ptr, "ata", strlen ("ata")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ata"))))
+ {
+ int num = strtol(ptr + strlen("ata"), NULL, 10);
+ free (canon);
+ return xasprintf ("ata%d", num);
+ }
+ if (! strncmp(ptr, "ahci", strlen ("ahci")) &&
+ isdigit((unsigned char)*(ptr + strlen ("ahci"))))
+ {
+ int num = strtol(ptr + strlen("ahci"), NULL, 10);
+ free (canon);
+ return xasprintf ("ahci%d", num);
+ }
+#endif
if (ptr[0] == 'h' && ptr[1] == 'd')
{
int num = ptr[2] - 'a';
diff --no-dereference -Naur -- grub.normalized/util/resolve.c grub.srctix/util/resolve.c
--- grub.normalized/util/resolve.c 2016-02-03 15:04:48.000000000 +0100
+++ grub.srctix/util/resolve.c 2016-02-20 20:08:38.846466819 +0100
@@ -172,7 +172,7 @@
else
{
base = xmalloc (strlen (str) + 4 + 1);
- sprintf (base, "%s.mod", str);
+ snprintf (base, strlen (str) + 4 + 1, "%s.mod", str);
}
dir = strchr (str, '/');

8
ports/gzip/gzip.info Normal file
View File

@ -0,0 +1,8 @@
NAME='gzip'
BUILD_LIBRARIES='libz'
VERSION='1.5'
DISTNAME='gzip-1.5'
ARCHIVE='gzip-1.5.tar.xz'
SHA256SUM='9ac20a3841a1246a8bedd800ea1fb93ef76521535d89cb59397d267026b6a173'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/gzip'
UPSTREAM_ARCHIVE='gzip-1.5.tar.xz'

225
ports/gzip/gzip.patch Normal file
View File

@ -0,0 +1,225 @@
diff --no-dereference -Naur -- gzip.normalized/build-aux/config.sub gzip.srctix/build-aux/config.sub
--- gzip.normalized/build-aux/config.sub 2012-06-17 19:05:17.000000000 +0200
+++ gzip.srctix/build-aux/config.sub 2013-01-13 01:13:57.717011000 +0100
@@ -1348,7 +1348,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- gzip.normalized/gunzip.in gzip.srctix/gunzip.in
--- gzip.normalized/gunzip.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/gunzip.in 2014-12-27 01:35:28.529715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Uncompress files. This is the inverse of gzip.
# Copyright (C) 2007 Free Software Foundation
diff --no-dereference -Naur -- gzip.normalized/gzexe.in gzip.srctix/gzexe.in
--- gzip.normalized/gzexe.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/gzexe.in 2014-12-27 01:35:28.537715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# gzexe: compressor for Unix executables.
# Use this only for binaries that you do not use frequently.
#
diff --no-dereference -Naur -- gzip.normalized/lib/fcntl.c gzip.srctix/lib/fcntl.c
--- gzip.normalized/lib/fcntl.c 2012-03-03 13:51:02.000000000 +0100
+++ gzip.srctix/lib/fcntl.c 2013-10-18 23:49:14.572507298 +0200
@@ -181,7 +181,7 @@
result = dupfd (fd, target, 0);
break;
}
-#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+#elif (FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR) && !defined(__sortix__)
case F_DUPFD:
{
int target = va_arg (arg, int);
diff --no-dereference -Naur -- gzip.normalized/lib/freadahead.c gzip.srctix/lib/freadahead.c
--- gzip.normalized/lib/freadahead.c 2012-03-03 13:51:02.000000000 +0100
+++ gzip.srctix/lib/freadahead.c 2013-10-18 23:42:54.196495614 +0200
@@ -22,6 +22,10 @@
#include <stdlib.h>
#include "stdio-impl.h"
+#if defined __sortix__
+#include <FILE.h>
+#endif
+
size_t
freadahead (FILE *fp)
{
@@ -84,6 +88,10 @@
if (fp->state == 4 /* WR */ || fp->rp >= fp->wp)
return 0;
return fp->wp - fp->rp;
+#elif defined __sortix__
+ if ( !(fp->flags & _FILE_LAST_READ) )
+ return 0;
+ return fp->amount_input_buffered - fp->offset_input_buffer;
#elif defined SLOW_BUT_NO_HACKS /* users can define this */
abort ();
return 0;
diff --no-dereference -Naur -- gzip.normalized/lib/fseeko.c gzip.srctix/lib/fseeko.c
--- gzip.normalized/lib/fseeko.c 2012-06-17 19:06:44.000000000 +0200
+++ gzip.srctix/lib/fseeko.c 2013-01-13 01:33:59.777038163 +0100
@@ -99,6 +99,8 @@
#elif defined EPLAN9 /* Plan9 */
if (fp->rp == fp->buf
&& fp->wp == fp->buf)
+#elif defined __sortix__
+ if (0) /* wtf is this shit - sortix handles fseeko just fine. */
#else
#error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
#endif
diff --no-dereference -Naur -- gzip.normalized/lib/fseterr.c gzip.srctix/lib/fseterr.c
--- gzip.normalized/lib/fseterr.c 2012-03-03 13:51:02.000000000 +0100
+++ gzip.srctix/lib/fseterr.c 2014-03-06 02:04:01.885844393 +0100
@@ -23,6 +23,10 @@
#include "stdio-impl.h"
+#if defined __sortix__
+#include <FILE.h>
+#endif
+
void
fseterr (FILE *fp)
{
@@ -48,6 +52,8 @@
#elif defined EPLAN9 /* Plan9 */
if (fp->state != 0 /* CLOSED */)
fp->state = 5 /* ERR */;
+#elif defined __sortix__
+ fp->flags |= _FILE_STATUS_ERROR;
#elif 0 /* unknown */
/* Portable fallback, based on an idea by Rich Felker.
Wow! 6 system calls for something that is just a bit operation!
diff --no-dereference -Naur -- gzip.normalized/Makefile.am gzip.srctix/Makefile.am
--- gzip.normalized/Makefile.am 2012-01-12 13:45:54.000000000 +0100
+++ gzip.srctix/Makefile.am 2014-12-27 01:35:28.537715717 +0100
@@ -82,7 +82,6 @@
SUFFIXES = .in
.in:
$(AM_V_GEN)sed \
- -e 's|/bin/sh|$(SHELL)|g' \
-e 's|[@]bindir@|'\''$(bindir)'\''|g' \
-e 's|[@]VERSION@|$(VERSION)|g' \
$(srcdir)/$@.in >$@-t \
diff --no-dereference -Naur -- gzip.normalized/Makefile.in gzip.srctix/Makefile.in
--- gzip.normalized/Makefile.in 2012-06-17 19:07:08.000000000 +0200
+++ gzip.srctix/Makefile.in 2014-12-27 01:35:28.537715717 +0100
@@ -2102,7 +2102,6 @@
$(AM_V_GEN)./gzip < $(srcdir)/gzip.doc >$@-t && mv $@-t $@
.in:
$(AM_V_GEN)sed \
- -e 's|/bin/sh|$(SHELL)|g' \
-e 's|[@]bindir@|'\''$(bindir)'\''|g' \
-e 's|[@]VERSION@|$(VERSION)|g' \
$(srcdir)/$@.in >$@-t \
diff --no-dereference -Naur -- gzip.normalized/tixbuildinfo gzip.srctix/tixbuildinfo
--- gzip.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ gzip.srctix/tixbuildinfo 2013-10-30 15:57:15.724633927 +0100
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=gzip
+pkg.build-libraries=libz
+pkg.build-system=configure
+pkg.make.vars=V=1
+pkg.configure.vars=gt_cv_locale_fr=false gt_cv_locale_ja=false gt_cv_locale_fr_utf8=false gt_cv_locale_ja_utf8=false gt_cv_locale_tr_utf8=false gt_cv_locale_zh_CN=false
diff --no-dereference -Naur -- gzip.normalized/zcat.in gzip.srctix/zcat.in
--- gzip.normalized/zcat.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zcat.in 2014-12-27 01:35:28.537715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Uncompress files to standard output.
# Copyright (C) 2007 Free Software Foundation
diff --no-dereference -Naur -- gzip.normalized/zcmp.in gzip.srctix/zcmp.in
--- gzip.normalized/zcmp.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zcmp.in 2014-12-27 01:35:28.537715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Compare the uncompressed contents of compressed files, byte by byte.
# Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
diff --no-dereference -Naur -- gzip.normalized/zdiff.in gzip.srctix/zdiff.in
--- gzip.normalized/zdiff.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zdiff.in 2014-12-27 01:35:28.537715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh
# Copyright (C) 1998, 2002, 2006, 2007, 2009 Free Software Foundation
diff --no-dereference -Naur -- gzip.normalized/zegrep.in gzip.srctix/zegrep.in
--- gzip.normalized/zegrep.in 2009-08-18 09:27:41.000000000 +0200
+++ gzip.srctix/zegrep.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
bindir=@bindir@
case $1 in
--__bindir) bindir=${2?}; shift; shift;;
diff --no-dereference -Naur -- gzip.normalized/zfgrep.in gzip.srctix/zfgrep.in
--- gzip.normalized/zfgrep.in 2009-08-18 09:27:41.000000000 +0200
+++ gzip.srctix/zfgrep.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
bindir=@bindir@
case $1 in
--__bindir) bindir=${2?}; shift; shift;;
diff --no-dereference -Naur -- gzip.normalized/zforce.in gzip.srctix/zforce.in
--- gzip.normalized/zforce.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zforce.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# zforce: force a gz extension on all gzip files so that gzip will not
# compress them twice.
#
diff --no-dereference -Naur -- gzip.normalized/zgrep.in gzip.srctix/zgrep.in
--- gzip.normalized/zgrep.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zgrep.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# zgrep -- a wrapper around a grep program that decompresses files as needed
# Adapted from a version sent by Charles Levert <charles@comm.polymtl.ca>
diff --no-dereference -Naur -- gzip.normalized/zless.in gzip.srctix/zless.in
--- gzip.normalized/zless.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zless.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Copyright (C) 1998, 2002, 2006, 2007 Free Software Foundation
diff --no-dereference -Naur -- gzip.normalized/zmore.in gzip.srctix/zmore.in
--- gzip.normalized/zmore.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/zmore.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Copyright (C) 2001, 2002, 2007, 2010 Free Software Foundation
# Copyright (C) 1992, 1993 Jean-loup Gailly
diff --no-dereference -Naur -- gzip.normalized/znew.in gzip.srctix/znew.in
--- gzip.normalized/znew.in 2012-01-01 09:53:58.000000000 +0100
+++ gzip.srctix/znew.in 2014-12-27 01:35:28.541715717 +0100
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!sh
# Copyright (C) 1998, 2002, 2004, 2007, 2010 Free Software Foundation
# Copyright (C) 1993 Jean-loup Gailly

8
ports/hello/hello.info Normal file
View File

@ -0,0 +1,8 @@
NAME='hello'
BUILD_LIBRARIES='libiconv? gettext?'
VERSION='2.8'
DISTNAME='hello-2.8'
ARCHIVE='hello-2.8.tar.gz'
SHA256SUM='e6b77f81f7cf7daefad4a9f5b65de6cae9c3f13b8cfbaea8cb53bb5ea5460d73'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/hello'
UPSTREAM_ARCHIVE='hello-2.8.tar.gz'

22
ports/hello/hello.patch Normal file
View File

@ -0,0 +1,22 @@
diff --no-dereference -Naur -- hello.normalized/build-aux/config.sub hello.srctix/build-aux/config.sub
--- hello.normalized/build-aux/config.sub 2012-04-18 19:30:57.000000000 +0200
+++ hello.srctix/build-aux/config.sub 2013-01-13 03:36:18.125203991 +0100
@@ -1342,7 +1342,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- hello.normalized/tixbuildinfo hello.srctix/tixbuildinfo
--- hello.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ hello.srctix/tixbuildinfo 2013-11-28 23:22:46.501326247 +0100
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=hello
+pkg.build-libraries=libiconv? gettext?
+pkg.build-system=configure
+pkg.configure.vars=gt_cv_locale_fr=false gt_cv_locale_ja=false gt_cv_locale_fr_utf8=false gt_cv_locale_ja_utf8=false gt_cv_locale_tr_utf8=false gt_cv_locale_zh_CN=false

View File

@ -0,0 +1 @@
chmod +x -- './make.sortix'

8
ports/libSDL/libSDL.info Normal file
View File

@ -0,0 +1,8 @@
NAME='libSDL'
BUILD_LIBRARIES='libstdc++ libiconv libgmp'
VERSION='1.2.15'
DISTNAME='sortix-libSDL-1.2.15'
ARCHIVE='sortix-libSDL-1.2.15.tar.xz'
SHA256SUM='09e4215a0f8ecad45a36aee04f97bfb662cf9578e3bee55dbd3750a9dd021b12'
UPSTREAM_SITE='https://pub.sortix.org/fork/libSDL'
UPSTREAM_ARCHIVE='sortix-libSDL-1.2.15.tar.xz'

24
ports/libSDL/libSDL.patch Normal file
View File

@ -0,0 +1,24 @@
diff --no-dereference -Naur libSDL.normalized/make.sortix libSDL.srctix/make.sortix
--- libSDL.normalized/make.sortix 1970-01-01 01:00:00.000000000 +0100
+++ libSDL.srctix/make.sortix 2020-07-27 00:26:36.000000000 +0200
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+"$MAKE" "$@"
+
+if [ "$1" = "install" ]; then
+rm -fv "$DESTDIR/$EXEC_PREFIX/bin/sdl-config"
+fi
diff --no-dereference -Naur libSDL.normalized/tixbuildinfo libSDL.srctix/tixbuildinfo
--- libSDL.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libSDL.srctix/tixbuildinfo 2020-07-27 00:26:36.000000000 +0200
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libSDL
+pkg.build-libraries=libstdc++ libiconv libgmp
+pkg.build-system=configure
+pkg.configure.args=--without-x --disable-pulseaudio --enable-video-dispd --disable-pthreads
+pkg.make.cmd=./make.sortix
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,2 @@
NAME='libavcodec'
SOURCE_PACKAGE='ffmpeg'

View File

@ -0,0 +1,13 @@
diff --no-dereference -Naur -- libavcodec.normalized/tixbuildinfo libavcodec.srctix/tixbuildinfo
--- libavcodec.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libavcodec.srctix/tixbuildinfo 2020-12-07 21:18:28.975689191 +0100
@@ -0,0 +1,9 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libavcodec
+pkg.source-package=ffmpeg
+pkg.build-libraries=libfontconfig? libfreetype? libiconv? libssl? libtheora? libvorbis? libxml2? libz? xz?
+pkg.build-system=configure
+pkg.dirty-file=ffbuild/config.mak
+pkg.configure.args=--disable-x86asm --enable-version3 --optflags=" " --disable-debug --disable-programs
+pkg.make.vars=V=1

View File

@ -0,0 +1,8 @@
NAME='libcairo'
BUILD_LIBRARIES='libz bzip2 libpng libfreetype libfontconfig? librsvg? libexpat? libpixman libglib?'
VERSION='1.12.14'
DISTNAME='cairo-1.12.14'
ARCHIVE='cairo-1.12.14.tar.xz'
SHA256SUM='96d0d1e3f9b74d2ca3469ff187c5e5f25649b1ad35cf06f4f3a83847dff4ac13'
UPSTREAM_SITE='https://www.cairographics.org/releases'
UPSTREAM_ARCHIVE='cairo-1.12.14.tar.xz'

View File

@ -0,0 +1,45 @@
rm -rf -- 'doc/public/xml/'
rm -rf -- 'doc/public/xml/cairo-user-fonts.xml'
rm -rf -- 'doc/public/xml/cairo-version.xml'
rm -rf -- 'doc/public/xml/api-index-1.8.xml'
rm -rf -- 'doc/public/xml/cairo-ft.xml'
rm -rf -- 'doc/public/xml/api-index-1.0.xml'
rm -rf -- 'doc/public/xml/api-index-1.12.xml'
rm -rf -- 'doc/public/xml/cairo-xlib-xrender.xml'
rm -rf -- 'doc/public/xml/cairo-types.xml'
rm -rf -- 'doc/public/xml/api-index-deprecated.xml'
rm -rf -- 'doc/public/xml/cairo-scaled-font.xml'
rm -rf -- 'doc/public/xml/cairo-xlib.xml'
rm -rf -- 'doc/public/xml/cairo-status.xml'
rm -rf -- 'doc/public/xml/cairo-font-face.xml'
rm -rf -- 'doc/public/xml/cairo-font-options.xml'
rm -rf -- 'doc/public/xml/cairo-png.xml'
rm -rf -- 'doc/public/xml/cairo-raster-source.xml'
rm -rf -- 'doc/public/xml/cairo-device.xml'
rm -rf -- 'doc/public/xml/cairo-pattern.xml'
rm -rf -- 'doc/public/xml/cairo-region.xml'
rm -rf -- 'doc/public/xml/api-index-1.6.xml'
rm -rf -- 'doc/public/xml/api-index-full.xml'
rm -rf -- 'doc/public/xml/cairo-win32-fonts.xml'
rm -rf -- 'doc/public/xml/cairo-xcb.xml'
rm -rf -- 'doc/public/xml/api-index-1.2.xml'
rm -rf -- 'doc/public/xml/api-index-TBD.xml'
rm -rf -- 'doc/public/xml/cairo-text.xml'
rm -rf -- 'doc/public/xml/cairo-surface.xml'
rm -rf -- 'doc/public/xml/cairo-paths.xml'
rm -rf -- 'doc/public/xml/cairo-svg.xml'
rm -rf -- 'doc/public/xml/cairo-script.xml'
rm -rf -- 'doc/public/xml/cairo-transforms.xml'
rm -rf -- 'doc/public/xml/cairo-matrix.xml'
rm -rf -- 'doc/public/xml/cairo-quartz.xml'
rm -rf -- 'doc/public/xml/cairo-recording.xml'
rm -rf -- 'doc/public/xml/cairo.xml'
rm -rf -- 'doc/public/xml/api-index-1.10.xml'
rm -rf -- 'doc/public/xml/cairo-ps.xml'
rm -rf -- 'doc/public/xml/cairo-win32.xml'
rm -rf -- 'doc/public/xml/cairo-pdf.xml'
rm -rf -- 'doc/public/xml/cairo-quartz-fonts.xml'
rm -rf -- 'doc/public/xml/cairo-image.xml'
rm -rf -- 'doc/public/xml/api-index-1.4.xml'
rm -rf -- 'boilerplate/cairo-boilerplate-constructors.c'
rm -rf -- 'test/cairo-test-constructors.c'

View File

@ -0,0 +1,102 @@
diff --no-dereference -Naur -- libcairo.normalized/build/config.sub libcairo.srctix/build/config.sub
--- libcairo.normalized/build/config.sub 2012-06-08 18:15:38.000000000 +0200
+++ libcairo.srctix/build/config.sub 2013-03-29 14:00:31.883796588 +0100
@@ -1348,7 +1348,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libcairo.normalized/build/configure.ac.warnings libcairo.srctix/build/configure.ac.warnings
--- libcairo.normalized/build/configure.ac.warnings 2012-10-21 18:30:52.000000000 +0200
+++ libcairo.srctix/build/configure.ac.warnings 2014-04-28 14:31:54.776689178 +0200
@@ -36,16 +36,6 @@
dnl We also abuse the warning-flag facility to enable other compiler
dnl options. Namely, the following:
-dnl -flto working really needs a test link, not just a compile
-
-safe_MAYBE_WARN="$MAYBE_WARN"
-MAYBE_WARN="$MAYBE_WARN -flto"
-AC_TRY_LINK([],[
- int main(int argc, char **argv) { return 0; }
-],[],[
- MAYBE_WARN="$safe_MAYBE_WARN"
-])
-
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
dnl Also to turn various gcc/glibc-specific preprocessor checks
diff --no-dereference -Naur -- libcairo.normalized/configure libcairo.srctix/configure
--- libcairo.normalized/configure 2013-02-10 14:39:19.000000000 +0100
+++ libcairo.srctix/configure 2014-09-07 12:55:24.353462613 +0200
@@ -18159,33 +18159,6 @@
MAYBE_WARN="$MAYBE_WARN -erroff=E_ENUM_TYPE_MISMATCH_ARG \
-erroff=E_ENUM_TYPE_MISMATCH_OP"
-
-
-safe_MAYBE_WARN="$MAYBE_WARN"
-MAYBE_WARN="$MAYBE_WARN -flto"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- int main(int argc, char **argv) { return 0; }
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-else
-
- MAYBE_WARN="$safe_MAYBE_WARN"
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
MAYBE_WARN="$MAYBE_WARN -fno-strict-aliasing -fno-common"
MAYBE_WARN="$MAYBE_WARN -Wp,-D_FORTIFY_SOURCE=2"
@@ -31800,7 +31773,7 @@
-if pkg-config --exists 'pixman-1 >= 0.27.1'; then
+if ${PKG_CONFIG:-pkg-config} --exists 'pixman-1 >= 0.27.1'; then
$as_echo "#define HAS_PIXMAN_GLYPHS 1" >>confdefs.h
diff --no-dereference -Naur -- libcairo.normalized/configure.ac libcairo.srctix/configure.ac
--- libcairo.normalized/configure.ac 2013-01-29 14:54:51.000000000 +0100
+++ libcairo.srctix/configure.ac 2014-12-27 15:10:23.171474943 +0100
@@ -662,7 +662,7 @@
image_LIBS=$pixman_LIBS
])
-if pkg-config --exists 'pixman-1 >= 0.27.1'; then
+if ${PKG_CONFIG:-pkg-config} --exists 'pixman-1 >= 0.27.1'; then
AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])
fi
diff --no-dereference -Naur -- libcairo.normalized/tixbuildinfo libcairo.srctix/tixbuildinfo
--- libcairo.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libcairo.srctix/tixbuildinfo 2013-11-29 15:37:32.018778190 +0100
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libcairo
+pkg.build-libraries=libz bzip2 libpng libfreetype libfontconfig? librsvg? libexpat? libpixman libglib?
+pkg.build-system=configure
+pkg.configure.args=--without-x --disable-valgrind --disable-xlib --enable-xlib=no --enable-xcb=no --enable-xlib-xcb=no --enable-xcb-shm=no --enable-glx=no
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libcurl'
BUILD_LIBRARIES='libz? libssl? libidn? libssh2? librtmp? libmetalink? libpsl?'
VERSION='7.69.0'
DISTNAME='curl-7.69.0'
ARCHIVE='curl-7.69.0.tar.xz'
SHA256SUM='9fadf2f082c127757808a28ddd5ab9d1bc2c7061ca7ddaf85814285e15e3271f'
UPSTREAM_SITE='https://curl.se/download'
UPSTREAM_ARCHIVE='curl-7.69.0.tar.xz'

View File

@ -0,0 +1,3 @@
rm -rf -- 'docs/curl.1'
rm -rf -- 'src/tool_hugehelp.c'
rm -rf -- 'Makefile'

245
ports/libcurl/libcurl.patch Normal file
View File

@ -0,0 +1,245 @@
diff --no-dereference -Naur -- libcurl.normalized/configure libcurl.srctix/configure
--- libcurl.normalized/configure 2020-03-03 09:10:21.000000000 +0100
+++ libcurl.srctix/configure 2021-02-12 21:46:57.168031625 +0100
@@ -20065,9 +20065,7 @@
fi
-if test "$HAVE_GETHOSTBYNAME" != "1"; then
- as_fn_error $? "couldn't find libraries for gethostbyname()" "$LINENO" 5
-fi
+# PATCH: gethostbyname is not actually needed.
curl_includes_winsock2="\
@@ -33676,11 +33674,8 @@
int main (void)
{
-#ifdef h_errno
+ /* PATCH: h_errno has nothing to do with getaddrinfo */
return 0;
-#else
- force compilation error
-#endif
}
@@ -45798,107 +45793,9 @@
-## ---------------------------------- ##
-## Start of distclean amending code ##
-## ---------------------------------- ##
-
-for xc_subdir in lib src tests/unit tests/server tests/libtest docs/examples
-do
-
-if test ! -f "$xc_subdir/Makefile"; then
- echo "$xc_msg_err $xc_subdir/Makefile file not found. $xc_msg_abrt" >&2
- exit 1
-fi
-
-# Fetch dependency tracking file list from Makefile include lines.
-
-xc_inc_lines=`grep '^include .*(DEPDIR)' "$xc_subdir/Makefile" 2>/dev/null`
-xc_cnt_words=`echo "$xc_inc_lines" | wc -w | tr -d "$xc_space$xc_tab"`
-
-# --disable-dependency-tracking might have been used, consequently
-# there is nothing to amend without a dependency tracking file list.
-
-if test $xc_cnt_words -gt 0; then
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: amending $xc_subdir/Makefile" >&5
-$as_echo "$as_me: amending $xc_subdir/Makefile" >&6;}
-
-# Build Makefile specific patch hunk.
-
-xc_p="$xc_subdir/xc_patch.tmp"
-
-xc_rm_depfiles=`echo "$xc_inc_lines" \
- | $SED 's%include% -rm -f%' 2>/dev/null`
-
-xc_dep_subdirs=`echo "$xc_inc_lines" \
- | $SED 's%include[ ][ ]*%%' 2>/dev/null \
- | $SED 's%(DEPDIR)/.*%(DEPDIR)%' 2>/dev/null \
- | sort | uniq`
-
-echo "$xc_rm_depfiles" >$xc_p
-
-for xc_dep_dir in $xc_dep_subdirs; do
- echo "${xc_tab}@xm_dep_cnt=\`ls $xc_dep_dir | wc -l 2>/dev/null\`; \\" >>$xc_p
- echo "${xc_tab}if test \$\$xm_dep_cnt -eq 0 && test -d $xc_dep_dir; then \\" >>$xc_p
- echo "${xc_tab} rm -rf $xc_dep_dir; \\" >>$xc_p
- echo "${xc_tab}fi" >>$xc_p
-done
-
-# Build Makefile patching sed scripts.
-
-xc_s1="$xc_subdir/xc_script_1.tmp"
-xc_s2="$xc_subdir/xc_script_2.tmp"
-xc_s3="$xc_subdir/xc_script_3.tmp"
-
-cat >$xc_s1 <<\_EOT
-/^distclean[ ]*:/,/^[^ ][^ ]*:/{
- s/^.*(DEPDIR)/___xc_depdir_line___/
-}
-/^maintainer-clean[ ]*:/,/^[^ ][^ ]*:/{
- s/^.*(DEPDIR)/___xc_depdir_line___/
-}
-_EOT
-
-cat >$xc_s2 <<\_EOT
-/___xc_depdir_line___$/{
- N
- /___xc_depdir_line___$/D
-}
-_EOT
-
-cat >$xc_s3 <<_EOT
-/^___xc_depdir_line___/{
- r $xc_p
- d
-}
-_EOT
-
-# Apply patch to Makefile and cleanup.
-
-$SED -f "$xc_s1" "$xc_subdir/Makefile" >"$xc_subdir/Makefile.tmp1"
-$SED -f "$xc_s2" "$xc_subdir/Makefile.tmp1" >"$xc_subdir/Makefile.tmp2"
-$SED -f "$xc_s3" "$xc_subdir/Makefile.tmp2" >"$xc_subdir/Makefile.tmp3"
-
-if test -f "$xc_subdir/Makefile.tmp3"; then
- mv -f "$xc_subdir/Makefile.tmp3" "$xc_subdir/Makefile"
-fi
-
-test -f "$xc_subdir/Makefile.tmp1" && rm -f "$xc_subdir/Makefile.tmp1"
-test -f "$xc_subdir/Makefile.tmp2" && rm -f "$xc_subdir/Makefile.tmp2"
-test -f "$xc_subdir/Makefile.tmp3" && rm -f "$xc_subdir/Makefile.tmp3"
-
-test -f "$xc_p" && rm -f "$xc_p"
-test -f "$xc_s1" && rm -f "$xc_s1"
-test -f "$xc_s2" && rm -f "$xc_s2"
-test -f "$xc_s3" && rm -f "$xc_s3"
-
-fi
-
-done
-
-## -------------------------------- ##
-## End of distclean amending code ##
-## -------------------------------- ##
+# PATCH: Removed cursed distclean patching logic that somehow produces distclean
+# targets for me with hundreds of thousands of duplicate rm -f commands.
+# The build seems to work fine without it.
diff --no-dereference -Naur -- libcurl.normalized/docs/Makefile.in libcurl.srctix/docs/Makefile.in
--- libcurl.normalized/docs/Makefile.in 2020-03-03 09:10:21.000000000 +0100
+++ libcurl.srctix/docs/Makefile.in 2020-03-15 21:58:50.916417248 +0100
@@ -461,10 +461,10 @@
# but distribute it (using the relative file name) in the next variable
man_MANS = $(abs_builddir)/curl.1
noinst_man_MANS = curl.1 mk-ca-bundle.1
-dist_man_MANS = curl-config.1
-GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
-PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
-MANDISTPAGES = curl.1.dist curl-config.1.dist
+dist_man_MANS =
+GENHTMLPAGES = curl.html mk-ca-bundle.html
+PDFPAGES = curl.pdf mk-ca-bundle.pdf
+MANDISTPAGES = curl.1.dist
HTMLPAGES = $(GENHTMLPAGES) index.html
# Build targets in this file (.) before cmdline-opts to ensure that
diff --no-dereference -Naur -- libcurl.normalized/include/curl/curl.h libcurl.srctix/include/curl/curl.h
--- libcurl.normalized/include/curl/curl.h 2020-02-29 11:05:27.000000000 +0100
+++ libcurl.srctix/include/curl/curl.h 2020-03-07 23:58:35.601173577 +0100
@@ -68,16 +68,7 @@
#endif
#endif
-/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
- libc5-based Linux systems. Only include it on systems that are known to
- require it! */
-#if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
- defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
- defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
- defined(__CYGWIN__) || \
- (defined(__FreeBSD_version) && (__FreeBSD_version < 800000))
#include <sys/select.h>
-#endif
#if !defined(CURL_WIN32) && !defined(_WIN32_WCE)
#include <sys/socket.h>
diff --no-dereference -Naur -- libcurl.normalized/lib/curl_addrinfo.h libcurl.srctix/lib/curl_addrinfo.h
--- libcurl.normalized/lib/curl_addrinfo.h 2020-02-27 09:32:15.000000000 +0100
+++ libcurl.srctix/lib/curl_addrinfo.h 2020-03-14 00:05:47.841214037 +0100
@@ -71,6 +71,16 @@
Curl_addrinfo **result);
#endif
+#if defined(__sortix__)
+struct hostent
+{
+ char* h_name;
+ char** h_aliases;
+ int h_addrtype;
+ int h_length;
+ char** h_addr_list;
+};
+#endif
Curl_addrinfo *
Curl_he2ai(const struct hostent *he, int port);
diff --no-dereference -Naur -- libcurl.normalized/lib/mprintf.c libcurl.srctix/lib/mprintf.c
--- libcurl.normalized/lib/mprintf.c 2020-02-27 09:32:15.000000000 +0100
+++ libcurl.srctix/lib/mprintf.c 2020-03-08 00:00:08.794972303 +0100
@@ -946,7 +946,7 @@
/* NOTE NOTE NOTE!! Not all sprintf implementations return number of
output characters */
- (sprintf)(work, formatbuf, p->data.dnum);
+ (snprintf)(work, sizeof(work), formatbuf, p->data.dnum);
DEBUGASSERT(strlen(work) <= sizeof(work));
for(fptr = work; *fptr; fptr++)
OUTCHAR(*fptr);
diff --no-dereference -Naur -- libcurl.normalized/Makefile.in libcurl.srctix/Makefile.in
--- libcurl.normalized/Makefile.in 2020-03-04 07:40:47.000000000 +0100
+++ libcurl.srctix/Makefile.in 2020-03-15 21:58:50.920417157 +0100
@@ -652,7 +652,7 @@
$(VC11_LIBVCXPROJ) $(VC11_SRCVCXPROJ) $(VC12_LIBVCXPROJ) $(VC12_SRCVCXPROJ) \
$(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) $(VC15_LIBVCXPROJ) $(VC15_SRCVCXPROJ)
-bin_SCRIPTS = curl-config
+bin_SCRIPTS =
SUBDIRS = lib src
DIST_SUBDIRS = $(SUBDIRS) tests packages scripts include docs
pkgconfigdir = $(libdir)/pkgconfig
@@ -1285,6 +1285,12 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
+ -rm -f docs/cmdline-opts/Makefile
+ -rm -rf docs/examples/.deps
+ -rm -f docs/examples/Makefile
+ -rm -f docs/libcurl/Makefile
+ -rm -f docs/libcurl/opts/Makefile
+ -rm -f docs/Makefile
distclean-am: clean-am distclean-generic distclean-libtool \
distclean-tags
diff --no-dereference -Naur -- libcurl.normalized/tixbuildinfo libcurl.srctix/tixbuildinfo
--- libcurl.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libcurl.srctix/tixbuildinfo 2020-03-08 01:09:46.177301944 +0100
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libcurl
+pkg.build-libraries=libz? libssl? libidn? libssh2? librtmp? libmetalink? libpsl?
+pkg.build-system=configure
+pkg.configure.args=--with-ca-bundle=/etc/ssl/cert.pem --with-ca-path=/etc/ssl/certs
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libcurses'
BUILD_LIBRARIES=''
VERSION='0.1.0'
DISTNAME='netbsd-curses-0.1.0'
ARCHIVE='netbsd-curses-0.1.0.tar.xz'
SHA256SUM='bea4a945c8d0ec6e923bb43882b1d261c544601c3510b73818a6c431dec7756a'
UPSTREAM_SITE='https://github.com/sabotage-linux/netbsd-curses/releases/download/v0.1.0'
UPSTREAM_ARCHIVE='netbsd-curses-0.1.0.tar.xz'

View File

@ -0,0 +1,914 @@
diff --no-dereference -Naur -- libcurses.normalized/GNUmakefile libcurses.srctix/GNUmakefile
--- libcurses.normalized/GNUmakefile 2016-09-19 20:32:44.000000000 +0200
+++ libcurses.srctix/GNUmakefile 2021-04-17 12:33:06.598068033 +0200
@@ -1,4 +1,5 @@
-HOSTCC ?= $(CC)
+CC_FOR_BUILD ?= $(CC)
+HOSTCC ?= $(CC_FOR_BUILD)
AWK ?= awk
AR ?= ar
RANLIB ?= ranlib
@@ -11,13 +12,15 @@
PIC = -fPIC
-PREFIX=/usr/local
-BINDIR=$(PREFIX)/bin
-LIBDIR=$(PREFIX)/lib
-INCDIR=$(PREFIX)/include
-MANDIR=$(PREFIX)/share/man
-MAN1DIR=$(MANDIR)/man1
-MAN3DIR=$(MANDIR)/man3
+PREFIX?=/usr/local
+EXEC_PREFIX?=$(PREFIX)
+BINDIR?=$(EXEC_PREFIX)/bin
+LIBDIR?=$(EXEC_PREFIX)/lib
+INCLUDEDIR?=$(PREFIX)/include
+INCDIR?=$(INCLUDEDIR)
+MANDIR?=$(PREFIX)/share/man
+MAN1DIR?=$(MANDIR)/man1
+MAN3DIR?=$(MANDIR)/man3
-include config.mak
@@ -40,6 +43,7 @@
else
STATIC_BINS=0
endif
+STATIC_BINS=1
CFLAGS+=-Werror-implicit-function-declaration
CPPFLAGS+= -I. -I./libterminfo
@@ -166,7 +170,8 @@
TI_LINKLIB=$(TI_LIBA)
endif
-all: $(STALIBS) $(DYNLIBS) $(PROGS)
+#all: $(STALIBS) $(DYNLIBS) $(PROGS)
+all: all-static
all-static: $(STALIBS) $(PROGS)
@@ -181,7 +186,7 @@
install-tput: tput/tput tput/clear.sh
$(INSTALL) -Dm 755 tput/tput $(DESTDIR)$(BINDIR)/tput
- $(INSTALL) -Dm 755 tput/clear.sh $(DESTDIR)$(BINDIR)/clear
+ #$(INSTALL) -Dm 755 tput/clear.sh $(DESTDIR)$(BINDIR)/clear
install-infocmp: infocmp/infocmp
$(INSTALL) -Dm 755 infocmp/infocmp $(DESTDIR)$(BINDIR)/infocmp
@@ -257,7 +262,8 @@
$(LN) -sf $(notdir $<) $(DESTDIR)$(LIBDIR)/$(basename $(notdir $<))w$(SO_SUFFIX)
install-dynlibs: install-dynlib-terminfo install-dynlib-curses install-dynlib-panel install-dynlib-menu install-dynlib-form
-install-libs: install-stalibs install-dynlibs
+#install-libs: install-stalibs install-dynlibs
+install-libs: install-stalibs
install-pc-dir:
$(MKDIR) -p $(DESTDIR)$(LIBDIR)/pkgconfig
@@ -329,7 +335,15 @@
install-manpages: install-prog-manpages install-lib-manpages
-install: install-headers install-libs install-progs install-pcs install-manpages
+install-terminfo: $(TOOL_HOSTTIC)
+ cat terminfo/terminfo terminfo/sortix.terminfo > $(DESTDIR)$(PREFIX)/share/terminfo.tmp
+ $(TOOL_HOSTTIC) -x -o $(DESTDIR)$(PREFIX)/share/terminfo.cdb $(DESTDIR)$(PREFIX)/share/terminfo.tmp
+ rm -f $(DESTDIR)$(PREFIX)/share/terminfo.tmp
+ mkdir -p $(DESTDIR)$(PREFIX)/share/terminfo
+ mkdir -p $(DESTDIR)$(PREFIX)/share/terminfo/s
+ cp terminfo/sortix.terminfo $(DESTDIR)$(PREFIX)/share/terminfo/s/sortix.terminfo
+
+install: install-headers install-libs install-progs install-pcs install-manpages install-terminfo
install-static: install-headers install-progs install-pcs install-stalibs
install-dynamic: TI_LINKLIB=$(TI_LIBSO)
@@ -549,4 +563,4 @@
install-man-infocmp install-man-tabs install-prog-manpages \
install-man-terminfo install-man-curses install-man-panel \
install-man-menu install-man-form install-lib-manpages \
- install-manpages
+ install-manpages install-terminfo
diff --no-dereference -Naur -- libcurses.normalized/libcurses/acs.c libcurses.srctix/libcurses/acs.c
--- libcurses.normalized/libcurses/acs.c 2016-09-19 20:32:44.000000000 +0200
+++ libcurses.srctix/libcurses/acs.c 2016-09-22 17:13:59.838961538 +0200
@@ -38,7 +38,9 @@
#ifdef HAVE_WCHAR
#include <assert.h>
#include <locale.h>
+#if !defined(__sortix__) || (defined(__has_include) && __has_include(<langinfo.h>))
#include <langinfo.h>
+#endif
#include <strings.h>
cchar_t _wacs_char[ NUM_ACS ];
@@ -156,7 +158,11 @@
/* Add the SUSv2 defaults (those that are not '+') */
if (!strcmp(setlocale(LC_CTYPE, NULL), "C"))
setlocale(LC_CTYPE, "");
+#if !defined(__sortix__) || (defined(__has_include) && __has_include(<langinfo.h>))
lstr = nl_langinfo(CODESET);
+#else
+ lstr = "UTF-8";
+#endif
_DIAGASSERT(lstr);
if (strcasecmp(lstr, "UTF-8")) {
#ifdef DEBUG
diff --no-dereference -Naur -- libcurses.normalized/libcurses/color.c libcurses.srctix/libcurses/color.c
--- libcurses.normalized/libcurses/color.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/color.c 2016-09-22 17:16:32.339236641 +0200
@@ -35,6 +35,8 @@
#include "curses.h"
#include "curses_private.h"
+typedef uint32_t u_int32_t;
+
/* Have we initialised colours? */
int __using_color = 0;
diff --no-dereference -Naur -- libcurses.normalized/libcurses/cur_hash.c libcurses.srctix/libcurses/cur_hash.c
--- libcurses.normalized/libcurses/cur_hash.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/cur_hash.c 2016-09-22 17:16:56.358649955 +0200
@@ -36,6 +36,8 @@
#include "curses.h"
#include "curses_private.h"
+typedef unsigned int u_int;
+
/*
* __hash_more() is "hashpjw" from the Dragon Book, Aho, Sethi & Ullman, p.436.
*/
diff --no-dereference -Naur -- libcurses.normalized/libcurses/get_wch.c libcurses.srctix/libcurses/get_wch.c
--- libcurses.normalized/libcurses/get_wch.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/get_wch.c 2016-09-26 00:20:56.031555456 +0200
@@ -44,6 +44,35 @@
#include "curses_private.h"
#include "keymap.h"
+#ifdef __sortix__
+#include <errno.h>
+#include <stdio_ext.h>
+static wint_t getwchar(void)
+{
+ mbstate_t ps = { 0 };
+ wchar_t wc;
+ while (1) {
+ int ic = getchar();
+ if (ic == EOF) {
+ if (!mbsinit(&ps)) {
+ errno = EILSEQ;
+ __fseterr(stdin);
+ }
+ return WEOF;
+ }
+ char c = ic;
+ size_t bytes = mbrtowc(&wc, &c, 1, &ps);
+ if (bytes == (size_t) -1) {
+ __fseterr(stdin);
+ return WEOF;
+ }
+ if (bytes == (size_t) -2)
+ continue;
+ return wc;
+ }
+}
+#endif
+
#ifdef HAVE_WCHAR
static short wstate; /* state of the wcinkey function */
#endif /* HAVE_WCHAR */
diff --no-dereference -Naur -- libcurses.normalized/libcurses/putchar.c libcurses.srctix/libcurses/putchar.c
--- libcurses.normalized/libcurses/putchar.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/putchar.c 2016-09-22 17:22:39.490268792 +0200
@@ -31,6 +31,8 @@
#include <netbsd_sys/cdefs.h>
+#include <stdlib.h>
+
#include "curses.h"
#include "curses_private.h"
@@ -68,7 +70,18 @@
#ifdef DEBUG
__CTRACE(__CTRACE_OUTPUT, "__cputwchar: 0x%x\n", wch);
#endif
+#ifdef __sortix__
+ mbstate_t ps = { 0 };
+ char mb[MB_CUR_MAX];
+ size_t bytes = wcrtomb(mb, wch, &ps);
+ if (bytes == (size_t) -1)
+ return WEOF;
+ if (fwrite(mb, bytes, 1, _cursesi_screen->outfd) != 1)
+ return WEOF;
+ return wch;
+#else
return (putwc(wch, _cursesi_screen->outfd));
+#endif
}
/*
@@ -85,6 +98,17 @@
__CTRACE(__CTRACE_OUTPUT, "__cputwchar_args: 0x%x on fd %d\n",
wch, outfd->_file);
#endif
+#ifdef __sortix__
+ mbstate_t ps = { 0 };
+ char mb[MB_CUR_MAX];
+ size_t bytes = wcrtomb(mb, wch, &ps);
+ if (bytes == (size_t) -1)
+ return WEOF;
+ if (fwrite(mb, bytes, 1, outfd) != 1)
+ return WEOF;
+ return wch;
+#else
return putwc(wch, outfd);
+#endif
}
#endif /* HAVE_WCHAR */
diff --no-dereference -Naur -- libcurses.normalized/libcurses/refresh.c libcurses.srctix/libcurses/refresh.c
--- libcurses.normalized/libcurses/refresh.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/refresh.c 2016-09-26 00:01:58.146922750 +0200
@@ -37,6 +37,8 @@
#include "curses.h"
#include "curses_private.h"
+typedef unsigned int u_int;
+
static void domvcur(int, int, int, int);
static int makech(int);
static void quickch(void);
diff --no-dereference -Naur -- libcurses.normalized/libcurses/tty.c libcurses.srctix/libcurses/tty.c
--- libcurses.normalized/libcurses/tty.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libcurses/tty.c 2016-09-26 00:02:59.782673514 +0200
@@ -63,6 +63,10 @@
#endif
#endif
+#ifndef ONLCR
+#define ONLCR 0
+#endif
+
/*
* baudrate --
* Return the current baudrate
diff --no-dereference -Naur -- libcurses.normalized/libform/field.c libcurses.srctix/libform/field.c
--- libcurses.normalized/libform/field.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libform/field.c 2016-09-26 00:04:45.575320379 +0200
@@ -31,7 +31,6 @@
#include <string.h>
#include <stdlib.h>
#include <netbsd_sys/cdefs.h>
-#include <sys/param.h>
#include <stdlib.h>
#include <strings.h>
#include <stdarg.h>
diff --no-dereference -Naur -- libcurses.normalized/libform/type_ipv4.c libcurses.srctix/libform/type_ipv4.c
--- libcurses.normalized/libform/type_ipv4.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libform/type_ipv4.c 2016-09-26 00:25:06.068730281 +0200
@@ -79,7 +79,7 @@
hex_val = 0;
mask = 0;
- if ((slash = index(buf, '/')) != NULL)
+ if ((slash = strchr(buf, '/')) != NULL)
style = FORMI_CLASSLESS;
else {
start = _formi_skip_blanks(buf, 0);
diff --no-dereference -Naur -- libcurses.normalized/libterminfo/cdbr.c libcurses.srctix/libterminfo/cdbr.c
--- libcurses.normalized/libterminfo/cdbr.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libterminfo/cdbr.c 2018-07-15 20:28:16.428516854 +0200
@@ -59,6 +59,8 @@
#define malloc(size) kmem_alloc(size, KM_SLEEP)
#define free(ptr) kmem_free(ptr, sizeof(struct cdbr))
#else
+/* TODO: Sortix <limits.h> doesn't define everything it should. */
+#include <sys/types.h>
#include <sys/mman.h>
#include <netbsd_sys/cdbr.h>
#include <errno.h>
@@ -142,7 +144,7 @@
size = (size_t)sb.st_size;
- base = mmap(NULL, size, PROT_READ, MAP_FILE|MAP_SHARED, fd, 0);
+ base = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
close(fd);
if (base == MAP_FAILED)
diff --no-dereference -Naur -- libcurses.normalized/libterminfo/term.c libcurses.srctix/libterminfo/term.c
--- libcurses.normalized/libterminfo/term.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libterminfo/term.c 2016-09-22 17:15:50.776251838 +0200
@@ -52,6 +52,11 @@
#endif
#endif
+/* TODO: Hack. */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
static char database[PATH_MAX];
static char pathbuf[PATH_MAX];
const char *_ti_database;
diff --no-dereference -Naur -- libcurses.normalized/libterminfo/tparm.c libcurses.srctix/libterminfo/tparm.c
--- libcurses.normalized/libterminfo/tparm.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/libterminfo/tparm.c 2016-09-26 00:10:57.072944315 +0200
@@ -28,11 +28,11 @@
*/
#include <netbsd_sys/cdefs.h>
-#include <sys/param.h>
#include <assert.h>
#include <ctype.h>
#include <errno.h>
+#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
diff --no-dereference -Naur -- libcurses.normalized/netbsd_sys/cdefs.h libcurses.srctix/netbsd_sys/cdefs.h
--- libcurses.normalized/netbsd_sys/cdefs.h 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/netbsd_sys/cdefs.h 2016-09-22 17:36:33.581895682 +0200
@@ -60,5 +60,10 @@
#define __predict_false(exp) (exp)
#endif
+#if defined(__sortix__)
+#define bcopy(src, dest, size) memcpy(dest, src, size)
+#endif
+#define MAX(a,b) (((a)>(b))?(a):(b))
+
#endif
diff --no-dereference -Naur -- libcurses.normalized/terminfo/sortix.terminfo libcurses.srctix/terminfo/sortix.terminfo
--- libcurses.normalized/terminfo/sortix.terminfo 1970-01-01 01:00:00.000000000 +0100
+++ libcurses.srctix/terminfo/sortix.terminfo 2016-09-25 22:26:42.917261769 +0200
@@ -0,0 +1,230 @@
+# TODO: Decode setab and setaf and see if they are what I want.
+# TODO: Implement BEL \a and add bel=^G,
+# TODO: Add blink support and add blink=\E[5m,
+# TODO: Add backtab support and add cbt=\E[Z, and kcbt=\E[Z,
+# TODO: Support csr=\E[%i%p1%d;%p2%dr,
+# TODO: Support dch=\E[%p1%dP,
+# TODO: dch1=\E[P,
+# TODO: Add faint support and add dim=\E[2m,
+# TODO: dl1=\E[M,
+# TODO: ech=\E[%p1%dX,
+# TODO: hts=\EH,
+# TODO: ich=\E[%p1%d@,
+# TODO: il=\E[%p1%dL,
+# TODO: il1=\E[L,
+# TODO: invis=\E[8m,
+# TODO: Some modifiers for the function keys are missing, like control + alt +
+# shift + f12, kfxx should probably go up to 96. On the other hand,
+# control-alt-fxx switches virtual terminals.
+# TODO: Sequences for key pad presses (with numlock off) such as kb2
+# TODO: Sequences for backspace with modifiers (kbs)?
+# TODO: Support mouse event kmous=\E[M,
+# TODO: Add italicized support sitm=\E[3m, ritm=\E[23m,
+# TODO: rmkx=\E[?1l\E>,
+# TODO: smkx=\E[?1h\E=,
+
+sortix-16color|Sortix with 16 colors,
+ am,
+ bce,
+ km,
+ mc5i,
+ msgr,
+ npc,
+ xenl,
+ colors#16,
+ cols#80,
+ it#8,
+ lines#25,
+ pairs#256,
+ bold=\E[1m,
+ civis=\E[?25l,
+ clear=\E[H\E[2J,
+ cnorm=\E[?25h,
+ cr=^M,
+ cub1=\E[D,
+ cub=\E[%p1%dD,
+ cud1=^J,
+ cud=\E[%p1%dB,
+ cuf1=\E[C,
+ cuf=\E[%p1%dC,
+ cup=\E[%i%p1%d;%p2%dH,
+ cuu1=\E[A,
+ cuu=\E[%p1%dA,
+ ed=\E[J,
+ el1=\E[1K,
+ el=\E[K,
+ home=\E[H,
+ hpa=\E[%i%p1%dG,
+ ht=^I,
+ ind=^J,
+ indn=\E[%p1%dS,
+ nel=^J,
+ op=\E[39;49m,
+ rc=\E[u,
+ rev=\E[7m,
+ ri=\E[T,
+ rin=\E[%p1%dT,
+ rmcup=\E[?1049l,
+ rmso=\E[27m,
+ sc=\E[s,
+ setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
+ setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
+ sgr0=\E[m,
+ sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
+ smcup=\E[?1049h,
+ smso=\E[7m,
+ vpa=\E[%i%p1%dd,
+ kbs=\177,
+ kcub1=\E[D,
+ kLFT=\E[1;2D,
+ kLFT3=\E[1;3D,
+ kLFT4=\E[1;4D,
+ kLFT5=\E[1;5D,
+ kLFT6=\E[1;6D,
+ kLFT7=\E[1;7D,
+ kLFT8=\E[1;8D,
+ kcud1=\E[B,
+ kDN=\E[1;2B,
+ kDN3=\E[1;3B,
+ kDN4=\E[1;4B,
+ kDN5=\E[1;5B,
+ kDN6=\E[1;6B,
+ kDN7=\E[1;7B,
+ kDN8=\E[1;8B,
+ kcuf1=\E[C,
+ kRIT=\E[1;2C,
+ kRIT3=\E[1;3C,
+ kRIT4=\E[1;4C,
+ kRIT5=\E[1;5C,
+ kRIT6=\E[1;6C,
+ kRIT7=\E[1;7C,
+ kRIT8=\E[1;8C,
+ kcuu1=\E[A,
+ kUP=\E[1;2A,
+ kUP3=\E[1;3A,
+ kUP4=\E[1;4A,
+ kUP5=\E[1;5A,
+ kUP6=\E[1;6A,
+ kUP7=\E[1;7A,
+ kUP8=\E[1;8A,
+ kdch1=\E[3~,
+ kDC=\E[3;2~,
+ kDC3=\E[3;3~,
+ kDC4=\E[3;4~,
+ kDC5=\E[3;5~,
+ kDC6=\E[3;6~,
+ kDC7=\E[3;7~,
+ kDC8=\E[3;8~,
+ kend=\E[F,
+ kEND=\E[1;2F,
+ kEND3=\E[1;3F,
+ kEND4=\E[1;4F,
+ kEND5=\E[1;5F,
+ kEND6=\E[1;6F,
+ kEND7=\E[1;7F,
+ kEND8=\E[1;8F,
+ kent=\E0M,
+ kf1=\EOP,
+ kf2=\EOQ,
+ kf3=\EOR,
+ kf4=\EOS,
+ kf5=\E[15~,
+ kf6=\E[17~,
+ kf7=\E[18~,
+ kf8=\E[19~,
+ kf9=\E[20~,
+ kf10=\E[21~,
+ kf11=\E[23~,
+ kf12=\E[24~,
+ kf13=\E[1;2P,
+ kf14=\E[1;2Q,
+ kf15=\E[1;2R,
+ kf16=\E[1;2S,
+ kf17=\E[15;2~,
+ kf18=\E[17;2~,
+ kf19=\E[18;2~,
+ kf20=\E[19;2~,
+ kf21=\E[20;2~,
+ kf22=\E[21;2~,
+ kf23=\E[23;2~,
+ kf24=\E[24;2~,
+ kf25=\E[1;5P,
+ kf26=\E[1;5Q,
+ kf27=\E[1;5R,
+ kf28=\E[1;5S,
+ kf29=\E[15;5~,
+ kf30=\E[17;5~,
+ kf31=\E[18;5~,
+ kf32=\E[19;5~,
+ kf33=\E[20;5~,
+ kf34=\E[21;5~,
+ kf35=\E[23;5~,
+ kf36=\E[24;5~,
+ kf37=\E[1;6P,
+ kf38=\E[1;6Q,
+ kf39=\E[1;6R,
+ kf40=\E[1;6S,
+ kf41=\E[15;6~,
+ kf42=\E[17;6~,
+ kf43=\E[18;6~,
+ kf44=\E[19;6~,
+ kf45=\E[20;6~,
+ kf46=\E[21;6~,
+ kf47=\E[23;6~,
+ kf48=\E[24;6~,
+ kf49=\E[1;3P,
+ kf50=\E[1;3Q,
+ kf51=\E[1;3R,
+ kf52=\E[1;3S,
+ kf53=\E[15;3~,
+ kf54=\E[17;3~,
+ kf55=\E[18;3~,
+ kf56=\E[19;3~,
+ kf57=\E[20;3~,
+ kf58=\E[21;3~,
+ kf59=\E[23;3~,
+ kf60=\E[24;3~,
+ kf61=\E[1;4P,
+ kf62=\E[1;4Q,
+ kf63=\E[1;4R,
+ khome=\E[H,
+ kHOM=\E[1;2H,
+ kHOM3=\E[1;3H,
+ kHOM4=\E[1;4H,
+ kHOM5=\E[1;5H,
+ kHOM6=\E[1;6H,
+ kHOM7=\E[1;7H,
+ kHOM8=\E[1;8H,
+ kich1=\E[2~,
+ kIC=\E[2;2~,
+ kIC3=\E[2;3~,
+ kIC4=\E[2;4~,
+ kIC5=\E[2;5~,
+ kIC6=\E[2;6~,
+ kIC7=\E[2;7~,
+ kIC8=\E[2;8~,
+ kind=\E[1;2B,
+ knp=\E[6~,
+ kNXT=\E[6;2~,
+ kNXT3=\E[6;3~,
+ kNXT4=\E[6;4~,
+ kNXT5=\E[6;5~,
+ kNXT6=\E[6;6~,
+ kNXT7=\E[6;7~,
+ kNXT8=\E[6;8~,
+ kpp=\E[5~,
+ kPRV=\E[5;2~,
+ kPRV3=\E[5;3~,
+ kPRV4=\E[5;4~,
+ kPRV5=\E[5;5~,
+ kPRV6=\E[5;6~,
+ kPRV7=\E[5;7~,
+ kPRV8=\E[5;8~,
+ kri=\E[1;2A,
+
+sortix|Sortix,
+ use=sortix-16color,
+ colors#256,
+ pairs#32767,
+ smul=\E[4m,
+ rmul=\E[24m,
diff --no-dereference -Naur -- libcurses.normalized/tic/musl-hsearch.c libcurses.srctix/tic/musl-hsearch.c
--- libcurses.normalized/tic/musl-hsearch.c 1970-01-01 01:00:00.000000000 +0100
+++ libcurses.srctix/tic/musl-hsearch.c 2016-09-22 17:55:07.993368689 +0200
@@ -0,0 +1,149 @@
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <string.h>
+
+/*
+open addressing hash table with 2^n table size
+quadratic probing is used in case of hash collision
+tab indices and hash are size_t
+after resize fails with ENOMEM the state of tab is still usable
+
+with the posix api items cannot be iterated and length cannot be queried
+*/
+
+#define MINSIZE 8
+#define MAXSIZE ((size_t)-1/2 + 1)
+
+struct __tab {
+ ENTRY *entries;
+ size_t mask;
+ size_t used;
+};
+
+static struct hsearch_data htab;
+
+int __hcreate_r(size_t, struct hsearch_data *);
+void __hdestroy_r(struct hsearch_data *);
+int __hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
+
+static size_t keyhash(char *k)
+{
+ unsigned char *p = (void *)k;
+ size_t h = 0;
+
+ while (*p)
+ h = 31*h + *p++;
+ return h;
+}
+
+static int resize(size_t nel, struct hsearch_data *htab)
+{
+ size_t newsize;
+ size_t i, j;
+ ENTRY *e, *newe;
+ ENTRY *oldtab = htab->__tab->entries;
+ ENTRY *oldend = htab->__tab->entries + htab->__tab->mask + 1;
+
+ if (nel > MAXSIZE)
+ nel = MAXSIZE;
+ for (newsize = MINSIZE; newsize < nel; newsize *= 2);
+ htab->__tab->entries = calloc(newsize, sizeof *htab->__tab->entries);
+ if (!htab->__tab->entries) {
+ htab->__tab->entries = oldtab;
+ return 0;
+ }
+ htab->__tab->mask = newsize - 1;
+ if (!oldtab)
+ return 1;
+ for (e = oldtab; e < oldend; e++)
+ if (e->key) {
+ for (i=keyhash(e->key),j=1; ; i+=j++) {
+ newe = htab->__tab->entries + (i & htab->__tab->mask);
+ if (!newe->key)
+ break;
+ }
+ *newe = *e;
+ }
+ free(oldtab);
+ return 1;
+}
+
+int hcreate(size_t nel)
+{
+ return __hcreate_r(nel, &htab);
+}
+
+void hdestroy(void)
+{
+ __hdestroy_r(&htab);
+}
+
+static ENTRY *lookup(char *key, size_t hash, struct hsearch_data *htab)
+{
+ size_t i, j;
+ ENTRY *e;
+
+ for (i=hash,j=1; ; i+=j++) {
+ e = htab->__tab->entries + (i & htab->__tab->mask);
+ if (!e->key || strcmp(e->key, key) == 0)
+ break;
+ }
+ return e;
+}
+
+ENTRY *hsearch(ENTRY item, ACTION action)
+{
+ ENTRY *e;
+
+ __hsearch_r(item, action, &e, &htab);
+ return e;
+}
+
+int __hcreate_r(size_t nel, struct hsearch_data *htab)
+{
+ int r;
+
+ htab->__tab = calloc(1, sizeof *htab->__tab);
+ if (!htab->__tab)
+ return 0;
+ r = resize(nel, htab);
+ if (r == 0) {
+ free(htab->__tab);
+ htab->__tab = 0;
+ }
+ return r;
+}
+
+void __hdestroy_r(struct hsearch_data *htab)
+{
+ if (htab->__tab) free(htab->__tab->entries);
+ free(htab->__tab);
+ htab->__tab = 0;
+}
+
+int __hsearch_r(ENTRY item, ACTION action, ENTRY **retval, struct hsearch_data *htab)
+{
+ size_t hash = keyhash(item.key);
+ ENTRY *e = lookup(item.key, hash, htab);
+
+ if (e->key) {
+ *retval = e;
+ return 1;
+ }
+ if (action == FIND) {
+ *retval = 0;
+ return 0;
+ }
+ *e = item;
+ if (++htab->__tab->used > htab->__tab->mask - htab->__tab->mask/4) {
+ if (!resize(2*htab->__tab->used, htab)) {
+ htab->__tab->used--;
+ e->key = 0;
+ *retval = 0;
+ return 0;
+ }
+ e = lookup(item.key, hash, htab);
+ }
+ *retval = e;
+ return 1;
+}
diff --no-dereference -Naur -- libcurses.normalized/tic/musl-search.h libcurses.srctix/tic/musl-search.h
--- libcurses.normalized/tic/musl-search.h 1970-01-01 01:00:00.000000000 +0100
+++ libcurses.srctix/tic/musl-search.h 2016-09-22 17:53:33.307681435 +0200
@@ -0,0 +1,60 @@
+#ifndef _SEARCH_H
+#define _SEARCH_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum { FIND, ENTER } ACTION;
+typedef enum { preorder, postorder, endorder, leaf } VISIT;
+
+typedef struct entry {
+ char *key;
+ void *data;
+} ENTRY;
+
+int hcreate(size_t);
+void hdestroy(void);
+ENTRY *hsearch(ENTRY, ACTION);
+
+#ifdef _GNU_SOURCE
+struct hsearch_data {
+ struct __tab *__tab;
+ unsigned int __unused1;
+ unsigned int __unused2;
+};
+
+int hcreate_r(size_t, struct hsearch_data *);
+void hdestroy_r(struct hsearch_data *);
+int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
+#endif
+
+void insque(void *, void *);
+void remque(void *);
+
+void *lsearch(const void *, void *, size_t *, size_t,
+ int (*)(const void *, const void *));
+void *lfind(const void *, const void *, size_t *, size_t,
+ int (*)(const void *, const void *));
+
+void *tdelete(const void *__restrict, void **__restrict, int(*)(const void *, const void *));
+void *tfind(const void *, void *const *, int(*)(const void *, const void *));
+void *tsearch(const void *, void **, int (*)(const void *, const void *));
+void twalk(const void *, void (*)(const void *, VISIT, int));
+
+#ifdef _GNU_SOURCE
+struct qelem {
+ struct qelem *q_forw, *q_back;
+ char q_data[1];
+};
+
+void tdestroy(void *, void (*)(void *));
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --no-dereference -Naur -- libcurses.normalized/tic/tic.c libcurses.srctix/tic/tic.c
--- libcurses.normalized/tic/tic.c 2016-09-19 20:32:45.000000000 +0200
+++ libcurses.srctix/tic/tic.c 2016-09-26 00:13:41.714799928 +0200
@@ -49,7 +49,12 @@
#include <getopt.h>
#include <limits.h>
#include <fcntl.h>
+#if !defined(__sortix__) || (defined(__has_include) && __has_include(<search.h>))
#include <search.h>
+#else
+#include "musl-search.h"
+#include "musl-hsearch.c"
+#endif
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
diff --no-dereference -Naur -- libcurses.normalized/tixbuildinfo libcurses.srctix/tixbuildinfo
--- libcurses.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libcurses.srctix/tixbuildinfo 2016-09-22 20:36:21.056358217 +0200
@@ -0,0 +1,5 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libcurses
+pkg.build-libraries=
+pkg.build-system=makefile
diff --no-dereference -Naur -- libcurses.normalized/tset/map.c libcurses.srctix/tset/map.c
--- libcurses.normalized/tset/map.c 2016-09-19 20:32:46.000000000 +0200
+++ libcurses.srctix/tset/map.c 2016-09-22 17:35:16.059789199 +0200
@@ -73,7 +73,7 @@
char *copy, *p, *termp;
copy = strdup(arg);
- mapp = malloc((u_int)sizeof(MAP));
+ mapp = malloc(sizeof(MAP));
if (copy == NULL || mapp == NULL)
err(1, "malloc");
mapp->next = NULL;
diff --no-dereference -Naur -- libcurses.normalized/tset/set.c libcurses.srctix/tset/set.c
--- libcurses.normalized/tset/set.c 2016-09-19 20:32:46.000000000 +0200
+++ libcurses.srctix/tset/set.c 2016-09-26 00:15:06.994179802 +0200
@@ -36,7 +36,39 @@
#include <term.h>
#include <termios.h>
#include <unistd.h>
+#if !defined(__sortix__) || (defined(__has_include) && __has_include(<sys/ttydefaults.h>))
#include <sys/ttydefaults.h>
+#else
+#define CTRL(x) (x&037)
+#define CEOF CTRL('d')
+
+#ifdef _POSIX_VDISABLE
+#define CEOL _POSIX_VDISABLE
+#define CSTATUS _POSIX_VDISABLE
+#else
+#define CEOL '\0'
+#define CSTATUS '\0'
+#endif
+
+#define CERASE 0177
+#define CINTR CTRL('c')
+#define CKILL CTRL('u')
+#define CMIN 1
+#define CQUIT 034
+#define CSUSP CTRL('z')
+#define CTIME 0
+#define CDSUSP CTRL('y')
+#define CSTART CTRL('q')
+#define CSTOP CTRL('s')
+#define CLNEXT CTRL('v')
+#define CDISCARD CTRL('o')
+#define CWERASE CTRL('w')
+#define CREPRINT CTRL('r')
+#define CEOT CEOF
+#define CBRK CEOL
+#define CRPRNT CREPRINT
+#define CFLUSH CDISCARD
+#endif
#include "extern.h"
#ifndef OXTABS
#define OXTABS 0
diff --no-dereference -Naur -- libcurses.normalized/tset/tset.c libcurses.srctix/tset/tset.c
--- libcurses.normalized/tset/tset.c 2016-09-19 20:32:46.000000000 +0200
+++ libcurses.srctix/tset/tset.c 2016-09-23 03:09:41.326919674 +0200
@@ -35,7 +35,14 @@
#include <sys/types.h>
#include <sys/ioctl.h>
+#if !defined(__sortix__) || (defined(__has_include) && __has_include(<sys/ttydefaults.h>))
#include <sys/ttydefaults.h>
+#else
+#define CTRL(x) (x&037)
+#define CERASE 0177
+#define CKILL CTRL('u')
+#define CINTR CTRL('c')
+#endif
#include <ctype.h>
#include <err.h>
#include <errno.h>
@@ -47,6 +54,8 @@
#include <unistd.h>
#include "extern.h"
+typedef unsigned int u_int;
+
static void obsolete(char *[]);
static void report(const char *, int, u_int);
__dead static void usage(char*);
@@ -167,7 +176,10 @@
nlines > 0 && columns > 0) {
win.ws_row = nlines;
win.ws_col = ncolumns;
+/* TODO: Remove after TIOCSWINSZ has been merged to Sortix master. */
+#ifdef TIOCSWINSZ
(void)ioctl(STDERR_FILENO, TIOCSWINSZ, &win);
+#endif
}
#endif
set_control_chars(erasechar, intrchar, killchar);

View File

@ -0,0 +1,8 @@
NAME='libdbus'
BUILD_LIBRARIES='libexpat'
VERSION='1.6.8'
DISTNAME='dbus-1.6.8'
ARCHIVE='dbus-1.6.8.tar.gz'
SHA256SUM='fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac'
UPSTREAM_SITE='https://dbus.freedesktop.org/releases/dbus'
UPSTREAM_ARCHIVE='dbus-1.6.8.tar.gz'

189
ports/libdbus/libdbus.patch Normal file
View File

@ -0,0 +1,189 @@
diff --no-dereference -Naur -- libdbus.normalized/bus/activation-helper.c libdbus.srctix/bus/activation-helper.c
--- libdbus.normalized/bus/activation-helper.c 2012-09-28 21:17:25.000000000 +0200
+++ libdbus.srctix/bus/activation-helper.c 2013-04-09 23:03:06.511267145 +0200
@@ -43,6 +43,10 @@
#include <dbus/dbus-shell.h>
#include <dbus/dbus-marshal-validate.h>
+#if defined(__sortix__)
+#define initgroups(a, b) 0
+#endif
+
static BusDesktopFile *
desktop_file_for_name (BusConfigParser *parser,
const char *name,
diff --no-dereference -Naur -- libdbus.normalized/bus/Makefile.in libdbus.srctix/bus/Makefile.in
--- libdbus.normalized/bus/Makefile.in 2012-09-28 21:45:15.000000000 +0200
+++ libdbus.srctix/bus/Makefile.in 2018-05-07 23:58:50.871856426 +0200
@@ -1510,7 +1510,6 @@
/bin/rm *.bb *.bbg *.da *.gcov || true
install-data-hook:
- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
$(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
$(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
$(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
diff --no-dereference -Naur -- libdbus.normalized/config.sub libdbus.srctix/config.sub
--- libdbus.normalized/config.sub 2012-09-18 04:53:51.000000000 +0200
+++ libdbus.srctix/config.sub 2013-04-09 21:25:07.251134290 +0200
@@ -1342,7 +1342,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libdbus.normalized/dbus/dbus-sysdeps.h libdbus.srctix/dbus/dbus-sysdeps.h
--- libdbus.normalized/dbus/dbus-sysdeps.h 2012-09-28 21:17:25.000000000 +0200
+++ libdbus.srctix/dbus/dbus-sysdeps.h 2013-04-09 21:47:40.403164868 +0200
@@ -50,7 +50,7 @@
* DBusPollFD
*/
#ifdef HAVE_POLL
-#include <sys/poll.h>
+#include <poll.h>
#endif
#ifdef DBUS_WINCE
diff --no-dereference -Naur -- libdbus.normalized/dbus/dbus-sysdeps-unix.c libdbus.srctix/dbus/dbus-sysdeps-unix.c
--- libdbus.normalized/dbus/dbus-sysdeps-unix.c 2012-09-28 21:31:47.000000000 +0200
+++ libdbus.srctix/dbus/dbus-sysdeps-unix.c 2014-01-13 22:41:30.137610652 +0100
@@ -63,7 +63,7 @@
#include <sys/uio.h>
#endif
#ifdef HAVE_POLL
-#include <sys/poll.h>
+#include <poll.h>
#endif
#ifdef HAVE_BACKTRACE
#include <execinfo.h>
@@ -76,6 +76,8 @@
#include <bsm/adt.h>
#endif
+#include <alloca.h>
+
#include "sd-daemon.h"
#ifndef O_BINARY
@@ -276,6 +278,11 @@
*n_fds = 0;
return r;
+#elif defined(__sortix__)
+
+ fprintf(stderr, "%s:%u Warning: Sortix cannot pass fds between processes yet\n", __FILE__, __LINE__);
+ return errno = ENOTSUP, -1;
+
#else
int bytes_read;
int start;
@@ -426,6 +433,12 @@
return _dbus_write_socket_two(fd,
buffer1, start1, len1,
buffer2, start2, len2);
+
+#elif defined(__sortix__)
+
+ fprintf(stderr, "%s:%u Warning: Sortix cannot pass fds between processes yet\n", __FILE__, __LINE__);
+ return errno = ENOTSUP, -1;
+
#else
struct msghdr m;
@@ -734,6 +747,7 @@
#else /* HAVE_WRITEV */
{
int ret1;
+ int ret2;
ret1 = _dbus_write (fd, buffer1, start1, len1);
if (ret1 == len1 && buffer2 != NULL)
diff --no-dereference -Naur -- libdbus.normalized/dbus/dbus-sysdeps-util-unix.c libdbus.srctix/dbus/dbus-sysdeps-util-unix.c
--- libdbus.normalized/dbus/dbus-sysdeps-util-unix.c 2012-09-28 21:17:25.000000000 +0200
+++ libdbus.srctix/dbus/dbus-sysdeps-util-unix.c 2014-06-23 01:34:38.650920853 +0200
@@ -59,6 +59,11 @@
#define O_BINARY 0
#endif
+#if defined(__sortix__)
+#define setsid() getpid()
+#define setgroups(a, b) 0
+#endif
+
/**
* @addtogroup DBusInternalsUtils
* @{
diff --no-dereference -Naur -- libdbus.normalized/dbus/sd-daemon.c libdbus.srctix/dbus/sd-daemon.c
--- libdbus.normalized/dbus/sd-daemon.c 2011-07-13 22:42:21.000000000 +0200
+++ libdbus.srctix/dbus/sd-daemon.c 2013-04-09 21:49:45.043167684 +0200
@@ -32,7 +32,7 @@
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/un.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <errno.h>
diff --no-dereference -Naur -- libdbus.normalized/tixbuildinfo libdbus.srctix/tixbuildinfo
--- libdbus.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libdbus.srctix/tixbuildinfo 2014-01-13 22:44:08.217615508 +0100
@@ -0,0 +1,9 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libdbus
+pkg.build-libraries=libexpat
+pkg.build-system=configure
+# TODO: The tests depend on glib, which means we have to disable them, since glib depends on this package.
+pkg.configure.args=--disable-abstract-sockets --without-x --disable-tests
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la
diff --no-dereference -Naur -- libdbus.normalized/tools/dbus-launch.c libdbus.srctix/tools/dbus-launch.c
--- libdbus.normalized/tools/dbus-launch.c 2012-09-28 21:17:26.000000000 +0200
+++ libdbus.srctix/tools/dbus-launch.c 2014-03-06 02:01:11.949839173 +0100
@@ -769,7 +769,7 @@
strcpy (envvar, "DBUS_SESSION_BUS_ADDRESS=");
strcat (envvar, bus_address);
- putenv (envvar);
+ setenv ("DBUS_SESSION_BUS_ADDRESS", bus_address, 1);
execvp (runprog, args);
fprintf (stderr, "Couldn't exec %s: %s\n", runprog, strerror (errno));
diff --no-dereference -Naur -- libdbus.normalized/tools/dbus-monitor.c libdbus.srctix/tools/dbus-monitor.c
--- libdbus.normalized/tools/dbus-monitor.c 2012-09-28 21:17:26.000000000 +0200
+++ libdbus.srctix/tools/dbus-monitor.c 2016-02-20 14:41:32.637863944 +0100
@@ -104,11 +104,7 @@
return DBUS_HANDLER_RESULT_HANDLED;
}
-#ifdef __APPLE__
-#define PROFILE_TIMED_FORMAT "%s\t%lu\t%d"
-#else
-#define PROFILE_TIMED_FORMAT "%s\t%lu\t%lu"
-#endif
+#define PROFILE_TIMED_FORMAT "%s\t%lld\t%lu"
#define TRAP_NULL_STRING(str) ((str) ? (str) : "<none>")
typedef enum
@@ -127,7 +123,7 @@
profile_print_with_attrs (const char *type, DBusMessage *message,
struct timeval *t, ProfileAttributeFlags attrs)
{
- printf (PROFILE_TIMED_FORMAT, type, t->tv_sec, t->tv_usec);
+ printf (PROFILE_TIMED_FORMAT, type, (long long)t->tv_sec, t->tv_usec);
if (attrs & PROFILE_ATTRIBUTE_FLAG_SERIAL)
printf ("\t%u", dbus_message_get_serial (message));
@@ -197,7 +193,7 @@
PROFILE_ATTRIBUTE_FLAG_MEMBER);
break;
default:
- printf (PROFILE_TIMED_FORMAT "\n", "tun", t.tv_sec, t.tv_usec);
+ printf (PROFILE_TIMED_FORMAT "\n", "tun", (long long)t.tv_sec, t.tv_usec);
break;
}
}

View File

@ -0,0 +1,8 @@
NAME='libevent'
BUILD_LIBRARIES='libz? libssl?'
VERSION='2.0.22-stable'
DISTNAME='libevent-2.0.22-stable'
ARCHIVE='libevent-2.0.22-stable.tar.gz'
SHA256SUM='71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3'
UPSTREAM_SITE='https://github.com/libevent/libevent/releases/download/release-2.0.22-stable'
UPSTREAM_ARCHIVE='libevent-2.0.22-stable.tar.gz'

View File

@ -0,0 +1,230 @@
diff --no-dereference -Naur -- libevent.normalized/buffer.c libevent.srctix/buffer.c
--- libevent.normalized/buffer.c 2015-01-05 15:30:02.000000000 +0100
+++ libevent.srctix/buffer.c 2016-12-31 12:49:17.405955975 +0100
@@ -183,7 +183,7 @@
/* this way we can manipulate the buffer to different addresses,
* which is required for mmap for example.
*/
- chain->buffer = EVBUFFER_CHAIN_EXTRA(u_char, chain);
+ chain->buffer = EVBUFFER_CHAIN_EXTRA(unsigned char, chain);
return (chain);
}
@@ -2749,7 +2749,7 @@
if (!chain)
return (-1);
chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
- chain->buffer = (u_char *)data;
+ chain->buffer = (unsigned char *)data;
chain->buffer_len = datlen;
chain->off = datlen;
diff --no-dereference -Naur -- libevent.normalized/bufferevent_sock.c libevent.srctix/bufferevent_sock.c
--- libevent.normalized/bufferevent_sock.c 2013-02-05 21:00:56.000000000 +0100
+++ libevent.srctix/bufferevent_sock.c 2017-05-14 23:05:59.639226283 +0200
@@ -63,6 +63,7 @@
#include "event2/util.h"
#include "event2/bufferevent.h"
#include "event2/buffer.h"
+#include "event2/buffer_compat.h"
#include "event2/bufferevent_struct.h"
#include "event2/bufferevent_compat.h"
#include "event2/event.h"
@@ -75,6 +76,7 @@
#endif
/* prototypes */
+void bufferevent_read_pressure_cb(struct evbuffer *, size_t, size_t, void *);
static int be_socket_enable(struct bufferevent *, short);
static int be_socket_disable(struct bufferevent *, short);
static void be_socket_destruct(struct bufferevent *);
@@ -119,6 +121,40 @@
}
}
+static int
+bufferevent_add(struct event *ev, struct timeval timeout)
+{
+ struct timeval *ptv = NULL;
+
+ if (timeout.tv_sec || timeout.tv_usec) {
+ ptv = &timeout;
+ }
+
+ return (event_add(ev, ptv));
+}
+
+/*
+ * This callback is executed when the size of the input buffer changes.
+ * We use it to apply back pressure on the reading side.
+ */
+
+/* This API was needed to port OpenBSD's httpd to Sortix. */
+void
+bufferevent_read_pressure_cb(struct evbuffer *buf, size_t old, size_t now,
+ void *arg) {
+ struct bufferevent *bufev = arg;
+ /*
+ * If we are below the watermark then reschedule reading if it's
+ * still enabled.
+ */
+ if (bufev->wm_read.high == 0 || now < bufev->wm_read.high) {
+ evbuffer_setcb(buf, NULL, NULL);
+
+ if (bufev->enabled & EV_READ)
+ bufferevent_add(&bufev->ev_read, bufev->timeout_read);
+ }
+}
+
static void
bufferevent_readcb(evutil_socket_t fd, short event, void *arg)
{
diff --no-dereference -Naur -- libevent.normalized/config.sub libevent.srctix/config.sub
--- libevent.normalized/config.sub 2013-05-29 19:28:15.000000000 +0200
+++ libevent.srctix/config.sub 2016-12-31 12:40:43.971001342 +0100
@@ -1348,7 +1348,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libevent.normalized/configure libevent.srctix/configure
--- libevent.normalized/configure 2015-01-05 15:31:15.000000000 +0100
+++ libevent.srctix/configure 2017-05-14 23:13:21.220252464 +0200
@@ -14602,7 +14602,7 @@
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
@@ -14726,8 +14726,8 @@
main ()
{
pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+ pthread_attr_init(0);
+ pthread_create(0,0,0,0);
;
return 0;
}
diff --no-dereference -Naur -- libevent.normalized/evutil.c libevent.srctix/evutil.c
--- libevent.normalized/evutil.c 2013-11-01 19:18:57.000000000 +0100
+++ libevent.srctix/evutil.c 2016-12-31 12:51:06.163306533 +0100
@@ -2102,11 +2102,7 @@
long
_evutil_weakrand(void)
{
-#ifdef WIN32
- return rand();
-#else
- return random();
-#endif
+ return arc4random() & 0x7FFFFFFF;
}
/**
diff --no-dereference -Naur -- libevent.normalized/evutil_rand.c libevent.srctix/evutil_rand.c
--- libevent.normalized/evutil_rand.c 2013-11-01 19:18:57.000000000 +0100
+++ libevent.srctix/evutil_rand.c 2016-12-31 12:54:09.450769213 +0100
@@ -174,7 +174,7 @@
void
evutil_secure_rng_add_bytes(const char *buf, size_t n)
{
- arc4random_addrandom((unsigned char*)buf,
- n>(size_t)INT_MAX ? INT_MAX : (int)n);
+ (void) buf;
+ (void) n;
}
diff --no-dereference -Naur -- libevent.normalized/http-internal.h libevent.srctix/http-internal.h
--- libevent.normalized/http-internal.h 2012-02-10 23:17:14.000000000 +0100
+++ libevent.srctix/http-internal.h 2016-12-31 13:02:48.737574847 +0100
@@ -70,10 +70,10 @@
struct event retry_ev; /* for retrying connects */
char *bind_address; /* address to use for binding the src */
- u_short bind_port; /* local port for binding the src */
+ unsigned short bind_port; /* local port for binding the src */
char *address; /* address to connect to */
- u_short port;
+ unsigned short port;
size_t max_headers_size;
ev_uint64_t max_body_size;
diff --no-dereference -Naur -- libevent.normalized/Makefile.in libevent.srctix/Makefile.in
--- libevent.normalized/Makefile.in 2015-01-05 15:31:14.000000000 +0100
+++ libevent.srctix/Makefile.in 2017-05-14 23:19:25.959188264 +0200
@@ -537,7 +537,7 @@
@INSTALL_LIBEVENT_TRUE@lib_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
@INSTALL_LIBEVENT_TRUE@pkgconfig_DATA = $(LIBEVENT_PKGCONFIG)
@INSTALL_LIBEVENT_FALSE@noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA)
-SUBDIRS = . include sample test
+SUBDIRS = . include
@BUILD_WIN32_FALSE@SYS_LIBS =
@BUILD_WIN32_TRUE@SYS_LIBS = -lws2_32 -lshell32 -ladvapi32
@BUILD_WIN32_FALSE@SYS_SRC = $(am__append_5) $(am__append_6) \
@@ -1219,6 +1219,9 @@
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-recursive
+ rm -f sample/Makefile
+ rm -rf test/.deps
+ rm -r test/Makefile
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
diff --no-dereference -Naur -- libevent.normalized/poll.c libevent.srctix/poll.c
--- libevent.normalized/poll.c 2012-02-10 23:17:14.000000000 +0100
+++ libevent.srctix/poll.c 2016-12-31 13:01:40.943313857 +0100
@@ -180,7 +180,7 @@
if (res == 0 || nfds == 0)
return (0);
- i = random() % nfds;
+ i = arc4random_uniform(nfds);
for (j = 0; j < nfds; j++) {
int what;
if (++i == nfds)
diff --no-dereference -Naur -- libevent.normalized/select.c libevent.srctix/select.c
--- libevent.normalized/select.c 2012-02-10 23:17:14.000000000 +0100
+++ libevent.srctix/select.c 2016-12-31 12:55:06.669301485 +0100
@@ -177,7 +177,7 @@
event_debug(("%s: select reports %d", __func__, res));
check_selectop(sop);
- i = random() % nfds;
+ i = arc4random_uniform(nfds);
for (j = 0; j < nfds; ++j) {
if (++i >= nfds)
i = 0;
diff --no-dereference -Naur -- libevent.normalized/tixbuildinfo libevent.srctix/tixbuildinfo
--- libevent.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libevent.srctix/tixbuildinfo 2017-05-14 23:14:49.958047223 +0200
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libevent
+pkg.build-libraries=libz? libssl?
+pkg.build-system=configure
+pkg.configure.args=--disable-malloc-replacement
+pkg.post-install.cmd=tix-eradicate-libtool-la
diff --no-dereference -Naur -- libevent.normalized/util-internal.h libevent.srctix/util-internal.h
--- libevent.normalized/util-internal.h 2013-11-01 19:18:57.000000000 +0100
+++ libevent.srctix/util-internal.h 2017-05-13 22:53:00.073707830 +0200
@@ -75,7 +75,7 @@
/* True iff e is an error that means a read/write operation can be retried. */
#define EVUTIL_ERR_RW_RETRIABLE(e) \
- ((e) == EINTR || (e) == EAGAIN)
+ ((e) == EINTR || (e) == EAGAIN || (e) == EWOULDBLOCK)
/* True iff e is an error that means an connect can be retried. */
#define EVUTIL_ERR_CONNECT_RETRIABLE(e) \
((e) == EINTR || (e) == EINPROGRESS)

View File

@ -0,0 +1,8 @@
NAME='libexpat'
BUILD_LIBRARIES=''
VERSION='2.1.0'
DISTNAME='expat-2.1.0'
ARCHIVE='expat-2.1.0.tar.gz'
SHA256SUM='823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86'
UPSTREAM_SITE='https://github.com/libexpat/libexpat/releases/download/R_2_1_0'
UPSTREAM_ARCHIVE='expat-2.1.0.tar.gz'

View File

@ -0,0 +1,54 @@
diff --no-dereference -Naur -- libexpat.normalized/conftools/config.sub libexpat.srctix/conftools/config.sub
--- libexpat.normalized/conftools/config.sub 2012-03-24 20:12:39.000000000 +0100
+++ libexpat.srctix/conftools/config.sub 2013-04-09 21:32:12.863143908 +0200
@@ -1326,7 +1326,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libexpat.normalized/Makefile.in libexpat.srctix/Makefile.in
--- libexpat.normalized/Makefile.in 2012-03-18 23:18:10.000000000 +0100
+++ libexpat.srctix/Makefile.in 2013-04-09 21:38:36.275152571 +0200
@@ -45,7 +45,7 @@
APIHEADER = $(srcdir)/lib/expat.h $(srcdir)/lib/expat_external.h
LIBRARY = libexpat.la
-DESTDIR = $(INSTALL_ROOT)
+DESTDIR ?= $(INSTALL_ROOT)
default: buildlib xmlwf/xmlwf@EXEEXT@
diff --no-dereference -Naur -- libexpat.normalized/tixbuildinfo libexpat.srctix/tixbuildinfo
--- libexpat.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libexpat.srctix/tixbuildinfo 2013-07-25 23:48:54.851072387 +0200
@@ -0,0 +1,5 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libexpat
+pkg.build-system=configure
+pkg.post-install.cmd=tix-eradicate-libtool-la
diff --no-dereference -Naur -- libexpat.normalized/xmlwf/readfilemap.c libexpat.srctix/xmlwf/readfilemap.c
--- libexpat.normalized/xmlwf/readfilemap.c 2009-11-12 17:51:39.000000000 +0100
+++ libexpat.srctix/xmlwf/readfilemap.c 2015-02-07 16:30:52.089270331 +0100
@@ -8,17 +8,7 @@
#include <stdlib.h>
#include <stdio.h>
-#ifdef __WATCOMC__
-#ifndef __LINUX__
-#include <io.h>
-#else
#include <unistd.h>
-#endif
-#endif
-
-#ifdef __BEOS__
-#include <unistd.h>
-#endif
#ifndef S_ISREG
#ifndef S_IFREG

8
ports/libffi/libffi.info Normal file
View File

@ -0,0 +1,8 @@
NAME='libffi'
BUILD_LIBRARIES=''
VERSION='3.2.1'
DISTNAME='libffi-3.2.1'
ARCHIVE='libffi-3.2.1.tar.gz'
SHA256SUM='d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37'
UPSTREAM_SITE='https://sourceware.org/pub/libffi'
UPSTREAM_ARCHIVE='libffi-3.2.1.tar.gz'

77
ports/libffi/libffi.patch Normal file
View File

@ -0,0 +1,77 @@
diff --no-dereference -Naur -- libffi.normalized/config.sub libffi.srctix/config.sub
--- libffi.normalized/config.sub 2014-11-12 12:59:58.000000000 +0100
+++ libffi.srctix/config.sub 2015-08-23 19:08:46.866107013 +0200
@@ -1354,7 +1354,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libffi.normalized/configure libffi.srctix/configure
--- libffi.normalized/configure 2014-11-12 12:59:57.000000000 +0100
+++ libffi.srctix/configure 2015-08-23 19:19:05.082126003 +0200
@@ -20709,7 +20709,7 @@
eval "${MAKE-make} -f $tmp/conftemp.mk 2>/dev/null >/dev/null"
if grep '^REMOVED,,,' "$ac_top_srcdir/Makefile" >/dev/null
then rm $ac_top_srcdir/Makefile ; fi
- cp $tmp/conftemp.mk $ac_top_srcdir/makefiles.mk~ ## DEBUGGING
+ #cp $tmp/conftemp.mk $ac_top_srcdir/makefiles.mk~ ## DEBUGGING
fi
if test ! -f "$ac_top_srcdir/Makefile" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: create top_srcdir/Makefile guessed from local Makefile" >&5
@@ -20794,7 +20794,7 @@
; echo "\$\$i" | grep "^../" > /dev/null && continue \\\\\\
; echo "rm -r \$\$i"; (rm -r "\$\$i") ; done ; rm Makefile
_EOF
- cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING
+ #cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefile.sed~" ## DEBUGGING
$ax_enable_builddir_sed -f $tmp/conftemp.sed Makefile >$ac_top_srcdir/Makefile
if test -f "$ac_top_srcdir/Makefile.mk" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: extend top_srcdir/Makefile with top_srcdir/Makefile.mk" >&5
@@ -20815,8 +20815,8 @@
# echo "/^$xxxx *$ax_enable_builddir_host /d" >$tmp/conftemp.sed
echo "s!^$xxxx [^|]* | *$ax_enable_builddir *\$!$xxxx ...... $ax_enable_builddir!" >$tmp/conftemp.sed
$ax_enable_builddir_sed -f "$tmp/conftemp.sed" "$ac_top_srcdir/Makefile" >$tmp/mkfile.tmp
- cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefiles.sed~" ## DEBUGGING
- cp "$tmp/mkfile.tmp" "$ac_top_srcdir/makefiles.out~" ## DEBUGGING
+ #cp "$tmp/conftemp.sed" "$ac_top_srcdir/makefiles.sed~" ## DEBUGGING
+ #cp "$tmp/mkfile.tmp" "$ac_top_srcdir/makefiles.out~" ## DEBUGGING
if cmp -s "$ac_top_srcdir/Makefile" "$tmp/mkfile.tmp" 2>/dev/null ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: keeping top_srcdir/Makefile from earlier configure" >&5
$as_echo "$as_me: keeping top_srcdir/Makefile from earlier configure" >&6;}
diff --no-dereference -Naur -- libffi.normalized/include/Makefile.in libffi.srctix/include/Makefile.in
--- libffi.normalized/include/Makefile.in 2014-11-12 12:59:58.000000000 +0100
+++ libffi.srctix/include/Makefile.in 2015-08-23 19:09:26.262108223 +0200
@@ -314,7 +314,7 @@
AUTOMAKE_OPTIONS = foreign
DISTCLEANFILES = ffitarget.h
EXTRA_DIST = ffi.h.in ffi_common.h
-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includesdir = $(includedir)
nodist_includes_HEADERS = ffi.h ffitarget.h
all: all-am
diff --no-dereference -Naur -- libffi.normalized/libffi.pc.in libffi.srctix/libffi.pc.in
--- libffi.normalized/libffi.pc.in 2014-11-08 13:47:24.000000000 +0100
+++ libffi.srctix/libffi.pc.in 2015-08-23 19:10:27.546110106 +0200
@@ -2,7 +2,7 @@
exec_prefix=@exec_prefix@
libdir=@libdir@
toolexeclibdir=@toolexeclibdir@
-includedir=${libdir}/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
+includedir=@includedir@
Name: @PACKAGE_NAME@
Description: Library supporting Foreign Function Interfaces
diff --no-dereference -Naur -- libffi.normalized/tixbuildinfo libffi.srctix/tixbuildinfo
--- libffi.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libffi.srctix/tixbuildinfo 2015-08-23 19:10:54.406110931 +0200
@@ -0,0 +1,5 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libffi
+pkg.build-system=configure
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libfontconfig'
BUILD_LIBRARIES='libiconv libexpat libfreetype'
VERSION='2.12.6'
DISTNAME='fontconfig-2.12.6'
ARCHIVE='fontconfig-2.12.6.tar.bz2'
SHA256SUM='cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017'
UPSTREAM_SITE='https://www.freedesktop.org/software/fontconfig/release'
UPSTREAM_ARCHIVE='fontconfig-2.12.6.tar.bz2'

View File

@ -0,0 +1,208 @@
rm -rf -- 'conf.d/README'
rm -rf -- 'src/fcstdint.h'
rm -rf -- 'doc/FcPatternDuplicate.3'
rm -rf -- 'doc/FcStrSetAddFilename.3'
rm -rf -- 'doc/FcGetVersion.3'
rm -rf -- 'doc/FcNameUnregisterObjectTypes.3'
rm -rf -- 'doc/FcConfigSetCurrent.3'
rm -rf -- 'doc/FcCharSetCreate.3'
rm -rf -- 'doc/FcConfigGetFonts.3'
rm -rf -- 'doc/FcDirScan.3'
rm -rf -- 'doc/FcGetDefaultLangs.3'
rm -rf -- 'doc/FcCharSetCopy.3'
rm -rf -- 'doc/FcValueSave.3'
rm -rf -- 'doc/FcStrCmp.3'
rm -rf -- 'doc/FcNameGetObjectType.3'
rm -rf -- 'doc/FcUtf16ToUcs4.3'
rm -rf -- 'doc/FcPatternFormat.3'
rm -rf -- 'doc/FcFontSetSort.3'
rm -rf -- 'doc/FcConfigParseAndLoadFromMemory.3'
rm -rf -- 'doc/FcDefaultSubstitute.3'
rm -rf -- 'doc/FcDirCacheUnlink.3'
rm -rf -- 'doc/FcMatrixInit.3'
rm -rf -- 'doc/FcRangeCreateInteger.3'
rm -rf -- 'doc/fontconfig-user.pdf'
rm -rf -- 'doc/FcInitReinitialize.3'
rm -rf -- 'doc/FcFontSort.3'
rm -rf -- 'doc/FcStrDowncase.3'
rm -rf -- 'doc/FcInitLoadConfig.3'
rm -rf -- 'doc/FcConfigGetCurrent.3'
rm -rf -- 'doc/FcStrDirname.3'
rm -rf -- 'doc/FcGetLangs.3'
rm -rf -- 'doc/FcFontSetMatch.3'
rm -rf -- 'doc/FcAtomicUnlock.3'
rm -rf -- 'doc/FcFontSetSortDestroy.3'
rm -rf -- 'doc/FcMatrixCopy.3'
rm -rf -- 'doc/FcConfigAppFontClear.3'
rm -rf -- 'doc/FcLangSetContains.3'
rm -rf -- 'doc/FcBlanksIsMember.3'
rm -rf -- 'doc/FcUtf8ToUcs4.3'
rm -rf -- 'doc/FcConfigDestroy.3'
rm -rf -- 'doc/FcLangSetCompare.3'
rm -rf -- 'doc/FcDirCacheLoad.3'
rm -rf -- 'doc/FcPatternAddWeak.3'
rm -rf -- 'doc/FcAtomicDestroy.3'
rm -rf -- 'doc/FcPatternReference.3'
rm -rf -- 'doc/FcAtomicNewFile.3'
rm -rf -- 'doc/FcStrListDone.3'
rm -rf -- 'doc/FcCharSetAddChar.3'
rm -rf -- 'doc/FcConfigSetSysRoot.3'
rm -rf -- 'doc/FcCharSetCoverage.3'
rm -rf -- 'doc/FcCacheCopySet.3'
rm -rf -- 'doc/FcLangSetCreate.3'
rm -rf -- 'doc/FcLangSetAdd.3'
rm -rf -- 'doc/FcStrSetDel.3'
rm -rf -- 'doc/FcCacheSubdir.3'
rm -rf -- 'doc/FcConfigGetConfigDirs.3'
rm -rf -- 'doc/FcConfigGetRescanInterval.3'
rm -rf -- 'doc/FcLangSetHash.3'
rm -rf -- 'doc/FcFileScan.3'
rm -rf -- 'doc/FcStrSetMember.3'
rm -rf -- 'doc/FcConfigGetFontDirs.3'
rm -rf -- 'doc/FcPatternFilter.3'
rm -rf -- 'doc/FcStrListCreate.3'
rm -rf -- 'doc/FcStrSetAdd.3'
rm -rf -- 'doc/FcPatternGetWithBinding.3'
rm -rf -- 'doc/FcCharSetNextPage.3'
rm -rf -- 'doc/FcCharSetHasChar.3'
rm -rf -- 'doc/FcLangSetHasLang.3'
rm -rf -- 'doc/FcLangGetCharSet.3'
rm -rf -- 'doc/FcObjectSetCreate.3'
rm -rf -- 'doc/FcPatternRemove.3'
rm -rf -- 'doc/FcCharSetSubtractCount.3'
rm -rf -- 'doc/FcCharSetFirstPage.3'
rm -rf -- 'doc/FcStrFree.3'
rm -rf -- 'doc/FcCharSetIntersectCount.3'
rm -rf -- 'doc/FcPatternBuild.3'
rm -rf -- 'doc/FcLangSetCopy.3'
rm -rf -- 'doc/FcNameRegisterConstants.3'
rm -rf -- 'doc/FcPatternGet.3'
rm -rf -- 'doc/FcPatternPrint.3'
rm -rf -- 'doc/FcConfigGetConfigFiles.3'
rm -rf -- 'doc/FcNameConstant.3'
rm -rf -- 'doc/FcConfigCreate.3'
rm -rf -- 'doc/FcStrSetDestroy.3'
rm -rf -- 'doc/FcFini.3'
rm -rf -- 'doc/FcMatrixShear.3'
rm -rf -- 'doc/FcCharSetUnion.3'
rm -rf -- 'doc/FcIsLower.3'
rm -rf -- 'doc/FcObjectSetAdd.3'
rm -rf -- 'doc/FcAtomicLock.3'
rm -rf -- 'doc/FcRangeCopy.3'
rm -rf -- 'doc/FcFreeTypeCharSetAndSpacing.3'
rm -rf -- 'doc/FcStrSetCreate.3'
rm -rf -- 'doc/FcInit.3'
rm -rf -- 'doc/FcIsUpper.3'
rm -rf -- 'doc/FcFileIsDir.3'
rm -rf -- 'doc/FcStrCopyFilename.3'
rm -rf -- 'doc/FcConfigFilename.3'
rm -rf -- 'doc/FcRangeGetDouble.3'
rm -rf -- 'doc/FcPatternAdd-Type.3'
rm -rf -- 'doc/FcFontMatch.3'
rm -rf -- 'doc/FcValueDestroy.3'
rm -rf -- 'doc/FcUcs4ToUtf8.3'
rm -rf -- 'doc/FcStrListFirst.3'
rm -rf -- 'doc/FcFreeTypeCharIndex.3'
rm -rf -- 'doc/FcStrPlus.3'
rm -rf -- 'doc/FcLangNormalize.3'
rm -rf -- 'doc/FcNameGetConstant.3'
rm -rf -- 'doc/FcUtf16Len.3'
rm -rf -- 'doc/FcUtf8Len.3'
rm -rf -- 'doc/FcBlanksDestroy.3'
rm -rf -- 'doc/FcFontSetDestroy.3'
rm -rf -- 'doc/FcMatrixScale.3'
rm -rf -- 'doc/FcObjectSetDestroy.3'
rm -rf -- 'doc/FcCharSetEqual.3'
rm -rf -- 'doc/FcWeightToOpenType.3'
rm -rf -- 'doc/FcDirSave.3'
rm -rf -- 'doc/fontconfig-user.txt'
rm -rf -- 'doc/FcConfigGetBlanks.3'
rm -rf -- 'doc/FcLangSetEqual.3'
rm -rf -- 'doc/FcBlanksAdd.3'
rm -rf -- 'doc/FcRangeCreateDouble.3'
rm -rf -- 'doc/FcCharSetIntersect.3'
rm -rf -- 'doc/FcStrCopy.3'
rm -rf -- 'doc/FcLangSetDestroy.3'
rm -rf -- 'doc/FcConfigBuildFonts.3'
rm -rf -- 'doc/FcAtomicCreate.3'
rm -rf -- 'doc/FcDirCacheClean.3'
rm -rf -- 'doc/FcFontSetPrint.3'
rm -rf -- 'doc/FcToLower.3'
rm -rf -- 'doc/FcCacheNumFont.3'
rm -rf -- 'doc/FcConfigReference.3'
rm -rf -- 'doc/FcStrListNext.3'
rm -rf -- 'doc/FcFreeTypeCharSet.3'
rm -rf -- 'doc/FcConfigUptoDate.3'
rm -rf -- 'doc/FcConfigHome.3'
rm -rf -- 'doc/FcMatrixEqual.3'
rm -rf -- 'doc/FcLangSetGetLangs.3'
rm -rf -- 'doc/fonts-conf.5'
rm -rf -- 'doc/FcCharSetNew.3'
rm -rf -- 'doc/FcStrSetEqual.3'
rm -rf -- 'doc/fontconfig-devel.txt'
rm -rf -- 'doc/FcLangSetSubtract.3'
rm -rf -- 'doc/FcPatternEqual.3'
rm -rf -- 'doc/FcCharSetIsSubset.3'
rm -rf -- 'doc/FcPatternDel.3'
rm -rf -- 'doc/FcFontSetList.3'
rm -rf -- 'doc/FcNameUnparse.3'
rm -rf -- 'doc/FcAtomicOrigFile.3'
rm -rf -- 'doc/FcObjectSetBuild.3'
rm -rf -- 'doc/FcDirCacheUnload.3'
rm -rf -- 'doc/FcConfigGetCache.3'
rm -rf -- 'doc/FcDirCacheRescan.3'
rm -rf -- 'doc/FcConfigAppFontAddFile.3'
rm -rf -- 'doc/FcCharSetDestroy.3'
rm -rf -- 'doc/FcStrCmpIgnoreCase.3'
rm -rf -- 'doc/FcCharSetSubtract.3'
rm -rf -- 'doc/FcPatternHash.3'
rm -rf -- 'doc/FcDirCacheValid.3'
rm -rf -- 'doc/FcCacheCreateTagFile.3'
rm -rf -- 'doc/FcFontSetAdd.3'
rm -rf -- 'doc/FcPatternAdd.3'
rm -rf -- 'doc/FcPatternCreate.3'
rm -rf -- 'doc/FcConfigSubstitute.3'
rm -rf -- 'doc/FcBlanksCreate.3'
rm -rf -- 'doc/fontconfig-user.html'
rm -rf -- 'doc/FcWeightFromOpenType.3'
rm -rf -- 'doc/FcCacheNumSubdir.3'
rm -rf -- 'doc/FcMatrixMultiply.3'
rm -rf -- 'doc/FcPatternEqualSubset.3'
rm -rf -- 'doc/FcConfigEnableHome.3'
rm -rf -- 'doc/FcConfigGetSysRoot.3'
rm -rf -- 'doc/FcValuePrint.3'
rm -rf -- 'doc/fontconfig-devel.pdf'
rm -rf -- 'doc/FcDirCacheRead.3'
rm -rf -- 'doc/FcConfigAppFontAddDir.3'
rm -rf -- 'doc/FcInitBringUptoDate.3'
rm -rf -- 'doc/FcFontSetCreate.3'
rm -rf -- 'doc/FcPatternGet-Type.3'
rm -rf -- 'doc/FcNameRegisterObjectTypes.3'
rm -rf -- 'doc/FcMatrixRotate.3'
rm -rf -- 'doc/FcAtomicDeleteNew.3'
rm -rf -- 'doc/FcFontList.3'
rm -rf -- 'doc/FcPatternDestroy.3'
rm -rf -- 'doc/FcAtomicReplaceOrig.3'
rm -rf -- 'doc/FcCharSetMerge.3'
rm -rf -- 'doc/FcConfigParseAndLoad.3'
rm -rf -- 'doc/FcConfigSubstituteWithPat.3'
rm -rf -- 'doc/FcFreeTypeQuery.3'
rm -rf -- 'doc/FcFontRenderPrepare.3'
rm -rf -- 'doc/FcStrBasename.3'
rm -rf -- 'doc/FcInitLoadConfigAndFonts.3'
rm -rf -- 'doc/FcCharSetDelChar.3'
rm -rf -- 'doc/FcStrStr.3'
rm -rf -- 'doc/FcConfigSetRescanInterval.3'
rm -rf -- 'doc/FcCacheDir.3'
rm -rf -- 'doc/FcFreeTypeQueryFace.3'
rm -rf -- 'doc/FcCharSetCount.3'
rm -rf -- 'doc/FcLangSetDel.3'
rm -rf -- 'doc/FcLangSetUnion.3'
rm -rf -- 'doc/FcNameParse.3'
rm -rf -- 'doc/FcRangeDestroy.3'
rm -rf -- 'doc/FcValueEqual.3'
rm -rf -- 'doc/FcConfigGetCacheDirs.3'
rm -rf -- 'doc/FcDirCacheLoadFile.3'
rm -rf -- 'doc/FcNameUnregisterConstants.3'
rm -rf -- 'doc/FcStrStrIgnoreCase.3'
rm -rf -- 'fontconfig.spec'

View File

@ -0,0 +1,274 @@
diff --no-dereference -Naur -- libfontconfig.normalized/fc-blanks/Makefile.in libfontconfig.srctix/fc-blanks/Makefile.in
--- libfontconfig.normalized/fc-blanks/Makefile.in 2017-09-21 10:08:10.000000000 +0200
+++ libfontconfig.srctix/fc-blanks/Makefile.in 2017-09-21 10:08:10.000000000 +0200
@@ -350,7 +350,8 @@
$(TMPL) \
$(NULL)
-DISTCLEANFILES = $(BLANKS_H)
+# PATCH: fc-blanks.py doesn't work on Sortix (python2 urllib issues).
+DISTCLEANFILES =
all: all-am
.SUFFIXES:
diff --no-dereference -Naur -- libfontconfig.normalized/fontconfig.pc.in libfontconfig.srctix/fontconfig.pc.in
--- libfontconfig.normalized/fontconfig.pc.in 2016-12-02 04:22:19.000000000 +0100
+++ libfontconfig.srctix/fontconfig.pc.in 2016-12-02 04:22:19.000000000 +0100
@@ -14,5 +14,6 @@
Requires: @PKGCONFIG_REQUIRES@
Requires.private: @PKGCONFIG_REQUIRES_PRIVATELY@
Libs: -L${libdir} -lfontconfig
-Libs.private: @EXPAT_LIBS@ @FREETYPE_LIBS@ @ICONV_LIBS@ @LIBXML2_LIBS@
-Cflags: -I${includedir} @EXPAT_CFLAGS@ @FREETYPE_CFLAGS@ @ICONV_CFLAGS@ @LIBXML2_CFLAGS@
+Libs.private: @ICONV_LIBS@
+# PATCH: These were provided by the above Requires and were not cross safe.
+Cflags: -I${includedir} @ICONV_CFLAGS@
diff --no-dereference -Naur -- libfontconfig.normalized/Makefile.in libfontconfig.srctix/Makefile.in
--- libfontconfig.normalized/Makefile.in 2017-09-21 10:08:10.000000000 +0200
+++ libfontconfig.srctix/Makefile.in 2017-09-21 10:08:10.000000000 +0200
@@ -434,7 +434,8 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = fontconfig fc-blanks fc-case fc-lang fc-glyphname src \
+# PATCH: fc-blanks is a python script that doesn't run on Sortix right now.
+SUBDIRS = fontconfig fc-case fc-lang fc-glyphname src \
fc-cache fc-cat fc-list fc-match fc-pattern fc-query fc-scan \
fc-validate conf.d test $(am__append_1)
ACLOCAL_AMFLAGS = -I m4
diff --no-dereference -Naur -- libfontconfig.normalized/src/fccache.c libfontconfig.srctix/src/fccache.c
--- libfontconfig.normalized/src/fccache.c 2016-12-02 04:22:19.000000000 +0100
+++ libfontconfig.srctix/src/fccache.c 2016-12-02 04:22:19.000000000 +0100
@@ -38,6 +38,9 @@
#if defined(_WIN32)
#include <sys/locking.h>
#endif
+#if defined(__has_include) && __has_include(<sys/file.h>)
+#include <sys/file.h>
+#endif
#ifndef O_BINARY
#define O_BINARY 0
@@ -1266,7 +1269,11 @@
#if defined(_WIN32)
if (_locking (fd, _LK_LOCK, 1) == -1)
goto bail;
-#else
+/* PATCH: Sortix refuses to implement crap file locking. */
+#elif defined(LOCK_EX)
+ if (flock(fd, LOCK_EX) == -1)
+ goto bail;
+#elif !defined(__sortix__)
struct flock fl;
fl.l_type = F_WRLCK;
@@ -1276,17 +1283,21 @@
fl.l_pid = getpid ();
if (fcntl (fd, F_SETLKW, &fl) == -1)
goto bail;
+#else
+#define FcDirCacheLock_NOBAIL
#endif
break;
}
}
FcStrListDone (list);
return fd;
+#ifndef FcDirCacheLock_NOBAIL
bail:
FcStrListDone (list);
if (fd != -1)
close (fd);
return -1;
+#endif
}
void
@@ -1296,7 +1307,10 @@
{
#if defined(_WIN32)
_locking (fd, _LK_UNLCK, 1);
-#else
+/* PATCH: Sortix refuses to implement crap file locking. */
+#elif defined(LOCK_EX)
+ flock(fd, LOCK_UN);
+#elif !defined(__sortix__)
struct flock fl;
fl.l_type = F_UNLCK;
diff --no-dereference -Naur -- libfontconfig.normalized/src/fccompat.c libfontconfig.srctix/src/fccompat.c
--- libfontconfig.normalized/src/fccompat.c 2016-12-02 04:22:19.000000000 +0100
+++ libfontconfig.srctix/src/fccompat.c 2016-12-02 04:22:19.000000000 +0100
@@ -164,69 +164,8 @@
int32_t
FcRandom(void)
{
- int32_t result;
-
-#if HAVE_RANDOM_R
- static struct random_data fcrandbuf;
- static char statebuf[256];
- static FcBool initialized = FcFalse;
-#ifdef _AIX
- static char *retval;
- long res;
-#endif
-
- if (initialized != FcTrue)
- {
-#ifdef _AIX
- initstate_r (time (NULL), statebuf, 256, &retval, &fcrandbuf);
-#else
- initstate_r (time (NULL), statebuf, 256, &fcrandbuf);
-#endif
- initialized = FcTrue;
- }
-
-#ifdef _AIX
- random_r (&res, &fcrandbuf);
- result = (int32_t)res;
-#else
- random_r (&fcrandbuf, &result);
-#endif
-#elif HAVE_RANDOM
- static char statebuf[256];
- char *state;
- static FcBool initialized = FcFalse;
-
- if (initialized != FcTrue)
- {
- state = initstate (time (NULL), statebuf, 256);
- initialized = FcTrue;
- }
- else
- state = setstate (statebuf);
-
- result = random ();
-
- setstate (state);
-#elif HAVE_LRAND48
- result = lrand48 ();
-#elif HAVE_RAND_R
- static unsigned int seed = time (NULL);
-
- result = rand_r (&seed);
-#elif HAVE_RAND
- static FcBool initialized = FcFalse;
-
- if (initialized != FcTrue)
- {
- srand (time (NULL));
- initialized = FcTrue;
- }
- result = rand ();
-#else
-# error no random number generator function available.
-#endif
-
- return result;
+ /* PATCH: Use good random. */
+ return arc4random_uniform (INT32_MAX);
}
#ifdef _WIN32
diff --no-dereference -Naur -- libfontconfig.normalized/src/fcname.c libfontconfig.srctix/src/fcname.c
--- libfontconfig.normalized/src/fcname.c 2016-12-02 04:22:19.000000000 +0100
+++ libfontconfig.srctix/src/fcname.c 2016-12-02 04:22:19.000000000 +0100
@@ -506,17 +506,17 @@
case FcTypeVoid:
return FcTrue;
case FcTypeInteger:
- sprintf ((char *) temp, "%d", v.u.i);
+ snprintf ((char *) temp, sizeof (temp), "%d", v.u.i);
return FcNameUnparseString (buf, temp, 0);
case FcTypeDouble:
- sprintf ((char *) temp, "%g", v.u.d);
+ snprintf ((char *) temp, sizeof (temp), "%g", v.u.d);
return FcNameUnparseString (buf, temp, 0);
case FcTypeString:
return FcNameUnparseString (buf, v.u.s, escape);
case FcTypeBool:
return FcNameUnparseString (buf, v.u.b ? (FcChar8 *) "True" : (FcChar8 *) "False", 0);
case FcTypeMatrix:
- sprintf ((char *) temp, "%g %g %g %g",
+ snprintf ((char *) temp, sizeof (temp), "%g %g %g %g",
v.u.m->xx, v.u.m->xy, v.u.m->yx, v.u.m->yy);
return FcNameUnparseString (buf, temp, 0);
case FcTypeCharSet:
@@ -526,7 +526,7 @@
case FcTypeFTFace:
return FcTrue;
case FcTypeRange:
- sprintf ((char *) temp, "[%g %g)", v.u.r->begin, v.u.r->end);
+ snprintf ((char *) temp, sizeof (temp), "[%g %g)", v.u.r->begin, v.u.r->end);
return FcNameUnparseString (buf, temp, 0);
}
return FcFalse;
diff --no-dereference -Naur -- libfontconfig.normalized/src/fcobjs.c libfontconfig.srctix/src/fcobjs.c
--- libfontconfig.normalized/src/fcobjs.c 2017-02-23 13:17:53.000000000 +0100
+++ libfontconfig.srctix/src/fcobjs.c 2017-02-23 13:17:53.000000000 +0100
@@ -24,11 +24,12 @@
#include "fcint.h"
+/* TODO: Stick with existing fcobjshash.h regardless of system gperf. */
static unsigned int
-FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len);
+FcObjectTypeHash (register const char *str, register size_t len);
static const struct FcObjectTypeInfo *
-FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len);
+FcObjectTypeLookup (register const char *str, register size_t len);
#include "fcobjshash.h"
diff --no-dereference -Naur -- libfontconfig.normalized/src/Makefile.in libfontconfig.srctix/src/Makefile.in
--- libfontconfig.normalized/src/Makefile.in 2017-09-21 10:08:10.000000000 +0200
+++ libfontconfig.srctix/src/Makefile.in 2017-09-21 10:08:10.000000000 +0200
@@ -496,7 +496,6 @@
stamp-fcstdint \
fcstdint.h \
stamp-fcobjshash.gperf \
- fcobjshash.h \
fcobjshash.gperf
all: $(BUILT_SOURCES)
@@ -912,9 +911,10 @@
' - > $@.tmp && \
mv -f $@.tmp fcobjshash.gperf && touch $@ || ( $(RM) $@.tmp && false )
-fcobjshash.h: Makefile fcobjshash.gperf
- $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
- mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
+# PATCH: Sortix doesn't have gperf at the moment.
+#fcobjshash.h: Makefile fcobjshash.gperf
+# $(AM_V_GEN) $(GPERF) --pic -m 100 fcobjshash.gperf > $@.tmp && \
+# mv -f $@.tmp $@ || ( $(RM) $@.tmp && false )
@ENABLE_SHARED_TRUE@install-data-local: install-ms-import-lib install-libtool-import-lib
diff --no-dereference -Naur -- libfontconfig.normalized/test/test-migration.c libfontconfig.srctix/test/test-migration.c
--- libfontconfig.normalized/test/test-migration.c 2016-12-02 04:22:19.000000000 +0100
+++ libfontconfig.srctix/test/test-migration.c 2016-12-02 04:22:19.000000000 +0100
@@ -22,6 +22,8 @@
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
+/* PATCH: Need HAVE_FOO macros.. */
+#include "../config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --no-dereference -Naur -- libfontconfig.normalized/tixbuildinfo libfontconfig.srctix/tixbuildinfo
--- libfontconfig.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libfontconfig.srctix/tixbuildinfo 2017-10-24 20:04:50.552936797 +0200
@@ -0,0 +1,9 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libfontconfig
+pkg.build-libraries=libiconv libexpat libfreetype
+pkg.build-system=configure
+# Documentation requires SGMLSpm and texline, doesn't seem to work?
+pkg.configure.args=--disable-docs
+pkg.post-install.cmd=tix-eradicate-libtool-la
+pkg.make.vars=V=1

View File

@ -0,0 +1,8 @@
NAME='libfreetype'
BUILD_LIBRARIES='libz bzip2? libpng?'
VERSION='2.8.1'
DISTNAME='freetype-2.8.1'
ARCHIVE='freetype-2.8.1.tar.bz2'
SHA256SUM='e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78'
UPSTREAM_SITE='https://download.savannah.gnu.org/releases/freetype'
UPSTREAM_ARCHIVE='freetype-2.8.1.tar.bz2'

View File

@ -0,0 +1,48 @@
rm -rf -- 'docs/reference/'
rm -rf -- 'docs/reference/README'
rm -rf -- 'docs/reference/ft2-toc.html'
rm -rf -- 'docs/reference/ft2-index.html'
rm -rf -- 'docs/reference/ft2-winfnt_fonts.html'
rm -rf -- 'docs/reference/ft2-glyph_stroker.html'
rm -rf -- 'docs/reference/ft2-ot_validation.html'
rm -rf -- 'docs/reference/ft2-base_interface.html'
rm -rf -- 'docs/reference/ft2-system_interface.html'
rm -rf -- 'docs/reference/ft2-tt_driver.html'
rm -rf -- 'docs/reference/ft2-cache_subsystem.html'
rm -rf -- 'docs/reference/ft2-sfnt_names.html'
rm -rf -- 'docs/reference/ft2-incremental.html'
rm -rf -- 'docs/reference/ft2-user_allocation.html'
rm -rf -- 'docs/reference/ft2-basic_types.html'
rm -rf -- 'docs/reference/ft2-bdf_fonts.html'
rm -rf -- 'docs/reference/ft2-multiple_masters.html'
rm -rf -- 'docs/reference/ft2-glyph_management.html'
rm -rf -- 'docs/reference/ft2-truetype_engine.html'
rm -rf -- 'docs/reference/ft2-version.html'
rm -rf -- 'docs/reference/ft2-gx_validation.html'
rm -rf -- 'docs/reference/ft2-glyph_variants.html'
rm -rf -- 'docs/reference/ft2-font_formats.html'
rm -rf -- 'docs/reference/ft2-type1_tables.html'
rm -rf -- 'docs/reference/ft2-quick_advance.html'
rm -rf -- 'docs/reference/ft2-cff_driver.html'
rm -rf -- 'docs/reference/ft2-bitmap_handling.html'
rm -rf -- 'docs/reference/ft2-outline_processing.html'
rm -rf -- 'docs/reference/ft2-bzip2.html'
rm -rf -- 'docs/reference/ft2-cid_fonts.html'
rm -rf -- 'docs/reference/ft2-gzip.html'
rm -rf -- 'docs/reference/ft2-header_file_macros.html'
rm -rf -- 'docs/reference/ft2-module_management.html'
rm -rf -- 'docs/reference/ft2-gasp_table.html'
rm -rf -- 'docs/reference/ft2-raster.html'
rm -rf -- 'docs/reference/ft2-pcf_driver.html'
rm -rf -- 'docs/reference/ft2-truetype_tables.html'
rm -rf -- 'docs/reference/ft2-computations.html'
rm -rf -- 'docs/reference/ft2-error_enumerations.html'
rm -rf -- 'docs/reference/ft2-sizes_management.html'
rm -rf -- 'docs/reference/ft2-mac_specific.html'
rm -rf -- 'docs/reference/ft2-pfr_fonts.html'
rm -rf -- 'docs/reference/ft2-lcd_filtering.html'
rm -rf -- 'docs/reference/ft2-error_code_values.html'
rm -rf -- 'docs/reference/ft2-auto_hinter.html'
rm -rf -- 'docs/reference/ft2-header_inclusion.html'
rm -rf -- 'docs/reference/ft2-lzw.html'
rm -rf -- 'docs/reference/ft2-list_processing.html'

View File

@ -0,0 +1,323 @@
diff --no-dereference -Naur -- libfreetype.normalized/builds/unix/configure libfreetype.srctix/builds/unix/configure
--- libfreetype.normalized/builds/unix/configure 2017-09-16 19:09:13.000000000 +0200
+++ libfreetype.srctix/builds/unix/configure 2017-10-24 19:15:13.016115244 +0200
@@ -13690,22 +13690,7 @@
libpng_libspriv="$LIBPNG_LIBS"
libpng_libsstaticconf="$LIBPNG_LIBS"
have_libpng="yes (LIBPNG_CFLAGS and LIBPNG_LIBS)"
- else
- # fall back to config script.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpng-config" >&5
-$as_echo_n "checking for libpng-config... " >&6; }
- if which libpng-config > /dev/null 2>&1; then
- LIBPNG_CFLAGS=`libpng-config --cflags`
- LIBPNG_LIBS=`libpng-config --ldflags`
- libpng_libspriv=`libpng-config --static --ldflags`
- libpng_libsstaticconf="$libpng_libspriv"
- have_libpng="yes (libpng-config)"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
+ # PATCH: libpng-config should never be used.
fi
fi
fi
diff --no-dereference -Naur -- libfreetype.normalized/builds/unix/freetype2.in libfreetype.srctix/builds/unix/freetype2.in
--- libfreetype.normalized/builds/unix/freetype2.in 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/builds/unix/freetype2.in 2017-10-24 17:53:39.568362655 +0200
@@ -4,7 +4,7 @@
includedir=%includedir%
Name: FreeType 2
-URL: http://freetype.org
+URL: https://freetype.org
Description: A free, high-quality, and portable font engine.
Version: %ft_version%
Requires:
diff --no-dereference -Naur -- libfreetype.normalized/builds/unix/install.mk libfreetype.srctix/builds/unix/install.mk
--- libfreetype.normalized/builds/unix/install.mk 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/builds/unix/install.mk 2017-10-24 19:15:43.799338012 +0200
@@ -30,15 +30,14 @@
#
# We also remove `$(includedir)/ft2build.h' for the same reason.
#
+# PATCH: freetype-config should never be used.
install: $(PROJECT_LIBRARY)
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
$(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
- $(DESTDIR)$(bindir) \
- $(DESTDIR)$(datadir)/aclocal \
- $(DESTDIR)$(mandir)/man1
+ $(DESTDIR)$(datadir)/aclocal
$(LIBTOOL) --mode=install $(INSTALL) \
$(PROJECT_LIBRARY) $(DESTDIR)$(libdir)
-for P in $(PUBLIC_H) ; do \
@@ -55,23 +54,17 @@
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
$(INSTALL_DATA) $(OBJ_DIR)/ftmodule.h \
$(DESTDIR)$(includedir)/freetype2/freetype/config/ftmodule.h
- $(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
- $(DESTDIR)$(bindir)/freetype-config
$(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
$(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
$(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
- $(INSTALL_DATA) $(TOP_DIR)/docs/freetype-config.1 \
- $(DESTDIR)$(mandir)/man1/freetype-config.1
uninstall:
-$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(LIBRARY).$A
-$(DELDIR) $(DESTDIR)$(includedir)/freetype2
- -$(DELETE) $(DESTDIR)$(bindir)/freetype-config
-$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
-$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
- -$(DELETE) $(DESTDIR)$(mandir)/man1/freetype-config.1
check:
diff --no-dereference -Naur -- libfreetype.normalized/src/autofit/afhints.c libfreetype.srctix/src/autofit/afhints.c
--- libfreetype.normalized/src/autofit/afhints.c 2017-09-14 11:09:54.000000000 +0200
+++ libfreetype.srctix/src/autofit/afhints.c 2017-10-24 19:17:58.655933081 +0200
@@ -16,6 +16,8 @@
/***************************************************************************/
+/* PATCH: Make snprintf available. */
+#define _ISOC99_SOURCE
#include "afhints.h"
#include "aferrors.h"
#include FT_INTERNAL_CALC_H
@@ -223,6 +225,7 @@
static char*
af_print_idx( char* p,
+ size_t len,
int idx )
{
if ( idx == -1 )
@@ -232,7 +235,7 @@
p[2] = '\0';
}
else
- ft_sprintf( p, "%d", idx );
+ snprintf( p, len, "%d", idx );
return p;
}
@@ -338,12 +341,12 @@
AF_DUMP(( " %5d %5s %5s %5s %5s %s"
" %5d %5d %7.2f %7.2f %7.2f %7.2f\n",
point_idx,
- af_print_idx( buf1,
+ af_print_idx( buf1, sizeof(buf1),
af_get_edge_index( hints, segment_idx_1, 1 ) ),
- af_print_idx( buf2, segment_idx_1 ),
- af_print_idx( buf3,
+ af_print_idx( buf2, sizeof(buf2), segment_idx_1 ),
+ af_print_idx( buf3, sizeof(buf3),
af_get_edge_index( hints, segment_idx_0, 0 ) ),
- af_print_idx( buf4, segment_idx_0 ),
+ af_print_idx( buf4, sizeof(buf4), segment_idx_0 ),
( point->flags & AF_FLAG_NEAR )
? " near "
: ( point->flags & AF_FLAG_WEAK_INTERPOLATION )
diff --no-dereference -Naur -- libfreetype.normalized/src/bdf/bdflib.c libfreetype.srctix/src/bdf/bdflib.c
--- libfreetype.normalized/src/bdf/bdflib.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/bdf/bdflib.c 2017-10-24 17:35:48.523404973 +0200
@@ -31,6 +31,8 @@
/*************************************************************************/
+/* PATCH: Make snprintf available. */
+#define _ISOC99_SOURCE
#include <ft2build.h>
#include FT_FREETYPE_H
@@ -1822,7 +1824,7 @@
if ( bdf_get_font_property( p->font, "FONT_ASCENT" ) == 0 )
{
p->font->font_ascent = p->font->bbx.ascent;
- ft_sprintf( nbuf, "%hd", p->font->bbx.ascent );
+ snprintf( nbuf, sizeof ( nbuf ), "%hd", p->font->bbx.ascent );
error = _bdf_add_property( p->font, (char *)"FONT_ASCENT",
nbuf, lineno );
if ( error )
@@ -1835,7 +1837,7 @@
if ( bdf_get_font_property( p->font, "FONT_DESCENT" ) == 0 )
{
p->font->font_descent = p->font->bbx.descent;
- ft_sprintf( nbuf, "%hd", p->font->bbx.descent );
+ snprintf( nbuf, sizeof ( nbuf ), "%hd", p->font->bbx.descent );
error = _bdf_add_property( p->font, (char *)"FONT_DESCENT",
nbuf, lineno );
if ( error )
@@ -2164,7 +2166,7 @@
/* Add the two standard X11 properties which are required */
/* for compiling fonts. */
p->font->font_ascent = p->font->bbx.ascent;
- ft_sprintf( nbuf, "%hd", p->font->bbx.ascent );
+ snprintf( nbuf, sizeof ( nbuf ), "%hd", p->font->bbx.ascent );
error = _bdf_add_property( p->font, (char *)"FONT_ASCENT",
nbuf, lineno );
if ( error )
@@ -2172,7 +2174,7 @@
FT_TRACE2(( "_bdf_parse_properties: " ACMSG1, p->font->bbx.ascent ));
p->font->font_descent = p->font->bbx.descent;
- ft_sprintf( nbuf, "%hd", p->font->bbx.descent );
+ snprintf( nbuf, sizeof ( nbuf ), "%hd", p->font->bbx.descent );
error = _bdf_add_property( p->font, (char *)"FONT_DESCENT",
nbuf, lineno );
if ( error )
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/adler32.c libfreetype.srctix/src/gzip/adler32.c
--- libfreetype.normalized/src/gzip/adler32.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/adler32.c 2017-10-24 19:22:43.244747631 +0200
@@ -1,3 +1,4 @@
+#error no
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/ftzconf.h libfreetype.srctix/src/gzip/ftzconf.h
--- libfreetype.normalized/src/gzip/ftzconf.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/ftzconf.h 2017-10-24 19:23:13.295988881 +0200
@@ -1,3 +1,4 @@
+#error no
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infblock.c libfreetype.srctix/src/gzip/infblock.c
--- libfreetype.normalized/src/gzip/infblock.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infblock.c 2017-10-24 19:23:19.075842948 +0200
@@ -1,3 +1,4 @@
+#error no
/* infblock.c -- interpret and process block types to last block
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infblock.h libfreetype.srctix/src/gzip/infblock.h
--- libfreetype.normalized/src/gzip/infblock.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infblock.h 2017-10-24 19:23:21.347785585 +0200
@@ -1,3 +1,4 @@
+#error no
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infcodes.c libfreetype.srctix/src/gzip/infcodes.c
--- libfreetype.normalized/src/gzip/infcodes.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infcodes.c 2017-10-24 19:23:24.099716102 +0200
@@ -1,3 +1,4 @@
+#error no
/* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infcodes.h libfreetype.srctix/src/gzip/infcodes.h
--- libfreetype.normalized/src/gzip/infcodes.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infcodes.h 2017-10-24 19:23:25.971668837 +0200
@@ -1,3 +1,4 @@
+#error no
/* infcodes.h -- header to use infcodes.c
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/inffixed.h libfreetype.srctix/src/gzip/inffixed.h
--- libfreetype.normalized/src/gzip/inffixed.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/inffixed.h 2017-10-24 19:23:27.839621675 +0200
@@ -1,3 +1,4 @@
+#error no
/* inffixed.h -- table for decoding fixed codes
* Generated automatically by the maketree.c program
*/
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/inflate.c libfreetype.srctix/src/gzip/inflate.c
--- libfreetype.normalized/src/gzip/inflate.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/inflate.c 2017-10-24 19:23:29.727574007 +0200
@@ -1,3 +1,4 @@
+#error no
/* inflate.c -- zlib interface to inflate modules
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/inftrees.c libfreetype.srctix/src/gzip/inftrees.c
--- libfreetype.normalized/src/gzip/inftrees.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/inftrees.c 2017-10-24 19:23:31.883519572 +0200
@@ -1,3 +1,4 @@
+#error no
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/inftrees.h libfreetype.srctix/src/gzip/inftrees.h
--- libfreetype.normalized/src/gzip/inftrees.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/inftrees.h 2017-10-24 19:23:33.831470390 +0200
@@ -1,3 +1,4 @@
+#error no
/* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infutil.c libfreetype.srctix/src/gzip/infutil.c
--- libfreetype.normalized/src/gzip/infutil.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infutil.c 2017-10-24 19:23:38.479353037 +0200
@@ -1,3 +1,4 @@
+#error no
/* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/infutil.h libfreetype.srctix/src/gzip/infutil.h
--- libfreetype.normalized/src/gzip/infutil.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/infutil.h 2017-10-24 19:23:40.303306984 +0200
@@ -1,3 +1,4 @@
+#error no
/* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-2002 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/zlib.h libfreetype.srctix/src/gzip/zlib.h
--- libfreetype.normalized/src/gzip/zlib.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/zlib.h 2017-10-24 19:24:11.058530461 +0200
@@ -1,3 +1,4 @@
+#error no
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.1.4, March 11th, 2002
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/zutil.c libfreetype.srctix/src/gzip/zutil.c
--- libfreetype.normalized/src/gzip/zutil.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/zutil.c 2017-10-24 19:24:25.394168507 +0200
@@ -1,3 +1,4 @@
+#error no
/* zutil.c -- target dependent utility functions for the compression library
* Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/gzip/zutil.h libfreetype.srctix/src/gzip/zutil.h
--- libfreetype.normalized/src/gzip/zutil.h 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/gzip/zutil.h 2017-10-24 19:25:15.400905909 +0200
@@ -1,3 +1,4 @@
+#error no
/* zutil.h -- internal interface and configuration of the compression library
* Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
diff --no-dereference -Naur -- libfreetype.normalized/src/sfnt/ttload.c libfreetype.srctix/src/sfnt/ttload.c
--- libfreetype.normalized/src/sfnt/ttload.c 2017-07-09 12:28:15.000000000 +0200
+++ libfreetype.srctix/src/sfnt/ttload.c 2017-10-24 17:25:15.743381742 +0200
@@ -338,7 +338,9 @@
SFNT_HeaderRec sfnt;
FT_Error error;
FT_Memory memory = stream->memory;
- FT_UShort nn, valid_entries;
+ /* PATCH: warning: `valid_entries' may be used uninitialized in this
+ function [-Wmaybe-uninitialized] */
+ FT_UShort nn, valid_entries = 0;
static const FT_Frame_Field offset_table_fields[] =
{
diff --no-dereference -Naur -- libfreetype.normalized/tixbuildinfo libfreetype.srctix/tixbuildinfo
--- libfreetype.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libfreetype.srctix/tixbuildinfo 2017-10-24 19:33:11.324889526 +0200
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libfreetype
+pkg.build-libraries=libz bzip2? libpng?
+pkg.build-system=configure
+pkg.dirty-file=config.log
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libglib'
BUILD_LIBRARIES='libiconv gettext libz libffi xz? libdbus?'
VERSION='2.45.6'
DISTNAME='glib-2.45.6'
ARCHIVE='glib-2.45.6.tar.xz'
SHA256SUM='a5710fcf8a073201ceca188c285af14d8da4bb2bbec22bdf6b5e0593d5bc6b77'
UPSTREAM_SITE='https://download.gnome.org/sources/glib/2.45'
UPSTREAM_ARCHIVE='glib-2.45.6.tar.xz'

View File

@ -0,0 +1,583 @@
rm -rf -- 'gthread/makefile.msc'
rm -rf -- 'gthread/gthread.rc'
rm -rf -- 'tests/makefile.msc'
rm -rf -- 'gio/gdbus-2.0/codegen/config.py'
rm -rf -- 'gio/gconstructor_as_data.h'
rm -rf -- 'gio/gioenumtypes.c'
rm -rf -- 'gio/tests/plugin_resources.c'
rm -rf -- 'gio/gdbus-daemon-generated.c'
rm -rf -- 'gio/gdbus-daemon-generated.h'
rm -rf -- 'gio/gioenumtypes.h'
rm -rf -- 'gio/gio.rc'
rm -rf -- 'INSTALL'
rm -rf -- 'config.h.win32'
rm -rf -- 'docs/reference/gio/html/'
rm -rf -- 'docs/reference/gio/html/gio-GSettingsSchema-GSettingsSchemaSource.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-36.html'
rm -rf -- 'docs/reference/gio/html/gio-D-Bus-Addresses.html'
rm -rf -- 'docs/reference/gio/html/GDBusInterface.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-44.html'
rm -rf -- 'docs/reference/gio/html/pt01.html'
rm -rf -- 'docs/reference/gio/html/gdbus-lowlevel.html'
rm -rf -- 'docs/reference/gio/html/async.html'
rm -rf -- 'docs/reference/gio/html/GTlsClientConnection.html'
rm -rf -- 'docs/reference/gio/html/gio-GFileAttribute.html'
rm -rf -- 'docs/reference/gio/html/gio-gpollableutils.html'
rm -rf -- 'docs/reference/gio/html/gio-GContentType.html'
rm -rf -- 'docs/reference/gio/html/subprocesses.html'
rm -rf -- 'docs/reference/gio/html/GLoadableIcon.html'
rm -rf -- 'docs/reference/gio/html/conversion.html'
rm -rf -- 'docs/reference/gio/html/GConverter.html'
rm -rf -- 'docs/reference/gio/html/GUnixConnection.html'
rm -rf -- 'docs/reference/gio/html/GApplication.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-34.html'
rm -rf -- 'docs/reference/gio/html/GUnixFDList.html'
rm -rf -- 'docs/reference/gio/html/ExampleObjectManagerClient.html'
rm -rf -- 'docs/reference/gio/html/GSimpleIOStream.html'
rm -rf -- 'docs/reference/gio/html/ExampleObject.html'
rm -rf -- 'docs/reference/gio/html/ExampleCat.html'
rm -rf -- 'docs/reference/gio/html/gdbus-org.gtk.GDBus.Example.ObjectManager.Cat.html'
rm -rf -- 'docs/reference/gio/html/GTlsServerConnection.html'
rm -rf -- 'docs/reference/gio/html/GMountOperation.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-26.html'
rm -rf -- 'docs/reference/gio/html/application.html'
rm -rf -- 'docs/reference/gio/html/ch03.html'
rm -rf -- 'docs/reference/gio/html/up.png'
rm -rf -- 'docs/reference/gio/html/ExampleAnimal.html'
rm -rf -- 'docs/reference/gio/html/ch34s07.html'
rm -rf -- 'docs/reference/gio/html/GAppInfoMonitor.html'
rm -rf -- 'docs/reference/gio/html/types.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-42.html'
rm -rf -- 'docs/reference/gio/html/GZlibDecompressor.html'
rm -rf -- 'docs/reference/gio/html/GProxyResolver.html'
rm -rf -- 'docs/reference/gio/html/GInputStream.html'
rm -rf -- 'docs/reference/gio/html/GUnixFDMessage.html'
rm -rf -- 'docs/reference/gio/html/GTcpConnection.html'
rm -rf -- 'docs/reference/gio/html/GActionGroup.html'
rm -rf -- 'docs/reference/gio/html/GTlsCertificate.html'
rm -rf -- 'docs/reference/gio/html/GSimplePermission.html'
rm -rf -- 'docs/reference/gio/html/GFileMonitor.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-30.html'
rm -rf -- 'docs/reference/gio/html/GThreadedSocketService.html'
rm -rf -- 'docs/reference/gio/html/GRemoteActionGroup.html'
rm -rf -- 'docs/reference/gio/html/api-index-full.html'
rm -rf -- 'docs/reference/gio/html/GFileInfo.html'
rm -rf -- 'docs/reference/gio/html/GDBusAuthObserver.html'
rm -rf -- 'docs/reference/gio/html/GMemoryOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GSocketControlMessage.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-32.html'
rm -rf -- 'docs/reference/gio/html/GPollableOutputStream.html'
rm -rf -- 'docs/reference/gio/html/testing.html'
rm -rf -- 'docs/reference/gio/html/menu-example.png'
rm -rf -- 'docs/reference/gio/html/GNetworkAddress.html'
rm -rf -- 'docs/reference/gio/html/ch32.html'
rm -rf -- 'docs/reference/gio/html/GDBusObjectSkeleton.html'
rm -rf -- 'docs/reference/gio/html/GProxy.html'
rm -rf -- 'docs/reference/gio/html/ch34s06.html'
rm -rf -- 'docs/reference/gio/html/gio-GMenuModel-exporter.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-40.html'
rm -rf -- 'docs/reference/gio/html/GFileEnumerator.html'
rm -rf -- 'docs/reference/gio/html/GDBusObjectManagerClient.html'
rm -rf -- 'docs/reference/gio/html/index.html'
rm -rf -- 'docs/reference/gio/html/GFile.html'
rm -rf -- 'docs/reference/gio/html/data-models.html'
rm -rf -- 'docs/reference/gio/html/GSubprocessLauncher.html'
rm -rf -- 'docs/reference/gio/html/gvfs-overview.png'
rm -rf -- 'docs/reference/gio/html/file_mon.html'
rm -rf -- 'docs/reference/gio/html/GMenu.html'
rm -rf -- 'docs/reference/gio/html/GSocket.html'
rm -rf -- 'docs/reference/gio/html/GBufferedInputStream.html'
rm -rf -- 'docs/reference/gio/html/ch35s04.html'
rm -rf -- 'docs/reference/gio/html/GUnixInputStream.html'
rm -rf -- 'docs/reference/gio/html/ch35s02.html'
rm -rf -- 'docs/reference/gio/html/gresource-tool.html'
rm -rf -- 'docs/reference/gio/html/GDBusServer.html'
rm -rf -- 'docs/reference/gio/html/highlevel-socket.html'
rm -rf -- 'docs/reference/gio/html/ch01.html'
rm -rf -- 'docs/reference/gio/html/resolver.html'
rm -rf -- 'docs/reference/gio/html/GNetworkService.html'
rm -rf -- 'docs/reference/gio/html/gio-Unix-Mounts.html'
rm -rf -- 'docs/reference/gio/html/GTlsConnection.html'
rm -rf -- 'docs/reference/gio/html/permissions.html'
rm -rf -- 'docs/reference/gio/html/right.png'
rm -rf -- 'docs/reference/gio/html/GDBusInterfaceSkeleton.html'
rm -rf -- 'docs/reference/gio/html/home.png'
rm -rf -- 'docs/reference/gio/html/api-index-2-24.html'
rm -rf -- 'docs/reference/gio/html/annotation-glossary.html'
rm -rf -- 'docs/reference/gio/html/extending-gio.html'
rm -rf -- 'docs/reference/gio/html/GTlsBackend.html'
rm -rf -- 'docs/reference/gio/html/GNotification.html'
rm -rf -- 'docs/reference/gio/html/GCharsetConverter.html'
rm -rf -- 'docs/reference/gio/html/utils.html'
rm -rf -- 'docs/reference/gio/html/GBufferedOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GSocketListener.html'
rm -rf -- 'docs/reference/gio/html/pt02.html'
rm -rf -- 'docs/reference/gio/html/GUnixOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GTestDBus.html'
rm -rf -- 'docs/reference/gio/html/GCancellable.html'
rm -rf -- 'docs/reference/gio/html/GTlsDatabase.html'
rm -rf -- 'docs/reference/gio/html/registry.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-18.html'
rm -rf -- 'docs/reference/gio/html/GPropertyAction.html'
rm -rf -- 'docs/reference/gio/html/GInitable.html'
rm -rf -- 'docs/reference/gio/html/GDBusObjectProxy.html'
rm -rf -- 'docs/reference/gio/html/GDBusObject.html'
rm -rf -- 'docs/reference/gio/html/GIOStream.html'
rm -rf -- 'docs/reference/gio/html/GMount.html'
rm -rf -- 'docs/reference/gio/html/GTlsPassword.html'
rm -rf -- 'docs/reference/gio/html/gdbus.html'
rm -rf -- 'docs/reference/gio/html/gio-GConverterOutputstream.html'
rm -rf -- 'docs/reference/gio/html/gio-GWin32InputStream.html'
rm -rf -- 'docs/reference/gio/html/GSettings.html'
rm -rf -- 'docs/reference/gio/html/extending.html'
rm -rf -- 'docs/reference/gio/html/GSrvTarget.html'
rm -rf -- 'docs/reference/gio/html/GDBusActionGroup.html'
rm -rf -- 'docs/reference/gio/html/GDBusMethodInvocation.html'
rm -rf -- 'docs/reference/gio/html/ch35s05.html'
rm -rf -- 'docs/reference/gio/html/gio-GWin32RegistryKey.html'
rm -rf -- 'docs/reference/gio/html/gio-GIOScheduler.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-22.html'
rm -rf -- 'docs/reference/gio/html/GFileDescriptorBased.html'
rm -rf -- 'docs/reference/gio/html/api-index-deprecated.html'
rm -rf -- 'docs/reference/gio/html/GDBusMenuModel.html'
rm -rf -- 'docs/reference/gio/html/gio-GIOError.html'
rm -rf -- 'docs/reference/gio/html/gio-GDBusError.html'
rm -rf -- 'docs/reference/gio/html/gio-GActionGroup-exporter.html'
rm -rf -- 'docs/reference/gio/html/failable_initialization.html'
rm -rf -- 'docs/reference/gio/html/settings.html'
rm -rf -- 'docs/reference/gio/html/icons.html'
rm -rf -- 'docs/reference/gio/html/right-insensitive.png'
rm -rf -- 'docs/reference/gio/html/GFileInputStream.html'
rm -rf -- 'docs/reference/gio/html/ch35.html'
rm -rf -- 'docs/reference/gio/html/GTlsInteraction.html'
rm -rf -- 'docs/reference/gio/html/GThemedIcon.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-38.html'
rm -rf -- 'docs/reference/gio/html/migrating.html'
rm -rf -- 'docs/reference/gio/html/GListModel.html'
rm -rf -- 'docs/reference/gio/html/ch34s03.html'
rm -rf -- 'docs/reference/gio/html/GDataOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GFileOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GDBusProxy.html'
rm -rf -- 'docs/reference/gio/html/GNetworkMonitor.html'
rm -rf -- 'docs/reference/gio/html/ch02.html'
rm -rf -- 'docs/reference/gio/html/gio-GWin32OutputStream.html'
rm -rf -- 'docs/reference/gio/html/gsettings-tool.html'
rm -rf -- 'docs/reference/gio/html/gio.devhelp2'
rm -rf -- 'docs/reference/gio/html/GSimpleAsyncResult.html'
rm -rf -- 'docs/reference/gio/html/GResolver.html'
rm -rf -- 'docs/reference/gio/html/gio-GConverterInputstream.html'
rm -rf -- 'docs/reference/gio/html/GCredentials.html'
rm -rf -- 'docs/reference/gio/html/GDrive.html'
rm -rf -- 'docs/reference/gio/html/GVfs.html'
rm -rf -- 'docs/reference/gio/html/index.sgml'
rm -rf -- 'docs/reference/gio/html/ch33s02.html'
rm -rf -- 'docs/reference/gio/html/GProxyAddress.html'
rm -rf -- 'docs/reference/gio/html/streaming.html'
rm -rf -- 'docs/reference/gio/html/gio-Watching-Bus-Names.html'
rm -rf -- 'docs/reference/gio/html/GSocketAddress.html'
rm -rf -- 'docs/reference/gio/html/GDBusMessage.html'
rm -rf -- 'docs/reference/gio/html/GPermission.html'
rm -rf -- 'docs/reference/gio/html/left-insensitive.png'
rm -rf -- 'docs/reference/gio/html/GSocketConnection.html'
rm -rf -- 'docs/reference/gio/html/up-insensitive.png'
rm -rf -- 'docs/reference/gio/html/GSimpleProxyResolver.html'
rm -rf -- 'docs/reference/gio/html/gio-D-Bus-Introspection-Data.html'
rm -rf -- 'docs/reference/gio/html/GDBusConnection.html'
rm -rf -- 'docs/reference/gio/html/GSubprocess.html'
rm -rf -- 'docs/reference/gio/html/GSettingsBackend.html'
rm -rf -- 'docs/reference/gio/html/gio-TLS-Overview.html'
rm -rf -- 'docs/reference/gio/html/ch34s02.html'
rm -rf -- 'docs/reference/gio/html/GBytesIcon.html'
rm -rf -- 'docs/reference/gio/html/GAction.html'
rm -rf -- 'docs/reference/gio/html/GMenuModel.html'
rm -rf -- 'docs/reference/gio/html/GIOModule.html'
rm -rf -- 'docs/reference/gio/html/GFilterInputStream.html'
rm -rf -- 'docs/reference/gio/html/glib-compile-resources.html'
rm -rf -- 'docs/reference/gio/html/GFilterOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GActionMap.html'
rm -rf -- 'docs/reference/gio/html/GUnixSocketAddress.html'
rm -rf -- 'docs/reference/gio/html/tls.html'
rm -rf -- 'docs/reference/gio/html/volume_mon.html'
rm -rf -- 'docs/reference/gio/html/GFilenameCompleter.html'
rm -rf -- 'docs/reference/gio/html/ch34s04.html'
rm -rf -- 'docs/reference/gio/html/menu-model.png'
rm -rf -- 'docs/reference/gio/html/GListStore.html'
rm -rf -- 'docs/reference/gio/html/GDataInputStream.html'
rm -rf -- 'docs/reference/gio/html/GAsyncInitable.html'
rm -rf -- 'docs/reference/gio/html/file_ops.html'
rm -rf -- 'docs/reference/gio/html/gdbus-convenience.html'
rm -rf -- 'docs/reference/gio/html/GAsyncResult.html'
rm -rf -- 'docs/reference/gio/html/gio-hierarchy.html'
rm -rf -- 'docs/reference/gio/html/gio-querymodules.html'
rm -rf -- 'docs/reference/gio/html/GSeekable.html'
rm -rf -- 'docs/reference/gio/html/gio-Extension-Points.html'
rm -rf -- 'docs/reference/gio/html/GInetAddress.html'
rm -rf -- 'docs/reference/gio/html/gio-gnetworking.h.html'
rm -rf -- 'docs/reference/gio/html/GOutputStream.html'
rm -rf -- 'docs/reference/gio/html/GSimpleAction.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-20.html'
rm -rf -- 'docs/reference/gio/html/GUnixCredentialsMessage.html'
rm -rf -- 'docs/reference/gio/html/ch33.html'
rm -rf -- 'docs/reference/gio/html/GSimpleActionGroup.html'
rm -rf -- 'docs/reference/gio/html/gio-D-Bus-Utilities.html'
rm -rf -- 'docs/reference/gio/html/GFileIcon.html'
rm -rf -- 'docs/reference/gio/html/GZlibCompressor.html'
rm -rf -- 'docs/reference/gio/html/GEmblem.html'
rm -rf -- 'docs/reference/gio/html/glib-compile-schemas.html'
rm -rf -- 'docs/reference/gio/html/left.png'
rm -rf -- 'docs/reference/gio/html/GSocketConnectable.html'
rm -rf -- 'docs/reference/gio/html/GDBusObjectManager.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-28.html'
rm -rf -- 'docs/reference/gio/html/GVolumeMonitor.html'
rm -rf -- 'docs/reference/gio/html/networking.html'
rm -rf -- 'docs/reference/gio/html/ch34s05.html'
rm -rf -- 'docs/reference/gio/html/running-gio-apps.html'
rm -rf -- 'docs/reference/gio/html/gio-Owning-Bus-Names.html'
rm -rf -- 'docs/reference/gio/html/api-index-2-46.html'
rm -rf -- 'docs/reference/gio/html/ch35s03.html'
rm -rf -- 'docs/reference/gio/html/GEmblemedIcon.html'
rm -rf -- 'docs/reference/gio/html/style.css'
rm -rf -- 'docs/reference/gio/html/GSocketService.html'
rm -rf -- 'docs/reference/gio/html/ch33s03.html'
rm -rf -- 'docs/reference/gio/html/gapplication-tool.html'
rm -rf -- 'docs/reference/gio/html/GVolume.html'
rm -rf -- 'docs/reference/gio/html/tools.html'
rm -rf -- 'docs/reference/gio/html/GTcpWrapperConnection.html'
rm -rf -- 'docs/reference/gio/html/GAppInfo.html'
rm -rf -- 'docs/reference/gio/html/GFileIOStream.html'
rm -rf -- 'docs/reference/gio/html/GApplicationCommandLine.html'
rm -rf -- 'docs/reference/gio/html/GSocketClient.html'
rm -rf -- 'docs/reference/gio/html/gdbus-codegen.html'
rm -rf -- 'docs/reference/gio/html/ch34.html'
rm -rf -- 'docs/reference/gio/html/GIcon.html'
rm -rf -- 'docs/reference/gio/html/gdbus-org.gtk.GDBus.Example.ObjectManager.Animal.html'
rm -rf -- 'docs/reference/gio/html/GMemoryInputStream.html'
rm -rf -- 'docs/reference/gio/html/GInetSocketAddress.html'
rm -rf -- 'docs/reference/gio/html/GResource.html'
rm -rf -- 'docs/reference/gio/html/GInetAddressMask.html'
rm -rf -- 'docs/reference/gio/html/resources.html'
rm -rf -- 'docs/reference/gio/html/GTask.html'
rm -rf -- 'docs/reference/gio/html/GPollableInputStream.html'
rm -rf -- 'docs/reference/gio/html/GTlsFileDatabase.html'
rm -rf -- 'docs/reference/gio/html/gio-Desktop-file-based-GAppInfo.html'
rm -rf -- 'docs/reference/gio/html/GDBusObjectManagerServer.html'
rm -rf -- 'docs/reference/gio/version.xml'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/pt01.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/ExampleObjectManagerClient.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/ExampleObject.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/ExampleCat.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/up.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/ExampleAnimal.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/index.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/ch01.html'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/right.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/home.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/right-insensitive.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/index.sgml'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/left-insensitive.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/up-insensitive.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/gdbus-object-manager-example.devhelp2'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/left.png'
rm -rf -- 'docs/reference/gio/gdbus-object-manager-example/html/style.css'
rm -rf -- 'docs/reference/glib/html/'
rm -rf -- 'docs/reference/glib/html/glib-Byte-Arrays.html'
rm -rf -- 'docs/reference/glib/html/gtester.html'
rm -rf -- 'docs/reference/glib/html/glib-Relations-and-Tuples.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-36.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-44.html'
rm -rf -- 'docs/reference/glib/html/glib-Spawning-Processes.html'
rm -rf -- 'docs/reference/glib/html/glib-Doubly-Linked-Lists.html'
rm -rf -- 'docs/reference/glib/html/glib-Standard-Macros.html'
rm -rf -- 'docs/reference/glib/html/glib-Byte-Order-Macros.html'
rm -rf -- 'docs/reference/glib/html/glib-GVariantType.html'
rm -rf -- 'docs/reference/glib/html/glib-Strings.html'
rm -rf -- 'docs/reference/glib/html/glib-Perl-compatible-regular-expressions.html'
rm -rf -- 'docs/reference/glib/html/Sorted_binary_tree_preorder.svg'
rm -rf -- 'docs/reference/glib/html/api-index-2-34.html'
rm -rf -- 'docs/reference/glib/html/glib-Asynchronous-Queues.html'
rm -rf -- 'docs/reference/glib/html/glib-Commandline-option-parser.html'
rm -rf -- 'docs/reference/glib/html/glib-Warnings-and-Assertions.html'
rm -rf -- 'docs/reference/glib/html/glib-Glob-style-pattern-matching.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-26.html'
rm -rf -- 'docs/reference/glib/html/up.png'
rm -rf -- 'docs/reference/glib/html/api-index-2-42.html'
rm -rf -- 'docs/reference/glib/html/glib-Double-ended-Queues.html'
rm -rf -- 'docs/reference/glib/html/glib-data-types.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-30.html'
rm -rf -- 'docs/reference/glib/html/api-index-full.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-32.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-40.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-6.html'
rm -rf -- 'docs/reference/glib/html/index.html'
rm -rf -- 'docs/reference/glib/html/glib-Singly-Linked-Lists.html'
rm -rf -- 'docs/reference/glib/html/glib-Simple-XML-Subset-Parser.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-4.html'
rm -rf -- 'docs/reference/glib/html/glib-compiling.html'
rm -rf -- 'docs/reference/glib/html/glib-Key-value-file-parser.html'
rm -rf -- 'docs/reference/glib/html/glib-changes.html'
rm -rf -- 'docs/reference/glib/html/glib-Memory-Slices.html'
rm -rf -- 'docs/reference/glib/html/glib-Memory-Allocation.html'
rm -rf -- 'docs/reference/glib/html/glib-Thread-Pools.html'
rm -rf -- 'docs/reference/glib/html/glib-File-Utilities.html'
rm -rf -- 'docs/reference/glib/html/mainloop-states.gif'
rm -rf -- 'docs/reference/glib/html/api-index-2-16.html'
rm -rf -- 'docs/reference/glib/html/right.png'
rm -rf -- 'docs/reference/glib/html/glib-Base64-Encoding.html'
rm -rf -- 'docs/reference/glib/html/home.png'
rm -rf -- 'docs/reference/glib/html/deprecated.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-24.html'
rm -rf -- 'docs/reference/glib/html/annotation-glossary.html'
rm -rf -- 'docs/reference/glib/html/glib-regex-syntax.html'
rm -rf -- 'docs/reference/glib/html/glib-Automatic-String-Completion.html'
rm -rf -- 'docs/reference/glib/html/glib-Unicode-Manipulation.html'
rm -rf -- 'docs/reference/glib/html/glib-building.html'
rm -rf -- 'docs/reference/glib/html/gvariant-text.html'
rm -rf -- 'docs/reference/glib/html/glib-core.html'
rm -rf -- 'docs/reference/glib/html/glib-Sequences.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-18.html'
rm -rf -- 'docs/reference/glib/html/glib-Hook-Functions.html'
rm -rf -- 'docs/reference/glib/html/glib-GTimeZone.html'
rm -rf -- 'docs/reference/glib/html/glib.html'
rm -rf -- 'docs/reference/glib/html/glib-Miscellaneous-Utility-Functions.html'
rm -rf -- 'docs/reference/glib/html/glib-Shell-related-Utilities.html'
rm -rf -- 'docs/reference/glib/html/glib-cross-compiling.html'
rm -rf -- 'docs/reference/glib/html/glib-Type-Conversion-Macros.html'
rm -rf -- 'docs/reference/glib/html/glib-Hostname-Utilities.html'
rm -rf -- 'docs/reference/glib/html/glib-Character-Set-Conversion.html'
rm -rf -- 'docs/reference/glib/html/glib-Error-Reporting.html'
rm -rf -- 'docs/reference/glib/html/glib-IO-Channels.html'
rm -rf -- 'docs/reference/glib/html/gtester-report.html'
rm -rf -- 'docs/reference/glib/html/glib-Random-Numbers.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-22.html'
rm -rf -- 'docs/reference/glib/html/glib-URI-Functions.html'
rm -rf -- 'docs/reference/glib/html/glib-Message-Logging.html'
rm -rf -- 'docs/reference/glib/html/api-index-deprecated.html'
rm -rf -- 'docs/reference/glib/html/glib-String-Utility-Functions.html'
rm -rf -- 'docs/reference/glib/html/glib-Date-and-Time-Functions.html'
rm -rf -- 'docs/reference/glib/html/right-insensitive.png'
rm -rf -- 'docs/reference/glib/html/glib-Trash-Stacks.html'
rm -rf -- 'docs/reference/glib/html/glib-Deprecated-Thread-APIs.html'
rm -rf -- 'docs/reference/glib/html/glib-Quarks.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-38.html'
rm -rf -- 'docs/reference/glib/html/glib.devhelp2'
rm -rf -- 'docs/reference/glib/html/glib-The-Main-Event-Loop.html'
rm -rf -- 'docs/reference/glib/html/glib-Windows-Compatibility-Functions.html'
rm -rf -- 'docs/reference/glib/html/Sorted_binary_tree_postorder.svg'
rm -rf -- 'docs/reference/glib/html/glib-Timers.html'
rm -rf -- 'docs/reference/glib/html/glib-Data-Checksums.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-2.html'
rm -rf -- 'docs/reference/glib/html/glib-Datasets.html'
rm -rf -- 'docs/reference/glib/html/Sorted_binary_tree_inorder.svg'
rm -rf -- 'docs/reference/glib/html/glib-fundamentals.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-10.html'
rm -rf -- 'docs/reference/glib/html/index.sgml'
rm -rf -- 'docs/reference/glib/html/glib-Threads.html'
rm -rf -- 'docs/reference/glib/html/glib-String-Chunks.html'
rm -rf -- 'docs/reference/glib/html/left-insensitive.png'
rm -rf -- 'docs/reference/glib/html/up-insensitive.png'
rm -rf -- 'docs/reference/glib/html/glib-utilities.html'
rm -rf -- 'docs/reference/glib/html/glib-Version-Information.html'
rm -rf -- 'docs/reference/glib/html/glib-GDateTime.html'
rm -rf -- 'docs/reference/glib/html/glib-gettextize.html'
rm -rf -- 'docs/reference/glib/html/glib-Dynamic-Loading-of-Modules.html'
rm -rf -- 'docs/reference/glib/html/glib-UNIX-specific-utilities-and-integration.html'
rm -rf -- 'docs/reference/glib/html/glib-Hash-Tables.html'
rm -rf -- 'docs/reference/glib/html/glib-Numerical-Definitions.html'
rm -rf -- 'docs/reference/glib/html/file-name-encodings.png'
rm -rf -- 'docs/reference/glib/html/api-index-2-8.html'
rm -rf -- 'docs/reference/glib/html/glib-Bookmark-file-parser.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-14.html'
rm -rf -- 'docs/reference/glib/html/glib-programming.html'
rm -rf -- 'docs/reference/glib/html/glib-Testing.html'
rm -rf -- 'docs/reference/glib/html/gvariant-format-strings.html'
rm -rf -- 'docs/reference/glib/html/glib-Balanced-Binary-Trees.html'
rm -rf -- 'docs/reference/glib/html/glib-I18N.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-20.html'
rm -rf -- 'docs/reference/glib/html/glib-Basic-Types.html'
rm -rf -- 'docs/reference/glib/html/glib-running.html'
rm -rf -- 'docs/reference/glib/html/glib-resources.html'
rm -rf -- 'docs/reference/glib/html/glib-Keyed-Data-Lists.html'
rm -rf -- 'docs/reference/glib/html/left.png'
rm -rf -- 'docs/reference/glib/html/glib-Caches.html'
rm -rf -- 'docs/reference/glib/html/glib-Atomic-Operations.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-28.html'
rm -rf -- 'docs/reference/glib/html/glib-Arrays.html'
rm -rf -- 'docs/reference/glib/html/glib-Pointer-Arrays.html'
rm -rf -- 'docs/reference/glib/html/style.css'
rm -rf -- 'docs/reference/glib/html/tools.html'
rm -rf -- 'docs/reference/glib/html/glib-Miscellaneous-Macros.html'
rm -rf -- 'docs/reference/glib/html/glib-GVariant.html'
rm -rf -- 'docs/reference/glib/html/glib-Lexical-Scanner.html'
rm -rf -- 'docs/reference/glib/html/glib-N-ary-Trees.html'
rm -rf -- 'docs/reference/glib/html/api-index-2-12.html'
rm -rf -- 'docs/reference/glib/html/Sorted_binary_tree_breadth-first_traversal.svg'
rm -rf -- 'docs/reference/glib/html/glib-Data-HMACs.html'
rm -rf -- 'docs/reference/glib/version.xml'
rm -rf -- 'docs/reference/gobject/html/'
rm -rf -- 'docs/reference/gobject/html/api-index-2-36.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-44.html'
rm -rf -- 'docs/reference/gobject/html/pt01.html'
rm -rf -- 'docs/reference/gobject/html/chapter-intro.html'
rm -rf -- 'docs/reference/gobject/html/pr01.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-34.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Closures.html'
rm -rf -- 'docs/reference/gobject/html/tools-vala.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Standard-Parameter-and-Value-Types.html'
rm -rf -- 'docs/reference/gobject/html/ch01s02.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-26.html'
rm -rf -- 'docs/reference/gobject/html/chapter-gobject.html'
rm -rf -- 'docs/reference/gobject/html/up.png'
rm -rf -- 'docs/reference/gobject/html/rn02.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Generic-values.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-42.html'
rm -rf -- 'docs/reference/gobject/html/chapter-signal.html'
rm -rf -- 'docs/reference/gobject/html/tools-gtkdoc.html'
rm -rf -- 'docs/reference/gobject/html/howto-interface-prerequisite.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-30.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Type-Information.html'
rm -rf -- 'docs/reference/gobject/html/api-index-full.html'
rm -rf -- 'docs/reference/gobject/html/howto-interface.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-32.html'
rm -rf -- 'docs/reference/gobject/html/GTypeModule.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-40.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Boxed-Types.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-6.html'
rm -rf -- 'docs/reference/gobject/html/gobject-The-Base-Object-Type.html'
rm -rf -- 'docs/reference/gobject/html/index.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-4.html'
rm -rf -- 'docs/reference/gobject/html/GTypePlugin.html'
rm -rf -- 'docs/reference/gobject/html/howto-interface-override.html'
rm -rf -- 'docs/reference/gobject/html/glib-mkenums.html'
rm -rf -- 'docs/reference/gobject/html/howto-gobject-chainup.html'
rm -rf -- 'docs/reference/gobject/html/right.png'
rm -rf -- 'docs/reference/gobject/html/home.png'
rm -rf -- 'docs/reference/gobject/html/api-index-2-24.html'
rm -rf -- 'docs/reference/gobject/html/annotation-glossary.html'
rm -rf -- 'docs/reference/gobject/html/chapter-gtype.html'
rm -rf -- 'docs/reference/gobject/html/howto-gobject-code.html'
rm -rf -- 'docs/reference/gobject/html/pt02.html'
rm -rf -- 'docs/reference/gobject/html/tools-gob.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-18.html'
rm -rf -- 'docs/reference/gobject/html/GBinding.html'
rm -rf -- 'docs/reference/gobject/html/gobject-query.html'
rm -rf -- 'docs/reference/gobject/html/glue.png'
rm -rf -- 'docs/reference/gobject/html/howto-gobject.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Value-arrays.html'
rm -rf -- 'docs/reference/gobject/html/gobject-memory.html'
rm -rf -- 'docs/reference/gobject/html/howto-gobject-methods.html'
rm -rf -- 'docs/reference/gobject/html/gobject.devhelp2'
rm -rf -- 'docs/reference/gobject/html/howto-interface-properties.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-22.html'
rm -rf -- 'docs/reference/gobject/html/api-index-deprecated.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Enumeration-and-Flag-Types.html'
rm -rf -- 'docs/reference/gobject/html/right-insensitive.png'
rm -rf -- 'docs/reference/gobject/html/tools-ginspector.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-38.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Signals.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-2.html'
rm -rf -- 'docs/reference/gobject/html/glib-genmarshal.html'
rm -rf -- 'docs/reference/gobject/html/gtype-non-instantiable-classed.html'
rm -rf -- 'docs/reference/gobject/html/rn01.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-10.html'
rm -rf -- 'docs/reference/gobject/html/index.sgml'
rm -rf -- 'docs/reference/gobject/html/left-insensitive.png'
rm -rf -- 'docs/reference/gobject/html/up-insensitive.png'
rm -rf -- 'docs/reference/gobject/html/gobject-properties.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-8.html'
rm -rf -- 'docs/reference/gobject/html/howto-signals.html'
rm -rf -- 'docs/reference/gobject/html/gobject-Varargs-Value-Collection.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-14.html'
rm -rf -- 'docs/reference/gobject/html/howto-gobject-destruction.html'
rm -rf -- 'docs/reference/gobject/html/left.png'
rm -rf -- 'docs/reference/gobject/html/gobject-GParamSpec.html'
rm -rf -- 'docs/reference/gobject/html/gtype-conventions.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-28.html'
rm -rf -- 'docs/reference/gobject/html/howto-gobject-construction.html'
rm -rf -- 'docs/reference/gobject/html/style.css'
rm -rf -- 'docs/reference/gobject/html/pt03.html'
rm -rf -- 'docs/reference/gobject/html/gtype-instantiable-classed.html'
rm -rf -- 'docs/reference/gobject/html/signal.html'
rm -rf -- 'docs/reference/gobject/html/howto-interface-implement.html'
rm -rf -- 'docs/reference/gobject/html/api-index-2-12.html'
rm -rf -- 'docs/reference/gobject/html/tools-refdb.html'
rm -rf -- 'docs/reference/gobject/html/gtype-non-instantiable.html'
rm -rf -- 'docs/reference/gobject/version.xml'
rm -rf -- 'glib/makefile.msc'
rm -rf -- 'glib/glib.rc'
rm -rf -- 'glib/glibconfig.h.win32'
rm -rf -- 'build/win32/vs11/glib-compile-resources.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-compile-schemas.vcxproj'
rm -rf -- 'build/win32/vs11/gspawn-win32-helper-console.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gresource.vcxproj'
rm -rf -- 'build/win32/vs11/gmodule.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gthread.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gthread.vcxproj'
rm -rf -- 'build/win32/vs11/gio-querymodules.vcxproj'
rm -rf -- 'build/win32/vs11/gdbus.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gdbus.vcxproj'
rm -rf -- 'build/win32/vs11/glib.sln'
rm -rf -- 'build/win32/vs11/gspawn-win32-helper.vcxproj'
rm -rf -- 'build/win32/vs11/README.txt'
rm -rf -- 'build/win32/vs11/gsettings.vcxproj'
rm -rf -- 'build/win32/vs11/gsettings.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gio.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib.vcxproj'
rm -rf -- 'build/win32/vs11/gresource.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gspawn-win32-helper-console.vcxproj'
rm -rf -- 'build/win32/vs11/gio.vcxproj'
rm -rf -- 'build/win32/vs11/glib-genmarshal.vcxproj'
rm -rf -- 'build/win32/vs11/glib.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-install.props'
rm -rf -- 'build/win32/vs11/gio-querymodules.vcxproj.filters'
rm -rf -- 'build/win32/vs11/gobject.vcxproj'
rm -rf -- 'build/win32/vs11/gspawn-win32-helper.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-gen-srcs.props'
rm -rf -- 'build/win32/vs11/glib-build-defines.props'
rm -rf -- 'build/win32/vs11/gmodule.vcxproj'
rm -rf -- 'build/win32/vs11/glib-compile-schemas.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-install.vcxproj'
rm -rf -- 'build/win32/vs11/glib-genmarshal.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-version-paths.props'
rm -rf -- 'build/win32/vs11/gobject.vcxproj.filters'
rm -rf -- 'build/win32/vs11/glib-compile-resources.vcxproj'
rm -rf -- 'build/win32/vs12/glib-compile-resources.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-compile-schemas.vcxproj'
rm -rf -- 'build/win32/vs12/gspawn-win32-helper-console.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gresource.vcxproj'
rm -rf -- 'build/win32/vs12/gmodule.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gthread.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gthread.vcxproj'
rm -rf -- 'build/win32/vs12/gio-querymodules.vcxproj'
rm -rf -- 'build/win32/vs12/gdbus.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gdbus.vcxproj'
rm -rf -- 'build/win32/vs12/glib.sln'
rm -rf -- 'build/win32/vs12/gspawn-win32-helper.vcxproj'
rm -rf -- 'build/win32/vs12/README.txt'
rm -rf -- 'build/win32/vs12/gsettings.vcxproj'
rm -rf -- 'build/win32/vs12/gsettings.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gio.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib.vcxproj'
rm -rf -- 'build/win32/vs12/gresource.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gspawn-win32-helper-console.vcxproj'
rm -rf -- 'build/win32/vs12/gio.vcxproj'
rm -rf -- 'build/win32/vs12/glib-genmarshal.vcxproj'
rm -rf -- 'build/win32/vs12/glib.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-install.props'
rm -rf -- 'build/win32/vs12/gio-querymodules.vcxproj.filters'
rm -rf -- 'build/win32/vs12/gobject.vcxproj'
rm -rf -- 'build/win32/vs12/gspawn-win32-helper.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-gen-srcs.props'
rm -rf -- 'build/win32/vs12/glib-build-defines.props'
rm -rf -- 'build/win32/vs12/gmodule.vcxproj'
rm -rf -- 'build/win32/vs12/glib-compile-schemas.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-install.vcxproj'
rm -rf -- 'build/win32/vs12/glib-genmarshal.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-version-paths.props'
rm -rf -- 'build/win32/vs12/gobject.vcxproj.filters'
rm -rf -- 'build/win32/vs12/glib-compile-resources.vcxproj'
rm -rf -- 'gmodule/gmodule.rc'
rm -rf -- 'gmodule/makefile.msc'
rm -rf -- 'gobject/gobject.rc'
rm -rf -- 'gobject/makefile.msc'
rm -rf -- 'README'

419
ports/libglib/libglib.patch Normal file
View File

@ -0,0 +1,419 @@
diff --no-dereference -Naur -- libglib.normalized/config.sub libglib.srctix/config.sub
--- libglib.normalized/config.sub 2015-08-19 22:25:02.000000000 +0200
+++ libglib.srctix/config.sub 2015-08-21 00:18:11.011940398 +0200
@@ -1373,7 +1373,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libglib.normalized/configure libglib.srctix/configure
--- libglib.normalized/configure 2015-08-19 22:25:00.000000000 +0200
+++ libglib.srctix/configure 2015-08-21 17:12:42.680738360 +0200
@@ -22140,8 +22140,9 @@
fi
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
+ glib_cv_long_long_format=ll
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ll" >&5
+$as_echo "ll" >&6; }
fi
elif test x$ac_cv_sizeof___int64 = x8; then :
@@ -22244,6 +22245,7 @@
fi
+# TODO: Remove this check and remove G_HAVE_GROWING_STACK from public API.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for growing stack pointer" >&5
$as_echo_n "checking for growing stack pointer... " >&6; }
if ${glib_cv_stack_grows+:} false; then :
@@ -22251,10 +22253,7 @@
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ glib_cv_stack_grows=irrevant
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24149,7 +24148,10 @@
$as_echo "yes" >&6; }
NAMESER_COMPAT_INCLUDE="#include <arpa/nameser_compat.h>"
else
- as_fn_error $? "could not compile test program either way" "$LINENO" 5
+ # PATCH: Sortix doesn't have <arpa/nameser.h> and probably won't by design, so
+ # don't error out here but just report absence.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
@@ -24223,7 +24225,10 @@
$as_echo "in -lbind" >&6; }
NETWORK_LIBS="-lbind $NETWORK_LIBS"
else
- as_fn_error $? "not found" "$LINENO" 5
+ # PATCH: Sortix doesn't have <resolv.h> at this time.
+ #as_fn_error $? "not found" "$LINENO" 5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
@@ -24481,7 +24486,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_vsnprintf_c99=no
+ ac_cv_func_vsnprintf_c99=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24546,7 +24551,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_printf_unix98=no
+ ac_cv_func_printf_unix98=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -24938,7 +24943,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- ac_cv_func_snprintf_c99=no
+ ac_cv_func_snprintf_c99=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25249,6 +25254,7 @@
# Check for strlcpy
+# TODO: The runtime check is to detect an ancient solaris bug so remove it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenBSD strlcpy/strlcat" >&5
$as_echo_n "checking for OpenBSD strlcpy/strlcat... " >&6; }
if ${glib_cv_have_strlcpy+:} false; then :
@@ -25256,7 +25262,7 @@
else
if test "$cross_compiling" = yes; then :
- glib_cv_have_strlcpy=no
+ glib_cv_have_strlcpy=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25620,10 +25626,7 @@
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ glib_cv_uscore=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26980,10 +26983,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ ac_cv_func_posix_getpwuid_r=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -27071,10 +27071,7 @@
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+ ac_cv_func_posix_getgrgid_r=yes
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff --no-dereference -Naur -- libglib.normalized/gio/gdbusmessage.c libglib.srctix/gio/gdbusmessage.c
--- libglib.normalized/gio/gdbusmessage.c 2015-08-19 05:35:30.000000000 +0200
+++ libglib.srctix/gio/gdbusmessage.c 2015-12-18 21:46:23.304628996 +0100
@@ -3474,18 +3474,28 @@
fs = g_string_new (NULL);
if (fstat (fds[n], &statbuf) == 0)
{
+#if defined(__sortix__)
+ g_string_append_printf (fs, "%s" "dev=%" PRIuDEV, fs->len > 0 ? "," : "",
+ statbuf.st_dev);
+#else
g_string_append_printf (fs, "%s" "dev=%d:%d", fs->len > 0 ? "," : "",
major (statbuf.st_dev), minor (statbuf.st_dev));
+#endif
g_string_append_printf (fs, "%s" "mode=0%o", fs->len > 0 ? "," : "",
statbuf.st_mode);
g_string_append_printf (fs, "%s" "ino=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
(guint64) statbuf.st_ino);
- g_string_append_printf (fs, "%s" "uid=%u", fs->len > 0 ? "," : "",
- (guint) statbuf.st_uid);
- g_string_append_printf (fs, "%s" "gid=%u", fs->len > 0 ? "," : "",
- (guint) statbuf.st_gid);
+ g_string_append_printf (fs, "%s" "uid=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
+ (guint64) statbuf.st_uid);
+ g_string_append_printf (fs, "%s" "gid=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
+ (guint64) statbuf.st_gid);
+#if defined(__sortix__)
+ g_string_append_printf (fs, "%s" "rdev=%" PRIuDEV, fs->len > 0 ? "," : "",
+ statbuf.st_rdev);
+#else
g_string_append_printf (fs, "%s" "rdev=%d:%d", fs->len > 0 ? "," : "",
major (statbuf.st_rdev), minor (statbuf.st_rdev));
+#endif
g_string_append_printf (fs, "%s" "size=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
(guint64) statbuf.st_size);
g_string_append_printf (fs, "%s" "atime=%" G_GUINT64_FORMAT, fs->len > 0 ? "," : "",
diff --no-dereference -Naur -- libglib.normalized/gio/ginetsocketaddress.c libglib.srctix/gio/ginetsocketaddress.c
--- libglib.normalized/gio/ginetsocketaddress.c 2014-12-19 22:49:48.000000000 +0100
+++ libglib.srctix/gio/ginetsocketaddress.c 2015-08-21 02:01:50.476080942 +0200
@@ -197,10 +197,10 @@
return FALSE;
}
+ memset (&sock, 0, sizeof(sock));
sock->sin_family = AF_INET;
sock->sin_port = g_htons (addr->priv->port);
memcpy (&(sock->sin_addr.s_addr), g_inet_address_to_bytes (addr->priv->address), sizeof (sock->sin_addr));
- memset (sock->sin_zero, 0, sizeof (sock->sin_zero));
return TRUE;
}
else if (family == AF_INET6)
diff --no-dereference -Naur -- libglib.normalized/gio/gnetworking.h.in libglib.srctix/gio/gnetworking.h.in
--- libglib.normalized/gio/gnetworking.h.in 2015-02-26 13:57:09.000000000 +0100
+++ libglib.srctix/gio/gnetworking.h.in 2015-08-21 01:45:45.144059128 +0200
@@ -41,13 +41,19 @@
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
+#if __has_include(<resolv.h>)
#include <resolv.h>
+#endif
#include <sys/socket.h>
#include <sys/un.h>
+#if __has_include(<net/if.h>)
#include <net/if.h>
+#endif
#include <arpa/inet.h>
+#if __has_include(<arpa/nameser.h>)
#include <arpa/nameser.h>
+#endif
@NAMESER_COMPAT_INCLUDE@
#ifndef T_SRV
diff --no-dereference -Naur -- libglib.normalized/gio/gresolver.c libglib.srctix/gio/gresolver.c
--- libglib.normalized/gio/gresolver.c 2015-08-19 05:35:30.000000000 +0200
+++ libglib.srctix/gio/gresolver.c 2015-08-21 02:09:59.404091990 +0200
@@ -323,8 +323,12 @@
* address, so if inet_aton() succeeds, then it's an address we want
* to reject.
*/
+#if defined(__sortix__)
+ if ((void) addr, (void) ip4addr, 0)
+#else
if (inet_aton (hostname, &ip4addr))
#endif
+#endif
{
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
_("Error resolving '%s': %s"),
diff --no-dereference -Naur -- libglib.normalized/gio/gsocket.c libglib.srctix/gio/gsocket.c
--- libglib.normalized/gio/gsocket.c 2015-08-19 05:35:30.000000000 +0200
+++ libglib.srctix/gio/gsocket.c 2015-08-21 17:50:35.584808179 +0200
@@ -69,6 +69,39 @@
#include "gwin32networking.h"
#endif
+#if defined(__sortix__)
+#ifndef IP_TTL
+#define IP_TTL (-1)
+#endif
+#ifndef IP_MULTICAST_LOOP
+#define IP_MULTICAST_LOOP (-1)
+#endif
+#ifndef IP_MULTICAST_TTL
+#define IP_MULTICAST_TTL (-1)
+#endif
+#if !defined(IP_ADD_MEMBERSHIP) && !defined(IP_DROP_MEMBERSHIP) && !defined(HAVE_IP_MREQN)
+struct ip_mreq
+{
+ struct in_addr imr_multiaddr;
+ struct in_addr imr_interface;
+};
+#endif
+#ifndef IP_ADD_MEMBERSHIP
+#define IP_ADD_MEMBERSHIP (-1)
+#endif
+#ifndef IP_DROP_MEMBERSHIP
+#define IP_DROP_MEMBERSHIP (-1)
+#endif
+#ifndef SO_NREAD
+#define SO_NREAD (-1)
+#endif
+#ifndef CMSG_DATA
+#define CMSG_DATA(x) ((unsigned char*) x)
+#define CMSG_FIRSTHDR(x) ((struct cmsghdr *) NULL)
+#define CMSG_NXTHDR(x, y) ((struct cmsghdr *) NULL)
+#endif
+#endif
+
/**
* SECTION:gsocket
* @short_description: Low-level socket object
@@ -319,7 +352,7 @@
{
struct sockaddr_storage address;
gint fd;
- guint addrlen;
+ socklen_t addrlen;
int value, family;
int errsv;
@@ -1713,7 +1746,7 @@
GError **error)
{
struct sockaddr_storage buffer;
- guint len = sizeof (buffer);
+ socklen_t len = sizeof (buffer);
g_return_val_if_fail (G_IS_SOCKET (socket), NULL);
@@ -1746,7 +1779,7 @@
GError **error)
{
struct sockaddr_storage buffer;
- guint len = sizeof (buffer);
+ socklen_t len = sizeof (buffer);
g_return_val_if_fail (G_IS_SOCKET (socket), NULL);
@@ -4866,7 +4899,7 @@
gint *value,
GError **error)
{
- guint size;
+ socklen_t size;
g_return_val_if_fail (G_IS_SOCKET (socket), FALSE);
@@ -4891,7 +4924,7 @@
/* If the returned value is smaller than an int then we need to
* slide it over into the low-order bytes of *value.
*/
- if (size != sizeof (gint))
+ if (size < sizeof (gint))
*value = *value >> (8 * (sizeof (gint) - size));
#endif
diff --no-dereference -Naur -- libglib.normalized/gio/gthreadedresolver.c libglib.srctix/gio/gthreadedresolver.c
--- libglib.normalized/gio/gthreadedresolver.c 2014-12-19 22:49:48.000000000 +0100
+++ libglib.srctix/gio/gthreadedresolver.c 2015-08-21 02:43:54.636137981 +0200
@@ -22,6 +22,7 @@
#include <glib.h>
#include "glibintl.h"
+#include <endian.h>
#include <stdio.h>
#include <string.h>
@@ -263,7 +264,15 @@
#if defined(G_OS_UNIX)
-#ifdef __BIONIC__
+#if defined(__BIONIC__) || defined(__sortix__)
+#if defined(__sortix__)
+static int h_errno;
+typedef unsigned char u_char;
+#define HOST_NOT_FOUND 1
+#define NO_DATA 2
+#define TRY_AGAIN 3
+#define res_query(a, b, c, d, e) ((void) (a), (void) (b), (void) (c), (void) (d), (void) (e), -1)
+#endif
/* Copy from bionic/libc/private/arpa_nameser_compat.h
* and bionic/libc/private/arpa_nameser.h */
typedef struct {
diff --no-dereference -Naur -- libglib.normalized/gio/gunixmounts.c libglib.srctix/gio/gunixmounts.c
--- libglib.normalized/gio/gunixmounts.c 2015-08-19 05:35:30.000000000 +0200
+++ libglib.srctix/gio/gunixmounts.c 2015-08-21 02:45:52.692140649 +0200
@@ -713,6 +713,20 @@
return return_list;
}
+#elif defined(__sortix__)
+
+static char *
+get_mtab_monitor_file (void)
+{
+ return NULL;
+}
+
+static GList *
+_g_get_unix_mounts (void)
+{
+ return NULL;
+}
+
/* Common code {{{2 */
#else
#error No _g_get_unix_mounts() implementation for system
@@ -1118,6 +1132,14 @@
return _g_get_unix_mounts ();
}
+#elif defined(__sortix__)
+
+static GList *
+_g_get_unix_mount_points (void)
+{
+ return NULL;
+}
+
/* Common code {{{2 */
#else
#error No g_get_mount_table() implementation for system
diff --no-dereference -Naur -- libglib.normalized/Makefile.in libglib.srctix/Makefile.in
--- libglib.normalized/Makefile.in 2015-08-19 22:25:02.000000000 +0200
+++ libglib.srctix/Makefile.in 2015-08-21 16:51:33.956699388 +0200
@@ -1726,6 +1726,7 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
+ -find . -name '*.pyc' -delete
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-local distclean-tags
diff --no-dereference -Naur -- libglib.normalized/tixbuildinfo libglib.srctix/tixbuildinfo
--- libglib.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libglib.srctix/tixbuildinfo 2015-08-21 02:36:36.244128075 +0200
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libglib
+pkg.build-libraries=libiconv gettext libz libffi xz? libdbus?
+pkg.build-system=configure
+pkg.configure.args=--disable-gtk-doc
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

8
ports/libgmp/libgmp.info Normal file
View File

@ -0,0 +1,8 @@
NAME='libgmp'
BUILD_LIBRARIES='libstdc++'
VERSION='6.0.0a'
DISTNAME='gmp-6.0.0a'
ARCHIVE='gmp-6.0.0a.tar.xz'
SHA256SUM='9156d32edac6955bc53b0218f5f3763facb890b73a835d5e1b901dcf8eb8b764'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/gmp'
UPSTREAM_ARCHIVE='gmp-6.0.0a.tar.xz'

71
ports/libgmp/libgmp.patch Normal file
View File

@ -0,0 +1,71 @@
diff --no-dereference -Naur -- libgmp.normalized/configfsf.sub libgmp.srctix/configfsf.sub
--- libgmp.normalized/configfsf.sub 2014-03-25 15:37:55.000000000 +0100
+++ libgmp.srctix/configfsf.sub 2015-08-23 21:16:56.202343213 +0200
@@ -1356,7 +1356,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libgmp.normalized/configure libgmp.srctix/configure
--- libgmp.normalized/configure 2014-03-25 15:38:04.000000000 +0100
+++ libgmp.srctix/configure 2015-08-23 21:57:46.466418480 +0200
@@ -6224,6 +6224,8 @@
1666 to segfault with e.g., -O2 -mpowerpc64. */
#if defined (__GNUC__) && ! defined (__cplusplus)
+h();
+g();
typedef unsigned long long t1;typedef t1*t2;
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
@@ -6288,6 +6290,7 @@
1666 to get an ICE with -O1 -mpowerpc64. */
#if defined (__GNUC__) && ! defined (__cplusplus)
+g();
f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
g(){}
#else
@@ -7777,6 +7780,8 @@
1666 to segfault with e.g., -O2 -mpowerpc64. */
#if defined (__GNUC__) && ! defined (__cplusplus)
+h();
+g();
typedef unsigned long long t1;typedef t1*t2;
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
@@ -7841,6 +7846,7 @@
1666 to get an ICE with -O1 -mpowerpc64. */
#if defined (__GNUC__) && ! defined (__cplusplus)
+g();
f(int u){int i;long long x;x=u?~0:0;if(x)for(i=0;i<9;i++);x&=g();if(x)g();}
g(){}
#else
diff --no-dereference -Naur -- libgmp.normalized/gmp-h.in libgmp.srctix/gmp-h.in
--- libgmp.normalized/gmp-h.in 2014-03-25 15:37:55.000000000 +0100
+++ libgmp.srctix/gmp-h.in 2015-08-23 21:46:52.786398400 +0200
@@ -254,6 +254,7 @@
/* For reference, "defined(EOF)" cannot be used here. In g++ 2.95.4,
<iostream> defines EOF but not FILE. */
#if defined (FILE) \
+ || defined (stdout) \
|| defined (H_STDIO) \
|| defined (_H_STDIO) /* AIX */ \
|| defined (_STDIO_H) /* glibc, Sun, SCO */ \
diff --no-dereference -Naur -- libgmp.normalized/tixbuildinfo libgmp.srctix/tixbuildinfo
--- libgmp.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libgmp.srctix/tixbuildinfo 2015-08-23 21:19:32.046348000 +0200
@@ -0,0 +1,7 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libgmp
+pkg.build-libraries=libstdc++
+pkg.build-system=configure
+pkg.configure.args=--enable-cxx
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libiconv'
BUILD_LIBRARIES=''
VERSION='1.16'
DISTNAME='libiconv-1.16'
ARCHIVE='libiconv-1.16.tar.gz'
SHA256SUM='e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/libiconv'
UPSTREAM_ARCHIVE='libiconv-1.16.tar.gz'

View File

@ -0,0 +1,28 @@
diff --no-dereference -Naur -- libiconv.normalized/src/Makefile.in libiconv.srctix/src/Makefile.in
--- libiconv.normalized/src/Makefile.in 2019-01-27 23:07:13.000000000 +0100
+++ libiconv.srctix/src/Makefile.in 2021-07-19 00:41:55.033969536 +0200
@@ -109,11 +109,13 @@
# refers to a libiconv.so in $prefix/lib since then it sees two libiconv.so's,
# one in $prefix/lib and one in ../lib/.libs. So we have to avoid using
# ../lib/libiconv.la entirely.
+# PATCH: Linking with the installed .la file isn't cross-compilation safe as it
+# doesn't know about the sysroot and DESTDIR.
install : all force
if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
case "@host_os@" in \
hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv @LIBINTL@ $(OBJECTS_RES_@WOE32@) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
- *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
+ *) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.@OBJEXT@ ../srclib/libicrt.a ../lib/libiconv.la @LTLIBINTL@ $(OBJECTS_RES_@WOE32@) -o iconv$(EXEEXT);; \
esac
$(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
diff --no-dereference -Naur -- libiconv.normalized/tixbuildinfo libiconv.srctix/tixbuildinfo
--- libiconv.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libiconv.srctix/tixbuildinfo 2021-03-06 21:24:08.492406407 +0100
@@ -0,0 +1,6 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libiconv
+pkg.build-libraries=
+pkg.build-system=configure
+pkg.post-install.cmd=tix-eradicate-libtool-la

8
ports/libidn/libidn.info Normal file
View File

@ -0,0 +1,8 @@
NAME='libidn'
BUILD_LIBRARIES='libiconv? gettext?'
VERSION='1.33'
DISTNAME='libidn-1.33'
ARCHIVE='libidn-1.33.tar.gz'
SHA256SUM='44a7aab635bb721ceef6beecc4d49dfd19478325e1b47f3196f7d2acc4930e19'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/libidn'
UPSTREAM_ARCHIVE='libidn-1.33.tar.gz'

View File

@ -0,0 +1,25 @@
rm -rf -- 'doc/libidn.pdf'
rm -rf -- 'doc/libidn.html'
rm -rf -- 'doc/reference/libidn.pdf'
rm -rf -- 'doc/reference/html/'
rm -rf -- 'doc/reference/html/libidn-idn-free.html'
rm -rf -- 'doc/reference/html/libidn-stringprep.html'
rm -rf -- 'doc/reference/html/right-insensitive.png'
rm -rf -- 'doc/reference/html/libidn-idna.html'
rm -rf -- 'doc/reference/html/libidn-tld.html'
rm -rf -- 'doc/reference/html/right.png'
rm -rf -- 'doc/reference/html/api-index-full.html'
rm -rf -- 'doc/reference/html/index.sgml'
rm -rf -- 'doc/reference/html/libidn-components.png'
rm -rf -- 'doc/reference/html/home.png'
rm -rf -- 'doc/reference/html/libidn.devhelp2'
rm -rf -- 'doc/reference/html/style.css'
rm -rf -- 'doc/reference/html/up.png'
rm -rf -- 'doc/reference/html/libidn-punycode.html'
rm -rf -- 'doc/reference/html/index.html'
rm -rf -- 'doc/reference/html/intro.html'
rm -rf -- 'doc/reference/html/left.png'
rm -rf -- 'doc/reference/html/up-insensitive.png'
rm -rf -- 'doc/reference/html/libidn-pr29.html'
rm -rf -- 'doc/reference/html/left-insensitive.png'
rm -rf -- 'doc/libidn.ps'

181
ports/libidn/libidn.patch Normal file
View File

@ -0,0 +1,181 @@
diff --no-dereference -Naur -- libidn.normalized/build-aux/config.sub libidn.srctix/build-aux/config.sub
--- libidn.normalized/build-aux/config.sub 2016-07-20 19:20:37.000000000 +0200
+++ libidn.srctix/build-aux/config.sub 2016-09-30 23:17:26.056450852 +0200
@@ -1365,7 +1365,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libidn.normalized/configure libidn.srctix/configure
--- libidn.normalized/configure 2016-07-20 19:20:33.000000000 +0200
+++ libidn.srctix/configure 2016-09-30 23:28:26.840241650 +0200
@@ -1,4 +1,124 @@
#! /bin/sh
+# Make gnulib assume the best about unknown operating systems when cross-compiling.
+export ac_cv_func_calloc_0_nonnull=yes
+export ac_cv_func_chown_works=yes
+export ac_cv_func_getgroups_works=yes
+export ac_cv_func_malloc_0_nonnull=yes
+export gl_cv_func_cbrtl_ieee=yes
+export gl_cv_func_ceilf_ieee=yes
+export gl_cv_func_ceil_ieee=yes
+export gl_cv_func_ceill_ieee=yes
+export gl_cv_func_chown_ctime_works=yes
+export gl_cv_func_chown_slash_works=yes
+export gl_cv_func_exp2l_ieee=yes
+export gl_cv_func_expm1_ieee=yes
+export gl_cv_func_fcntl_f_dupfd_works=yes # Not needed since February 2015
+export gl_cv_func_fdopendir_works=yes
+export gl_cv_func_floorf_ieee=yes
+export gl_cv_func_fmaf_works=yes
+export gl_cv_func_fmal_works=yes
+export gl_cv_func_fma_works=yes
+export gl_cv_func_fmodf_ieee=yes
+export gl_cv_func_fmod_ieee=yes
+export gl_cv_func_fmodl_ieee=yes
+export gl_cv_func_fpurge_works=yes
+export gl_cv_func_futimens_works=yes
+export gl_cv_func_futimesat_works=yes
+export gl_cv_func_getgroups_works=yes
+export gl_cv_func_gettimeofday_clobber=no
+export gl_cv_func_hypotf_ieee=yes
+export gl_cv_func_hypotl_ieee=yes
+export gl_cv_func_hypot_ieee=yes
+export gl_cv_func_isfinitel_works=yes
+export gl_cv_func_isnanl_works=yes
+export gl_cv_func_linkat_slash=yes
+export gl_cv_func_link_works=yes
+export gl_cv_func_log10f_ieee=yes
+export gl_cv_func_log10_ieee=yes
+export gl_cv_func_log1pf_ieee=yes
+export gl_cv_func_log1p_ieee=yes
+export gl_cv_func_log1pl_ieee=yes
+export gl_cv_func_log2f_ieee=yes
+export gl_cv_func_log2_ieee=yes
+export gl_cv_func_logf_ieee=yes
+export gl_cv_func_log_ieee=yes
+export gl_cv_func_lstat_dereferences_slashed_symlink=yes
+export gl_cv_func_mbrlen_empty_input=yes
+export gl_cv_func_mbrtowc_empty_input=yes
+export gl_cv_func_memchr_works=yes
+export gl_cv_func_memmem_works_fast=yes
+export gl_cv_func_mkdir_trailing_dot_works=yes
+export gl_cv_func_mkdir_trailing_slash_works=yes
+export gl_cv_func_mkfifo_works=yes
+export gl_cv_func_mknod_works=yes
+export gl_cv_func_modff_ieee=yes
+export gl_cv_func_modf_ieee=yes
+export gl_cv_func_modfl_ieee=yes
+export gl_cv_func_nanosleep=yes
+export gl_cv_func_open_directory_works=yes
+export gl_cv_func_perror_works=yes
+export gl_cv_func_printf_directive_a=yes
+export gl_cv_func_printf_directive_f=yes
+export gl_cv_func_printf_directive_n=yes
+export gl_cv_func_printf_enomem=yes
+export gl_cv_func_printf_flag_zero=yes
+export gl_cv_func_printf_infinite_long_double=yes
+export gl_cv_func_printf_infinite=yes
+export gl_cv_func_printf_sizes_c99=yes
+export gl_cv_func_pselect_detects_ebadf=yes
+export gl_cv_func_ptsname_sets_errno=yes
+export gl_cv_func_readlink_works=yes
+export gl_cv_func_realpath_works=yes
+export gl_cv_func_remainderf_ieee=yes
+export gl_cv_func_remainder_ieee=yes
+export gl_cv_func_remainderl_ieee=yes
+export gl_cv_func_rename_dest_works=yes
+export gl_cv_func_rename_link_works=yes
+export gl_cv_func_rename_slash_dst_works=yes
+export gl_cv_func_rename_slash_src_works=yes
+export gl_cv_func_rmdir_works=yes
+export gl_cv_func_roundf_ieee=yes
+export gl_cv_func_round_ieee=yes
+export gl_cv_func_select_detects_ebadf=yes
+export gl_cv_func_setenv_works=yes
+export gl_cv_func_signbit_gcc=yes
+export gl_cv_func_signbit=yes
+export gl_cv_func_sleep_works=yes
+export gl_cv_func_snprintf_directive_n=yes
+export gl_cv_func_snprintf_retval_c99=yes
+export gl_cv_func_snprintf_truncation_c99=yes
+export gl_cv_func_stat_dir_slash=yes
+export gl_cv_func_stat_file_slash=yes
+export gl_cv_func_stpncpy=yes
+export gl_cv_func_strcasestr_linear=yes
+export gl_cv_func_strchrnul_works=yes
+export gl_cv_func_strerror_0_works=yes
+export gl_cv_func_strstr_linear=yes
+export gl_cv_func_strtod_works=yes
+export gl_cv_func_svid_putenv=yes
+export gl_cv_func_symlink_works=yes
+export gl_cv_func_tdelete_works=yes
+export gl_cv_func_truncf_ieee=yes
+export gl_cv_func_trunc_ieee=yes
+export gl_cv_func_truncl_ieee=yes
+export gl_cv_func_tzset_clobber=no
+export gl_cv_func_ungetc_works=yes
+export gl_cv_func_unlink_honors_slashes=yes
+export gl_cv_func_unsetenv_works=yes
+export gl_cv_func_usleep_works=yes
+export gl_cv_func_utimensat_works=yes
+export gl_cv_func_vsnprintf_posix=yes
+export gl_cv_func_vsnprintf_zerosize_c99=yes
+export gl_cv_func_vsprintf_posix=yes
+export gl_cv_func_wcwidth_works=yes
+export gl_cv_func_working_getdelim=yes
+export gl_cv_func_working_mkstemp=yes
+export gl_cv_func_working_mktime=yes
+export gl_cv_func_working_strerror=yes
+export ac_cv_func___fseterr=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_func_getcwd_null=yes # Only if the OS actually supports this, Sortix does.
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
+export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for GNU Libidn 1.33.
#
diff --no-dereference -Naur -- libidn.normalized/doc/Makefile.in libidn.srctix/doc/Makefile.in
--- libidn.normalized/doc/Makefile.in 2016-07-20 19:22:54.000000000 +0200
+++ libidn.srctix/doc/Makefile.in 2016-10-01 01:17:51.702873828 +0200
@@ -1502,8 +1502,8 @@
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+.PRECIOUS: Makefile.disabled
+Makefile.disabled: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
diff --no-dereference -Naur -- libidn.normalized/Makefile.in libidn.srctix/Makefile.in
--- libidn.normalized/Makefile.in 2016-07-20 19:20:37.000000000 +0200
+++ libidn.srctix/Makefile.in 2016-10-01 01:20:12.887410534 +0200
@@ -1662,6 +1662,11 @@
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
+ -rm -f config.log
+ -rm -f config.status
+ -rm -rf gl/sys
+ -rm -rf lib/gl/sys
+ -rm -f doc/Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags
diff --no-dereference -Naur -- libidn.normalized/tixbuildinfo libidn.srctix/tixbuildinfo
--- libidn.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libidn.srctix/tixbuildinfo 2016-10-01 01:20:35.974844194 +0200
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libidn
+pkg.build-libraries=libiconv? gettext?
+pkg.build-system=configure
+pkg.configure.args=
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,2 @@
NAME='libintl'
SOURCE_PACKAGE='gettext'

View File

@ -0,0 +1,16 @@
diff --no-dereference -Naur -- libintl.normalized/tixbuildinfo libintl.srctix/tixbuildinfo
--- libintl.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libintl.srctix/tixbuildinfo 2016-12-26 14:14:34.922099779 +0100
@@ -0,0 +1,12 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libintl
+pkg.source-package=gettext
+pkg.build-libraries=libiconv
+pkg.subdir=gettext-runtime
+pkg.build-system=configure
+# libstdc++ is a dependency if libasprintf is enabled. Right now, I suspect it
+# is more trouble than it is worth, so it's disabled. Does anything of value
+# actually use it?
+pkg.configure.args=--disable-libasprintf
+pkg.post-install.cmd=tix-eradicate-libtool-la

View File

@ -0,0 +1,8 @@
NAME='libjpeg'
BUILD_LIBRARIES=''
VERSION='jpegsrc.v9'
DISTNAME='jpegsrc.v9'
ARCHIVE='jpegsrc.v9.tar.gz'
SHA256SUM='c4e29e9375aaf60b4b79db87a58b063fb5b84f923bee97a88280b3d159e7e535'
UPSTREAM_SITE='https://pub.sortix.org/mirror/libjpeg'
UPSTREAM_ARCHIVE='jpegsrc.v9.tar.gz'

View File

@ -0,0 +1,25 @@
diff --no-dereference -Naur -- libjpeg.normalized/config.sub libjpeg.srctix/config.sub
--- libjpeg.normalized/config.sub 2013-01-03 19:58:54.000000000 +0100
+++ libjpeg.srctix/config.sub 2013-04-17 23:23:42.500802904 +0200
@@ -1356,7 +1356,7 @@
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* | -aros* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --no-dereference -Naur -- libjpeg.normalized/tixbuildinfo libjpeg.srctix/tixbuildinfo
--- libjpeg.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ libjpeg.srctix/tixbuildinfo 2013-11-29 00:57:56.229175701 +0100
@@ -0,0 +1,9 @@
+tix.version=1
+tix.class=srctix
+pkg.name=libjpeg
+pkg.build-libraries=
+pkg.build-system=configure
+# TODO: Curiously, the programs shipped with libjpeg have the target name prefixed.
+pkg.configure.args=--program-prefix=
+pkg.make.vars=V=1
+pkg.post-install.cmd=tix-eradicate-libtool-la

2
ports/liblua/liblua.info Normal file
View File

@ -0,0 +1,2 @@
NAME='liblua'
SOURCE_PACKAGE='lua'

12
ports/liblua/liblua.patch Normal file
View File

@ -0,0 +1,12 @@
diff --no-dereference -Naur -- liblua.normalized/tixbuildinfo liblua.srctix/tixbuildinfo
--- liblua.normalized/tixbuildinfo 1970-01-01 01:00:00.000000000 +0100
+++ liblua.srctix/tixbuildinfo 2017-04-11 23:33:28.888103752 +0200
@@ -0,0 +1,8 @@
+tix.version=1
+tix.class=srctix
+pkg.name=liblua
+pkg.source-package=lua
+pkg.build-libraries=
+pkg.build-system=makefile
+pkg.make.build-target=lib
+pkg.make.install-target=install-lib

8
ports/libmpc/libmpc.info Normal file
View File

@ -0,0 +1,8 @@
NAME='libmpc'
BUILD_LIBRARIES='libgmp libmpfr'
VERSION='1.0.3'
DISTNAME='mpc-1.0.3'
ARCHIVE='mpc-1.0.3.tar.gz'
SHA256SUM='617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3'
UPSTREAM_SITE='https://ftp.gnu.org/gnu/mpc'
UPSTREAM_ARCHIVE='mpc-1.0.3.tar.gz'

Some files were not shown because too many files have changed in this diff Show More