[106035] trunk/dports/_resources/port1.0/group/elisp-1.0.tcl

dports at macports.org dports at macports.org
Mon May 13 14:42:15 PDT 2013


Revision: 106035
          https://trac.macports.org/changeset/106035
Author:   dports at macports.org
Date:     2013-05-13 14:42:14 -0700 (Mon, 13 May 2013)
Log Message:
-----------
elisp-1.0: new portgroup

This portgroup is for ports that install Emacs lisp modules and is
intended to allow these ports to better support different
installations of Emacs, e.g. the emacs and emacs-app ports.

See discussion in #39019

Added Paths:
-----------
    trunk/dports/_resources/port1.0/group/elisp-1.0.tcl

Added: trunk/dports/_resources/port1.0/group/elisp-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/elisp-1.0.tcl	                        (rev 0)
+++ trunk/dports/_resources/port1.0/group/elisp-1.0.tcl	2013-05-13 21:42:14 UTC (rev 106035)
@@ -0,0 +1,80 @@
+# $Id: texlive-1.0.tcl 96776 2012-08-19 05:52:01Z blair at macports.org $
+#
+# Copyright (c) 2013 Dan R. K. Ports <dports at macports.org>
+# Copyright (c) 2013 The MacPorts Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its
+#    contributors may be used to endorse or promote products derived from
+#    this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# This portgroup is for ports that install Emacs lisp modules.
+#
+# The main goal is to allow these ports to support different
+# installations of Emacs, e.g. the emacs and emacs-app ports.  The
+# assumption here is that all of these emacsen install into the same
+# site-lisp directory, ${emacs_lispdir}, and have compatible
+# byte-code, so it odesn't matter which one is used to byte-compile
+# the lisp code.
+#
+# Accordingly, the portgroup detects any installed versions of
+# emacs/emacs-app/emacs-mac-app, and sets ${emacs_binary} to the
+# installed emacs binary, and ${emacs_binary_provider} to the name of
+# the port that provides it. If no emacs is installed, it defaults to
+# the location and name of the emacs port.
+#
+# This can be used in the dependency specification, e.g.
+#    depends_lib         path:${emacs_binary}:${emacs_binary_provider}
+# ${emacs_binary} should also be used for compiling the elisp code,
+# but we leave setting that up to the individual portfiles, because
+# there's no standard way to do it.
+#
+
+set emacs_default_binary             ${prefix}/bin/emacs
+set emacs_default_binary_provider    emacs
+
+set emacs_binaries "
+    ${prefix}/bin/emacs
+    ${applications_dir}/Emacs.app/Contents/MacOS/Emacs
+    ${applications_dir}/EmacsMac.app/Contents/MacOS/Emacs
+"
+
+set emacs_binary              ${emacs_default_binary}
+set emacs_binary_provider     ${emacs_default_binary_provider}
+set emacs_binary_found        0
+
+# Find the first matching emacs binary
+foreach bin ${emacs_binaries} {
+    set provider [registry_file_registered $bin]
+    if {[file exists $bin] && $provider != 0} {
+        set emacs_binary $bin
+        set emacs_binary_provider $provider
+        set emacs_binary_found 1
+        break
+    }
+}
+
+set emacs_lispdir            ${prefix}/share/emacs/site-lisp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130513/8a3ee4a6/attachment.html>


More information about the macports-changes mailing list