diff options
Diffstat (limited to 'dev-libs/libcec')
-rw-r--r-- | dev-libs/libcec/Manifest | 5 | ||||
-rw-r--r-- | dev-libs/libcec/files/libcec-4.0.7-no-override-udev.patch | 24 | ||||
-rw-r--r-- | dev-libs/libcec/libcec-4.0.7.ebuild | 122 | ||||
-rw-r--r-- | dev-libs/libcec/metadata.xml | 3 |
4 files changed, 153 insertions, 1 deletions
diff --git a/dev-libs/libcec/Manifest b/dev-libs/libcec/Manifest index f108b94115eb..75c4a0b749c1 100644 --- a/dev-libs/libcec/Manifest +++ b/dev-libs/libcec/Manifest @@ -1,6 +1,9 @@ AUX libcec-4.0.2-no-tinfo.patch 829 BLAKE2B 2051bef2e92fa61f4afa90728c99f7943d1d382bb2e91633fd07f8cff73055eecabcd68f3c95928e83ca1e676f3f07c9a5118b51d7cba42029a3826530c3784f SHA512 7ea5c0334535e8f731c12e1f257ff9a08b303ecf449afc0fdff36b1f06107e47356dff42bbf38c9e838adcd511e059e71179fefecc892c631a453160576b0e8b +AUX libcec-4.0.7-no-override-udev.patch 850 BLAKE2B ce5c795ba3db2d6600b93af6d15d95794435b22c29eb0b65f1d6dbcbb877f076abafd2b2b8d7bd751b981a34a939d61bf7389118a7252d7fc0517c472f583fc2 SHA512 fb23ccc01fee0c61453490e2f8037b1d30124077847e09f8a5e08365bca3253fa883484d412ae1f60cd7beefc6f2075a83bcdd36e160b14ebae23f4be41fb78b DIST libcec-4.0.2.tar.gz 334995 BLAKE2B bdbebeb339ce39f2f740805c4c627cc5190cc0dd57d0d87e3d3aa4ba8feeba103336d035fb8b282358f2e08fa470111be43df4df48870be0e9aa93f35434d0ef SHA512 7bb80965cd1bef713f59bff136dc4a7f1172c4a9bdb8e2f59c6bcc5b74110848c0b2912263280ea68177908a688127e8d7208fc43ce6e65d589343b85395a0bb DIST libcec-4.0.4.tar.gz 344976 BLAKE2B ce88730ee6e9f57a3f874dd47343e8bb12bd9d3644b58703f0b797bfe656fa25461e6847db4023fec92d9e9740f0e58b59a203258d39d8883b8ae9cde147f455 SHA512 8991ba96fe9a87e5e1f63ff87f77fc0fc3b735c537e2ee6cb004fdc264d75cecd043e39b49cf9e64aeadd24bb1fb57911d9c4bd6c494d9ba4035d7320c268116 +DIST libcec-4.0.7.tar.gz 355249 BLAKE2B 5f742364804d0d10cfcd71635645d33c3dfde200e79332470d2b5b2e64966834a0604d4684ad5919a00aaf60f05f4dbbbc9ce13a0dcf0ba4fa11d1f6a0391673 SHA512 424540a45f9cae3d5dcccc615d487c45033f9cdeb665b8176832495597e2cd58ef7681e13b52f6a32f8a40e1146c04a1a383f5785ea1e731c5c517a9a7843a81 EBUILD libcec-4.0.2-r2.ebuild 2146 BLAKE2B df530ef55089bb3f35de91a3dcd0166688c437526d6e6129d730326b8bf20ac1ea0a226417d4ac893fcaba43103fb1106186c74b72de2bc23f4d6cdd83d6a883 SHA512 28e88a43c8dc584161f256b174f6151dbcb5d97b326a1b9da784083e16616dcbb971a11c4894dc65b2c762fef1c870f284da0133ec1e81f631c6b931358f6296 EBUILD libcec-4.0.4-r1.ebuild 2040 BLAKE2B e304595a2b71afee365435d94118a21a3fd14098d2d88be082d96ccbd35d74e3bbf88eff89e880e26480af375505afc1d45ad5adddde687907e1ffa5bc95cc40 SHA512 2033915d614f6155ee1d5bcb287a4218ffa3b116247e33d06ce8979950abd202fcddb5fda32937310a46ad7180e86f78eb9a72f4b4476a52887e82828a65971b -MISC metadata.xml 662 BLAKE2B d87a9b256eb1cec65184415c8172819e8ffd47f38da6ef0aab46c0b8c40ff09b6b365d4051d44d2fee46a4bb0a7c0fbc0a87d92a171e92961b6f6b7a50d5868d SHA512 5abf50f31e2a18c7a5fce12414dd74efab13be9ea00a70b84384de8f95722f327d7446f51369b7feb33616bc0ff182cbbb7dd0be2855f5b54aee4e3c69dbc59e +EBUILD libcec-4.0.7.ebuild 3297 BLAKE2B 50f35a47f4ed68092f94f6e2c9e2a5b5a4de0bc6c4181b28ee212f4ec8ffd0dac9b0c04c662cba3286293c766304f632b75ef800c89d856c2451f38d76505127 SHA512 e77db16d409ec6412f2734a58b501ef6ee7f0289b17519e0af9c3a410cd1cd9ba74236c1875ce5b7fecc6020c1bb0dda14f5aedb9c75b435432423a6fe51eb1d +MISC metadata.xml 911 BLAKE2B a1c97593e181f44ae3c90ba70e8d36344272663b3d7090ca9b2716df532903ec821009321b0183dfa82b6c881349f559216ff040ed1f45e78c214c8601ab67d1 SHA512 7c5dd62ea6d854fdc4e7083487e141c703543d7220ca98fb9431279080ead371a42ee386d1c015dbfc3ea96e183cf4b8f810d8a6a5791d58aca4b3cdb38a7dab diff --git a/dev-libs/libcec/files/libcec-4.0.7-no-override-udev.patch b/dev-libs/libcec/files/libcec-4.0.7-no-override-udev.patch new file mode 100644 index 000000000000..d5b7f8664a30 --- /dev/null +++ b/dev-libs/libcec/files/libcec-4.0.7-no-override-udev.patch @@ -0,0 +1,24 @@ + src/libcec/cmake/CheckPlatformSupport.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake +index 5d423df..9e77924 100644 +--- a/src/libcec/cmake/CheckPlatformSupport.cmake ++++ b/src/libcec/cmake/CheckPlatformSupport.cmake +@@ -90,6 +90,7 @@ else() + check_function_exists(flock HAVE_FLOCK) + + # udev ++ if (${HAVE_LIBUDEV}) + pkg_check_modules(UDEV udev) + if (UDEV_FOUND) + set(PLATFORM_LIBREQUIRES "${PLATFORM_LIBREQUIRES} ${UDEV_LIBRARIES}") +@@ -106,6 +107,7 @@ else() + list(APPEND CMAKE_REQUIRED_LIBRARIES "${UDEV_LIBRARIES}") + set(HAVE_P8_USB_DETECT ON CACHE BOOL "p8 usb-cec detection supported" FORCE) + endif() ++ endif() + + # xrandr + check_include_files("X11/Xlib.h;X11/Xatom.h;X11/extensions/Xrandr.h" HAVE_RANDR_HEADERS) + diff --git a/dev-libs/libcec/libcec-4.0.7.ebuild b/dev-libs/libcec/libcec-4.0.7.ebuild new file mode 100644 index 000000000000..67a73ca791e6 --- /dev/null +++ b/dev-libs/libcec/libcec-4.0.7.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{3_6,3_7,3_8} ) +MY_PV=${PV/_p/-} +MY_P=${PN}-${MY_PV} + +inherit cmake-utils linux-info python-single-r1 toolchain-funcs + +DESCRIPTION="Library for communicating with the Pulse-Eight USB HDMI-CEC Adaptor" +HOMEPAGE="http://libcec.pulse-eight.com" +SRC_URI="https://github.com/Pulse-Eight/${PN}/archive/${MY_P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" +IUSE="cubox exynos python raspberry-pi kernel-cec tools +xrandr udev" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND="udev? ( virtual/udev ) + >=dev-libs/libplatform-2.0.0 + tools? ( sys-libs/ncurses:= ) + raspberry-pi? ( >=media-libs/raspberrypi-userland-0_pre20160305-r1 ) + xrandr? ( x11-libs/libXrandr ) + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND} + python? ( dev-lang/swig )" + +BDEPEND="virtual/pkgconfig" + +CONFIG_CHECK="~USB_ACM" + +S="${WORKDIR}/${PN}-${MY_P}" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.7-no-override-udev.patch" + ) + +pkg_pretend() { + use udev || CONFIG_CHECK+=" ~SYSFS" + ERROR_SYSFS="When using libcec build without udev, kernel config option CONFIG_SYSFS is required to automatically detect P8 USB-CEC adapter port number" + + linux-info_pkg_setup +} + +pkg_setup() { + linux-info_pkg_setup + use python && python-single-r1_pkg_setup +} + +src_prepare() { + cmake-utils_src_prepare + + # Do not hardcode the python libpath #577612 + sed -i \ + -e '/DESTINATION/s:"lib/python${PYTHON_VERSION}/${PYTHON_PKG_DIR}":${PYTHON_SITEDIR}:' \ + src/libcec/cmake/CheckPlatformSupport.cmake || die + + sed -Ee 's|[ ~]?#DIST#;?||g' debian/changelog.in > ChangeLog || die + + (use tools && use python) || cmake_comment_add_subdirectory "src/pyCecClient" + + if ! use tools; then + cmake_comment_add_subdirectory "src/cec-client" + cmake_comment_add_subdirectory "src/cecc-client" + sed -i -Ee 's|add_dependencies\(cecc?-client cec\)|#DO NOT BUILD \0|' \ + CMakeLists.txt || die + fi +} + +src_configure() { + local mycmakeargs=( + -DHAVE_LINUX_API=$(usex kernel-cec ON OFF) + -DHAVE_LIBUDEV=$(usex udev ON OFF) + -DSKIP_PYTHON_WRAPPER=$(usex python OFF ON) + -DHAVE_EXYNOS_API=$(usex exynos ON OFF) + -DHAVE_TDA995X_API=$(usex cubox ON OFF) + -DHAVE_RPI_API=$(usex raspberry-pi ON OFF) + ) + + if linux_config_exists && linux_chkconfig_present SYSFS; then + mycmakeargs+=( -DHAVE_P8_USB_DETECT=ON ) + fi + + # raspberrypi-userland itself does not provide .pc file so using + # bcm_host.pc instead + use raspberry-pi && mycmakeargs+=( + -DRPI_INCLUDE_DIR=$( $(tc-getPKG_CONFIG) --variable=includedir bcm_host) \ + -DRPI_LIB_DIR=$( $(tc-getPKG_CONFIG) --variable=libdir bcm_host) + ) + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + + use udev && \ + cp "${S}/debian/pulse-eight-usb-cec.udev" \ + "${BUILD_DIR}/65-pulse-eight-usb-cec.udev" || die +} + +src_install() { + cmake-utils_src_install + + use python && python_optimize "${D}$(python_get_sitedir)" + + use tools && doman debian/cec-client.1 + + if use udev; then + insinto /lib/udev/rules.d + doins "${BUILD_DIR}/65-pulse-eight-usb-cec.udev" + fi +} + +pkg_postinst() { + elog "You will need to ensure the user running your CEC client has" + elog "read/write access to the device. You can ensure this by adding" + elog "them to the uucp group" +} diff --git a/dev-libs/libcec/metadata.xml b/dev-libs/libcec/metadata.xml index 29b2c8ce0c4b..078ed9ec4a2c 100644 --- a/dev-libs/libcec/metadata.xml +++ b/dev-libs/libcec/metadata.xml @@ -10,6 +10,9 @@ <flag name="exynos">Enable support for Exynos chipsets</flag> <flag name="raspberry-pi">Enable support for the Raspberry Pi</flag> <flag name="xrandr">Enable detection of active HDMI using xrandr extensions</flag> + <flag name="kernel-cec">Enable support for Linux kernel CEC framework</flag> + <flag name="tools">Enable build of cec-client and other test and demo executable tools</flag> + <flag name="udev">Enable detection of USB-CEC port by udev</flag> </use> <upstream> <remote-id type="github">Pulse-Eight/libcec</remote-id> |