1996-10-29 23:01:55 +00:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
1998-09-18 01:02:04 +00:00
|
|
|
# $Id: configure,v 1.3 1998/06/02 23:22:23 jdp Exp $
|
1996-10-29 23:01:55 +00:00
|
|
|
|
|
|
|
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"
|
1996-10-29 23:01:55 +00:00
|
|
|
|
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
|
1998-05-29 17:58:09 +00:00
|
|
|
else
|
1998-09-18 01:02:04 +00:00
|
|
|
crt0=/usr/lib/crt0.o
|
1998-05-29 17:58:09 +00:00
|
|
|
fi
|
1998-09-18 01:02:04 +00:00
|
|
|
if [ "${PORTOBJFORMAT}" = aout -a -f /usr/lib/aout/libgcc.a ]; then
|
1998-06-02 23:22:23 +00:00
|
|
|
libgcc=/usr/lib/aout/libgcc.a
|
|
|
|
else
|
1998-09-18 01:02:04 +00:00
|
|
|
libgcc=/usr/lib/libgcc.a
|
1998-06-02 23:22:23 +00:00
|
|
|
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
|