diff --git a/mingw-w64-emacs-git/PKGBUILD b/mingw-w64-emacs-git/PKGBUILD index 317a973f9..52d49f461 100644 --- a/mingw-w64-emacs-git/PKGBUILD +++ b/mingw-w64-emacs-git/PKGBUILD @@ -1,38 +1,40 @@ # Maintainer: Haroogan # Maintainer: Oscar Fuentes +_enable_jit=$([[ "${MSYSTEM}" =~ MINGW.* ]] && echo yes) _realname='emacs' pkgbase=mingw-w64-${_realname}-git pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-git" -pkgver=r136512.b7730c259b +pkgver=r156906.8ebfcff3a6 pkgrel=1 pkgdesc="The extensible, customizable, self-documenting, real-time display editor (mingw-w64)" url="https://www.gnu.org/software/${_realname}/" license=('GPL3') arch=('any') +mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64') provides=("${MINGW_PACKAGE_PREFIX}-${_realname}") conflicts=("${MINGW_PACKAGE_PREFIX}-${_realname}") depends=("${MINGW_PACKAGE_PREFIX}-universal-ctags-git" - "${MINGW_PACKAGE_PREFIX}-xpm-nox" - "${MINGW_PACKAGE_PREFIX}-gnutls" + $([[ "$_enable_jit" == "yes" ]] && echo "${MINGW_PACKAGE_PREFIX}-libgccjit") "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-xpm-nox" + "${MINGW_PACKAGE_PREFIX}-freetype" "${MINGW_PACKAGE_PREFIX}-harfbuzz" - "${MINGW_PACKAGE_PREFIX}-winpthreads") + "${MINGW_PACKAGE_PREFIX}-jansson" + "${MINGW_PACKAGE_PREFIX}-gnutls" + "${MINGW_PACKAGE_PREFIX}-libwinpthread") optdepends=("${MINGW_PACKAGE_PREFIX}-giflib" - "${MINGW_PACKAGE_PREFIX}-imagemagick" "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-libpng" "${MINGW_PACKAGE_PREFIX}-librsvg" "${MINGW_PACKAGE_PREFIX}-libtiff" "${MINGW_PACKAGE_PREFIX}-libxml2") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" - "${MINGW_PACKAGE_PREFIX}-pkg-config" - "make" - "autoconf" - "texinfo" +makedepends=("${MINGW_PACKAGE_PREFIX}-cc" + "${MINGW_PACKAGE_PREFIX}-autotools" + "texinfo" "patch" - "git" - "${optdepends[@]}") + "git" + "${optdepends[@]}") # Don't zip info files because the built-in info reader uses gzip to # decompress them. gzip is not available as a mingw binary. options=('strip' '!zipman') @@ -54,15 +56,26 @@ build() { mkdir -p "${srcdir}/build-${MINGW_CHOST}" cd "build-${MINGW_CHOST}" + _extra_cfg="" + if [[ "$_enable_jit" == "yes" ]] ; then + _extra_cfg="$_extra_cfg --with-native-compilation" + fi + + # -D_FORTIFY_SOURCE breaks build + CFLAGS=${CFLAGS//"-Wp,-D_FORTIFY_SOURCE=2"} + # -foptimize-sibling-calls breaks native compilation (GCC 13.1) + CFLAGS+=" -fno-optimize-sibling-calls" + "${srcdir}/${_realname}/configure" \ --prefix="${MINGW_PREFIX}" \ --build="${MINGW_CHOST}" \ - --without-dbus \ --with-modules \ - --without-compress-install + --without-dbus \ + --without-compress-install \ + $_extra_cfg # --without-compress-install is needed because we don't have gzip in - # the mingw binaries. + # the mingw binaries and it is also required by native compilation. make } diff --git a/mingw-w64-emacs-git/image.c.diff b/mingw-w64-emacs-git/image.c.diff deleted file mode 100644 index 6a0d33dd1..000000000 --- a/mingw-w64-emacs-git/image.c.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- src/image.c.orig 2014-10-15 14:18:29.088716000 +0200 -+++ src/image.c 2014-10-15 15:54:12.407522800 +0200 -@@ -7862,7 +7862,7 @@ - }; - - #if defined HAVE_NTGUI && defined WINDOWSNT --static bool init_imagemagick_functions (void); -+#define init_imagemagick_functions NULL - #else - #define init_imagemagick_functions NULL - #endif diff --git a/mingw-w64-emacs-git/lread.c.diff b/mingw-w64-emacs-git/lread.c.diff deleted file mode 100644 index 8eab5a598..000000000 --- a/mingw-w64-emacs-git/lread.c.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- src/lread.c.orig 2014-11-04 20:29:22.129549000 +0100 -+++ src/lread.c 2014-11-04 22:33:07.346414100 +0100 -@@ -4351,6 +4351,12 @@ - } /* Vinstallation_directory != Vsource_directory */ - - } /* if Vinstallation_directory */ -+ else -+ { -+ Vsource_directory -+ = Fexpand_file_name (build_string ("../"), -+ Fcar (decode_env_path (0, PATH_DATA, 0))); -+ } - } - else /* !initialized */ - {