head	1.2;
access;
symbols
	RELEASE_4_3_0:1.1.1.1
	RELEASE_4_2_0:1.1.1.1
	RELEASE_4_1_1:1.1.1.1
	RELEASE_4_1_0:1.1.1.1
	RELEASE_3_5_0:1.1.1.1
	RELEASE_4_0_0:1.1.1.1
	RELEASE_3_4_0:1.1.1.1
	RELEASE_3_3_0:1.1.1.1
	RELEASE_3_2_0:1.1.1.1
	RELEASE_3_1_0:1.1.1.1
	RELEASE_2_2_8:1.1.1.1
	RELEASE_3_0_0:1.1.1.1
	RELEASE_2_2_7:1.1.1.1
	RELEASE_2_2_6:1.1.1.1
	RELEASE_2_2_5:1.1.1.1
	RELEASE_2_2_1:1.1.1.1
	RELEASE_2_2_2:1.1.1.1
	jdp_1_0:1.1.1.1
	JDP:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2001.07.21.23.41.35;	author jdp;	state dead;
branches;
next	1.1;

1.1
date	96.10.29.23.01.54;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.10.29.23.01.54;	author jdp;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Remove the old modula-3 and modula-3-lib ports.  They are superseded
by the pm3-* family of ports, which build a newer and better-maintained
version of Modula-3.  I have converted all ports which depended on
modula-3 to use pm3-* instead.

PR:		ports/27664 is rendered irrelevant
@
text
@#! /bin/sh
#
# This script determines whether certain earlier versions of the
# Modula-3 port exist on the system in a place where the linker or
# dynamic linker would find them.  These earlier versions must be
# removed before installing the current port, because they use higher
# major version numbers for the shared libraries than this port uses.
# This situation arose because of an ill-considered choice for the
# major version numbers in those early ports.  I am intentionally
# breaking the rule that the version number should never be decreased,
# in order to nip this unfortunate situation in the bud.

if [ x$2 != xPRE-INSTALL ]; then
    exit 0
fi

check() {
    local list i lib_path oldIFS status

    status=0

    # Check the dynamic linker's hints.

    list=$(/sbin/ldconfig -r | grep "libm3\.so\.35[34]\." | sed "s/^.* => //")
    for file in ${list}; do
	if [ -f ${file} ]; then  # The file actually exists
	    echo $(dirname ${file})
	    status=1
	fi
    done

    # Check any directories in LD_LIBRARY_PATH.  Also, check the directory
    # where we intend to install the new libraries.

    lib_path=${PREFIX:-/usr/local}/lib/m3/FreeBSD2:${LD_LIBRARY_PATH}
    oldIFS=${IFS}; IFS=":"; set ${lib_path}; IFS=${oldIFS}
    for dir; do
	if [ x${dir} != x ]; then
	    if echo ${dir}/libm3.so.35[34].* | grep -q "\*"; then # Not found
		:
	    else  # Found
		echo ${dir}
		status=1
	    fi
	fi
    done

    return ${status}
}

tmp=/tmp/m3-inst$$a
trap "rm -f ${tmp}" 1 2 3 15
touch ${tmp}

if check > ${tmp}; then
    rm -f ${tmp}
    exit 0
else
    echo "*****************************************************************"
    echo "*                        IMPORTANT                              *"
    echo "* You currently have an older version of the Modula-3 port on   *"
    echo "* your system.  You must remove the older version before you    *"
    echo "* install this one.  Otherwise, a problem with the shared       *"
    echo "* libraries in the older version will cause utter confusion.    *"
    echo "* Please remove the older version and try again.                *"
    echo "*                                                               *"
    echo "* Old Modula-3 shared libraries were found in the following     *"
    echo "* directories:                                                  *"
    echo "*                                                               *"
    sort -u ${tmp} | awk '{ printf "*   %-59s *\n", $0 }'
    echo "*****************************************************************"
    rm -f ${tmp}
    exit 1
fi
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Split the Modula-3 port into two pieces, creating a new port
"modula-3-lib".  It installs only the shared libraries needed for
executing Modula-3 programs.  This saves a lot of disk space for
people who need to run Modula-3 programs but don't need to build
them.  The original "modula-3" port now depends on this one, and
uses it to install the compiler and the rest of the development
system.

Also, everything is now built with optimization.  I have been
testing this for at least a month, and haven't seen any problems
from it.  It makes the libraries and executables substantially
smaller.

This new port also includes some hooks that will make SOCKS support
possible in the near future.
@
text
@@
