# $Id: Portfile 43613 2008-12-12 11:36:30Z ryandesign@macports.org $ PortSystem 1.0 name squeak version 3.10 categories lang squeak maintainers nomaintainer description Full, portable, Smalltalk-80 system long_description \ Squeak is a full-featured implementation of the Smalltalk programming \ language and environment based on (and largely compatible with) the \ original Smalltalk-80 system. Squeak has very powerful 2- and 3-D \ graphics, sound, video, MIDI, animation and other multimedia \ capabilities -- and one of the most impressive development \ environments ever created. It also includes a customisable framework \ for creating dynamic HTTP servers and interactively extensible Web \ sites. The entire Squeak system is open source software, distributed \ freely with a liberal license. platforms darwin homepage http://www.squeakvm.org/unix/ set squeak_vm_version ${version}-1 set squeak_img_version ${version} set squeak_short_vrsn [strsed ${version} {g/\.//}] set squeak_patch_no 7159 set squeak_vm_src Squeak-${squeak_vm_version}.src.tar set squeak_img_name Squeak${squeak_img_version}-${squeak_patch_no}-basic set squeak_img ${squeak_img_name}.image set squeak_img_changes ${squeak_img_name}.changes set squeak_img_src ${squeak_img_name}.zip master_sites http://www.squeakvm.org/unix/release/ \ ftp://ftp.squeak.org/${squeak_img_version}/unix-linux \ ftp://ftp.squeak.org/${squeak_img_version}/ distname Squeak-${squeak_img_version} distfiles ${squeak_vm_src}.gz ${squeak_img_src} checksums ${squeak_vm_src}.gz \ md5 7fbac029115831d18422f3079dbb0444 \ sha1 6b7ab071bcf78318a0fead94ff89d1557a877c77 \ rmd160 be67239e47219727d7ea87c75a245d2f7173c3aa \ ${squeak_img_src} \ md5 212224bce3b84338df24d0a5fee069f8 \ sha1 6ffbd29c12532eeb5b132840c5bc3b8c4c2a2c07 \ rmd160 b33e917d27ae62ad84e781eb68e5ae8400e24f31 default_variants +quartz extract.only ${squeak_vm_src}.gz post-extract { system "cd ${workpath} && mv Squeak-${squeak_vm_version} Squeak-${squeak_img_version}" file mkdir ${worksrcpath}/build # should do that but requires to rerun autoconf, I prefer to just patch inisqueak instead # reinplace "s|imgdir=`eval echo \${libdir}/squeak`|imgdir=`eval echo \${datadir}`|" ${worksrcpath}/platforms/unix/config/configure.ac # reinplace "s|plgdir=`eval echo \${imgdir}/\${VM_VERSION}`|plgdir=`eval echo \${libdir}/squeak/\${VM_VERSION}|" ${worksrcpath}/platforms/unix/config/configure.ac } configure.cmd ../platforms/unix/config/configure configure.dir ${worksrcpath}/build configure.args --libdir=${prefix}/lib \ --mandir=${prefix}/share/man \ --without-quartz --without-x build.dir ${worksrcpath}/build build.type gnu destroot.destdir ROOT=${destroot} post-destroot { set unzip "[binaryInPath "unzip"] -o" set gzip "[binaryInPath "gzip"] -f" set datadir ${prefix}/share/squeak # Have inisqueak look at the right place reinplace "s|MAJOR=3|MAJOR=${squeak_short_vrsn}|" ${worksrcpath}/build/inisqueak reinplace "s|imgdir=${prefix}/lib/squeak|imgdir=${datadir}|" ${worksrcpath}/build/inisqueak # Install inisqueak xinstall -m 755 ${worksrcpath}/build/inisqueak \ ${destroot}${prefix}/bin/ # fix bad doc install path (should use --docdir or --datarootdir during configure) xinstall -d ${destroot}${datadir} move ${destroot}${prefix}/doc ${destroot}${prefix}/share # Recompress and install the default image system "cd ${worksrcpath} && ${unzip} ${distpath}/${squeak_img_src}" system "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img}" system "cd ${worksrcpath} && ${gzip} ${squeak_img_name}/${squeak_img_changes}" xinstall -d ${destroot}${datadir} xinstall -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img}.gz \ ${destroot}${datadir} xinstall -m 644 ${worksrcpath}/${squeak_img_name}/${squeak_img_changes}.gz \ ${destroot}${datadir} xinstall -m 644 ${worksrcpath}/${squeak_img_name}/WelcomeSqueak${squeak_short_vrsn} \ ${destroot}${datadir} xinstall -m 644 ${worksrcpath}/${squeak_img_name}/SqueakV${squeak_short_vrsn}.sources \ ${destroot}${datadir} # Link compressed image and changes system "cd ${destroot}${datadir} && ln -s ${squeak_img}.gz squeak.image.gz" system "cd ${destroot}${datadir} && ln -s ${squeak_img_changes}.gz squeak.changes.gz" } variant quartz { configure.args-delete --without-quartz configure.args-append --with-quartz } variant x11 { depends_lib-append lib:libX11:XFree86 configure.args-delete --without-x configure.args-append --with-x }