From 15e6766c1ccbe4e98c944111f03dcdac5da633fc Mon Sep 17 00:00:00 2001 From: Jakov Smolić Date: Fri, 5 Nov 2021 19:12:53 +0100 Subject: sys-apps/apmd: Port to EAPI 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/725534 Closes: https://bugs.gentoo.org/819249 Signed-off-by: Jakov Smolić --- sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild | 78 ----------------------------- sys-apps/apmd/apmd-3.2.2_p14-r2.ebuild | 89 ++++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 78 deletions(-) delete mode 100644 sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild create mode 100644 sys-apps/apmd/apmd-3.2.2_p14-r2.ebuild (limited to 'sys-apps') diff --git a/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild b/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild deleted file mode 100644 index fefa3c983ce8..000000000000 --- a/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 -inherit epatch multilib toolchain-funcs - -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" - -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} - sys-devel/libtool - virtual/os-headers" - -S=${WORKDIR}/${PN}-${MY_PV}.orig - -src_prepare() { - epatch "${WORKDIR}"/${MY_P}-${PATCHV}.diff - - if ! use X; then - sed -i \ - -e 's:\(EXES=.*\)xapm:\1:' \ - -e 's:\(.*\)\$(LT_INSTALL).*xapm.*$:\1echo:' \ - Makefile || die - fi - - # use system headers and skip on_ac_power - rm -f on_ac_power* - - 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 || die -} - -src_compile() { - emake CC=$(tc-getCC) CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" -} - -src_install() { - dodir /usr/sbin - emake DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/$(get_libdir) 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 - - use nls || rm -rf "${D}"/usr/share/man/fr -} diff --git a/sys-apps/apmd/apmd-3.2.2_p14-r2.ebuild b/sys-apps/apmd/apmd-3.2.2_p14-r2.ebuild new file mode 100644 index 000000000000..669ba2f6a4f4 --- /dev/null +++ b/sys-apps/apmd/apmd-3.2.2_p14-r2.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +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" +BDEPEND="sys-devel/libtool" + +PATCHES=( + "${WORKDIR}"/${MY_P}-${PATCHV}.diff +) + +src_prepare() { + default + + if ! use X; then + sed -i \ + -e 's:\(EXES=.*\)xapm:\1:' \ + -e 's:\(.*\)\$(LT_INSTALL).*xapm.*$:\1echo:' \ + Makefile || 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 || die +} + +src_compile() { + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" +} + +src_install() { + dodir /usr/sbin + emake DESTDIR="${D}" PREFIX=/usr LIBDIR=/usr/$(get_libdir) 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 '*.a' -delete || die +} -- cgit v1.2.3-65-gdbad