early-access version 2847
This commit is contained in:
37
externals/SDL/build-scripts/androidbuildlibs.sh
vendored
37
externals/SDL/build-scripts/androidbuildlibs.sh
vendored
@@ -33,21 +33,22 @@ lib=
|
||||
ndk_args=
|
||||
|
||||
# Allow an external caller to specify locations.
|
||||
for arg in $*; do
|
||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||
obj=${arg#NDK_OUT=}
|
||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||
lib=${arg#NDK_LIBS_OUT=}
|
||||
else
|
||||
ndk_args="$ndk_args $arg"
|
||||
fi
|
||||
for arg in $*
|
||||
do
|
||||
if [ "${arg:0:8}" == "NDK_OUT=" ]; then
|
||||
obj=${arg#NDK_OUT=}
|
||||
elif [ "${arg:0:13}" == "NDK_LIBS_OUT=" ]; then
|
||||
lib=${arg#NDK_LIBS_OUT=}
|
||||
else
|
||||
ndk_args="$ndk_args $arg"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $obj ]; then
|
||||
obj=$buildandroid/obj
|
||||
obj=$buildandroid/obj
|
||||
fi
|
||||
if [ -z $lib ]; then
|
||||
lib=$buildandroid/lib
|
||||
lib=$buildandroid/lib
|
||||
fi
|
||||
|
||||
for dir in $build $buildandroid $obj $lib; do
|
||||
@@ -63,11 +64,11 @@ done
|
||||
# ndk-build makefile segments that use them, e.g., default-application.mk.
|
||||
# For consistency, pass all values on the command line.
|
||||
ndk-build \
|
||||
NDK_PROJECT_PATH=null \
|
||||
NDK_OUT=$obj \
|
||||
NDK_LIBS_OUT=$lib \
|
||||
APP_BUILD_SCRIPT=Android.mk \
|
||||
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
|
||||
APP_PLATFORM=android-16 \
|
||||
APP_MODULES="SDL2 SDL2_main" \
|
||||
$ndk_args
|
||||
NDK_PROJECT_PATH=null \
|
||||
NDK_OUT=$obj \
|
||||
NDK_LIBS_OUT=$lib \
|
||||
APP_BUILD_SCRIPT=Android.mk \
|
||||
APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
|
||||
APP_PLATFORM=android-16 \
|
||||
APP_MODULES="SDL2 SDL2_main" \
|
||||
$ndk_args
|
||||
|
6
externals/SDL/build-scripts/clang++-fat.sh
vendored
6
externals/SDL/build-scripts/clang++-fat.sh
vendored
@@ -6,11 +6,11 @@
|
||||
|
||||
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
|
||||
|
||||
# Intel 64-bit compiler flags (10.7 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang++ -arch x86_64 -mmacosx-version-min=10.7 \
|
||||
# Intel 64-bit compiler flags (10.6 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang++ -arch x86_64 -mmacosx-version-min=10.6 \
|
||||
-I/usr/local/include"
|
||||
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.7"
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.6"
|
||||
|
||||
# ARM 64-bit compiler flags (11.0 runtime compatibility)
|
||||
CLANG_COMPILE_ARM64="clang++ -arch arm64 -mmacosx-version-min=11.0 \
|
||||
|
8
externals/SDL/build-scripts/clang-fat.sh
vendored
8
externals/SDL/build-scripts/clang-fat.sh
vendored
@@ -6,12 +6,12 @@
|
||||
|
||||
DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
|
||||
|
||||
# Intel 64-bit compiler flags (10.7 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.7 \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=1070 \
|
||||
# Intel 64-bit compiler flags (10.6 runtime compatibility)
|
||||
CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.6 \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=1060 \
|
||||
-I/usr/local/include"
|
||||
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.7"
|
||||
CLANG_LINK_X64="-mmacosx-version-min=10.6"
|
||||
|
||||
# ARM 64-bit compiler flags (11.0 runtime compatibility)
|
||||
CLANG_COMPILE_ARM64="clang -arch arm64 -mmacosx-version-min=11.0 \
|
||||
|
37
externals/SDL/build-scripts/config.guess
vendored
37
externals/SDL/build-scripts/config.guess
vendored
@@ -4,7 +4,7 @@
|
||||
|
||||
# shellcheck disable=SC2006,SC2268 # see below for rationale
|
||||
|
||||
timestamp='2022-05-25'
|
||||
timestamp='2022-01-03'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -929,9 +929,6 @@ EOF
|
||||
i*:PW*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-pw32
|
||||
;;
|
||||
*:SerenityOS:*:*)
|
||||
GUESS=$UNAME_MACHINE-pc-serenity
|
||||
;;
|
||||
*:Interix*:*)
|
||||
case $UNAME_MACHINE in
|
||||
x86)
|
||||
@@ -1151,27 +1148,16 @@ EOF
|
||||
;;
|
||||
x86_64:Linux:*:*)
|
||||
set_cc_for_build
|
||||
CPU=$UNAME_MACHINE
|
||||
LIBCABI=$LIBC
|
||||
if test "$CC_FOR_BUILD" != no_compiler_found; then
|
||||
ABI=64
|
||||
sed 's/^ //' << EOF > "$dummy.c"
|
||||
#ifdef __i386__
|
||||
ABI=x86
|
||||
#else
|
||||
#ifdef __ILP32__
|
||||
ABI=x32
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'`
|
||||
eval "$cc_set_abi"
|
||||
case $ABI in
|
||||
x86) CPU=i686 ;;
|
||||
x32) LIBCABI=${LIBC}x32 ;;
|
||||
esac
|
||||
if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
|
||||
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
|
||||
grep IS_X32 >/dev/null
|
||||
then
|
||||
LIBCABI=${LIBC}x32
|
||||
fi
|
||||
fi
|
||||
GUESS=$CPU-pc-linux-$LIBCABI
|
||||
GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
|
||||
;;
|
||||
xtensa*:Linux:*:*)
|
||||
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
|
||||
@@ -1378,11 +1364,8 @@ EOF
|
||||
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
|
||||
GUESS=i586-pc-haiku
|
||||
;;
|
||||
ppc:Haiku:*:*) # Haiku running on Apple PowerPC
|
||||
GUESS=powerpc-apple-haiku
|
||||
;;
|
||||
*:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat)
|
||||
GUESS=$UNAME_MACHINE-unknown-haiku
|
||||
x86_64:Haiku:*:*)
|
||||
GUESS=x86_64-unknown-haiku
|
||||
;;
|
||||
SX-4:SUPER-UX:*:*)
|
||||
GUESS=sx4-nec-superux$UNAME_RELEASE
|
||||
|
12
externals/SDL/build-scripts/fnsince.pl
vendored
12
externals/SDL/build-scripts/fnsince.pl
vendored
@@ -46,15 +46,9 @@ my @releases = sort {
|
||||
|
||||
# this happens to work for how SDL versions things at the moment.
|
||||
my $current_release = $releases[-1];
|
||||
my $next_release;
|
||||
|
||||
if ($current_release eq '2.0.22') { # Hack for our jump from 2.0.22 to 2.24.0...
|
||||
$next_release = '2.24.0';
|
||||
} else {
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
@current_release_segments[1] = '' . ($current_release_segments[1] + 2);
|
||||
$next_release = join('.', @current_release_segments);
|
||||
}
|
||||
my @current_release_segments = split /\./, $current_release;
|
||||
@current_release_segments[2] = '' . ($current_release_segments[2] + 2);
|
||||
my $next_release = join('.', @current_release_segments);
|
||||
|
||||
#print("\n\nSORTED\n");
|
||||
#foreach (@releases) {
|
||||
|
16
externals/SDL/build-scripts/ltmain.sh
vendored
16
externals/SDL/build-scripts/ltmain.sh
vendored
@@ -7081,20 +7081,8 @@ func_mode_link ()
|
||||
prev=xcompiler
|
||||
continue
|
||||
;;
|
||||
# Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
|
||||
-pthread)
|
||||
case $host in
|
||||
*solaris2*) ;;
|
||||
*)
|
||||
case "$new_inherited_linker_flags " in
|
||||
*" $arg "*) ;;
|
||||
* ) func_append new_inherited_linker_flags " $arg" ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
continue
|
||||
;;
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|
||||
|
||||
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|
||||
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
|
||||
func_append compiler_flags " $arg"
|
||||
func_append compile_command " $arg"
|
||||
|
5
externals/SDL/build-scripts/os2-buildbot.sh
vendored
5
externals/SDL/build-scripts/os2-buildbot.sh
vendored
@@ -12,7 +12,6 @@ if [ -z "$WATCOM" ]; then
|
||||
echo "This is often something like '/usr/local/share/watcom'" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export PATH="$WATCOM/binl:$PATH"
|
||||
|
||||
ZIPFILE="$1"
|
||||
@@ -31,8 +30,8 @@ rm -f $ZIPFILE
|
||||
wmake -f Makefile.os2
|
||||
rm -rf $ZIPDIR
|
||||
mkdir -p $ZIPDIR
|
||||
chmod a+r SDL2.lib SDL2.dll
|
||||
mv SDL2.lib SDL2.dll $ZIPDIR/
|
||||
chmod 644 SDL2.dll SDL2.lib SDL2test.lib
|
||||
mv SDL2.dll SDL2.lib SDL2test.lib $ZIPDIR/
|
||||
cp -R include $ZIPDIR/
|
||||
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
|
||||
|
||||
|
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
| grep -v \.git \
|
||||
| while read file; do \
|
||||
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||
find . -type f -exec grep -Il "Copyright" {} \; \
|
||||
| grep -v \.git \
|
||||
| while read file; \
|
||||
do \
|
||||
LC_ALL=C sed -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
|
||||
done
|
||||
|
163
externals/SDL/build-scripts/wikiheaders.pl
vendored
163
externals/SDL/build-scripts/wikiheaders.pl
vendored
@@ -4,27 +4,10 @@ use warnings;
|
||||
use strict;
|
||||
use Text::Wrap;
|
||||
|
||||
$Text::Wrap::huge = 'overflow';
|
||||
|
||||
my $projectfullname = 'Simple Directmedia Layer';
|
||||
my $projectshortname = 'SDL';
|
||||
my $wikisubdir = '';
|
||||
my $incsubdir = 'include';
|
||||
my $apiprefixregex = undef;
|
||||
my $versionfname = 'include/SDL_version.h';
|
||||
my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
|
||||
my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
|
||||
my $versionpatchregex = '\A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z';
|
||||
my $mainincludefname = 'SDL.h';
|
||||
my $selectheaderregex = '\ASDL.*?\.h\Z';
|
||||
my $projecturl = 'https://libsdl.org/';
|
||||
my $wikiurl = 'https://wiki.libsdl.org';
|
||||
my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new';
|
||||
my $srcpath = undef;
|
||||
my $wikipath = undef;
|
||||
my $warn_about_missing = 0;
|
||||
my $copy_direction = 0;
|
||||
my $optionsfname = undef;
|
||||
|
||||
foreach (@ARGV) {
|
||||
$warn_about_missing = 1, next if $_ eq '--warn-about-missing';
|
||||
@@ -32,73 +15,14 @@ foreach (@ARGV) {
|
||||
$copy_direction = 1, next if $_ eq '--copy-to-header';
|
||||
$copy_direction = -1, next if $_ eq '--copy-to-wiki';
|
||||
$copy_direction = -2, next if $_ eq '--copy-to-manpages';
|
||||
if (/\A--options=(.*)\Z/) {
|
||||
$optionsfname = $1;
|
||||
next;
|
||||
}
|
||||
$srcpath = $_, next if not defined $srcpath;
|
||||
$wikipath = $_, next if not defined $wikipath;
|
||||
}
|
||||
|
||||
my $default_optionsfname = '.wikiheaders-options';
|
||||
$default_optionsfname = "$srcpath/$default_optionsfname" if defined $srcpath;
|
||||
|
||||
if ((not defined $optionsfname) && (-f $default_optionsfname)) {
|
||||
$optionsfname = $default_optionsfname;
|
||||
}
|
||||
|
||||
if (defined $optionsfname) {
|
||||
open OPTIONS, '<', $optionsfname or die("Failed to open options file '$optionsfname': $!\n");
|
||||
while (<OPTIONS>) {
|
||||
chomp;
|
||||
if (/\A(.*?)\=(.*)\Z/) {
|
||||
my $key = $1;
|
||||
my $val = $2;
|
||||
$key =~ s/\A\s+//;
|
||||
$key =~ s/\s+\Z//;
|
||||
$val =~ s/\A\s+//;
|
||||
$val =~ s/\s+\Z//;
|
||||
$warn_about_missing = int($val), next if $key eq 'warn_about_missing';
|
||||
$srcpath = $val, next if $key eq 'srcpath';
|
||||
$wikipath = $val, next if $key eq 'wikipath';
|
||||
$apiprefixregex = $val, next if $key eq 'apiprefixregex';
|
||||
$projectfullname = $val, next if $key eq 'projectfullname';
|
||||
$projectshortname = $val, next if $key eq 'projectshortname';
|
||||
$wikisubdir = $val, next if $key eq 'wikisubdir';
|
||||
$incsubdir = $val, next if $key eq 'incsubdir';
|
||||
$versionmajorregex = $val, next if $key eq 'versionmajorregex';
|
||||
$versionminorregex = $val, next if $key eq 'versionminorregex';
|
||||
$versionpatchregex = $val, next if $key eq 'versionpatchregex';
|
||||
$versionfname = $val, next if $key eq 'versionfname';
|
||||
$mainincludefname = $val, next if $key eq 'mainincludefname';
|
||||
$selectheaderregex = $val, next if $key eq 'selectheaderregex';
|
||||
$projecturl = $val, next if $key eq 'projecturl';
|
||||
$wikiurl = $val, next if $key eq 'wikiurl';
|
||||
$bugreporturl = $val, next if $key eq 'bugreporturl';
|
||||
}
|
||||
}
|
||||
close(OPTIONS);
|
||||
}
|
||||
|
||||
my $wordwrap_mode = 'mediawiki';
|
||||
sub wordwrap_atom { # don't call this directly.
|
||||
my $str = shift;
|
||||
my $retval = '';
|
||||
|
||||
# wordwrap but leave links intact, even if they overflow.
|
||||
if ($wordwrap_mode eq 'mediawiki') {
|
||||
while ($str =~ s/(.*?)\s*(\[https?\:\/\/.*?\s+.*?\])\s*//ms) {
|
||||
$retval .= fill('', '', $1); # wrap it.
|
||||
$retval .= "\n$2\n"; # don't wrap it.
|
||||
}
|
||||
} elsif ($wordwrap_mode eq 'md') {
|
||||
while ($str =~ s/(.*?)\s*(\[.*?\]\(https?\:\/\/.*?\))\s*//ms) {
|
||||
$retval .= fill('', '', $1); # wrap it.
|
||||
$retval .= "\n$2\n"; # don't wrap it.
|
||||
}
|
||||
}
|
||||
|
||||
return $retval . fill('', '', $str);
|
||||
return fill('', '', $str);
|
||||
}
|
||||
|
||||
sub wordwrap_with_bullet_indent { # don't call this directly.
|
||||
@@ -218,23 +142,16 @@ sub wikify_chunk {
|
||||
while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
|
||||
my $codeblock = $2;
|
||||
$codedstr .= wikify_chunk($wikitype, $1, undef, undef);
|
||||
if (defined $apiprefixregex) {
|
||||
# Convert obvious API things to wikilinks, even inside `code` blocks.
|
||||
$codeblock =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
}
|
||||
# Convert obvious SDL things to wikilinks, even inside `code` blocks.
|
||||
$codeblock =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
$codedstr .= "<code>$codeblock</code>";
|
||||
}
|
||||
|
||||
# Convert obvious API things to wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
}
|
||||
# Convert obvious SDL things to wikilinks.
|
||||
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
|
||||
|
||||
# Make some Markdown things into MediaWiki...
|
||||
|
||||
# links
|
||||
$str =~ s/\[(.*?)\]\((https?\:\/\/.*?)\)/\[$2 $1\]/g;
|
||||
|
||||
# bold+italic
|
||||
$str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
|
||||
|
||||
@@ -253,10 +170,8 @@ sub wikify_chunk {
|
||||
$str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
|
||||
}
|
||||
} elsif ($wikitype eq 'md') {
|
||||
# Convert obvious API things to wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
||||
}
|
||||
# Convert obvious SDL things to wikilinks.
|
||||
$str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[$1]($1)/gms;
|
||||
if (defined $code) {
|
||||
$str .= "```$codelang$code```";
|
||||
}
|
||||
@@ -301,13 +216,7 @@ sub dewikify_chunk {
|
||||
# Doxygen supports Markdown (and it just simply looks better than MediaWiki
|
||||
# when looking at the raw headers), so do some conversions here as necessary.
|
||||
|
||||
# Dump obvious wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]/$1/gms;
|
||||
}
|
||||
|
||||
# links
|
||||
$str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\[$2\]\($1\)/g;
|
||||
$str =~ s/\[\[(SDL_[a-zA-Z0-9_]+)\]\]/$1/gms; # Dump obvious wikilinks.
|
||||
|
||||
# <code></code> is also popular. :/
|
||||
$str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
|
||||
@@ -331,13 +240,7 @@ sub dewikify_chunk {
|
||||
} elsif ($dewikify_mode eq 'manpage') {
|
||||
$str =~ s/\./\\[char46]/gms; # make sure these can't become control codes.
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
# Dump obvious wikilinks.
|
||||
if (defined $apiprefixregex) {
|
||||
$str =~ s/\s*\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms;
|
||||
}
|
||||
|
||||
# links
|
||||
$str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\n.URL "$1" "$2"\n/g;
|
||||
$str =~ s/\s*\[\[(SDL_[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms; # Dump obvious wikilinks.
|
||||
|
||||
# <code></code> is also popular. :/
|
||||
$str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
|
||||
@@ -433,13 +336,11 @@ my %headerfuncslocation = (); # $headerfuncslocation{"SDL_OpenAudio"} -> name
|
||||
my %headerfuncschunk = (); # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
|
||||
my %headerfuncshasdoxygen = (); # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
|
||||
|
||||
my $incpath = "$srcpath";
|
||||
$incpath .= "/$incsubdir" if $incsubdir ne '';
|
||||
|
||||
my $incpath = "$srcpath/include";
|
||||
opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
|
||||
while (readdir(DH)) {
|
||||
my $dent = $_;
|
||||
next if not $dent =~ /$selectheaderregex/; # just selected headers.
|
||||
next if not $dent =~ /\ASDL.*?\.h\Z/; # just SDL*.h headers.
|
||||
open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
|
||||
|
||||
my @contents = ();
|
||||
@@ -589,7 +490,7 @@ opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
|
||||
while (readdir(DH)) {
|
||||
my $dent = $_;
|
||||
my $type = '';
|
||||
if ($dent =~ /\.(md|mediawiki)\Z/) {
|
||||
if ($dent =~ /\ASDL.*?\.(md|mediawiki)\Z/) {
|
||||
$type = $1;
|
||||
} else {
|
||||
next; # only dealing with wiki pages.
|
||||
@@ -817,7 +718,6 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
foreach (@desclines) {
|
||||
s/\A(\:|\* )//;
|
||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||
s/\A\/*//;
|
||||
$str .= "\\sa $_\n";
|
||||
}
|
||||
}
|
||||
@@ -1026,7 +926,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
if ($wikitype eq 'mediawiki') {
|
||||
$sections{'Related Functions'} .= ":[[$sa]]\n";
|
||||
} elsif ($wikitype eq 'md') {
|
||||
$sections{'Related Functions'} .= "* [$sa]($sa)\n";
|
||||
$sections{'Related Functions'} .= "* [$sa](/$sa)\n";
|
||||
} else { die("Expected wikitype '$wikitype'\n"); }
|
||||
}
|
||||
}
|
||||
@@ -1176,23 +1076,22 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
|
||||
chomp($gitrev);
|
||||
|
||||
# !!! FIXME
|
||||
open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
|
||||
open(FH, '<', "$srcpath/include/SDL_version.h") or die("Can't open '$srcpath/include/SDL_version.h': $!\n");
|
||||
my $majorver = 0;
|
||||
my $minorver = 0;
|
||||
my $patchver = 0;
|
||||
while (<FH>) {
|
||||
chomp;
|
||||
if (/$versionmajorregex/) {
|
||||
if (/\A\#define SDL_MAJOR_VERSION\s+(\d+)\Z/) {
|
||||
$majorver = int($1);
|
||||
} elsif (/$versionminorregex/) {
|
||||
} elsif (/\A\#define SDL_MINOR_VERSION\s+(\d+)\Z/) {
|
||||
$minorver = int($1);
|
||||
} elsif (/$versionpatchregex/) {
|
||||
} elsif (/\A\#define SDL_PATCHLEVEL\s+(\d+)\Z/) {
|
||||
$patchver = int($1);
|
||||
}
|
||||
}
|
||||
close(FH);
|
||||
my $fullversion = "$majorver.$minorver.$patchver";
|
||||
my $sdlversion = "$majorver.$minorver.$patchver";
|
||||
|
||||
foreach (keys %headerfuncs) {
|
||||
my $fn = $_;
|
||||
@@ -1227,24 +1126,17 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
$str .= ".\\\" This manpage content is licensed under Creative Commons\n";
|
||||
$str .= ".\\\" Attribution 4.0 International (CC BY 4.0)\n";
|
||||
$str .= ".\\\" https://creativecommons.org/licenses/by/4.0/\n";
|
||||
$str .= ".\\\" This manpage was generated from ${projectshortname}'s wiki page for $fn:\n";
|
||||
$str .= ".\\\" $wikiurl/$fn\n";
|
||||
$str .= ".\\\" This manpage was generated from SDL's wiki page for $fn:\n";
|
||||
$str .= ".\\\" https://wiki.libsdl.org/$fn\n";
|
||||
$str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
|
||||
$str .= ".\\\" revision $gitrev\n" if $gitrev ne '';
|
||||
$str .= ".\\\" Please report issues in this manpage's content at:\n";
|
||||
$str .= ".\\\" $bugreporturl\n";
|
||||
$str .= ".\\\" https://github.com/libsdl-org/sdlwiki/issues/new?title=Feedback%20on%20page%20$fn\n";
|
||||
$str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
|
||||
$str .= ".\\\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
|
||||
$str .= ".\\\" $projectshortname can be found at $projecturl\n";
|
||||
$str .= ".\\\" SDL can be found at https://libsdl.org/\n";
|
||||
|
||||
# Define a .URL macro. The "www.tmac" thing decides if we're using GNU roff (which has a .URL macro already), and if so, overrides the macro we just created.
|
||||
# This wizadry is from https://web.archive.org/web/20060102165607/http://people.debian.org/~branden/talks/wtfm/wtfm.pdf
|
||||
$str .= ".de URL\n";
|
||||
$str .= '\\$2 \(laURL: \\$1 \(ra\\$3' . "\n";
|
||||
$str .= "..\n";
|
||||
$str .= '.if \n[.g] .mso www.tmac' . "\n";
|
||||
|
||||
$str .= ".TH $fn 3 \"$projectshortname $fullversion\" \"$projectfullname\" \"$projectshortname$majorver FUNCTIONS\"\n";
|
||||
$str .= ".TH $fn 3 \"SDL $sdlversion\" \"Simple Directmedia Layer\" \"SDL$majorver FUNCTIONS\"\n";
|
||||
$str .= ".SH NAME\n";
|
||||
|
||||
$str .= "$fn";
|
||||
@@ -1253,7 +1145,7 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
|
||||
$str .= ".SH SYNOPSIS\n";
|
||||
$str .= ".nf\n";
|
||||
$str .= ".B #include \\(dq$mainincludefname\\(dq\n";
|
||||
$str .= ".B #include \\(dqSDL.h\\(dq\n";
|
||||
$str .= ".PP\n";
|
||||
|
||||
my @decllines = split /\n/, $decl;
|
||||
@@ -1324,7 +1216,6 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
foreach (@desclines) {
|
||||
s/\A(\:|\* )//;
|
||||
s/\(\)\Z//; # Convert "SDL_Func()" to "SDL_Func"
|
||||
s/\A\/*//;
|
||||
s/\A\.BR\s+//; # dewikify added this, but we want to handle it.
|
||||
s/\A\s+//;
|
||||
s/\s+\Z//;
|
||||
@@ -1343,14 +1234,14 @@ if ($copy_direction == 1) { # --copy-to-headers
|
||||
$str .= ".UE\n";
|
||||
$str .= ".PP\n";
|
||||
$str .= "This manpage was generated from\n";
|
||||
$str .= ".UR $wikiurl/$fn\n";
|
||||
$str .= "${projectshortname}'s wiki\n";
|
||||
$str .= ".UR https://wiki.libsdl.org/$fn\n";
|
||||
$str .= "SDL's wiki\n";
|
||||
$str .= ".UE\n";
|
||||
$str .= "using SDL/build-scripts/wikiheaders.pl";
|
||||
$str .= " revision $gitrev" if $gitrev ne '';
|
||||
$str .= ".\n";
|
||||
$str .= "Please report issues in this manpage at\n";
|
||||
$str .= ".UR $bugreporturl\n";
|
||||
$str .= ".UR https://github.com/libsdl-org/sdlwiki/issues/new\n";
|
||||
$str .= "our bugtracker!\n";
|
||||
$str .= ".UE\n";
|
||||
}
|
||||
|
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
2
externals/SDL/build-scripts/winrtbuild.ps1
vendored
@@ -39,7 +39,7 @@
|
||||
#
|
||||
|
||||
# Base version of SDL, used for packaging purposes
|
||||
$SDLVersion = "2.23.1"
|
||||
$SDLVersion = "2.0.20"
|
||||
|
||||
# Gets the .bat file that sets up an MSBuild environment, given one of
|
||||
# Visual Studio's, "PlatformToolset"s.
|
||||
|
Reference in New Issue
Block a user