void-packages/srcpkgs/jbig2dec/patches/2002_abi_compat.patch
Đoàn Trần Công Danh 1a06b0d5d7 srcpkgs/j*: 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

25 lines
1,011 B
Diff

Description: Restore ABI compatibility
Author: Julien Cristau <jcristau@debian.org>
Source: https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=940605;filename=0001-Restore-ABI-compatibility-closes-940605.patch;msg=21
Bug-Debian: https://bugs.debian.org/940605
Forwarded: no
Last-Update: 2019-09-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/jbig2.c
+++ b/jbig2.c
@@ -99,6 +99,13 @@
return -1;
}
+#undef jbig2_ctx_new
+Jbig2Ctx *
+jbig2_ctx_new(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCtx *global_ctx, Jbig2ErrorCallback error_callback, void *error_callback_data)
+{
+ return jbig2_ctx_new_imp((allocator), (options), (global_ctx), (error_callback), (error_callback_data), JBIG2_VERSION_MAJOR, JBIG2_VERSION_MINOR);
+}
+
Jbig2Ctx *
jbig2_ctx_new_imp(Jbig2Allocator *allocator, Jbig2Options options, Jbig2GlobalCtx *global_ctx, Jbig2ErrorCallback error_callback, void *error_callback_data, int jbig2_version_major, int jbig2_version_minor)
{