diff options
author | jdp <jdp@FreeBSD.org> | 1996-09-27 10:26:41 +0800 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1996-09-27 10:26:41 +0800 |
commit | ed193c1b46bfdb2ed704069cf4e798c45f8c61c7 (patch) | |
tree | 2ce75f303560b19923c4c3fe82cb28c90ce0f772 /lang | |
parent | 8cbdbf6e12caa9bf8bf5630dd45d5e738c4da1a2 (diff) | |
download | freebsd-ports-gnome-ed193c1b46bfdb2ed704069cf4e798c45f8c61c7.tar.gz freebsd-ports-gnome-ed193c1b46bfdb2ed704069cf4e798c45f8c61c7.tar.zst freebsd-ports-gnome-ed193c1b46bfdb2ed704069cf4e798c45f8c61c7.zip |
Update to new DEC SRC release 3.6.
Use new custom distfiles which are MUCH smaller than the ones from
DEC.
Use the gcc-2.7.2.1 sources on the system if they are found in
/usr/src/contrib, to avoid having to fetch that distfile.
Use an existing Modula-3 compiler to bootstrap the new one, if
there happens to be one installed on the system. Again, this
eliminates the need to fetch one of the distfiles.
Update the built-in thread-safe malloc to the latest version of
phkmalloc.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/modula-3/Makefile | 154 |
1 files changed, 106 insertions, 48 deletions
diff --git a/lang/modula-3/Makefile b/lang/modula-3/Makefile index ff3ee9f9a462..1c3a355f2a99 100644 --- a/lang/modula-3/Makefile +++ b/lang/modula-3/Makefile @@ -1,23 +1,54 @@ # New ports collection makefile for: modula-3 -# Version required: 3.5.3 +# Version required: 3.6 # Date created: 18 Mar 1996 # Whom: John Polstra <jdp@polstra.com> # -# $Id: Makefile,v 1.3 1996/09/10 05:23:49 jdp Exp $ +# $Id: Makefile,v 1.4 1996/09/12 00:39:41 jdp Exp $ # -DISTNAME= modula-3-3.5.3 -PKGNAME= modula-3-3.5.3.2 +DISTNAME= modula-3-3.6 CATEGORIES+= lang -MASTER_SITES= ftp://gatekeeper.dec.com/pub/DEC/Modula-3/release-3.5.3/ -DISTFILES= boot-FreeBSD2.tar.gz m3cc.tar.gz m3.tar.gz +MASTER_SITES= ftp://freefall.FreeBSD.ORG/pub/FreeBSD/LOCAL_PORTS/ +DISTFILES= m3-fbsd-src-3.6.tar.gz m3-fbsd-m3cc-3.6.tar.gz +# Note: Depending on what is already installed on the system, the code +# below may add some more DISTFILES. MAINTAINER= jdp@polstra.com NO_WRKSUBDIR= yes -EXTRACT_BEFORE_ARGS= --exclude "*.orig" --exclude "*[-~]" -xzf -# Startup script, run an boot time +# There are two distfiles that may or may not be needed, depending on +# what is already installed on the system. First, we need an executable +# for the Modula-3 compiler, in order to compile the new compiler, which +# is written in Modula-3. Often, there will already be such an executable +# installed on the system. Second, we need many files from gcc-2.7.2.1. +# Often, we can find these in the system sources, under "/usr/src/contrib". +# +# This code tries to avoid fetching the distfiles, unless necessary. +# We look on the system to see whether the necessary files are present, +# and use those if we can. If we cannot find the needed files, we +# fetch the distfiles. + +# For the Modula-3 compiler, we look in ${PREFIX} and in /usr/local. +.ifdef PREFIX +have_boot!= /bin/sh scripts/check_files files/T.boot installed ${PREFIX} +.else +have_boot= +.endif +.if empty(have_boot) +have_boot!= /bin/sh scripts/check_files files/T.boot installed /usr/local +.endif +.if empty(have_boot) +DISTFILES+= m3-fbsd-boot-3.6.tar.gz +.endif + +# For gcc-2.7.2.1, we look in /usr/src/contrib. +have_gcc!= /bin/sh scripts/check_files files/T.gcc m3cc /usr/src/contrib +.if empty(have_gcc) +DISTFILES+= m3-fbsd-gcc-3.6.tar.gz +.endif + +# Startup script, run at boot time startup_dir= ${PREFIX}/etc/rc.d startup_script= ${startup_dir}/m3.sh @@ -30,34 +61,55 @@ temp_prefix= ${WRKDIR}/installed # Some parts of the system depend on absolute pathnames into the # installed tree. Those parts have to be built after we have moved # the tree to its final resting place. -late_builds= m3configvars llscan +late_builds= m3configvars post-extract: - @cd ${WRKSRC}/boot-FreeBSD2; ln -sf ../m3cc . - -# Make the effects of the patches available to the bootstrap compiler too. -post-patch: - @cd ${WRKSRC}/boot-FreeBSD2/quake/src; \ - ln -sf ../../../m3/quake/src/utils.c . - @cd ${WRKSRC}/boot-FreeBSD2/m3core/FreeBSD2; \ - ln -sf ../../../m3/m3core/src/runtime/FreeBSD2/RTHeapDepC.c . - @cd ${WRKSRC}/boot-FreeBSD2/m3build/templates; \ - ln -sf ../../../m3/m3build/templates/FreeBSD2 .; \ - ln -sf ../../../m3/m3build/templates/PLATFORMS . + @${DO_NADA} +.if !empty(have_boot) + @echo "Copying bootstrap modula-3 compiler from ${have_boot}" + @/bin/sh ${SCRIPTDIR}/copy_files ${FILESDIR}/T.boot installed \ + ${have_boot} ${WRKDIR} +.endif +.if !empty(have_gcc) + @echo "Copying gcc sources from ${have_gcc}" + @/bin/sh ${SCRIPTDIR}/copy_files ${FILESDIR}/T.gcc m3cc \ + ${have_gcc} ${WRKDIR} +.endif do-build: - @test -d ${temp_prefix} || mkdir -p ${temp_prefix} - @echo "Building bootstrap compiler" - @cd ${WRKSRC}/boot-FreeBSD2; umask 022; ./m3boot - @echo "Shipping bootstrap compiler" - @cd ${WRKSRC}/boot-FreeBSD2; umask 022; ./m3ship - @echo "Building and shipping the rest of the system" + @test -d ${temp_prefix}/bin || mkdir -p ${temp_prefix}/bin + @test -d ${temp_prefix}/man/man1 || mkdir -p ${temp_prefix}/man/man1 + @test -d ${temp_prefix}/lib/m3/pkg/m3build/templates || \ + mkdir -p ${temp_prefix}/lib/m3/pkg/m3build/templates + @echo "++++++++++ quake ++++++++++" + @test -d ${WRKSRC}/m3/quake/FreeBSD2 || \ + mkdir -p ${WRKSRC}/m3/quake/FreeBSD2 + @cd ${WRKSRC}/m3/quake/FreeBSD2; \ + make -f ../src/makefile TARGET=FreeBSD2 COPT=-O CDEBUG= ; \ + cp -p quake ${temp_prefix}/bin; \ + cp -p ../src/quake.1 ${temp_prefix}/man/man1 + @echo "++++++++++ m3build ++++++++++" + @cd ${WRKSRC}/m3/m3build; \ + PATH=${temp_prefix}/bin:$$PATH ./build FreeBSD2; \ + cp -p FreeBSD2/m3build FreeBSD2/m3ship FreeBSD2/m3where \ + ${temp_prefix}/bin; \ + cp -p FreeBSD2/m3mkdir ${temp_prefix}/lib/m3/FreeBSD2; \ + cp -p templates/CLEANUP templates/COMMON templates/COMMON.BOOT \ + templates/FreeBSD2 templates/PLATFORMS templates/POSIX \ + ${temp_prefix}/lib/m3/pkg/m3build/templates; \ + cp -p FreeBSD2/m3build.1 FreeBSD2/m3ship.1 FreeBSD2/m3where.1 \ + ${temp_prefix}/man/man1 + @echo "++++++++++ m3cc ++++++++++" + @test -d ${WRKSRC}/m3cc/FreeBSD2 || mkdir -p ${WRKSRC}/m3cc/FreeBSD2 + @cd ${WRKSRC}/m3cc/FreeBSD2; \ + ../gcc/configure i486-unknown-freebsd; \ + make m3cgc1 CC=cc CFLAGS=-O; \ + cp -p m3cgc1 ${temp_prefix}/lib/m3/FreeBSD2 + @echo "++++++++++ everything else ++++++++++" @cd ${WRKSRC}/m3; \ LD_LIBRARY_PATH=${temp_prefix}/lib/m3/FreeBSD2:$$LD_LIBRARY_PATH; \ - export LD_LIBRARY_PATH; \ PATH=${temp_prefix}/bin:$$PATH; \ - export PATH; \ - umask 022; \ + export LD_LIBRARY_PATH PATH; \ m3build pre-install: @@ -65,25 +117,32 @@ pre-install: @PREFIX=${PREFIX} /bin/sh ${PKGDIR}/INSTALL ${PKGNAME} PRE-INSTALL do-install: - @echo "Setting owner and group of installed files" + @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.*.* + @echo "Setting permissions of installed files" @/usr/sbin/chown -R ${BINOWN}.${BINGRP} ${temp_prefix}/* + @chmod -R go=u-w ${temp_prefix}/* @echo "Copying files to ${PREFIX}" @cp -R -P -p ${temp_prefix}/* ${PREFIX} @echo "Fixing absolute pathnames in installed files" - @/bin/sh scripts/fix_pathnames ${temp_prefix} ${PREFIX} + @/bin/sh ${SCRIPTDIR}/fix_pathnames ${temp_prefix} ${PREFIX} @echo "Rebuilding and shipping m3build with correct pathnames" @cd ${WRKSRC}/m3/m3build; \ LD_LIBRARY_PATH=${PREFIX}/lib/m3/FreeBSD2:$$LD_LIBRARY_PATH; \ - export LD_LIBRARY_PATH; \ PATH=${PREFIX}/bin:$$PATH; \ - export PATH; \ + export LD_LIBRARY_PATH PATH; \ umask 022; \ - m3build -T ${PREFIX}/lib/m3/pkg/m3build/templates \ - -F ${PREFIX}/lib/m3/pkg/m3build/templates/COMMON.BOOT clean; \ - m3build -T ${PREFIX}/lib/m3/pkg/m3build/templates \ - -F ${PREFIX}/lib/m3/pkg/m3build/templates/COMMON.BOOT; \ - FreeBSD2/m3ship; \ - rm -rf FreeBSD2 + rm -rf FreeBSD2; \ + mkdir FreeBSD2; \ + 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 @for i in ${late_builds}; do \ echo "Building and shipping $${i}"; \ cd ${WRKSRC}/m3/$${i}; \ @@ -92,25 +151,24 @@ do-install: PATH=${PREFIX}/bin:$$PATH; \ export PATH; \ umask 022; \ - m3build clean; \ + rm -rf FreeBSD2; \ m3build; \ m3ship; \ - rm -rf FreeBSD2; \ done @echo "Stripping executables" - @for i in `cat ${FILESDIR}/files.strip`; do \ - test ! -f ${PREFIX}/$${i} || strip ${PREFIX}/$${i}; \ - done + @cd ${temp_prefix}; \ + find bin -type f ! -name recordheap | (cd ${PREFIX}; xargs strip) + @cd ${PREFIX}/lib/m3/FreeBSD2; strip m3 m3cgc1 m3mkdir .if !defined(NOMANCOMPRESS) @echo "Compressing manual pages" - @for i in `cat ${FILESDIR}/files.compress`; do \ - test ! -f ${PREFIX}/$${i} || gzip -9nf ${PREFIX}/$${i}; \ - done + @cd ${temp_prefix}; \ + find man -type f | (cd ${PREFIX}; xargs gzip -9nf) .endif @if [ ! -f ${startup_script} ]; then \ - echo "Installing ${startup_script} file."; \ + echo "Installing ${startup_script} file"; \ test -d ${startup_dir} || mkdir -p ${startup_dir}; \ echo "#!/bin/sh" > ${startup_script}; \ + echo "echo -n ' Modula-3'" >> ${startup_script}; \ echo "/sbin/ldconfig -m ${PREFIX}/lib/m3/FreeBSD2" >> \ ${startup_script}; \ chmod 755 ${startup_script}; \ |