Open cbirchinger opened 7 months ago
If you want, i did an initial ebuild for drumkv1-0.9.34.ebuild which switched to CMake and QT6, so it's quite different. I haven't tested all possible use flag combinations or the 9999 live build variant.
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg-utils
DESCRIPTION="An old-school all-digital drum-kit sampler synthesizer with stereo fx"
HOMEPAGE="http://drumkv1.sourceforge.net/"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/rncbc/${PN}.git"
KEYWORDS=""
else
MY_PV=$(ver_rs 1- _)
SRC_URI="https://github.com/rncbc/${PN}/archive/${PN}_${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
RESTRICT="mirror"
S="${WORKDIR}/${PN}-${PN}_${MY_PV}"
fi
LICENSE="GPL-2+"
SLOT="0"
IUSE="standalone alsa lv2 osc"
REQUIRED_USE="
|| ( standalone lv2 )
alsa? ( standalone )"
RDEPEND="
dev-qt/qtbase:6=[gui]
media-libs/libsndfile
standalone? ( virtual/jack )
alsa? ( media-libs/alsa-lib )
lv2? ( media-libs/lv2 )
osc? ( media-libs/liblo )
"
DEPEND="${RDEPEND}"
src_prepare() {
# -DCMAKE_BUILD_TYPE=Debug and -DCONFIG_DEBUG=1 wont prevent stripping for some reason
sed -e 's/COMMAND strip/COMMAND true/' \
-i src/CMakeLists.txt || die
cmake_src_prepare
}
src_configure() {
local -a mycmakeargs=(
-DCONFIG_ALSA_MIDI=$(usex alsa 1 0)
-DCONFIG_JACK=$(usex standalone 1 0)
-DCONFIG_JACK_SESSION=$(usex standalone 1 0)
-DCONFIG_JACK_MIDI=$(usex standalone 1 0)
-DCONFIG_LV2=$(usex lv2 1 0)
-DCONFIG_LIBLO=$(usex osc 1 0)
)
cmake_src_configure
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
xdg_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
xdg_icon_cache_update
}
Thank you for your contribution. I've used this to restructure the current ebuilds. Please have a look at PR #561 and see if it works on your machine. Thanks!
That's a very common issue because the current Gentoo QT5 install doesn't have qmake-qt5 but qmake5. Having it use plain qmake and depending on having the correct PATH will also work.
The following in the src_configure section will work around these issues. It's also done this way in certain upstream ebuilds: