-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathmosml.spec
149 lines (123 loc) · 4.25 KB
/
mosml.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Distribution: IT University of Copenhagen
Vendor: IT University of Copenhagen
Packager: Jakob Lichtenberg <jl@itu.dk>
URL: http://www.dina.kvl.dk/~sestoft/mosml.html
Summary: Moscow ML
Name: mosml
Version: 2.00
Release: 1
Source: ftp://ftp.dina.kvl.dk/pub/mosml/mos20src.tar.gz
Patch: mosml_dynlibs_setup.patch
Patch1: mosml_bindir.patch
Patch2: mosml_ccc.patch
Copyright: GPL
Group: Development/Languages
BuildRoot: /tmp/%{name}-%{version}-root
%description
Moscow ML provides a light-weight implementation of full Standard ML,
including Modules and some extensions. Standard ML is a strict
functional language widely used in teaching and research.
Moscow ML is based on the Caml Light system, which gives fast
compilation and modest storage consumption.
* The full SML Modules language (structures, signatures, and functors)
is now supported, thanks to Claudio Russo.
* Also, several extensions to the SML Modules language are provided:
- higher-order functors: functors may be defined within structures
and functors
- first-class modules: structures and functors may be packed and
then handled as Core language values, which may then be unpacked
as structures or functors again
- recursive modules: signatures and structures may be recursively
defined
* Despite that improvements, Moscow ML remains backwards compatible.
* Value polymorphism has become friendlier: non-generalizable free
type variables are left free, and become instantiated (once only)
when the bound variable is used
* Added facilities for creating and communicating with subprocesses
(structure Unix and Signal from SML Basis Library).
* Added facilities for efficient functional generation of HTML code
(structure Msp); also supports the writing of ML Server Page scripts.
* Added facilities setting and accessing `cookies' in CGI scripts
(structure Mosmlcookie), thanks to Hans Molin, Uppsala, Sweden.
* The Gdimage structure now produces PNG images (using Thomas
Boutell's gd library).
Moscow ML version 2.00 is available from
http://www.dina.kvl.dk/~sestoft/mosml.html
This RPM contains the following dynlibs:
* Gdbm
* Mysql
* Postgres
* Regex
* Socket
* Unix
The following dynlibs are not build:
* Gdimage
* IntInf
* interface
* crypt
%prep
%setup -n mosml
%patch
%patch1
# Comment in to use Alpha Compaq C Compiler, ccc:
# %patch2
%build
cd src
make MOSMLHOME=${RPM_BUILD_ROOT}/usr/mosml world
%install
rm -rf ${RPM_BUILD_ROOT}
cd src
make MOSMLHOME=${RPM_BUILD_ROOT}/usr/mosml install
cd dynlibs
make MOSMLHOME=${RPM_BUILD_ROOT}/usr/mosml
make MOSMLHOME=${RPM_BUILD_ROOT}/usr/mosml install
cd ..
cd ..
cp -a tools/Makefile.stub ${RPM_BUILD_ROOT}/usr/mosml/tools
# Put installed doc in an rpm manner
cp -a ${RPM_BUILD_ROOT}/usr/mosml/doc .
rm -rf ${RPM_BUILD_ROOT}/usr/mosml/doc
# Link binaries to the standard search path /usr/bin
mkdir -p ${RPM_BUILD_ROOT}/usr/bin
cd ${RPM_BUILD_ROOT}/usr/mosml/bin
for x in *
do
ln -sf ../mosml/bin/$x ${RPM_BUILD_ROOT}/usr/bin/$x
done
# Alternatively, you can move bin out of mosml:
# mkdir -p ${RPM_BUILD_ROOT}/usr
# mv ${RPM_BUILD_ROOT}/usr/mosml/bin ${RPM_BUILD_ROOT}/usr/bin
# dynamic load path is extended to include /usr/mosml/lib,
# Instead you can move libraries to the standard dynamic loadpath /usr/lib
# mkdir -p ${RPM_BUILD_ROOT}/usr/lib
# cd ${RPM_BUILD_ROOT}/usr/mosml/lib
# for x in lib*.so
# do
# mv ${RPM_BUILD_ROOT}/usr/mosml/lib/${x} ${RPM_BUILD_ROOT}/usr/lib/${x}
# # to link instead: ln -sf ../mosml/lib/${x} ${RPM_BUILD_ROOT}/usr/lib/${x}
# done
# Fix minor install problem:
rm -f ${RPM_BUILD_ROOT}/usr/mosml/lib/camlrunm
ln -s ../bin/camlrunm ${RPM_BUILD_ROOT}/usr/mosml/lib/camlrunm
%clean
rm -rf ${RPM_BUILD_ROOT}
%post
if ! grep '^/usr/mosml/lib$' /etc/ld.so.conf > /dev/null 2>&1; then
echo "/usr/mosml/lib" >> /etc/ld.so.conf
fi
/sbin/ldconfig
%postun
if [ "$1" = "0" ]; then
grep -v '^/usr/mosml/lib$' /etc/ld.so.conf > /etc/ld.so.conf.new 2>/dev/null
cat /etc/ld.so.conf.new > /etc/ld.so.conf
rm -f /etc/ld.so.conf.new
fi
/sbin/ldconfig
%files
%defattr(-,root,root)
/usr/mosml
/usr/bin/*
%doc README copyrght doc/* examples
%changelog
* Fri Jun 30 2000 Jakob Lichtenberg <jl@itu.dk>
- initial release