Browse Source

dont compress loaddefs file on Windows

pull/1/head
Kien Nguyen 2 years ago
parent
commit
e6f3cacb16
  1. 5
      emacs-build.sh
  2. 25
      patches/0001-makefile.in-dont-compress-loaddefs-files.patch
  3. 11
      scripts/tools.sh

5
emacs-build.sh

@ -32,7 +32,6 @@
. scripts/pdf-tools.sh
. scripts/aspell.sh
. scripts/hunspell.sh
. scripts/gzip.sh
. scripts/msys2_extra.sh
. scripts/gnutls.sh
@ -212,8 +211,7 @@ function action2_install ()
# If we compress files we need to install gzip no matter what
# (even in pack-emacs)
(ensure_packages gzip \
&& cp /usr/bin/gzip.exe $emacs_install_dir/bin/gzip.exe \
&& cp /usr/bin/msys-2.0.dll $emacs_install_dir/bin/msys-2.0.dll ) \
&& cp_bindeps_to "$emacs_install_dir/bin" gzip.exe) \
|| return -1
fi
echo Installing Emacs into directory $emacs_install_dir
@ -469,6 +467,7 @@ while test -n "$*"; do
--deps) add_actions action1_ensure_packages action3_package_deps;;
--pack-emacs) add_actions action2_install action4_package_emacs;;
--pack-all) add_actions action1_ensure_packages action3_package_deps action2_install action5_package_all;;
# --pack-all) add_actions action1_ensure_packages action2_install;;
--pdf-tools) add_actions action2_install action3_pdf_tools;;
--mu) add_actions action2_install action3_mu;;

25
patches/0001-makefile.in-dont-compress-loaddefs-files.patch

@ -0,0 +1,25 @@
From 5b48a7426c9e427a14226ae76ac0ea7661d10371 Mon Sep 17 00:00:00 2001
From: Kien Nguyen <kien.n.quang@gmail.com>
Date: Mon, 22 Aug 2022 16:18:58 +0900
Subject: [PATCH] makefile.in: dont compress loaddefs files
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 78103f897..f1ec3cf49 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -671,7 +671,7 @@ install-arch-indep:
[ -z "${GZIP_PROG}" ] || { \
echo "Compressing *.el etc. ..." && \
cd "$(DESTDIR)${lispdir}" && \
- for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \
+ for f in `find . -name "*.elc" ! -name "*loaddefs.elc" -print | sed 's/.elc$$/.el/'`; do \
${GZIP_PROG} -9n "$$f"; \
done; \
${GZIP_PROG} -9n "../etc/publicsuffix.txt"; \
--
2.37.0.windows.1

11
scripts/tools.sh

@ -152,6 +152,17 @@ function ensure_packages ()
fi
}
function cp_bindeps_to ()
{
local dest="$1"
local bins="${@:2}"
echo Copying $bins to $dest with dependencies
echo $bins | xargs -n1 | xargs which | xargs -I{} cp -pf {} $dest/
echo $bins | xargs -n1 | xargs which | xargs ldd \
| awk -F' ' '!/ \/c\//{print $3}' \
| xargs -I{} cp -pf {} $dest/
}
function package_dependencies ()
{
local zipfile="$1"

Loading…
Cancel
Save