--- /usr/portage/dev-libs/libcec/libcec-2.1.4.ebuild 2014-03-23 16:24:46.000000000 +0100 +++ dev-libs/libcec/libcec-2.1.4.ebuild 2014-04-04 11:53:03.000000000 +0200 @@ -4,18 +4,19 @@ EAPI=5 -inherit autotools eutils linux-info +inherit autotools eutils flag-o-matic linux-info DESCRIPTION="Library for communicating with the Pulse-Eight USB HDMI-CEC Adaptor" HOMEPAGE="http://libcec.pulse-eight.com" SRC_URI="http://github.com/Pulse-Eight/${PN}/archive/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="debug static-libs" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="debug static-libs video_cards_raspberrypi" RDEPEND="virtual/udev - dev-libs/lockdev" + dev-libs/lockdev + video_cards_raspberrypi? ( media-libs/raspberypi-userland )" DEPEND="${RDEPEND} virtual/pkgconfig" @@ -26,14 +27,30 @@ src_prepare() { sed -i '/^CXXFLAGS/s:-fPIC::' configure.ac || die sed -i '/^CXXFLAGS/s:-Werror::' configure.ac || die + if use video_cards_raspberrypi ;then + # I disable those tests because they fail without changing the success/results of compilation + # When I do at hand the test done by configure it works + sed -i 's,.*vchi_initialise.*,,' configure.ac || die + sed -i 's,.*vchiq_initialise.*,,' configure.ac || die + sed -i 's,.*vchi_create_connection.*,,' configure.ac || die + fi eautoreconf } src_configure() { + local rpi_conf + rpi_conf='--disable-rpi' + if use video_cards_raspberrypi; then + einfo "Enabling raspberry pi options" + append-cppflags -I/opt/vc/include/ + append-ldflags -L/opt/vc/lib/ + rpi_conf='--enable-rpi -with-rpi-include-path=/opt/vc/include/ --with-rpi-lib-path=/opt/vc/lib/' + fi + #TODO the same thing could be do for the cubox econf $(use_enable static-libs static) \ $(use_enable debug) \ + ${rpi_conf} \ --enable-optimisation \ - --disable-rpi \ --disable-cubox }