1996-03-20 17:10:19 -05:00
|
|
|
# New ports collection makefile for: modula-3
|
1996-09-26 22:26:41 -04:00
|
|
|
# Version required: 3.6
|
1996-03-20 17:10:19 -05:00
|
|
|
# Date created: 18 Mar 1996
|
|
|
|
# Whom: John Polstra <jdp@polstra.com>
|
|
|
|
#
|
1997-03-27 23:38:47 -05:00
|
|
|
# $Id: Makefile,v 1.10 1996/12/30 23:28:13 jdp Exp $
|
1996-03-20 17:10:19 -05:00
|
|
|
#
|
|
|
|
|
1996-09-26 22:26:41 -04:00
|
|
|
DISTNAME= modula-3-3.6
|
1996-11-11 21:19:40 -05:00
|
|
|
CATEGORIES= lang
|
1996-10-29 18:17:19 -05:00
|
|
|
DISTFILES=
|
1996-03-20 17:10:19 -05:00
|
|
|
|
|
|
|
MAINTAINER= jdp@polstra.com
|
|
|
|
|
1996-10-29 18:17:19 -05:00
|
|
|
DEPENDS= ${PORTSDIR}/lang/modula-3-lib
|
Update the Modula-3 port with two main goals in mind.
First, change the port so that it builds a much smaller subset of
the SRC distribution. This eliminates the enormous swap space
requirements of the earlier port, greatly reduces the footprint of
the installed tree, and cuts the size of the package in half.
Second, include many important new patches. Among them is a slightly
modified version of phkmalloc that is thread-safe for Modula-3.
It eradicates some rare and baffling core dumps that cropped up
from time to time in the previous version of the port. The Modula-3
runtime itself is careful to use mutual exclusion around calls to
malloc. But there remained some sneaky backdoor paths into it from
external libraries.
Confession: In the original version of the Modula-3 port, I used
a major version number of 353 for the shared libraries, to correspond
with the SRC version number 3.5.3. That was a dumb move -- I should
have used 1. The current update is incompatible at the shared
library level, requiring me to increment the major version number
to 354, even though this is still based on SRC release 3.5.3. This
is bound to confuse some folks, unfortunately. I weighed a number
of alternatives, such as (a) cheating and going back to 1, and (b)
using a 4-digit major version such as 3531. But in the end I
decided that 354 would be the best solution, even though it's
confusing.
1996-09-10 01:25:10 -04:00
|
|
|
|
1996-10-29 18:17:19 -05:00
|
|
|
WRKSRC= ${PORTSDIR}/lang/modula-3-lib/work
|
1996-12-30 18:28:13 -05:00
|
|
|
NO_CHECKSUM= yes
|
1996-10-29 18:17:19 -05:00
|
|
|
NO_CONFIGURE= yes
|
|
|
|
NO_BUILD= yes
|
1996-03-20 17:10:19 -05:00
|
|
|
|
1996-11-01 15:27:23 -05:00
|
|
|
# Keep these in sync with the PLIST and with the library version numbers
|
|
|
|
# in the modula-3-lib port.
|
|
|
|
major= 4
|
|
|
|
minor= 0
|
|
|
|
|
1996-03-20 17:10:19 -05:00
|
|
|
# The Modula-3 build process insists on installing each individual
|
|
|
|
# component immediately after that component is built. To avoid having
|
|
|
|
# to do the entire build as root, we arrange for everything to first
|
|
|
|
# be "installed" into the following directory, which we own.
|
1996-10-29 18:17:19 -05:00
|
|
|
temp_prefix= ${WRKSRC}/installed
|
1996-03-20 17:10:19 -05:00
|
|
|
|
|
|
|
do-install:
|
1996-09-26 22:26:41 -04:00
|
|
|
@echo "Deleting extraneous cruft"
|
|
|
|
@cd ${temp_prefix}/lib/m3/pkg; \
|
|
|
|
rm -rf m3 m3front m3middle m3linker
|
|
|
|
@cd ${temp_prefix}/lib/m3/FreeBSD2; \
|
|
|
|
rm -f libm3front.so.*.* libm3link.so.*.* libm3middle.so.*.*
|
1996-10-29 18:17:19 -05:00
|
|
|
@echo "Installing files in \"${PREFIX}\""
|
|
|
|
@cd ${temp_prefix}; \
|
|
|
|
umask 022; \
|
1997-03-27 23:38:47 -05:00
|
|
|
sed -e "/^@/d" -e "/m3build-/d" -e "s/\.gz$$//" \
|
|
|
|
-e "/^share/d" ${PKGDIR}/PLIST | \
|
1996-10-29 18:17:19 -05:00
|
|
|
cpio -dump -R ${BINOWN}.${BINGRP} ${PREFIX}
|
1996-03-20 17:10:19 -05:00
|
|
|
@echo "Fixing absolute pathnames in installed files"
|
1996-09-26 22:26:41 -04:00
|
|
|
@/bin/sh ${SCRIPTDIR}/fix_pathnames ${temp_prefix} ${PREFIX}
|
1996-03-20 17:10:19 -05:00
|
|
|
@echo "Rebuilding and shipping m3build with correct pathnames"
|
|
|
|
@cd ${WRKSRC}/m3/m3build; \
|
|
|
|
LD_LIBRARY_PATH=${PREFIX}/lib/m3/FreeBSD2:$$LD_LIBRARY_PATH; \
|
|
|
|
PATH=${PREFIX}/bin:$$PATH; \
|
1996-09-26 22:26:41 -04:00
|
|
|
export LD_LIBRARY_PATH PATH; \
|
Update the Modula-3 port with two main goals in mind.
First, change the port so that it builds a much smaller subset of
the SRC distribution. This eliminates the enormous swap space
requirements of the earlier port, greatly reduces the footprint of
the installed tree, and cuts the size of the package in half.
Second, include many important new patches. Among them is a slightly
modified version of phkmalloc that is thread-safe for Modula-3.
It eradicates some rare and baffling core dumps that cropped up
from time to time in the previous version of the port. The Modula-3
runtime itself is careful to use mutual exclusion around calls to
malloc. But there remained some sneaky backdoor paths into it from
external libraries.
Confession: In the original version of the Modula-3 port, I used
a major version number of 353 for the shared libraries, to correspond
with the SRC version number 3.5.3. That was a dumb move -- I should
have used 1. The current update is incompatible at the shared
library level, requiring me to increment the major version number
to 354, even though this is still based on SRC release 3.5.3. This
is bound to confuse some folks, unfortunately. I weighed a number
of alternatives, such as (a) cheating and going back to 1, and (b)
using a 4-digit major version such as 3531. But in the end I
decided that 354 would be the best solution, even though it's
confusing.
1996-09-10 01:25:10 -04:00
|
|
|
umask 022; \
|
1996-09-26 22:26:41 -04:00
|
|
|
rm -rf FreeBSD2; \
|
1996-11-11 21:19:40 -05:00
|
|
|
${MKDIR} FreeBSD2; \
|
1996-09-26 22:26:41 -04:00
|
|
|
cd FreeBSD2; \
|
|
|
|
quake -D_bootstrap -D_all -DPACKAGE_DIR=${WRKSRC}/m3/m3build \
|
|
|
|
-DPACKAGE=m3build -DBUILD_DIR=FreeBSD2 \
|
|
|
|
${PREFIX}/lib/m3/pkg/m3build/templates/FreeBSD2 \
|
|
|
|
${WRKSRC}/m3/m3build/src/m3makefile; \
|
|
|
|
./m3ship
|
1996-10-29 18:17:19 -05:00
|
|
|
@echo "Rebuilding and shipping m3configvars with correct pathnames"
|
|
|
|
@cd ${WRKSRC}/m3/m3configvars; \
|
1996-03-20 17:10:19 -05:00
|
|
|
LD_LIBRARY_PATH=${PREFIX}/lib/m3/FreeBSD2:$$LD_LIBRARY_PATH; \
|
|
|
|
export LD_LIBRARY_PATH; \
|
|
|
|
PATH=${PREFIX}/bin:$$PATH; \
|
|
|
|
export PATH; \
|
Update the Modula-3 port with two main goals in mind.
First, change the port so that it builds a much smaller subset of
the SRC distribution. This eliminates the enormous swap space
requirements of the earlier port, greatly reduces the footprint of
the installed tree, and cuts the size of the package in half.
Second, include many important new patches. Among them is a slightly
modified version of phkmalloc that is thread-safe for Modula-3.
It eradicates some rare and baffling core dumps that cropped up
from time to time in the previous version of the port. The Modula-3
runtime itself is careful to use mutual exclusion around calls to
malloc. But there remained some sneaky backdoor paths into it from
external libraries.
Confession: In the original version of the Modula-3 port, I used
a major version number of 353 for the shared libraries, to correspond
with the SRC version number 3.5.3. That was a dumb move -- I should
have used 1. The current update is incompatible at the shared
library level, requiring me to increment the major version number
to 354, even though this is still based on SRC release 3.5.3. This
is bound to confuse some folks, unfortunately. I weighed a number
of alternatives, such as (a) cheating and going back to 1, and (b)
using a 4-digit major version such as 3531. But in the end I
decided that 354 would be the best solution, even though it's
confusing.
1996-09-10 01:25:10 -04:00
|
|
|
umask 022; \
|
1996-09-26 22:26:41 -04:00
|
|
|
rm -rf FreeBSD2; \
|
1996-03-20 17:10:19 -05:00
|
|
|
m3build; \
|
1996-10-29 18:17:19 -05:00
|
|
|
m3ship
|
1997-03-27 23:38:47 -05:00
|
|
|
@echo "Installing copyright notice"
|
|
|
|
@if [ ! -d ${PREFIX}/share/modula-3 ]; then \
|
|
|
|
${MKDIR} ${PREFIX}/share/modula-3; \
|
|
|
|
chmod 755 ${PREFIX}/share/modula-3; \
|
|
|
|
fi
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/m3/src/COPYRIGHT ${PREFIX}/share/modula-3
|
1996-03-20 17:10:19 -05:00
|
|
|
@echo "Stripping executables"
|
1996-09-26 22:26:41 -04:00
|
|
|
@cd ${temp_prefix}; \
|
|
|
|
find bin -type f ! -name recordheap | (cd ${PREFIX}; xargs strip)
|
|
|
|
@cd ${PREFIX}/lib/m3/FreeBSD2; strip m3 m3cgc1 m3mkdir
|
1996-11-01 15:27:23 -05:00
|
|
|
@cd ${PREFIX}/bin; \
|
|
|
|
ln -f m3build m3build-${major}; \
|
|
|
|
ln -f m3build m3build-${major}.${minor}
|
1996-03-20 17:10:19 -05:00
|
|
|
.if !defined(NOMANCOMPRESS)
|
|
|
|
@echo "Compressing manual pages"
|
1996-09-26 22:26:41 -04:00
|
|
|
@cd ${temp_prefix}; \
|
|
|
|
find man -type f | (cd ${PREFIX}; xargs gzip -9nf)
|
1996-03-20 17:10:19 -05:00
|
|
|
.endif
|
1996-10-29 18:17:19 -05:00
|
|
|
@echo "Fixing file permissions"
|
|
|
|
@cd ${PREFIX}; \
|
|
|
|
grep -v "^@" ${PKGDIR}/PLIST | xargs chown ${BINOWN}.${BINGRP}; \
|
|
|
|
grep -v "^@" ${PKGDIR}/PLIST | xargs chmod go=u-w; \
|
|
|
|
find -X lib/m3 -type d | xargs chown ${BINOWN}.${BINGRP}; \
|
|
|
|
find -X lib/m3 -type d | xargs chmod 755
|
1996-03-20 17:10:19 -05:00
|
|
|
@echo "Running ldconfig"
|
|
|
|
@/sbin/ldconfig -m ${PREFIX}/lib/m3/FreeBSD2
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|