Bug#1122142: pystring: stop using libtool-bin

Helmut Grohne helmut at subdivi.de
Sun Dec 7 20:13:32 GMT 2025


Source: pystring
Version: 1.1.4-2
Tags: patch
User: debian-cross at lists.debian.org
Usertags: cross-satisfiability

We would like to remove libtool-bin from Debian. One of the reasons is
that using the package universally breaks cross compilation. For
pystring, there are two options:

It can switch to libtoolize and generate a libtool during build. This
typically amounts to turning it into a full fledged autotools project.
To me, this seems overkill.

The other option is to do by hand what libtool does now. I'm attaching
a patch for this approach.

The point of this exercise is to get libtool-bin out of Build-Depends.
Choose whatever method suits you best.

Helmut
-------------- next part --------------
diff -Nru pystring-1.1.4/debian/changelog pystring-1.1.4/debian/changelog
--- pystring-1.1.4/debian/changelog	2024-09-11 13:56:31.000000000 +0200
+++ pystring-1.1.4/debian/changelog	2025-12-07 21:08:54.000000000 +0100
@@ -1,3 +1,10 @@
+pystring (1.1.4-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Stop using libtool. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 07 Dec 2025 21:08:54 +0100
+
 pystring (1.1.4-2) unstable; urgency=medium
 
   * d/libpystring-dev.install: install .h in sys-wide path
diff -Nru pystring-1.1.4/debian/libpystring-dev.install pystring-1.1.4/debian/libpystring-dev.install
--- pystring-1.1.4/debian/libpystring-dev.install	2024-09-11 13:44:34.000000000 +0200
+++ pystring-1.1.4/debian/libpystring-dev.install	2025-12-07 21:03:11.000000000 +0100
@@ -1,2 +1,2 @@
 pystring.h usr/include/
-.libs/lib*.so usr/lib/${DEB_HOST_MULTIARCH}/
+usr/lib/lib*.so usr/lib/${DEB_HOST_MULTIARCH}
diff -Nru pystring-1.1.4/debian/libpystring0.install pystring-1.1.4/debian/libpystring0.install
--- pystring-1.1.4/debian/libpystring0.install	2021-08-08 19:43:03.000000000 +0200
+++ pystring-1.1.4/debian/libpystring0.install	2025-12-07 21:03:22.000000000 +0100
@@ -1 +1 @@
-.libs/lib*.so.* usr/lib/${DEB_HOST_MULTIARCH}/
+usr/lib/lib*.so.* usr/lib/${DEB_HOST_MULTIARCH}
diff -Nru pystring-1.1.4/debian/patches/libtool.patch pystring-1.1.4/debian/patches/libtool.patch
--- pystring-1.1.4/debian/patches/libtool.patch	1970-01-01 01:00:00.000000000 +0100
+++ pystring-1.1.4/debian/patches/libtool.patch	2025-12-07 21:08:20.000000000 +0100
@@ -0,0 +1,38 @@
+Index: pystring-1.1.4/Makefile
+===================================================================
+--- pystring-1.1.4.orig/Makefile
++++ pystring-1.1.4/Makefile
+@@ -1,21 +1,24 @@
+-LIBTOOL ?= libtool
+ LIBDIR ?= /usr/lib
+ CXX ?= g++
+ CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2
++SONAME = 0
++SOVERSION = $(SONAME).0.0
+ 
+-all: libpystring.la
++all: libpystring.so
+ 
+-pystring.lo: pystring.h pystring.cpp
+-	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CXXFLAGS) -c pystring.cpp
++pystring.o: pystring.cpp pystring.h
++	$(CXX) -fPIC $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
+ 
+-libpystring.la: pystring.lo
+-	$(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR)
++libpystring.so: pystring.o
++	$(CXX) -fPIC $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@.$(SONAME) -o $@ $<
+ 
+-install: libpystring.la
+-	$(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$<
++install: libpystring.so
++	install -D -m644 $< $(DESTDIR)$(LIBDIR)/$<.$(SOVERSION)
++	ln -s $<.$(SOVERSION) $(DESTDIR)$(LIBDIR)/$<.$(SONAME)
++	ln -s $<.$(SONAME) $(DESTDIR)$(LIBDIR)/$<
+ 
+ clean:
+-	$(RM) -fr pystring.lo pystring.o libpystring.la .libs
++	$(RM) -fr pystring.o libpystring.so test
+ 
+ .PHONY: test
+ test:
diff -Nru pystring-1.1.4/debian/patches/series pystring-1.1.4/debian/patches/series
--- pystring-1.1.4/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ pystring-1.1.4/debian/patches/series	2025-12-07 20:50:25.000000000 +0100
@@ -0,0 +1 @@
+libtool.patch
diff -Nru pystring-1.1.4/debian/rules pystring-1.1.4/debian/rules
--- pystring-1.1.4/debian/rules	2021-08-08 15:58:15.000000000 +0200
+++ pystring-1.1.4/debian/rules	2025-12-07 21:00:33.000000000 +0100
@@ -7,5 +7,3 @@
 
 %:
 	dh $@
-
-override_dh_auto_install:


More information about the Pkg-phototools-devel mailing list