# -*- 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-07-03T23:26:29Z github.setup LuaJIT LuaJIT 04dca7911ea255f37be799c18d74c305b921c1a6 revision 0 checksums rmd160 a7ef9655ce160f285517c661e701a8db236d52c5 \ sha256 346b028d9ba85e04b7e23a43cc51ec076574d2efc0d271d4355141b0145cd6e0 \ size 1082284 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 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-]+)}