1996-03-20 22:10:19 +00:00
|
|
|
# New ports collection makefile for: modula-3
|
|
|
|
# Date created: 18 Mar 1996
|
|
|
|
# Whom: John Polstra <jdp@polstra.com>
|
|
|
|
#
|
1999-08-25 06:35:40 +00:00
|
|
|
# $FreeBSD$
|
1996-03-20 22:10:19 +00:00
|
|
|
#
|
|
|
|
|
2000-04-12 06:21:15 +00:00
|
|
|
PORTNAME= modula-3
|
|
|
|
PORTVERSION= 3.6
|
1996-11-12 02:19:40 +00:00
|
|
|
CATEGORIES= lang
|
1996-10-29 23:17:19 +00:00
|
|
|
DISTFILES=
|
1996-03-20 22:10:19 +00:00
|
|
|
|
|
|
|
MAINTAINER= jdp@polstra.com
|
|
|
|
|
1998-12-04 07:23:01 +00:00
|
|
|
DEPENDS= ${PORTSDIR}/lang/modula-3-lib:install
|
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 05:25:10 +00:00
|
|
|
|
1999-07-15 20:42:03 +00:00
|
|
|
WRKSRC!= echo `dirname ${WRKDIRPREFIX}${.CURDIR}`/modula-3-lib/work
|
1996-12-30 23:28:13 +00:00
|
|
|
NO_CHECKSUM= yes
|
1996-10-29 23:17:19 +00:00
|
|
|
NO_BUILD= yes
|
1998-06-06 20:32:08 +00:00
|
|
|
MAN1= analyze_coverage.1 m3browser.1 m3build.1 \
|
|
|
|
m3bundle.1 m3pp.1 m3ship.1 m3tohtml.1 \
|
|
|
|
m3totex.1 m3where.1 quake.1 recordheap.1
|
1998-09-18 01:02:04 +00:00
|
|
|
SCRIPTS_ENV+= MAJOR=${major} PKGDIR=${PKGDIR} PLIST=${PLIST}
|
1998-06-06 20:32:08 +00:00
|
|
|
|
1998-09-18 01:02:04 +00:00
|
|
|
# Shared library major version number. Keep this in sync with the
|
|
|
|
# modula-3-lib port.
|
1998-04-28 22:23:18 +00:00
|
|
|
major= 6
|
1996-11-01 20:27:23 +00:00
|
|
|
|
1996-03-20 22:10:19 +00: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 23:17:19 +00:00
|
|
|
temp_prefix= ${WRKSRC}/installed
|
1996-03-20 22:10:19 +00:00
|
|
|
|
1999-01-28 05:39:19 +00:00
|
|
|
# Support building on systems with or without X11 installed.
|
2000-04-17 00:18:05 +00:00
|
|
|
.ifdef WITHOUT_X11
|
2000-10-08 02:10:22 +00:00
|
|
|
PLIST= ${WRKDIR}/pkg-plist.noX11
|
1999-01-28 05:39:19 +00:00
|
|
|
.else
|
|
|
|
pre-fetch:
|
2000-04-17 00:18:05 +00:00
|
|
|
@${ECHO_MSG} "To build this port without X11, define \"WITHOUT_X11\"."
|
1999-01-28 05:39:19 +00:00
|
|
|
|
2000-10-28 19:58:02 +00:00
|
|
|
PLIST= ${WRKDIR}/pkg-plist
|
1999-01-28 05:39:19 +00:00
|
|
|
MAN1+= formsedit.1 replayheap.1 showheap.1 shownew.1 showthread.1
|
|
|
|
.endif
|
|
|
|
|
1996-03-20 22:10:19 +00:00
|
|
|
do-install:
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Deleting extraneous cruft"
|
1996-09-27 02:26:41 +00:00
|
|
|
@cd ${temp_prefix}/lib/m3/pkg; \
|
1999-08-28 02:42:41 +00:00
|
|
|
${RM} -rf m3 m3front m3middle m3linker
|
1996-09-27 02:26:41 +00:00
|
|
|
@cd ${temp_prefix}/lib/m3/FreeBSD2; \
|
1999-08-28 02:42:41 +00:00
|
|
|
${RM} -f libm3front.so.*.* libm3link.so.*.* libm3middle.so.*.*
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Installing files in \"${PREFIX}\""
|
1996-10-29 23:17:19 +00:00
|
|
|
@cd ${temp_prefix}; \
|
|
|
|
umask 022; \
|
1999-08-28 02:17:34 +00:00
|
|
|
${SED} -e "/^@/d" -e "/m3build-/d" -e "s/\.gz$$//" \
|
1998-09-18 01:02:04 +00:00
|
|
|
-e "/^share/d" ${PLIST}.real | \
|
1996-10-29 23:17:19 +00:00
|
|
|
cpio -dump -R ${BINOWN}.${BINGRP} ${PREFIX}
|
1998-08-20 08:57:47 +00:00
|
|
|
@cd ${temp_prefix}/man/man1; \
|
|
|
|
umask 022; \
|
|
|
|
${ECHO} ${MAN1} | perl -pe 's/ /\n/g' | \
|
|
|
|
cpio -dump -R ${MANOWN}.${MANGRP} ${PREFIX}/man/man1
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Fixing absolute pathnames in installed files"
|
1997-07-13 18:49:31 +00:00
|
|
|
@${SH} ${SCRIPTDIR}/fix_pathnames ${temp_prefix} ${PREFIX}
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Rebuilding and shipping m3build with correct pathnames"
|
1996-03-20 22:10:19 +00:00
|
|
|
@cd ${WRKSRC}/m3/m3build; \
|
|
|
|
LD_LIBRARY_PATH=${PREFIX}/lib/m3/FreeBSD2:$$LD_LIBRARY_PATH; \
|
|
|
|
PATH=${PREFIX}/bin:$$PATH; \
|
1996-09-27 02:26:41 +00: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 05:25:10 +00:00
|
|
|
umask 022; \
|
1999-08-28 02:42:41 +00:00
|
|
|
${RM} -rf FreeBSD2; \
|
1996-11-12 02:19:40 +00:00
|
|
|
${MKDIR} FreeBSD2; \
|
1996-09-27 02:26:41 +00: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
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Rebuilding and shipping m3configvars with correct pathnames"
|
1996-10-29 23:17:19 +00:00
|
|
|
@cd ${WRKSRC}/m3/m3configvars; \
|
1996-03-20 22:10:19 +00: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 05:25:10 +00:00
|
|
|
umask 022; \
|
1999-08-28 02:42:41 +00:00
|
|
|
${RM} -rf FreeBSD2; \
|
1996-03-20 22:10:19 +00:00
|
|
|
m3build; \
|
1996-10-29 23:17:19 +00:00
|
|
|
m3ship
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Installing copyright notice"
|
1997-03-28 04:38:47 +00:00
|
|
|
@if [ ! -d ${PREFIX}/share/modula-3 ]; then \
|
|
|
|
${MKDIR} ${PREFIX}/share/modula-3; \
|
1999-08-22 19:01:07 +00:00
|
|
|
${CHMOD} 755 ${PREFIX}/share/modula-3; \
|
1997-03-28 04:38:47 +00:00
|
|
|
fi
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/m3/src/COPYRIGHT ${PREFIX}/share/modula-3
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Stripping executables"
|
1996-09-27 02:26:41 +00:00
|
|
|
@cd ${temp_prefix}; \
|
1999-01-28 05:39:19 +00:00
|
|
|
find bin -type f ! -name recordheap |\
|
|
|
|
(cd ${PREFIX}; xargs ${SH} ${SCRIPTDIR}/maybe-strip)
|
1996-09-27 02:26:41 +00:00
|
|
|
@cd ${PREFIX}/lib/m3/FreeBSD2; strip m3 m3cgc1 m3mkdir
|
1996-11-01 20:27:23 +00:00
|
|
|
@cd ${PREFIX}/bin; \
|
1999-08-28 01:58:05 +00:00
|
|
|
${LN} -f m3build m3build-${major}
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Fixing file permissions"
|
1996-10-29 23:17:19 +00:00
|
|
|
@cd ${PREFIX}; \
|
1999-08-28 02:17:34 +00:00
|
|
|
${SED} -e "/^@/d" -e "s/\.gz$$//" ${PLIST}.real |\
|
1999-08-22 19:01:07 +00:00
|
|
|
xargs ${CHOWN} ${BINOWN}.${BINGRP}; \
|
1999-08-28 02:17:34 +00:00
|
|
|
${SED} -e "/^@/d" -e "s/\.gz$$//" ${PLIST}.real |\
|
1999-08-22 19:01:07 +00:00
|
|
|
xargs ${CHMOD} go=u-w; \
|
|
|
|
find -X lib/m3 -type d | xargs ${CHOWN} ${BINOWN}.${BINGRP}; \
|
|
|
|
find -X lib/m3 -type d | xargs ${CHMOD} 755
|
1999-08-27 22:30:39 +00:00
|
|
|
@${ECHO_MSG} "Running ldconfig"
|
1998-09-18 01:02:04 +00:00
|
|
|
@${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib/m3/FreeBSD2
|
1996-03-20 22:10:19 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|