Hallo
I want to create a Portfile for a series of Freepascal cross compilers for
embedded avr. But this needs to take into account a list of subarchs, which
conflict with each other and only one can be installed at a time. So the
installation of one should cause the uninstallation of an installed one. This
is a snippet with the essential parts:
foreach subarch {25 35 4 5 51 6} {
subport “fpc-cross-avr${subarch}-embedded" {
revision 0
build.target rtl
destroot.target rtl_install
description FPC cross-compiler for avr${subarch}
set full_target "CPU_TARGET=avr OS_TARGET=embedded SUBARCH=avr${subarch}"
build.args PP=ppcavr BINUTILSPREFIX=avr- ${full_target}
destroot.args ${full_target} CROSSINSTALL=1
INSTALL_PREFIX=${destroot}${prefix}
}
}
How could I achieve that the subports conflict each other and also replace each
other when installing with nothing more than a warning.
Michael