# -*- 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 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup xcode_workaround 1.0 PortGroup github 1.0 PortGroup legacysupport 1.1 PortGroup makefile 1.0 PortGroup muniversal 1.1 set branch 2.1 set version_date 2024-03-10T16:29:48Z github.setup LuaJIT LuaJIT d06beb0480c5d1eb53b3343e78063950275aa281 revision 0 checksums rmd160 3214ac12acb255991c7f7532bbb913b838a1f439 \ sha256 6abd146a1dfa240a965748f63221633446affa2a715e3eb03879136e3efb95f4 \ size 1081883 set version_date_s [clock scan "${version_date}" -format {%Y-%m-%dT%H:%M:%SZ} -timezone :UTC] version ${branch}.${version_date_s} name luajit categories lang license MIT maintainers {@catap korins.ky:kirill} openmaintainer description a Just-In-Time Compiler for Lua long_description LuaJIT is a Just-In-Time Compiler for the Lua programming language. homepage https://luajit.org github.tarball_from archive conflicts luajit-openresty patchfiles powerpc.patch patchfiles-append TARGET_OS.patch post-patch { reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/etc/luajit.pc \ ${worksrcpath}/src/luaconf.h \ ${worksrcpath}/src/Makefile # Remove -march=i686 from CCOPT_x86 reinplace -E {s|-march=[a-z0-9_]+||g} ${worksrcpath}/src/Makefile # The build process normally expects git and a .git directory to establish # the version but it includes a fallback for a `.relver` file set relver [open "${worksrcpath}/.relver" w 0644] puts ${relver} "${version_date_s}" close ${relver} } compiler.thread_local_storage yes # crashes at runtime with these compilers # https://trac.macports.org/ticket/45343 compiler.blacklist {clang < 700} macports-clang-3.3 macports-clang-3.4 ## Fix universal builds, see: # - https://www.freelists.org/post/luajit/Building-universal-libraries-x86-64-and-arm64-for-osx,4 # - https://git.openembedded.org/meta-openembedded/plain/meta-oe/recipes-devtools/luajit/luajit_git.bb # Clean automatically set options that apply to both host and target architectures (which we do not want) build.post_args-append CCOPT= CCOPT_x86= TARGET_STRIP='@:' foreach arch ${muniversal.architectures} { build.args.${arch}-append TARGET_FLAGS+="[muniversal::get_archflag cc ${arch}]" build.post_args.${arch}-append \ CFLAGS="${configure.cflags} [configure.cflags.${arch}]" \ LDFLAGS="${configure.ldflags} [configure.ldflags.${arch}]" } # changes to compiler flags must be made before `CFLAGS=...` xcode_workaround.type append_to_compiler_flags configure.cflags-append -DLUAJIT_ENABLE_LUA52COMPAT makefile.override CC CFLAGS LDFLAGS PREFIX build.target amalg build.args-append Q= post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/doc copy ${worksrcpath}/doc/ ${destroot}${prefix}/share/doc/${name} } livecheck.type regex livecheck.url ${github.homepage}/commits/v${branch}.atom livecheck.version ${version_date} livecheck.regex {([:TZ0-9-]+)}