aboutsummaryrefslogtreecommitdiff
path: root/development/maude
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-03-23 13:39:35 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-03-26 01:20:11 +0700
commitc96ceb17454f01a9db8a3fab0be3aec810da4dd8 (patch)
tree6e92ec7da9e276ebc137dbcdb7ecc703213637b3 /development/maude
parent2485399468e22b35a492c99e8147a974306be0e8 (diff)
development/maude: Fix 32-bit build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/maude')
-rw-r--r--development/maude/32-bit-fixes.patch34
-rw-r--r--development/maude/README3
-rw-r--r--development/maude/maude.SlackBuild25
3 files changed, 54 insertions, 8 deletions
diff --git a/development/maude/32-bit-fixes.patch b/development/maude/32-bit-fixes.patch
new file mode 100644
index 0000000000000..ae03dafe12cf5
--- /dev/null
+++ b/development/maude/32-bit-fixes.patch
@@ -0,0 +1,34 @@
+--- a/src/BuiltIn/succSymbol.hh
++++ b/src/BuiltIn/succSymbol.hh
+@@ -46,6 +46,15 @@
+ Vector<Term*>& terms);
+ void postInterSymbolPass();
+ void reset();
++
++#if SIZEOF_LONG < 8
++ DagNode* makeNatDag(Int64 nat)
++ {
++ mpz_class bigNat;
++ mpz_import(bigNat.get_mpz_t(), 1, 1, sizeof(nat), 0, 0, &nat);
++ return makeNatDag(bigNat);
++ }
++#endif
+ //
+ // Functions special to SuccSymbol.
+ //
+--- a/src/Meta/interpreterManagerSymbol.cc
++++ b/src/Meta/interpreterManagerSymbol.cc
+@@ -599,6 +599,12 @@
+ DagNode*
+ InterpreterManagerSymbol::upRewriteCount(const RewritingContext* context)
+ {
+- mpz_class totalCount(context->getTotalCount());
++#if SIZEOF_LONG == 8
++ mpz_class totalCount(context->getTotalCount());
++#else
++ Int64 totalCount64 = context->getTotalCount();
++ mpz_class totalCount;
++ mpz_import(totalCount.get_mpz_t(), 1, 1, sizeof(totalCount64), 0, 0, &totalCount64);
++#endif
+ return metaLevel->upNat(totalCount);
+ }
diff --git a/development/maude/README b/development/maude/README
index a4fec96e3aecc..ddeea499964e3 100644
--- a/development/maude/README
+++ b/development/maude/README
@@ -16,3 +16,6 @@ you may:
- export the variable to the environment, then run maude
$ export MAUDE_LIB=/usr/share/maude/
$ maude
+
+If you'd like to run maude's built-in test suite, export CHECK=yes
+in the script's environment.
diff --git a/development/maude/maude.SlackBuild b/development/maude/maude.SlackBuild
index 6c1be7150bcfc..204505c54dd70 100644
--- a/development/maude/maude.SlackBuild
+++ b/development/maude/maude.SlackBuild
@@ -22,6 +22,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220323 bkw: Modified by SlackBuilds.org:
+# - add -j1 to the make command (parallel builds were failing).
+# - fix 32-bit build.
+# - de-uglify script a bit, use SRCNAM (sorry, it was unreadable).
+# - add CHECK=yes option.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=maude
@@ -38,9 +44,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -66,19 +69,24 @@ fi
set -e
+SRCNAM=Maude
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$(tr '[:lower:]' '[:upper:]' <<< ${PRGNAM:0:1})${PRGNAM:1}-$VERSION.tar.gz
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-unzip $CWD/Full-$(tr '[:lower:]' '[:upper:]' <<< ${PRGNAM:0:1})${PRGNAM:1}-$VERSION.zip
+unzip $CWD/Full-$SRCNAM-$VERSION.zip
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+
+# 20220323 bkw: patch from Debian, with thanks.
+[ "$ARCH" != "x86_64" ] && patch -p1 < $CWD/32-bit-fixes.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -94,7 +102,8 @@ CXXFLAGS="$SLKCFLAGS" \
--datarootdir=/usr/share/maude \
--build=$ARCH-slackware-linux
-make
+make -j1
+[ "${CHECK:-no}" = "yes" ] && make -j1 check
make install DESTDIR=$PKG
# Manually FULL maude