This patch adds a new macro (IA32_BINARY_PORT), which can be set in port Makefiles. This feature is an axtension to the existing NOT_FOR_ARCHS / ONLY_FOR_ARCHS system, especially for i386 binary ports that fetch compiled i386 binaries. These ports can also be used on amd64/ia64 architectures, but the compatibility layer must be installed. Currently, we don't have a method to check if it is installed, so the affected ports can't be handled appropriately. While here, I added a ${SYSCTL} variable, I think, it enhances the readability. An update for Porter's Handbook is also attached. Reviewed by: erwin More info: http://wikitest.freebsd.org/G%C3%A1borK%C3%B6vesd%C3%A1n
Responsible Changed From-To: freebsd-ports-bugs->portmgr Over to portmgr to schedule for next -exp run.
Here's a new patch that also adds a comment into the header of bsd.port.mk. I forgot this at the first time. Gabor Kovesdan
State Changed From-To: open->feedback Here is the latest corrected patch. (Note I have moved the first block down a bit for what I consider to be better readability). Submitter, does this look right for you? http://www.freebsd.org/cgi/query-pr.cgi?pr=98105 Adding to audit trail (forgot to include the patch): --- bsd.port.mk.made Tue Jun 20 02:45:57 2006 +++ bsd.port.mk Tue Jun 20 02:50:17 2006 @@ -215,6 +215,8 @@ # NOT_FOR_ARCHS_REASON # NOT_FOR_ARCHS_REASON_${ARCH} # - Reason why it's not for ${NOT_FOR_ARCHS}s +# IA32_BINARY_PORT - Set this instead of ONLY_FOR_ARCHS if the given port +# fetches and installs compiled i386 binaries. # # Dependency checking. Use these if your port requires another port # not in the list below. (Default: empty.) @@ -1059,6 +1061,7 @@ SORT?= /usr/bin/sort STRIP_CMD?= /usr/bin/strip SU_CMD?= /usr/bin/su root -c +SYSCTL?= /sbin/sysctl TAIL?= /usr/bin/tail TEST?= test # Shell builtin TR?= LANG=C /usr/bin/tr @@ -1100,7 +1103,7 @@ # Get __FreeBSD_version .if !defined(OSVERSION) -OSVERSION!= /sbin/sysctl -n kern.osreldate +OSVERSION!= ${SYSCTL} -n kern.osreldate .endif # Get the object format. @@ -1118,6 +1121,29 @@ MASTER_PORT?= .endif +# Check the compatibility layer for amd64/ia64 + +.if ${ARCH} == "amd64" || ${ARCH} =="ia64" +.if exists(/usr/lib32) +HAVE_COMPAT_IA32_LIBS?= YES +.endif +.if !defined(HAVE_COMPAT_IA32_KERN) +HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -a compat.ia32.maxvmem >/dev/null 2>&1; then echo YES; fi +.endif +.endif + +.if defined(IA32_BINARY_PORT) && ${ARCH} != "i386" +.if ${ARCH} == "amd64" || ${ARCH} == "ia64" +.if !defined(HAVE_COMPAT_IA32_KERN) +IGNORE= you need a kernel with compiled-in IA32 compatibility to use this port. +.elif !defined(HAVE_COMPAT_IA32_LIBS) +IGNORE= you need the 32-bit libraries installed under /usr/lib32 to use this port. +.endif +.else +IGNORE= you have to use i386 (or compatible) platform to use this port. +.endif +.endif + # If they exist, include Makefile.inc, then architecture/operating # system specific Makefiles, then local Makefile.local. @@ -2693,7 +2719,7 @@ .if defined(GNU_CONFIGURE) # Maximum command line length .if !defined(CONFIGURE_MAX_CMD_LEN) -CONFIGURE_MAX_CMD_LEN!= /sbin/sysctl -n kern.argmax +CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax .endif CONFIGURE_ARGS+= --prefix=${PREFIX} ${CONFIGURE_TARGET} CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} @@ -5658,3 +5684,4 @@ .endif # End of post-makefile section. +
Ok, this seems good to me. Gabor Kovesdan
State Changed From-To: feedback->open Feedback received.
State Changed From-To: open->analyzed Accepted for a test build on the cluster.
State Changed From-To: analyzed->open I missed this one in my patchset. We'll try it again in a future run.
A sysctl section was added to the porters handbook today. After this change, that should be updated to reflect the new ${SYSCTL} variable.
State Changed From-To: open->analyzed Currently being tested on the cluster.
State Changed From-To: analyzed->closed Committed, thanks.