diff options
author | srv <enmanuel.saravia.externo@pandero.com.pe> | 2025-05-05 15:29:27 -0500 |
---|---|---|
committer | srv <enmanuel.saravia.externo@pandero.com.pe> | 2025-05-05 15:29:27 -0500 |
commit | 81555e3bd23c74ce915d246ca51fa65d84c22ae7 (patch) | |
tree | 1ba136af6b87426d37d010866b5cdac110eaeaa8 /emacs/PKGBUILD |
First commitdevelop
Diffstat (limited to 'emacs/PKGBUILD')
-rwxr-xr-x | emacs/PKGBUILD | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/emacs/PKGBUILD b/emacs/PKGBUILD new file mode 100755 index 0000000..076ad99 --- /dev/null +++ b/emacs/PKGBUILD @@ -0,0 +1,84 @@ +# Maintainer (Arch): Juergen Hoetzel <juergen@archlinux.org> +# Contributor (Arch): Renchi Raju <renchi@green.tam.uiuc.edu> +# Maintainer: André Silva <emulatorman@hyperbola.info> +# Contributor: Jesús E. <heckyel@hyperbola.info> +# Contributor: Tobias Dausend <throgh@hyperbola.info> +pkgname=emacs +pkgver=29.4 +_debver=$pkgver +_debrel=2 +pkgrel=2 +pkgdesc="The extensible, customizable, self-documenting real-time display editor" +arch=('i686' 'x86_64') +url='https://www.gnu.org/software/emacs/emacs.html' +license=('GPL-3') +depends=('librsvg-legacy' 'gpm' 'giflib' 'libxpm' 'libotf' 'm17n-lib' 'gtk' 'hicolor-icon-theme' + 'desktop-file-utils' 'alsa-lib' 'gnutls' 'jansson') +makedepends=('quilt') +source=("https://ftp.gnu.org/gnu/emacs/${pkgname}-${pkgver}.tar.xz" + "https://deb.debian.org/debian/pool/main/e/emacs/emacs_${_debver}+1-${_debrel}~bpo12+1.debian.tar.xz" + "modify-startup.patch") +sha512sums=('66b38081cb01d2c46ff7beefb45986cc225b4c922c30712ad0d456c6cae5507176ed99418c8f26948c5375c8afde4e4b2507d23ed997dbb5392d12150a121d80' + '19e4cdda20009d9dcb65ebc4f6d6b15cb2d0d2927d0a77911196f6a29225b2ebc0a84e9e3cab4dbf6de6dad1ee916b8a8d4cee9c10910b19218874158226ca76' + '223c8992b730678ea67edda8b8a92e779e96cbf9f41b2cb0fc70029ded6bfbedfbebf90f19af6f9a17c9dd16564aa3b6b97623cec8e1d55ead3a3438efbb8250') +prepare() { + cd "$srcdir"/$pkgname-$pkgver + if [[ ${pkgver%.*} = ${_debver%.*} ]]; then + # Debian patches + export QUILT_PATCHES=debian/patches + export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' + export QUILT_DIFF_ARGS='--no-timestamps' + mv "$srcdir"/debian . + # Doesn't apply + rm -v debian/patches/0001-Prefer-usr-share-info-emacs.patch || true + rm -v debian/patches/0002-Run-debian-startup-and-set-debian-emacs-flavor.patch || true + rm -v debian/patches/0003-Remove-files-that-appear-to-be-incompatible-with-the.patch || true + rm -v debian/patches/0004-Adjust-documentation-references-for-Debian.patch || true + rm -v debian/patches/0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch || true + rm -v debian/patches/0008-Mark-vc-bzr-test-fauilt-bzr-autoloads-as-unstable-fo.patch || true + quilt push -av + fi + # patchout startup-links + rm lisp/startup.elc + patch -Np1 -i ${srcdir}/modify-startup.patch +} +build() { +cd "$srcdir"/$pkgname-$pkgver +ac_cv_lib_gif_EGifPutExtensionLast=yes +CFLAGS="-O3 -march=native" ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-x-toolkit=gtk \ + --with-modules \ + --with-json \ + --without-dbus \ + --without-libsystemd \ + --without-tiff \ + --without-xft \ + --without-sound \ + --without-toolkit-scroll-bars \ + --without-xaw3d +make ${MAKEFLAGS} +# --without-imagemagick \ +# --without-compress \ +} + +package() { + cd "$srcdir"/$pkgname-$pkgver + make ${MAKEFLAGS} DESTDIR="$pkgdir" install + # remove conflict with ctags package + mv "$pkgdir"/usr/bin/{ctags,ctags.emacs} + mv "$pkgdir"/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1} + # remove systemd-related data + rm -rf "$pkgdir"/usr/lib + rm "$pkgdir"/usr/share/emacs/$pkgver/etc/emacs.service + # remove internal package-manager for emacs + # we do not support such as of being a high risk to endanger user-freedom + rm "$pkgdir"/usr/share/emacs/$pkgver/etc/package-keyring.gpg + rm "$pkgdir"/usr/share/emacs/$pkgver/lisp/emacs-lisp/{package,package-vc,package-x}.el.gz + rm "$pkgdir"/usr/share/emacs/$pkgver/lisp/emacs-lisp/{package,package-vc,package-x}.elc + # fix user/root permissions on usr/share files + find "$pkgdir"/usr/share/emacs/$pkgver -exec chown root:root {} \; + install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname" +} |