Merge branch 'main' of codeberg.org:gwh/slackbuilds
This commit is contained in:
commit
fa98a10e81
2 changed files with 131 additions and 37 deletions
77
d/uxn/SlackBuild
Executable file
77
d/uxn/SlackBuild
Executable file
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
|
||||
# variables
|
||||
VERSION=${VERSION:-"latest"}
|
||||
BUILD=${BUILD:-1}
|
||||
|
||||
TAG=gwh
|
||||
TMP=/tmp/$TAG
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
ARCH=noarch
|
||||
|
||||
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
|
||||
PREFIX=${PREFIX:-/usr}
|
||||
|
||||
# nettoyage préalable
|
||||
rm -fr "$PKG" "${TMP:?}/$PRGNAM"
|
||||
|
||||
mkdir -p "$PKG"
|
||||
|
||||
# mise en place
|
||||
[ ! -e "$REPOSITORY" ] && git clone https://git.sr.ht/~rabbits/uxn "$REPOSITORY"
|
||||
cd "$REPOSITORY" || exit 1
|
||||
git pull --all
|
||||
|
||||
cp -R "$REPOSITORY" "$TMP/"
|
||||
cd "$TMP/$PRGNAM" || exit 1
|
||||
[ "$VERSION" == "latest" ] && VERSION=$(git tag --sort=-taggerdate | head -n1)
|
||||
[ "$VERSION" == "" ] && VERSION=trunk
|
||||
[ "$VERSION" == "trunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" || git checkout $VERSION
|
||||
|
||||
./build.sh --no-run
|
||||
|
||||
mkdir -p "$PKG$PREFIX/bin"
|
||||
cp bin/uxn{asm,cli,emu} "$PKG$PREFIX/bin/"
|
||||
|
||||
mkdir -p "$PKG$PREFIX/share/$PRGNAM/"
|
||||
cp bin/*.rom "$PKG$PREFIX/share/$PRGNAM/"
|
||||
|
||||
mkdir -p "$PKG$PREFIX/doc/$PRGNAM"
|
||||
cp -R LICENSE README.md "$PKG$PREFIX/doc/$PRGNAM"
|
||||
|
||||
# correction
|
||||
cd "$PKG" || exit 1
|
||||
chown -R root:root ./*
|
||||
|
||||
# embaumement
|
||||
mkdir -p "$PKG/install"
|
||||
|
||||
cat <<EOF > "$PKG/install/slack-desc"
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
$PRGNAM: $PRGNAM (An assembler and emulator for the Uxn stack-machine)
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: https://git.sr.ht/~rabbits/uxn
|
||||
$PRGNAM:
|
||||
EOF
|
||||
|
||||
# empaquetage
|
||||
/sbin/makepkg --linkadd y --chown n --prepend "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz"
|
|
@ -28,7 +28,7 @@
|
|||
cd "$(dirname "$0")" || exit 1
|
||||
|
||||
PKGNAM=emacs
|
||||
BUILD=${BUILD:-9}
|
||||
BUILD=${BUILD:-11}
|
||||
TAG=${TAG:-gwh}
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
|
@ -37,6 +37,37 @@ NUMJOBS=${NUMJOBS:-" -j$(( $(nproc) + 1 )) "}
|
|||
TMP=${TMP:-/tmp/$TAG}
|
||||
PKG=$TMP/package-$PKGNAM
|
||||
|
||||
# Build Emacs with native compilation. This has better performance, but the
|
||||
# installed package is larger. Pass NATIVECOMP=NO to do a normal build.
|
||||
NATIVECOMP=${NATIVECOMP:-YES}
|
||||
|
||||
# When building with native compilation, link to the X11 libraries. This option
|
||||
# is only for native compilation builds -- regular builds will include both
|
||||
# an X11 and non-X11 version of Emacs.
|
||||
WITHX=${WITHX:-YES}
|
||||
|
||||
# Pass this variable set to "--with-pgtk" to use GTK+3 without linking to X11
|
||||
# libraries. This might be suitable if you're going to run under Wayland.
|
||||
PGTK_OPTION=${PGTK_OPTION:-"--with-pgtk"}
|
||||
|
||||
# Set the X related options. The default X_TOOLKIT will be GTK+3, but you may
|
||||
# set the X_TOOLKIT variable to any of these: gtk, gtk2, gtk3, lucid, athena, motif.
|
||||
if [ "$WITHX" = "YES" ]; then
|
||||
if [ "$PGTK_OPTION" = "--with-pgtk" ]; then
|
||||
X_TOOLKIT=gtk3
|
||||
fi
|
||||
X_OPTIONS="--with-x --with-x-toolkit=${X_TOOLKIT:-gtk3}"
|
||||
else
|
||||
X_OPTIONS="--with-x=no"
|
||||
fi
|
||||
|
||||
# Set the proper options for native compilation or not:
|
||||
if [ "$NATIVECOMP" = "YES" ]; then
|
||||
PDUMPER=${PDUMPER:-"--with-dumping=pdumper --with-native-compilation"}
|
||||
else
|
||||
PDUMPER=${PDUMPER:-"--with-pdumper=no --with-dumping=unexec --without-native-compilation"}
|
||||
fi
|
||||
|
||||
# Automatically determine the architecture we're building on:
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$(uname -m)" in
|
||||
|
@ -49,7 +80,6 @@ if [ -z "$ARCH" ]; then
|
|||
fi
|
||||
|
||||
VERSION=${VERSION:-latest}
|
||||
UI=${UI:-pgtk} # pgtk or x11 or nox
|
||||
|
||||
PREFIX=${PREFIX:-/usr}
|
||||
|
||||
|
@ -127,13 +157,10 @@ sed -i "s/#define SYSTEM_PURESIZE_EXTRA 0/#define SYSTEM_PURESIZE_EXTRA 100000/g
|
|||
make autoloads
|
||||
)
|
||||
|
||||
PDUMPER=${PDUMPER:-"--with-pdumper=yes --with-dumping=pdumper"}
|
||||
|
||||
GWH_OPTIONS="--with-tree-sitter \
|
||||
--enable-link-time-optimization \
|
||||
--with-native-compilation=aot"
|
||||
|
||||
CONFIGURE_OPTIONS="--prefix=${PREFIX} \
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
--prefix=${PREFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--program-prefix="" \
|
||||
|
@ -142,37 +169,18 @@ CONFIGURE_OPTIONS="--prefix=${PREFIX} \
|
|||
--infodir=${PREFIX}/info \
|
||||
--without-gconf \
|
||||
--without-gsettings \
|
||||
--without-android \
|
||||
--with-modules \
|
||||
$X_OPTIONS \
|
||||
$PGTK_OPTION \
|
||||
$PDUMPER \
|
||||
$GWH_OPTIONS \
|
||||
--build=${ARCH}-slackware-linux"
|
||||
|
||||
X11_OPTIONS="--with-x \
|
||||
--with-x-toolkit=${X_TOOLKIT:-gtk3}"
|
||||
PGTK_OPTIONS="--with-pgtk"
|
||||
NOX_OPTIONS="--with-x=no"
|
||||
|
||||
case $UI in
|
||||
pgtk)
|
||||
GUI_OPTIONS=$PGTK_OPTIONS
|
||||
;;
|
||||
nox)
|
||||
GUI_OPTIONS=$NOX_OPTIONS
|
||||
;;
|
||||
x11)
|
||||
GUI_OPTIONS=$X11_OPTIONS
|
||||
;;
|
||||
esac
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
$CONFIGURE_OPTIONS \
|
||||
$GUI_OPTIONS || exit 1
|
||||
--build=${ARCH}-slackware-linux || exit 1
|
||||
|
||||
if [ "$NATIVECOMP" = "YES" ]; then
|
||||
make NATIVE_FULL_AOT=1 bootstrap $NUMJOBS || make NATIVE_FULL_AOT=1 || exit 1
|
||||
else
|
||||
make $NUMJOBS || make || exit 1
|
||||
make install DESTDIR="$PKG" || exit 1
|
||||
fi
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
|
||||
# Seems like this nonsense is finally obsolete:
|
||||
if [ -d "$PKG/var/games/emacs" ]; then
|
||||
|
@ -244,5 +252,14 @@ if [ ! -e usr/bin/ctags ]; then
|
|||
fi
|
||||
EOF
|
||||
|
||||
# Tag packages that use a toolkit other than default (currently gtk3):
|
||||
if [ -z "$UI" ] && [ -n "$X_TOOLKIT" ]; then
|
||||
if [ "$PGTK_OPTION" = "--with-pgtk" ]; then
|
||||
UI="_pgtk"
|
||||
else
|
||||
UI="_$X_TOOLKIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "$PKG" || exit 1
|
||||
/sbin/makepkg -l y -c n "$OUTPUT/$PKGNAM-${VERSION}_$UI-$ARCH-$BUILD$TAG.txz"
|
||||
|
|
Loading…
Reference in a new issue