emacsen-common stable port information

Package: emacsen-common
Version: 1.4.15
Revision: 5
Suggests: emacsen
Source: mirror:sourceforge:fink/%n_%v.tar.gz
Source-MD5: ea1b709b8b73a10a9618965a1a7b06a8
SourceDirectory: %n-%v
ConfFiles: %p/etc/emacs/site-start.el
PatchScript: sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p1
DocFiles: debian/changelog debian-emacs-policy debian/copyright
CompileScript: <<
perl -wc emacs-install
perl -wc emacs-package-install
perl -wc generate-install-list
<<
InstallScript: <<
mkdir -p %i/etc/emacs/site-start.d
mkdir -p %i/etc/site-start.d
mkdir -p %i/lib/%n/packages/install
mkdir -p %i/lib/%n/packages/remove
mkdir -p %i/share/doc/%n
mkdir -p %i/share/emacs/site-lisp

install -m 644 site-start.el %i/etc/emacs/
install -m 644 00debian-vars.el %i/etc/emacs/site-start.d/00fink-vars.el
install -m 755 emacs-install %i/lib/%n/
install -m 755 emacs-package-install %i/lib/%n/
(cd %i/lib/%n/; ln -s emacs-install emacs-remove)
(cd %i/lib/%n/; ln -s emacs-package-install emacs-package-remove)
install -m 755 generate-install-list %i/lib/%n/
install -m 644 debian-startup.el %i/share/emacs/site-lisp/fink-startup.el

install -m 755 emacsen-common.install %i/lib/%n/packages/install/emacsen-common
install -m 755 emacsen-common.remove %i/lib/%n/packages/remove/emacsen-common
<<
#

PostInstScript: <<
mkdir -p %p/var/lib/emacsen-common

if [ -e /usr/local ]
then
if [ ! -e /usr/local/share ]
then
if mkdir -p /usr/local/share 2>/dev/null
then
chown root:staff /usr/local/share
chmod 2775 /usr/local/share
fi
fi

if [ ! -e /usr/local/share/emacs ]
then
if mkdir /usr/local/share/emacs 2>/dev/null
then
chown root:staff /usr/local/share/emacs
chmod 2775 /usr/local/share/emacs
fi
fi

if [ ! -e /usr/local/share/emacs/site-lisp ]
then
if mkdir /usr/local/share/emacs/site-lisp 2>/dev/null
then
chown root:staff /usr/local/share/emacs/site-lisp
chmod 2775 /usr/local/share/emacs/site-lisp
fi
fi
fi

if [ ! -e %p/var/lib/emacsen-common/installed-flavors ]
then
if [ -e /usr/local/share/emacs ]
then
chmod 2775 /usr/local/share/emacs
fi
/bin/echo "\c" > %p/var/lib/emacsen-common/installed-flavors
chmod 644 %p/var/lib/emacsen-common/installed-flavors
/bin/echo "\c" > %p/var/lib/emacsen-common/installed-flavors
fi
%p/lib/emacsen-common/emacs-package-install emacsen-common

# Clean up dead emacs info entry...
#install-info --quiet --remove emacs
<<

PreRmScript: <<
%p/lib/emacsen-common/emacs-package-remove emacsen-common

(rmdir /usr/local/share/emacs/site-lisp 2>/dev/null && rmdir /usr/local/share/emacs 2>/dev/null) || true
<<
PostRmScript: <<
if [ "$1" = purge ]
then
if [ -e %p/var/lib/emacsen-common/installed-flavors ]
then
rm -f %p/var/lib/emacsen-common/installed-flavors
rmdir %p/var/lib/emacsen-common
fi
fi
<<
#
Description: Common facilities for all emacsen
DescDetail: <<
This package contains code that is needed by all the (x)emacs packages.

It provides a unified mechanism for installing optional emacs-lisp
add-on packages, with facilities for byte-compiling code and making
it available to all installed (x)emacs variants.
<<
DescPort: <<
This package is derived from the Debian emacsen-common package, with a couple
of changes: 1) needs to be convinced to live under the fink prefix directory,
and 2) elisp functions with debian in the name were changed to fink (e.g.,
debian-startup became fink-startup).

