Files
Dan R. K. Ports c2877951a7 luametatex: fix build with gcc (e.g. on PPC/10.5/10.6):
* Replace GNU ld flag -Wl,-z,stack-size with Apple ld equivalent
 -Wl,-stack_size,0x280000

* Replace GNU strip flags (-g -S -d -x) in upstream's post-build
  strip command with Apple strip compatible flags (-x -S)

Fixes: https://trac.macports.org/ticket/74037
Fixes: https://trac.macports.org/ticket/72204
2026-05-25 12:53:53 -07:00

40 lines
1.4 KiB
Tcl

# -*- 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 cmake 1.0
PortGroup github 1.0
github.setup contextgarden luametatex 2.11.08 v
github.tarball_from archive
#name luametatex
#version 2.11.07
#master_sites https://www.ambulatoryclam.net/texlive/
#homepage https://github.com/contextgarden/luametatex
categories tex
maintainers {dports @drkp} openmaintainer
license GPL-2+
description LuaMetaTeX engine for ConTeXt
long_description \
LuaMetaTeX is a follow-up to the LuaTeX engine for use with ConTeXt
checksums rmd160 aa5220eb803e6a8cd67279d52c905ae832925b86 \
sha256 cf825633ee10a7bbf2a9bf98aa6842de5ef23258e8c370560c19ff5581b3d534 \
size 3464142
compiler.c_standard 2011
# Fix GCC build (primarily for 10.5/10.6).
# 1. Apple's ld doesn't support -z; use -stack_size instead
# https://trac.macports.org/ticket/74037
# 2. Upstream's post-build strip uses GNU flags (-g -S -d -x) that Apple's
# strip doesn't support; use -x -S instead
# https://trac.macports.org/ticket/72204
post-patch {
reinplace "s|-Wl,-z,stack-size=2621440|-Wl,-stack_size,0x280000|g" \
${worksrcpath}/CMakeLists.txt
reinplace {s|${CMAKE_STRIP} -g -S -d -x|${CMAKE_STRIP} -x -S|g} \
${worksrcpath}/cmake/luametatex.cmake
}