pantry/projects/gnu.org/emacs/package.yml

89 lines
2.2 KiB
YAML
Raw Normal View History

distributable:
url: https://ftp.gnu.org/gnu/emacs/emacs-{{ version.raw }}.tar.xz
strip-components: 1
versions:
github: emacs-mirror/emacs/tags
strip: /^emacs-/
2023-10-25 07:25:14 +03:00
ignore: [x.y.90]
dependencies:
gnome.org/libxml2: ^2.10.3
invisible-island.net/ncurses: ^6.3.0
libjpeg-turbo.org: ^2.1.5.1
gnu.org/sed: ^4.9.0
gnu.org/texinfo: ^7.0.1
gnu.org/libidn2: ^2.3
gnutls.org: ^3.6
zlib.net: ^1.2
runtime:
env:
EMACS_ROOT: ${{prefix}}
EMACSLOADPATH: ${{prefix}}/share/emacs/lisp
EMACSDATA: ${{prefix}}/share/emacs/etc
2023-10-25 03:19:00 +03:00
EMACSPATH: ${{prefix}}/libexec/emacs/{{version.marketing}}
build:
dependencies:
freedesktop.org/pkg-config: ^0.29.2
2023-10-25 03:19:00 +03:00
script:
- ./configure $ARGS
- make --jobs {{ hw.concurrency }} install
# we specify this with the env-var
2023-10-25 03:19:00 +03:00
- cd {{prefix}}/share/emacs
- mv {{version.marketing}}/lisp .
- mv site-lisp/* lisp
- rmdir site-lisp
# doing it step by step to prove we didnt leave anything here
2023-10-25 03:19:00 +03:00
- rm {{version.marketing}}/site-lisp/subdirs.el
- rmdir {{version.marketing}}/site-lisp
2023-10-25 03:19:00 +03:00
- mv {{version.marketing}}/etc .
- rmdir {{version.marketing}}
# we need a stable EMACSPATH to advertise
- run: |
DIR=$(ls)
mv $DIR/* .
rmdir $DIR
ln -s . $DIR
working-directory: ${{prefix}}/libexec/emacs/{{version.marketing}}
env:
ARGS:
- --prefix="{{prefix}}"
- --enable-check-lisp-object-type
- --disable-silent-rules
- --with-gnutls
- --without-x
- --with-xml2
- --without-dbus
- --with-modules
- --without-ns
- --without-imagemagick
- --without-selinux
- --with-x-toolkit=no
provides:
- bin/emacs
test:
2023-10-25 03:19:00 +03:00
script:
- emacs --version | grep "GNU Emacs {{version.marketing}}"
- four=$(emacs --batch --eval="(print (+ 2 2))")
- test $four = 4
2023-10-25 03:19:00 +03:00
- emacs -batch -l $FIXTURE
2023-10-25 03:19:00 +03:00
# test EMACSPATH
- emacs --batch --eval '(progn (package-initialize) (print (with-output-to-string (package-list-packages))) (kill-emacs))'
fixture: |
(require 'simple)
(defun my-print-message ()
"Print a message to the *Messages* buffer"
(message "This is a message from my script"))
2023-10-25 07:25:14 +03:00
(my-print-message)