[38109] trunk/base
Randall Wood
randall.h.wood at alexandriasoftware.com
Mon Jul 7 09:44:22 PDT 2008
In Leopard, do we really want to set the display? Won't that screw
with the new Apple mechanism for handling X display requests?
On Sun, Jul 6, 2008 at 4:27 PM, <raimue at macports.org> wrote:
> Revision 38109 Author raimue at macports.org Date 2008-07-06 13:27:48 -0700
> (Sun, 06 Jul 2008)
>
> Log Message
>
> base:
> Add a new setupenv.sh script which can be used to setup the environment for
> MacPorts. It will be installed to ${prefix}/share/macports/setupenv.sh and
> can
> be sourced from your profile.
>
> Modified Paths
>
> trunk/base/Makefile.in
> trunk/base/configure
> trunk/base/configure.ac
>
> Added Paths
>
> trunk/base/setupenv.sh.in
>
> Property Changed
>
> trunk/base/
>
> Diff
>
> Property changes: trunk/base
>
> Name: svn:ignore
> - autom4te.cache
> config.log
> config.status
> Makefile
> Doxyfile
> tcldox
> + autom4te.cache
> config.log
> config.status
> Makefile
> Doxyfile
> tcldox
> setupenv.sh
>
> Modified: trunk/base/Makefile.in (38108 => 38109)
>
> --- trunk/base/Makefile.in 2008-07-06 19:45:41 UTC (rev 38108)
> +++ trunk/base/Makefile.in 2008-07-06 20:27:48 UTC (rev 38109)
> @@ -32,6 +32,7 @@
> include Mk/macports.upgrade.mk
>
> install:: upgrade
> + $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 setupenv.sh
> ${datadir}/macports/
> [ ! -f ${sysconfdir}/macports/mp_version ] || rm -vf
> ${sysconfdir}/macports/mp_version
>
> include Mk/macports.subdir.mk
>
> Modified: trunk/base/configure (38108 => 38109)
>
> --- trunk/base/configure 2008-07-06 19:45:41 UTC (rev 38108)
> +++ trunk/base/configure 2008-07-06 20:27:48 UTC (rev 38109)
> @@ -12377,7 +12377,7 @@
>
>
> # Output
> -ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk
> doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile
> portmgr/fedora/macports.spec src/Makefile
> src/macports1.0/macports_autoconf.tcl src/tclobjc1.0/Makefile
> src/pathconf/Makefile src/pathconf/paths src/pathconf/manpaths
> src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl
> src/programs/Makefile src/macports1.0/macports_fastload.tcl"
> +ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk
> doc/prefix.mtree doc/macosx.mtree doc/macports.conf portmgr/freebsd/Makefile
> portmgr/fedora/macports.spec src/Makefile
> src/macports1.0/macports_autoconf.tcl src/tclobjc1.0/Makefile
> src/pathconf/Makefile src/pathconf/paths src/pathconf/manpaths
> src/port1.0/port_autoconf.tcl src/registry1.0/registry_autoconf.tcl
> src/programs/Makefile src/macports1.0/macports_fastload.tcl setupenv.sh"
>
>
> cat >confcache <<\_ACEOF
> @@ -12953,6 +12953,7 @@
> "src/registry1.0/registry_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES
> src/registry1.0/registry_autoconf.tcl" ;;
> "src/programs/Makefile") CONFIG_FILES="$CONFIG_FILES
> src/programs/Makefile" ;;
> "src/macports1.0/macports_fastload.tcl") CONFIG_FILES="$CONFIG_FILES
> src/macports1.0/macports_fastload.tcl" ;;
> + "setupenv.sh") CONFIG_FILES="$CONFIG_FILES setupenv.sh" ;;
>
> *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target"
>>&5
> echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
>
> Modified: trunk/base/configure.ac (38108 => 38109)
>
> --- trunk/base/configure.ac 2008-07-06 19:45:41 UTC (rev 38108)
> +++ trunk/base/configure.ac 2008-07-06 20:27:48 UTC (rev 38109)
> @@ -412,6 +412,7 @@
> src/registry1.0/registry_autoconf.tcl
> src/programs/Makefile
> src/macports1.0/macports_fastload.tcl
> + setupenv.sh
> ])
>
> AC_OUTPUT
>
> Added: trunk/base/setupenv.sh.in (0 => 38109)
>
> --- trunk/base/setupenv.sh.in (rev 0)
> +++ trunk/base/setupenv.sh.in 2008-07-06 20:27:48 UTC (rev 38109)
> @@ -0,0 +1,87 @@
> +# -*- coding: utf-8; mode: shell-script-mode; tab-width: 4;
> indent-tabs-mode: nil; c-basic-offset: 4 -*-
> vim:fenc=utf-8:filetype=sh:et:sw=4:ts=4:sts=4
> +#
> +# Copyright (c) 2008 Rainer Mueller <raimue at macports.org>, 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 Apple, Inc., 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.
> +#
> +# $Id$
> +
> +function export_path() {
> + local binpath="@prefix_expanded@/bin"
> + local sbinpath="@prefix_expanded@/sbin"
> +
> + local IFS=":"
> + for p in $PATH; do
> + if [ "$p" == "$binpath" ]; then
> + binpath=""
> + elif [ "$p" == "$sbinpath" ]; then
> + sbinpath=""
> + fi
> + done
> +
> + if [ -n "$binpath" ]; then
> + binpath+=":"
> + fi
> +
> + if [ -n "$sbinpath" ]; then
> + sbinpath+=":"
> + fi
> +
> + export PATH="${binpath}${sbinpath}${PATH}"
> +}
> +
> +function export_manpath() {
> + mpath="@prefix_expanded@/share/man"
> +
> + local IFS=":"
> + for p in $MANPATH; do
> + if [ "$p" == "$mpath" ]; then
> + mpath=""
> + fi
> + done
> +
> + if [ -n "$mpath" ]; then
> + mpath+=":"
> + fi
> +
> + export MANPATH="${mpath}${MANPATH}"
> +}
> +
> +function export_display() {
> + if [ -z $DISPLAY ]; then
> + export DISPLAY=":0.0"
> + fi
> +}
> +
> +export_path
> +export_manpath
> +export_display
> +
> +# Remove defined functions to prevent them from cluttering the shell,
> +# but they are needed to restrict variables to the local scope
> +unset export_path
> +unset export_manpath
> +unset export_display
>
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-changes
>
>
--
Randall Wood
randall.h.wood at alexandriasoftware.com
"The rules are simple: The ball is round. The game lasts 90 minutes.
All the rest is just philosophy."
More information about the macports-dev
mailing list