public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/apmd/, sys-apps/apmd/files/
@ 2016-04-29 19:32 Austin English
  0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-04-29 19:32 UTC (permalink / raw
  To: gentoo-commits

commit:     55a219da8dd36f615b4f60a17dde987b3379ca53
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 29 17:44:19 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Fri Apr 29 19:32:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55a219da

sys-apps/apmd: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild | 79 ++++++++++++++++++++++++++++++++++
 sys-apps/apmd/files/apmd.rc6           |  4 +-
 2 files changed, 81 insertions(+), 2 deletions(-)

diff --git a/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild b/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild
new file mode 100644
index 0000000..a10a659
--- /dev/null
+++ b/sys-apps/apmd/apmd-3.2.2_p14-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils multilib toolchain-funcs
+
+MY_PV=${PV%_p*}
+MY_P=${PN}_${MY_PV}
+PATCHV=${PV#*_p}
+
+DESCRIPTION="Advanced Power Management Daemon"
+HOMEPAGE="http://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/files/apmd.rc6 b/sys-apps/apmd/files/apmd.rc6
index bb5e009..2521dd1 100644
--- a/sys-apps/apmd/files/apmd.rc6
+++ b/sys-apps/apmd/files/apmd.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/apmd/, sys-apps/apmd/files/
@ 2022-06-20  2:03 Sam James
  0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-06-20  2:03 UTC (permalink / raw
  To: gentoo-commits

commit:     3081963d2dd734d8b6dba4845ce766b566941998
Author:     orbea <orbea <AT> riseup <DOT> net>
AuthorDate: Sun Jun 19 18:50:15 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 02:03:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3081963d

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 <AT> riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/25980
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/apmd/apmd-3.2.2_p14-r3.ebuild       |  86 +++++++++++++++++++
 sys-apps/apmd/files/apmd-3.2.2-libtool.patch | 124 +++++++++++++++++++++++++++
 2 files changed, 210 insertions(+)

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
+}

diff --git a/sys-apps/apmd/files/apmd-3.2.2-libtool.patch b/sys-apps/apmd/files/apmd-3.2.2-libtool.patch
new file mode 100644
index 000000000000..814ff9c61679
--- /dev/null
+++ b/sys-apps/apmd/files/apmd-3.2.2-libtool.patch
@@ -0,0 +1,124 @@
+https://bugs.gentoo.org/778383
+
+From: orbea <orbea@riseup.net>
+Date: Sun, 19 Jun 2022 10:56:10 -0700
+Subject: [PATCH] build: Add minimal configure.ac
+
+This is required to generate libtool for the build which allows the
+build with rlibtool to work correctly.
+
+diff --git a/Makefile b/Makefile.in
+similarity index 86%
+rename from Makefile
+rename to Makefile.in
+index 92fc0fd..75e0a3a 100644
+--- a/Makefile
++++ b/Makefile.in
+@@ -19,7 +19,7 @@
+ # $Id: Makefile,v 1.30 2001/11/25 22:46:16 apenwarr Exp $
+ #
+ 
+-VERSION=3.2.1
++VERSION=@PACKAGE_VERSION@
+ LIB_VERSION=1:0
+ 
+ ifneq (,)
+@@ -28,37 +28,39 @@ endif
+ 
+ .SUFFIXES:
+ 
+-OBJS=apmlib.o
++OBJS=apmlib.lo
+ EXES=apm apmd xapm apmsleep
+ HEADERS=apm.h
+ 
+-PREFIX=/usr
+-MANDIR=$(PREFIX)/man
+-BINDIR=$(PREFIX)/bin
+-SBINDIR=$(PREFIX)/sbin
+-LIBDIR=$(PREFIX)/lib
+-INCDIR=$(PREFIX)/include
+-PROXY_DIR=/etc
+-DESTDIR=
+-
+-CC=gcc
+-CFLAGS=-O -g
++prefix := @prefix@
++exec_prefix := @exec_prefix@
++MANDIR := @mandir@
++BINDIR := @bindir@
++SBINDIR := @sbindir@
++LIBDIR := @libdir@
++INCDIR := @includedir@
++PROXY_DIR := @sysconfdir@
++
++CC := @CC@
++CFLAGS := @CFLAGS@
++LDFLAGS := @LDFLAGS@
++
+ XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \
+ 		-I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
+ 		-DVERSION=\"$(VERSION)\" \
+ 		-DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
+-LDFLAGS=
+ LIBAPM=libapm.la
+ LIBAPM_FLAGS=-rpath $(LIBDIR) -version-info $(LIB_VERSION)
+ XLDFLAGS=-L/usr/X11R6/lib
+ XLIBS=-lXaw -lXmu -lXt -lXext -lSM -lICE -lX11
+-RANLIB=ranlib
+ 
+ # Uncomment these lines for a production compile
+ #CFLAGS=-O3 -m486 -fomit-frame-pointer
+ #LDFLAGS=-s
+ 
+-LIBTOOL=libtool --quiet
++top_builddir := @top_builddir@
++
++LIBTOOL = @LIBTOOL@
+ LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
+ LT_LINK = $(LIBTOOL) --mode=link $(CC)
+ LT_INSTALL = $(LIBTOOL) --mode=install install
+@@ -68,22 +70,22 @@ all: $(EXES)
+ 
+ $(OBJS): $(HEADERS)
+ 
+-%.o: %.c
++%.lo: %.c
+ 	$(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $<
+ 
+-%: %.o $(LIBAPM)
++%: %.lo $(LIBAPM)
+ 	$(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM)
+ 
+-xapm.o: xapm.c
++xapm.lo: xapm.c
+ 	$(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $<
+ 
+-apmd: apmd.o
++apmd: apmd.lo
+ 
+-apmsleep: apmsleep.o
++apmsleep: apmsleep.lo
+ 
+-apmexists: apmexists.o
++apmexists: apmexists.lo
+ 
+-xapm: xapm.o $(LIBAPM)
++xapm: xapm.lo $(LIBAPM)
+ 	$(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) $(XLDFLAGS) $(XLIBS)
+ 
+ $(LIBAPM): apmlib.lo
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..1c8b7b7
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,8 @@
++AC_INIT([apmd], [3.2.2])
++AC_CONFIG_FILES([Makefile])
++
++LT_INIT
++
++AC_SUBST([top_builddir], [$abs_builddir])
++
++AC_OUTPUT


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-20  2:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-29 19:32 [gentoo-commits] repo/gentoo:master commit in: sys-apps/apmd/, sys-apps/apmd/files/ Austin English
  -- strict thread matches above, loose matches on Subject: below --
2022-06-20  2:03 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox