summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorpancho horrillo2021-12-12 07:46:08 +0100
committerpancho horrillo2021-12-12 09:55:44 +0100
commitc8cbf5b716f15b4e84adebbfee58b5dc4e7e2d15 (patch)
tree985e7014e52328db6ae467925b8ab91cc13b2643
parent0e5ed6ce153fd168ec51bcf90749e022fe038c33 (diff)
downloadaur-c8cbf5b716f15b4e84adebbfee58b5dc4e7e2d15.tar.gz
Adjust style to my preferences
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD426
2 files changed, 192 insertions, 238 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2251bea8a090..378e417b6095 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = emacs28-git
pkgdesc = GNU Emacs. emacs-28 release branch.
- pkgver = 28.0.90.151062
- pkgrel = 6
+ pkgver = 28.0.90.151063
+ pkgrel = 1
url = http://www.gnu.org/software/emacs/
install = emacs28-git.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 70e81acc3df0..75317445dc43 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,6 @@
# The difference between this PKGBUILD and the one from `emacs-git` is that:
# - this one builds emacs from `emacs-28` release branch.
# - Just-in-time ahead-of-time compilation is enabled by default.
-# - make uses as many cores as are available, for shorter build times.
#
# `Starting the Emacs 28 release cycle` announcement on emacs-devel:
# https://lists.gnu.org/archive/html/emacs-devel/2021-09/msg02290.html
@@ -16,37 +15,30 @@
# CAVEAT LECTOR: This PKGBUILD is highly opinionated. I give you
# enough rope to hang yourself, but by default it
# only enables the features I use.
-#
-# TLDR: yaourt users, cry me a river.
-#
-# Everyone else: do not update blindly this PKGBUILD. At least
-# make sure to compare and understand the changes.
-#
################################################################################
################################################################################
-# Assign "YES" to the variable you want enabled; empty or any other value
-# for NO.
+# Assign YES to the variable you want enabled; empty or any other value for NO.
#
# Where you read experimental, replace with foobar.
# =================================================
-#
################################################################################
CHECK= # Run tests. May fail, this is developement after all.
CLANG= # Use clang.
GOLD= # Use the gold linker.
LTO= # Enable link-time optimization. Still experimental.
-JIT="YES" # Enable native just-in-time compilation. libgccjit is in AUR.
+JIT=YES # Enable native just-in-time compilation. libgccjit is in AUR.
# This compiles only performance critical elisp files.
# To compile all elisp on demand, set
# comp-deferred-compilation non-nil
-AOT="YES" # Precompile all included elisp. It takes a long time.
+AOT=YES # Precompile all included elisp. It takes a long time.
# You still need to enable on-demand compilation
# for your own packages.
CLI= # CLI only binary.
GPM= # Mouse support in Linux using gpm.
NOTKIT= # Use no toolkit widgets. Like B&W Twm (001d sk00l).
# Bitmap fonts only, 1337!
+ #
LUCID= # Use the lucid, a.k.a athena, toolkit. Like XEmacs, sorta.
#
# Read https://wiki.archlinux.org/index.php/X_resources
@@ -60,279 +52,241 @@ NOCAIRO= # Disable here.
XWIDGETS= # Use GTK+ widgets pulled from webkit2gtk. Usable.
DOCS_HTML= # Generate and install html documentation.
DOCS_PDF= # Generate and install pdf documentation.
-NOGZ="YES" # Don't compress .el files.
+NOGZ=YES # Don't compress .el files.
################################################################################
################################################################################
-if [[ $CLI == "YES" ]] ; then
- pkgname="emacs28-nox-git"
+if [[ $CLI == YES ]]; then
+ pkgname=emacs28-nox-git
else
-pkgname="emacs28-git"
+ pkgname=emacs28-git
fi
-pkgver=28.0.90.151062
-pkgrel=6
-pkgdesc="GNU Emacs. emacs-28 release branch."
-arch=('x86_64')
-url="http://www.gnu.org/software/emacs/"
-license=('GPL3')
-depends_nox=('gnutls' 'libxml2' 'jansson')
-depends=("${depends_nox[@]}" 'harfbuzz')
-makedepends=('git')
-provides=('emacs' 'emacs26-git' 'emacs-27-git' 'emacs28-git' 'emacs-seq' 'emacs-nox')
-conflicts=('emacs' 'emacs26-git' 'emacs-27-git' 'emacs-git' 'emacs-seq' 'emacs-nox')
-replaces=('emacs' 'emacs26-git' 'emacs-27-git' 'emacs-git' 'emacs-seq' 'emacs-nox')
-#source=("emacs28-git::git://git.savannah.gnu.org/emacs.git#branch=emacs-28")
-# If Savannah fails for reasons, use Github's mirror
-source=("emacs28-git::git://github.com/emacs-mirror/emacs.git#branch=emacs-28")
-b2sums=('SKIP')
+pkgver=28.0.90.151063
+pkgrel=1
+pkgdesc='GNU Emacs. emacs-28 release branch.'
+arch=(x86_64)
+url=http://www.gnu.org/software/emacs/
+license=(GPL3)
+depends_nox=(gnutls libxml2 jansson)
+depends=("${depends_nox[@]}" harfbuzz)
+makedepends=(git)
+provides=(emacs emacs26-git emacs-27-git emacs28-git emacs-seq emacs-nox)
+conflicts=(emacs emacs26-git emacs-27-git emacs-git emacs-seq emacs-nox)
+replaces=(emacs emacs26-git emacs-27-git emacs-git emacs-seq emacs-nox)
+# Savannah may fail, use GitHub’s mirror instead
+#source=('emacs28-git::git://git.savannah.gnu.org/emacs.git#branch=emacs-28')
+source=('emacs28-git::git://github.com/emacs-mirror/emacs.git#branch=emacs-28')
+b2sums=(SKIP)
options=(!strip)
install=emacs28-git.install
+
################################################################################
################################################################################
-if [[ $GOLD == "YES" && ! $CLANG == "YES" ]]; then
- export LD=/usr/bin/ld.gold
- export CFLAGS+=" -fuse-ld=gold";
- export CXXFLAGS+=" -fuse-ld=gold";
-elif [[ $GOLD == "YES" && $CLANG == "YES" ]]; then
- echo "";
- echo "Clang rather uses its own linker.";
- echo "";
- exit 1;
+if [[ $GOLD == YES && ! $CLANG == YES ]]; then
+ export LD=/usr/bin/ld.gold
+ export CFLAGS+=' -fuse-ld=gold'
+ export CXXFLAGS+=' -fuse-ld=gold'
+elif [[ $GOLD == YES && $CLANG == YES ]]; then
+ echo
+ echo Clang requires its own linker.
+ echo
+ exit 1
fi
-if [[ $CLANG == "YES" ]]; then
- export CC="/usr/bin/clang" ;
- export CXX="/usr/bin/clang++" ;
- export CPP="/usr/bin/clang -E" ;
- export LD="/usr/bin/lld" ;
- export AR="/usr/bin/llvm-ar" ;
- export AS="/usr/bin/llvm-as" ;
- export CCFLAGS+=' -fuse-ld=lld' ;
- export CXXFLAGS+=' -fuse-ld=lld' ;
- makedepends+=( 'clang' 'lld' 'llvm') ;
+if [[ $CLANG == YES ]]; then
+ export CC='/usr/bin/clang'
+ export CXX='/usr/bin/clang++'
+ export CPP='/usr/bin/clang -E'
+ export LD='/usr/bin/lld'
+ export AR='/usr/bin/llvm-ar'
+ export AS='/usr/bin/llvm-as'
+ export CCFLAGS+=' -fuse-ld=lld'
+ export CXXFLAGS+=' -fuse-ld=lld'
+ makedepends+=(clang lld llvm)
fi
-if [[ $JIT == "YES" ]]; then
- if [[ $CLI == "YES" ]]; then
- depends_nox+=( 'libgccjit' );
- else
- depends+=( 'libgccjit' );
- fi
+if [[ $JIT == YES ]]; then
+ if [[ $CLI == YES ]]; then
+ depends_nox+=(libgccjit)
+ else
+ depends+=(libgccjit)
+ fi
fi
-if [[ $CLI == "YES" ]]; then
- depends=("${depends_nox[@]}");
-elif [[ $NOTKIT == "YES" ]]; then
- depends+=( 'dbus' 'hicolor-icon-theme' 'libxinerama' 'libxrandr' 'lcms2' 'librsvg' 'libxfixes' 'libxpm' );
- makedepends+=( 'xorgproto' );
-elif [[ $LUCID == "YES" ]]; then
- depends+=( 'dbus' 'hicolor-icon-theme' 'libxinerama' 'libxfixes' 'lcms2' 'librsvg' 'xaw3d' 'libxrandr' 'libxpm' );
- makedepends+=( 'xorgproto' );
+if [[ $CLI == YES ]]; then
+ depends=("${depends_nox[@]}")
+elif [[ $NOTKIT == YES ]]; then
+ depends+=(dbus hicolor-icon-theme libxinerama libxrandr lcms2 librsvg libxfixes libxpm)
+ makedepends+=(xorgproto)
+elif [[ $LUCID == YES ]]; then
+ depends+=(dbus hicolor-icon-theme libxinerama libxfixes lcms2 librsvg xaw3d libxrandr libxpm)
+ makedepends+=(xorgproto)
else
- depends+=( 'gtk3' 'libxpm' );
- makedepends+=( 'xorgproto' );
+ depends+=(gtk3 libxpm)
+ makedepends+=(xorgproto)
fi
-if [[ ! $NOX == "YES" ]] && [[ ! $CLI == "YES" ]]; then
- depends+=( 'libjpeg-turbo' 'giflib' );
-elif [[ $CLI == "YES" ]]; then
- depends+=();
+if [[ ! $NOX == YES ]] && [[ ! $CLI == YES ]]; then
+ depends+=(libjpeg-turbo giflib)
+elif [[ $CLI == YES ]]; then
+ depends+=()
fi
-if [[ $ALSA == "YES" ]]; then
- if [[ $CLI == "YES" ]]; then
- depends_nox+=( 'alsa-lib' );
- else
- depends+=( 'alsa-lib' );
- fi
+if [[ $ALSA == YES ]]; then
+ if [[ $CLI == YES ]]; then
+ depends_nox+=(alsa-lib)
+ else
+ depends+=(alsa-lib)
+ fi
fi
-if [[ ! $NOCAIRO == "YES" ]] && [[ ! $CLI == "YES" ]] ; then
- depends+=( 'cairo' );
+[[ ! $NOCAIRO == YES ]] && [[ ! $CLI == YES ]] && depends+=(cairo)
+
+if [[ $XWIDGETS == YES ]]; then
+ if [[ $LUCID == YES ]] || [[ $NOTKIT == YES ]] || [[ $CLI == YES ]]; then
+ echo
+ echo 'Xwidgets support *requires* GTK+3!!!'
+ echo
+ exit 1
+ else
+ depends+=(webkit2gtk)
+ fi
fi
-if [[ $XWIDGETS == "YES" ]]; then
- if [[ $LUCID == "YES" ]] || [[ $NOTKIT == "YES" ]] || [[ $CLI == "YES" ]]; then
- echo "";
- echo "";
- echo "Xwidgets support *requires* GTK+3!!!";
- echo "";
- echo "";
- exit 1;
- else
- depends+=( 'webkit2gtk' );
- fi
+if [[ $GPM == YES ]]; then
+ if [[ $CLI == YES ]]; then
+ depends_nox+=(gpm)
+ else
+ depends+=(gpm)
+ fi
fi
-if [[ $GPM == "YES" ]]; then
- if [[ $CLI == "YES" ]]; then
- depends_nox+=( 'gpm' );
- else
- depends+=( 'gpm' );
- fi
-fi
-
-if [[ $DOCS_PDF == "YES" ]]; then
- makedepends+=( 'texlive-core' );
-fi
+[[ $DOCS_PDF == YES ]] && makedepends+=(texlive-core)
################################################################################
################################################################################
pkgver() {
- cd "$srcdir/emacs28-git"
+ cd "$srcdir/emacs28-git"
- printf "%s.%s" \
- "$(grep AC_INIT configure.ac | \
- sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\?\).\+$/\1/')" \
- "$(git rev-list --count HEAD)"
+ printf "%s.%s" \
+ "$(grep AC_INIT configure.ac | \
+ sed -e 's/^.\+\ \([0-9]\+\.[0-9]\+\.[0-9]\+\?\).\+$/\1/')" \
+ "$(git rev-list --count HEAD)"
}
# There is no need to run autogen.sh after first checkout.
# Doing so, breaks incremental compilation.
prepare() {
- cd "$srcdir/emacs28-git"
- [[ -x configure ]] || ( ./autogen.sh git && ./autogen.sh autoconf )
+ cd "$srcdir/emacs28-git"
+ [[ -x configure ]] || ./autogen.sh git && ./autogen.sh autoconf
}
-if [[ $CHECK == "YES" ]]; then
-check() {
- cd "$srcdir/emacs28-git"
- make check
-}
+if [[ $CHECK == YES ]]; then
+ check() {
+ cd "$srcdir/emacs28-git"
+ make check
+ }
fi
build() {
- cd "$srcdir/emacs28-git"
-
- local _conf=(
- --prefix=/usr
- --sysconfdir=/etc
- --libexecdir=/usr/lib
- --localstatedir=/var
- --mandir=/usr/share/man
- --with-gameuser=:games
- --with-sound=alsa
- --with-modules
- --without-libotf
- --without-m17n-flt
-# Beware https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25228
-# dconf and gconf break font settings you set in ~/.emacs.
-# If you insist you'll need to read that bug report in *full*.
-# Good luck!
- --without-gconf
- --without-gsettings
- )
-
-################################################################################
-
-################################################################################
-
-if [[ $CLANG == "YES" ]]; then
- _conf+=( '--enable-autodepend' );
-fi
-
-if [[ $LTO == "YES" ]]; then
- _conf+=( '--enable-link-time-optimization' );
-fi
-
-if [[ $JIT == "YES" ]]; then
- _conf+=( '--with-native-compilation' );
-fi
-
-if [[ $CLI == "YES" ]]; then
- _conf+=( '--without-x' '--with-x-toolkit=no' '--without-xft' '--without-lcms2' '--without-rsvg' '--without-jpeg' '--without-gif' '--without-tiff' '--without-png' );
-elif [[ $NOTKIT == "YES" ]]; then
- _conf+=( '--with-x-toolkit=no' '--without-toolkit-scroll-bars' '--without-xft' '--without-xaw3d' );
-elif [[ $LUCID == "YES" ]]; then
- _conf+=( '--with-x-toolkit=lucid' '--with-xft' '--with-xaw3d' );
-else
- _conf+=( '--with-x-toolkit=gtk3' '--without-xaw3d' );
-fi
-
-if [[ $NOCAIRO == "YES" || $CLI == "YES" ]]; then
- _conf+=( '--without-cairo' );
-fi
-
-if [[ $ALSA == "YES" ]]; then
- _conf+=( '--with-sound=alsa' );
-else
- _conf+=( '--with-sound=no' );
-fi
-
-if [[ $XWIDGETS == "YES" ]]; then
- _conf+=( '--with-xwidgets' );
-fi
-
-if [[ $GPM == "YES" ]]; then
- :
-else
- _conf+=( '--without-gpm' );
-fi
-
-if [[ $NOGZ == "YES" ]]; then
- _conf+=( '--without-compress-install' );
-fi
-
-# ctags/etags may be provided by other packages, e.g, universal-ctags
-_conf+=('--program-transform-name=s/\([ec]tags\)/\1.emacs/')
-
-################################################################################
-
-################################################################################
-
- ./configure "${_conf[@]}"
-
- # Using "make" instead of "make bootstrap" enables incremental
- # compiling. Less time recompiling. Yay! But you may
- # need to use bootstrap sometimes to unbreak the build.
- # Just add it to the command line.
- #
- # Please note that incremental compilation implies that you
- # are reusing your src directory!
- #
- if [[ $JIT == "YES" ]] && [[ $AOT == "YES" ]]; then
- make NATIVE_FULL_AOT=1
- else
- make
- fi
-
- # You may need to run this if 'loaddefs.el' files become corrupt.
- #cd "$srcdir/emacs28-git/lisp"
- #make autoloads
- #cd ../
-
- # Optional documentation formats.
- if [[ $DOCS_HTML == "YES" ]]; then
- make html;
- fi
- if [[ $DOCS_PDF == "YES" ]]; then
- make pdf;
- fi
-
+ cd "$srcdir/emacs28-git"
+
+ local _conf=(
+ --prefix=/usr
+ --sysconfdir=/etc
+ --libexecdir=/usr/lib
+ --localstatedir=/var
+ --mandir=/usr/share/man
+ --with-gameuser=:games
+ --with-sound=alsa
+ --with-modules
+ --without-libotf
+ --without-m17n-flt
+ # Beware https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25228
+ # dconf and gconf break font settings you set in ~/.emacs.
+ # If you insist you'll need to read that bug report in *full*.
+ # Good luck!
+ --without-gconf
+ --without-gsettings
+ )
+
+ ################################################################################
+
+ ################################################################################
+
+ [[ $CLANG == YES ]] && _conf+=(--enable-autodepend)
+ [[ $LTO == YES ]] && _conf+=(--enable-link-time-optimization)
+ [[ $JIT == YES ]] && _conf+=(--with-native-compilation)
+
+ if [[ $CLI == YES ]]; then
+ _conf+=(--without-x --with-x-toolkit=no --without-xft --without-lcms2 --without-rsvg --without-jpeg --without-gif --without-tiff --without-png)
+ elif [[ $NOTKIT == YES ]]; then
+ _conf+=(--with-x-toolkit=no --without-toolkit-scroll-bars --without-xft --without-xaw3d)
+ elif [[ $LUCID == YES ]]; then
+ _conf+=(--with-x-toolkit=lucid --with-xft --with-xaw3d)
+ else
+ _conf+=(--with-x-toolkit=gtk3 --without-xaw3d)
+ fi
+
+ [[ $NOCAIRO == YES || $CLI == YES ]] && _conf+=(--without-cairo)
+
+ if [[ $ALSA == YES ]]; then
+ _conf+=(--with-sound=alsa)
+ else
+ _conf+=(--with-sound=no)
+ fi
+
+ [[ $XWIDGETS == YES ]] && _conf+=(--with-xwidgets)
+ [[ $GPM != YES ]] && _conf+=(--without-gpm)
+ [[ $NOGZ == YES ]] && _conf+=(--without-compress-install)
+
+ # ctags/etags may be provided by other packages, e.g, universal-ctags
+ _conf+=('--program-transform-name=s/\([ec]tags\)/\1.emacs/')
+
+ ################################################################################
+
+ ################################################################################
+
+ ./configure "${_conf[@]}"
+
+ # Using "make" instead of "make bootstrap" enables incremental
+ # compiling. Less time recompiling. Yay! But you may
+ # need to use bootstrap sometimes to unbreak the build.
+ # Just add it to the command line.
+ #
+ # Please note that incremental compilation implies that you
+ # are reusing your src directory!
+ #
+ if [[ $JIT == YES ]] && [[ $AOT == YES ]]; then
+ make NATIVE_FULL_AOT=1
+ else
+ make
+ fi
+
+ # You may need to run this if 'loaddefs.el' files become corrupt.
+ #cd "$srcdir/emacs28-git/lisp"
+ #make autoloads
+ #cd ../
+
+ # Optional documentation formats.
+ [[ $DOCS_HTML == YES ]] && make html
+ [[ $DOCS_PDF == YES ]] && make pdf
}
package() {
- cd "$srcdir/emacs28-git"
-
- make DESTDIR="$pkgdir/" install
-
- # Install optional documentation formats
- if [[ $DOCS_HTML == "YES" ]]; then make DESTDIR="$pkgdir/" install-html; fi
- if [[ $DOCS_PDF == "YES" ]]; then make DESTDIR="$pkgdir/" install-pdf; fi
+ cd "$srcdir/emacs28-git"
- # fix user/root permissions on usr/share files
- # MOVED to install script
- # find "$pkgdir"/usr/share/emacs/ | xargs chown root:root
+ make DESTDIR="$pkgdir/" install
- # fix permssions on /var/games
- mkdir -p "$pkgdir"/var/games/emacs
- chmod 775 "$pkgdir"/var/games
- chmod 775 "$pkgdir"/var/games/emacs
- # MOVED to install script
- # chown -R root:games "$pkgdir"/var/games
+ # Install optional documentation formats
+ [[ $DOCS_HTML == YES ]] && make DESTDIR="$pkgdir/" install-html
+ [[ $DOCS_PDF == YES ]] && make DESTDIR="$pkgdir/" install-pdf
+ # fix permssions on /var/games
+ mkdir -p "$pkgdir"/var/games/emacs
+ chmod 775 "$pkgdir"/var/games{,/emacs}
}
################################################################################