diff options
Diffstat (limited to 'media-sound/csound/csound-9999.ebuild')
-rw-r--r-- | media-sound/csound/csound-9999.ebuild | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/media-sound/csound/csound-9999.ebuild b/media-sound/csound/csound-9999.ebuild index b52669444ab9..93b965bc7303 100644 --- a/media-sound/csound/csound-9999.ebuild +++ b/media-sound/csound/csound-9999.ebuild @@ -7,8 +7,10 @@ EAPI=7 +LUA_COMPAT=( lua5-1 luajit ) PYTHON_COMPAT=( python3_{6,7,8,9} ) -inherit cmake python-single-r1 toolchain-funcs + +inherit cmake lua-single python-single-r1 toolchain-funcs if [[ ${PV} == "9999" ]]; then EGIT_REPO_URI="https://github.com/csound/csound.git" @@ -30,13 +32,13 @@ LICENSE="LGPL-2.1 doc? ( FDL-1.2+ )" SLOT="0" # java doesn't work atm as it needs to have some variables specified to work, see src_configure IUSE="+alsa beats chua curl +cxx debug doc double-precision dssi examples -fltk +fluidsynth hdf5 +image jack keyboard linear lua luajit mp3 nls osc portaudio +fltk +fluidsynth hdf5 +image jack keyboard linear lua mp3 nls osc portaudio portaudio portmidi pulseaudio python samples static-libs stk test +threads +utils vim-syntax websocket" REQUIRED_USE=" linear? ( double-precision ) - lua? ( cxx ) + lua? ( ${LUA_REQUIRED_USE} cxx ) python? ( ${PYTHON_REQUIRED_USE} cxx ) " # java? ( cxx ) @@ -45,6 +47,7 @@ BDEPEND=" sys-devel/flex virtual/yacc chua? ( dev-libs/boost ) + lua? ( dev-lang/swig ) python? ( dev-lang/swig ) nls? ( sys-devel/gettext ) test? ( @@ -74,10 +77,7 @@ CDEPEND=" jack? ( virtual/jack ) keyboard? ( x11-libs/fltk:1[threads?] ) linear? ( =sci-mathematics/gmm-5.1* ) - lua? ( - luajit? ( dev-lang/luajit:2 ) - !luajit? ( dev-lang/lua:0 ) - ) + lua? ( ${LUA_DEPS} ) mp3? ( >=media-sound/lame-3.100-r3 ) osc? ( media-libs/liblo ) portaudio? ( media-libs/portaudio ) @@ -107,6 +107,8 @@ PATCHES=( ) pkg_setup() { + use lua && lua-single_pkg_setup + if use python || use test ; then python-single-r1_pkg_setup fi @@ -200,24 +202,12 @@ src_configure() { #-DJAVA_AWT_INCLUDE_PATH="?" #) - # set the library that we want to use - if use lua ; then - local libdir - local libname - - if use luajit ; then - libdir=$(pkg-config --variable=libdir luajit) - libname=$(pkg-config --variable=libname luajit) - else - libdir=$(pkg-config --variable=libdir lua) - libname=$(pkg-config --variable=libname lua) - [[ -z "${libname}" ]] && libname="lua" - fi - - mycmakeargs+=( - -DLUA_LIBRARY="${libdir}/lib${libname}.so" - ) - fi + use lua && mycmakeargs+=( + -DLUA_H_PATH="$(lua_get_include_dir)" + -DLUA_LIBRARY="$(lua_get_shared_lib)" + # LUA_MODULE_INSTALL_DIR omitted on purpose, csound Lua module links against liblua + # so it must NOT be installed into cmod_dir. + ) use python && mycmakeargs+=( -DPYTHON_MODULE_INSTALL_DIR="$(python_get_sitedir)" |