summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/apmd/files/apmd-3.2.2-libtool.patch')
-rw-r--r--sys-apps/apmd/files/apmd-3.2.2-libtool.patch124
1 files changed, 124 insertions, 0 deletions
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