void-packages/srcpkgs/liquid-dsp/patches/define-soname.patch
Đoàn Trần Công Danh 861ac185a6 srcpkgs/l*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

41 lines
1.5 KiB
Diff

Description: Add versioned soname to library
Upstream has no versioned soname yet, so this patch adds a Debian
specific soname version until something is added upstream.
Author: Andreas Bombe <aeb@debian.org>
Last-Update: 2016-12-11
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: git/makefile.in
===================================================================
--- a/makefile.in 2017-10-28 20:23:47.395786766 +0200
+++ b/makefile.in 2017-10-28 20:23:47.391786768 +0200
@@ -1167,7 +1167,7 @@
$(CC) -dynamiclib -install_name $@ -o $@ $^ $(LDFLAGS) $(LIBS)
# linux, et al
-libliquid.so: libliquid.a
+$(SHARED_LIB): libliquid.a
$(CC) $(CFLAGS) $(LDFLAGS) -shared -Xlinker -soname=$@ -o $@ -Wl,-whole-archive $^ -Wl,-no-whole-archive $(LIBS)
all: libliquid.a $(SHARED_LIB)
@@ -1191,6 +1191,7 @@
mkdir -p $(DESTDIR)$(exec_prefix)$(libdir)
mkdir -p $(DESTDIR)$(prefix)/include/liquid
install -m 644 -p $(SHARED_LIB) libliquid.a $(DESTDIR)$(exec_prefix)$(libdir)
+ ln -s $(SHARED_LIB) $(DESTDIR)$(exec_prefix)$(libdir)/libliquid.so
install -m 644 -p $(addprefix include/,$(headers_install)) $(DESTDIR)$(prefix)/include/liquid
@echo ""
@echo "---------------------------------------------------------"
Index: git/configure.ac
===================================================================
--- a/configure.ac 2017-10-28 20:23:47.395786766 +0200
+++ b/configure.ac 2017-10-28 20:23:47.391786768 +0200
@@ -242,7 +242,7 @@
REBIND=""
;;
*)
- SH_LIB=libliquid.so
+ SH_LIB=libliquid.so.1
REBIND=ldconfig
;;
esac