Hi James,

attached is a patch to remove libtool from the libvterm build in vim, which allows you to drop the Build-Depends on libtool-bin.

Cheers
Timo


--
⢀⣴⠾⠻⢶⣦⠀   ╭────────────────────────────────────────────────────╮
⣾⠁⢠⠒⠀⣿⡁   │ Timo Röhling                                       │
⢿⡄⠘⠷⠚⠋⠀   │ 9B03 EBB9 8300 DF97 C2B1  23BF CC8C 6BDD 1403 F4CA │
⠈⠳⣄⠀⠀⠀⠀   ╰────────────────────────────────────────────────────╯
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehl...@debian.org>
Date: Mon, 20 May 2024 23:22:43 +0200
Subject: Remove libtool

---
 src/libvterm/Makefile | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/libvterm/Makefile b/src/libvterm/Makefile
index 94ca409..bedc69c 100644
--- a/src/libvterm/Makefile
+++ b/src/libvterm/Makefile
@@ -25,8 +25,8 @@ endif
 
 CFILES=$(sort $(wildcard src/*.c))
 HFILES=$(sort $(wildcard include/*.h))
-OBJECTS=$(CFILES:.c=.lo)
-LIBRARY=libvterm.la
+OBJECTS=$(CFILES:.c=.o)
+LIBRARY=libvterm.a
 
 BINFILES_SRC=$(sort $(wildcard bin/*.c))
 BINFILES=$(BINFILES_SRC:.c=)
@@ -55,10 +55,10 @@ MAN3DIR=$(MANDIR)/man3
 all: $(LIBRARY) $(BINFILES)
 
 $(LIBRARY): $(OBJECTS)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) -o $@ $^ $(LDFLAGS)
+	$(AR) rcs $@ $^
 
-src/%.lo: src/%.c $(HFILES_INT)
-	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+src/%.o: src/%.c $(HFILES_INT)
+	$(CC) $(CFLAGS) -o $@ -c $<
 
 src/encoding/%.inc: src/encoding/%.tbl
 	perl -CSD tbl2inc_c.pl $< >$@
@@ -66,16 +66,16 @@ src/encoding/%.inc: src/encoding/%.tbl
 src/fullwidth.inc:
 	@perl find-wide-chars.pl >$@
 
-src/encoding.lo: $(INCFILES)
+src/encoding.o: $(INCFILES)
 
 bin/%: bin/%.c $(LIBRARY)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $< -lvterm $(LDFLAGS)
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
 
-t/harness.lo: t/harness.c $(HFILES)
-	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
+t/harness.o: t/harness.c $(HFILES)
+	$(CC) $(CFLAGS) -o $@ -c $<
 
-t/harness: t/harness.lo $(LIBRARY)
-	$(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -static
+t/harness: t/harness.o $(LIBRARY)
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -static
 
 .PHONY: test
 test: $(LIBRARY) t/harness
@@ -83,9 +83,9 @@ test: $(LIBRARY) t/harness
 
 .PHONY: clean
 clean:
-	$(LIBTOOL) --mode=clean rm -f $(OBJECTS) $(INCFILES)
-	$(LIBTOOL) --mode=clean rm -f t/harness.lo t/harness
-	$(LIBTOOL) --mode=clean rm -f $(LIBRARY) $(BINFILES)
+	rm -f $(OBJECTS) $(INCFILES)
+	rm -f t/harness.o t/harness
+	rm -f $(LIBRARY) $(BINFILES)
 
 .PHONY: install
 install: install-inc install-lib install-bin

Attachment: signature.asc
Description: PGP signature

Reply via email to