diff options
-rw-r--r-- | Mk/bsd.gcc.mk | 10 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 138 |
2 files changed, 86 insertions, 62 deletions
diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk index b6ab72da1480..7f193a2112c2 100644 --- a/Mk/bsd.gcc.mk +++ b/Mk/bsd.gcc.mk @@ -96,7 +96,7 @@ FC:= f77 . endif . endif -MAKE_ENV+= F77="${F77}" FC="${FC}" +MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" .endif .if defined(USE_GCC) @@ -195,7 +195,7 @@ CXX:= g++${V} BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS} .endif -MAKE_ENV+= CC="${CC}" CXX="${CXX}" +MAKE_ENV+= CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" test-gcc: @echo USE_GCC=${USE_GCC} @@ -204,7 +204,7 @@ test-gcc: .else @echo Port cannot use later versions. .endif - @echo WITH_FORTRAN=${WITH_FORTRAN} + @echo USE_FORTRAN=${USE_FORTRAN} .for v in ${GCCVERSIONS} @echo -n "GCC version: ${_GCCVERSION_${v}_V} " .if defined(_GCC_FOUND${v}) @@ -214,5 +214,7 @@ test-gcc: # @echo ${v} - ${_GCC_FOUND${v}} - ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R} - ${_GCCVERSION_${v}_V} .endfor @echo Using GCC version ${_USE_GCC} - @echo CC:${CC} - CXX:${CXX} - F77:${F77} - FC:${FC} - BUILD_DEPENDS:${BUILD_DEPENDS} + @echo CC=${CC} - CXX=${CXX} - CFLAGS=${CFLAGS} + @echo F77=${F77} - FC=${FC} - FFLAGS=${FFLAGS} + @echo BUILD_DEPENDS=${BUILD_DEPENDS} .endif diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 1024a448178f..e0703dead6dd 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1255,29 +1255,6 @@ SLAVE_PORT?= no 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. @@ -1764,6 +1741,34 @@ PATCH_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip .endif .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= requires a kernel with compiled-in IA32 compatibility +.elif !defined(HAVE_COMPAT_IA32_LIBS) +IGNORE= requires 32-bit libraries installed under /usr/lib32 +.endif +_LDCONFIG_FLAGS=-32 +LIB32DIR= lib32 +.else +IGNORE= requires i386 (or compatible) platform to run +.endif +.else +LIB32DIR= lib +.endif +PLIST_SUB+= LIB32DIR=${LIB32DIR} + .if defined(USE_ZIP) EXTRACT_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip .endif @@ -1797,7 +1802,7 @@ LIB_DEPENDS+= ldap-2.3.2:${PORTSDIR}/net/openldap23${_OPENLDAP_FLAVOUR}-client .elif ${WANT_OPENLDAP_VER} == 24 LIB_DEPENDS+= ldap-2.4.2:${PORTSDIR}/net/openldap24${_OPENLDAP_FLAVOUR}-client .else -IGNORE= unknown OpenLDAP version: ${WANT_OPENLDAP_VER} +IGNORE= cannot be built with unknown OpenLDAP version: ${WANT_OPENLDAP_VER} .endif .endif @@ -1815,7 +1820,7 @@ _HAVE_FAM_SYSTEM= fam .if defined(WANT_FAM_SYSTEM) .if defined(WITH_FAM_SYSTEM) && ${WITH_FAM_SYSTEM}!=${WANT_FAM_SYSTEM} -IGNORE= The port wants to use ${WANT_FAM_SYSTEM} as its FAM system and you wish to use ${WITH_FAM_SYSTEM} +IGNORE= wants to use ${WANT_FAM_SYSTEM} as its FAM system, while you wish to use ${WITH_FAM_SYSTEM} .endif FAM_SYSTEM= ${WANT_FAM_SYSTEM} .elif defined(WITH_FAM_SYSTEM) @@ -1830,14 +1835,14 @@ FAM_SYSTEM= ${DEFAULT_FAM_SYSTEM} .if defined(_HAVE_FAM_SYSTEM) .if ${_HAVE_FAM_SYSTEM}!= ${FAM_SYSTEM} -BROKEN= FAM system mismatch: ${_HAVE_FAM_SYSTEM} is installed and desired FAM system is ${FAM_SYSTEM} +BROKEN= FAM system mismatch: ${_HAVE_FAM_SYSTEM} is installed, while desired FAM system is ${FAM_SYSTEM} .endif .endif .if defined(FAM_SYSTEM_${FAM_SYSTEM:U}) LIB_DEPENDS+= ${FAM_SYSTEM_${FAM_SYSTEM:U}} .else -IGNORE= unknown FAM system: ${FAM_SYSTEM} +IGNORE= cannot be built with unknown FAM system: ${FAM_SYSTEM} .endif .endif # USE_FAM @@ -1915,7 +1920,7 @@ LINUX_BASE_PORT= ${LINUXBASE}/bin/sh:${PORTSDIR}/emulators/linux_base-${USE_LINU . if ${USE_LINUX:L} == "yes" LINUX_BASE_PORT= ${LINUXBASE}/etc/fedora-release:${PORTSDIR}/emulators/linux_base-fc4 . else -IGNORE= There is no emulators/linux_base-${USE_LINUX}, perhaps wrong use of USE_LINUX or OVERRIDE_LINUX_BASE_PORT. +IGNORE= cannot be built: there is no emulators/linux_base-${USE_LINUX}, perhaps wrong use of USE_LINUX or OVERRIDE_LINUX_BASE_PORT . endif . endif @@ -1971,7 +1976,7 @@ X_FONTS_CYRILLIC_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontCyrillic X_FONTS_TTF_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontScalable X_FONTS_TYPE1_PORT= ${PORTSDIR}/x11-fonts/XFree86-4-fontScalable .else -IGNORE= cannot install: bad X_WINDOW_SYSTEM setting; valid values are 'xfree86-4' and 'xorg' +IGNORE= cannot be installed: bad X_WINDOW_SYSTEM setting; valid values are 'xfree86-4' and 'xorg' .endif .if defined(USE_IMAKE) @@ -2026,7 +2031,7 @@ USE_GL= glu . for _component in ${USE_GL} . if !defined(_GL_${_component}_LIB_DEPENDS) && \ !defined(_GL_${_component}_RUN_DEPENDS) -IGNORE= uses unknown GL component +IGNORE= uses unknown GL component . else LIB_DEPENDS+= ${_GL_${_component}_LIB_DEPENDS} RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS} @@ -2219,18 +2224,6 @@ RUN_DEPENDS+= cdrecord:${PORTSDIR}/sysutils/cdrtools REINPLACE_ARGS?= -i.bak REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} -# Macro for coping entire directory tree with correct permissions -COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ - 2>&1) && \ - ${CHOWN} -R ${BINOWN}:${BINGRP} $$1 && \ - ${FIND} $$1 -type d -exec chmod 755 {} \; && \ - ${FIND} $$1 -type f -exec chmod ${BINMODE} {} \;' -- -COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ - 2>&1) && \ - ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \ - ${FIND} $$1/ -type d -exec chmod 755 {} \; && \ - ${FIND} $$1/ -type f -exec chmod ${SHAREMODE} {} \;' -- - # Names of cookies used to skip already completed stages EXTRACT_COOKIE?= ${WRKDIR}/.extract_done.${PORTNAME}.${PREFIX:S/\//_/g} CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done.${PORTNAME}.${PREFIX:S/\//_/g} @@ -2399,6 +2392,29 @@ INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ MAKE_ENV+= ${INSTALL_MACROS} SCRIPTS_ENV+= ${INSTALL_MACROS} +# Macro for coping entire directory tree with correct permissions +.if ${UID} == 0 +COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ + 2>&1) && \ + ${CHOWN} -R ${BINOWN}:${BINGRP} $$1 && \ + ${FIND} $$1 -type d -exec chmod 755 {} \; && \ + ${FIND} $$1 -type f -exec chmod ${BINMODE} {} \;' -- +COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ + 2>&1) && \ + ${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \ + ${FIND} $$1/ -type d -exec chmod 755 {} \; && \ + ${FIND} $$1/ -type f -exec chmod ${SHAREMODE} {} \;' -- +.else +COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ + 2>&1) && \ + ${FIND} $$1 -type d -exec chmod 755 {} \; && \ + ${FIND} $$1 -type f -exec chmod ${BINMODE} {} \;' -- +COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \ + 2>&1) && \ + ${FIND} $$1/ -type d -exec chmod 755 {} \; && \ + ${FIND} $$1/ -type f -exec chmod ${SHAREMODE} {} \;' -- +.endif + # The user can override the NO_PACKAGE by specifying this from # the make command line .if defined(FORCE_PACKAGE) @@ -3210,20 +3226,20 @@ __ARCH_OK?= 1 .if defined(ONLY_FOR_ARCHS) IGNORE= is only for ${ONLY_FOR_ARCHS}, .else # defined(NOT_FOR_ARCHS) -IGNORE= does not run on ${NOT_FOR_ARCHS}. +IGNORE= does not run on ${NOT_FOR_ARCHS}, .endif -IGNORE+= and you are running ${ARCH}. +IGNORE+= while you are running ${ARCH} .if defined(ONLY_FOR_ARCHS_REASON_${ARCH}) -IGNORE+= Reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}} +IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON_${ARCH}}) .elif defined(ONLY_FOR_ARCHS_REASON) -IGNORE+= Reason: ${ONLY_FOR_ARCHS_REASON} +IGNORE+= (reason: ${ONLY_FOR_ARCHS_REASON}) .endif .if defined(NOT_FOR_ARCHS_REASON_${ARCH}) -IGNORE+= Reason: ${NOT_FOR_ARCHS_REASON_${ARCH}} +IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON_${ARCH}}) .elif defined(NOT_FOR_ARCHS_REASON) -IGNORE+= Reason: ${NOT_FOR_ARCHS_REASON} +IGNORE+= (reason: ${NOT_FOR_ARCHS_REASON}) .endif .endif @@ -3231,23 +3247,23 @@ IGNORE+= Reason: ${NOT_FOR_ARCHS_REASON} # Check the user interaction and legal issues .if !defined(NO_IGNORE) .if (defined(IS_INTERACTIVE) && defined(BATCH)) -IGNORE= is an interactive port +IGNORE= is an interactive port .elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) -IGNORE= is not an interactive port +IGNORE= is not an interactive port .elif (defined(NO_CDROM) && defined(FOR_CDROM)) -IGNORE= may not be placed on a CDROM: ${NO_CDROM} +IGNORE= may not be placed on a CDROM: ${NO_CDROM} .elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) -IGNORE= is restricted: ${RESTRICTED} +IGNORE= is restricted: ${RESTRICTED} .elif defined(BROKEN) .if !defined(TRYBROKEN) -IGNORE= is marked as broken: ${BROKEN} +IGNORE= is marked as broken: ${BROKEN} .endif .elif defined(FORBIDDEN) -IGNORE= is forbidden: ${FORBIDDEN} +IGNORE= is forbidden: ${FORBIDDEN} .endif .if (defined(MANUAL_PACKAGE_BUILD) && defined(PACKAGE_BUILDING)) -IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} +IGNORE= has to be built manually: ${MANUAL_PACKAGE_BUILD} clean: @${IGNORECMD} .endif @@ -4093,6 +4109,12 @@ install-ldconfig-file: .endif # This can be removed once all ports have been converted to USE_LDCONFIG. .if defined(INSTALLS_SHLIB) +.if defined(USE_LDCONFIG) + @${ECHO_MSG} "===> INSTALLS_SHLIB and USE_LDCONFIG both defined." +.endif +.if defined(USE_LDCONFIG32) + @${ECHO_MSG} "===> INSTALLS_SHLIB and USE_LDCONFIG32 both defined." +.endif .if !defined(INSTALL_AS_USER) .if !defined(DESTDIR) @${ECHO_MSG} "===> Running ldconfig" @@ -5175,7 +5197,7 @@ lib-depends: fi; \ if [ -z "${DESTDIR}" ] ; then \ ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library: $$lib"; \ - if ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ + if ${LDCONFIG} ${_LDCONFIG_FLAGS} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ ${ECHO_MSG} " - found"; \ if [ ${_DEPEND_ALWAYS} = 1 ]; then \ ${ECHO_MSG} " (but building it anyway)"; \ @@ -5189,7 +5211,7 @@ lib-depends: fi; \ else \ ${ECHO_MSG} -n "===> ${PKGNAME} depends on shared library in ${DESTDIR}: $$lib"; \ - if ${CHROOT} ${DESTDIR} ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ + if ${CHROOT} ${DESTDIR} ${LDCONFIG} ${_LDCONFIG_FLAGS} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ ${ECHO_MSG} " - found"; \ if [ ${_DEPEND_ALWAYS} = 1 ]; then \ ${ECHO_MSG} " (but building it anyway)"; \ @@ -5208,7 +5230,7 @@ lib-depends: ${ECHO_MSG} " => No directory for $$lib. Skipping.."; \ else \ ${_INSTALL_DEPENDS} \ - if ! ${LDCONFIG} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ + if ! ${LDCONFIG} ${_LDCONFIG_FLAGS} -r | ${GREP} -vwF -e "${PKGCOMPATDIR}" | ${GREP} -qwE -e "-l$$pattern"; then \ ${ECHO_MSG} "Error: shared library \"$$lib\" does not exist"; \ ${FALSE}; \ fi; \ |