# Copyright 1999-2022 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=7 URELEASE="jammy" inherit autotools eutils ubuntu-versionator MY_P="${PN}_${PV}" S="${WORKDIR}/${PN}-${PV}" UVER_PREFIX="+18.04.${PVR_MICRO}" DESCRIPTION="A set of symbols and convenience functions that all indicators would like to use" HOMEPAGE="https://launchpad.net/libindicator" SRC_URI="${UURL}/${MY_P}${UVER_PREFIX}.orig.tar.gz ${UURL}/${MY_P}${UVER_PREFIX}-${UVER}.diff.gz" LICENSE="GPL-3" SLOT="3/7.0.0" KEYWORDS="~amd64 ~x86" IUSE="" RESTRICT="mirror" RDEPEND=">=x11-libs/gtk+-2.18:2 >=x11-libs/gtk+-3.2:3 x11-libs/libXfixes" DEPEND="${RDEPEND} >=dev-libs/glib-2.37 >=unity-indicators/ido-13.10.0 virtual/pkgconfig !<${CATEGORY}/${PN}-0.4.1-r201" S="${WORKDIR}" MAKEOPTS="${MAKEOPTS} -j1" src_prepare() { eapply -p1 "${WORKDIR}/${MY_P}${UVER_PREFIX}-${UVER}.diff" || die ubuntu-versionator_src_prepare # Make configure.ac compatible with >=pkgconfig-0.29 (fix bad spacing) # sed -e 's:LIBINDICATOR_LIBS+="$LIBM":LIBINDICATOR_LIBS+=" $LIBM":g' \ -i configure.ac eautoreconf } src_configure() { # Build GTK2 support # [[ -d build-gtk2 ]] || mkdir build-gtk2 pushd build-gtk2 ../configure --prefix=/usr \ --libdir=/usr/$(get_libdir) \ --enable-debug \ --disable-static \ --with-gtk=2 || die popd # Build GTK3 support # [[ -d build-gtk3 ]] || mkdir build-gtk3 pushd build-gtk3 ../configure --prefix=/usr \ --libdir=/usr/$(get_libdir) \ --enable-debug \ --disable-static \ --with-gtk=3 || die popd } src_compile() { # Build GTK2 support # pushd build-gtk2 emake || die popd # Build GTK3 support # pushd build-gtk3 emake || die popd } src_install() { # Install GTK2 support # pushd build-gtk2 emake DESTDIR="${D}" install || die popd # Install GTK3 support # pushd build-gtk3 emake -C libindicator DESTDIR="${D}" install || die emake -C tools DESTDIR="${D}" install || die popd # Remove dummy files as per Ubuntu, unused and files collide with dev-libs/libayatana-indicator # rm -fv "${ED}"/usr/$(get_libdir)/libdummy-indicator* # Remove unused libtool libarchive files # find "${ED}" -name '*.la' -delete || die }