Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Need help with new cmake ebuild [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Wed Mar 28, 2018 11:53 pm    Post subject: Need help with new cmake ebuild [SOLVED] Reply with quote

Writing a new ebuild from scratch for http://ssj71.github.io/infamousPlugins/index.html

The src README:
Code:

To install, fulfill the dependencies (below), then run the commands:
    mkdir build
    cd build
    cmake ..
    make
    sudo make install


I'm not familiar with writing cmake-based ebuilds from scratch, so I could use some help.

infamousPlugins-0.2.04.ebuild:
Code:

# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Dependencies require GentooStudio overlay + audio-overlay

EAPI=6

inherit cmake-utils

DESCRIPTION="A collection of open-source LV2 plugins"
HOMEPAGE="http://ssj71.github.io/infamousPlugins/index.html"
SRC_URI="https://github.com/ssj71/infamousPlugins/archive/v${PV}.tar.gz"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

# Dependencies call for "ntk-fluid." Not sure what this is.

RDEPEND="x11-libs/ntk
        x11-libs/cairo
        media-libs/lv2
        media-libs/zita-resampler
        sci-libs/fftw:3.0"
DEPEND="${RDEPEND}
        dev-util/cmake"

CMAKE_USE_DIR="${WORKDIR}/${P}/src"

src_prepare(){
       cmake-utils_src_prepare
}

src_configure(){
        cmake-utils_src_configure
}

src_compile(){
   cmake-utils_src_compile
}

src_install(){
   cmake-utils_src_install
}


Whether or not I even use src_prepare, I get:
Code:

>>> Unpacking source...
>>> Unpacking v0.2.04.tar.gz to /var/tmp/portage/media-sound/infamousPlugins-0.2.04/work
>>> Source unpacked in /var/tmp/portage/media-sound/infamousPlugins-0.2.04/work
>>> Preparing source in /var/tmp/portage/media-sound/infamousPlugins-0.2.04/work/infamousPlugins-0.2.04 ...
 * Unable to locate CMakeLists.txt under:
 * "/var/tmp/portage/media-sound/infamousPlugins-0.2.04/work/infamousPlugins-0.2.04/src/CMakeLists.txt"
 * Consider not inheriting the cmake eclass.


I grepped the src files. There's no such txt file included.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN


Last edited by audiodef on Thu Mar 29, 2018 12:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Mar 29, 2018 12:10 am    Post subject: Reply with quote

the file is before the src dir :)
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Mar 29, 2018 1:22 am    Post subject: Reply with quote

Ohhhh... I'll work on that. :)
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
blopsalot
Apprentice
Apprentice


Joined: 28 Jan 2017
Posts: 231

PostPosted: Thu Mar 29, 2018 1:22 am    Post subject: Reply with quote

those are the default phases after you inherit cmake-utils and like krinn said, CMakeLists.txt is always in ${S} not ./src

it may need more work, i didn't follow through :)
Code:
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Dependencies require GentooStudio overlay + audio-overlay

EAPI=6

inherit cmake-utils

DESCRIPTION="A collection of open-source LV2 plugins"
HOMEPAGE="http://ssj71.github.io/infamousPlugins/index.html"
SRC_URI="https://github.com/ssj71/infamousPlugins/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE=""
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

# Dependencies call for "ntk-fluid." Not sure what this is.

RDEPEND="x11-libs/ntk
        x11-libs/cairo
        media-libs/lv2
        media-libs/zita-resampler
        sci-libs/fftw:3.0"
DEPEND="${RDEPEND}
        dev-util/cmake"
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Mar 29, 2018 12:17 pm    Post subject: Reply with quote

I figured it out after going to bed. Fixed it this morning.
Code:

CMAKE_USE_DIR="${WORKDIR}/${P}/src"

Changed to:
Code:

CMAKE_USE_DIR="${WORKDIR}/${P}"


After that, nothing further was needed. Krinn got me on the right path.

"src" was only there because I was observing other cmake ebuilds, not because I intentionally put it there.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30942
Location: here

PostPosted: Thu Mar 29, 2018 12:25 pm    Post subject: Reply with quote

audiodef wrote:
Code:

CMAKE_USE_DIR="${WORKDIR}/${P}/src"

Changed to:
Code:

CMAKE_USE_DIR="${WORKDIR}/${P}"

This is not necessary because CMAKE_USE_DIR by default uses ${S} which in turn by default uses ${WORKDIR}/${P}
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Thu Mar 29, 2018 12:27 pm    Post subject: Reply with quote

Good point, thank you. I was confusing myself by looking at the SRC_URI, now I know better. :)
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Thu Mar 29, 2018 1:44 pm    Post subject: Reply with quote

You've been working hard these days, Gentoo studio major release coming out?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Fri Mar 30, 2018 1:51 pm    Post subject: Reply with quote

No, just the usual ebb and flow of work on Gentoo Studio. It's as much a rolling release as vanilla Gentoo. :)

The March update on the site will list a ton of stuff added to the overlay, though, including a few ebuilds that are completely new to Gentoo.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum