Index: head/lang/swift/Makefile =================================================================== --- head/lang/swift/Makefile (revision 451994) +++ head/lang/swift/Makefile (revision 451995) @@ -1,114 +1,113 @@ # $FreeBSD$ PORTNAME= swift PORTVERSION= 3.1.1 DISTVERSIONPREFIX= swift- DISTVERSIONSUFFIX= -RELEASE PORTREVISION= 2 CATEGORIES= lang MAINTAINER= swills@FreeBSD.org COMMENT= Swift programing language LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/swift/LICENSE.txt BUILD_DEPENDS= cmake:devel/cmake \ bash:shells/bash \ swig:devel/swig13 \ python:lang/python \ sphinx-build:textproc/py-sphinx \ binutils>=2.25.1:devel/binutils LIB_DEPENDS= libicudata.so:devel/icu \ libuuid.so:misc/e2fsprogs-libuuid \ libobjc.so:lang/libobjc2 REL_SNAP= 2017-04-22-a USE_GITHUB= yes GH_ACCOUNT= apple:DEFAULT,llvm,clang,dispatch,lldb,cmark,llbuild,swiftpm,xctest,xcfound GH_PROJECT= swift:DEFAULT swift-llvm:llvm swift-clang:clang swift-lldb:lldb \ swift-cmark:cmark swift-llbuild:llbuild swift-package-manager:swiftpm \ swift-corelibs-xctest:xctest swift-corelibs-foundation:xcfound \ swift-corelibs-libdispatch:dispatch GH_TAGNAME= swift-${PORTVERSION}-RELEASE:llbuild,swiftpm,xctest,xcfound,dispatch GH_SUBDIR= llvm:llvm clang:clang lldb:lldb cmark:cmark llbuild:llbuild \ swiftpm:swiftpm swift-corelibs-xctest:xctest \ swift-corelibs-foundation:xcfound \ swift-corelibs-libdispatch:dispatch WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} USES= autoreconf:build compiler:c++14-lang libtool localbase:ldflags iconv libedit ninja perl5 pkgconfig sqlite USE_AUTOTOOLS= autoconf:env USE_GNOME= libxml2 USE_LDCONFIG= yes ONLY_FOR_ARCHS= amd64 -BROKEN= fails to build with ICU 59, see bug 222428 BROKEN_FreeBSD_10= Builds but does not work CONFLICTS_BUILD= googletest LDFLAGS+= -lobjc OPTIONS_DEFINE= DOCS PORTDOCS= * STRIP_FILES= bin/sil-func-extractor bin/sil-nm bin/sil-opt \ bin/sil-passpipeline-dumper bin/swift \ bin/swift-api-digester bin/swift-build-tool \ bin/swift-demangle bin/swift-ide-test \ bin/swift-llvm-opt bin/swift-reflection-dump \ bin/swift-remoteast-test lib/swift/freebsd/libswiftCore.so \ lib/swift/freebsd/libswiftGlibc.so \ lib/swift/freebsd/libswiftRemoteMirror.so \ lib/swift/freebsd/libswiftSwiftOnoneSupport.so .include CC_ONLY= ${CC:C/.*\///} CPP_ONLY= ${CPP:C/.*\///} CXX_ONLY= ${CXX:C/.*\///} post-extract: @${MKDIR} ${WRKSRC} @${MV} ${WRKDIR}/${PORTNAME}-${PORTNAME}-${PORTVERSION}-RELEASE ${WRKSRC}/swift post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/swift/cmake/modules/SwiftSharedCMakeConfig.cmake @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%CPP_ONLY%%|${CPP_ONLY}|g' \ -e 's|%%CC_ONLY%%|${CC_ONLY}|g' \ -e 's|%%CXX_ONLY%%|${CXX_ONLY}|g' \ ${WRKSRC}/swift/utils/build-presets.ini \ ${WRKSRC}/swift/utils/build-script-impl do-build: @${MKDIR} ${STAGEDIR}${PREFIX} cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \ ./swift/utils/build-script --preset=mixin_freebsd_installation \ -j ${MAKE_JOBS_NUMBER} \ install_destdir=${STAGEDIR} \ -- \ ${EXTRA_FLAGS} \ --skip-build-llvm=1 \ --install_prefix=${PREFIX} \ --install_destdir=${STAGEDIR} \ --verbose-build=1 \ --install-llbuild=1 \ --skip-test-llbuild=1 @${RM} /var/run/libuuid/clock.txt /var/run/libuuid/request /var/run/libuuid/uuidd.pid do-install: ${MV} ${STAGEDIR}${PREFIX}/share/man/man1/swift.1 ${STAGEDIR}${PREFIX}/man/man1/swift.1 ${RM} -r ${STAGEDIR}${PREFIX}/share/man ${GZIP_CMD} ${STAGEDIR}${PREFIX}/man/man1/swift.1 .for FILE in ${STRIP_FILES} ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${FILE} .endfor do-install-DOCS-on: cd ${WRKSRC}/build/Ninja-ReleaseAssert+stdlib-Release/swift-freebsd-x86_64/docs/html ; \ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} .include Index: head/lang/swift/files/patch-swift_stdlib_public_stubs_UnicodeNormalization.cpp =================================================================== --- head/lang/swift/files/patch-swift_stdlib_public_stubs_UnicodeNormalization.cpp (nonexistent) +++ head/lang/swift/files/patch-swift_stdlib_public_stubs_UnicodeNormalization.cpp (revision 451995) @@ -0,0 +1,75 @@ +From b61c51b7b6720e61497f92e115d5afccff891848 Mon Sep 17 00:00:00 2001 +From: Adrian Popescu +Date: Thu, 17 Aug 2017 23:26:22 +0300 +Subject: [PATCH] Fixed clang 4.0 compilation under Arch Linux with icu59.1-1 + (#10361) + +ICU headers prefer use of `char16_t` instead of `uint16_t` for `UChar` in C++, where it is treated as a distinct type. This fixes associated warnings and errors. +--- swift/stdlib/public/stubs/UnicodeNormalization.cpp.orig 2017-04-21 21:18:29 UTC ++++ swift/stdlib/public/stubs/UnicodeNormalization.cpp +@@ -35,6 +35,7 @@ + + #include "../SwiftShims/UnicodeShims.h" + ++ + static const UCollator *MakeRootCollator() { + UErrorCode ErrorCode = U_ZERO_ERROR; + UCollator *root = ucol_open("", &ErrorCode); +@@ -86,7 +87,7 @@ private: + for (unsigned char c = 0; c < 128; ++c) { + UErrorCode ErrorCode = U_ZERO_ERROR; + intptr_t NumCollationElts = 0; +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + UChar Buffer[1]; + #else + uint16_t Buffer[1]; +@@ -127,10 +128,11 @@ swift::_swift_stdlib_unicode_compare_utf + int32_t LeftLength, + const uint16_t *RightString, + int32_t RightLength) { +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + // ICU UChar type is platform dependent. In Cygwin, it is defined + // as wchar_t which size is 2. It seems that the underlying binary + // representation is same with swift utf16 representation. ++ // On Clang 4.0 under a recent Linux, ICU uses the built-in char16_t type. + return ucol_strcoll(GetRootCollator(), + reinterpret_cast(LeftString), LeftLength, + reinterpret_cast(RightString), RightLength); +@@ -156,7 +158,7 @@ swift::_swift_stdlib_unicode_compare_utf + UErrorCode ErrorCode = U_ZERO_ERROR; + + uiter_setUTF8(&LeftIterator, reinterpret_cast(LeftString), LeftLength); +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + uiter_setString(&RightIterator, reinterpret_cast(RightString), + RightLength); + #else +@@ -199,7 +201,7 @@ swift::_swift_stdlib_unicode_compare_utf + void *swift::_swift_stdlib_unicodeCollationIterator_create( + const __swift_uint16_t *Str, __swift_uint32_t Length) { + UErrorCode ErrorCode = U_ZERO_ERROR; +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + UCollationElements *CollationIterator = ucol_openElements( + GetRootCollator(), reinterpret_cast(Str), Length, + &ErrorCode); +@@ -244,7 +246,7 @@ swift::_swift_stdlib_unicode_strToUpper( + const uint16_t *Source, + int32_t SourceLength) { + UErrorCode ErrorCode = U_ZERO_ERROR; +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + uint32_t OutputLength = u_strToUpper(reinterpret_cast(Destination), + DestinationCapacity, + reinterpret_cast(Source), +@@ -271,7 +273,7 @@ swift::_swift_stdlib_unicode_strToLower( + const uint16_t *Source, + int32_t SourceLength) { + UErrorCode ErrorCode = U_ZERO_ERROR; +-#if defined(__CYGWIN__) || defined(_MSC_VER) ++#if defined(__CYGWIN__) || defined( _MSC_VER) || defined(__linux__) || defined(__FreeBSD__) + uint32_t OutputLength = u_strToLower(reinterpret_cast(Destination), + DestinationCapacity, + reinterpret_cast(Source), Property changes on: head/lang/swift/files/patch-swift_stdlib_public_stubs_UnicodeNormalization.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property