1 |
commit: f0dd4ad7f7cb1a2c1e40b32155103b951da1aa77 |
2 |
Author: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 25 13:29:10 2021 +0000 |
4 |
Commit: Jason A. Donenfeld <zx2c4 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 25 13:30:13 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0dd4ad7 |
7 |
|
8 |
media-gfx/sane-airscan: send fixes upstream and include patch downstream |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Jason A. Donenfeld <zx2c4 <AT> gentoo.org> |
12 |
|
13 |
.../sane-airscan-0.99.27-makefile-fixes.patch | 56 ++++++++++++++++++++++ |
14 |
media-gfx/sane-airscan/sane-airscan-0.99.27.ebuild | 5 +- |
15 |
2 files changed, 57 insertions(+), 4 deletions(-) |
16 |
|
17 |
diff --git a/media-gfx/sane-airscan/files/sane-airscan-0.99.27-makefile-fixes.patch b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-makefile-fixes.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..204d1a5466a7 |
20 |
--- /dev/null |
21 |
+++ b/media-gfx/sane-airscan/files/sane-airscan-0.99.27-makefile-fixes.patch |
22 |
@@ -0,0 +1,56 @@ |
23 |
+From 8e9d059fa88606cba97291232ec16732f552bd48 Mon Sep 17 00:00:00 2001 |
24 |
+From: "Jason A. Donenfeld" <Jason@×××××.com> |
25 |
+Date: Thu, 25 Nov 2021 14:24:25 +0100 |
26 |
+Subject: [PATCH] Makefile: abstract ar to $(AR) and remove tags from all |
27 |
+ |
28 |
+Build systems need to be able to use a custom `ar` binary. Also, running |
29 |
+ctags is generally not desirable for the default target. |
30 |
+ |
31 |
+Signed-off-by: Jason A. Donenfeld <Jason@×××××.com> |
32 |
+--- |
33 |
+Sent upstream as: https://github.com/alexpevzner/sane-airscan/pull/197 |
34 |
+ |
35 |
+ Makefile | 6 ++++-- |
36 |
+ 1 file changed, 4 insertions(+), 2 deletions(-) |
37 |
+ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 4c7e202..415d489 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -7,6 +7,7 @@ |
43 |
+ # ---- ------- ----------- |
44 |
+ # DESTDIR Destination directory for make install |
45 |
+ # CC gcc C compiler |
46 |
++# AR ar Archiver |
47 |
+ # CPPFLAGS C preprocessor flags |
48 |
+ # CFLAGS -O2 -g -W -Wall -Werror C compiler flags |
49 |
+ # LDFLAGS Linker flags |
50 |
+@@ -28,6 +29,7 @@ |
51 |
+ # |
52 |
+ |
53 |
+ CC = gcc |
54 |
++AR = ar |
55 |
+ COMPRESS = gzip -n |
56 |
+ CFLAGS += -O2 -g -W -Wall -Werror -pthread $(CPPFLAGS) |
57 |
+ PKG_CONFIG = pkg-config |
58 |
+@@ -101,7 +103,7 @@ $(OBJDIR)%.o: %.c Makefile airscan.h |
59 |
+ |
60 |
+ .PHONY: all clean install man |
61 |
+ |
62 |
+-all: tags $(BACKEND) $(DISCOVER) test test-decode test-multipart test-zeroconf test-uri |
63 |
++all: $(BACKEND) $(DISCOVER) test test-decode test-multipart test-zeroconf test-uri |
64 |
+ |
65 |
+ tags: $(SRC) airscan.h test.c test-decode.c test-multipart.c test-zeroconf.c test-uri.c |
66 |
+ -ctags -R . |
67 |
+@@ -113,7 +115,7 @@ $(DISCOVER): $(OBJDIR)discover.o $(LIBAIRSCAN) |
68 |
+ $(CC) -o $(DISCOVER) discover.c $(CPPFLAGS) $(common_CFLAGS) $(LIBAIRSCAN) $(tools_LDFLAGS) |
69 |
+ |
70 |
+ $(LIBAIRSCAN): $(OBJ) Makefile |
71 |
+- ar cru $(LIBAIRSCAN) $(OBJ) |
72 |
++ $(AR) cru $(LIBAIRSCAN) $(OBJ) |
73 |
+ |
74 |
+ install: all |
75 |
+ mkdir -p $(DESTDIR)/$(bindir) |
76 |
+-- |
77 |
+2.34.1 |
78 |
+ |
79 |
|
80 |
diff --git a/media-gfx/sane-airscan/sane-airscan-0.99.27.ebuild b/media-gfx/sane-airscan/sane-airscan-0.99.27.ebuild |
81 |
index f1d4d9176344..61f7cc9da931 100644 |
82 |
--- a/media-gfx/sane-airscan/sane-airscan-0.99.27.ebuild |
83 |
+++ b/media-gfx/sane-airscan/sane-airscan-0.99.27.ebuild |
84 |
@@ -24,10 +24,7 @@ RDEPEND="${DEPEND} |
85 |
media-gfx/sane-backends |
86 |
" |
87 |
|
88 |
-src_prepare() { |
89 |
- default |
90 |
- sed -i 's/ar cru/$(AR) cru/' Makefile || die "Unable to patch makefile" |
91 |
-} |
92 |
+PATCHES=( "${FILESDIR}/${PN}-0.99.27-makefile-fixes.patch" ) |
93 |
|
94 |
src_compile() { |
95 |
emake \ |