# HG changeset patch
# User Mike Becker
# Date 1740866130 -3600
# Node ID eb16be99b0adbe4d192d4f7eb43505d0af1e6fe3
# Parent 0ce35348550912d820087d5ca1db4db3c6f67c3c
update to newest versions of uwproj and ucx
diff -r 0ce353485509 -r eb16be99b0ad configure
--- a/configure Sun Oct 06 20:49:43 2024 +0200
+++ b/configure Sat Mar 01 22:55:30 2025 +0100
@@ -1,5 +1,118 @@
#!/bin/sh
+
+# some utility functions
+isplatform()
+{
+ for p in $PLATFORM
+ do
+ if [ "$p" = "$1" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+notisplatform()
+{
+ for p in $PLATFORM
+ do
+ if [ "$p" = "$1" ]; then
+ return 1
+ fi
+ done
+ return 0
+}
+istoolchain()
+{
+ for t in $TOOLCHAIN
+ do
+ if [ "$t" = "$1" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+notistoolchain()
+{
+ for t in $TOOLCHAIN
+ do
+ if [ "$t" = "$1" ]; then
+ return 1
+ fi
+ done
+ return 0
+}
+
+# clean abort
+abort_configure()
+{
+ rm -Rf "$TEMP_DIR"
+ exit 1
+}
+
+# Test for availability of pkg-config
+PKG_CONFIG=`command -v pkg-config`
+: ${PKG_CONFIG:="false"}
+
+# Simple uname based platform detection
+# $PLATFORM is used for platform dependent dependency selection
+OS=`uname -s`
+OS_VERSION=`uname -r`
+printf "detect platform... "
+if [ "$OS" = "SunOS" ]; then
+ PLATFORM="solaris sunos unix svr4"
+elif [ "$OS" = "Linux" ]; then
+ PLATFORM="linux unix"
+elif [ "$OS" = "FreeBSD" ]; then
+ PLATFORM="freebsd bsd unix"
+elif [ "$OS" = "OpenBSD" ]; then
+ PLATFORM="openbsd bsd unix"
+elif [ "$OS" = "NetBSD" ]; then
+ PLATFORM="netbsd bsd unix"
+elif [ "$OS" = "Darwin" ]; then
+ PLATFORM="macos osx bsd unix"
+elif echo "$OS" | grep -i "MINGW" > /dev/null; then
+ PLATFORM="windows mingw"
+fi
+: ${PLATFORM:="unix"}
+
+PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
+echo "$PLATFORM_NAME"
+
+
+# help text
+printhelp()
+{
+ echo "Usage: $0 [OPTIONS]..."
+ cat << __EOF__
+Installation directories:
+ --prefix=PREFIX path prefix for architecture-independent files
+ [$prefix]
+ --exec-prefix=EPREFIX path prefix for architecture-dependent files
+ [PREFIX]
+
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR system configuration files [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+
+Build Types:
+--debug add extra compile flags for debug builds
+--release add extra compile flags for release builds
+
+__EOF__
+}
+
# create temporary directory
TEMP_DIR=".tmp-`uname -n`"
rm -Rf "$TEMP_DIR"
@@ -36,42 +149,6 @@
# features
-# clean abort
-abort_configure()
-{
- rm -Rf "$TEMP_DIR"
- exit 1
-}
-
-# help text
-printhelp()
-{
- echo "Usage: $0 [OPTIONS]..."
- cat << __EOF__
-Installation directories:
- --prefix=PREFIX path prefix for architecture-independent files
- [/usr]
- --exec-prefix=EPREFIX path prefix for architecture-dependent files
- [PREFIX]
-
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR system configuration files [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
-
-__EOF__
-}
-
#
# parse arguments
#
@@ -94,9 +171,9 @@
"--infodir="*) infodir=${ARG#--infodir=} ;;
"--mandir"*) mandir=${ARG#--mandir} ;;
"--localedir"*) localedir=${ARG#--localedir} ;;
- "--help"*) printhelp; abort_configure ;;
- "--debug") BUILD_TYPE="debug" ;;
- "--release") BUILD_TYPE="release" ;;
+ "--help"*) printhelp; abort_configure ;;
+ "--debug") BUILD_TYPE="debug" ;;
+ "--release") BUILD_TYPE="release" ;;
"-"*) echo "unknown option: $ARG"; abort_configure ;;
esac
done
@@ -138,75 +215,25 @@
echo ok
fi
-# Test for availability of pkg-config
-PKG_CONFIG=`command -v pkg-config`
-: ${PKG_CONFIG:="false"}
-
-# Simple uname based platform detection
-# $PLATFORM is used for platform dependent dependency selection
-OS=`uname -s`
-OS_VERSION=`uname -r`
-printf "detect platform... "
-if [ "$OS" = "SunOS" ]; then
- PLATFORM="solaris sunos unix svr4"
-fi
-if [ "$OS" = "Linux" ]; then
- PLATFORM="linux unix"
-fi
-if [ "$OS" = "FreeBSD" ]; then
- PLATFORM="freebsd bsd unix"
-fi
-if [ "$OS" = "Darwin" ]; then
- PLATFORM="macos osx bsd unix"
-fi
-if echo "$OS" | grep -i "MINGW" > /dev/null; then
- PLATFORM="windows mingw"
-fi
-: ${PLATFORM:="unix"}
-
-PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
-echo "$PLATFORM_NAME"
-
-isplatform()
-{
- for p in $PLATFORM
- do
- if [ "$p" = "$1" ]; then
- return 0
- fi
- done
- return 1
-}
-notisplatform()
-{
- for p in $PLATFORM
- do
- if [ "$p" = "$1" ]; then
- return 1
- fi
- done
- return 0
-}
-
# generate vars.mk
cat > "$TEMP_DIR/vars.mk" << __EOF__
-prefix="$prefix"
-exec_prefix="$exec_prefix"
-bindir="$bindir"
-sbindir="$sbindir"
-libdir="$libdir"
-libexecdir="$libexecdir"
-datarootdir="$datarootdir"
-datadir="$datadir"
-sysconfdir="$sysconfdir"
-sharedstatedir="$sharedstatedir"
-localstatedir="$localstatedir"
-runstatedir="$runstatedir"
-includedir="$includedir"
-infodir="$infodir"
-mandir="$mandir"
-localedir="$localedir"
+prefix=$prefix
+exec_prefix=$exec_prefix
+bindir=$bindir
+sbindir=$sbindir
+libdir=$libdir
+libexecdir=$libexecdir
+datarootdir=$datarootdir
+datadir=$datadir
+sysconfdir=$sysconfdir
+sharedstatedir=$sharedstatedir
+localstatedir=$localstatedir
+runstatedir=$runstatedir
+includedir=$includedir
+infodir=$infodir
+mandir=$mandir
+localedir=$localedir
__EOF__
# toolchain detection utilities
@@ -239,9 +266,17 @@
return 0
}
+print_check_msg()
+{
+ if [ -z "$1" ]; then
+ shift
+ printf "$@"
+ fi
+}
+
dependency_error_sdl2_ttf()
{
- printf "checking for sdl2_ttf... "
+ print_check_msg "$dep_checked_sdl2_ttf" "checking for sdl2_ttf... "
# dependency sdl2_ttf
while true
do
@@ -254,16 +289,18 @@
else
break
fi
- echo yes
+ print_check_msg "$dep_checked_sdl2_ttf" "yes\n"
+ dep_checked_sdl2_ttf=1
return 1
done
- echo no
+ print_check_msg "$dep_checked_sdl2_ttf" "no\n"
+ dep_checked_sdl2_ttf=1
return 0
}
dependency_error_sdl2()
{
- printf "checking for sdl2... "
+ print_check_msg "$dep_checked_sdl2" "checking for sdl2... "
# dependency sdl2
while true
do
@@ -276,16 +313,18 @@
else
break
fi
- echo yes
+ print_check_msg "$dep_checked_sdl2" "yes\n"
+ dep_checked_sdl2=1
return 1
done
- echo no
+ print_check_msg "$dep_checked_sdl2" "no\n"
+ dep_checked_sdl2=1
return 0
}
dependency_error_glew()
{
- printf "checking for glew... "
+ print_check_msg "$dep_checked_glew" "checking for glew... "
# dependency glew
while true
do
@@ -298,16 +337,18 @@
else
break
fi
- echo yes
+ print_check_msg "$dep_checked_glew" "yes\n"
+ dep_checked_glew=1
return 1
done
- echo no
+ print_check_msg "$dep_checked_glew" "no\n"
+ dep_checked_glew=1
return 0
}
dependency_error_ucx()
{
- printf "checking for ucx... "
+ print_check_msg "$dep_checked_ucx" "checking for ucx... "
# dependency ucx
while true
do
@@ -317,26 +358,25 @@
break
fi
TEMP_LDFLAGS="$TEMP_LDFLAGS -lucx"
- echo yes
+ print_check_msg "$dep_checked_ucx" "yes\n"
+ dep_checked_ucx=1
return 1
done
- echo no
+ print_check_msg "$dep_checked_ucx" "no\n"
+ dep_checked_ucx=1
return 0
}
-
-
-
# start collecting dependency information
echo > "$TEMP_DIR/flags.mk"
DEPENDENCIES_FAILED=
ERROR=0
# unnamed dependencies
-TEMP_CFLAGS=
-TEMP_CXXFLAGS=
-TEMP_LDFLAGS=
+TEMP_CFLAGS="$CFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+TEMP_LDFLAGS="$LDFLAGS"
while true
do
while true
@@ -353,10 +393,10 @@
# add general dependency flags to flags.mk
echo "# general flags" >> "$TEMP_DIR/flags.mk"
-if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
+if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
fi
-if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
+if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
fi
if [ -n "${TEMP_LDFLAGS}" ]; then
@@ -398,10 +438,10 @@
# Features
-if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
+if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
fi
-if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
+if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
fi
if [ "$BUILD_TYPE" = "debug" ]; then
@@ -450,5 +490,3 @@
write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
rm -Rf "$TEMP_DIR"
-
-
diff -r 0ce353485509 -r eb16be99b0ad make/configure.vm
--- a/make/configure.vm Sun Oct 06 20:49:43 2024 +0200
+++ b/make/configure.vm Sat Mar 01 22:55:30 2025 +0100
@@ -1,5 +1,133 @@
#!/bin/sh
+#set( $D = '$' )
+#[[
+# some utility functions
+isplatform()
+{
+ for p in $PLATFORM
+ do
+ if [ "$p" = "$1" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+notisplatform()
+{
+ for p in $PLATFORM
+ do
+ if [ "$p" = "$1" ]; then
+ return 1
+ fi
+ done
+ return 0
+}
+istoolchain()
+{
+ for t in $TOOLCHAIN
+ do
+ if [ "$t" = "$1" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+notistoolchain()
+{
+ for t in $TOOLCHAIN
+ do
+ if [ "$t" = "$1" ]; then
+ return 1
+ fi
+ done
+ return 0
+}
+
+# clean abort
+abort_configure()
+{
+ rm -Rf "$TEMP_DIR"
+ exit 1
+}
+
+# Test for availability of pkg-config
+PKG_CONFIG=`command -v pkg-config`
+: ${PKG_CONFIG:="false"}
+
+# Simple uname based platform detection
+# $PLATFORM is used for platform dependent dependency selection
+OS=`uname -s`
+OS_VERSION=`uname -r`
+printf "detect platform... "
+if [ "$OS" = "SunOS" ]; then
+ PLATFORM="solaris sunos unix svr4"
+elif [ "$OS" = "Linux" ]; then
+ PLATFORM="linux unix"
+elif [ "$OS" = "FreeBSD" ]; then
+ PLATFORM="freebsd bsd unix"
+elif [ "$OS" = "OpenBSD" ]; then
+ PLATFORM="openbsd bsd unix"
+elif [ "$OS" = "NetBSD" ]; then
+ PLATFORM="netbsd bsd unix"
+elif [ "$OS" = "Darwin" ]; then
+ PLATFORM="macos osx bsd unix"
+elif echo "$OS" | grep -i "MINGW" > /dev/null; then
+ PLATFORM="windows mingw"
+fi
+: ${PLATFORM:="unix"}
+
+PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
+echo "$PLATFORM_NAME"
+]]#
+
+# help text
+printhelp()
+{
+ echo "Usage: $0 [OPTIONS]..."
+ cat << __EOF__
+Installation directories:
+ --prefix=PREFIX path prefix for architecture-independent files
+ [${D}prefix]
+ --exec-prefix=EPREFIX path prefix for architecture-dependent files
+ [PREFIX]
+
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR system configuration files [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+
+Build Types:
+--debug add extra compile flags for debug builds
+--release add extra compile flags for release builds
+#if( $options.size() > 0 )
+
+Options:
+#foreach( $opt in $options )
+ --${opt.argument}=${opt.valuesString}
+#end
+#end
+#if( $features.size() > 0 )
+
+Optional Features:
+#foreach( $feature in $features )
+${feature.helpText}
+#end
+#end
+
+__EOF__
+}
+
# create temporary directory
TEMP_DIR=".tmp-`uname -n`"
rm -Rf "$TEMP_DIR"
@@ -33,12 +161,23 @@
mandir=
# custom variables
-#foreach( $var in $vars )
-#if( $var.exec )
-${var.varName}=`${var.value}`
-#else
-${var.varName}="${var.value}"
+#foreach( $cfg in $config )
+if true \
+#if( $cfg.platform )
+ && isplatform "${cfg.platform}" \
+#end
+#foreach( $np in $cfg.notList )
+ && notisplatform "${np}" \
#end
+ ; then
+ #foreach( $var in $cfg.vars )
+ #if( $var.exec )
+ ${var.varName}=`${var.value}`
+ #else
+ ${var.varName}="${var.value}"
+ #end
+ #end
+fi
#end
# features
@@ -48,67 +187,10 @@
#end
#end
-# clean abort
-abort_configure()
-{
- rm -Rf "$TEMP_DIR"
- exit 1
-}
-
-# help text
-printhelp()
-{
- echo "Usage: $0 [OPTIONS]..."
- cat << __EOF__
-Installation directories:
- --prefix=PREFIX path prefix for architecture-independent files
- [/usr]
- --exec-prefix=EPREFIX path prefix for architecture-dependent files
- [PREFIX]
-
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR system admin executables [EPREFIX/sbin]
- --libexecdir=DIR program executables [EPREFIX/libexec]
- --sysconfdir=DIR system configuration files [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
- --libdir=DIR object code libraries [EPREFIX/lib]
- --includedir=DIR C header files [PREFIX/include]
- --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
- --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- --infodir=DIR info documentation [DATAROOTDIR/info]
- --mandir=DIR man documentation [DATAROOTDIR/man]
- --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
-
-#if( $options.size() > 0 )
-Options:
- --debug add extra compile flags for debug builds
- --release add extra compile flags for release builds
-#foreach( $opt in $options )
- --${opt.argument}=${opt.valuesString}
-#end
-
-#end
-#if( $features.size() > 0 )
-Optional Features:
-#foreach( $feature in $features )
-#if( $feature.auto )
- --disable-${feature.arg}
-#else
- --enable-${feature.arg}
-#end
-#end
-
-#end
-__EOF__
-}
-
#
# parse arguments
#
BUILD_TYPE="default"
-#set( $D = '$' )
for ARG in "$@"
do
case "$ARG" in
@@ -127,11 +209,12 @@
"--infodir="*) infodir=${D}{ARG#--infodir=} ;;
"--mandir"*) mandir=${D}{ARG#--mandir} ;;
"--localedir"*) localedir=${D}{ARG#--localedir} ;;
- "--help"*) printhelp; abort_configure ;;
- "--debug") BUILD_TYPE="debug" ;;
- "--release") BUILD_TYPE="release" ;;
+ "--help"*) printhelp; abort_configure ;;
+ "--debug") BUILD_TYPE="debug" ;;
+ "--release") BUILD_TYPE="release" ;;
#foreach( $opt in $options )
"--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;;
+ "--${opt.argument}") echo "option '$ARG' needs a value:"; echo " $ARG=${opt.valuesString}"; abort_configure ;;
#end
#foreach( $feature in $features )
"--enable-${feature.arg}") ${feature.varName}=on ;;
@@ -178,79 +261,29 @@
. "$prefix/etc/config.site"
echo ok
fi
-
-# Test for availability of pkg-config
-PKG_CONFIG=`command -v pkg-config`
-: ${PKG_CONFIG:="false"}
-
-# Simple uname based platform detection
-# $PLATFORM is used for platform dependent dependency selection
-OS=`uname -s`
-OS_VERSION=`uname -r`
-printf "detect platform... "
-if [ "$OS" = "SunOS" ]; then
- PLATFORM="solaris sunos unix svr4"
-fi
-if [ "$OS" = "Linux" ]; then
- PLATFORM="linux unix"
-fi
-if [ "$OS" = "FreeBSD" ]; then
- PLATFORM="freebsd bsd unix"
-fi
-if [ "$OS" = "Darwin" ]; then
- PLATFORM="macos osx bsd unix"
-fi
-if echo "$OS" | grep -i "MINGW" > /dev/null; then
- PLATFORM="windows mingw"
-fi
-: ${PLATFORM:="unix"}
-
-PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
-echo "$PLATFORM_NAME"
-
-isplatform()
-{
- for p in $PLATFORM
- do
- if [ "$p" = "$1" ]; then
- return 0
- fi
- done
- return 1
-}
-notisplatform()
-{
- for p in $PLATFORM
- do
- if [ "$p" = "$1" ]; then
- return 1
- fi
- done
- return 0
-}
]]#
## End of unparsed content **
# generate vars.mk
cat > "$TEMP_DIR/vars.mk" << __EOF__
-prefix="$prefix"
-exec_prefix="$exec_prefix"
-bindir="$bindir"
-sbindir="$sbindir"
-libdir="$libdir"
-libexecdir="$libexecdir"
-datarootdir="$datarootdir"
-datadir="$datadir"
-sysconfdir="$sysconfdir"
-sharedstatedir="$sharedstatedir"
-localstatedir="$localstatedir"
-runstatedir="$runstatedir"
-includedir="$includedir"
-infodir="$infodir"
-mandir="$mandir"
-localedir="$localedir"
+prefix=$prefix
+exec_prefix=$exec_prefix
+bindir=$bindir
+sbindir=$sbindir
+libdir=$libdir
+libexecdir=$libexecdir
+datarootdir=$datarootdir
+datadir=$datadir
+sysconfdir=$sysconfdir
+sharedstatedir=$sharedstatedir
+localstatedir=$localstatedir
+runstatedir=$runstatedir
+includedir=$includedir
+infodir=$infodir
+mandir=$mandir
+localedir=$localedir
#foreach( $var in $vars )
-${var.varName}="${D}${var.varName}"
+${var.varName}=${D}${var.varName}
#end
__EOF__
@@ -286,10 +319,18 @@
return 0
}
+print_check_msg()
+{
+ if [ -z "$1" ]; then
+ shift
+ printf "$@"
+ fi
+}
+
#foreach( $dependency in $namedDependencies )
dependency_error_${dependency.id}()
{
- printf "checking for ${dependency.name}... "
+ print_check_msg "${D}dep_checked_${dependency.id}" "checking for ${dependency.name}... "
#foreach( $sub in $dependency.subdependencies )
# dependency $sub.fullName
while true
@@ -299,8 +340,13 @@
break
fi
#end
+ #if( $sub.toolchain )
+ if notistoolchain "${sub.toolchain}"; then
+ break
+ fi
+ #end
#foreach( $np in $sub.notList )
- if isplatform "${np}"; then
+ if isplatform "${np}" || istoolchain "${np}"; then
break
fi
#end
@@ -346,19 +392,18 @@
$sub.make
__EOF__
#end
- echo yes
+ print_check_msg "${D}dep_checked_${dependency.id}" "yes\n"
+ dep_checked_${dependency.id}=1
return 1
done
#end
- echo no
+ print_check_msg "${D}dep_checked_${dependency.id}" "no\n"
+ dep_checked_${dependency.id}=1
return 0
}
#end
-
-
-
# start collecting dependency information
echo > "$TEMP_DIR/flags.mk"
@@ -366,9 +411,9 @@
ERROR=0
#if( $dependencies.size() > 0 )
# unnamed dependencies
-TEMP_CFLAGS=
-TEMP_CXXFLAGS=
-TEMP_LDFLAGS=
+TEMP_CFLAGS="$CFLAGS"
+TEMP_CXXFLAGS="$CXXFLAGS"
+TEMP_LDFLAGS="$LDFLAGS"
#foreach( $dependency in $dependencies )
while true
do
@@ -377,8 +422,13 @@
break
fi
#end
+ #if( $dependency.toolchain )
+ if notistoolchain "${dependency.toolchain}"; then
+ break
+ fi
+ #end
#foreach( $np in $dependency.notList )
- if isplatform "${np}"; then
+ if isplatform "${np}" || istoolchain "${np}"; then
break
fi
#end
@@ -397,13 +447,15 @@
fi
#end
#foreach( $pkg in $dependency.pkgconfig )
- printf "checking for pkg-config package $pkg.name... "
+ print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "checking for pkg-config package $pkg.name... "
if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then
- echo yes
+ print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "yes\n"
+ dep_pkgconfig_checked_${pkg.id}=1
TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`"
TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`"
else
- echo no
+ print_check_msg "${D}dep_pkgconfig_checked_${pkg.id}" "no\n"
+ dep_pkgconfig_checked_${pkg.id}=1
ERROR=1
break
fi
@@ -435,10 +487,10 @@
# add general dependency flags to flags.mk
echo "# general flags" >> "$TEMP_DIR/flags.mk"
-if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
+if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
fi
-if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
+if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
fi
if [ -n "${TEMP_LDFLAGS}" ]; then
@@ -519,6 +571,35 @@
unset ${feature.varName}
fi
fi
+if [ -n "${D}${feature.varName}" ]; then
+ :
+#foreach( $def in $feature.defines )
+ TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
+ TEMP_CXXFLAGS="$TEMP_CXXFLAGS ${def.toFlags()}"
+#end
+#if( $feature.hasMake() )
+ cat >> "$TEMP_DIR/make.mk" << __EOF__
+$feature.make
+__EOF__
+#end
+else
+ :
+#foreach( $def in $feature.disabled.defines )
+ TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
+ TEMP_CXXFLAGS="$TEMP_CXXFLAGS ${def.toFlags()}"
+#end
+#if( $feature.disabled.hasMake() )
+ cat >> "$TEMP_DIR/make.mk" << __EOF__
+$feature.disabled.make
+__EOF__
+#end
+#foreach( $dependency in $feature.disabled.dependencies )
+ if dependency_error_$dependency ; then
+ DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
+ ERROR=1
+ fi
+#end
+fi
#end
#foreach( $opt in $target.options )
@@ -565,14 +646,19 @@
DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED"
fi
#end
+ else
+ echo
+ echo "Invalid option value - usage:"
+ echo " --${opt.argument}=${opt.valuesString}"
+ abort_configure
fi
fi
#end
-if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
+if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
fi
-if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
+if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
fi
if [ "$BUILD_TYPE" = "debug" ]; then
@@ -636,5 +722,3 @@
write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
rm -Rf "$TEMP_DIR"
-
-
diff -r 0ce353485509 -r eb16be99b0ad make/project.xml
--- a/make/project.xml Sun Oct 06 20:49:43 2024 +0200
+++ b/make/project.xml Sat Mar 01 22:55:30 2025 +0100
@@ -1,5 +1,5 @@
-
+
c
diff -r 0ce353485509 -r eb16be99b0ad make/toolchain.sh
--- a/make/toolchain.sh Sun Oct 06 20:49:43 2024 +0200
+++ b/make/toolchain.sh Sat Mar 01 22:55:30 2025 +0100
@@ -3,64 +3,74 @@
# toolchain detection
#
-C_COMPILERS="gcc clang suncc cc"
-CPP_COMPILERS="g++ clang++ sunCC CC"
+if isplatform "bsd" && notisplatform "openbsd"; then
+ C_COMPILERS="clang gcc cc"
+ CPP_COMPILERS="clang++ g++ CC"
+else
+ C_COMPILERS="gcc clang suncc cc"
+ CPP_COMPILERS="g++ clang++ sunCC CC"
+fi
+unset TOOLCHAIN
unset TOOLCHAIN_NAME
unset TOOLCHAIN_CC
unset TOOLCHAIN_CXX
check_c_compiler()
{
- cat > "$TEMP_DIR/test.c" << __EOF__
+ cat > "$TEMP_DIR/test.c" << __EOF__
/* test file */
#include
int main(int argc, char **argv) {
-#if defined(__clang__)
- printf("clang\n");
+#if defined(_MSC_VER)
+ printf("msc\n");
+#elif defined(__clang__)
+ printf("clang gnuc\n");
#elif defined(__GNUC__)
- printf("gcc\n");
+ printf("gcc gnuc\n");
#elif defined(__sun)
- printf("suncc\n");
+ printf("suncc\n");
#else
- printf("unknown\n");
+ printf("unknown\n");
#endif
- return 0;
+ return 0;
}
__EOF__
- rm -f "$TEMP_DIR/checkcc"
- $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
+ rm -f "$TEMP_DIR/checkcc"
+ $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
}
check_cpp_compiler()
{
- cat > "$TEMP_DIR/test.cpp" << __EOF__
+ cat > "$TEMP_DIR/test.cpp" << __EOF__
/* test file */
#include
int main(int argc, char **argv) {
-#if defined(__clang__)
- std::cout << "clang" << std::endl;
+#if defined(_MSC_VER)
+ std::cout << "msc" << std::endl;
+#elif defined(__clang__)
+ std::cout << "clang gnuc" << std::endl;
#elif defined(__GNUC__)
- std::cout << "gcc" << std::endl;
+ std::cout << "gcc gnuc" << std::endl;
#elif defined(__sun)
- std::cout << "suncc" << std::endl;
+ std::cout << "suncc" << std::endl;
#else
- std::cout << "cc" << std::endl;
+ std::cout << "cc" << std::endl;
#endif
- return 0;
+ return 0;
}
__EOF__
- rm -f "$TEMP_DIR/checkcc"
- $1 -o "$TEMP_DIR/checkcc" $CXXFLAGS $LDFLAGS "$TEMP_DIR/test.cpp" 2> /dev/null
+ rm -f "$TEMP_DIR/checkcc"
+ $1 -o "$TEMP_DIR/checkcc" $CXXFLAGS $LDFLAGS "$TEMP_DIR/test.cpp" 2> /dev/null
}
create_libtest_source()
{
# $1: filename
# $2: optional include
- cat > "$TEMP_DIR/$1" << __EOF__
+ cat > "$TEMP_DIR/$1" << __EOF__
/* libtest file */
int main(int argc, char **argv) {
- return 0;
+ return 0;
}
__EOF__
if [ -n "$2" ]; then
@@ -77,7 +87,7 @@
fi
create_libtest_source "test.c" "$2"
rm -f "$TEMP_DIR/checklib"
- $TOOLCHAIN_CC -o "$TEMP_DIR/checklib" $CFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.c" 2> /dev/null
+ $TOOLCHAIN_CC -o "$TEMP_DIR/checklib" $CFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.c" 2> /dev/null
}
check_cpp_lib()
@@ -87,20 +97,20 @@
if [ -z "$TOOLCHAIN_CXX" ]; then
return 1
fi
- create_libtest_source "test.cpp" "$2"
+ create_libtest_source "test.cpp" "$2"
rm -f "$TEMP_DIR/checklib"
- $TOOLCHAIN_CXX -o "$TEMP_DIR/checklib" $CXXFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.cpp" 2> /dev/null
+ $TOOLCHAIN_CXX -o "$TEMP_DIR/checklib" $CXXFLAGS $LDFLAGS "-l$1" "$TEMP_DIR/test.cpp" 2> /dev/null
}
check_lib()
{
# $1: libname
# $2: optional include
- if [ -n "$TOOLCHAIN_CC" ]; then
- check_c_lib "$1" "$2"
- elif [ -n "$TOOLCHAIN_CXX" ]; then
- check_cpp_lib "$1" "$2"
- fi
+ if [ -n "$TOOLCHAIN_CC" ]; then
+ check_c_lib "$1" "$2"
+ elif [ -n "$TOOLCHAIN_CXX" ]; then
+ check_cpp_lib "$1" "$2"
+ fi
}
detect_c_compiler()
@@ -112,7 +122,8 @@
if [ -n "$CC" ]; then
if check_c_compiler "$CC"; then
TOOLCHAIN_CC=$CC
- TOOLCHAIN_NAME=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
echo "$CC"
return 0
else
@@ -124,7 +135,8 @@
do
if check_c_compiler "$COMP"; then
TOOLCHAIN_CC=$COMP
- TOOLCHAIN_NAME=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
echo "$COMP"
return 0
fi
@@ -144,7 +156,8 @@
if [ -n "$CXX" ]; then
if check_cpp_compiler "$CXX"; then
TOOLCHAIN_CXX=$CXX
- TOOLCHAIN_NAME=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
echo "$CXX"
return 0
else
@@ -156,7 +169,8 @@
do
if check_cpp_compiler "$COMP"; then
TOOLCHAIN_CXX=$COMP
- TOOLCHAIN_NAME=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN=`"$TEMP_DIR/checkcc"`
+ TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
echo "$COMP"
return 0
fi
diff -r 0ce353485509 -r eb16be99b0ad make/uwproj.xsd
--- a/make/uwproj.xsd Sun Oct 06 20:49:43 2024 +0200
+++ b/make/uwproj.xsd Sat Mar 01 22:55:30 2025 +0100
@@ -3,7 +3,7 @@
xmlns="http://unixwork.de/uwproj"
targetNamespace="http://unixwork.de/uwproj"
elementFormDefault="qualified"
- version="0.1"
+ version="0.3"
>
@@ -17,22 +17,33 @@
-
+
+
- The configuration section.
- Consists of an arbitrary number of var
elements.
+
+ The configuration section.
+ Consists of an arbitrary number of var
elements.
+
+
+ The optional platform
attribute may specify a single platform identifier and
+ the optional not
attribute may specify a comma-separated list of platform identifiers.
+ The configure script shall skip this config declaration if the detected platform is not matching
+ the filter specification of these attributes.
+
+
+
@@ -102,9 +113,11 @@
The optional platform
attribute may specify a single platform identifier and
- the optional not
attribute may specify a comma-separated list of platform identifiers.
- The configure script shall skip this dependency declaration if the detected platform is not
- matching the filter specification of these attributes.
+ the optional toolchain
attribute may specify a single toolchain.
+ The optional not
attribute may specify a comma-separated list of platform and/or
+ toolchain identifiers.
+ The configure script shall skip this dependency declaration if the detected platform and toolchain
+ is not matching the filter specification of these attributes.
@@ -125,6 +138,7 @@
+
@@ -182,14 +196,27 @@
dependencies
are satisfied.
If a feature is enabled, all define
and make
definitions are
supposed to be applied to the config file.
+ If a feature is disabled, an optional disabled
element may specify which
+ define
and make
definitions are supposed to be applied.
+ There might also be dependencies
when the feature is disabled (e.g. specifying a fallback).
In case the optional default
attribute is set to true, the feature is enabled by default
and is supposed to be automatically disabled (without error) when the dependencies are not satisfied.
The name that is supposed to be used for the --enable and --disable arguments can be optionally
specified with the arg
attribute. Otherwise, the name
is used by default.
+ Optionally, a description for the help text of the resulting configure script can be specified by
+ adding a desc
element.
+
+
+
+
+
+
+
+
@@ -278,4 +305,4 @@
-
\ No newline at end of file
+
diff -r 0ce353485509 -r eb16be99b0ad src/font.c
--- a/src/font.c Sun Oct 06 20:49:43 2024 +0200
+++ b/src/font.c Sat Mar 01 22:55:30 2025 +0100
@@ -73,7 +73,7 @@
void asc_font_cache_destroy(void) {
assert(asc_font_cache != NULL);
- cxListDestroy(asc_font_cache);
+ cxListFree(asc_font_cache);
}
diff -r 0ce353485509 -r eb16be99b0ad src/scene.c
--- a/src/scene.c Sun Oct 06 20:49:43 2024 +0200
+++ b/src/scene.c Sat Mar 01 22:55:30 2025 +0100
@@ -178,9 +178,9 @@
asc_sprite_draw(node);
}
- // destroy render groups
+ // deallocate render groups
cx_for_n(i, ASC_RENDER_GROUP_COUNT) {
- cxListDestroy(render_group[i]);
+ cxListFree(render_group[i]);
}
}
@@ -204,7 +204,7 @@
cx_foreach(AscSceneNode*, child, iter) {
if (!iter.exiting) continue;
if (child->behaviors != NULL) {
- cxListDestroy(child->behaviors);
+ cxListFree(child->behaviors);
}
if (child->free_func != NULL) {
child->free_func(child);
diff -r 0ce353485509 -r eb16be99b0ad src/text.c
--- a/src/text.c Sun Oct 06 20:49:43 2024 +0200
+++ b/src/text.c Sat Mar 01 22:55:30 2025 +0100
@@ -124,3 +124,4 @@
va_end(ap);
asc_node_update(node);
}
+