Automatic port replacement

Karl-Michael Schindler karl-michael.schindler at physik.uni-halle.de
Sun Feb 18 13:49:27 UTC 2024


Hi

I have a series of cross compilers which conflict with each other. Therefore, only one should be installed and installing one should replace the installed one with a Y/n question. How can I achieve this?

This is my current snippet with non-essentials removed:

foreach subarch {25 35 4 5 51 6} {
    subport “fpc-cross-avr${subarch}-embedded" {
        conflicts {
            fpc-cross-avr25-embedded
            fpc-cross-avr35-embedded
            fpc-cross-avr4-embedded
            fpc-cross-avr5-embedded
            fpc-cross-avr51-embedded
            fpc-cross-avr6-embedded
        }
        replaced_by {
            fpc-cross-avr25-embedded
            fpc-cross-avr35-embedded
            fpc-cross-avr4-embedded
            fpc-cross-avr5-embedded
            fpc-cross-avr51-embedded
            fpc-cross-avr6-embedded
        }
        build.args        CPU_TARGET=avr OS_TARGET=embedded SUBARCH=avr${subarch}                   
        destroot.args   CPU_TARGET=avr OS_TARGET=embedded SUBARCH=avr${subarch}
    }
}

But it does not work as intended. Any hints?

Michael.


More information about the macports-dev mailing list