mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
development/maude: Fix 32-bit build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
2485399468
commit
c96ceb1745
3 changed files with 54 additions and 8 deletions
34
development/maude/32-bit-fixes.patch
Normal file
34
development/maude/32-bit-fixes.patch
Normal file
|
@ -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);
|
||||
}
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue