diff options
author | 2022-06-19 11:50:15 -0700 | |
---|---|---|
committer | 2022-06-20 03:03:25 +0100 | |
commit | 3081963d2dd734d8b6dba4845ce766b566941998 (patch) | |
tree | adb32e7aaaedb94bcdb4748cd4b27f70c7696ba5 /sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild | |
parent | app-emacs/fsharp-mode: bump to 2.0 (diff) | |
download | gentoo-3081963d2dd734d8b6dba4845ce766b566941998.tar.gz gentoo-3081963d2dd734d8b6dba4845ce766b566941998.tar.bz2 gentoo-3081963d2dd734d8b6dba4845ce766b566941998.zip |
sys-apps/apmd: Fix the build with rlibtool
When building with rlibtool the build will fail because there is no
generated libtool to determine if building shared or static. This adds a
minimal autoreconf to fix the build.
Closes: https://bugs.gentoo.org/851801
Closes: https://bugs.gentoo.org/778383
Signed-off-by: orbea <orbea@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/25980
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild')
-rw-r--r-- | sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild b/sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild new file mode 100644 index 000000000000..1b02dedb3c54 --- /dev/null +++ b/sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +MY_PV="${PV%_p*}" +MY_P="${PN}_${MY_PV}" +PATCHV="${PV#*_p}" + +DESCRIPTION="Advanced Power Management Daemon" +HOMEPAGE="https://packages.qa.debian.org/a/apmd.html" +SRC_URI="mirror://debian/pool/main/a/apmd/${MY_P}.orig.tar.gz + mirror://debian/pool/main/a/apmd/${MY_P}-${PATCHV}.diff.gz" +S="${WORKDIR}/${PN}-${MY_PV}.orig" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="nls X" + +RDEPEND=" + >=sys-apps/debianutils-1.16 + >=sys-power/powermgmt-base-1.31 + X? ( + x11-libs/libX11 + x11-libs/libXaw + x11-libs/libXmu + x11-libs/libSM + x11-libs/libICE + x11-libs/libXt + x11-libs/libXext + )" +DEPEND="${RDEPEND} + virtual/os-headers" + +PATCHES=( + "${WORKDIR}"/${MY_P}-${PATCHV}.diff + "${FILESDIR}"/${PN}-${MY_PV}-libtool.patch # 778383 +) + +src_prepare() { + default + + if ! use X; then + sed -i \ + -e 's:\(EXES=.*\)xapm:\1:' \ + -e 's:\(.*\)\$(LT_INSTALL).*xapm.*$:\1echo:' \ + Makefile.in || die + fi + + # use system headers and skip on_ac_power + rm on_ac_power* || die + + sed -i \ + -e '/on_ac_power/d' \ + -e 's:-I/usr/src/linux/include -I/usr/X11R6/include::' \ + -e 's:-L/usr/X11R6/lib::' \ + Makefile.in || die + + eautoreconf +} + +src_install() { + emake DESTDIR="${D}" install + + keepdir /etc/apm/{event.d,suspend.d,resume.d,other.d,scripts.d} + exeinto /etc/apm + doexe debian/apmd_proxy + dodoc AUTHORS {,apmsleep.}README debian/{changelog,README.Debian} + + doman *.{1,8} + + # note: apmd_proxy.conf is currently disabled and not used, thus + # not installed - liquidx (01 Mar 2004) + + newconfd "${FILESDIR}"/apmd.confd apmd + newinitd "${FILESDIR}"/apmd.rc6 apmd + + if ! use nls; then + rm -r "${ED}"/usr/share/man/fr || die + fi + + find "${ED}" -name '*.la' -delete || die +} |