From 306ed3e55adc81e9d8e6f6a5032f333efa11d4ee Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Tue, 17 Jun 2014 16:07:23 +0000 Subject: [PATCH] Apple's GCC block support was backported to FreeBSD's gcc-4.2.1 in base (r260311). With a small revision (r264121) which was MFCd to 10.0-STABLE as r264214, our base GCC got the capacity to build more blocks application cleanly. This support is important for platforms lack support for clang like ia64, powerpc and sparc64. The attached patch: - Overrides the clang port option in platforms that ship a valid block-enabled compiler in base. - Let's platforms like powerpc and sparc use the base compiler. - Adds license information for libdispatch (Apache License 2.0) PR: 188332 Submitted by: Pedro F. Giffuni --- devel/libdispatch/Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/devel/libdispatch/Makefile b/devel/libdispatch/Makefile index 5d13ffcc27df..c995418b1e46 100644 --- a/devel/libdispatch/Makefile +++ b/devel/libdispatch/Makefile @@ -10,18 +10,16 @@ MASTER_SITES= ftp://ftp.SpringDaemons.com/soft/ MAINTAINER= brooks@FreeBSD.org COMMENT= Grand Central Dispatch API support library +LICENSE= APACHE20 + +USES= tar:bzip2 USE_AUTOTOOLS= aclocal autoconf ACLOCAL_ARGS= -Im4 GNU_CONFIGURE= yes -USE_BZIP2= yes USE_LDCONFIG= yes # This is needed because PIC support check in autoconf could fail for clang otherwise. CONFIGURE_ENV= lt_cv_prog_compiler_pic_works=yes -OPTIONS_DEFINE= CLANG -OPTIONS_DEFAULT= CLANG -CLANG_DESC= Build with LLVM/Clang (required for blocks support) - _MAN3= dispatch.3 \ dispatch_after.3 \ dispatch_after_f.3 \ @@ -80,11 +78,17 @@ PLIST_FILES+= ${_MAN3:S|^|man/man3/|:S|$|.gz|} .include +.if (${OSVERSION} < 1000024) +OPTIONS_DEFINE= CLANG +OPTIONS_DEFAULT= CLANG +CLANG_DESC= Build with LLVM/Clang (required for blocks support) +.endif + .if ${OSVERSION} <= 800107 || (${OSVERSION} >= 900000 && ${OSVERSION} < 900002) IGNORE= is not supported on this OS version .endif -.if ${OSVERSION} > 900000 +.if ((${OSVERSION} > 900000) && (${OSVERSION} < 1000706)) .if ${ARCH} == "powerpc BROKEN= Does not configure on powerpc-9 .elif ${ARCH} == "sparc64