--- emacs22-22.1.orig/debian/emacs.menu.in +++ emacs22-22.1/debian/emacs.menu.in @@ -0,0 +1,15 @@ +?package(@PKG_NAME@):\ + needs="text"\ + section="Applications/Editors"\ + title="@MENU_TITLE@ (text)"\ + command="/usr/bin/@BIN_NAME@ -nw"\ + icon="/usr/share/emacs/@FULL_VERSION@/etc/emacs.xpm"\ + hints="Text" + +?package(@PKG_NAME@):\ + needs="X11"\ + section="Applications/Editors"\ + title="@MENU_TITLE@ (@SUB_FLAVOR@)"\ + command="/usr/bin/@BIN_NAME@-@X_SUPPORT@"\ + icon="/usr/share/emacs/@FULL_VERSION@/etc/emacs.xpm"\ + hints="Text" --- emacs22-22.1.orig/debian/emacs-el.overrides.linda +++ emacs22-22.1/debian/emacs-el.overrides.linda @@ -0,0 +1,2 @@ +# linda is stupid, copyright.el.gz isn't a copyright file +Tag: compressed-copyright --- emacs22-22.1.orig/debian/docs +++ emacs22-22.1/debian/docs @@ -0,0 +1,4 @@ +AUTHORS +BUGS +CONTRIBUTE +README --- emacs22-22.1.orig/debian/changelog +++ emacs22-22.1/debian/changelog @@ -0,0 +1,208 @@ +emacs22 (22.1-0ubuntu10.1) hardy-security; urgency=low + + * SECURITY UPDATE: temporary file race condition in vcdiff + * debian/patches/vcdiff-tmp-race.diff: update lib-src/vcdiff to use + mktemp + * References + CVE-2008-1694 + + -- Jamie Strandboge Thu, 01 May 2008 14:27:46 -0400 + +emacs22 (22.1-0ubuntu10) hardy; urgency=low + + * debian/control: Conflict and Replace emacs22-common-non-dfsg + (LP: #172389). Thanks to Jamie Raymond for the report. + * debian/emacs.prerm: Remove alternatives in reverse creation order + (LP: #162932). Thanks to James Troup for the report. + * debian/emacs.menu.in: + - Use Applications/Editors instead of Apps/Editors as per menu policy. + - Move menu definition for "emacs -nw" here, and delete + emacs-common.menu.in. This way, if the user installs emacs22-nox, + they will not have an unwanted menu item added (LP: #157984). + Thanks to Ryan for the report. + * debian/patches: + - feature-spell-warning.diff: New patch that displays a warning when + spell is used and the spell binary is not installed (LP: #154989). + - fix-comint-sudo.diff: New patch that causes comint to recognize the + sudo prompt used by Ubuntu (LP: #162890). + - Rename CVE-2007-6109.diff to fix-format-overflow.diff so that it + shows up in README.Debian. Add patch header as well. + - fix-local-vars-security.diff: Add CVE ID. + * debian/README.in: + - Place Ubuntu rather than Debian in the header line. + - Add link to further explanation for why we use a separate package. + - Clarify what "this package" means. + - Together this fixes LP: #180164. Thanks to era for the report and + patch. + * debian/rules: Don't build debian/emacs-common.menu and don't call + dh_installmenu -i. + + -- Michael W. Olson (GNU address) Tue, 08 Jan 2008 18:00:57 -0500 + +emacs22 (22.1-0ubuntu9) hardy; urgency=low + + * Rebuild against libgif-dev instead of libungif4-dev (LP: #174252) + + -- Ilya Eremin Fri, 21 Dec 2007 00:35:33 +0000 + +emacs22 (22.1-0ubuntu8) hardy; urgency=low + + * Security fix: patches/CVE-2007-6109.diff. Patch from upstream Romain + Francoise! (LP: #174177) + + -- Reinhard Tartler Fri, 14 Dec 2007 15:47:26 +0100 + +emacs22 (22.1-0ubuntu7) hardy; urgency=low + + * Brown paper bag release. + * debian/rules (build, clean): Call patch and unpatch, respectively, so + that our patches actually get applied. + + -- Michael W. Olson (GNU address) Sat, 03 Nov 2007 22:45:01 -0400 + +emacs22 (22.1-0ubuntu6) hardy; urgency=low + + [ Michael Olson: Fix security issue. ] + * debian/patches/fix-local-vars-security.diff: New patch that fixes a + bug in local variables handling. This bug permitted very risky, close + to arbitrary modification of the behavior of Emacs by potentially + untrusted visited files. Namely, highly unsafe variables like + `load-path' could be changed without authorization. Fixes Launchpad + #159525 and Debian #449008. + + [ Michael Olson: Bring this closer to Debian's packaging. ] + * debian/control: Remove Build-Depends for cdbs, since we really don't + need it after all. + * debian/patches: Remove executable bits for all patches. + * debian/rules: + - Include /usr/share/quilt/quilt.make instead of cdbs. Thanks to + Romain Francoise for discovering this Makefile. + - Trivial changes that minimize the differences between our package + and Debian's: + + Use $(...) rather than ${...}, since the former seems to be + preferred by debian. + + Add "set -o pipefail" before several commands involving pipes, so + that the error code returned is the one for the first command with + an error in the pipe. Since the version of bash in Debian sarge + does not support this option, and we want to be able to share + changes with Romain's emacs-snapshot backport for sarge, send the + output of set to /dev/null and force the exit status to be 0. + + (nominal_ver): Split command into multiple lines. + + Reorganize some sections to make it easier to compare changes. + + Export DEB_HOST_GNU_TYPE and DEB_BUILD_GNU_TYPE. + + Rename DEB_TRASH to deb_trash. + + Rename bin_name to flavor. + + Update comments. + + (confflags): Use "--build=" instead of "--build " and "--host=" + instead of "--host ". + + (deb_orig_tgz): Introduce. + + (persistent_autogen_build_files) + (nonpersistent_autogen_build_files) + (persistent_autogen_install_files) + (nonpersistent_autogen_install_files, autogen_build_files) + (autogen_install_files, persistent_autogen_files) + (nonpersistent_autogen_files): New variables that replace + PERSISTENT_AUTOGEN_FILES, NONPERSISTENT_AUTOGEN_FILES, and + DEBPKGFILES. + - (quilt): New variable that specifies how to call quilt. This + particular name was chosen because Debian uses it in their emacs22 + packaging. + - (patch_info): Use $(quilt) rather than $(DEB_QUILT_CMD). + + -- Michael W. Olson (GNU address) Fri, 02 Nov 2007 11:00:58 -0400 + +emacs22 (22.1-0ubuntu5) gutsy; urgency=low + + * Trigger rebuild for hppa + + -- LaMont Jones Thu, 04 Oct 2007 19:36:25 +0000 + +emacs22 (22.1-0ubuntu4) gutsy; urgency=low + + [ Michael Olson ] + * debian/control(.in): Add emacs22 as a Depends option for the emacs + metapackage + + [ Reinhard Tartler ] + * Don't install postinst in emacs metapackage, Fixes LP: #128978 + + -- Reinhard Tartler Sun, 29 Jul 2007 10:40:00 +0200 + +emacs22 (22.1-0ubuntu3) gutsy; urgency=low + + [ Michael Olson ] + * debian/control(.in): Build-Depend on quilt >= 0.42, because earlier + versions do not have the "header" command. + * debian/patches: + - fix-emacs-manpage.diff: New patch that includes the current version + of etc/emacs.1 from upstream. This fixes several typographical + errors, and documents the -Q option. + - debian-emacs-manpage.diff: Rebase against fix-emacs-manpage.diff. + + [ Reinhard Tartler ] + * debian/control(.in): add "emacs" metapackage, prefer emacs-gtk over + emacs-nox + + -- Reinhard Tartler Sat, 28 Jul 2007 11:29:55 +0200 + +emacs22 (22.1-0ubuntu2) gutsy; urgency=low + + [ Michael Olson ] + * Review patches from Debian's emacs22 package. + - patches/debian-fakemail-program-name.diff: New patch for + lib-src/fakemail.c that changes a mention of /bin/mail to + /usr/bin/mail. We don't go as far as Debian in throwing errors, + because that seems like overkill. + - patches/fix-cc-mode-local-vars.diff: New patch for + lisp/progmodes/cc-mode.el that fixes a buggy interaction with + file local variables. Include ChangeLog entry as well. + - patches/debian-require-liblockfile.diff: New patch for + lib-src/movemail.c that causes the build to fail if liblockfile is + not being used. + - patches/debian-mail-from-style.diff: Modify to also set + `message-sendmail-f-is-evil' to t by default. + - patches/debian-site-init.diff: Place the emacs22-specific Info + directory before the site-wide Info directory, rather than after it. + - patches/debian-version-mention.diff: Set to my name rather than + Rob's, and change description to mention Ubuntu. + - patches/debian-startup.diff: Remove commented-out code and provide + a more detailed explanation of what's going on. + * Rename some patches: + - patches/feature-dbp-horizontal-split.diff: Rename from + debian-dp-split.dpatch to indicate that this is a feature-adding + patch. + - patches/debian-site-init.diff: Rename from + debian-default-info-directory.dpatch. + - patches/debian-startup.diff: Rename from debian-emacs-flavor.dpatch. + - patches/fix-vc-bfn.diff: Rename from patches/debian-vc-bfn.dpatch + to indicate that this a bugfix patch. + - patches/fix-font-lock-tty.diff: Rename from + debian-font-lock-tty.dpatch to indicate that this is a bugfix patch. + * Migrate debian/patches from dpatch to quilt. + - debian/control(.in): Remove dpatch from Build-Depends and add quilt. + Add cdbs to Build-Depends to silence lintian. + - debian/rules: + - Migrate to quilt. + - New function patch_info to extract information from the headers + of patches that begin with a certain prefix. + - Split patch output in README.Debian into several sections, in + order make it easier to categorize by the type of patch. We use + the name of the patch to determine what kind it is. + - Lines with '#' in the headers of patches are stripped out. + - Multiple consecutive blank lines are trimmed to only one. + - debian/patches: Rename *.dpatch to *.diff and prettify headers. + Also, refresh patches that applied with offsets. + - debian/README.in: Remove lines at the end. + + [ Reinhard Tartler ] + * Add X-Vcs-Bzr headers to debian/control. + + -- Michael W. Olson (GNU address) Thu, 19 Jul 2007 08:52:36 -0400 + +emacs22 (22.1-0ubuntu1) gutsy; urgency=low + + * New upstream release. + * This package borrows much from the work on emacs-snapshot by Romain + Francoise. + + -- Michael W. Olson (GNU address) Fri, 06 Jul 2007 18:41:48 -0400 --- emacs22-22.1.orig/debian/emacs.preinst +++ emacs22-22.1/debian/emacs.preinst @@ -0,0 +1,20 @@ +#!/bin/sh -e + +# If lsof is installed, look for running Emacsen. If any are found, +# warn the user that changing Emacs's files from under it isn't safe... +# We don't bother trying to find processes if lsof isn't installed; +# using pgrep or something similar would turn up false positives. +F=/usr/bin/@BIN_NAME@-@X_SUPPORT@ +if [ -f $F ] && [ -x /usr/bin/lsof ]; then + PIDS=`lsof -F p $F 2>/dev/null | wc -l || true` + if [ $PIDS -ne 0 ]; then + [ $PIDS -ge 2 ] && S="es" + printf "%d %s process%s found\n" $PIDS `basename $F` "$S" + echo "NOTE: closing all running Emacsen before upgrading" \ + "is strongly recommended!" + fi +fi + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/bug.control.in +++ emacs22-22.1/debian/bug.control.in @@ -0,0 +1,2 @@ +report-with: @BIN_NAME@-common @BIN_NAME@-bin-common @BIN_NAME@ @BIN_NAME@-gtk @BIN_NAME@-nox @BIN_NAME@-el emacsen-common +package-status: dictionaries-common --- emacs22-22.1.orig/debian/bug.presubj.in +++ emacs22-22.1/debian/bug.presubj.in @@ -0,0 +1,6 @@ +Please use "@BIN_NAME@ -q" to verify that the bug you want to report +isn't caused by a configuration error. + +If you still see the bug, please try again with "@BIN_NAME@ -Q" +(capital q), this switch disables the various add-on Emacs packages +you have installed (which could be causing the bug). --- emacs22-22.1.orig/debian/emacs-common.postinst +++ emacs22-22.1/debian/emacs-common.postinst @@ -0,0 +1,91 @@ +#!/bin/sh -e + +MAJOR=@MAJOR_VERSION@ +MINOR=@MINOR_VERSION@ +FULL=@FULL_VERSION@ +INFOFILES="@INFO_FILES@" +INFO_SUBDIR=@INFO_EMACSDIR@ +INFO_TITLE="@INFO_TITLE@" + +for file in ${INFOFILES} +do + install-info --quiet --section "${INFO_TITLE}" "${INFO_TITLE}" \ + /usr/share/info/${INFO_SUBDIR}/${file}.gz || true +done + +# Create the site-lisp dir for this flavor if we're allowed + +#### Begin Bug fix hack for old emacs20 package brain damage. +# +# We have to handle /usr/local/share and /usr/local/share/emacs here +# because emacs20 used to contain /usr/local/share :< . Normally +# these dirs should have been handled exclusively by emacsen-common. + +parentdir=/usr/local +newdir=share + +if [ -d ${parentdir} ] +then + if mkdir ${parentdir}/${newdir} 2>/dev/null + then + chown root:staff ${parentdir}/${newdir} + chmod 2775 ${parentdir}/${newdir} + fi +fi + +parentdir=/usr/local/share +newdir=emacs + +if [ -d ${parentdir} ] +then + if mkdir ${parentdir}/${newdir} 2>/dev/null + then + chown root:staff ${parentdir}/${newdir} + chmod 2775 ${parentdir}/${newdir} + fi +fi + +parentdir=/usr/local/share/emacs +newdir=site-lisp + +if [ -d ${parentdir} ] +then + if mkdir ${parentdir}/${newdir} 2>/dev/null + then + chown root:staff ${parentdir}/${newdir} + chmod 2775 ${parentdir}/${newdir} + fi +fi + +#### End Bug fix hack for old emacs20 package brain damage. + + +parentdir=/usr/local/share/emacs +newdir=${FULL} + +if [ -d ${parentdir} ] +then + if mkdir ${parentdir}/${newdir} 2>/dev/null + then + chown root:staff ${parentdir}/${newdir} + chmod 2775 ${parentdir}/${newdir} + fi +fi + +parentdir=/usr/local/share/emacs/${FULL} +newdir=site-lisp + +if [ -d ${parentdir} ] +then + if mkdir ${parentdir}/${newdir} 2>/dev/null + then + chown root:staff ${parentdir}/${newdir} + chmod 2775 ${parentdir}/${newdir} + fi +fi + +# emacsen-common/emacs-install used to be here. + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/README.in +++ emacs22-22.1/debian/README.in @@ -0,0 +1,26 @@ +emacs22 for Ubuntu -*- outline -*- +------------------ + +* Notes about emacs22 + +These packages are based on the initial packaging work of Jérôme +Marant and Rob Browning (assisted by numerous contributors) and are +maintained by Michael Olson . Romain Francoise + made an emacs-snapshot package which helped +maintenance of this package significantly. + +This version of Emacs has support for GTK+ widgets. The default +version (emacs22) still uses Lucid, a separate binary package +(emacs22-gtk) is available if you want GTK+ support. + +Several major packages have been updated or added in Emacs 22. In +particular, Gnus is now at version 5.11. If you had been using the +version of Gnus shipped in Emacs 21, starting Gnus 5.11 may convert +files automatically and generally alter your data. Make sure you have +good backups. + +Ubuntu's emacs22 packages are distinct from Debian's packaging of +Emacs 22, because we do not want to place the manual in a separate +package. See +for further rationale. + --- emacs22-22.1.orig/debian/emacs.postinst +++ emacs22-22.1/debian/emacs.postinst @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +# Register ourselves as the flavor alternative +update-alternatives \ + --install /usr/bin/@BIN_NAME@ @BIN_NAME@ \ + /usr/bin/@BIN_NAME@-@X_SUPPORT@ 0 + +# emacsen-common registration: if a subflavor package is already +# installed, don't call `emacs-install'. +F=`ls /var/lib/@BIN_NAME@/installed-subflavors/@BIN_NAME@-* 2>/dev/null || true` +if [ -z "$F" ]; then + # Set up the emacs alternative for @BIN_NAME@ + update-alternatives \ + --install /usr/bin/emacs emacs \ + /usr/bin/@BIN_NAME@ @BIN_PRIORITY@ \ + --slave /usr/share/man/man1/emacs.1.gz emacs.1.gz \ + /usr/share/man/man1/emacs.1@BIN_NAME@.gz + + # ... then set up the editor alternative... + update-alternatives \ + --install /usr/bin/editor editor \ + /usr/bin/@BIN_NAME@ 0 \ + --slave /usr/share/man/man1/editor.1.gz editor.1.gz \ + /usr/share/man/man1/emacs.1@BIN_NAME@.gz + + # ... then call `emacs-install'. + INSTLOG=`mktemp /tmp/@BIN_NAME@.XXXXXX` + echo -n "Byte-compiling add-on packages, please wait..." + if /usr/lib/emacsen-common/emacs-install @BIN_NAME@ >$INSTLOG 2>&1; then + echo " done." + [ -z "$EMACS_DEBUG" ] && rm -f $INSTLOG + else + echo " failed." + echo + echo "!! Byte-compilation for @BIN_NAME@ failed!" + echo "!! This indicates a bug in one of the add-on packages" + echo "!! installed on your system, or a bug in Emacs itself." + echo "!! Please file a bug report against @BIN_NAME@" + echo "!! and attach the file $INSTLOG" + exit 1 + fi +fi + +# Register ourselves as a subflavor of this flavor +touch /var/lib/@BIN_NAME@/installed-subflavors/@BIN_NAME@-@X_SUPPORT@ + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/rules +++ emacs22-22.1/debian/rules @@ -0,0 +1,739 @@ +#!/usr/bin/make -f + +# Copyright 1994, 1995 Ian Jackson. +# Copyright 1998-2003 Rob Browning . +# Copyright 2004, 2005 Jérôme Marant . +# Copyright 2005, 2006, 2007 Romain Francoise . +# Copyright 2007 Michael Olson . + +# Originally copied from the GNU Hello Debian rules file (1.3). +# modified for emacs by Mark Eichin +# modified for emacs20 by Rob Browning +# modified for emacs21 by Rob Browning +# modified for emacs-snapshot by Romain Francoise +# modified for emacs22 by Michael Olson + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +SHELL = /bin/bash + +include /usr/share/quilt/quilt.make + +quilt := QUILT_PATCHES=$(QUILT_PATCH_DIR) quilt --quiltrc /dev/null + +deb_trash := + +pf := set -o pipefail 2>/dev/null || : + +# For now we assume that emacs' versioning scheme is always +# MAJOR.MINORtinyrev where MAJOR and MINOR are integers and tinyrev is +# an optional lowercase letter (or letters). We also assume that +# upstream uses a numbering scheme that sorts in a "Debian friendly" +# way. So far that's always been true. If it becomes false, some of +# the values below will have to be set manually. + +# At the moment, we try to make it so that a "debian/rules clean" will +# get you back to the same state you were in before "debian/rules +# build". With the original upstream source that's somewhat tricky +# because they ship the .elc files, but we need to re-build them when +# we patch the corresponding .el files. This is further complicated +# by the fact that any of these .el files may have macros, and if +# those are changed, then any other .el files that use those macros +# must also be recompiled. Over the years, we've tried various ways +# to handle this problem, originally by trying to keep track of which +# files need to be recompiled and only recompiling those, then later +# by just re-building all the .elc files with "make bootstrap". In +# either case, if you don't want to have diff bloat, you have to do +# something to keep track of the original .elc files so you can +# restore them during make clean. + +# All of this was a lot of work, and was using quite a bit of +# unnecessary storage both in the .orig.tar.gz and during the package +# build. So in order to avoid this, and to dramatically simplify +# things, we now just remove the .elc files from the upstream +# distribution whenever we create the debian .orig.tar.gz file for a +# given upstream release. Since were always clobbering all of the +# .elc files during the package build anyway, this shouldn't be any +# great loss, and it also means that "debian/rules clean" now needs to +# be little more than a "make distclean" followed by a purge of all +# the remaining .elc files. + +# NOTE -- emacs doesn't respect .elc files in VPATH build. They're +# modified in srcdir, not builddir. We don't worry about this because +# it shouldn't affect our builds ATM, but if we ever have more than +# one emacs configuration which could produce differing .elc files, +# we'll need to be careful. We'll probably have to build completely +# separate packages from completely separate source trees. + +# Note that we use quilt to handle the debian patches. One of the +# biggest differences between quilt and say dpatch is that you have to +# explicitly "quilt add" a file to a patch before you edit it. See +# "man quilt" for details.. + +# If the source tree ever ends up in an untenable "can't go forward, +# can't go back" state with respect to patching, you can always start +# over by just moving the current debian directory to a newly unpacked +# orig.tar.gz tree. Note that if you were in the process of editing a +# patch, you will lose those edits, but shouldn't lose anything else. +# This process just reverts all of the upstream files and abandons the +# volatile "what's been done to the current tree" state that quilt +# maintains in ./.pc. All of the actual patches are stored in +# debian/patches and should be unharmed. + +###################################################################### +# Important top-level targets: +# +# check-vars - displays how the version number has been parsed. +# buildpackage - build binary packages via dpkg-buildpackage w/suitable args +# prepare-release - prepare and check debs for upload. +# autofiles-sync - force a new autofiles.diff to be generated. +# +###################################################################### + +# The name of the Debian source package +src_name := $(shell $(pf); dpkg-parsechangelog | egrep '^Source:') +src_name := $(shell $(pf); echo $(src_name) | perl -pe 's/Source:\s+//o') + +# The version from the changelog (i.e. 20.5-1) +debian_ver := $(shell $(pf); dpkg-parsechangelog | egrep '^Version:') +debian_ver := $(shell $(pf); echo $(debian_ver) | perl -pe 's/Version:\s+//o') +# The Debian revision (i.e. the 1 from 20.5-1) +# Always everything after the last '-' +debian_rev := $(shell $(pf); echo $(debian_ver) | perl -pe 's/.*-//o') + +# This is the official upstream version defined by the emacs-version +# constant in lisp/version.el +nominal_ver := \ + $(shell $(pf); egrep 'defconst[[:space:]]*emacs-version' lisp/version.el \ + | sed -e 's/^[^"]*"\([^"]*\)".*$$/\1/') + +# This must be the version that's actually used at runtime for things +# like load-path. It may not be the same as the upstream version +# (i.e. when you have upstream 20.5a, the functional version may still +# be 20.5), so sometimes we may have to do this by hand. +runtime_ver := $(shell $(pf); echo $(nominal_ver) | perl -pe 's/[a-z]+$$//o') + +major_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/\..*$$//o') +minor_ver := $(shell $(pf); echo $(runtime_ver) | perl -pe 's/^[^.]*\.//o') + +# version for the debian source, i.e. if the upstream is 21.3, this +# might be 21.3, or it might be 21.3+1 if we've had to have more than +# one re-release of the upstream source. Rare, but it happens... +# Always everything before the last '-' +debsrc_ver := $(shell $(pf); echo $(debian_ver) | perl -pe 's/-[^-]+$$//o') + +deb_orig_tgz := $(src_name)_$(debsrc_ver).orig.tar.gz + +###################################################################### +# Customizable variables + +# The flavor (i.e. emacs22) currently matches the source package name. +flavor := $(src_name) + +# Give this higher priority than Emacs 21 +bin_priority = 25 + +# Generic title of menu entries +menu_title = Emacs 22 +flav_desc = Emacs 22 + +info_title = Emacs 22 + +# Info files subdirectory +info_emacsdir = emacs22 + +###################################################################### + +# As recommended by /usr/share/doc/autotools-dev/README.Debian.gz. +# Handle cross-compiling and don't make ./configure guess. +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) + +# We need extra pure space for Debian menu entries. +CFLAGS := -DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g +LDFLAGS := -g -Wl,--as-needed + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +INSTALL = install + +target := $(DEB_HOST_GNU_TYPE) +movemail_bin := usr/lib/emacs/$(runtime_ver)/$(target)/movemail + +# Info files that are going to show up in the main dir. +main_dir_info_files := $(shell $(pf); grep "^../info" man/Makefile.in | \ + sed -e "s%../info/\([^:]*\).*$$%\1%" | sort) eintr elisp + +# Files that the build stage depends on (may also be listed in other vars). +persistent_autogen_build_files := debian/control debian/copyright +nonpersistent_autogen_build_files := + +# These files must always exist, i.e. can't ever be cleaned. +persistent_autogen_install_files := +nonpersistent_autogen_install_files := \ + debian/README.Debian \ + debian/README.binpkg \ + debian/bug.presubj \ + debian/bug.script \ + debian/bug.control \ + debian/emacsclient-$(flavor).desktop \ + debian/$(flavor).menu \ + debian/$(flavor).preinst \ + debian/$(flavor).postinst \ + debian/$(flavor).prerm \ + debian/$(flavor).overrides.lintian \ + debian/$(flavor).desktop \ + debian/$(flavor)-gtk.preinst \ + debian/$(flavor)-gtk.postinst \ + debian/$(flavor)-gtk.prerm \ + debian/$(flavor)-gtk.menu \ + debian/$(flavor)-gtk.overrides.lintian \ + debian/$(flavor)-gtk.desktop \ + debian/$(flavor)-nox.preinst \ + debian/$(flavor)-nox.postinst \ + debian/$(flavor)-nox.prerm \ + debian/$(flavor)-nox.overrides.lintian \ + debian/$(flavor)-el.overrides.linda \ + debian/$(flavor)-common.postinst \ + debian/$(flavor)-common.prerm \ + debian/$(flavor)-common.overrides.lintian \ + debian/$(flavor)-common.overrides.linda \ + debian/$(flavor)-bin-common.postinst \ + debian/$(flavor)-bin-common.prerm \ + debian/$(flavor)-bin-common.overrides.lintian \ + debian/$(flavor)-bin-common.overrides.linda + +autogen_build_files := \ + $(nonpersistent_autogen_build_files) $(persistent_autogen_build_files) + +autogen_install_files := \ + $(nonpersistent_autogen_install_files) $(persistent_autogen_install_files) + +persistent_autogen_files := \ + $(persistent_autogen_build_files) $(persistent_autogen_install_files) + +nonpersistent_autogen_files := \ + $(nonpersistent_autogen_build_files) $(nonpersistent_autogen_install_files) + + +# Build directories +EMACS_COMMON = $(CURDIR)/debian/$(flavor)-common +EMACS_BIN_COMMON = $(CURDIR)/debian/$(flavor)-bin-common +EMACS = $(CURDIR)/debian/$(flavor) +EMACS_NOX = $(CURDIR)/debian/$(flavor)-nox +EMACS_GTK = $(CURDIR)/debian/$(flavor)-gtk +EMACS_EL = $(CURDIR)/debian/$(flavor)-el + +local_lpath := /etc/$(flavor):/etc/emacs +local_lpath := $(local_lpath):/usr/local/share/emacs/$(runtime_ver)/site-lisp +local_lpath := $(local_lpath):/usr/local/share/emacs/site-lisp +local_lpath := $(local_lpath):/usr/share/emacs/$(runtime_ver)/site-lisp +local_lpath := $(local_lpath):/usr/share/emacs/site-lisp + +# This shouldn't be needed as of 20.3 +local_lpath := $(local_lpath):/usr/share/emacs/$(runtime_ver)/leim + +# Installation local_lpath +local_lpath_install := $(EMACS_COMMON)/$(subst :,:$(EMACS_COMMON)/,${local_lpath}) + +define checkdir + test -f debian/emacs.postinst + @if ! test -f src/emacs.c; \ + then \ + echo; \ + echo -n "The upstream source does not appear to be available."; \ + echo " Please put the contents"; \ + echo -n "of $(deb_orig_tgz) into the"; \ + echo " current directory."; \ + echo; \ + false; \ + fi +endef + +define expand_file_subst_vars + sed -e "s%@SRC_NAME@%${src_name}%g" \ + -e "s%@BIN_NAME@%$(flavor)%g" \ + -e "s%@PKG_NAME@%${pkg_name}%g" \ + -e "s%@FULL_VERSION@%${runtime_ver}%g" \ + -e "s%@MAJOR_VERSION@%${major_ver}%g" \ + -e "s%@MINOR_VERSION@%${minor_ver}%g" \ + -e "s%@PACKAGE_VERSION@%${debian_ver}%g" \ + -e "s%@DEBIAN_REV@%${deb_rev}%g" \ + -e "s%@NOMINAL_VERSION@%${nominal_ver}%g" \ + -e "s%@X_SUPPORT@%${xsupport}%g" \ + -e "s%@BIN_PRIORITY@%${bin_priority}%g" \ + -e "s%@INFO_EMACSDIR@%${info_emacsdir}%g" \ + -e "s%@INFO_FILES@%${main_dir_info_files}%g" \ + -e "s%@INFO_TITLE@%${info_title}%g" \ + -e "s%@MENU_TITLE@%${menu_title}%g" \ + -e "s%@TARGET@%${target}%g" \ + -e "s%@FLAVOUR_DESC@% (${flav_desc})%g" \ + -e "s%@SUB_FLAVOR@%${sub_flavor}%g" \ + > $@ < $< +endef + +check-vars: + @echo "current directory: $(CURDIR)" + @echo "debian_ver: ${debian_ver}" + @echo "debsrc_ver: ${debsrc_ver}" + @echo "debian_rev: ${debian_rev}" + @echo "nominal_ver: ${nominal_ver}" + @echo "runtime_ver: ${runtime_ver}" + @echo "major_ver: ${major_ver}" + @echo "minor_ver: ${minor_ver}" +.PHONY: check-vars + +define patch_info + { for p in $$($(quilt) series | grep "^$(1)-"); do \ + $(quilt) header $$p; \ + done } \ + | grep -v '^#' | cat -s +endef + +# we use PHONY because deleting patches won't cause rebuild otherwise. +debian/README.Debian: debian/README.in debian/patches/*.diff + cp debian/README.in debian/README.Debian + @echo "* Additional features" >> debian/README.Debian + @echo >> debian/README.Debian + $(call patch_info,feature) >> debian/README.Debian + @echo "* Bugfixes" >> debian/README.Debian + @echo >> debian/README.Debian + $(call patch_info,fix) >> debian/README.Debian + @echo "* Changes specific to Debian-based systems" \ + >> debian/README.Debian + @echo >> debian/README.Debian + $(call patch_info,debian) >> debian/README.Debian +.PHONY: debian/README.Debian + +debian/%: debian/%.in debian/changelog + ${expand_file_subst_vars} + +debian/$(flavor).%: xsupport := "x" +debian/$(flavor).%: pkg_name := $(flavor) +debian/$(flavor).%: sub_flavor := "X11" + +debian/$(flavor)-gtk.%: xsupport := "gtk" +debian/$(flavor)-gtk.%: pkg_name := $(flavor)-gtk +debian/$(flavor)-gtk.%: sub_flavor := "GTK" + +debian/$(flavor)-nox.%: xsupport := "nox" +debian/$(flavor)-nox.%: pkg_name := $(flavor)-nox + +debian/$(flavor)-common.%: pkg_name := $(flavor)-common + +debian/$(flavor)-bin-common.%: pkg_name := $(flavor)-bin-common + +debian/%.menu: debian/%.menu.in + ${expand_file_subst_vars} + +debian/$(flavor).%: debian/emacs.% + ${expand_file_subst_vars} + +debian/$(flavor)-gtk.%: debian/emacs.% + ${expand_file_subst_vars} + +debian/$(flavor)-nox.%: debian/emacs.% + ${expand_file_subst_vars} + +debian/$(flavor)-el.%: debian/emacs-el.% + ${expand_file_subst_vars} + +debian/$(flavor)-common.%: debian/emacs-common.% + ${expand_file_subst_vars} + +debian/$(flavor)-bin-common.%: debian/emacs-bin-common.% + ${expand_file_subst_vars} + +debian/emacsclient-$(flavor).%: debian/emacsclient.% + ${expand_file_subst_vars} + +define build_cmd + ${MAKE} CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +endef + +define check_pure_space + src/emacs -Q -batch --eval "(print pure-space-overflow)" 2>/dev/null \ + | grep -qx nil +endef + +emacs_inst = (${MAKE} install \ + INSTALL_STRIP="-s" \ + prefix=${1}/usr \ + sharedstatedir=${1}/var/lib \ + localstatedir=${1}/var \ + libexecdir=${1}/usr/lib \ + infodir=${1}/usr/share/info/${info_emacsdir} \ + mandir=${1}/usr/share/man \ + manext=.1$(flavor) \ + locallisppath=${local_lpath_install}) + +define emacs_build + # Build emacs + CFLAGS="${CFLAGS}" ./configure ${1} + ${build_cmd} + # Check for pure space overflow + ${check_pure_space} + # save binary from deletion + mv src/emacs src/${2} +endef + +define inst_readme + # Install README.Debian + $(INSTALL) -D -m 0644 debian/README.binpkg \ + ${1}/usr/share/doc/${2}/README.Debian +endef + +define inst_desktop + # Install desktop entry + $(INSTALL) -D -m 0644 debian/${2}.desktop \ + ${1}/usr/share/applications/${2}.desktop +endef + +define inst_bug_files + # Install bug script and control file + $(INSTALL) -D -m 0755 debian/bug.script \ + ${1}/usr/share/bug/${2}/script + $(INSTALL) -D -m 0644 debian/bug.control \ + ${1}/usr/share/bug/${2}/control +endef + +define inst_bug_notice + # Install bug notice + $(INSTALL) -D -m 0644 debian/bug.presubj \ + ${1}/usr/share/bug/${2}/presubj +endef + +define inst_overrides + # Install overrides + $(INSTALL) -D -m 0644 debian/${3}.overrides.${1} \ + ${2}/usr/share/${1}/overrides/${3} +endef + +define inst_binary + $(INSTALL) -d ${2}/usr/bin + cp src/${1} ${2}/usr/bin/${3} +endef + +define inst_manpage + $(INSTALL) -d ${1}/usr/share/man/man1 + dh_link -p${4} usr/share/man/man1/emacs.1${2}.gz \ + usr/share/man/man1/${3}.1.gz +endef + +# Common confflags +confflags += --prefix=/usr +confflags += --sharedstatedir=/var/lib +confflags += --libexecdir=/usr/lib +confflags += --localstatedir=/var +confflags += --infodir=/usr/share/info +confflags += --mandir=/usr/share/man +confflags += --with-pop=yes +confflags += --enable-locallisppath=${local_lpath} + +# Emacs confflags +emacs_confflags := ${confflags} +emacs_confflags += --with-x=yes +emacs_confflags += --with-x-toolkit=athena +emacs_confflags += --with-toolkit-scroll-bars + +# Emacs-gtk confflags +emacs_gtk_confflags := ${confflags} +emacs_gtk_confflags += --with-x=yes +emacs_gtk_confflags += --with-x-toolkit=gtk + +# Emacs-nox confflags +emacs_nox_confflags := ${confflags} +emacs_nox_confflags += --with-x=no + +build: patch build-stamp + +build-stamp: bootstrap emacs emacs-gtk emacs-nox + dh_testdir + touch $@ + +bootstrap: bootstrap-stamp +bootstrap-stamp: + dh_testdir + + # Emacs must be bootstrapped at least once in order to + # generate .elc files + CFLAGS="${CFLAGS}" ./configure ${emacs_confflags} + ${build_cmd} bootstrap + ${build_cmd} distclean + + touch $@ + +emacs: bootstrap emacs-stamp +emacs-stamp: + dh_testdir + + $(call emacs_build,${emacs_confflags},x-emacs) + ${build_cmd} distclean + + touch $@ + +emacs-gtk: bootstrap emacs-gtk-stamp +emacs-gtk-stamp: + dh_testdir + + $(call emacs_build,${emacs_gtk_confflags},gtk-emacs) + ${build_cmd} distclean + + touch $@ + +emacs-nox: bootstrap emacs-nox-stamp +emacs-nox-stamp: + dh_testdir + + $(call emacs_build,${emacs_nox_confflags},nox-emacs) + + touch $@ + +debian-clean: + dh_testdir + dh_testroot + + rm -f ${nonpersistent_autogen_files} + rm -f ${deb_trash} + + dh_clean + +clean: unpatch debian-clean + + rm -f *-stamp + + # Force configuration in order to prevent any problem + # that may have been happening during the previous + # build + CFLAGS="${CFLAGS}" ./configure ${emacs_confflags} + [ ! -f Makefile ] || $(MAKE) maintainer-clean + + rm -f src/{x,nox,gtk}-emacs + + # Remove byte compiled files + find -name "*.elc" | xargs --no-run-if-empty rm + + # Remove info files + for f in ${main_dir_info_files} ; do \ + rm -f info/$$f* ; \ + done + + # Remove backup files + find -name '*~' | xargs --no-run-if-empty rm -f + +install: build $(autogen_install_files) + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + ################################################## + # emacs-common (preparation) + + # Install everything in emacs-common. Then any other + # package is based on it. + $(call emacs_inst,$(EMACS_COMMON)) + + rm -f $(EMACS_COMMON)/usr/bin/{emacs,emacs-*} + + # lisp path directories + $(INSTALL) -d $(EMACS_COMMON)/etc/$(flavor)/site-start.d + $(INSTALL) -d $(EMACS_COMMON)/usr/share/$(flavor) + + # We need scratch space in /var to register subflavors + $(INSTALL) -d $(EMACS_COMMON)/var/lib/$(flavor)/installed-subflavors + + # The version-specific site-lisp dir, say emacs/21.1/site-lisp, needs + # to be in share/emacs21 so that as we upgrade from 21.1 to 21.2, etc., + # add-on package bits don't get left behind. + mv $(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/site-lisp \ + $(EMACS_COMMON)/usr/share/$(flavor) + dh_link -p$(flavor)-common usr/share/$(flavor)/site-lisp \ + usr/share/emacs/${runtime_ver}/site-lisp + + # This is a duplicate of the file in /site-lisp + rm $(EMACS_COMMON)/usr/share/emacs/site-lisp/subdirs.el + + # Install icon, and create symlink in the icons directory + cp debian/emacs.xpm \ + $(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/etc/emacs.xpm + dh_link -p$(flavor)-common \ + usr/share/emacs/${runtime_ver}/etc/emacs.xpm \ + usr/share/emacs/${runtime_ver}/etc/images/icons/emacs.xpm + + # Symlink icons directory in /usr/share/icons + dh_link -p$(flavor)-common \ + usr/share/emacs/${nominal_ver}/etc/images/icons \ + usr/share/icons/$(flavor) + + chown root.mail $(EMACS_COMMON)/${movemail_bin} + chmod g+s $(EMACS_COMMON)/${movemail_bin} + + # Mangle info files + chmod 755 debian/mangle-info + for f in ${main_dir_info_files} ; do \ + DEBIAN_INFO_PREFIX=${info_emacsdir} \ + debian/mangle-info \ + $(EMACS_COMMON)/usr/share/info/${info_emacsdir}/$$f ; \ + done + + # Symlink /usr/share/doc/emacs-common/NEWS to the Emacs NEWS file + dh_link -p$(flavor)-common \ + usr/share/emacs/${nominal_ver}/etc/NEWS \ + usr/share/doc/$(flavor)-common/NEWS + + # Get rid of unwanted dir file. + rm $(EMACS_COMMON)/usr/share/info/${info_emacsdir}/dir + rm $(EMACS_COMMON)/usr/share/info/${info_emacsdir}/dir.old* + + # make sure /usr/local dir doesn't exist + rm -rf $(EMACS_COMMON)/usr/local + + # Remove /var/games/emacs, too. + rm -rf $(EMACS_COMMON)/var/games/emacs + + $(call inst_overrides,lintian,$(EMACS_COMMON),$(flavor)-common) + $(call inst_overrides,linda,$(EMACS_COMMON),$(flavor)-common) + $(call inst_bug_files,$(EMACS_COMMON),$(flavor)-common) + + # Remove extra license files + rm -f $(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/{etc,lisp}/COPYING + + ################################################## + # emacs-bin-common (preparation) + + # Move common binary to emacs-bin-common + $(INSTALL) -d $(EMACS_BIN_COMMON)/usr + mv $(EMACS_COMMON)/usr/bin $(EMACS_BIN_COMMON)/usr + mv $(EMACS_COMMON)/usr/lib $(EMACS_BIN_COMMON)/usr + + # Set alternatives + (alternatives=`ls $(EMACS_BIN_COMMON)/usr/bin | xargs` && \ + for f in debian/$(flavor)-bin-common.* ; do \ + sed -e "s%@ALTERNATIVES@%$$alternatives%g" \ + $$f > $$f.new ; \ + mv $$f.new $$f ; \ + done) + + for f in `ls $(EMACS_BIN_COMMON)/usr/bin`; \ + do \ + mv $(EMACS_BIN_COMMON)/usr/bin/$$f \ + $(EMACS_BIN_COMMON)/usr/bin/$$f.$(flavor) ; \ + done + + # Move man pages + $(INSTALL) -d $(EMACS_BIN_COMMON)/usr/share + mv $(EMACS_COMMON)/usr/share/man $(EMACS_BIN_COMMON)/usr/share + + # Fix manpages + perl -pi -e "s|man1/etags\\.1|man1/etags\\.1$(flavor)|" \ + $(EMACS_BIN_COMMON)/usr/share/man/man1/ctags.1$(flavor) + dh_link -p$(flavor)-bin-common usr/share/man/man1/emacs.1$(flavor).gz \ + usr/share/man/man1/$(flavor).1.gz + + $(call inst_desktop,$(EMACS_BIN_COMMON),emacsclient-$(flavor)) + $(call inst_readme,$(EMACS_BIN_COMMON),$(flavor)-bin-common) + $(call inst_overrides,lintian,$(EMACS_BIN_COMMON),$(flavor)-bin-common) + $(call inst_overrides,linda,$(EMACS_BIN_COMMON),$(flavor)-bin-common) + $(call inst_bug_files,$(EMACS_BIN_COMMON),$(flavor)-bin-common) + + ################################################## + # emacs (preparation) + + $(call inst_binary,x-emacs,$(EMACS),$(flavor)-x) + $(call inst_manpage,$(EMACS),$(flavor),$(flavor)-x,$(flavor)) + $(call inst_readme,$(EMACS),$(flavor)) + $(call inst_desktop,$(EMACS),$(flavor)) + $(call inst_overrides,lintian,$(EMACS),$(flavor)) + $(call inst_bug_files,$(EMACS),$(flavor)) + $(call inst_bug_notice,$(EMACS),$(flavor)) + + ################################################## + # emacs-gtk (preparation) + + $(call inst_binary,gtk-emacs,$(EMACS_GTK),$(flavor)-gtk) + $(call inst_manpage,$(EMACS_GTK),$(flavor),$(flavor)-gtk,$(flavor)-gtk) + $(call inst_readme,$(EMACS_GTK),$(flavor)-gtk) + $(call inst_desktop,$(EMACS_GTK),$(flavor)-gtk) + $(call inst_overrides,lintian,$(EMACS_GTK),$(flavor)-gtk) + $(call inst_bug_files,$(EMACS_GTK),$(flavor)-gtk) + $(call inst_bug_notice,$(EMACS_GTK),$(flavor)-gtk) + + ################################################## + # emacs-nox (preparation) + + $(call inst_binary,nox-emacs,$(EMACS_NOX),$(flavor)-nox) + $(call inst_manpage,$(EMACS_NOX),$(flavor),$(flavor)-nox,$(flavor)-nox) + $(call inst_readme,$(EMACS_NOX),$(flavor)-nox) + $(call inst_overrides,lintian,$(EMACS_NOX),$(flavor)-nox) + $(call inst_bug_files,$(EMACS_NOX),$(flavor)-nox) + $(call inst_bug_notice,$(EMACS_NOX),$(flavor)-nox) + + ################################################## + # emacs-el (preparation) + + $(pf); \ + (cd $(EMACS_COMMON) && \ + find -name "*.el.gz" | \ + tar cpf - --files-from -) | \ + (cd $(EMACS_EL) && tar xpf -) + + $(call inst_readme,$(EMACS_EL),$(flavor)-el) + $(call inst_overrides,linda,$(EMACS_EL),$(flavor)-el) + $(call inst_bug_files,$(EMACS_EL),$(flavor)-el) + + ################################################## + # Final emacs-common clean ups + + # We install the DOC file in emacs-common. It used to be in + # the binary packages but it turns out that it's identical + # for all packages on all archs, and prevents installation + # of concurrent subflavors. (But let's just keep one.) + rm -f $(EMACS_COMMON)/usr/share/emacs/${runtime_ver}/etc/DOC-${runtime_ver}.2 + find $(EMACS_COMMON) -name "*.el.gz" -exec rm -f {} \; + +binary-indep: build install + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i + dh_installdocs -i + dh_link -i + dh_strip -i + dh_compress -XREADME.Debian -i + dh_fixperms -i + dh_installdeb -i + # don't install maintainer scripts in the metapackage + rm -vf debian/emacs/DEBIAN/{post,pre}{inst,rm} + dh_shlibdeps -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installinfo -a + dh_installman -a + dh_installchangelogs -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a + dh_desktop -a + dh_link -a + dh_strip -a + dh_compress -a + dh_fixperms -a -X${movemail_bin} + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- emacs22-22.1.orig/debian/emacs-bin-common.overrides.lintian +++ emacs22-22.1/debian/emacs-bin-common.overrides.lintian @@ -0,0 +1,7 @@ +@PKG_NAME@: setgid-binary usr/lib/emacs/@FULL_VERSION@/@TARGET@/movemail 2755 root/mail +@PKG_NAME@: manpage-section-mismatch usr/share/man/man1/emacs.1@SRC_NAME@.gz:22 1@SRC_NAME@ != 1 +@PKG_NAME@: manpage-section-mismatch usr/share/man/man1/emacsclient.1@SRC_NAME@.gz:1 1@SRC_NAME@ != 1 +@PKG_NAME@: manpage-section-mismatch usr/share/man/man1/etags.1@SRC_NAME@.gz:4 1@SRC_NAME@ != 1 +@PKG_NAME@: binary-without-manpage ctags.@SRC_NAME@ +@PKG_NAME@: binary-without-manpage emacsclient.@SRC_NAME@ +@PKG_NAME@: binary-without-manpage etags.@SRC_NAME@ --- emacs22-22.1.orig/debian/control +++ emacs22-22.1/debian/control @@ -0,0 +1,88 @@ +Source: emacs22 +Section: editors +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Michael W. Olson (GNU address) +Build-Depends: libncurses5-dev, texinfo, liblockfile-dev, libgif-dev, libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libgtk2.0-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42), lsb-release, debhelper (>= 5.0.0), libxaw7-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] +Standards-Version: 3.7.2 +XS-Vcs-Bzr: http://code.launchpad.net/%7Eubuntu-elisp/emacs/ubuntu/ + +Package: emacs22-common +Section: editors +Priority: optional +Architecture: all +Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0) +Suggests: emacs22-el +Conflicts: emacs22-el (<< ${source:Version}), w3-el, dictionaries-common (<< 0.60.0), emacs22-common-non-dfsg +Replaces: emacs22-common-non-dfsg +Description: The GNU Emacs editor's common infrastructure + GNU Emacs is the extensible self-documenting text editor. + This package contains the infrastructure common between emacs22, + emacs22-gtk, and emacs22-nox. + +Package: emacs22-bin-common +Section: editors +Priority: optional +Architecture: any +Depends: emacs22-common (= ${source:Version}), ${shlibs:Depends} +Description: The GNU Emacs editor's shared, architecture dependent files + GNU Emacs is the extensible self-documenting text editor. + This package contains the architecture dependent infrastructure + that's shared by emacs22, emacs22-gtk, and emacs22-nox. + +Package: emacs22 +Section: editors +Priority: optional +Architecture: any +Depends: emacs22-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor (Emacs 22) + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled with support for X. + . + If you have GTK+ 2.x installed on your system, you will probably have a + better experience with the emacs22-gtk package, instead of this one. + +Package: emacs22-gtk +Section: editors +Priority: optional +Architecture: any +Depends: emacs22-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: emacs22, emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor (with GTK+ 2.x support) + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled with support for GTK+ 2.x. + +Package: emacs22-nox +Section: editors +Priority: optional +Architecture: any +Depends: emacs22-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: emacs22, emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor (without X support) + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled without support for X. + +Package: emacs22-el +Section: editors +Priority: optional +Architecture: all +Depends: emacs22-common (= ${source:Version}) +Description: GNU Emacs LISP (.el) files + GNU Emacs is the extensible self-documenting text editor. + This package contains the elisp sources for the convenience of users, + saving space in the main package for small systems. + +Package: emacs +Section: editors +Priority: optional +Architecture: all +Provides: emacsen, editor, info-browser, mail-reader, news-reader +Depends: emacs22-gtk | emacs22 | emacs22-nox +Description: The GNU Emacs editor (metapackage) + GNU Emacs is the extensible self-documenting text editor. + This is a metapackage which will always depend on the latest Emacs + release. --- emacs22-22.1.orig/debian/patches/debian-emacs-news.diff +++ emacs22-22.1/debian/patches/debian-emacs-news.diff @@ -0,0 +1,19 @@ +** Mention Debian-specific changes in the Emacs NEWS file. + Provided by: Rob Browning + +Index: emacs22-22.1/etc/NEWS +=================================================================== +--- emacs22-22.1.orig/etc/NEWS 2007-05-29 00:29:34.000000000 -0400 ++++ emacs22-22.1/etc/NEWS 2007-07-08 22:23:26.000000000 -0400 +@@ -35,6 +35,11 @@ + ** cua.el, cua-mode.el: remove old versions. + + ++* Debian specific changes to Emacs ++ ++Please see /usr/share/doc/emacs22-common/README.Debian. ++ ++ + * Installation Changes in Emacs 22.1 + + ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' --- emacs22-22.1.orig/debian/patches/debian-cssc-vc-backend.diff +++ emacs22-22.1/debian/patches/debian-cssc-vc-backend.diff @@ -0,0 +1,20 @@ +** Use CSSC instead of SCCS. + SCCS isn't in Debian, use CSSC as replacement. + + Provided by: Rob Browning + +Index: emacs22-22.1/lisp/vc-hooks.el +=================================================================== +--- emacs22-22.1.orig/lisp/vc-hooks.el 2007-07-08 22:22:02.000000000 -0400 ++++ emacs22-22.1/lisp/vc-hooks.el 2007-07-08 22:22:58.000000000 -0400 +@@ -75,8 +75,8 @@ + :group 'vc) + + (defcustom vc-path +- (if (file-directory-p "/usr/sccs") +- '("/usr/sccs") ++ (if (file-directory-p "/usr/lib/cssc") ++ '("/usr/lib/cssc") + nil) + "*List of extra directories to search for version control commands." + :type '(repeat directory) --- emacs22-22.1.orig/debian/patches/fix-font-lock-tty.diff +++ emacs22-22.1/debian/patches/fix-font-lock-tty.diff @@ -0,0 +1,27 @@ +** Comment text is font-locked on 8-color ttys. + This patch undoes an upstream change and makes emacs22 behave as + emacs21 did on 8-color ttys: comment text is font-locked by + default. + + Upstream decided to make comment text appear as regular text and + only fontify comment delimiters, which would probably trigger + numerous bug reports about comments not being font-locked on ttys. + + Provided by: Romain Francoise + +Index: emacs22-22.1/lisp/font-lock.el +=================================================================== +--- emacs22-22.1.orig/lisp/font-lock.el 2007-05-31 11:01:50.000000000 -0400 ++++ emacs22-22.1/lisp/font-lock.el 2007-07-08 22:23:50.000000000 -0400 +@@ -1814,9 +1814,9 @@ + (((class color) (min-colors 16) (background dark)) + (:foreground "red1")) + (((class color) (min-colors 8) (background light)) +- ) ++ (:foreground "red")) + (((class color) (min-colors 8) (background dark)) +- ) ++ (:foreground "red1")) + (t (:weight bold :slant italic))) + "Font Lock mode face used to highlight comments." + :group 'font-lock-faces) --- emacs22-22.1.orig/debian/patches/feature-spell-warning.diff +++ emacs22-22.1/debian/patches/feature-spell-warning.diff @@ -0,0 +1,18 @@ +Index: emacs22-22.1/lisp/textmodes/spell.el +=================================================================== +--- emacs22-22.1.orig/lisp/textmodes/spell.el 2008-01-08 22:55:54.000000000 -0500 ++++ emacs22-22.1/lisp/textmodes/spell.el 2008-01-08 23:13:32.000000000 -0500 +@@ -85,6 +85,13 @@ + DESCRIPTION is an optional string naming the unit being checked: + for example, \"word\"." + (interactive "r") ++ (unless (executable-find spell-command) ++ (display-warning 'spell ++ (concat (format "Program `%s' not found.\n" spell-command) ++ "\nYou may want to use the `ispell' commands" ++ " (ispell-word, ispell-buffer) instead.\n") ++ :error) ++ (error "Program `%s' not found" spell-command)) + (let ((filter spell-filter) + (buf (get-buffer-create " *temp*"))) + (save-excursion --- emacs22-22.1.orig/debian/patches/debian-version-mention.diff +++ emacs22-22.1/debian/patches/debian-version-mention.diff @@ -0,0 +1,16 @@ +** (emacs-version) has been modified to indicate changes by Ubuntu. + Provided by: Michael Olson + +--- emacs21-21.2.orig/lisp/version.el ++++ emacs21-21.2/lisp/version.el +@@ -55,8 +55,8 @@ + (interactive "P") + (let ((version-string + (format (if (not (interactive-p)) +- "GNU Emacs %s (%s%s%s)\n of %s on %s" +- "GNU Emacs %s (%s%s%s) of %s on %s") ++ "GNU Emacs %s (%s%s%s)\n of %s on %s, modified by Ubuntu" ++ "GNU Emacs %s (%s%s%s) of %s on %s, modified by Ubuntu") + emacs-version + system-configuration + (cond ((featurep 'motif) --- emacs22-22.1.orig/debian/patches/fix-emacs-manpage.diff +++ emacs22-22.1/debian/patches/fix-emacs-manpage.diff @@ -0,0 +1,918 @@ +** Include an updated version of the emacs(1) manpage from upstream. + This fixes several typographical errors and documents the new -Q + option. + + Provided by: Michael Olson + +Index: emacs22-22.1/etc/ChangeLog +=================================================================== +--- emacs22-22.1.orig/etc/ChangeLog 2007-07-20 20:19:50.000000000 -0400 ++++ emacs22-22.1/etc/ChangeLog 2007-07-20 20:20:14.000000000 -0400 +@@ -1,3 +1,9 @@ ++2007-06-14 Werner Lemberg ++ ++ * emacs.1: Completely revised. ++ Fix many typographical glitches. ++ Updated to handle current state of options and resources. ++ + 2007-06-02 Chong Yidong + + * Version 22.1 released. +Index: emacs22-22.1/etc/emacs.1 +=================================================================== +--- emacs22-22.1.orig/etc/emacs.1 2007-07-20 20:19:42.000000000 -0400 ++++ emacs22-22.1/etc/emacs.1 2007-07-20 20:20:22.000000000 -0400 +@@ -1,3 +1,4 @@ ++'\" t + .\" Copyright (C) 1995, 1999, 2000, 2001, 2002, 2003, 2004, + .\" 2005, 2006, 2007 Free Software Foundation, Inc. + .\" +@@ -20,27 +21,33 @@ + .\" + '\" t + .TH EMACS 1 "2007 April 13" "GNU Emacs 22.1" ++. ++. + .SH NAME + emacs \- GNU project Emacs ++. ++. + .SH SYNOPSIS + .B emacs + [ + .I command-line switches + ] [ +-.I files ... ++.I files ...\& + ] +-.br ++. ++. + .SH DESCRIPTION + .I GNU Emacs + is a version of +-.I Emacs, ++.IR Emacs , + written by the author of the original (PDP-10) +-.I Emacs, ++.IR Emacs , + Richard Stallman. + .br + The primary documentation of GNU Emacs is in the GNU Emacs Manual, + which you can read using Info, either from Emacs or as a standalone +-program. Please look there for complete and up-to-date documentation. ++program. ++Please look there for complete and up-to-date documentation. + This man page is updated only when someone volunteers to do so; the + Emacs maintainers' priority goal is to minimize the amount of time + this man page takes away from other more useful projects. +@@ -56,9 +63,9 @@ + but the facility assumes that you know how to manipulate + .I Emacs + windows and buffers. +-CTRL-h or F1 enters the Help facility. Help Tutorial (CTRL-h t) +-starts an interactive tutorial which can teach beginners the fundamentals +-of ++CTRL-h or F1 enters the Help facility. ++Help Tutorial (CTRL-h t) starts an interactive tutorial which can ++teach beginners the fundamentals of + .I Emacs + in a few minutes. + Help Apropos (CTRL-h a) helps you +@@ -66,11 +73,11 @@ + describes a given character's effect, and Help Function (CTRL-h f) + describes a given Lisp function specified by name. + .PP +-.I Emacs's ++.IR Emacs 's + Undo can undo several steps of modification to your buffers, so it is + easy to recover from editing mistakes. + .PP +-.I GNU Emacs's ++.IR "GNU Emacs" 's + many special packages handle mail reading (RMail) and sending (Mail), + outline editing (Outline), compiling (Compile), running subshells + within +@@ -81,130 +88,176 @@ + There is an extensive reference manual, but + users of other Emacses + should have little trouble adapting even +-without a copy. Users new to ++without a copy. ++Users new to + .I Emacs + will be able + to use basic features fairly rapidly by studying the tutorial and + using the self-documentation features. +-.PP +-.SM Emacs Options +-.PP ++. ++.SS Emacs Options + The following options are of general interest: ++.RS + .TP 8 + .I file + Edit +-.I file. ++.IR file . + .TP +-.BI \+ number ++.BI \-\-file " file\fR,\fP " \-\-find-file " file\fR,\fP " \-\-visit " file" ++The same as specifying ++.I file ++directly as an argument. ++.TP ++.BI + number + Go to the line specified by + .I number + (do not insert a space between the "+" sign and +-the number). This applies only to the next file specified. ++the number). ++This applies only to the next file specified. + .TP +-.BI \+ line:column ++.BI + line:column + Go to the specified + .I line + and +-.I column ++.IR column . + .TP +-.B \-q ++.BR \-q ", " \-\-no\-init\-file + Do not load an init file. + .TP +-.B \-no-site-file ++.B \-\-no\-site\-file + Do not load the site-wide startup file. + .TP +-.BI \-debug-init ++.B \-\-no\-desktop ++Do not load a saved desktop. ++.TP ++.BR \-nl ", " \-\-no\-shared\-memory ++Do not use shared memory. ++.TP ++.BR \-Q ", " \-\-quick ++Equivalent to "\-q \-\-no\-site\-file \-\-no\-splash". ++.TP ++.B \-\-no\-splash ++Do not display a splash screen during start-up. ++.TP ++.B \-\-debug\-init + Enable + .I Emacs + Lisp debugger during the processing of the user init file +-.BI ~/.emacs. ++.BR ~/.emacs . + This is useful for debugging problems in the init file. + .TP +-.BI \-u " user" ++.BI \-u " user\fR,\fP " \-\-user " user" + Load +-.I user's ++.IR user 's + init file. + .TP +-.BI \-t " file" ++.BI \-t " file\fR,\fP " \-\-terminal " file" + Use specified + .I file + as the terminal instead of using stdin/stdout. + This must be the first argument specified in the command line. + .TP +-.B \-version ++.BR \-\-multibyte ", " \-\-no-unibyte ++Enable multibyte mode (enabled by default). ++.TP ++.BR \-\-unibyte ", " \-\-no-multibyte ++Enable unibyte mode. ++.TP ++.B \-\-version + Display + .I Emacs + version information and exit. ++.TP ++.B \-\-help ++Display this help and exit. ++.RE + .PP + The following options are lisp-oriented + (these options are processed in the order encountered): ++.RS + .TP 8 +-.BI \-f " function" ++.BI \-f " function\fR,\fP " \-\-funcall " function" + Execute the lisp function +-.I function. ++.IR function . + .TP +-.BI \-l " file" ++.BI \-l " file\fR,\fP " \-\-load " file" + Load the lisp code in the file +-.I file. ++.IR file . + .TP +-.BI \-eval " expr" ++.BI \-\-eval " expr\fR,\fP " \-\-execute " expr" + Evaluate the Lisp expression +-.I expr. ++.IR expr . ++.RE + .PP + The following options are useful when running + .I Emacs + as a batch editor: ++.RS + .TP 8 +-.BI \-batch +-Edit in batch mode. The editor will send messages to stderr. This +-option must be the first in the argument list. You must use \-l and \-f +-options to specify files to execute and functions to call. ++.B \-\-batch ++Edit in batch mode. ++The editor will send messages to stderr. ++This option must be the first in the argument list. ++You must use \-l and \-f options to specify files to execute ++and functions to call. ++.TP ++.BI \-\-script " file" ++Run ++.I file ++as an Emacs Lisp script. ++.TP ++.BI \-\-insert " file" ++Insert contents of ++.I file ++into the current buffer. + .TP +-.B \-kill ++.B \-\-kill + Exit + .I Emacs + while in batch mode. + .TP +-.BI \-L " directory" ++.BI \-L " dir\fR,\fP " \-\-directory " dir" + Add +-.I directory ++.I dir + to the list of directories + .I Emacs + searches for Lisp files. ++.RE ++. + .\" START DELETING HERE IF YOU'RE NOT USING X +-.PP +-.SM Using Emacs with X +-.PP ++.SS Using Emacs with X + .I Emacs + has been tailored to work well with the X window system. + If you run + .I Emacs + from under X windows, it will create its own X window to +-display in. You will probably want to start the editor +-as a background process +-so that you can continue using your original window. ++display in. ++You will probably want to start the editor as a background ++process so that you can continue using your original window. + .PP + .I Emacs + can be started with the following X switches: ++.RS + .TP 8 +-.BI \-name " name" +-Specifies the name which should be assigned to the initial ++.BI \-\-name " name" ++Specify the name which should be assigned to the initial + .I Emacs +-window. This controls looking up X resources as well as the window title. +-.TP 8 +-.BI \-title " name" +-Specifies the title for the initial X window. +-.TP 8 +-.B \-r ++window. ++This controls looking up X resources as well as the window title. ++.TP ++.BI \-T " name\fR,\fP " \-\-title " name" ++Specify the title for the initial X window. ++.TP ++.BR \-r ", " \-rv ", " \-\-reverse\-video + Display the + .I Emacs + window in reverse video. + .TP +-.BI \-font " font, " \-fn " font" ++.BI \-fn " font\fR,\fP " \-\-font " font" + Set the + .I Emacs + window's font to that specified by +-.I font. ++.IR font . + You will find the various + .I X + fonts in the +@@ -215,84 +268,119 @@ + will only accept fixed width fonts. + Under the X11 Release 4 font-naming conventions, any font with the + value "m" or "c" in the eleventh field of the font name is a fixed +-width font. Furthermore, fonts whose name are of the form ++width font. ++Furthermore, fonts whose name are of the form + .IR width x height + are generally fixed width, as is the font + .IR fixed . + See +-.IR xlsfonts (1) ++.BR xlsfonts (1) + for more information. + + When you specify a font, be sure to put a space between the + switch and the font name. + .TP +-.BI \-bw " pixels" ++.BI \-\-xrm " resources" ++Set additional X resources. ++.TP ++.BI "\-\-color\fR,\fP \-\-color=" mode ++Override color mode for character terminals; ++.I mode ++defaults to `auto', and can also be `never', `auto', `always', ++or a mode name like `ansi8'. ++.TP ++.BI \-bw " pixels\fR,\fP " \-\-border\-width " pixels" + Set the + .I Emacs + window's border width to the number of pixels specified by +-.I pixels. ++.IR pixels . + Defaults to one pixel on each side of the window. + .TP +-.BI \-ib " pixels" ++.BI \-ib " pixels\fR,\fP " \-\-internal\-border " pixels" + Set the window's internal border width to the number of pixels specified + by +-.I pixels. ++.IR pixels . + Defaults to one pixel of padding on each side of the window. +-.PP +-.TP 8 +-.BI \-\-geometry " geometry" ++.TP ++.BI \-g " geometry\fR,\fP " \-\-geometry " geometry" + Set the + .I Emacs +-window's width, height, and position as specified. The geometry +-specification is in the standard X format; see +-.IR X (1) ++window's width, height, and position as specified. ++The geometry specification is in the standard X format; see ++.BR X (7) + for more information. +-The width and height are specified in characters; the default is 80 by +-24. See the Emacs manual, section "Options for Window Size and Position", ++The width and height are specified in characters; the default is ++80 by 24. ++See the Emacs manual, section "Options for Window Size and Position", + for information on how window sizes interact + with selecting or deselecting the tool bar and menu bar. +-.PP +-.TP 8 +-.BI \-fg " color" +-On color displays, sets the color of the text. ++.TP ++.BI \-lsp " pixels\fR,\fP " \-\-line\-spacing " pixels" ++Additional space to put between lines. ++.TP ++.BR \-vb ", " \-\-vertical\-scroll\-bars ++Enable vertical scrollbars. ++.TP ++.BR \-fh ", " \-\-fullheight ++Make the first frame as high as the screen. ++.TP ++.BR \-fs ", " \-\-fullscreen ++Make the first frame fullscreen. ++.TP ++.BR \-fw ", " \-\-fullwidth ++Make the first frame as wide as the screen. ++.TP ++.BI \-fg " color\fR,\fP " \-\-foreground\-color " color" ++On color displays, set the color of the text. + + Use the command +-.I M-x list-colors-display +-for a list of valid +-color names. +-.TP +-.BI \-bg " color" +-On color displays, +-sets the color of the window's background. ++.I M\-x list\-colors\-display ++for a list of valid color names. + .TP +-.BI \-bd " color" +-On color displays, +-sets the color of the window's border. ++.BI \-bg " color\fR,\fP " \-\-background\-color " color" ++On color displays, set the color of the window's background. + .TP +-.BI \-cr " color" +-On color displays, +-sets the color of the window's text cursor. ++.BI \-bd " color\fR,\fP " \-\-border\-color " color" ++On color displays, set the color of the window's border. + .TP +-.BI \-ms " color" +-On color displays, +-sets the color of the window's mouse cursor. ++.BI \-cr " color\fR,\fP " \-\-cursor\-color " color" ++On color displays, set the color of the window's text cursor. ++.TP ++.BI \-ms " color\fR,\fP " \-\-mouse\-color " color" ++On color displays, set the color of the window's mouse cursor. + .TP +-.BI \-d " displayname, " \-display " displayname" ++.BI \-d " displayname\fR,\fP " \-\-display " displayname" + Create the + .I Emacs + window on the display specified by + .IR displayname . + Must be the first option specified in the command line. + .TP +-.B \-nw +-Tells ++.BR \-nbi ", " \-\-no\-bitmap\-icon ++Do not use picture of gnu for Emacs icon. ++.TP ++.B \-\-iconic ++Start + .I Emacs +-not to use its special interface to X. If you use this +-switch when invoking ++in iconified state. ++.TP ++.BR \-nbc ", " \-\-no\-blinking\-cursor ++Disable blinking cursor. ++.TP ++.BR \-nw ", " \-\-no\-window\-system ++Tell ++.I Emacs ++not to use its special interface to X. ++If you use this switch when invoking + .I Emacs + from an +-.IR xterm (1) ++.BR xterm (1) + window, display is done in that window. ++.TP ++.BR \-D ", " \-\-basic\-display ++This option disables many display features; use it for ++debugging Emacs. ++.RE + .PP + You can set + .I X +@@ -301,75 +389,185 @@ + windows in your + .I \.Xresources + file (see +-.IR xrdb (1)). ++.BR xrdb (1)). + Use the following format: + .IP +-emacs.keyword:value ++.RI emacs. keyword : value + .PP + where + .I value + specifies the default value of +-.I keyword. ++.IR keyword . + .I Emacs + lets you set default values for the following keywords: ++.RS + .TP 8 +-.B font (\fPclass\fB Font) +-Sets the window's text font. +-.TP +-.B reverseVideo (\fPclass\fB ReverseVideo) +-If +-.I reverseVideo's +-value is set to +-.I on, +-the window will be displayed in reverse video. ++.BR background " (class " Background ) ++For color displays, ++sets the window's background color. + .TP +-.B bitmapIcon (\fPclass\fB BitmapIcon) ++.BR bitmapIcon " (class " BitmapIcon ) + If +-.I bitmapIcon's ++.BR bitmapIcon 's + value is set to +-.I on, ++.IR on , + the window will iconify into the "kitchen sink." + .TP +-.B borderWidth (\fPclass\fB BorderWidth) +-Sets the window's border width in pixels. ++.BR borderColor " (class " BorderColor ) ++For color displays, ++sets the color of the window's border. + .TP +-.B internalBorder (\fPclass\fB BorderWidth) +-Sets the window's internal border width in pixels. ++.BR borderWidth " (class " BorderWidth ) ++Sets the window's border width in pixels. + .TP +-.B foreground (\fPclass\fB Foreground) ++.BR cursorColor " (class " Foreground ) + For color displays, +-sets the window's text color. ++sets the color of the window's text cursor. + .TP +-.B background (\fPclass\fB Background) +-For color displays, +-sets the window's background color. ++.BR cursorBlink " (class " CursorBlink ) ++Specifies whether to make the cursor blink. ++The default is ++.IR on . ++Use ++.I off ++or ++.I false ++to turn cursor blinking off. + .TP +-.B borderColor (\fPclass\fB BorderColor) +-For color displays, +-sets the color of the window's border. ++.BR font " (class " Font ) ++Sets the window's text font. + .TP +-.B cursorColor (\fPclass\fB Foreground) ++.BR foreground " (class " Foreground ) + For color displays, +-sets the color of the window's text cursor. ++sets the window's text color. + .TP +-.B pointerColor (\fPclass\fB Foreground) +-For color displays, +-sets the color of the window's mouse cursor. ++.BR fullscreen " (class " Fullscreen ) ++The desired fullscreen size. ++The value can be one of ++.IR fullboth , ++.IR fullwidth , ++or ++.IR fullheight , ++which correspond to the command-line options `\-fs', `\-fw', and ++`\-fh', respectively. ++Note that this applies to the initial frame only. + .TP +-.B geometry (\fPclass\fB Geometry) ++.BR geometry " (class " Geometry ) + Sets the geometry of the + .I Emacs + window (as described above). + .TP +-.B title (\fPclass\fB Title) ++.BR iconName " (class " Title ) ++Sets the icon name for the ++.I Emacs ++window icon. ++.TP ++.BR internalBorder " (class " BorderWidth ) ++Sets the window's internal border width in pixels. ++.TP ++.BR lineSpacing " (class " LineSpacing ) ++Additional space ("leading") between lines, in pixels. ++.TP ++.BR menuBar " (class " MenuBar ) ++Gives frames menu bars if ++.IR on ; ++don't have menu bars if ++.IR off . ++See the Emacs manual, sections "Lucid Resources" and "LessTif ++Resources", for how to control the appearance of the menu bar ++if you have one. ++.TP ++.BR minibuffer " (class " Minibuffer ) ++If ++.IR none , ++don't make a minibuffer in this frame. ++It will use a separate minibuffer frame instead. ++.TP ++.BR paneFont " (class " Font ) ++Font name for menu pane titles, in non-toolkit versions of ++.IR Emacs . ++.TP ++.BR pointerColor " (class " Foreground ) ++For color displays, ++sets the color of the window's mouse cursor. ++.TP ++.BR privateColormap " (class " PrivateColormap ) ++If ++.IR on , ++use a private color map, in the case where the "default ++visual" of class ++.B PseudoColor ++and ++.B Emacs ++is using it. ++.TP ++.BR reverseVideo " (class " ReverseVideo ) ++If ++.BR reverseVideo 's ++value is set to ++.IR on , ++the window will be displayed in reverse video. ++.TP ++.BR screenGamma " (class "ScreenGamma ) ++Gamma correction for colors, equivalent to the frame parameter ++`screen\-gamma'. ++.TP ++.BR scrollBarWidth " (class "ScrollBarWidth ) ++The scroll bar width in pixels, equivalent to the frame parameter ++`scroll\-bar\-width'. ++.TP ++.BR selectionFont " (class " SelectionFont ) ++Font name for pop-up menu items, in non-toolkit versions of ++.IR Emacs . ++(For toolkit versions, see the Emacs manual, sections ++"Lucid Resources" and "LessTif Resources".) ++.TP ++.BR selectionTimeout " (class " SelectionTimeout ) ++Number of milliseconds to wait for a selection reply. ++A value of 0 means wait as long as necessary. ++.TP ++.BR synchronous " (class " Synchronous ) ++Run Emacs in synchronous mode if ++.IR on . ++Synchronous mode is useful for debugging X problems. ++.TP ++.BR title " (class " Title ) + Sets the title of the + .I Emacs + window. + .TP +-.B iconName (\fPclass\fB Title) +-Sets the icon name for the +-.I Emacs +-window icon. ++.BR toolBar " (class " ToolBar ) ++Number of lines to reserve for the tool bar. ++.TP ++.BR useXIM " (class " UseXIM ) ++Turns off use of X input methods (XIM) if ++.I false ++or ++.IR off . ++.TP ++.BR verticalScrollBars " (class " ScrollBars ) ++Gives frames scroll bars if ++.IR on ; ++suppresses scroll bars if ++.IR off . ++.TP ++.BR visualClass " (class " VisualClass ) ++Specify the "visual" that X should use. ++This tells X how to handle colors. ++The value should start with one of ++.IR TrueColor , ++.IR PseudoColor , ++.IR DirectColor , ++.IR StaticColor , ++.IR GrayScale , ++and ++.IR StaticGray , ++followed by ++.BI \- depth\fR,\fP ++where ++.I depth ++is the number of color planes. ++.RE + .PP + If you try to set color values while using a black and white display, + the window's characteristics will default as follows: +@@ -377,14 +575,17 @@ + the background color will be set to white, + the border color will be set to grey, + and the text and mouse cursors will be set to black. ++. ++.SS Using the Mouse + .PP +-.SM Using the Mouse +-.PP +-The following lists the mouse button bindings for the ++The following lists some of the mouse button bindings for the + .I Emacs + window under X11. +- ++. ++.RS + .TS ++l l ++- - + l l. + MOUSE BUTTON FUNCTION + left Set point. +@@ -394,83 +595,93 @@ + SHIFT-right Paste text. + CTRL-middle Cut text into X cut buffer and kill it. + CTRL-right T{ +-Select this window, then split it into +-two windows. Same as typing CTRL-x 2. ++Select this window, then split it into two windows. ++Same as typing CTRL\-x 2. + T} + .\" START DELETING HERE IF YOU'RE NOT USING X MENUS + CTRL-SHIFT-left T{ + X buffer menu \(em hold the buttons and keys +-down, wait for menu to appear, select +-buffer, and release. Move mouse out of +-menu and release to cancel. ++down, wait for menu to appear, select buffer, and release. ++Move mouse out of menu and release to cancel. ++T} ++CTRL-SHIFT-middle T{ ++X help menu \(em pop up index card menu for Emacs help. + T} +-CTRL-SHIFT-middle X help menu \(em pop up index card menu for Emacs help. + .\" STOP DELETING HERE IF YOU'RE NOT USING X MENUS + CTRL-SHIFT-right T{ +-Select window with mouse, and delete all +-other windows. Same as typing CTRL-x 1. ++Select window with mouse, and delete all other windows. ++Same as typing CTRL\-x 1. + T} + .\" STOP DELETING HERE IF YOU'RE NOT USING X + .TE +-.PP ++.RE ++. ++. + .SH MANUALS + You can order printed copies of the GNU Emacs Manual from the Free +-Software Foundation, which develops GNU software. See the file ORDERS +-for ordering information. ++Software Foundation, which develops GNU software. ++See the file ORDERS for ordering information. + .br +-Your local Emacs maintainer might also have copies available. As +-with all software and publications from FSF, everyone is permitted to +-make and distribute copies of the Emacs manual. The TeX source to the +-manual is also included in the Emacs source distribution. +-.PP ++Your local Emacs maintainer might also have copies available. ++As with all software and publications from FSF, everyone is permitted ++to make and distribute copies of the Emacs manual. ++The TeX source to the manual is also included in the Emacs source ++distribution. ++. ++. + .SH FILES +-/usr/local/share/info - files for the Info documentation browser. ++/usr/local/share/info \(em files for the Info documentation browser. + The complete text of the Emacs reference manual is included in a +-convenient tree structured form. Also includes the Emacs Lisp +-Reference Manual, useful to anyone wishing to write programs in the +-Emacs Lisp extension language. +- +-/usr/local/share/emacs/$VERSION/lisp - Lisp source files and compiled files +-that define most editing commands. Some are preloaded; +-others are autoloaded from this directory when used. ++convenient tree structured form. ++Also includes the Emacs Lisp Reference Manual, useful to anyone ++wishing to write programs in the Emacs Lisp extension language. ++ ++/usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and ++compiled files that define most editing commands. ++Some are preloaded; others are autoloaded from this directory when ++used. + +-/usr/local/libexec/emacs/$VERSION/$ARCH - various programs that are ++/usr/local/libexec/emacs/$VERSION/$ARCH \(em various programs that are + used with GNU Emacs. + +-/usr/local/share/emacs/$VERSION/etc - various files of information. ++/usr/local/share/emacs/$VERSION/etc \(em various files of information. + +-/usr/local/share/emacs/$VERSION/etc/DOC.* - contains the documentation ++/usr/local/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation + strings for the Lisp primitives and preloaded Lisp functions +-of GNU Emacs. They are stored here to reduce the size of +-Emacs proper. ++of GNU Emacs. ++They are stored here to reduce the size of Emacs proper. + +-.br + /usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering + various services to assist users of GNU Emacs, including education, + troubleshooting, porting and customization. +- +-.PP ++. ++. + .SH BUGS + There is a mailing list, bug-gnu-emacs@gnu.org, for reporting Emacs +-bugs and fixes. But before reporting something as a bug, please try +-to be sure that it really is a bug, not a misunderstanding or a +-deliberate feature. We ask you to read the section ``Reporting Emacs +-Bugs'' near the end of the reference manual (or Info system) for hints +-on how and when to report bugs. Also, include the version number of +-the Emacs you are running in \fIevery\fR bug report that you send in. +- +-Do not expect a personal answer to a bug report. The purpose of reporting +-bugs is to get them fixed for everyone in the next release, if possible. ++bugs and fixes. ++But before reporting something as a bug, please try to be sure that ++it really is a bug, not a misunderstanding or a deliberate feature. ++We ask you to read the section ``Reporting Emacs Bugs'' near the ++end of the reference manual (or Info system) for hints on how and ++when to report bugs. ++Also, include the version number of the Emacs you are running in ++\fIevery\fR bug report that you send in. ++ ++Do not expect a personal answer to a bug report. ++The purpose of reporting bugs is to get them fixed for everyone ++in the next release, if possible. + For personal assistance, look in the SERVICE file (see above) for + a list of people who offer it. + + Please do not send anything but bug reports to this mailing list. + For more information about Emacs mailing lists, see the +-file /usr/local/emacs/etc/MAILINGLISTS. Bugs tend actually to be +-fixed if they can be isolated, so it is in your interest to report +-them in such a way that they can be easily reproduced. ++file /usr/local/emacs/etc/MAILINGLISTS. ++Bugs tend actually to be fixed if they can be isolated, so it is ++in your interest to report them in such a way that they can be ++easily reproduced. ++. ++. + .SH UNRESTRICTIONS +-.PP + .I Emacs + is free; anyone may redistribute copies of + .I Emacs +@@ -487,25 +698,37 @@ + .I Emacs + may sometimes be received packaged with distributions of Unix systems, + but it is never included in the scope of any license covering those +-systems. Such inclusion violates the terms on which distribution +-is permitted. In fact, the primary purpose of the General Public +-License is to prohibit anyone from attaching any other restrictions +-to redistribution of +-.I Emacs. ++systems. ++Such inclusion violates the terms on which distribution is permitted. ++In fact, the primary purpose of the General Public License is to ++prohibit anyone from attaching any other restrictions to ++redistribution of ++.IR Emacs . + .PP + Richard Stallman encourages you to improve and extend +-.I Emacs, ++.IR Emacs , + and urges that +-you contribute your extensions to the GNU library. Eventually GNU +-(Gnu's Not Unix) will be a complete replacement for Unix. ++you contribute your extensions to the GNU library. ++Eventually GNU (Gnu's Not Unix) will be a complete replacement ++for Unix. + Everyone will be free to use, copy, study and change the GNU system. ++. ++. + .SH SEE ALSO +-emacsclient(1), etags(1), X(1), xlsfonts(1), xterm(1), xrdb(1) ++.BR emacsclient (1), ++.BR etags (1), ++.BR X (7), ++.BR xlsfonts (1), ++.BR xterm (1), ++.BR xrdb (1) ++. ++. + .SH AUTHORS +-.PP + .I Emacs + was written by Richard Stallman and the Free Software Foundation. + Joachim Martillo and Robert Krawitz added the X features. ++. ++. + .SH COPYING + Copyright + .if t \(co +@@ -526,5 +749,5 @@ + document into another language, under the above conditions for + modified versions, except that this permission notice may be stated + in a translation approved by the Free Software Foundation. +- ++. + .\" arch-tag: 04dfd376-b46e-4924-919a-cecc3b257eaa --- emacs22-22.1.orig/debian/patches/fix-comint-sudo.diff +++ emacs22-22.1/debian/patches/fix-comint-sudo.diff @@ -0,0 +1,39 @@ +** Handle `[sudo] password'-style prompt in comint. This is the style + of prompt that Ubuntu gutsy uses. + + Provided by: Chris Moore + +Index: emacs22-22.1/lisp/comint.el +=================================================================== +--- emacs22-22.1.orig/lisp/comint.el 2008-01-08 22:14:33.000000000 -0500 ++++ emacs22-22.1/lisp/comint.el 2008-01-08 22:14:39.000000000 -0500 +@@ -333,12 +333,14 @@ + ;; kinit prints a prompt like `Password for devnull@GNU.ORG: '. + ;; ksu prints a prompt like `Kerberos password for devnull/root@GNU.ORG: '. + ;; ssh-add prints a prompt like `Enter passphrase: '. ++;; plink prints a prompt like `Passphrase for key "root@GNU.ORG": '. ++;; Ubuntu's sudo prompts like `[sudo] password for user:' + ;; Some implementations of passwd use "Password (again)" as the 2nd prompt. + (defcustom comint-password-prompt-regexp + "\\(\\([Oo]ld \\|[Nn]ew \\|'s \\|login \\|\ +-Kerberos \\|CVS \\|UNIX \\| SMB \\|^\\)\ ++Kerberos \\|CVS \\|UNIX \\| SMB \\|LDAP \\|\\[sudo] \\|^\\)\ + \[Pp]assword\\( (again)\\)?\\|\ +-pass phrase\\|\\(Enter\\|Repeat\\|Bad\\) passphrase\\)\ ++pass phrase\\|\\(Enter \\|Repeat \\|Bad \\)?[Pp]assphrase\\)\ + \\(?:, try again\\)?\\(?: for [^:]+\\)?:\\s *\\'" + "*Regexp matching prompts for passwords in the inferior process. + This is used by `comint-watch-for-password-prompt'." +Index: emacs22-22.1/lisp/ChangeLog +=================================================================== +--- emacs22-22.1.orig/lisp/ChangeLog 2008-01-08 22:16:31.000000000 -0500 ++++ emacs22-22.1/lisp/ChangeLog 2008-01-08 22:16:35.000000000 -0500 +@@ -1,3 +1,8 @@ ++2007-10-23 Chris Moore ++ ++ * comint.el (comint-password-prompt-regexp): ++ Handle `[sudo] password'-style prompt. ++ + 2007-06-18 Alan Mackenzie + + * progmodes/cc-mode.el (c-remove-any-local-eval-or-mode-variables): --- emacs22-22.1.orig/debian/patches/debian-mail-from-style.diff +++ emacs22-22.1/debian/patches/debian-mail-from-style.diff @@ -0,0 +1,30 @@ +** `mail-from-style' is set to 'system-default by default. + Provided by: Michael Olson + +** `message-sendmail-f-is-evil' is set to t by default. + Provided by: Romain Francoise and + +diff -urNad emacs22-22.1~/lisp/gnus/message.el emacs22-22.1/lisp/gnus/message.el +--- emacs22-22.1~/lisp/gnus/message.el 2007-05-27 23:33:47.000000000 -0400 ++++ emacs22-22.1/lisp/gnus/message.el 2007-07-08 06:22:31.000000000 -0400 +@@ -738,7 +738,7 @@ + (const never) + (const ask))) + +-(defcustom message-sendmail-f-is-evil nil ++(defcustom message-sendmail-f-is-evil t + "*Non-nil means don't add \"-f username\" to the sendmail command line. + Doing so would be even more evil than leaving it out." + :group 'message-sending +diff -urNad emacs22-22.1~/lisp/mail/sendmail.el emacs22-22.1/lisp/mail/sendmail.el +--- emacs22-22.1~/lisp/mail/sendmail.el 2007-04-06 21:44:53.000000000 -0400 ++++ emacs22-22.1/lisp/mail/sendmail.el 2007-07-08 06:19:24.000000000 -0400 +@@ -59,7 +59,7 @@ + :type 'file) + + ;;;###autoload +-(defcustom mail-from-style 'angles ++(defcustom mail-from-style 'system-default + "Specifies how \"From:\" fields look. + + If `nil', they contain just the return address like: --- emacs22-22.1.orig/debian/patches/debian-startup.diff +++ emacs22-22.1/debian/patches/debian-startup.diff @@ -0,0 +1,38 @@ +** Define a Debian-specific Emacs flavor. + Provided by: Rob Browning + +** Cause Emacs Lisp Debian packages to be loaded at the right time in + the startup process. + Provided by: Michael Olson + +diff -urNad emacs22-22.1~/lisp/startup.el emacs22-22.1/lisp/startup.el +--- emacs22-22.1~/lisp/startup.el 2007-05-14 10:56:29.000000000 -0400 ++++ emacs22-22.1/lisp/startup.el 2007-07-08 08:41:40.000000000 -0400 +@@ -295,6 +295,10 @@ + (defvar pure-space-overflow nil + "Non-nil if building Emacs overflowed pure space.") + ++(defconst debian-emacs-flavor 'emacs22 ++ "A symbol representing the particular debian flavor of emacs running. ++Something like 'emacs21, 'xemacs21, etc.") ++ + (defun normal-top-level-add-subdirs-to-load-path () + "Add all subdirectories of current directory to `load-path'. + More precisely, this uses only the subdirectories whose names +@@ -815,8 +819,14 @@ + ;; Run the site-start library if it exists. The point of this file is + ;; that it is run before .emacs. There is no point in doing this after + ;; .emacs; that is useless. +- (if site-run-file +- (load site-run-file t t)) ++ ++ ;; This part was changed so that Emacs Lisp Debian packages may be ++ ;; loaded at the right time in the startup process. ++ (when site-run-file ++ (if (load "debian-startup" t t nil) ++ (debian-startup debian-emacs-flavor)) ++ ;; Now load the normal site file. ++ (load site-run-file t t nil)) + + ;; Sites should not disable this. Only individuals should disable + ;; the startup message. --- emacs22-22.1.orig/debian/patches/debian-emacs-manpage.diff +++ emacs22-22.1/debian/patches/debian-emacs-manpage.diff @@ -0,0 +1,60 @@ +** Some documentation references to /usr/local/ have been changed to /usr. + Provided by: Romain Francoise + +Index: emacs22-22.1/etc/emacs.1 +=================================================================== +--- emacs22-22.1.orig/etc/emacs.1 2007-07-20 20:32:49.000000000 -0400 ++++ emacs22-22.1/etc/emacs.1 2007-07-20 20:36:58.000000000 -0400 +@@ -310,7 +310,7 @@ + .BR X (7) + for more information. + The width and height are specified in characters; the default is +-80 by 24. ++80 by 40. + See the Emacs manual, section "Options for Window Size and Position", + for information on how window sizes interact + with selecting or deselecting the tool bar and menu bar. +@@ -630,28 +630,28 @@ + . + . + .SH FILES +-/usr/local/share/info \(em files for the Info documentation browser. ++/usr/share/info \(em files for the Info documentation browser. + The complete text of the Emacs reference manual is included in a + convenient tree structured form. + Also includes the Emacs Lisp Reference Manual, useful to anyone + wishing to write programs in the Emacs Lisp extension language. + +-/usr/local/share/emacs/$VERSION/lisp \(em Lisp source files and ++/usr/share/emacs/$VERSION/lisp \(em Lisp source files and + compiled files that define most editing commands. + Some are preloaded; others are autoloaded from this directory when + used. + +-/usr/local/libexec/emacs/$VERSION/$ARCH \(em various programs that are ++/usr/lib/emacs/$VERSION/$ARCH \(em various programs that are + used with GNU Emacs. + +-/usr/local/share/emacs/$VERSION/etc \(em various files of information. ++/usr/share/emacs/$VERSION/etc \(em various files of information. + +-/usr/local/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation ++/usr/share/emacs/$VERSION/etc/DOC.* \(em contains the documentation + strings for the Lisp primitives and preloaded Lisp functions + of GNU Emacs. + They are stored here to reduce the size of Emacs proper. + +-/usr/local/share/emacs/$VERSION/etc/SERVICE lists people offering ++/usr/share/emacs/$VERSION/etc/SERVICE lists people offering + various services to assist users of GNU Emacs, including education, + troubleshooting, porting and customization. + . +@@ -675,7 +675,7 @@ + + Please do not send anything but bug reports to this mailing list. + For more information about Emacs mailing lists, see the +-file /usr/local/emacs/etc/MAILINGLISTS. ++file /usr/share/emacs/$VERSION/etc/MAILINGLISTS. + Bugs tend actually to be fixed if they can be isolated, so it is + in your interest to report them in such a way that they can be + easily reproduced. --- emacs22-22.1.orig/debian/patches/debian-browse-url.diff +++ emacs22-22.1/debian/patches/debian-browse-url.diff @@ -0,0 +1,42 @@ +** Emacs honors the Debian `x-www-browser' alternative. + On Debian systems, default commands can be customized using the + Debian alternatives system. This patch makes Emacs honor the + `x-www-browser' alternative when determining the default browser to + use. + + Provided by: Romain Francoise + +# Note: this patch voluntarily skips the x-www-browser alternative if +# the alternative is set to `auto'. This is because the browser +# priorities are set by the package maintainers and appear to be quite +# random; using Emacs's idea of a default browser is better than using +# whatever browser is pointed to by the automatic alternative. + +Index: emacs22-22.1/lisp/net/browse-url.el +=================================================================== +--- emacs22-22.1.orig/lisp/net/browse-url.el 2007-01-20 22:02:10.000000000 -0500 ++++ emacs22-22.1/lisp/net/browse-url.el 2007-07-08 22:24:14.000000000 -0400 +@@ -550,7 +550,7 @@ + :type '(repeat (string :tag "Argument")) + :group 'browse-url) + +-(defcustom browse-url-generic-program nil ++(defcustom browse-url-generic-program "x-www-browser" + "*The name of the browser program used by `browse-url-generic'." + :type '(choice string (const :tag "None" nil)) + :group 'browse-url) +@@ -864,6 +864,14 @@ + xterm, MMM, and then W3." + (apply + (cond ++ ((and browse-url-generic-program ++ (executable-find browse-url-generic-program) ++ (executable-find "/usr/sbin/update-alternatives") ++ (not (string-match ++ "status is auto" ++ (shell-command-to-string ++ "/usr/sbin/update-alternatives --display x-www-browser")))) ++ 'browse-url-generic) + ((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz) + ((executable-find browse-url-mozilla-program) 'browse-url-mozilla) + ((executable-find browse-url-firefox-program) 'browse-url-firefox) --- emacs22-22.1.orig/debian/patches/debian-fakemail-program-name.diff +++ emacs22-22.1/debian/patches/debian-fakemail-program-name.diff @@ -0,0 +1,16 @@ +** The standard location of the "mail" binary on Debian and Ubuntu + systems is /usr/bin/mail, rather than /bin/mail. + Provided by: Michael Olson + +diff -urNad emacs22-22.1~/lib-src/fakemail.c emacs22-22.1/lib-src/fakemail.c +--- emacs22-22.1~/lib-src/fakemail.c 2007-01-15 22:47:24.000000000 -0500 ++++ emacs22-22.1/lib-src/fakemail.c 2007-07-07 22:40:54.000000000 -0400 +@@ -136,7 +136,7 @@ + #define INITIAL_LINE_SIZE 200 + + #ifndef MAIL_PROGRAM_NAME +-#define MAIL_PROGRAM_NAME "/bin/mail" ++#define MAIL_PROGRAM_NAME "/usr/bin/mail" + #endif + + static char *my_name; --- emacs22-22.1.orig/debian/patches/debian-licenses-location.diff +++ emacs22-22.1/debian/patches/debian-licenses-location.diff @@ -0,0 +1,21 @@ +** (describe-copying) uses /usr/share/common-licenses/GPL + On Debian systems, the full text of the GPL is available from the + /usr/share/common-licenses directory. The COPYING file included in + the Emacs distribution is not installed in `data-directory', so + `describe-copying' has been modified accordingly. + + Provided by: Romain Francoise + +Index: emacs22-22.1/lisp/help.el +=================================================================== +--- emacs22-22.1.orig/lisp/help.el 2007-03-21 12:15:24.000000000 -0400 ++++ emacs22-22.1/lisp/help.el 2007-07-08 22:24:05.000000000 -0400 +@@ -287,7 +287,7 @@ + (defun describe-copying () + "Display info on how you may redistribute copies of GNU Emacs." + (interactive) +- (view-file (expand-file-name "COPYING" data-directory)) ++ (view-file "/usr/share/common-licenses/GPL") + (goto-char (point-min))) + + (defun describe-project () --- emacs22-22.1.orig/debian/patches/fix-cc-mode-local-vars.diff +++ emacs22-22.1/debian/patches/fix-cc-mode-local-vars.diff @@ -0,0 +1,50 @@ +** Apply cc-mode.el bugfix involving file local variables. + Provided by: Sven Joachim + +diff -urNad emacs22-22.1~/lisp/ChangeLog emacs22-22.1/lisp/ChangeLog +--- emacs22-22.1~/lisp/ChangeLog 2007-06-02 00:30:23.000000000 -0400 ++++ emacs22-22.1/lisp/ChangeLog 2007-07-08 10:25:37.000000000 -0400 +@@ -1,3 +1,9 @@ ++2007-06-18 Alan Mackenzie ++ ++ * progmodes/cc-mode.el (c-remove-any-local-eval-or-mode-variables): ++ When removing lines, also remove the \n. Correction of patch of ++ 2007-04-21. ++ + 2007-06-02 Chong Yidong + + * Version 22.1 released. +diff -urNad emacs22-22.1~/lisp/progmodes/cc-mode.el emacs22-22.1/lisp/progmodes/cc-mode.el +--- emacs22-22.1~/lisp/progmodes/cc-mode.el 2007-05-14 10:56:30.000000000 -0400 ++++ emacs22-22.1/lisp/progmodes/cc-mode.el 2007-07-08 10:24:41.000000000 -0400 +@@ -790,7 +790,8 @@ + ;; If the buffer specifies `mode' or `eval' in its File Local Variable list + ;; or on the first line, remove all occurrences. See + ;; `c-postprocess-file-styles' for justification. There is no need to save +- ;; point here, or even bother too much about the buffer contents. ++ ;; point here, or even bother too much about the buffer contents. However, ++ ;; DON'T mess up the kill-ring. + ;; + ;; Most of the code here is derived from Emacs 21.3's `hack-local-variables' + ;; in files.el. +@@ -819,8 +820,8 @@ + (regexp-quote suffix) + "$") + nil t) +- (beginning-of-line) +- (delete-region (point) (progn (end-of-line) (point))))) ++ (forward-line 0) ++ (delete-region (point) (progn (forward-line) (point))))) + + ;; Delete the first line, if we've got one, in case it contains a mode spec. + (unless (and lv-point +@@ -828,7 +829,8 @@ + (forward-line 0) + (bobp))) + (goto-char (point-min)) +- (delete-region (point) (progn (end-of-line) (point)))))) ++ (unless (eobp) ++ (delete-region (point) (progn (forward-line) (point))))))) + + (defun c-postprocess-file-styles () + "Function that post processes relevant file local variables in CC Mode. --- emacs22-22.1.orig/debian/patches/debian-menu.diff +++ emacs22-22.1/debian/patches/debian-menu.diff @@ -0,0 +1,63 @@ +** Debian-related items were added to the Help menu. + Provided by: Romain Francoise + +Index: emacs22-22.1/lisp/menu-bar.el +=================================================================== +--- emacs22-22.1.orig/lisp/menu-bar.el 2007-04-06 21:44:53.000000000 -0400 ++++ emacs22-22.1/lisp/menu-bar.el 2007-07-08 22:23:41.000000000 -0400 +@@ -1283,6 +1283,28 @@ + (info "elisp") + (Info-index topic)) + ++(defun debian-emacs-changelog () ++ "Display the Debian changelog file for this package." ++ (interactive) ++ (view-file "/usr/share/doc/emacs22-common/changelog.Debian.gz") ++ (goto-address)) ++ ++(defun debian-emacs-news () ++ "Display the Debian NEWS file for this package." ++ (interactive) ++ (view-file "/usr/share/doc/emacs22-common/NEWS.Debian.gz") ++ (goto-address)) ++ ++(defun debian-emacs-readme () ++ "Display the Debian README file for this package." ++ (interactive) ++ ;; Force opening of this file in outline mode, even if the other mode ++ ;; is present. ++ (let ((auto-mode-alist (cons '("debian/README.Debian$" . outline-mode) ++ auto-mode-alist))) ++ (view-file "/usr/share/doc/emacs22-common/README.Debian") ++ (goto-address))) ++ + (define-key menu-bar-apropos-menu [apropos-documentation] + '(menu-item "Search Documentation Strings..." apropos-documentation + :help +@@ -1367,7 +1389,7 @@ + (define-key menu-bar-help-menu [about] + '(menu-item "About Emacs" display-splash-screen + :help "Display version number, copyright info, and basic help")) +-(define-key menu-bar-help-menu [sep2] ++(define-key menu-bar-help-menu [sep3] + '("--")) + (define-key menu-bar-help-menu [finder-by-keyword] + '(menu-item "Find Emacs Packages" finder-by-keyword +@@ -1381,6 +1403,17 @@ + (list 'menu-item "Describe" menu-bar-describe-menu)) + (define-key menu-bar-help-menu [apropos] + (list 'menu-item "Search Documentation" menu-bar-apropos-menu)) ++(define-key menu-bar-help-menu [sep2] ++ '("--")) ++(define-key menu-bar-help-menu [debian-emacs-changelog] ++ '(menu-item "Debian ChangeLog" debian-emacs-changelog ++ :help "Display the Debian changelog")) ++(define-key menu-bar-help-menu [debian-emacs-news] ++ '(menu-item "Debian News" debian-emacs-news ++ :help "Display the NEWS.Debian file")) ++(define-key menu-bar-help-menu [debian-emacs-readme] ++ '(menu-item "Debian README" debian-emacs-readme ++ :help "Display the README.Debian file")) + (define-key menu-bar-help-menu [sep1] + '("--")) + (define-key menu-bar-help-menu [report-emacs-bug] --- emacs22-22.1.orig/debian/patches/debian-require-liblockfile.diff +++ emacs22-22.1/debian/patches/debian-require-liblockfile.diff @@ -0,0 +1,22 @@ +** The build will fail if liblockfile isn't selected for movemail. + This makes sure the Debian Emacs won't accidentally be built with + the wrong locking strategy. To disable this check, comment out + debian-require-liblockfile.diff in debian/patches/series. + + Provided by: Rob Browning + +Index: sid/lib-src/movemail.c +=================================================================== +--- sid.orig/lib-src/movemail.c ++++ sid/lib-src/movemail.c +@@ -167,6 +167,10 @@ + /* Nonzero means this is name of a lock file to delete on fatal error. */ + char *delete_lockname; + ++#ifndef MAIL_USE_MAILLOCK ++#error "Debian requires that mail locking be handled by liblockfile." ++#endif /* ndef MAIL_USE_MAILLOCK */ ++ + int + main (argc, argv) + int argc; --- emacs22-22.1.orig/debian/patches/fix-format-overflow.diff +++ emacs22-22.1/debian/patches/fix-format-overflow.diff @@ -0,0 +1,89 @@ +** Fix stack-based buffer overflow in the format function which occurs + when dealing with high precision values. It could lead to + arbitrary code execution. + + This is CVE-2007-6109. + + Provided by: Andreas Schwab + +Index: emacs22-22.1/src/editfns.c +=================================================================== +--- emacs22-22.1.orig/src/editfns.c 2007-05-14 10:56:31.000000000 -0400 ++++ emacs22-22.1/src/editfns.c 2007-12-27 00:46:22.000000000 -0500 +@@ -3543,8 +3543,10 @@ + precision[n+1] = 10 * precision[n+1] + *format - '0'; + } + +- if (format - this_format_start + 1 > longest_format) +- longest_format = format - this_format_start + 1; ++ /* Extra +1 for 'l' that we may need to insert into the ++ format. */ ++ if (format - this_format_start + 2 > longest_format) ++ longest_format = format - this_format_start + 2; + + if (format == end) + error ("Format string ends in middle of format specifier"); +@@ -3605,7 +3607,7 @@ + && *format != 'i' && *format != 'X' && *format != 'c') + error ("Invalid format operation %%%c", *format); + +- thissize = 30; ++ thissize = 30 + (precision[n] > 0 ? precision[n] : 0); + if (*format == 'c') + { + if (! SINGLE_BYTE_CHAR_P (XINT (args[n])) +@@ -3803,23 +3805,40 @@ + format - this_format_start); + this_format[format - this_format_start] = 0; + +- if (INTEGERP (args[n])) ++ if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g') ++ sprintf (p, this_format, XFLOAT_DATA (args[n])); ++ else + { +- if (format[-1] == 'd') +- sprintf (p, this_format, XINT (args[n])); +- /* Don't sign-extend for octal or hex printing. */ ++ if (sizeof (EMACS_INT) > sizeof (int) ++ && format[-1] != 'c') ++ { ++ /* Insert 'l' before format spec. */ ++ this_format[format - this_format_start] ++ = this_format[format - this_format_start - 1]; ++ this_format[format - this_format_start - 1] = 'l'; ++ this_format[format - this_format_start + 1] = 0; ++ } ++ ++ if (INTEGERP (args[n])) ++ { ++ if (format[-1] == 'c') ++ sprintf (p, this_format, (int) XINT (args[n])); ++ else if (format[-1] == 'd') ++ sprintf (p, this_format, XINT (args[n])); ++ /* Don't sign-extend for octal or hex printing. */ ++ else ++ sprintf (p, this_format, XUINT (args[n])); ++ } ++ else if (format[-1] == 'c') ++ sprintf (p, this_format, (int) XFLOAT_DATA (args[n])); ++ else if (format[-1] == 'd') ++ /* Maybe we should use "%1.0f" instead so it also works ++ for values larger than MAXINT. */ ++ sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n])); + else +- sprintf (p, this_format, XUINT (args[n])); ++ /* Don't sign-extend for octal or hex printing. */ ++ sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n])); + } +- else if (format[-1] == 'e' || format[-1] == 'f' || format[-1] == 'g') +- sprintf (p, this_format, XFLOAT_DATA (args[n])); +- else if (format[-1] == 'd') +- /* Maybe we should use "%1.0f" instead so it also works +- for values larger than MAXINT. */ +- sprintf (p, this_format, (EMACS_INT) XFLOAT_DATA (args[n])); +- else +- /* Don't sign-extend for octal or hex printing. */ +- sprintf (p, this_format, (EMACS_UINT) XFLOAT_DATA (args[n])); + + if (p > buf + && multibyte --- emacs22-22.1.orig/debian/patches/fix-local-vars-security.diff +++ emacs22-22.1/debian/patches/fix-local-vars-security.diff @@ -0,0 +1,25 @@ +** Fix issue where a bug in local variables handling. + This issue permitted very risky, close to arbitrary modification of + the behavior of Emacs by potentially untrusted visited files. + Namely, highly unsafe variables like `load-path' could be changed + without authorization. + + This is CVE-2007-5795. + + Provided by: Drake Wilson + +Index: emacs22-22.1/lisp/files.el +=================================================================== +--- emacs22-22.1.orig/lisp/files.el 2007-05-25 08:43:31.000000000 -0400 ++++ emacs22-22.1/lisp/files.el 2007-11-02 10:51:25.000000000 -0400 +@@ -2736,8 +2736,8 @@ + ;; If caller wants only the safe variables, + ;; install only them. + (dolist (elt result) +- (unless (or (memq (car elt) unsafe-vars) +- (memq (car elt) risky-vars)) ++ (unless (or (member elt unsafe-vars) ++ (member elt risky-vars)) + (hack-one-local-variable (car elt) (cdr elt)))) + ;; Query, except in the case where all are known safe + ;; if the user wants no quuery in that case. --- emacs22-22.1.orig/debian/patches/debian-site-init.diff +++ emacs22-22.1/debian/patches/debian-site-init.diff @@ -0,0 +1,21 @@ +** Info-default-directory-list includes /usr/share/info/emacs22 + Info-default-directory-list was modified such that the info files + for this specific flavor of Emacs come before the site-wide Info + directory. + + Provided by: Michael Olson + +diff -urNad emacs22-22.1~/lisp/site-init.el emacs22-22.1/lisp/site-init.el +--- emacs22-22.1~/lisp/site-init.el 1969-12-31 19:00:00.000000000 -0500 ++++ emacs22-22.1/lisp/site-init.el 2007-07-08 06:42:22.000000000 -0400 +@@ -0,0 +1,10 @@ ++ ++;; Place the flavor-specific info directory ahead of the general one. ++(catch 'done ++ (let ((cur Info-default-directory-list)) ++ (while cur ++ (when (string= (car cur) "/usr/share/info/") ++ (setcdr cur (cons (car cur) (cdr cur))) ++ (setcar cur "/usr/share/info/emacs22/") ++ (throw 'done t)) ++ (setq cur (cdr cur))))) --- emacs22-22.1.orig/debian/patches/fix-vc-bfn.diff +++ emacs22-22.1/debian/patches/fix-vc-bfn.diff @@ -0,0 +1,39 @@ +** No errors are signalled if buffer-file-name is "". + This patch adds two safeguards against VC errors that can be + signalled at save time if the buffer uses the empty string as + buffer-file-name. ERC, for example, uses this to set + buffer-file-name to a string value but computes the real value when + the buffer is saved since log files often contain the date and time + of saving in the filename. + + Similar changes have been submitted upstream but rejected (upstream + says buffer-file-name must be a valid filename or nil, but nothing + else). + + Provided by: Romain Francoise + +Index: emacs22-22.1/lisp/vc-hooks.el +=================================================================== +--- emacs22-22.1.orig/lisp/vc-hooks.el 2007-07-08 22:22:58.000000000 -0400 ++++ emacs22-22.1/lisp/vc-hooks.el 2007-07-08 22:23:59.000000000 -0400 +@@ -350,7 +350,10 @@ + backend is tried first." + (let (handler) + (cond +- ((string-match vc-ignore-dir-regexp (file-name-directory file)) nil) ++ ((and ++ (file-name-directory file) ++ (string-match vc-ignore-dir-regexp (file-name-directory file))) ++ nil) + ((and (boundp 'file-name-handler-alist) + (setq handler (find-file-name-handler file 'vc-registered))) + ;; handler should set vc-backend and return t if registered +@@ -479,7 +482,7 @@ + ;; - `removed' + ;; - `copied' and `moved' (might be handled by `removed' and `added') + (or (vc-file-getprop file 'vc-state) +- (if (vc-backend file) ++ (if (and (> (length file) 0) (vc-backend file)) + (vc-file-setprop file 'vc-state + (vc-call state-heuristic file))))) + --- emacs22-22.1.orig/debian/patches/feature-dbp-horizontal-split.diff +++ emacs22-22.1/debian/patches/feature-dbp-horizontal-split.diff @@ -0,0 +1,45 @@ +** Windows can be split horizontally in `display-buffer'. + A new variable named `display-buffer-prefer-horizontal-split' + allows for a horizontal split of windows created by + `display-buffer', instead of the default vertical split. + + Provided by: Romain Francoise + +Index: emacs22-22.1/src/window.c +=================================================================== +--- emacs22-22.1.orig/src/window.c 2007-04-16 11:57:38.000000000 -0400 ++++ emacs22-22.1/src/window.c 2007-07-08 22:24:31.000000000 -0400 +@@ -215,6 +215,10 @@ + + int window_deletion_count; + ++/* Prefer horizontal split in `display-buffer'? */ ++ ++int display_buffer_prefer_horizontal_split; ++ + /* Used by the function window_scroll_pixel_based */ + + static int window_scroll_pixel_based_preserve_y; +@@ -3752,7 +3756,9 @@ + && (EQ (window, selected_window) + || EQ (XWINDOW (window)->parent, Qnil)) + && window_height (window) >= window_min_height << 1) +- window = Fsplit_window (window, Qnil, Qnil); ++ window = Fsplit_window (window, Qnil, ++ display_buffer_prefer_horizontal_split ++ ? Qt : Qnil); + else + window = Fget_lru_window (frames, Qnil); + /* If Fget_lru_window returned nil, try other approaches. */ +@@ -7466,6 +7472,11 @@ + If there is only one window, it is split regardless of this value. */); + split_height_threshold = 500; + ++ DEFVAR_BOOL ("display-buffer-prefer-horizontal-split", &display_buffer_prefer_horizontal_split, ++ doc: /* *Non-nil means prefer horizontal split when splitting windows ++in `display-buffer'. */); ++ display_buffer_prefer_horizontal_split = 0; ++ + DEFVAR_INT ("window-min-height", &window_min_height, + doc: /* *Delete any window less than this tall (including its mode line). + The value is in line units. */); --- emacs22-22.1.orig/debian/patches/vcdiff-tmp-race.diff +++ emacs22-22.1/debian/patches/vcdiff-tmp-race.diff @@ -0,0 +1,20 @@ +diff -Nur emacs22-22.1/lib-src/vcdiff emacs22-22.1.new/lib-src/vcdiff +--- emacs22-22.1/lib-src/vcdiff 2007-01-20 23:49:26.000000000 -0500 ++++ emacs22-22.1.new/lib-src/vcdiff 2008-05-01 14:27:19.000000000 -0400 +@@ -84,14 +84,14 @@ + case $f in + s.* | */s.*) + if +- rev1=/tmp/geta$$ ++ rev1=`mktemp /tmp/geta.XXXXXXXX` + get -s -p -k $sid1 "$f" > $rev1 && + case $sid2 in + '') + workfile=`expr " /$f" : '.*/s.\(.*\)'` + ;; + *) +- rev2=/tmp/getb$$ ++ rev2=`mktemp /tmp/getb.XXXXXXXX` + get -s -p -k $sid2 "$f" > $rev2 + workfile=$rev2 + esac --- emacs22-22.1.orig/debian/patches/debian-rpath.diff +++ emacs22-22.1/debian/patches/debian-rpath.diff @@ -0,0 +1,19 @@ +** Emacs is built without RPATH. + On Debian, binaries must not contain an RPATH section (and in this + case, it's redundant with system-wide library paths). + + Provided by: Romain Francoise + +Index: emacs22-22.1/configure +=================================================================== +--- emacs22-22.1.orig/configure 2007-05-25 08:43:29.000000000 -0400 ++++ emacs22-22.1/configure 2007-07-08 22:24:10.000000000 -0400 +@@ -9298,7 +9298,7 @@ + if test "${x_libraries}" != NONE; then + if test -n "${x_libraries}"; then + LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` +- LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` ++ LD_SWITCH_X_SITE_AUX="" + fi + x_default_search_path="" + x_search_path=${x_libraries} --- emacs22-22.1.orig/debian/patches/series +++ emacs22-22.1/debian/patches/series @@ -0,0 +1,23 @@ +debian-cssc-vc-backend.diff +debian-site-init.diff +debian-startup.diff +fix-emacs-manpage.diff +debian-emacs-manpage.diff +debian-emacs-news.diff +debian-mail-from-style.diff +debian-menu.diff +fix-font-lock-tty.diff +fix-vc-bfn.diff +debian-licenses-location.diff +debian-rpath.diff +debian-browse-url.diff +debian-version-mention.diff +debian-fakemail-program-name.diff +debian-require-liblockfile.diff +feature-dbp-horizontal-split.diff +fix-cc-mode-local-vars.diff +fix-local-vars-security.diff +fix-format-overflow.diff +fix-comint-sudo.diff +feature-spell-warning.diff +vcdiff-tmp-race.diff --- emacs22-22.1.orig/debian/copyright.in +++ emacs22-22.1/debian/copyright.in @@ -0,0 +1,33 @@ +-*-text-*- + +This package was debianized by Rob Browning on +Tue, 16 Dec 1997 00:05:45 -0600 and is now maintained by Michael Olson +. Romain Francoise made an +emacs-snapshot package which helped maintenance of this package +significantly. + +For more details, see . + +Please see /usr/share/doc/@BIN_NAME@-common/README.Debian for a +description of the Debian specific differences from the upstream +version. + +Copyright: + + GNU Emacs is Copyright (C) 1985, 1986, 1987, 1993-2007 Free Software + Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA and is covered under the terms of the GPL. See the file + /usr/share/common-licenses/GPL for more information. + + The GNU Emacs Manual is Copyright (C) 1985, 1986, 1987, 1993-2007 Free + Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA. It is covered under the terms of the GNU Free + Documentation License, version 1.2 or later. See node `GNU Free + Documentation License' in the Info manual (emacs) for details. + + The GNU Emacs Manual and related manuals in /usr/share/info/@BIN_NAME@ + are Copyright (C) 1985, 1986, 1987, 1993-2007 Free Software + Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA. They are covered under the terms of the GNU Free Documentation + License, version 1.2 or later. See node `GNU Free Documentation + License' in the Info manual (emacs) for details. --- emacs22-22.1.orig/debian/emacs-bin-common.prerm +++ emacs22-22.1/debian/emacs-bin-common.prerm @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +BIN_NAME=@BIN_NAME@ +MAJOR=@MAJOR_VERSION@ +MINOR=@MINOR_VERSION@ +FULL=@FULL_VERSION@ +ALTERNATIVES="@ALTERNATIVES@" + +# update-alternatives on things that collide with xemacs, other editors +if [ "$1" != "upgrade" ] +then + for i in ${ALTERNATIVES} + do + update-alternatives --remove $i /usr/bin/$i.${BIN_NAME} + done +fi + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/emacs-bin-common.postinst +++ emacs22-22.1/debian/emacs-bin-common.postinst @@ -0,0 +1,30 @@ +#!/bin/sh -e + +BIN_NAME=@BIN_NAME@ +MAJOR=@MAJOR_VERSION@ +MINOR=@MINOR_VERSION@ +FULL=@FULL_VERSION@ +ALTERNATIVES="@ALTERNATIVES@" +BIN_PRIORITY=@BIN_PRIORITY@ + +# update-alternatives on things that collide with xemacs, other editors +for i in ctags etags emacsclient +do + update-alternatives \ + --install /usr/bin/$i $i /usr/bin/$i.${BIN_NAME} ${BIN_PRIORITY} \ + --slave /usr/share/man/man1/$i.1.gz $i.1.gz \ + /usr/share/man/man1/$i.1${BIN_NAME}.gz +done + +for i in ${ALTERNATIVES} +do + test $i = ctags && continue + test $i = etags && continue + test $i = emacsclient && continue + update-alternatives --install /usr/bin/$i $i /usr/bin/$i.${BIN_NAME} \ + ${BIN_PRIORITY} +done + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/emacs-common.docs +++ emacs22-22.1/debian/emacs-common.docs @@ -0,0 +1,3 @@ +README +BUGS +README.add-on-package-maintainers --- emacs22-22.1.orig/debian/copyright +++ emacs22-22.1/debian/copyright @@ -0,0 +1,33 @@ +-*-text-*- + +This package was debianized by Rob Browning on +Tue, 16 Dec 1997 00:05:45 -0600 and is now maintained by Michael Olson +. Romain Francoise made an +emacs-snapshot package which helped maintenance of this package +significantly. + +For more details, see . + +Please see /usr/share/doc/emacs22-common/README.Debian for a +description of the Debian specific differences from the upstream +version. + +Copyright: + + GNU Emacs is Copyright (C) 1985, 1986, 1987, 1993-2007 Free Software + Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA and is covered under the terms of the GPL. See the file + /usr/share/common-licenses/GPL for more information. + + The GNU Emacs Manual is Copyright (C) 1985, 1986, 1987, 1993-2007 Free + Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA. It is covered under the terms of the GNU Free + Documentation License, version 1.2 or later. See node `GNU Free + Documentation License' in the Info manual (emacs) for details. + + The GNU Emacs Manual and related manuals in /usr/share/info/emacs22 + are Copyright (C) 1985, 1986, 1987, 1993-2007 Free Software + Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + USA. They are covered under the terms of the GNU Free Documentation + License, version 1.2 or later. See node `GNU Free Documentation + License' in the Info manual (emacs) for details. --- emacs22-22.1.orig/debian/emacsclient.desktop +++ emacs22-22.1/debian/emacsclient.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=@MENU_TITLE@ (client) +GenericName=Emacs +Comment=GNU @MENU_TITLE@ Client +Exec=/usr/bin/emacsclient.@BIN_NAME@ -a @BIN_NAME@ +TryExec=@BIN_NAME@ +Terminal=false +Type=Application +Icon=/usr/share/icons/@BIN_NAME@/emacs.xpm +Categories=Application;Utility;TextEditor; +MimeType=text/plain --- emacs22-22.1.orig/debian/emacs-bin-common.overrides.linda +++ emacs22-22.1/debian/emacs-bin-common.overrides.linda @@ -0,0 +1,2 @@ +Tag: no-manual-for-binary +Data: (e|c)(tags|macsclient).emacs22 --- emacs22-22.1.orig/debian/control.in +++ emacs22-22.1/debian/control.in @@ -0,0 +1,87 @@ +Source: @SRC_NAME@ +Section: editors +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Michael W. Olson (GNU address) +Build-Depends: libncurses5-dev, texinfo, liblockfile-dev, libgif-dev, libtiff-dev, xaw3dg-dev, libpng12-dev, libjpeg62-dev, libgtk2.0-dev, dpkg-dev (>> 1.10.0), quilt (>= 0.42), cdbs (>= 0.4.43), lsb-release, debhelper (>= 5.0.0), libxaw7-dev, libasound2-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64] +Standards-Version: 3.7.2 +XS-Vcs-Bzr: http://code.launchpad.net/%7Eubuntu-elisp/emacs/ubuntu/ + +Package: @BIN_NAME@-common +Section: editors +Priority: optional +Architecture: all +Depends: emacsen-common (>= 1.4.10), dpkg (>= 1.9.0) +Suggests: @BIN_NAME@-el +Conflicts: @BIN_NAME@-el (<< ${source:Version}), w3-el, dictionaries-common (<< 0.60.0) +Description: The GNU Emacs editor's common infrastructure + GNU Emacs is the extensible self-documenting text editor. + This package contains the infrastructure common between @BIN_NAME@, + @BIN_NAME@-gtk, and @BIN_NAME@-nox. + +Package: @BIN_NAME@-bin-common +Section: editors +Priority: optional +Architecture: any +Depends: @BIN_NAME@-common (= ${source:Version}), ${shlibs:Depends} +Description: The GNU Emacs editor's shared, architecture dependent files + GNU Emacs is the extensible self-documenting text editor. + This package contains the architecture dependent infrastructure + that's shared by @BIN_NAME@, @BIN_NAME@-gtk, and @BIN_NAME@-nox. + +Package: @BIN_NAME@ +Section: editors +Priority: optional +Architecture: any +Depends: @BIN_NAME@-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor@FLAVOUR_DESC@ + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled with support for X. + . + If you have GTK+ 2.x installed on your system, you will probably have a + better experience with the @BIN_NAME@-gtk package, instead of this one. + +Package: @BIN_NAME@-gtk +Section: editors +Priority: optional +Architecture: any +Depends: @BIN_NAME@-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: @BIN_NAME@, emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor (with GTK+ 2.x support) + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled with support for GTK+ 2.x. + +Package: @BIN_NAME@-nox +Section: editors +Priority: optional +Architecture: any +Depends: @BIN_NAME@-bin-common (= ${binary:Version}), ${shlibs:Depends} +Provides: @BIN_NAME@, emacsen, editor, info-browser, mail-reader, news-reader +Conflicts: w3-el +Description: The GNU Emacs editor (without X support) + GNU Emacs is the extensible self-documenting text editor. + This package contains a version of Emacs compiled without support for X. + +Package: @BIN_NAME@-el +Section: editors +Priority: optional +Architecture: all +Depends: @BIN_NAME@-common (= ${source:Version}) +Description: GNU Emacs LISP (.el) files + GNU Emacs is the extensible self-documenting text editor. + This package contains the elisp sources for the convenience of users, + saving space in the main package for small systems. + +Package: emacs +Section: editors +Priority: optional +Architecture: all +Provides: emacsen, editor, info-browser, mail-reader, news-reader +Depends: @BIN_NAME@-gtk | @BIN_NAME@ | @BIN_NAME@-nox +Description: The GNU Emacs editor (metapackage) + GNU Emacs is the extensible self-documenting text editor. + This is a metapackage which will always depend on the latest Emacs + release. --- emacs22-22.1.orig/debian/emacs.overrides.lintian +++ emacs22-22.1/debian/emacs.overrides.lintian @@ -0,0 +1 @@ +@PKG_NAME@: menu-icon-missing /usr/share/emacs/@FULL_VERSION@/etc/emacs.xpm --- emacs22-22.1.orig/debian/NEWS +++ emacs22-22.1/debian/NEWS @@ -0,0 +1,29 @@ +emacs22 (22.1-0ubuntu1) gutsy; urgency=low + + * This is the first official release of emacs22 in Ubuntu. These + packages are based on the initial packaging work of + emacs-snapshot, as performed by Jérôme Marant, Rob Browning + (assisted by numerous contributors), and Romain Francoise + . + + This version of Emacs adds support for GTK+ widgets. The default + version (emacs-snapshot) still uses Lucid, a new binary package + (emacs-snapshot-gtk) is available if you want GTK+ support. + + Several major packages have been updated or added in Emacs 22. In + particular, Gnus is now at version 5.11. If you had been using the + version of Gnus shipped in Emacs 21, starting Gnus 5.11 may convert + files automatically and generally alter your data. Make sure you have + good backups. + + This package is distinct from Debian's packaging of Emacs 22, + because we do not want to place the manual in a separate package. + + The complete list of patches applied to the upstream source is + available from /usr/share/doc/emacs-snapshot-common/README.Debian. + + -- Michael W. Olson (GNU address) Sun, 01 Jul 2007 11:29:40 -0400 + +Local Variables: +coding: utf-8 +End: --- emacs22-22.1.orig/debian/mangle-info +++ emacs22-22.1/debian/mangle-info @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w -i + +use English; +use strict; + +$RS = undef; + +my $prefix = $ENV{"DEBIAN_INFO_PREFIX"}; + +my $x = <>; +if(!($x =~ m/^(\s*START-INFO-DIR-ENTRY\s+\*\s*)([^:]+):\s*\(([^\)]+)\)/mo)) { + die "Couldn't find START-INFO-DIR-ENTRY."; +} + +print ${PREMATCH}; +print "$1$2 ($prefix): ($prefix/$3)"; +print ${POSTMATCH}; --- emacs22-22.1.orig/debian/emacs.xpm +++ emacs22-22.1/debian/emacs.xpm @@ -0,0 +1,222 @@ +/* XPM */ +static char * gnu_bits[] = { +"32 32 187 2", +" c None", +". c #696584", +"+ c #645F7C", +"@ c #5F5B76", +"# c #635F7C", +"$ c #5F5A76", +"% c #635E7B", +"& c #DCDBE1", +"* c #CFCED7", +"= c #B8B5C7", +"- c #ADA9C1", +"; c #A6A3B9", +"> c #9995A9", +", c #78748C", +"' c #676280", +") c #878398", +"! c #C2C0CD", +"~ c #9591AE", +"{ c #9B97B3", +"] c #BDBACC", +"^ c #9C98B3", +"/ c #A9A6B9", +"( c #67627D", +"_ c #625D7A", +": c #5E5A75", +"< c #8D89A0", +"[ c #A9A5BC", +"} c #938FAB", +"| c #B4B2C5", +"1 c #F8F8FA", +"2 c #E4E3EA", +"3 c #BCB9CB", +"4 c #9390A5", +"5 c #8B87A1", +"6 c #918DA9", +"7 c #BAB7C9", +"8 c #FFFFFF", +"9 c #F1F1F4", +"0 c #B4B1C4", +"a c #9D99AF", +"b c #5D5974", +"c c #8E8AA5", +"d c #A3A0B6", +"e c #F8F8F9", +"f c #9F9CB3", +"g c #8C88A3", +"h c #938FA9", +"i c #C6C4D1", +"j c #B7B4C5", +"k c #9D99B1", +"l c #5C5873", +"m c #8985A0", +"n c #B5B3C4", +"o c #F0F0F3", +"p c #A6A3B7", +"q c #9B98AE", +"r c #5C5872", +"s c #88849D", +"t c #A6A3B6", +"u c #F8F7F9", +"v c #C3C1CE", +"w c #9996AB", +"x c #5B5772", +"y c #85819A", +"z c #9491A7", +"A c #E0DFE6", +"B c #C2C0CC", +"C c #8C88A0", +"D c #9894A9", +"E c #5A5671", +"F c #838097", +"G c #B2B0BE", +"H c #F7F7F8", +"I c #D8D7DE", +"J c #928FA4", +"K c #9491A5", +"L c #5A5670", +"M c #817D95", +"N c #A9A6B6", +"O c #A8A5B6", +"P c #928FA3", +"Q c #59556F", +"R c #7E7B91", +"S c #BEBDC8", +"T c #AEACBA", +"U c #908DA0", +"V c #5B5771", +"W c #58546D", +"X c #65617A", +"Y c #E0DFE4", +"Z c #8E8B9E", +"` c #7A778D", +" . c #5A566F", +".. c #57536C", +"+. c #58546F", +"@. c #A19EAE", +"#. c #EAEAED", +"$. c #F5F4F6", +"%. c #A19FAE", +"&. c #625F78", +"*. c #77748A", +"=. c #59556E", +"-. c #56526B", +";. c #807D90", +">. c #D5D4DA", +",. c #9693A3", +"'. c #767387", +"). c #55516A", +"!. c #534F68", +"~. c #9491A1", +"{. c #F4F4F6", +"]. c #9E9CAA", +"^. c #5D5971", +"/. c #737084", +"(. c #545068", +"_. c #504D64", +":. c #F4F4F5", +"<. c #DEDDE2", +"[. c #5A576D", +"}. c #716F81", +"|. c #56526A", +"1. c #524F67", +"2. c #4D4A61", +"3. c #9A99A6", +"4. c #848292", +"5. c #6F6C7F", +"6. c #545169", +"7. c #514E65", +"8. c #4A475D", +"9. c #6B697B", +"0. c #D2D1D6", +"a. c #F4F3F5", +"b. c #9998A4", +"c. c #6C6A7B", +"d. c #535067", +"e. c #504C64", +"f. c #474459", +"g. c #747282", +"h. c #D1D0D5", +"i. c #E8E8EA", +"j. c #8C8A97", +"k. c #676576", +"l. c #4E4B62", +"m. c #444156", +"n. c #727080", +"o. c #E8E7EA", +"p. c #8A8996", +"q. c #656374", +"r. c #524F66", +"s. c #423F53", +"t. c #B8B7BE", +"u. c #D0CFD4", +"v. c #4E4B5E", +"w. c #636171", +"x. c #4C485E", +"y. c #434054", +"z. c #3F3C4F", +"A. c #575465", +"B. c #CFCED3", +"C. c #646272", +"D. c #504C62", +"E. c #49465B", +"F. c #4B475D", +"G. c #3D3A4C", +"H. c #494657", +"I. c #7A7884", +"J. c #B7B6BC", +"K. c #DADADD", +"L. c #4F4B61", +"M. c #464257", +"N. c #49455B", +"O. c #3A3748", +"P. c #5E5C6A", +"Q. c #908E98", +"R. c #C1C0C6", +"S. c #F3F2F4", +"T. c #777581", +"U. c #464357", +"V. c #474458", +"W. c #434053", +"X. c #3C3A4A", +"Y. c #373544", +"Z. c #444155", +"`. c #454256", +" + c #403D4F", +".+ c #423F52", +"++ c #444154", +" ", +" . + @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ + . ", +" # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ # ", +" % $ & * = - - - - - - - - - - - - - - - - - - ; > , $ % ", +" ' $ ) ! ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ { ] ] ^ ~ ~ ~ ~ ~ ~ ~ ~ / ( $ ' ", +" _ : < [ } } } } } } } } } } } } | 1 2 3 } } } } } } } 4 : _ ", +" : : 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 8 8 9 0 6 6 6 6 6 a : : ", +" b b c c c c c c c c c c c c c c d e 8 8 8 e c c c c c f b b ", +" b b g g g g g g g g g g g g h i e 8 8 8 8 j g g g g g k b b ", +" l l m m m m m m m m m m m n o 8 8 8 8 o p m m m m m m q l l ", +" r r s s s s s s s s s t o 8 8 8 8 u v s s s s s s s s w r r ", +" x x y y y y y y y z A 8 8 8 8 8 B C y y y y y y y y y D x x ", +" E E F F F F F F G H 8 8 8 8 I J F F F F F F F F F F F K l E ", +" L L M M M M M N 8 8 8 8 H O M M M M M M M M M M M M M P r L ", +" Q Q R R R R R S 8 8 8 8 T R R R R R R R R R R R R R R U V Q ", +" W W x x x x x X Y 8 8 8 Z x x x x x x x x x x x x x x ` .W ", +" ....+.+.+.+.+.+.+.@.#.8 $.%.&.+.+.+.+.+.+.+.+.+.+.+.+.*.=... ", +" -.-.-.-.-.-.-.-.;.>.8 8 8 8 8 ,.-.-.-.-.-.-.-.-.-.-.-.'.W -. ", +" ).).!.!.!.!.!.~.8 8 8 8 {.].^.!.!.!.!.!.!.!.!.!.!.!.!./...). ", +" (.(._._._._._.:.8 8 8 <.[._._._._._._._._._._._._._._.}.|.(. ", +" 1.1.2.2.2.2.2.3.8 8 8 4.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.5.6.1. ", +" 7.7.8.8.8.8.8.8.9.0.8 a.b.8.8.8.8.8.8.8.8.8.8.8.8.8.8.c.d.7. ", +" e.e.f.f.f.f.f.f.f.f.g.h.8 i.j.f.f.f.f.f.f.f.f.f.f.f.f.k.(.e. ", +" l.l.m.m.m.m.m.m.m.m.m.m.n.o.8 o.p.m.m.m.m.m.m.m.m.m.m.q.r.l. ", +" 2.2.s.s.s.s.s.s.s.s.s.s.s.s.t.8 8 u.v.s.s.s.s.s.s.s.s.w.7.2. ", +" x.x.y.z.z.z.z.z.z.z.z.z.z.z.A.8 8 8 B.z.z.z.z.z.z.z.z.C.D.x. ", +" E.F.f.G.G.G.G.G.G.G.G.H.I.J.8 8 8 8 K.G.G.G.G.G.G.G.G.k.L.E. ", +" M.N.N.y.O.O.O.O.O.O.O.O.P.Q.R.S.R.T.O.O.O.O.O.O.O.O.y.N.N.M. ", +" U.V.V.W.X.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.Y.X.W.V.V.U. ", +" Z.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.`.Z. ", +" +.+++++++++++++++++++++++++++++++++++++++++.+ + ", +" "}; --- emacs22-22.1.orig/debian/README.binpkg.in +++ emacs22-22.1/debian/README.binpkg.in @@ -0,0 +1,2 @@ +Please see /usr/share/doc/@BIN_NAME@-common/ as the primary +documentation directory. --- emacs22-22.1.orig/debian/emacs-common.prerm +++ emacs22-22.1/debian/emacs-common.prerm @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +BIN_NAME=@BIN_NAME@ +MAJOR=@MAJOR_VERSION@ +MINOR=@MINOR_VERSION@ +FULL=@FULL_VERSION@ +INFO_SUBDIR=@INFO_EMACSDIR@ +INFOFILES="@INFO_FILES@" + +for file in ${INFOFILES} +do + install-info --quiet --remove-exactly ${INFO_SUBDIR}/${file} || true +done + +# emacsen-common/emacs-remove used to be here. + +(rmdir /usr/local/share/emacs/${FULL}/site-lisp 2>/dev/null && \ + rmdir /usr/local/share/emacs/${FULL} 2>/dev/null) || true + +#DEBHELPER# + +exit 0 --- emacs22-22.1.orig/debian/emacs-common.overrides.lintian +++ emacs22-22.1/debian/emacs-common.overrides.lintian @@ -0,0 +1,4 @@ +@PKG_NAME@: extra-license-file usr/share/emacs/@FULL_VERSION@/etc/copying.paper +@PKG_NAME@: script-not-executable ./usr/share/emacs/@FULL_VERSION@/etc/ulimit.hack +@PKG_NAME@: wrong-name-for-upstream-changelog usr/share/doc/@PKG_NAME@/changelogs +@PKG_NAME@: menu-command-not-in-package /usr/share/menu/@PKG_NAME@:7 /usr/bin/@BIN_NAME@ --- emacs22-22.1.orig/debian/emacs.desktop +++ emacs22-22.1/debian/emacs.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=@MENU_TITLE@ (@SUB_FLAVOR@) +GenericName=Emacs +Comment=GNU @MENU_TITLE@ Text Editor +Exec=/usr/bin/@BIN_NAME@-@X_SUPPORT@ +TryExec=@BIN_NAME@ +Terminal=false +Type=Application +Icon=/usr/share/icons/@BIN_NAME@/emacs.xpm +Categories=Application;Utility;TextEditor; +MimeType=text/plain --- emacs22-22.1.orig/debian/emacs-common.overrides.linda +++ emacs22-22.1/debian/emacs-common.overrides.linda @@ -0,0 +1 @@ +Tag: extra-license-file --- emacs22-22.1.orig/debian/compat +++ emacs22-22.1/debian/compat @@ -0,0 +1 @@ +5 --- emacs22-22.1.orig/debian/bug.script.in +++ emacs22-22.1/debian/bug.script.in @@ -0,0 +1,32 @@ +#!/bin/sh + +exec >&3 + +echo "-- Emacs odds and ends:" +TMP=`mktemp` +cat >$TMP <&1 +rm -f $TMP +echo + +echo "-- /usr/share/@BIN_NAME@/:" +ls --format=long --almost-all --recursive /usr/share/@BIN_NAME@ +echo + +echo "-- /usr/share/emacs/site-lisp/:" +ls --format=long --almost-all --recursive /usr/share/emacs/site-lisp +echo + +echo "-- /var/lib/emacs22/:" +ls --format=long --almost-all --recursive /var/lib/emacs22 +echo + +# If grep-dctrl is installed, get more info +if test -x /usr/bin/grep-status; then + echo "-- Packages related to Emacs:" + grep-status -FDepends emacs -sPackage,Version,Status + echo +fi --- emacs22-22.1.orig/debian/emacs.prerm +++ emacs22-22.1/debian/emacs.prerm @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +# Unregister ourselves as a subflavor of this flavor +rm -f /var/lib/@BIN_NAME@/installed-subflavors/@BIN_NAME@-@X_SUPPORT@ + +# If we're the last installed subflavor, call `emacs-remove' and +# unregister various alternatives. +F=`ls /var/lib/@BIN_NAME@/installed-subflavors/@BIN_NAME@-* 2>/dev/null || true` +if [ -n "$F" ]; then + echo "@BIN_NAME@ subflavors still installed, not uninstalling flavor..." +else + INSTLOG=`mktemp /tmp/@BIN_NAME@.XXXXXX` + echo -n "Cleaning up add-on packages..." + if /usr/lib/emacsen-common/emacs-remove @BIN_NAME@ >$INSTLOG 2>&1; then + echo " done." + [ -z "$EMACS_DEBUG" ] && rm -f $INSTLOG + else + echo " failed." + echo + echo "!! emacs-remove @BIN_NAME@ failed!" + echo "!! Please file a bug report against @BIN_NAME@" + echo "!! and attach the file $INSTLOG" + exit 1 + fi + + if [ "$1" != "upgrade" ]; then + update-alternatives --remove emacs /usr/bin/@BIN_NAME@ + update-alternatives --remove editor /usr/bin/@BIN_NAME@ + fi +fi + +# Remove our subflavor alternative, unless we're upgrading. +if [ "$1" != "upgrade" ]; then + update-alternatives --remove @BIN_NAME@ /usr/bin/@BIN_NAME@-@X_SUPPORT@ +fi + +#DEBHELPER# + +exit 0