all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: 15297@debbugs.gnu.org
Subject: bug#15297: 24.3.50; Compression of installed .el files should be configurable
Date: Sat, 7 Sep 2013 08:57:27 +0200	[thread overview]
Message-ID: <21034.52823.580662.797952@a1i15.kph.uni-mainz.de> (raw)

Tags: patch

Currently "make install" compresses the installed .el files depending
on the availability of the gzip program. In Gentoo we make this
compression configurable; with modern disk sizes the additional
disk footprint of 34 MiB is normally not an issue.

Since a long time Gentoo uses the following nasty hack for this:
<http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-editors/emacs/emacs-24.3-r2.ebuild?revision=1.15&view=markup#l98>

However, it would be much cleaner if the upstream build system
would allow to disable compression. The patch below adds a
--without-compress-lisp option for this. I've tested it on an
x86_64-pc-linux-gnu system and it works fine for me.


--- emacs-orig/ChangeLog
+++ emacs/ChangeLog
@@ -1,3 +1,11 @@
+2013-09-06  Ulrich Müller  <ulm@gentoo.org>
+
+	* configure.ac (--without-compress-lisp): New option, suppresses
+	compression of installed .el files.
+	(GZIP_LISP): New variable.
+	* Makefile.in (GZIP_LISP): New, set by configure.
+	(install-arch-indep): Test for GZIP_LISP when compressing .el files.
+
 2013-09-05  Dmitry Antipov  <dmantipov@yandex.ru>
 
 	Make --without-x compatible with --enable-gcc-warnings.
--- emacs-orig/configure.ac
+++ emacs/configure.ac
@@ -264,6 +264,14 @@
 ## Makefile.in needs the cache file name.
 AC_SUBST(cache_file)
 
+OPTION_DEFAULT_ON([compress-lisp],[don't compress the installed .el files])
+if test $with_compress_lisp = yes; then
+   GZIP_LISP=yes
+else
+   GZIP_LISP=
+fi
+AC_SUBST(GZIP_LISP)
+
 ## This is an option because I do not know if all info/man support
 ## compressed files, nor how to test if they do so.
 OPTION_DEFAULT_ON([compress-info],[don't compress the installed Info pages])
--- emacs-orig/Makefile.in
+++ emacs/Makefile.in
@@ -257,8 +257,10 @@
 # Create a link to a file in the same directory as the target.
 LN_S_FILEONLY = @LN_S_FILEONLY@
 
-# We use gzip to compress installed .el files.
+# We use gzip to compress some installed files.
 GZIP_PROG = @GZIP_PROG@
+# If non-nil, compress the installed .el files.
+GZIP_LISP = @GZIP_LISP@
 # If non-nil, gzip the installed Info and man pages.
 GZIP_INFO = @GZIP_INFO@
 
@@ -613,7 +615,7 @@
 	  ${write_subdir}
 	subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \
 	  ${write_subdir} || true
-	[ -z "${GZIP_PROG}" ] || \
+	if [ -n "${GZIP_LISP}" ] && [ -n "${GZIP_PROG}" ]; then \
 	  ( echo "Compressing *.el ..." ; \
 	    unset CDPATH; \
 	    thisdir=`/bin/pwd`; \
@@ -623,7 +625,8 @@
 	      for f in `find . -name "*.elc" -print`; do \
 	        ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
 	      done ; \
-	    done )
+	    done ) ; \
+	fi
 	-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
 
 ## The above chmods are needed because "umask 022; tar ..." is not





             reply	other threads:[~2013-09-07  6:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-07  6:57 Ulrich Müller [this message]
2013-09-07  7:43 ` bug#15297: 24.3.50; Compression of installed .el files should be configurable Eli Zaretskii
2013-09-07  8:35   ` Ulrich Müller
2013-09-07  8:50     ` Eli Zaretskii
2013-09-07  9:50       ` Ulrich Müller
2013-09-07 10:04         ` Eli Zaretskii
2013-09-07 10:46           ` Ulrich Müller
2013-09-07 12:27             ` Eli Zaretskii
2013-09-08 23:52   ` Glenn Morris
2013-09-07 17:28 ` Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21034.52823.580662.797952@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=15297@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.