Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 908391 - [guru] media-sound/musikcube-3.0.1 one or more CMake variables were not used by the project
Summary: [guru] media-sound/musikcube-3.0.1 one or more CMake variables were not used ...
Status: RESOLVED FIXED
Alias: None
Product: GURU
Classification: Unclassified
Component: Package issues (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: YiFei Zhu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: qa-guru
  Show dependency tree
 
Reported: 2023-06-12 06:59 UTC by Agostino Sarubbo
Modified: 2023-06-15 09:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,332.71 KB, text/plain)
2023-06-12 06:59 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-06-12 06:59:17 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: media-sound/musikcube-3.0.1 one or more CMake variables were not used by the project.
Discovered on: amd64 (internal ref: guru_ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-06-12 06:59:20 UTC
Created attachment 863724 [details]
build.log

build log and emerge --info
Comment 2 YiFei Zhu 2023-06-12 07:13:34 UTC
Man, making an ebuild for this package has been hard.

The upstream cmake looks like

  if (USE_ELOGIND MATCHES "true")
    set(SDBUS "libelogind >= 239.3")
  elseif (USE_BASU MATCHES "true")
    set(SDBUS "basu")
  else()
    set(SDBUS "libsystemd")
  endif()

What's the best way to approach this? Only provide the cmake flag when the USE flag is set? i.e.

Instead of
  mycmakeargs+=(
      -DUSE_ELOGIND=$(usex elogind true false)
      -DUSE_BASU=$(usex basu true false)
  )
do
  mycmakeargs+=(
      $(usex elogind '' -DUSE_ELOGIND=true)
      $(usex basu '' -DUSE_BASU=true)
  )
Comment 3 Andrew Nowa Ammerlaan gentoo-dev 2023-06-13 09:06:42 UTC
(In reply to YiFei Zhu from comment #2)
>   mycmakeargs+=(
>       $(usex elogind '' -DUSE_ELOGIND=true)
>       $(usex basu '' -DUSE_BASU=true)
>   )

This is simpler:
if use elogind; then
    mycmakeargs+=( -DUSE_ELOGIND=ON )
fi
etc
Comment 4 YiFei Zhu 2023-06-13 09:13:22 UTC
(In reply to Andrew Ammerlaan from comment #3)
> (In reply to YiFei Zhu from comment #2)
> >   mycmakeargs+=(
> >       $(usex elogind '' -DUSE_ELOGIND=true)
> >       $(usex basu '' -DUSE_BASU=true)
> >   )
> 
> This is simpler:
> if use elogind; then
>     mycmakeargs+=( -DUSE_ELOGIND=ON )
> fi
> etc

Ok, applied. Thanks!
Comment 5 Larry the Git Cow gentoo-dev 2023-06-15 09:33:52 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=6b6874185544be61b7dbadf06313eb32ad822e63

commit 6b6874185544be61b7dbadf06313eb32ad822e63
Author:     YiFei Zhu <zhuyifei1999@gmail.com>
AuthorDate: 2023-06-13 09:10:56 +0000
Commit:     YiFei Zhu <zhuyifei1999@gmail.com>
CommitDate: 2023-06-13 09:12:10 +0000

    media-sound/musikcube: Fix some CMake variables being unused
    
    Closes: https://bugs.gentoo.org/908391
    Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>

 media-sound/musikcube/musikcube-3.0.1.ebuild | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)