On 2019/04/01 08:26, Rafael Sadowski wrote:
> Enable clang extra tools in devel/llvm to provide some useful C/C++
> tools. I started with the extra tools because we don't have an C++ Language
> Server Protocol (LSP) server in the tree but I want to play with it.
> 
> However, build and works fine on amd64. Notable changes:
> 
> - Zap all ":Bool" tags in cmake configure args. It's 2019 and cmake is
>   smart enough.
> - Set CLANG_ENABLE_STATIC_ANALYZER=True, CLANG_INCLUDE_TESTS=True to
>   build clang-tidy and enable test. (It is ignored if the folder extra
>   don't exists)
> - Adjust WANTLIB
> 
> Comments? OK?
> 
> RS

I'll defer to $MAINTAINER but a few comments:

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/llvm/Makefile,v
> retrieving revision 1.216
> diff -u -p -u -p -r1.216 Makefile
> --- Makefile  9 Mar 2019 06:18:11 -0000       1.216
> +++ Makefile  1 Apr 2019 06:25:18 -0000
> @@ -8,9 +8,10 @@ ONLY_FOR_ARCHS = ${LLVM_ARCHS}
>  
>  DPB_PROPERTIES = parallel
>  
> -MULTI_PACKAGES =     -main -python -lldb
> +MULTI_PACKAGES =     -main -python -lldb -extras
>  COMMENT-main =       modular, fast C/C++/ObjC compiler, static analyzer and 
> tools
>  COMMENT-lldb =       LLDB debugger
> +COMMENT-extras =     clang extra tools
>  COMMENT-python =     Python bindings for Clang
>  
>  LLVM_V =     7.0.1
> @@ -20,13 +21,15 @@ PKGSPEC-main =    llvm-=${LLVM_V}
>  PKGNAME-main =       llvm-${LLVM_V}
>  PKGNAME-python =     py-llvm-${LLVM_V}
>  PKGNAME-lldb =       lldb-${LLVM_V}
> +PKGNAME-extras =     extras-${LLVM_V}
>  REVISION-main =      9
>  REVISION-lldb =      0
>  CATEGORIES = devel
>  DISTFILES =  llvm-${LLVM_V}.src${EXTRACT_SUFX} \
>               cfe-${LLVM_V}.src${EXTRACT_SUFX} \
>               lld-${LLVM_V}.src${EXTRACT_SUFX} \
> -             lldb-${LLVM_V}.src${EXTRACT_SUFX}
> +             lldb-${LLVM_V}.src${EXTRACT_SUFX} \
> +             clang-tools-extra-${LLVM_V}.src${EXTRACT_SUFX}
>  MASTER_SITES =       https://www.llvm.org/releases/${LLVM_V}/
>  EXTRACT_SUFX =       .tar.xz
>  
> @@ -42,10 +45,10 @@ MAINTAINER=       Jeremie Courreges-Anglas <jc
>  # BSD
>  PERMIT_PACKAGE_CDROM =       Yes
>  
> -WANTLIB =    ${COMPILER_LIBCXX} c curses edit form m panel pthread \
> +WANTLIB =    ${COMPILER_LIBCXX} c edit form m panel pthread \
>               ${MODPY_WANTLIB} z
>  
> -PSEUDO_FLAVORS = no_lldb
> +PSEUDO_FLAVORS = no_lldb _no_tools

stray _

>  FLAVOR ?=
>  NOT_FOR_ARCHS-lldb = ${GCC4_ARCHS}
>  
> @@ -72,18 +75,24 @@ WANTLIB-python =  clang
>  RUN_DEPENDS-python = ${MODPY_RUN_DEPENDS}
>  LIB_DEPENDS-python = ${BUILD_PKGPATH},-main
>  
> -WANTLIB-lldb =               clang
> +WANTLIB-lldb =               ${COMPILER_LIBCXX} clang c curses edit form m 
> panel
> +WANTLIB-lldb +=              ${MODPY_WANTLIB}
>  LIB_DEPENDS-lldb =   ${BUILD_PKGPATH},-main
>  RUN_DEPENDS-lldb =   ${MODPY_RUN_DEPENDS} \
>                       devel/py-six
>  
> -SEPARATE_BUILD =     Yes
> -CONFIGURE_ARGS =     -DLLVM_ENABLE_FFI:Bool=False \
> -                     -DLLVM_ENABLE_TERMINFO:Bool=False \
> -                     -DLLVM_ENABLE_RTTI:Bool=True \
> -                     -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2:Bool=True \
> -                     -DLLVM_LINK_LLVM_DYLIB:Bool=True \
> -                     -DLLVM_BUILD_LLVM_DYLIB:Bool=True \
> +WANTLIB-extras =     ${COMPILER_LIBCXX} c m clang
> +LIB_DEPENDS-extras = ${BUILD_PKGPATH},-main
> +RUN_DEPENDS-extras = ${MODPY_RUN_DEPENDS}
> +
> +CONFIGURE_ARGS =     -DLLVM_ENABLE_FFI=False \
> +                     -DLLVM_ENABLE_TERMINFO=False \
> +                     -DLLVM_ENABLE_RTTI=True \
> +                     -DCLANG_ENABLE_STATIC_ANALYZER=True \
> +                     -DCLANG_INCLUDE_TESTS=True \
> +                     -DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=True \
> +                     -DLLVM_LINK_LLVM_DYLIB=True \
> +                     -DLLVM_BUILD_LLVM_DYLIB=True \
>                       -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND \
>                       -DBacktrace_LIBRARY=''

There would be a cleaner commit log if the unnecessary changes were done 
separately

> @@ -111,7 +120,7 @@ PKG_ARGS +=               -Dpowerpc=1
>  PKG_ARGS +=          -Dpowerpc=0
>  .endif
>  
> -TEST_TARGET =                check
> +TEST_TARGET =                check-clang{,-tools}

yeuuw

TEST_TARGET =   check-clang check-clang-tools

>  
>  # XXX sync
>  GCC_VER =            4.9.4
> @@ -127,12 +136,16 @@ post-extract:
>       mv ${WRKDIR}/cfe-${LLVM_V}.src ${WRKSRC}/tools/clang
>       mv ${WRKDIR}/lld-${LLVM_V}.src ${WRKSRC}/tools/lld
>       mv ${WRKDIR}/lldb-${LLVM_V}.src ${WRKSRC}/tools/lldb
> +     mv ${WRKDIR}/clang-tools-extra-${LLVM_V}.src 
> ${WRKSRC}/tools/clang/tools/extra
>  
>  pre-configure:
>       @${SUBST_CMD} ${WRKSRC}/tools/clang/lib/Driver/ToolChains/OpenBSD.cpp
>       -@ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
>  .if !${BUILD_PACKAGES:M-lldb}
>       rm -r ${WRKSRC}/tools/lldb
> +.endif
> +.if !${BUILD_PACKAGES:M-extras}
> +     rm -r ${WRKSRC}/tools/clang/tools/extra
>  .endif
>  
>  post-build:
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/llvm/distinfo,v
> retrieving revision 1.30
> diff -u -p -u -p -r1.30 distinfo
> --- distinfo  28 Jan 2019 06:27:28 -0000      1.30
> +++ distinfo  1 Apr 2019 06:25:18 -0000
> @@ -1,8 +1,10 @@
>  SHA256 (cfe-7.0.1.src.tar.xz) = pFti3eXX1f3N+odrCvkvFk1DSwbp6JtdCxy8Zd/j9Bg=
> +SHA256 (clang-tools-extra-7.0.1.src.tar.xz) = 
> TJPH0rsHkjqLJy2j73kUQ4CArraTcl9PxcGc0OJhO+0=
>  SHA256 (lld-7.0.1.src.tar.xz) = iGmqst0tjgDWmUM1LTFm0VnX6uJhX2amhPSgmZ/HQDE=
>  SHA256 (lldb-7.0.1.src.tar.xz) = drRr51tBKj0i8NJieTBq5+J0/k15iKIYTFKcOKanaYI=
>  SHA256 (llvm-7.0.1.src.tar.xz) = o438TbRxAux53MKqYek3IsX28G8KlhBzvYS3j7lJQZs=
>  SIZE (cfe-7.0.1.src.tar.xz) = 12488668
> +SIZE (clang-tools-extra-7.0.1.src.tar.xz) = 901368
>  SIZE (lld-7.0.1.src.tar.xz) = 912812
>  SIZE (lldb-7.0.1.src.tar.xz) = 19384628
>  SIZE (llvm-7.0.1.src.tar.xz) = 28311056
> Index: pkg/DESCR-extras
> ===================================================================
> RCS file: pkg/DESCR-extras
> diff -N pkg/DESCR-extras
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/DESCR-extras  1 Apr 2019 06:25:18 -0000
> @@ -0,0 +1,14 @@
> +The clang-tools-extra contains helpful developer tools using Clangs tooling
> +APIs.

Clangs -> Clang's

> +
> +- clang-tidy, is a clang-based C++ linter tool.
> +- clang-include-fixer, adds missing namespace qualifiers to all instances of 
> an
> +  unidentified symbol if the symbol is missing some prefix namespace
> +  qualifiers.
> +- modularize,is a standalone tool that checks whether a set of headers 
> provides
> +  the consistent definitions required to use modules.
> +- pp-trace is a standalone tool that traces preprocessor activity.
> +- clang-rename is a C++ refactoring tool.
> +- clangd is a language server that implements the Language Server Protocol.
> +- clang-doc is a tool for generating C and C++ documenation from source code
> +  and comments.

this is a bit inconsistent, there are some typos/whitespace issues,
some of the things described are not packaged, and some of the things
packaged are not described

> Index: pkg/PLIST-extras
> ===================================================================
> RCS file: pkg/PLIST-extras
> diff -N pkg/PLIST-extras
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ pkg/PLIST-extras  1 Apr 2019 06:25:18 -0000

needs sorting.

what are all the installed static libraries for?

Reply via email to