Bug 228841

Summary: [maintainer-update] editors/jucipp update to 1.4.4
Product: Ports & Packages Reporter: Mohammad S. Babaei <info>
Component: Individual Port(s)Assignee: Steve Wills <swills>
Status: Closed FIXED    
Severity: Affects Many People    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
jucipp 1.4.1_1 to 1.4.3 patch
none
jucipp 1.4.1_1 to 1.4.4 patch
info: maintainer-approval+
jucipp 1.4.1_1 to 1.4.4 patch info: maintainer-approval+

Description Mohammad S. Babaei 2018-06-09 17:26:58 UTC
Created attachment 194096 [details]
jucipp 1.4.1_1 to 1.4.3 patch
Comment 1 Mohammad S. Babaei 2018-06-11 18:54:54 UTC
Created attachment 194173 [details]
jucipp 1.4.1_1 to 1.4.4 patch
Comment 2 Mohammad S. Babaei 2018-06-11 19:18:12 UTC
Just a note. I noticed if devel/llvm60 is installed already, Ports won't pull in devel/llvm50 as a dependency despite the fact that I specified it in the Makefile:

LIB_DEPENDS=	libaspell.so:textproc/aspell \
		libboost_filesystem.so:devel/boost-libs \
		libgit2.so:devel/libgit2 \
		libclang.so:devel/llvm50

If only llvm60 is installed or both llvm50 and llvm60 installed at the same time, this port will fail to build (it's an issue even with the current one in the ports tree):

In file included from /usr/home/babaei/jucipp/work/jucipp-1.4.4/src/project.cc:11:
/usr/home/babaei/jucipp/work/jucipp-1.4.4/src/debug_lldb.h:4:10: fatal error: 'lldb/API/LLDB.h' file not found
#include <lldb/API/LLDB.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.

That header exists inside /usr/local/llvm50/include/lldb/API/ while llvm60 do not have that header. So, is there a way to make ports always pull in llvm50 and add /usr/local/llvm50/include/lldb/API/ to include search path and /usr/local/llvm50/lib to linker search path?
Comment 3 Mohammad S. Babaei 2018-06-11 19:22:11 UTC
Is it acceptable to add '.5' to libclang.so like this?


LIB_DEPENDS=	libaspell.so:textproc/aspell \
		libboost_filesystem.so:devel/boost-libs \
		libgit2.so:devel/libgit2 \
		libclang.so.5:devel/llvm50

It makes Ports to pull in devel/llvm50.
Comment 4 Mohammad S. Babaei 2018-06-11 19:54:53 UTC
Created attachment 194178 [details]
jucipp 1.4.1_1 to 1.4.4 patch

Never mind. I figured I can pass include and linker search path through CMAKE_ARGS.

CMAKE_ARGS+=	-DCMAKE_INCLUDE_PATH=${LOCALBASE}/llvm50/include \
		-DCMAKE_LIBRARY_PATH=${LOCALBASE}/llvm50/lib

It builds fine now and ldd confirms it links to the correct library:

$ ldd work/stage/usr/local/bin/juci  | grep clang
	libclang.so.5 => /usr/local/llvm50/lib/libclang.so.5 (0x808200000)

If it can be tolerated only portlint complains about the '.5' which is absolutely necessary unless there is another way to pull in llvm50 in case llvm60 is installed:

$ portlint
WARN: Makefile: LIB_DEPENDS don't specify the ABI version number .5 in libclang.so.5 unless it is really necessary.
WARN: Makefile: LIB_DEPENDS the new format is libFOO.so (e.g., liblibclang.so.5.so).
0 fatal errors and 2 warnings found.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-06-14 22:56:15 UTC
A commit references this bug:

Author: swills
Date: Thu Jun 14 22:55:38 UTC 2018
New revision: 472407
URL: https://svnweb.freebsd.org/changeset/ports/472407

Log:
  editors/jucipp: update to 1.4.4

  PR:		228841
  Submitted by:	Mohammad S. Babaei <info@babaei.net>

Changes:
  head/editors/jucipp/Makefile
  head/editors/jucipp/distinfo
Comment 6 Steve Wills freebsd_committer freebsd_triage 2018-06-14 22:56:39 UTC
Committed, thanks!