diff options
Diffstat (limited to 'lang/swift/Makefile')
-rw-r--r-- | lang/swift/Makefile | 82 |
1 files changed, 45 insertions, 37 deletions
diff --git a/lang/swift/Makefile b/lang/swift/Makefile index ce5f469..5f3b30f2 100644 --- a/lang/swift/Makefile +++ b/lang/swift/Makefile @@ -1,10 +1,9 @@ # $FreeBSD$ PORTNAME= swift -PORTVERSION= 2.2.1 +PORTVERSION= 3.1.1 DISTVERSIONPREFIX= swift- DISTVERSIONSUFFIX= -RELEASE -PORTREVISION= 4 CATEGORIES= lang MAINTAINER= swills@FreeBSD.org @@ -20,36 +19,53 @@ BUILD_DEPENDS= cmake:devel/cmake \ sphinx-build:textproc/py-sphinx \ binutils>=2.25.1:devel/binutils LIB_DEPENDS= libicudata.so:devel/icu \ - libuuid.so:misc/e2fsprogs-libuuid + libuuid.so:misc/e2fsprogs-libuuid \ + libobjc.so:lang/libobjc2 +REL_SNAP= 2017-04-22-a USE_GITHUB= yes -GH_ACCOUNT= apple:DEFAULT,llvm,clang,lldb,cmark,llbuild,swiftpm,xctest,xcfound + +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 -GH_TAGNAME= swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a:llbuild,swiftpm,xctest,xcfound + 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-foundation:xcfound \ + swift-corelibs-libdispatch:dispatch WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} -USES= iconv libedit ninja perl5 pkgconfig python:3,build sqlite +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_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 <bsd.port.pre.mk> -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100079 -BUILD_DEPENDS+= clang38:devel/llvm38 -EXTRA_FLAGS= --host-cc=${LOCALBASE}/bin/clang38 --host-cxx=${LOCALBASE}/bin/clang++38 -.endif +CC_ONLY= ${CC:C/.*\///} +CPP_ONLY= ${CPP:C/.*\///} +CXX_ONLY= ${CXX:C/.*\///} post-extract: @${MKDIR} ${WRKSRC} @@ -58,47 +74,39 @@ post-extract: 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}/swift; ${SETENV} PATH=${LOCALBASE}/bin:${PATH} \ - CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \ - CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \ - CXXFLAGS="-I${LOCALBASE}/include ${CXXFLAGS}" \ - LDFLAGS='-B${LOCALBASE}/bin -fuse-ld=bfd' \ + cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} \ + ./swift/utils/build-script --preset=mixin_freebsd_installation \ + -j ${MAKE_JOBS_NUMBER} \ install_destdir=${STAGEDIR} \ - ./utils/build-script -R --no-assertions \ - --llbuild \ -- \ ${EXTRA_FLAGS} \ - --verbose-build \ - --swift-runtime-enable-dtrace \ - --install-swift \ - --install-llbuild \ + --skip-build-llvm=1 \ --install_prefix=${PREFIX} \ --install_destdir=${STAGEDIR} \ - --swift-install-components='compiler;clang-builtin-headers;stdlib;sdk-overlay;license;tools;editor-integration' \ - --build-swift-static-stdlib=1 \ - --skip-test-lldb=1 + --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 - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/swift/freebsd/libswiftGlibc.so - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/swift/freebsd/libswiftCore.so - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-compress - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sil-extract - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-ide-test - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-llvm-opt - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-build-tool - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/swift-demangle - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sil-opt +.for FILE in ${STRIP_FILES} + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${FILE} +.endfor do-install-DOCS-on: - cd ${WRKSRC}/build/Ninja-Release/swift-freebsd-x86_64/docs/html ; \ + cd ${WRKSRC}/build/Ninja-ReleaseAssert+stdlib-Release/swift-freebsd-x86_64/docs/html ; \ ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} .include <bsd.port.post.mk> |