head	1.10;
access;
symbols
	RELEASE_4_3_0:1.9
	RELEASE_4_2_0:1.9
	RELEASE_4_1_1:1.9
	RELEASE_4_1_0:1.9
	RELEASE_3_5_0:1.9
	RELEASE_4_0_0:1.9
	RELEASE_3_4_0:1.9
	RELEASE_3_3_0:1.9
	RELEASE_3_2_0:1.9
	RELEASE_3_1_0:1.9
	RELEASE_2_2_8:1.9
	RELEASE_3_0_0:1.9
	RELEASE_2_2_7:1.8
	RELEASE_2_2_6:1.6
	RELEASE_2_2_5:1.5
	RELEASE_2_2_1:1.1.1.1
	RELEASE_2_2_2:1.2
	jdp_1_0:1.1.1.1
	JDP:1.1.1;
locks; strict;
comment	@# @;


1.10
date	2001.07.21.23.41.36;	author jdp;	state dead;
branches;
next	1.9;

1.9
date	98.09.18.01.02.02;	author jdp;	state Exp;
branches;
next	1.8;

1.8
date	98.06.06.20.32.04;	author jdp;	state Exp;
branches;
next	1.7;

1.7
date	98.04.28.22.20.35;	author jdp;	state Exp;
branches;
next	1.6;

1.6
date	98.01.17.21.12.09;	author jdp;	state Exp;
branches;
next	1.5;

1.5
date	97.07.11.05.16.43;	author jdp;	state Exp;
branches;
next	1.4;

1.4
date	97.07.04.17.31.36;	author jdp;	state Exp;
branches;
next	1.3;

1.3
date	97.06.29.20.43.28;	author jdp;	state Exp;
branches;
next	1.2;

1.2
date	97.05.09.20.45.02;	author jdp;	state Exp;
branches;
next	1.1;

1.1
date	96.10.29.23.01.51;	author jdp;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.10.29.23.01.51;	author jdp;	state Exp;
branches;
next	;


desc
@@


1.10
log
@Remove the old modula-3 and modula-3-lib ports.  They are superseded
by the pm3-* family of ports, which build a newer and better-maintained
version of Modula-3.  I have converted all ports which depended on
modula-3 to use pm3-* instead.

PR:		ports/27664 is rendered irrelevant
@
text
@Update the m3build templates for FreeBSD-2.1 and later.

--- m3/m3build/templates/COMMON.orig	Fri Feb  9 14:23:04 1996
+++ m3/m3build/templates/COMMON	Fri Oct 25 13:48:57 1996
@@@@ -998,7 +998,7 @@@@
   if HAVE_PKGTOOLS
     _install_file (src, dest, "0755", "T")
   else
