# -*- mode: tcl; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup legacysupport 1.1 PortGroup compiler_blacklist_versions 1.0 name sbcl # Note to maintainers: # # Please bump the revisions of math/maxima, math/fricas and possibly # math/maxima-devel when this port changes. version 2.4.4 revision 0 epoch 1 categories lang license BSD maintainers {easieste @easye} {@catap korins.ky:kirill} openmaintainer description The Steel Bank Common Lisp system long_description \ Steel Bank Common Lisp (SBCL) is a Open Source implementation of ANSI \ Common Lisp. It provides an interactive environment including an \ integrated native compiler, interpreter, and debugger. SBCL is quite \ suitable for the creation of long running system services, as the compiler \ trades the time for a long initial compilation for blazingly fast loading \ of its binary runtime fasl representation. homepage http://www.sbcl.org # https://bugs.launchpad.net/sbcl/+bug/2033284 patchfiles 0001-fix-building-when-root-directory-contain-non-ASCII-c.patch \ 0002-add-MacPorts-XDG_DATA_DIRS.patch checksums rmd160 0cd9d9f156883991a3113f7f5499176c86b8c4a4 \ sha256 8a932627b3f1d8e9618f1cdc225edcb002456804697e2c87d140683764a106d5 \ size 8065883 if {${name} eq ${subport}} { master_sites \ sourceforge use_bzip2 yes distfiles ${name}-${version}-source${extract.suffix} worksrcdir ${name}-${version} } conflicts sbcl-devel subport sbcl-devel { PortGroup github 1.0 github.setup \ sbcl sbcl 9c63b7eaeb9e53cb4f73709d9d397f4ad4a939f9 version 20240106 revision 0 conflicts sbcl checksums rmd160 c442a1bdb9061f4eaa4248f2f9895177fcb525b2 \ sha256 b774aaf314515c4c55b59cf674eda985f57983470836917dd21bdbff39de17ab \ size 9801341 pre-build { system -W ${worksrcpath} "echo '\"${version}\"' > version.lisp-expr" } } if {${name} eq ${subport}} { # clock_gettime legacysupport.newest_darwin_requires_legacy 15 } # Uses: __attribute__((aligned(8))) # See: https://bugs.launchpad.net/sbcl/+bug/1991485 compiler.blacklist-append \ *gcc-3.* *gcc-4.* post-patch { reinplace "s|@@PREFIX@@|${prefix}|g" \ ${worksrcpath}/contrib/asdf/uiop.lisp reinplace "s|/usr/local/lib/${name}|${prefix}/lib/${name}|g" \ ${worksrcpath}/doc/sbcl.1 # This is the way to bypass path to MacPorts includes into sbcl.mk set config_path ${worksrcpath}/src/runtime foreach f [glob -tails -directory ${config_path} Config.*-darwin] { ui_debug "Adding MacPorts paths into ${f}" set config [open ${config_path}/$f a] puts ${config} "CFLAGS += -I${prefix}/include [legacysupport::get_cpp_flags]" puts ${config} "DEPEND_FLAGS += -I${prefix}/include [legacysupport::get_cpp_flags]" puts ${config} "OS_LIBS += -L${prefix}/lib [legacysupport::get_library_link_flags]" close ${config} } } # SBCL records used compiler inside lib/sbcl/sbcl.mk which may lead to not working sb-grovel if { [string match macports-clang-* ${configure.compiler}] } { depends_run-append \ port:[string map {"macports-" ""} ${configure.compiler}] } if { [string match macports-gcc-* ${configure.compiler}] } { depends_run-append \ port:[string map {"macports-gcc-" "gcc"} ${configure.compiler}] } use_configure no pre-build { # disable all warning set sbclrc [open $env(HOME)/.sbclrc w+] puts ${sbclrc} "(declaim (sb-ext:muffle-conditions cl:warning))" close ${sbclrc} } build.env-append \ CC=${configure.cc} \ CXX=${configure.cxx} \ CPP=${configure.cpp} \ SBCL_MACOSX_VERSION_MIN=${macosx_deployment_target} use_parallel_build no build.cmd sh build.target make.sh build.args-append \ --prefix=${prefix} variant bootstrap_ecl description { Use ECL to bootstrap compilation instead of SBCL binary. } {} if { ![variant_isset bootstrap_ecl] } { depends_build-append port:sbcl-bootstrap depends_skip_archcheck-append sbcl-bootstrap build.args-append --xc-host=${prefix}/libexec/sbcl-bootstrap/bin/sbcl } else { depends_build-append path:bin/ecl:ecl build.args-append --xc-host=${prefix}/bin/ecl } if {${configure.build_arch} eq "i386"} { build.args-append \ --arch=x86 } elseif {${configure.build_arch} eq "x86_64"} { build.args-append \ --arch=x86-64 } else { build.args-append \ --arch=${configure.build_arch} } # SBCL enables SIMD only when host CPU supports AVX2 which may not be true for buildbot. # To make build consistent, let disable it by default and enable via variant. # See: https://trac.macports.org/ticket/67437 build.args-append \ --without-sb-simd variant simd description {Enable build of SIMD extention, that fails on CPU without AVX2 support.} { build.args-replace --without-sb-simd --with-sb-simd } post-build { if {[variant_isset html] || [variant_isset pdf]} { system -W ${worksrcpath}/doc "INSTALL_ROOT=${destroot}${prefix} sh ${worksrcpath}/doc/make-doc.sh" } } if {![variant_isset threads]} { default_variants +fancy } variant html conflicts pdf description {Installs documentation in HTML and Info formats.} { depends_build-append bin:texi2dvi:texinfo depends_build-append bin:makeinfo:texinfo post-patch { reinplace -W ${worksrcpath} \ {s|$GNUMAKE html pdf info|$GNUMAKE html info|g} \ doc/make-doc.sh } } variant pdf conflicts html description {Installs documentation in PDF, HTML and Info formats. Involves the installation of a TexLive dependency chain, which can dramatically slow down the installation of the SBCL port.} { depends_build-append bin:dvips:texlive depends_build-append bin:texi2dvi:texinfo depends_build-append bin:makeinfo:texinfo } variant threads description {Enable multi-threaded runtime using the Mach pthreads interface.} { build.args-append --with-sb-thread } variant fancy conflicts threads description {Configure SBCL compilation with all available compatible options (including threading).} { build.args-append --fancy # As of version 2.2.6, zstd is used for core compression. depends_lib-append port:zstd } test.run yes test.dir ${worksrcpath}/tests test.env CC=${configure.cc} \ CXX=${configure.cxx} \ CPP=${configure.cpp} test.target run-tests.sh destroot.env INSTALL_ROOT=${destroot}${prefix} destroot.target install.sh destroot.destdir if {${name} eq ${subport}} { livecheck.url http://sourceforge.net/api/file/index/project-id/1373/rss?path=%2F${name} livecheck.regex guid.*${name}-(\\d+(\\.\\d+)+)-source }