The file 00fink-vars.el does very little at this point (none of its Debian
counterpart's functions are needed under OS X), but is being preserved for
future expansion.
<<
DescUsage: <<
The only current documentation is the debian-emacs-policy paper, which gives
a basic idea of what is required of emacs-maintainers and add-on package
maintainers in order to take advantage of the service.

A fink-specific revision of the document will (hopefully) be forthcoming...
<<
License: GPL
Homepage: http://packages.debian.org/unstable/editors/emacsen-common.html
Maintainer: Christian Swinehart

emacsen-common stable port .patch

diff -u -Naur emacsen-common-1.4.15/00debian-vars.el emacsen-common.fink/00debian-vars.el
--- emacsen-common-1.4.15/00debian-vars.el Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/00debian-vars.el Tue Jun 22 13:47:49 2004
@@ -1,6 +1,6 @@
-;; 00debian-vars.el
+;; 00fink-vars.el
;;
-;; Initialize some emacs variables from debian policy files.
+;; Initialize some emacs variables from fink policy files.
;;
;; Copyright (C) 1997, Frederic Lepied
;;
@@ -20,7 +20,7 @@
;;=============================================================================
;; Configuration section.
;;=============================================================================
-(defun debian-file->string (name &optional func)
+(defun fink-file->string (name &optional func)
"Convert a file into a string"
(interactive "fFile name : ")
(let ((filename (expand-file-name name)))
@@ -36,7 +36,7 @@
(kill-buffer buf)
ret))))

-(defun debian-clean-mailname ()
+(defun fink-clean-mailname ()
(while (search-forward "\n" nil t)
(replace-match "" nil t)))

@@ -45,15 +45,15 @@
;; policy/ch-binarypkg.html, 3.5 Maintainer scripts, /etc/news/server

(let ((mailname
- (debian-file->string "/etc/mailname" (function debian-clean-mailname))))
+ (fink-file->string "@PREFIX@/etc/mailname" (function fink-clean-mailname))))
(if (not mailname)
- (progn
- (message "No /etc/mailname. Reverting to default...")
- (sit-for 3))
+ ;;(progn
+ ;;(message "No @PREFIX@/etc/mailname. Reverting to default...")
+ ;;(sit-for 3))
(setq mail-host-address mailname)))

;; Don't need to check NNTPSERVER for override, gnus does that for us.
-(if (file-readable-p "/etc/news/server")
- (defvar gnus-nntpserver-file "/etc/news/server"))
+(if (file-readable-p "@PREFIX@/etc/news/server")
+ (defvar gnus-nntpserver-file "@PREFIX@/etc/news/server"))

-;;; 00debian-vars.el ends here
+;;; 00fink-vars.el ends here
diff -u -Naur emacsen-common-1.4.15/debian-startup.el emacsen-common.fink/debian-startup.el
--- emacsen-common-1.4.15/debian-startup.el Mon Feb 18 12:12:15 2002
+++ emacsen-common.fink/debian-startup.el Tue Jun 22 13:52:56 2004
@@ -1,4 +1,4 @@
-;;; debian-startup.el --- Debian specific emacsen startup code.
+;;; fink-startup.el --- Fink specific emacsen startup code.

;; Copyright (C) 1998 Rob Browning

@@ -30,7 +30,7 @@
;; of Emacs for a Debian system.


-(defun debian-pkg-add-load-path-item (item)
+(defun fink-pkg-add-load-path-item (item)
"Takes a path item (a string) and adds it to load path in the
correct position for an add-on package, before the emacs system
directories, but after the /usr/local/ directories. After modifying
@@ -63,7 +63,7 @@

;; Rewritten to less elegant -- non recursive version because elisp
;; doesn't seem to handle tail recursion :<
-(defun debian-unique-strings (strings)
+(defun fink-unique-strings (strings)
"Takes a list of strings and returns the list with *adjacent*
duplicates removed."
(let ((result '()))
@@ -73,7 +73,7 @@
(setq strings (cdr strings)))
(nreverse result)))

-(defun debian-run-directories (&rest dirs)
+(defun fink-run-directories (&rest dirs)

"Load each file of the form XXfilename.el or XXfilename.elc in any
of the dirs, where XX must be a number. The files will be run in
@@ -106,7 +106,7 @@
files)))

;; Finally sort them, and delete duplicates
- (base-names (debian-unique-strings (sort stripped-names 'string<)))
+ (base-names (fink-unique-strings (sort stripped-names 'string<)))

(old-load-path load-path))

@@ -134,9 +134,9 @@
load-path))))
(setq load-path (append add-on-package-paths old-load-path))))))

