Index: en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/porting-dads/chapter.xml @@ -520,6 +520,19 @@ Architectural Considerations + Some ports are affected by features particular to one + or more of &os;'s supported architectures (as defined by + TARGETS in + base/head/Makefile). + This value is presented to ports Makefiles + as ARCH. + + + To see the complete list, run make targets. + The values to test ARCH against are the values + on the right-hand side of the /. + + Marking a Port as Architecture Neutral @@ -529,10 +542,26 @@ - Marking a Port as Ignored Only On Certain Architectures + Marking a Port as Broken/Ignored On An Architecture + To mark a port as BROKEN or + IGNORE based on architecture: + + IGNORE_i386= does not run on i386 + + BROKEN_powerpc64= not ported to powerpc64 yet + + + + + + + Marking a Port as Ignored Only On Multiple Architectures + + + To mark a port as IGNOREd only on certain architectures, there are two other convenience variables that will automatically set @@ -540,10 +569,14 @@ ONLY_FOR_ARCHS and NOT_FOR_ARCHS. Examples: - ONLY_FOR_ARCHS= i386 amd64 + ONLY_FOR_ARCHS= amd64 i386 - NOT_FOR_ARCHS= ia64 sparc64 + NOT_FOR_ARCHS= powerpc64 sparc64 + + Please sort the entries in alpha order. + + A custom IGNORE message can be set using ONLY_FOR_ARCHS_REASON and NOT_FOR_ARCHS_REASON. Per @@ -556,7 +589,43 @@ + + Wordsize Considerations + + + + Some ports behave differently based on wordsize; in current + practice, this is usually 64-bit vs. 32-bit. + + + Tip: it is easier to use the shorthand below rather + than testing for each individual value of + ARCH in a string such as: +.if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == mips || ${ARCH} == powerpc || ${ARCH} == powerpcspe + + + + + Here is the recommended usage: + + # modify MAKE_ENV on 64-bit archs +.if ${ARCH:*M64*} +MAKE_ENV+= ... +.endif + + # modify CONFIGURE_ARGS on 32-bit archs +.if ! ${ARCH:*M64*} +CONFIGURE_ARGS+= ... +.endif + + + + + + + i386-Specific Considerations + If a port fetches i386 binaries and installs them,