Bug 239313 - graphics/mesa-dri could use a test for the installed llvm
Summary: graphics/mesa-dri could use a test for the installed llvm
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-x11 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-19 18:00 UTC by dewayne
Modified: 2019-07-22 00:07 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dewayne 2019-07-19 18:00:57 UTC

    
Comment 1 dewayne 2019-07-20 01:37:43 UTC
As I have clang 8.0.0 from the base os and gcc9 for those tricky ports, I find that mesa-dri requires a build of llvm8.  Can I suggest that a test for the CC be included and possibly wrapped around this segment from the Makefile.common

.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marm*} || ${ARCH} == i386 || ${ARCH:Mmi
BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT}
.if ${COMPONENT} != libs
RUN_DEPENDS+=   llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT}
.endif
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT}
LDFLAGS+=       -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib
CONFIGURE_ARGS+=        --enable-llvm
.else
CONFIGURE_ARGS+=        --disable-llvm
.endif

This would reduce the unnecessary dependency and ongoing maintenance.  (as well as the build time ;) )

My apologies if llvm is actually required regardless of the available compiler on the build machine, but this is pulled in due to libepoxy even though I tell qemu not to use x11.  A complex web!
Comment 2 Charlie Li 2019-07-21 00:36:01 UTC
(In reply to dewayne from comment #1)
> This would reduce the unnecessary dependency and ongoing maintenance.  (as
> well as the build time ;) )
> 
In short, no. Please refer to https://wiki.freebsd.org/WhyDoIHaveToBuildLLVMWhenIAlreadyHaveClangInstalled and bug 238906 comment 14 for the details.
> My apologies if llvm is actually required regardless of the available
> compiler on the build machine, but this is pulled in due to libepoxy even
> though I tell qemu not to use x11.  A complex web!
emulators/qemu has a GTK3 option, which implies X11 (and graphics/libepoxy). Unset GTK3 and the dependency should go away.
Comment 3 dewayne 2019-07-22 00:07:27 UTC
(In reply to Charlie Li from comment #2)
Thank-you for the pointer.  And yes, I do disable GTK3 and X11 in the config settings, as well as modified the Makefile to remove gl from USES but the reliance upon mesa-* remains.  Regardless I appreciate your consideration, and as this is intended will close the PR.