-(defun debian-startup (flavor)
+(defun fink-startup (flavor)

- ;; Our handling of debian-emacs-flavor here is truly weird, but we
+ ;; Our handling of fink-emacs-flavor here is truly weird, but we
;; have to do it like this because some of the emacsen flavors
;; didn't DWIM in their startup sequence. I wasn't as clear as I
;; should have been in debian-policy, but they were also
@@ -144,15 +144,15 @@

;; It's even weirder now. I've changed policy back to the old way,
;; but I'm also doing some sanity checking here and making sure that
- ;; even debian-emacs-flavor gets set no matter what. I'm in a rush
+ ;; even fink-emacs-flavor gets set no matter what. I'm in a rush
;; right now, but I'll come back later and make all this cleaner and
;; better documented. Sorry.

- (if (not (boundp 'debian-emacs-flavor))
- (defconst debian-emacs-flavor flavor
- "A symbol representing the particular debian flavor of emacs that's
+ (if (not (boundp 'fink-emacs-flavor))
+ (defconst fink-emacs-flavor flavor
+ "A symbol representing the particular fink flavor of emacs that's
running. Something like 'emacs20, 'xemacs20, etc.")

- (let ((common-dir "/etc/emacs/site-start.d")
- (flavor-dir (concat "/etc/" (symbol-name flavor) "/site-start.d")))
- (debian-run-directories flavor-dir common-dir))))
+ (let ((common-dir "@PREFIX@/etc/emacs/site-start.d")
+ (flavor-dir (concat "@PREFIX@/etc/" (symbol-name flavor) "/site-start.d")))
+ (fink-run-directories flavor-dir common-dir))))
diff -u -Naur emacsen-common-1.4.15/emacs-install emacsen-common.fink/emacs-install
--- emacsen-common-1.4.15/emacs-install Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacs-install Tue Jun 22 13:47:49 2004
@@ -7,8 +7,8 @@
# Let emacs-package-install/remove know what's going on.
$ENV{'CURRENTLY_HANDLING_EMACSEN'} = "Yes";

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $flavor = $ARGV[0];
my $action = 'install';
$action = 'remove' if $0 =~ /remove$/o;
diff -u -Naur emacsen-common-1.4.15/emacs-package-install emacsen-common.fink/emacs-package-install
--- emacsen-common-1.4.15/emacs-package-install Mon Feb 18 12:46:42 2002
+++ emacsen-common.fink/emacs-package-install Tue Jun 22 15:02:26 2004
@@ -7,8 +7,8 @@

my $currently_handling_emacsen = $ENV{'CURRENTLY_HANDLING_EMACSEN'};

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $pkg = $ARGV[0];
my $action = 'install';
$action = 'remove' if $0 =~ /remove$/o;
@@ -36,13 +36,13 @@
# Make sure if we create any files, we do it safely.
umask 0022 or die "emacs-package-$action: can't set umask, aborting.";

-if (! -e '/var/lib/emacsen-common/installed-flavors')
+if (! -e '@PREFIX@/var/lib/emacsen-common/installed-flavors')
{
die < ERROR: emacsen-common being used before being configured.
ERROR: This is likely a bug in the ${pkg} package, which needs to
ERROR: add one of the appropriate dependencies.
-ERROR: See /usr/share/doc/emacsen-common/debian-emacs-policy.gz
+ERROR: See @PREFIX@/share/doc/emacsen-common/debian-emacs-policy.gz
ERROR: for details.
EOS
}
diff -u -Naur emacsen-common-1.4.15/emacsen-common.install emacsen-common.fink/emacsen-common.install
--- emacsen-common-1.4.15/emacsen-common.install Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacsen-common.install Tue Jun 22 17:08:42 2004
@@ -9,38 +9,69 @@

if [ ${FLAVOR} != emacs ]
then
+
+ # Try compiling a trivial testfile {cswinehart | 22 june 2004}
+ echo '(defun a-fake-func() "This function does nothing" )' > /tmp/emacsen-common-testfile.el
+ if ${FLAVOR} ${byte_compile_options} /tmp/emacsen-common-testfile.el
+ then
+ # It worked. Clean up the testfile and be done with it.
+ rm -f /tmp/emacsen-common-testfile.el{,c}
+ else
+ # It failed. Stop trying to install and print a meaningful error message
+ printf "\n\n\n"
+ echo " +-------------------------------------------------------------------+"
+ echo " | Fink had a problem installing this version of Emacs because |"
+ echo " | ${FLAVOR} couldn't be launched successfully. |"
+ echo " | |"
+ echo " | This typically happens when the package was compiled on a |"
+ echo " | system with an older version of Mac OS X installed. At this |"
+ echo " | point you should try recompiling the emacs version that caused |"
+ echo " | this error with a command like: |"
+ echo " | fink rebuild |"
+ echo " | where is a package name like \`${FLAVOR}' or \`${FLAVOR}-nox' |"
+ echo " | |"
+ echo " | If this doesn't solve the problem, please notify the maintainer |"
+ echo " | of the emacs package in question. |"
+ echo " +-------------------------------------------------------------------+"
+ printf "\n\n\n\n"
+
+ # Clean up and return the error code
+ rm -f /tmp/emacsen-common-testfile.el{,c}
+ exit 1
+ fi
+
echo emacsen-common: byte-compiling for ${FLAVOR}

# If we had .el files that needed byte compiling in the package dir,
# this is how we'd handle it.

- #cp /usr/share/emacs/site-lisp/emacsen-common/*.el \
- # /usr/share/${FLAVOR}/site-lisp/emacsen-common
+ #cp @PREFIX@/share/emacs/site-lisp/emacsen-common/*.el \
+ # @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common
#${FLAVOR} ${byte_compile_options} \
- # /usr/share/${FLAVOR}/site-lisp/emacsen-common/*.el
- #rm /usr/share/${FLAVOR}/site-lisp/emacsen-common/*.el
+ # @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common/*.el
+ #rm @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common/*.el

# Normal add-on packages should usually *not* scatter their files
# directly in site-lisp, but should use a package subdir. This
# package/file is an exception.

# Remove potentially stale versions.
- rm -f /etc/${FLAVOR}/site-start.d/00debian-vars.elc \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.elc
+ rm -f @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.elc \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.elc

# Make temporary copies of the .el files
- cp /etc/emacs/site-start.d/00debian-vars.el /etc/${FLAVOR}/site-start.d
- cp /usr/share/emacs/site-lisp/debian-startup.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ cp @PREFIX@/etc/emacs/site-start.d/00fink-vars.el @PREFIX@/etc/${FLAVOR}/site-start.d
+ cp @PREFIX@/share/emacs/site-lisp/fink-startup.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el

# byte compile everything.
${FLAVOR} ${byte_compile_options} \
- /etc/${FLAVOR}/site-start.d/00debian-vars.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el

# Remove the redundant .el files.
- rm /etc/${FLAVOR}/site-start.d/00debian-vars.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ rm @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el
fi

exit 0;
diff -u -Naur emacsen-common-1.4.15/emacsen-common.remove emacsen-common.fink/emacsen-common.remove
--- emacsen-common-1.4.15/emacsen-common.remove Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacsen-common.remove Tue Jun 22 13:47:49 2004
@@ -9,8 +9,8 @@
if [ ${FLAVOR} != emacs ]
then
echo emacsen-common: purging byte-compiled files for ${FLAVOR}
- rm -f /etc/${FLAVOR}/site-start.d/00debian-vars.elc \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.elc
+ rm -f @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.elc \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.elc
fi

exit 0;
diff -u -Naur emacsen-common-1.4.15/generate-install-list emacsen-common.fink/generate-install-list
--- emacsen-common-1.4.15/generate-install-list Tue Jan 29 15:51:49 2002
+++ emacsen-common.fink/generate-install-list Tue Jun 22 13:47:49 2004
@@ -8,8 +8,8 @@
# it will sort them according to their dependencies. It will also add
# in other add-on packages that aren't mentioned, but are needed.

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $installed_add_on_pkgs = undef;

sub cwd {

emacsen-common _unstable_ port information

Package: emacsen-common
Version: 1.4.15
Revision: 5
Suggests: emacsen
Source: mirror:sourceforge:fink/%n_%v.tar.gz
Source-MD5: ea1b709b8b73a10a9618965a1a7b06a8
SourceDirectory: %n-%v
ConfFiles: %p/etc/emacs/site-start.el
PatchScript: sed 's|@PREFIX@|%p|g' <%a/%n.patch | patch -p1
DocFiles: debian/changelog debian-emacs-policy debian/copyright
CompileScript: <<
perl -wc emacs-install
perl -wc emacs-package-install
perl -wc generate-install-list
<<
InstallScript: <<
mkdir -p %i/etc/emacs/site-start.d
mkdir -p %i/etc/site-start.d
mkdir -p %i/lib/%n/packages/install
mkdir -p %i/lib/%n/packages/remove
mkdir -p %i/share/doc/%n
mkdir -p %i/share/emacs/site-lisp

install -m 644 site-start.el %i/etc/emacs/
install -m 644 00debian-vars.el %i/etc/emacs/site-start.d/00fink-vars.el
install -m 755 emacs-install %i/lib/%n/
install -m 755 emacs-package-install %i/lib/%n/
(cd %i/lib/%n/; ln -s emacs-install emacs-remove)
(cd %i/lib/%n/; ln -s emacs-package-install emacs-package-remove)
install -m 755 generate-install-list %i/lib/%n/
install -m 644 debian-startup.el %i/share/emacs/site-lisp/fink-startup.el

install -m 755 emacsen-common.install %i/lib/%n/packages/install/emacsen-common
install -m 755 emacsen-common.remove %i/lib/%n/packages/remove/emacsen-common
<<
#

PostInstScript: <<
mkdir -p %p/var/lib/emacsen-common

if [ -e /usr/local ]
then
if [ ! -e /usr/local/share ]
then
if mkdir -p /usr/local/share 2>/dev/null
then
chown root:staff /usr/local/share
chmod 2775 /usr/local/share
fi
fi

if [ ! -e /usr/local/share/emacs ]
then
if mkdir /usr/local/share/emacs 2>/dev/null
then
chown root:staff /usr/local/share/emacs
chmod 2775 /usr/local/share/emacs
fi
fi

if [ ! -e /usr/local/share/emacs/site-lisp ]
then
if mkdir /usr/local/share/emacs/site-lisp 2>/dev/null
then
chown root:staff /usr/local/share/emacs/site-lisp
chmod 2775 /usr/local/share/emacs/site-lisp
fi
fi
fi

if [ ! -e %p/var/lib/emacsen-common/installed-flavors ]
then
if [ -e /usr/local/share/emacs ]
then
chmod 2775 /usr/local/share/emacs
fi
/bin/echo "\c" > %p/var/lib/emacsen-common/installed-flavors
chmod 644 %p/var/lib/emacsen-common/installed-flavors
/bin/echo "\c" > %p/var/lib/emacsen-common/installed-flavors
fi
%p/lib/emacsen-common/emacs-package-install emacsen-common

# Clean up dead emacs info entry...
#install-info --quiet --remove emacs
<<

PreRmScript: <<
%p/lib/emacsen-common/emacs-package-remove emacsen-common

(rmdir /usr/local/share/emacs/site-lisp 2>/dev/null && rmdir /usr/local/share/emacs 2>/dev/null) || true
<<
PostRmScript: <<
if [ "$1" = purge ]
then
if [ -e %p/var/lib/emacsen-common/installed-flavors ]
then
rm -f %p/var/lib/emacsen-common/installed-flavors
rmdir %p/var/lib/emacsen-common
fi
fi
<<
#
Description: Common facilities for all emacsen
DescDetail: <<
This package contains code that is needed by all the (x)emacs packages.

It provides a unified mechanism for installing optional emacs-lisp
add-on packages, with facilities for byte-compiling code and making
it available to all installed (x)emacs variants.
<<
DescPort: <<
This package is derived from the Debian emacsen-common package, with a couple
of changes: 1) needs to be convinced to live under the fink prefix directory,
and 2) elisp functions with debian in the name were changed to fink (e.g.,
debian-startup became fink-startup).

The file 00fink-vars.el does very little at this point (none of its Debian
counterpart's functions are needed under OS X), but is being preserved for
future expansion.
<<
DescUsage: <<
The only current documentation is the debian-emacs-policy paper, which gives
a basic idea of what is required of emacs-maintainers and add-on package
maintainers in order to take advantage of the service.

A fink-specific revision of the document will (hopefully) be forthcoming...
<<
License: GPL
Homepage: http://packages.debian.org/unstable/editors/emacsen-common.html
Maintainer: Christian Swinehart

emacsen-common _unstable_ port .patch

diff -u -Naur emacsen-common-1.4.15/00debian-vars.el emacsen-common.fink/00debian-vars.el
--- emacsen-common-1.4.15/00debian-vars.el Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/00debian-vars.el Tue Jun 22 13:47:49 2004
@@ -1,6 +1,6 @@
-;; 00debian-vars.el
+;; 00fink-vars.el
;;
-;; Initialize some emacs variables from debian policy files.
+;; Initialize some emacs variables from fink policy files.
;;
;; Copyright (C) 1997, Frederic Lepied
;;
@@ -20,7 +20,7 @@
;;=============================================================================
;; Configuration section.
;;=============================================================================
-(defun debian-file->string (name &optional func)
+(defun fink-file->string (name &optional func)
"Convert a file into a string"
(interactive "fFile name : ")
(let ((filename (expand-file-name name)))
@@ -36,7 +36,7 @@
(kill-buffer buf)
ret))))

-(defun debian-clean-mailname ()
+(defun fink-clean-mailname ()
(while (search-forward "\n" nil t)
(replace-match "" nil t)))

@@ -45,15 +45,15 @@
;; policy/ch-binarypkg.html, 3.5 Maintainer scripts, /etc/news/server

(let ((mailname
- (debian-file->string "/etc/mailname" (function debian-clean-mailname))))
+ (fink-file->string "@PREFIX@/etc/mailname" (function fink-clean-mailname))))
(if (not mailname)
- (progn
- (message "No /etc/mailname. Reverting to default...")
- (sit-for 3))
+ ;;(progn
+ ;;(message "No @PREFIX@/etc/mailname. Reverting to default...")
+ ;;(sit-for 3))
(setq mail-host-address mailname)))

;; Don't need to check NNTPSERVER for override, gnus does that for us.
-(if (file-readable-p "/etc/news/server")
- (defvar gnus-nntpserver-file "/etc/news/server"))
+(if (file-readable-p "@PREFIX@/etc/news/server")
+ (defvar gnus-nntpserver-file "@PREFIX@/etc/news/server"))

-;;; 00debian-vars.el ends here
+;;; 00fink-vars.el ends here
diff -u -Naur emacsen-common-1.4.15/debian-startup.el emacsen-common.fink/debian-startup.el
--- emacsen-common-1.4.15/debian-startup.el Mon Feb 18 12:12:15 2002
+++ emacsen-common.fink/debian-startup.el Tue Jun 22 13:52:56 2004
@@ -1,4 +1,4 @@
-;;; debian-startup.el --- Debian specific emacsen startup code.
+;;; fink-startup.el --- Fink specific emacsen startup code.

;; Copyright (C) 1998 Rob Browning

@@ -30,7 +30,7 @@
;; of Emacs for a Debian system.


-(defun debian-pkg-add-load-path-item (item)
+(defun fink-pkg-add-load-path-item (item)
"Takes a path item (a string) and adds it to load path in the
correct position for an add-on package, before the emacs system
directories, but after the /usr/local/ directories. After modifying
@@ -63,7 +63,7 @@

;; Rewritten to less elegant -- non recursive version because elisp
;; doesn't seem to handle tail recursion :<
-(defun debian-unique-strings (strings)
+(defun fink-unique-strings (strings)
"Takes a list of strings and returns the list with *adjacent*
duplicates removed."
(let ((result '()))
@@ -73,7 +73,7 @@
(setq strings (cdr strings)))
(nreverse result)))

-(defun debian-run-directories (&rest dirs)
+(defun fink-run-directories (&rest dirs)

"Load each file of the form XXfilename.el or XXfilename.elc in any
of the dirs, where XX must be a number. The files will be run in
@@ -106,7 +106,7 @@
files)))

;; Finally sort them, and delete duplicates
- (base-names (debian-unique-strings (sort stripped-names 'string<)))
+ (base-names (fink-unique-strings (sort stripped-names 'string<)))

(old-load-path load-path))

@@ -134,9 +134,9 @@
load-path))))
(setq load-path (append add-on-package-paths old-load-path))))))

-(defun debian-startup (flavor)
+(defun fink-startup (flavor)

- ;; Our handling of debian-emacs-flavor here is truly weird, but we
+ ;; Our handling of fink-emacs-flavor here is truly weird, but we
;; have to do it like this because some of the emacsen flavors
;; didn't DWIM in their startup sequence. I wasn't as clear as I
;; should have been in debian-policy, but they were also
@@ -144,15 +144,15 @@

;; It's even weirder now. I've changed policy back to the old way,
;; but I'm also doing some sanity checking here and making sure that
- ;; even debian-emacs-flavor gets set no matter what. I'm in a rush
+ ;; even fink-emacs-flavor gets set no matter what. I'm in a rush
;; right now, but I'll come back later and make all this cleaner and
;; better documented. Sorry.

- (if (not (boundp 'debian-emacs-flavor))
- (defconst debian-emacs-flavor flavor
- "A symbol representing the particular debian flavor of emacs that's
+ (if (not (boundp 'fink-emacs-flavor))
+ (defconst fink-emacs-flavor flavor
+ "A symbol representing the particular fink flavor of emacs that's
running. Something like 'emacs20, 'xemacs20, etc.")

- (let ((common-dir "/etc/emacs/site-start.d")
- (flavor-dir (concat "/etc/" (symbol-name flavor) "/site-start.d")))
- (debian-run-directories flavor-dir common-dir))))
+ (let ((common-dir "@PREFIX@/etc/emacs/site-start.d")
+ (flavor-dir (concat "@PREFIX@/etc/" (symbol-name flavor) "/site-start.d")))
+ (fink-run-directories flavor-dir common-dir))))
diff -u -Naur emacsen-common-1.4.15/emacs-install emacsen-common.fink/emacs-install
--- emacsen-common-1.4.15/emacs-install Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacs-install Tue Jun 22 13:47:49 2004
@@ -7,8 +7,8 @@
# Let emacs-package-install/remove know what's going on.
$ENV{'CURRENTLY_HANDLING_EMACSEN'} = "Yes";

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $flavor = $ARGV[0];
my $action = 'install';
$action = 'remove' if $0 =~ /remove$/o;
diff -u -Naur emacsen-common-1.4.15/emacs-package-install emacsen-common.fink/emacs-package-install
--- emacsen-common-1.4.15/emacs-package-install Mon Feb 18 12:46:42 2002
+++ emacsen-common.fink/emacs-package-install Tue Jun 22 15:02:26 2004
@@ -7,8 +7,8 @@

my $currently_handling_emacsen = $ENV{'CURRENTLY_HANDLING_EMACSEN'};

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $pkg = $ARGV[0];
my $action = 'install';
$action = 'remove' if $0 =~ /remove$/o;
@@ -36,13 +36,13 @@
# Make sure if we create any files, we do it safely.
umask 0022 or die "emacs-package-$action: can't set umask, aborting.";

-if (! -e '/var/lib/emacsen-common/installed-flavors')
+if (! -e '@PREFIX@/var/lib/emacsen-common/installed-flavors')
{
die < ERROR: emacsen-common being used before being configured.
ERROR: This is likely a bug in the ${pkg} package, which needs to
ERROR: add one of the appropriate dependencies.
-ERROR: See /usr/share/doc/emacsen-common/debian-emacs-policy.gz
+ERROR: See @PREFIX@/share/doc/emacsen-common/debian-emacs-policy.gz
ERROR: for details.
EOS
}
diff -u -Naur emacsen-common-1.4.15/emacsen-common.install emacsen-common.fink/emacsen-common.install
--- emacsen-common-1.4.15/emacsen-common.install Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacsen-common.install Tue Jun 22 17:08:42 2004
@@ -9,38 +9,69 @@

if [ ${FLAVOR} != emacs ]
then
+
+ # Try compiling a trivial testfile {cswinehart | 22 june 2004}
+ echo '(defun a-fake-func() "This function does nothing" )' > /tmp/emacsen-common-testfile.el
+ if ${FLAVOR} ${byte_compile_options} /tmp/emacsen-common-testfile.el
+ then
+ # It worked. Clean up the testfile and be done with it.
+ rm -f /tmp/emacsen-common-testfile.el{,c}
+ else
+ # It failed. Stop trying to install and print a meaningful error message
+ printf "\n\n\n"
+ echo " +-------------------------------------------------------------------+"
+ echo " | Fink had a problem installing this version of Emacs because |"
+ echo " | ${FLAVOR} couldn't be launched successfully. |"
+ echo " | |"
+ echo " | This typically happens when the package was compiled on a |"
+ echo " | system with an older version of Mac OS X installed. At this |"
+ echo " | point you should try recompiling the emacs version that caused |"
+ echo " | this error with a command like: |"
+ echo " | fink rebuild |"
+ echo " | where is a package name like \`${FLAVOR}' or \`${FLAVOR}-nox' |"
+ echo " | |"
+ echo " | If this doesn't solve the problem, please notify the maintainer |"
+ echo " | of the emacs package in question. |"
+ echo " +-------------------------------------------------------------------+"
+ printf "\n\n\n\n"
+
+ # Clean up and return the error code
+ rm -f /tmp/emacsen-common-testfile.el{,c}
+ exit 1
+ fi
+
echo emacsen-common: byte-compiling for ${FLAVOR}

# If we had .el files that needed byte compiling in the package dir,
# this is how we'd handle it.

- #cp /usr/share/emacs/site-lisp/emacsen-common/*.el \
- # /usr/share/${FLAVOR}/site-lisp/emacsen-common
+ #cp @PREFIX@/share/emacs/site-lisp/emacsen-common/*.el \
+ # @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common
#${FLAVOR} ${byte_compile_options} \
- # /usr/share/${FLAVOR}/site-lisp/emacsen-common/*.el
- #rm /usr/share/${FLAVOR}/site-lisp/emacsen-common/*.el
+ # @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common/*.el
+ #rm @PREFIX@/share/${FLAVOR}/site-lisp/emacsen-common/*.el

# Normal add-on packages should usually *not* scatter their files
# directly in site-lisp, but should use a package subdir. This
# package/file is an exception.

# Remove potentially stale versions.
- rm -f /etc/${FLAVOR}/site-start.d/00debian-vars.elc \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.elc
+ rm -f @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.elc \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.elc

# Make temporary copies of the .el files
- cp /etc/emacs/site-start.d/00debian-vars.el /etc/${FLAVOR}/site-start.d
- cp /usr/share/emacs/site-lisp/debian-startup.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ cp @PREFIX@/etc/emacs/site-start.d/00fink-vars.el @PREFIX@/etc/${FLAVOR}/site-start.d
+ cp @PREFIX@/share/emacs/site-lisp/fink-startup.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el

# byte compile everything.
${FLAVOR} ${byte_compile_options} \
- /etc/${FLAVOR}/site-start.d/00debian-vars.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el

# Remove the redundant .el files.
- rm /etc/${FLAVOR}/site-start.d/00debian-vars.el \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.el
+ rm @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.el \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.el
fi

exit 0;
diff -u -Naur emacsen-common-1.4.15/emacsen-common.remove emacsen-common.fink/emacsen-common.remove
--- emacsen-common-1.4.15/emacsen-common.remove Tue Feb 22 17:42:00 2000
+++ emacsen-common.fink/emacsen-common.remove Tue Jun 22 13:47:49 2004
@@ -9,8 +9,8 @@
if [ ${FLAVOR} != emacs ]
then
echo emacsen-common: purging byte-compiled files for ${FLAVOR}
- rm -f /etc/${FLAVOR}/site-start.d/00debian-vars.elc \
- /usr/share/${FLAVOR}/site-lisp/debian-startup.elc
+ rm -f @PREFIX@/etc/${FLAVOR}/site-start.d/00fink-vars.elc \
+ @PREFIX@/share/${FLAVOR}/site-lisp/fink-startup.elc
fi

exit 0;
diff -u -Naur emacsen-common-1.4.15/generate-install-list emacsen-common.fink/generate-install-list
--- emacsen-common-1.4.15/generate-install-list Tue Jan 29 15:51:49 2002
+++ emacsen-common.fink/generate-install-list Tue Jun 22 13:47:49 2004
@@ -8,8 +8,8 @@
# it will sort them according to their dependencies. It will also add
# in other add-on packages that aren't mentioned, but are needed.

-my $lib_dir = "/usr/lib/emacsen-common";
-my $var_dir = "/var/lib/emacsen-common";
+my $lib_dir = "@PREFIX@/lib/emacsen-common";
+my $var_dir = "@PREFIX@/var/lib/emacsen-common";
my $installed_add_on_pkgs = undef;

sub cwd {