-    local target = format ("%s%s%s%s%s%s%s", PKG_USE, SL, BUILD_PACKAGE,
+    local target = format ("%s%s%s%s%s%s%s", LIB_TO_PKG, SL, BUILD_PACKAGE,
                                              SL, BUILD_DIR, SL, src)
     local link = format ("%s%s%s", dest, SL, src)
     >> M3SHIP_FILE in
@


1.9
log
@Make these ports work on ELF systems.
@
text
@@


1.8
log
@By popular demand, make the modula-3 ports build successfully even
if X11 is not installed.

PR:		closes ports/4178
@
text
@a13 208
--- m3/m3build/templates/FreeBSD2.orig	Thu Jun 20 12:17:07 1996
+++ m3/m3build/templates/FreeBSD2	Sat Jun  6 10:39:25 1998
@@@@ -8,8 +8,9 @@@@
 %      Modified On Thu Apr  8 13:45:49 PDT 1993 by muller
 %
 %      Sun Nov 27 20:19:31 MET 1994 by ow
+%      Fri Feb  2 15:04:50 PST 1996 by jdp@@polstra.com
 %
-% FreeBSD 2.0 configuration (with shared library support in comments)
+% FreeBSD 2.1 and 2.2 configuration, with shared library support
 %
 
 %-------------------------------------------------- compilation environment ---
@@@@ -44,6 +45,8 @@@@
 MAN_INSTALL   = INSTALL_ROOT & "man"                % man pages
 HTML_INSTALL  = INSTALL_ROOT & "lib/m3/www"         % public hypertext
 
+WDROOT = $HOME & "/m3/pkg"		% handy default for overrides
+
 % The manual pages normally go in subdirectories man{1,...8} of
 % the MAN_INSTALL directory.  If you prefer to have them all in
 % a single section, define MAN_SECTION to be that section's name.
@@@@ -56,7 +59,12 @@@@
 LIB_USE   = LIB_INSTALL
 PKG_USE   = PKG_INSTALL
 
-readonly INSTALL_IMPLS = "TRUE"
+% This is a relative path from LIB_USE to PKG_USE, so that we can avoid
+% installing absolute symbolic links.  If you cannot support such relative
+% links, then make it the same as PKG_USE.
+LIB_TO_PKG = "../pkg"
+
+readonly INSTALL_IMPLS = ""
 % "TRUE"
 %    => save all source files during the install
 %    => makes debugging easier and browsing more fruitful
@@@@ -90,15 +98,17 @@@@
 % "import_TCP" is called from the tcp package.
 
 readonly proc import_X11R4() is
-  import_lib("Xaw",  "/usr/X386/lib")
-  import_lib("Xmu",  "/usr/X386/lib")
-  import_lib("Xext", "/usr/X386/lib")
-  import_lib("Xt",   "/usr/X386/lib")
-  import_lib("X11",  "/usr/X386/lib")
+  import_lib("Xaw",    "/usr/X11R6/lib")
+  import_lib("Xmu",    "/usr/X11R6/lib")
+  import_lib("Xt",     "/usr/X11R6/lib")
+  import_lib("SM",     "/usr/X11R6/lib")
+  import_lib("ICE",    "/usr/X11R6/lib")
+  import_lib("Xext",   "/usr/X11R6/lib")
+  import_lib("X11",    "/usr/X11R6/lib")
 end
 
 readonly proc import_Motif() is
-  import_lib("Xm",   "/usr/X386/lib")
+  import_lib("Xm",   "/usr/X11R6/lib")
 end
 
 readonly proc import_DECPEX() is
@@@@ -114,8 +124,10 @@@@
 readonly proc import_TCP() is
 end
 
-readonly PLATFORM_SUPPORTS_X      = "TRUE"
-readonly PLATFORM_SUPPORTS_MOTIF  = "TRUE"
+readonly PLATFORM_SUPPORTS_X      = (not stale ("/usr/X11R6/lib/libX11.a",
+                                                "/usr/X11R6/lib/libX11.a"))
+readonly PLATFORM_SUPPORTS_MOTIF  = (not stale ("/usr/X11R6/lib/libXm.a",
+                                                "/usr/X11R6/lib/libXm.a"))
 readonly PLATFORM_SUPPORTS_DECPEX = ""
 readonly PLATFORM_SUPPORTS_OPENGL = ""
 
@@@@ -128,9 +140,9 @@@@
 % entire function.  Note, the distributed code assumes gnuemacs version 19
 % or later.
 
-readonly proc emacs_compile (el) is
-  exec ("emacs -batch -f batch-byte-compile", el)
-end
+%readonly proc emacs_compile (el) is
+%  exec ("emacs -batch -f batch-byte-compile", el)
+%end
 
 %---------------------------------------------------- C compiler and linker ---
 % The following definitions are used to compile and link C modules.
@@@@ -142,33 +154,27 @@@@
 % The actual definitions must be kept on one line due to finicky details
 % of the bootstrap process.
 
-
-%% The versions of ar and ranlib shipped with FreeBSD 2.0
-%% definitelty do not work with the Modula-3 archives.
-%% ar sometimes complains about `too many open files' and
-%% ranlib often says `inappropriate file type for object'.
-%% I haven't looked into this further, since newer versions
-%% of the GNU binutils package work quite well. - Olaf Wagner 2/13/95
-
-
-CC = _ifdef ("CC", CC, [ "gcc" ])
+CC = _ifdef ("CC", CC, [ "cc", "-fpic" ])
 %--- C compiler with flags for compiling a single ".c" file
-% ------ FOR SHARED LIBS, add -fPIC 
 
-LINK = _ifdef ("LINK", LINK, [ "gcc" ])
+LINK = _ifdef ("LINK", LINK, [ "ld", "-e", "start", "-dc", "-dp", "/usr/lib/crt0.o" ])
 %--- C compiler with flags for linking
-% ------ FOR SHARED LIBS, add -Xlinker -Bdynamic
 
-MAKELIB = _ifdef ("MAKELIB", MAKELIB, [ "/usr/bin/ar", "cru" ])
+MAKELIB = _ifdef ("MAKELIB", MAKELIB, [ "ar", "cru" ])
 %--- program to build library archives
 
 RANLIB = _ifdef ("RANLIB", RANLIB, [ "ranlib" ])
 %--- program to index libraries
 
-ASM = _ifdef ("ASM", ASM, [ "/usr/bin/as" ])
+ASM = _ifdef ("ASM", ASM, [ "as", "-k" ])
 %--- assembler
-% ------ FOR SHARED LIBS with /usr/bin/as from the FreeBSD distribution,
-%        add -k -W
+
+BOOT_LINK = _ifdef ("BOOT_LINK", BOOT_LINK, [ "cc" ])
+%--- C compiler with flags for linking, used during the bootstrap process.
+% We have to use "cc" for the bootstrap, because the "-z2" option
+% ("libraries systematically linked with all programs") doesn't get used
+% during the bootstrap process.  If we use "ld", then the C library isn't
+% linked in.
 
 %------------------------------------------------------------- GNU variants ---
 % The two large pieces of GNU software used by the Modula-3 system
@@@@ -179,9 +185,9 @@@@
 % To use the GNU defaults for CC and CFLAGS, specify "*".
 %
 
-GNU_CC     = _ifdef ("GNU_CC",     GNU_CC,     "*")
-GNU_CFLAGS = _ifdef ("GNU_CFLAGS", GNU_CFLAGS, "*")
-GNU_MAKE   = _ifdef ("GNU_MAKE",   GNU_MAKE,   "gmake")
+GNU_CC     = _ifdef ("GNU_CC",     GNU_CC,     "cc")
+GNU_CFLAGS = _ifdef ("GNU_CFLAGS", GNU_CFLAGS, "-O")
+GNU_MAKE   = _ifdef ("GNU_MAKE",   GNU_MAKE,   "make")
 
 %-------------------------------------------------------- Modula-3 compiler ---
 % The syntax for the values passed to most of the M3_CONFIG options is
@@@@ -192,7 +198,8 @@@@
 M3 = LIB_USE & "/m3"
 
 % What are the standard flags?
-M3OPTIONS = [ "-w1", "-why", "-g" ]
+M3OPTIONS = [ "-w1", "-why", "-O" ]
+% ------ FOR DEBUGGING INFO, add "-g"
 
 M3_CONFIG = [
    "-Y1" & _pack_args (CC),
@@@@ -201,11 +208,11 @@@@
    "-Y4" & _pack_args (RANLIB),
    "-Y7" & _pack_args (ASM),
 
-   "-Y6@@" & LIB_USE & "/m3cgc1@@-quiet@@",
+   "-Y6@@" & LIB_USE & "/m3cgc1@@-quiet@@-fpic@@",
    % --- the Modula-3 IL to assembly language pass
-   % ------ FOR SHARED LIBS, add -fPIC
 
-   "-z2@@-lm@@",  % --- libraries systematically linked with all programs
+   "-z2@@-lm@@/usr/lib/libgcc.a@@-lc@@/usr/lib/libgcc.a@@",
+   % --- libraries systematically linked with all programs
 
    "-z3" & LIB_USE & SL & "report_coverage.o",
    % --- library linked in programs compiled with "-Z" coverage option
@@@@ -248,7 +255,7 @@@@
    % passes in a file and then deletes the file, unless "-keep" or
    % "-verbose" is specified.
 
-   "-zK0",
+   "-zK1",
    % --- Set the value of "-zK" to "1" if you want the m3 driver to
    %     supply -Bdynamic/-Bstatic options to the linker, "0" otherwise.
 
@@@@ -263,9 +270,9 @@@@
 
 proc build_standalone() is
    % --- reset the linker to avoid shared libraries.
-   M3_CONFIG += "-Y2@@cc@@-static@@"
    M3_CONFIG += "-Y6@@" & LIB_USE & "/m3cgc1@@-quiet@@"
-   M3_CONFIG += "-Y7@@/usr/bin/as@@"
+   M3_CONFIG += "-Y7@@as@@"
+   M3_CONFIG += "-Bstatic"
 end
 
 proc build_shared() is
@@@@ -282,7 +289,7 @@@@
 
 proc after_library_hooks(x) is
   local lib_a  = format ("lib%s.a", x)
-  local lib_so = format ("lib%s.so.1.1", x)
+  local lib_so = format ("lib%s.so.6.0", x)
   local dest = format ("%s%s%s%s%s", PKG_INSTALL, SL, BUILD_PACKAGE,
                                                       SL, BUILD_DIR)
 
@@@@ -291,7 +298,7 @@@@
       write ("missing ", lib_a, ": not building ", lib_so, CR)
     else
       if stale (lib_so, lib_a)
-        exec ("/usr/bin/ld -Bshareable -assert pure-text -o",
+        exec ("ld -Bshareable -assert pure-text -o",
                  lib_so, COMPILE_OBJECTS)
       end
       install_derived (lib_so)
@


1.7
log
@Fix an old bug in the runtime system which very rarely could cause
EFAULT to be generated on calls to open(2) or fcntl(2).

Bump the shared libraries' major version numbers to guard against
possible binary incompatibilities introduced by this fix.
@
text
@d15 1
a15 1
+++ m3/m3build/templates/FreeBSD2	Fri Oct 25 13:47:16 1996
d74 14
a87 1
@@@@ -128,9 +138,9 @@@@
d100 1
a100 1
@@@@ -142,33 +152,27 @@@@
d145 1
a145 1
@@@@ -179,9 +183,9 @@@@
d158 1
a158 1
@@@@ -192,7 +196,8 @@@@
d168 1
a168 1
@@@@ -201,11 +206,11 @@@@
d183 1
a183 1
@@@@ -248,7 +253,7 @@@@
d192 1
a192 1
@@@@ -263,9 +268,9 @@@@
d204 1
a204 1
@@@@ -282,7 +287,7 @@@@
d213 1
a213 1
@@@@ -291,7 +296,7 @@@@
@


1.6
log
@Fix all the paths in context diff headers and remove the Index
lines, since the WORTHLESS, BROKEN new version of patch ignores
them.
@
text
@d196 1
a196 1
+  local lib_so = format ("lib%s.so.5.0", x)
@


1.5
log
@Add several bugfixes.  Produce more informative messages when
segmentation violations and assertion failures occur.  Support
several system calls not supported previously.

PR:		This is part of the fix for ports/3572.
@
text
@d3 2
a4 3
Index: m3/m3build/templates/COMMON
--- COMMON.orig	Fri Feb  9 14:23:04 1996
+++ COMMON	Fri Oct 25 13:48:57 1996
d14 2
a15 3
Index: m3/m3build/templates/FreeBSD2
--- FreeBSD2.orig	Thu Jun 20 12:17:07 1996
+++ FreeBSD2	Fri Oct 25 13:47:16 1996
@


1.4
log
@I botched my previous update of the thread safe malloc, making it
not thread safe at all.  This commit repairs the damage.

This changes the minor version numbers of the Modula-3 shared
libraries.  The packages that depend on modula-3-lib will need to
be rebuilt:

    net/cvsup
    print/virtualpaper
@
text
@d198 1
a198 1
+  local lib_so = format ("lib%s.so.4.3", x)
@


1.3
log
@Update the Modula-3 runtime's thread safe malloc to PHK's latest.
This eliminates the malloc warnings brought about by the recent
merging of calloc into malloc.c in -current's libc.

This changes the minor version numbers of the Modula-3 shared
libraries.  The packages that depend on modula-3-lib will need to
be rebuilt:

	net/cvsup
	print/virtualpaper
@
text
@d198 1
a198 1
+  local lib_so = format ("lib%s.so.4.2", x)
@


1.2
log
@Add a fix for a graphics bug.
@
text
@d198 1
a198 1
+  local lib_so = format ("lib%s.so.4.1", x)
@


1.1
log
@Initial revision
@
text
@d198 1
a198 1
+  local lib_so = format ("lib%s.so.4.0", x)
@


1.1.1.1
log
@Split the Modula-3 port into two pieces, creating a new port
"modula-3-lib".  It installs only the shared libraries needed for
executing Modula-3 programs.  This saves a lot of disk space for
people who need to run Modula-3 programs but don't need to build
them.  The original "modula-3" port now depends on this one, and
uses it to install the compiler and the rest of the development
system.

Also, everything is now built with optimization.  I have been
testing this for at least a month, and haven't seen any problems
from it.  It makes the libraries and executables substantially
smaller.

This new port also includes some hooks that will make SOCKS support
possible in the near future.
@
text
@@
