academic/wise: Update script.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Petar Petrov 2023-09-21 22:44:05 +07:00 committed by Willy Sudiarto Raharjo
parent 5b5e1ea07d
commit 3e0f2ef5f4
No known key found for this signature in database
GPG key ID: 3F617144D7238786

View file

@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=wise
VERSION=${VERSION:-2.4.1}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -86,6 +86,19 @@ patch -p1 -i $CWD/patches/11_consistent_manual_dates.patch
patch -p1 -i $CWD/patches/spelling.patch
patch -p1 -i $CWD/patches/cross.patch
# This prevents some weird build breaks. Thanks to Urchlay. His explanation:
#
# The .c files that are in the tarball, were already built from the .dy
# files. However, some of them get patched, e.g. wisefile.c and wisefile.dy
# both have a modification time of the current time/date, which is why make
# thinks it needs to rebuild the wisefile.c. When make is run, it looks at
# the timestamps and decided wisefile.c is older than wisefile.dy (which it
# is, ever so slightly, assuming the filesystem's timestamp resolution is
# fine enough). What the solution does is force the timestamp on all the
# .dy files to be older than the generated .c files, so make won't think it
# needs to run dyc to generate the .c files.
find src -name \*.dy -print0 | xargs -0 touch -d '2000-01-01'
cd src
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \