unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#15297: 24.3.50; Compression of installed .el files should be configurable
@ 2013-09-07  6:57 Ulrich Müller
  2013-09-07  7:43 ` Eli Zaretskii
  2013-09-07 17:28 ` Glenn Morris
  0 siblings, 2 replies; 10+ messages in thread
From: Ulrich Müller @ 2013-09-07  6:57 UTC (permalink / raw)
  To: 15297

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





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-09-08 23:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-07  6:57 bug#15297: 24.3.50; Compression of installed .el files should be configurable Ulrich Müller
2013-09-07  7:43 ` 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

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).