You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.4 KiB
63 lines
1.4 KiB
9 months ago
|
# Copyright 1999-2023 Gentoo Authors
|
||
6 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=8
|
||
6 years ago
|
|
||
3 years ago
|
inherit cmake flag-o-matic linux-info udev
|
||
6 years ago
|
|
||
|
DESCRIPTION="turns FL2000-based USB 3.0 to VGA adapters into low cost DACs"
|
||
|
HOMEPAGE="https://osmocom.org/projects/osmo-fl2k/wiki"
|
||
|
|
||
|
if [[ ${PV} == "9999" ]]; then
|
||
|
inherit git-r3
|
||
9 months ago
|
EGIT_REPO_URI="https://gitea.osmocom.org/sdr/osmo-fl2k"
|
||
6 years ago
|
else
|
||
|
KEYWORDS="~amd64"
|
||
9 months ago
|
SRC_URI="https://gitea.osmocom.org/sdr/osmo-fl2k/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
S="${WORKDIR}/${PN}"
|
||
6 years ago
|
fi
|
||
|
|
||
|
LICENSE="GPL-2+"
|
||
|
SLOT="0"
|
||
|
|
||
|
IUSE="udev"
|
||
|
|
||
|
DEPEND="virtual/libusb:1"
|
||
3 years ago
|
RDEPEND="${DEPEND}
|
||
|
media-sound/sox
|
||
|
sys-apps/pv"
|
||
6 years ago
|
|
||
|
# continguous memory allocator can optionally be used for zero-copy transfer
|
||
|
# TODO: tell users to set CONFIG_CMA_SIZE_MBYTES or boot with cma=... parameter
|
||
|
CONFIG_CHECK="~CMA ~DMA_CMA"
|
||
|
|
||
|
src_configure() {
|
||
|
# udev rules use wrong filename and would go to wrong directory anyway
|
||
|
local mycmakeargs=(
|
||
|
-DLIB_INSTALL_DIR="/usr/$(get_libdir)"
|
||
|
-DINSTALL_UDEV_RULES=OFF
|
||
|
)
|
||
6 years ago
|
#https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49653
|
||
|
replace-flags -O0 -O2
|
||
|
replace-flags -Os -O2
|
||
3 years ago
|
cmake_src_configure
|
||
6 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
|
if use udev; then
|
||
|
udev_newrules ${PN}.rules 99-${PN}.rules
|
||
|
fi
|
||
3 years ago
|
cmake_src_install
|
||
|
# https://bugs.gentoo.org/727984
|
||
|
# No obvious way to prevent build
|
||
|
find "${ED}" -name libosmo-fl2k.a -delete
|
||
6 years ago
|
}
|
||
9 months ago
|
|
||
|
pkg_postinst() {
|
||
|
udev_reload
|
||
|
}
|
||
|
|
||
|
pkg_postrm() {
|
||
|
udev_reload
|
||
|
}
|