summaryrefslogtreecommitdiff
path: root/lang/modula-3-lib
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1998-06-06 20:32:08 +0000
committerJohn Polstra <jdp@FreeBSD.org>1998-06-06 20:32:08 +0000
commite8b37db2f2e1d83fa7743643b81e719d8ba936ae (patch)
treeb819e52f07a062fbbfcd10689854db533918e8d3 /lang/modula-3-lib
parentFix libc shlib version. (diff)
By popular demand, make the modula-3 ports build successfully even
if X11 is not installed. PR: closes ports/4178
Notes
Notes: svn path=/head/; revision=11303
Diffstat (limited to 'lang/modula-3-lib')
-rw-r--r--lang/modula-3-lib/Makefile14
-rw-r--r--lang/modula-3-lib/files/patch-ah33
-rw-r--r--lang/modula-3-lib/files/patch-ak114
-rw-r--r--lang/modula-3-lib/pkg-plist.noX1128
4 files changed, 167 insertions, 22 deletions
diff --git a/lang/modula-3-lib/Makefile b/lang/modula-3-lib/Makefile
index f120f81adda2..90feb6cd7888 100644
--- a/lang/modula-3-lib/Makefile
+++ b/lang/modula-3-lib/Makefile
@@ -3,7 +3,7 @@
# Date created: 28 Oct 1996
# Whom: John Polstra <jdp@polstra.com>
#
-# $Id: Makefile,v 1.8 1997/07/13 18:49:22 max Exp $
+# $Id: Makefile,v 1.9 1997/07/17 15:12:48 max Exp $
#
DISTNAME= modula-3-lib-3.6
@@ -48,6 +48,14 @@ have_gcc!= /bin/sh scripts/check_files files/T.gcc m3cc /usr/src/contrib
DISTFILES+= m3-fbsd-gcc-3.6.tar.gz
.endif
+# Support building on systems with or without X11 installed. The port
+# only supports X11R6 in the standard location, so we don't bother using
+# the X11BASE macro. It's not defined yet at this point in the Makefile
+# anyway.
+.if !exists(/usr/X11R6/lib/libX11.a)
+PLIST= ${PKGDIR}/PLIST.noX11
+.endif
+
# Startup script, run at boot time
startup_dir= ${PREFIX}/etc/rc.d
startup_script= ${startup_dir}/50.m3.sh
@@ -116,10 +124,10 @@ do-install:
@echo "Installing shared libraries"
@cd ${temp_prefix}; \
umask 022; \
- grep '^lib/m3/' ${PKGDIR}/PLIST | \
+ grep '^lib/m3/' ${PLIST} | \
cpio -dump -R ${BINOWN}.${BINGRP} ${PREFIX}
@cd ${PREFIX}; \
- grep '^lib/m3/' ${PKGDIR}/PLIST | xargs chmod go=u-w; \
+ grep '^lib/m3/' ${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
@echo "Installing copyright notice"
diff --git a/lang/modula-3-lib/files/patch-ah b/lang/modula-3-lib/files/patch-ah
index 01c66c6a37e8..98878bedaa92 100644
--- a/lang/modula-3-lib/files/patch-ah
+++ b/lang/modula-3-lib/files/patch-ah
@@ -12,7 +12,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
local link = format ("%s%s%s", dest, SL, src)
>> M3SHIP_FILE in
--- m3/m3build/templates/FreeBSD2.orig Thu Jun 20 12:17:07 1996
-+++ m3/m3build/templates/FreeBSD2 Fri Oct 25 13:47:16 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
%
@@ -71,7 +71,20 @@ Update the m3build templates for FreeBSD-2.1 and later.
end
readonly proc import_DECPEX() is
-@@ -128,9 +138,9 @@
+@@ -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.
@@ -84,7 +97,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
%---------------------------------------------------- C compiler and linker ---
% The following definitions are used to compile and link C modules.
-@@ -142,33 +152,27 @@
+@@ -142,33 +154,27 @@
% The actual definitions must be kept on one line due to finicky details
% of the bootstrap process.
@@ -129,7 +142,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
%------------------------------------------------------------- GNU variants ---
% The two large pieces of GNU software used by the Modula-3 system
-@@ -179,9 +183,9 @@
+@@ -179,9 +185,9 @@
% To use the GNU defaults for CC and CFLAGS, specify "*".
%
@@ -142,7 +155,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
%-------------------------------------------------------- Modula-3 compiler ---
% The syntax for the values passed to most of the M3_CONFIG options is
-@@ -192,7 +196,8 @@
+@@ -192,7 +198,8 @@
M3 = LIB_USE & "/m3"
% What are the standard flags?
@@ -152,7 +165,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
M3_CONFIG = [
"-Y1" & _pack_args (CC),
-@@ -201,11 +206,11 @@
+@@ -201,11 +208,11 @@
"-Y4" & _pack_args (RANLIB),
"-Y7" & _pack_args (ASM),
@@ -167,7 +180,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
"-z3" & LIB_USE & SL & "report_coverage.o",
% --- library linked in programs compiled with "-Z" coverage option
-@@ -248,7 +253,7 @@
+@@ -248,7 +255,7 @@
% passes in a file and then deletes the file, unless "-keep" or
% "-verbose" is specified.
@@ -176,7 +189,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
% --- 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 +268,9 @@
+@@ -263,9 +270,9 @@
proc build_standalone() is
% --- reset the linker to avoid shared libraries.
@@ -188,7 +201,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
end
proc build_shared() is
-@@ -282,7 +287,7 @@
+@@ -282,7 +289,7 @@
proc after_library_hooks(x) is
local lib_a = format ("lib%s.a", x)
@@ -197,7 +210,7 @@ Update the m3build templates for FreeBSD-2.1 and later.
local dest = format ("%s%s%s%s%s", PKG_INSTALL, SL, BUILD_PACKAGE,
SL, BUILD_DIR)
-@@ -291,7 +296,7 @@
+@@ -291,7 +298,7 @@
write ("missing ", lib_a, ": not building ", lib_so, CR)
else
if stale (lib_so, lib_a)
diff --git a/lang/modula-3-lib/files/patch-ak b/lang/modula-3-lib/files/patch-ak
index e969caf10aea..002c8726e6e7 100644
--- a/lang/modula-3-lib/files/patch-ak
+++ b/lang/modula-3-lib/files/patch-ak
@@ -2,7 +2,7 @@ Changes to what is built by default in the FreeBSD port.
===================================================================
--- m3/src/m3makefile.orig Tue Sep 17 16:47:59 1996
-+++ m3/src/m3makefile Wed Sep 25 17:14:37 1996
++++ m3/src/m3makefile Sat Jun 6 10:54:04 1998
@@ -83,6 +83,12 @@
% requires:
BuildChunk ("m3core")
@@ -140,7 +140,15 @@ Changes to what is built by default in the FreeBSD port.
end
%--- ui --- library -------------------------------------------------
-@@ -316,18 +322,18 @@
+@@ -311,23 +317,25 @@
+ % by most graphical applications.
+ % requires: X11R4 and tcp on POSIX; libm3 on WIN32
+ % Note: The WIN32 version is still VERY buggy
+-BuildChunk ("ui")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("ui")
++end
+
%--- bicycle --- library -------------------------------------------------
% bicycle is a library of playing card images.
% requires: ui
@@ -162,7 +170,7 @@ Changes to what is built by default in the FreeBSD port.
%--- m3tools --- library -------------------------------------------------
% a simple Modula-3 scanner, needed by m3tohtml and m3browser
-@@ -336,12 +342,12 @@
+@@ -336,12 +344,12 @@
%--- m3tohtml --- utility -------------------------------------------------
% a program to convert batches of Modula-3 source to interconnected HTML
@@ -177,7 +185,15 @@ Changes to what is built by default in the FreeBSD port.
if equal (OS_TYPE, "POSIX")
BuildChunk ("m3browser")
end
-@@ -370,7 +376,7 @@
+@@ -365,17 +373,19 @@
+ % a large collection of useful window widgets, needed by many of the
+ % following libraries and programs.
+ % requires: ui
+-BuildChunk ("vbtkit")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("vbtkit")
++end
+
%--- fours --- game -------------------------------------------------
% a collection of Modula-3 variants of the PC game, tetris.
% requires: vbtkit
@@ -186,7 +202,87 @@ Changes to what is built by default in the FreeBSD port.
%--- showheap --- utility -------------------------------------------------
% a program to graphically display in real-time the state of each heap page.
-@@ -442,37 +448,37 @@
+ % requires: vbtkit
+-if equal (OS_TYPE, "POSIX")
++if equal (OS_TYPE, "POSIX") and PLATFORM_SUPPORTS_X
+ BuildChunk ("showheap")
+ end
+
+@@ -389,90 +399,102 @@
+ %--- replayheap --- utility -------------------------------------------------
+ % a program to graphically display the log captured by "recordheap"
+ % requires: vbtkit
+-if equal (OS_TYPE, "POSIX")
++if equal (OS_TYPE, "POSIX") and PLATFORM_SUPPORTS_X
+ BuildChunk ("replayheap")
+ end
+
+ %--- shownew --- utility -------------------------------------------------
+ % a program to graphically display in real-time per-type allocations
+ % requires: vbtkit
+-if equal (OS_TYPE, "POSIX")
++if equal (OS_TYPE, "POSIX") and PLATFORM_SUPPORTS_X
+ BuildChunk ("shownew")
+ end
+
+ %--- showthread --- utility -------------------------------------------------
+ % a program to graphically display in real-time the state of each thread.
+ % requires: vbtkit
+-if equal (OS_TYPE, "POSIX")
++if equal (OS_TYPE, "POSIX") and PLATFORM_SUPPORTS_X
+ BuildChunk ("showthread")
+ end
+
+ %--- images --- library -------------------------------------------------
+ % support for displaying bitmap images
+ % requires: ui
+-BuildChunk ("images")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("images")
++end
+
+ %--- jvideo --- library -------------------------------------------------
+ % a low-level interface to the J-video hardware, needed by videovbt
+ % requires: tcp
+-BuildChunk ("jvideo")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("jvideo")
++end
+
+ %--- videovbt --- library -------------------------------------------------
+ % a window widget that displays live video images
+ % requires: jvideo, ui
+-BuildChunk ("videovbt")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("videovbt")
++end
+
+ %--- formsvbtpixmaps --- library -------------------------------------------
+ % misc. bitmaps, cursors and stuff used by formsvbt
+ % requires: libm3, m3bundle
+-BuildChunk ("formsvbtpixmaps")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("formsvbtpixmaps")
++end
+
+ %--- formsvbt --- library -------------------------------------------------
+ % a high-level language based on S-expressions that makes it easy
+ % to assemble VBTs (windows) using the TeX metaphors of boxes and
+ % glue.
+ % requires: vbtkit, videovbt, formsvbtpixmaps, web
+-BuildChunk ("formsvbt")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("formsvbt")
++end
+
+ %--- formsedit --- utility -------------------------------------------------
+ % a 1-1/2 view GUI editor for FormsVBT expressions
+ % requires: formsvbt
+-BuildChunk ("formsedit")
++if PLATFORM_SUPPORTS_X
++ BuildChunk ("formsedit")
++end
+
%--- fisheye --- demo -------------------------------------------------
% a demo of "fisheye" views for graph browsing
% requires: formsvbt
@@ -231,7 +327,7 @@ Changes to what is built by default in the FreeBSD port.
%--- anim3D --- library -------------------------------------------
% a collection of 3D animation widgets
-@@ -480,118 +486,118 @@
+@@ -480,118 +502,118 @@
% X11R4 and PEX
% X11R4 and OpenGL
% soon: OpenGL and Windows NT
@@ -373,7 +469,7 @@ Changes to what is built by default in the FreeBSD port.
end
%
-@@ -644,37 +650,40 @@
+@@ -644,37 +666,40 @@
%--- visualobliq --- demo -------------------------------------------
% a prototype of an easy-to-use distributed programming environment
% requires: formsvbt, obliq, obliqlibui, obliqlibm3
@@ -420,7 +516,7 @@ Changes to what is built by default in the FreeBSD port.
end
%--- gnuemacs --- library -------------------------------------------------
-@@ -682,67 +691,67 @@
+@@ -682,67 +707,67 @@
% also a program to build Modula-3 tags
% requires:
if equal (OS_TYPE, "POSIX")
@@ -500,7 +596,7 @@ Changes to what is built by default in the FreeBSD port.
%--- tcpextras --- library -------------------------------------------------
% Additions to the tcp library
-@@ -752,9 +761,9 @@
+@@ -752,9 +777,9 @@
%--- http --- library -------------------------------------------------
% library for hypertext transfer protocol (HTTP)
% requires: tcpextras
diff --git a/lang/modula-3-lib/pkg-plist.noX11 b/lang/modula-3-lib/pkg-plist.noX11
new file mode 100644
index 000000000000..c8c45304362d
--- /dev/null
+++ b/lang/modula-3-lib/pkg-plist.noX11
@@ -0,0 +1,28 @@
+etc/rc.d/50.m3.sh
+lib/m3/FreeBSD2/libDiGraph.so.6.0
+lib/m3/FreeBSD2/libGeometry.so.6.0
+lib/m3/FreeBSD2/libTempFiles.so.6.0
+lib/m3/FreeBSD2/libm3.so.6.0
+lib/m3/FreeBSD2/libm3core.so.6.0
+lib/m3/FreeBSD2/libm3parseparams.so.6.0
+lib/m3/FreeBSD2/libm3tcp.so.6.0
+lib/m3/FreeBSD2/libm3tools.so.6.0
+lib/m3/FreeBSD2/libset.so.6.0
+lib/m3/FreeBSD2/libtable-list.so.6.0
+lib/m3/FreeBSD2/libtcpextras.so.6.0
+lib/m3/FreeBSD2/libweb.so.6.0
+lib/m3/pkg/digraph/FreeBSD2/libDiGraph.so.6.0
+lib/m3/pkg/libm3/FreeBSD2/libm3.so.6.0
+lib/m3/pkg/m3core/FreeBSD2/libm3core.so.6.0
+lib/m3/pkg/m3tools/FreeBSD2/libm3tools.so.6.0
+lib/m3/pkg/parseparams/FreeBSD2/libm3parseparams.so.6.0
+lib/m3/pkg/realgeometry/FreeBSD2/libGeometry.so.6.0
+lib/m3/pkg/set/FreeBSD2/libset.so.6.0
+lib/m3/pkg/table-list/FreeBSD2/libtable-list.so.6.0
+lib/m3/pkg/tcp/FreeBSD2/libm3tcp.so.6.0
+lib/m3/pkg/tcpextras/FreeBSD2/libtcpextras.so.6.0
+lib/m3/pkg/tempfiles/FreeBSD2/libTempFiles.so.6.0
+lib/m3/pkg/web/FreeBSD2/libweb.so.6.0
+share/modula-3-lib/COPYRIGHT
+@exec /sbin/ldconfig -m %D/lib/m3/FreeBSD2
+@unexec /sbin/ldconfig -R