78 lines
2.3 KiB
Bash
78 lines
2.3 KiB
Bash
# Maintainer: Ricky <rickleaf.wu@gmail.com>
|
|
|
|
pkgname=emacs
|
|
pkgver=30.1
|
|
pkgrel=4
|
|
pkgdesc="The extensible, customizable, self-documenting, real-time display editor (msys2)"
|
|
url="https://www.gnu.org/software/${pkgname}/"
|
|
msys2_references=(
|
|
"cpe: cpe:/a:gnu:emacs"
|
|
)
|
|
license=('GPL3')
|
|
arch=('i686' 'x86_64')
|
|
depends=('ncurses' 'zlib' 'libxml2' 'libiconv' 'libgnutls' 'glib2' 'libhogweed')
|
|
groups=('editors')
|
|
makedepends=('gawk' 'libiconv-devel' 'libxml2-devel' 'libiconv-devel' 'ncurses-devel' 'libgnutls-devel' 'libunistring-devel' 'autotools' 'gcc')
|
|
options=('strip')
|
|
source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.sig}
|
|
'001-no-rebase.patch')
|
|
sha256sums=('6ccac1ae76e6af93c6de1df175e8eb406767c23da3dd2a16aa67e3124a6f138f'
|
|
'SKIP'
|
|
'4a82e7f1c51ab4084dcd2625bba2c04b4a99524532e02b641ee91d2748ffddc3')
|
|
validpgpkeys=('17E90D521672C04631B1183EE78DAE0F3115E06B' # Eli Zaretskii (eliz) <eliz@gnu.org>
|
|
'CEA1DE21AB108493CC9C65742E82323B8F4353EE')
|
|
|
|
prepare() {
|
|
cd "${pkgname}-${pkgver}"
|
|
|
|
patch -p1 -i "${srcdir}/001-no-rebase.patch"
|
|
|
|
./autogen.sh
|
|
}
|
|
|
|
build() {
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
|
|
|
# gl_cv_clean_version_stddef:
|
|
# https://github.com/msys2/MSYS2-packages/pull/5503#issuecomment-3054117962
|
|
|
|
CPPFLAGS="-DNDEBUG"
|
|
CFLAGS="-pipe -O3 -fomit-frame-pointer -funroll-loops"
|
|
LDFLAGS="-s -Wl,-s"
|
|
# native compilation is not enabled due to not finding libgccjit.h, and is
|
|
# unsupported on 32-bit (and fails configure there due to this)
|
|
./configure \
|
|
--prefix=/usr \
|
|
--build="${CHOST}" \
|
|
--with-x-toolkit=no \
|
|
--with-sound=yes \
|
|
--with-modules \
|
|
--without-compress-install \
|
|
--without-native-compilation \
|
|
gl_cv_clean_version_stddef=yes
|
|
|
|
make
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}"/${pkgname}-${pkgver}
|
|
make DESTDIR="${pkgdir}" install
|
|
mv "${pkgdir}/usr/bin/ctags.exe" \
|
|
"${pkgdir}/usr/bin/ctags-emacs.exe"
|
|
mv "${pkgdir}/usr/share/man/man1/ctags.1" \
|
|
"${pkgdir}/usr/share/man/man1/ctags-emacs.1"
|
|
rm -f "${pkgdir}/usr/share/info/info.info.gz"
|
|
|
|
local dir="${pkgdir}/usr/share/${pkgname}"
|
|
dir="${dir}/$(ls -1 ${dir} | grep -E '([0-9]+\.[0-9]+)(\.[0-9]+)?')/src"
|
|
|
|
mkdir -p "${dir}"
|
|
cd "${srcdir}/${pkgname}-${pkgver}/src"
|
|
cp *.c *.h *.m "${dir}"
|
|
|
|
}
|
|
|
|
# TODO:
|
|
# Patch `shell-file-name' default in the C source code similarly to
|
|
# `source-directory'.
|