[emacs] more in line with my other scripts

This commit is contained in:
Gwenhael Le Moine 2023-07-31 14:27:36 +02:00
parent a19ccf0f7d
commit 010c650c2f
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -28,11 +28,11 @@
cd $(dirname $0) ; CWD=$(pwd) cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=emacs PKGNAM=emacs
BUILD=${BUILD:-1} BUILD=${BUILD:-2}
TAG=gwh TAG=gwh
BRANCH=${BRANCH:-master} BRANCH=${BRANCH:-master}
VERSION=${VERSION:-"trunk"} VERSION=${VERSION:-"latest"}
REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM REPOSITORY=/home/installs/SlackBuilds/_repositories/$PKGNAM
@ -85,9 +85,9 @@ rm -rf $PKGNAM
[ ! -e $REPOSITORY ] && git clone git://git.savannah.gnu.org/emacs.git $REPOSITORY [ ! -e $REPOSITORY ] && git clone git://git.savannah.gnu.org/emacs.git $REPOSITORY
cd $REPOSITORY cd $REPOSITORY
git checkout $BRANCH git reset --hard HEAD
git pull --all git pull --all
[ "x$VERSION" == "xtrunk" ] || git checkout $VERSION #[ "x$VERSION" == "xtrunk" ] || git checkout $VERSION
git clean -dfX # https://github.com/commercial-emacs/commercial-emacs git clean -dfX # https://github.com/commercial-emacs/commercial-emacs
@ -96,14 +96,25 @@ git clean -dfX # https://github.com/commercial-emacs/commercial
rm lisp/loaddefs.el # https://lists.gnu.org/r/emacs-devel/2021-04/msg01430.html rm lisp/loaddefs.el # https://lists.gnu.org/r/emacs-devel/2021-04/msg01430.html
[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)" #[ "x$VERSION" == "xtrunk" ] && VERSION="git_r$(git rev-list --count HEAD)_$(git log -1 --format=%h)"
#mkdir -p $TMP/$PKGNAM #mkdir -p $TMP/$PKGNAM
cp -R $REPOSITORY $TMP/$PKGNAM cp -R $REPOSITORY $TMP/$PKGNAM
cd $TMP/$PKGNAM || exit 1 cd $TMP/$PKGNAM || exit 1
# tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1 case $VERSION in
# cd $PKGNAM-$SRCDIRVER || exit 1 trunk)
VERSION="r$(git rev-list --count HEAD)_$(git log -1 --format=%h)"
;;
latest)
VERSION=$(git describe --tags --abbrev=0)
git checkout "$VERSION"
;;
*)
VERSION=$VERSION
git checkout "emacs-$VERSION"
;;
esac
chown -R root:root . chown -R root:root .
find . \ find . \
@ -141,9 +152,11 @@ CFLAGS="$SLKCFLAGS" \
--with-gpm=yes \ --with-gpm=yes \
--with-pgtk \ --with-pgtk \
--with-tree-sitter \ --with-tree-sitter \
--with-native-compilation \
--enable-link-time-optimization \ --enable-link-time-optimization \
--with-json --with-xwidgets --with-xinput \ --with-native-compilation=aot \
--with-json \
--with-xwidgets \
--with-xinput \
--with-compress-install \ --with-compress-install \
--without-gconf \ --without-gconf \
--with-gameuser=":games" \ --with-gameuser=":games" \
@ -153,6 +166,7 @@ CFLAGS="$SLKCFLAGS" \
# --with-x-toolkit=${X_TOOLKIT:-gtk3} \ # --with-x-toolkit=${X_TOOLKIT:-gtk3} \
# --without-toolkit-scroll-bars \ # --without-toolkit-scroll-bars \
make bootstrap $NUMJOBS || exit 1 make bootstrap $NUMJOBS || exit 1
make $NUMJOBS || make || exit 1 make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1 make install DESTDIR=$PKG || exit 1