diff --git a/common/shlibs b/common/shlibs index 142d4ba70a9..d2014a48b20 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1203,3 +1203,4 @@ libopenmaxil.so rpi-firmware-20130228_1 libvchiq_arm.so rpi-firmware-20130228_1 libvcos.so rpi-firmware-20130228_1 liblockdev.so.1 lockdev-1.0.3_1 +libcec.so.2 libcec-2.1.1_1 diff --git a/srcpkgs/cec-client b/srcpkgs/cec-client new file mode 120000 index 00000000000..de19fbe0575 --- /dev/null +++ b/srcpkgs/cec-client @@ -0,0 +1 @@ +libcec \ No newline at end of file diff --git a/srcpkgs/libcec/cec-client.template b/srcpkgs/libcec/cec-client.template new file mode 100644 index 00000000000..3a6dd2b947f --- /dev/null +++ b/srcpkgs/libcec/cec-client.template @@ -0,0 +1,8 @@ +# Template file for 'cec-client'. +# +depends="libcec>=${version}" +short_desc="${short_desc} -- client tool" + +do_install() { + vmove usr/bin usr +} diff --git a/srcpkgs/libcec/libcec-devel.template b/srcpkgs/libcec/libcec-devel.template new file mode 100644 index 00000000000..8b40372e72f --- /dev/null +++ b/srcpkgs/libcec/libcec-devel.template @@ -0,0 +1,10 @@ +# Template file for 'libcec-devel'. +# +depends="libcec>=$version" +short_desc="${short_desc} -- development files" + +do_install() { + vmove usr/include usr + vmove "usr/lib/*.a" usr/lib + vmove usr/lib/pkgconfig usr/lib +} diff --git a/srcpkgs/libcec/template b/srcpkgs/libcec/template new file mode 100644 index 00000000000..cb75c016f56 --- /dev/null +++ b/srcpkgs/libcec/template @@ -0,0 +1,45 @@ +# Template file for 'libcec' +pkgname=libcec +version=2.1.1 +revision=1 +wrksrc="${pkgname}-${pkgname}-${version}" +subpackages="cec-client ${pkgname}-devel" +short_desc="USB CEC Adapter communication Library" +maintainer="Juan RP " +homepage="https://github.com/Pulse-Eight/libcec" +license="GPL-2" +distfiles="https://github.com/Pulse-Eight/libcec/archive/libcec-${version}.tar.gz" +checksum=f61378798d900d496ed3a5ff7747b0bb35bdfec9b5c4168dcea38396e3569bf1 + +hostmakedepends="automake pkg-config" +makedepends="libudev-devel lockdev-devel" + +if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then + makedepends="${makedepends} rpi-firmware" +fi + +pre_configure() { + autoreconf -fi +} + +do_configure() { + if [ "$XBPS_TARGET_MACHINE" = "armv6l" ]; then + _rpiargs="--enable-rpi" + if [ "$XBPS_CROSS_BASE" ]; then + _rpiargs="${_rpiargs} --with-rpi-include-path=${XBPS_CROSS_BASE}/opt/vc/include" + _rpiargs="${_rpiargs} --with-rpi-lib-path=${XBPS_CROSS_BASE}/opt/vc/lib" + else + _rpiargs="${_rpiargs} --with-rpi-include-path=/opt/vc/include" + _rpiargs="${_rpiargs} --with-rpi-lib-path=/opt/vc/lib" + fi + fi + ./configure ${CONFIGURE_SHARED_ARGS} ${_rpiargs} LDFLAGS= +} + +do_build() { + make ${makejobs} +} + +do_install() { + make DESTDIR=${DESTDIR} install +}