source: trunk/dports/lang/squeak/Portfile

Last change on this file was 114325, checked in by ryandesign@…, 4 years ago

use eq and ne instead of == and != when comparing ${os.platform} and ${os.subplatform}

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 114325 2013-12-05 09:20:31Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                squeak
7version             3.9
8revision            1
9categories          lang
10license             MIT
11maintainers         nomaintainer
12description         Full, portable, Smalltalk-80 system
13long_description    Squeak is a full-featured implementation of the \
14                    Smalltalk programming language and environment \
15                    based on (and largely compatible with) the \
16                    original Smalltalk-80 system.  Squeak has very \
17                    powerful 2- and 3-D graphics, sound, video, MIDI, \
18                    animation and other multimedia capabilities -- and \
19                    one of the most impressive development \
20                    environments ever created.  It also includes \
21                    a customisable framework for creating dynamic HTTP \
22                    servers and interactively extensible Web sites. \
23                    The entire Squeak system is open source software, \
24                    distributed freely with a liberal license.
25platforms           darwin
26homepage            http://www.squeak.org
27
28set squeak_vm_version 3.9-8
29set squeak_img_version 3.9
30set squeak_short_vrsn 39
31set squeak_patch_no 7067
32set squeak_vm_src Squeak-${squeak_vm_version}.src.tar
33set squeak_img_name Squeak${squeak_img_version}-final-${squeak_patch_no}
34set squeak_img ${squeak_img_name}.image
35set squeak_img_changes ${squeak_img_name}.changes
36set squeak_img_src ${squeak_img_name}.zip
37
38master_sites        http://www.squeakvm.org/unix/release/ \
39                    ftp://ftp.squeak.org/3.8/unix-linux \
40                    ftp://ftp.squeak.org/${squeak_img_version}/
41
42distname            Squeak-${squeak_img_version}
43distfiles           ${squeak_vm_src}.gz ${squeak_img_src}
44
45checksums           ${squeak_vm_src}.gz md5 645ef7e321c61601c9c70d94fa9417e4 \
46                    ${squeak_img_src} md5 30d991c418be1cd9c5d05fb87dea2f19
47
48extract.only        ${squeak_vm_src}.gz
49post-extract {
50    system "cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}"
51    file mkdir ${worksrcpath}/build
52    # should do that but requires to rerun autoconf, I prefer to just patch inisqueak instead
53    # reinplace "s|imgdir=`eval echo \${libdir}/squeak`|imgdir=`eval echo \${datadir}`|" ${worksrcpath}/platforms/unix/config/configure.ac
54    # reinplace "s|plgdir=`eval echo \${imgdir}/\${VM_VERSION}`|plgdir=`eval echo \${libdir}/squeak/\${VM_VERSION}|" ${worksrcpath}/platforms/unix/config/configure.ac
55}
56
57configure.cmd       ../platforms/unix/config/configure
58configure.dir       ${worksrcpath}/build
59configure.args      --libdir=${prefix}/lib \
60                    --mandir=${prefix}/share/man \
61                    --without-quartz --without-x
62
63build.dir           ${worksrcpath}/build
64build.type          gnu
65
66destroot.destdir    ROOT=${destroot}
67
68post-destroot {
69    set unzip "[binaryInPath "unzip"] -o"
70    set gzip "[binaryInPath "gzip"] -f"
71   
72    set datadir ${prefix}/share/squeak
73   
74    # Have inisqueak look at the right place
75    reinplace "s|MAJOR=3|MAJOR=${squeak_short_vrsn}|" ${worksrcpath}/build/inisqueak
76    reinplace "s|imgdir=${prefix}/lib/squeak|imgdir=${datadir}|" ${worksrcpath}/build/inisqueak
77
78    # Install inisqueak
79    xinstall -m 755 ${worksrcpath}/build/inisqueak ${destroot}${prefix}/bin/
80   
81    # fix bad doc install path (should use --docdir or --datarootdir during configure)
82    xinstall -d ${destroot}${datadir}
83    move ${destroot}${prefix}/doc ${destroot}${prefix}/share
84   
85    # Recompress and install the default image
86    system "cd ${worksrcpath} && ${unzip} ${distpath}/${squeak_img_src}"
87    system "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img}"
88    system "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img_changes}"
89    xinstall -d ${destroot}${datadir}
90    xinstall -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img}.gz \
91        ${destroot}${datadir}
92    xinstall -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes}.gz \
93        ${destroot}${datadir}
94    xinstall -m 644 ${worksrcpath}/${squeak_img_name}/WelcomeSqueak${squeak_short_vrsn} \
95        ${destroot}${datadir}
96    xinstall -m 644 ${worksrcpath}/${squeak_img_name}/SqueakV${squeak_short_vrsn}.sources \
97        ${destroot}${datadir}
98
99    # Link compressed image and changes
100    system "cd ${destroot}${datadir} && ln -s ${squeak_img}.gz squeak.image.gz"
101    system "cd ${destroot}${datadir} && ln -s ${squeak_img_changes}.gz squeak.changes.gz"
102}
103
104# "quartz" support uses NSQuickDrawView
105if {${os.subplatform} eq "macosx" &&
106    ((![variant_isset universal] && ![string match *64 $build_arch]) ||
107     ([variant_isset universal] && ![string match *64* $universal_archs]))
108} then {
109    variant quartz {
110        configure.args-delete   --without-quartz
111        configure.args-append   --with-quartz
112    }
113
114    default_variants    +quartz
115}
116
117variant x11 {
118        depends_lib-append      port:mesa \
119                                port:xorg-libsm
120        configure.args-delete   --without-x
121        configure.args-append   --with-x
122}
Note: See TracBrowser for help on using the repository browser.