1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-04 22:33:27 +00:00
freebsd-ports/lang/modula-3-lib/scripts/configure

46 lines
1.4 KiB
Plaintext
Raw Normal View History

#! /bin/sh
#
1998-09-18 01:02:04 +00:00
# $Id: configure,v 1.3 1998/06/02 23:22:23 jdp Exp $
umask 022
temp_prefix=${WRKSRC}/installed
1998-09-18 01:02:04 +00:00
plist_src=${PKGDIR}/${PLIST##*/}
template_src=${FILESDIR}/FreeBSD2.${PORTOBJFORMAT}
template="${WRKSRC}/m3/m3build/templates/FreeBSD2"
1998-09-18 01:02:04 +00:00
if [ "${PORTOBJFORMAT}" = aout -a -f /usr/lib/aout/crt0.o ]; then
crt0=/usr/lib/aout/crt0.o
else
1998-09-18 01:02:04 +00:00
crt0=/usr/lib/crt0.o
fi
1998-09-18 01:02:04 +00:00
if [ "${PORTOBJFORMAT}" = aout -a -f /usr/lib/aout/libgcc.a ]; then
libgcc=/usr/lib/aout/libgcc.a
else
1998-09-18 01:02:04 +00:00
libgcc=/usr/lib/libgcc.a
fi
1998-09-18 01:02:04 +00:00
# Copy the appropriate m3build template file into place, patching up
# various pathnames in the process.
rm -f ${template}
sed -e "s|/usr/local/|${temp_prefix}/|g" \
-e "s|!PREFIX!|${PREFIX}|g" \
-e "s|/usr/lib/crt0\.o|${crt0}|g" \
-e "s|/usr/lib/libgcc\.a|${libgcc}|g" \
${template_src} >${template}
# Our PLIST templates contain only the "libfoo.so" names for shared
# libraries. Here we add the "libfoo.so.${MAJOR}" names. This saves
# us from having to fix the PLIST every time we bump the version number.
sed -e "/\.so\$/p" \
-e "s/\.so\$/&.${MAJOR}/" \
${plist_src} > ${PLIST}
# Also generate a "PLIST.real" file which includes the minor version
# numbers on shared library names if the object format is a.out.
if [ "${PORTOBJFORMAT}" = aout ]; then
sed -e "s/\.so\.${MAJOR}\$/&.0/" ${PLIST} > ${PLIST}.real
else
cp ${PLIST} ${PLIST}.real
fi