Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: sys-kernel/dracut/, sys-kernel/dracut/files/
Date: Mon, 20 Nov 2017 18:52:06
Message-Id: 1511203834.bf8d89b066d171bb948858823451bd1716be578c.lluixhi@gentoo
1 commit: bf8d89b066d171bb948858823451bd1716be578c
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Mon Nov 20 18:50:34 2017 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Mon Nov 20 18:50:34 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=bf8d89b0
7
8 sys-kernel/dracut: bump patch
9
10 sys-kernel/dracut/dracut-046.ebuild | 2 +-
11 sys-kernel/dracut/files/dracut-046-libfts.patch | 87 +++++++++++++++++++++++++
12 2 files changed, 88 insertions(+), 1 deletion(-)
13
14 diff --git a/sys-kernel/dracut/dracut-046.ebuild b/sys-kernel/dracut/dracut-046.ebuild
15 index f9edae9..55a83e3 100644
16 --- a/sys-kernel/dracut/dracut-046.ebuild
17 +++ b/sys-kernel/dracut/dracut-046.ebuild
18 @@ -52,7 +52,7 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
19
20 PATCHES=(
21 "${FILESDIR}/045-systemdutildir.patch"
22 - "${FILESDIR}"/dracut-045-libfts.patch
23 + "${FILESDIR}"/${P}-libfts.patch
24 )
25
26 src_configure() {
27
28 diff --git a/sys-kernel/dracut/files/dracut-046-libfts.patch b/sys-kernel/dracut/files/dracut-046-libfts.patch
29 new file mode 100644
30 index 0000000..6eeb73b
31 --- /dev/null
32 +++ b/sys-kernel/dracut/files/dracut-046-libfts.patch
33 @@ -0,0 +1,87 @@
34 +diff -Naur dracut-046.orig/Makefile dracut-046/Makefile
35 +--- dracut-046.orig/Makefile 2017-08-11 04:44:06.000000000 -0700
36 ++++ dracut-046/Makefile 2017-11-20 10:47:53.667837476 -0800
37 +@@ -13,7 +13,7 @@
38 + bindir ?= ${prefix}/bin
39 + mandir ?= ${prefix}/share/man
40 + CFLAGS ?= -O2 -g -Wall
41 +-CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS)
42 ++CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS) $(FTS_CFLAGS)
43 + bashcompletiondir ?= ${datadir}/bash-completion/completions
44 + pkgconfigdatadir ?= $(datadir)/pkgconfig
45 +
46 +@@ -61,7 +61,7 @@
47 + install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h install/log.h
48 +
49 + install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
50 +- $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
51 ++ $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) $(FTS_LIBS)
52 +
53 + dracut-install: install/dracut-install
54 + ln -fs $< $@
55 +diff -Naur dracut-046.orig/configure dracut-046/configure
56 +--- dracut-046.orig/configure 2017-08-11 04:44:06.000000000 -0700
57 ++++ dracut-046/configure 2017-11-20 10:49:33.023835696 -0800
58 +@@ -7,6 +7,7 @@
59 +
60 + enable_documentation=yes
61 +
62 ++CC="${CC:-gcc}"
63 + PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
64 +
65 + # Little helper function for reading args from the commandline.
66 +@@ -52,10 +53,40 @@
67 + shift
68 + done
69 +
70 ++printf "checking for libkmod... "
71 + if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
72 ++ printf "no\n"
73 + echo "dracut needs pkg-config and libkmod >= 15." >&2
74 + exit 1
75 + fi
76 ++printf "yes\n"
77 ++
78 ++tmpc="./conftest.c"
79 ++
80 ++printf "checking whether we have fts available from libc... "
81 ++echo '#if !defined(__x86_64__)' > "$tmpc"
82 ++echo '#undef _FILE_OFFSET_BITS' >> "$tmpc"
83 ++echo '#define _FILE_OFFSET_BITS 32' >> "$tmpc"
84 ++echo '#endif' >> "$tmpc"
85 ++echo '#include <fts.h>' >> "$tmpc"
86 ++echo 'int main() { FTS* fts = 0; return fts_close(fts); return 0; }' >> "$tmpc"
87 ++if $CC -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
88 ++printf "yes\n"
89 ++fts_library=false
90 ++else
91 ++printf "no\n"
92 ++printf "checking whether we have fts available from libfts... "
93 ++if $CC -lfts -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
94 ++printf "yes\n"
95 ++fts_library=true
96 ++else
97 ++printf "no\n"
98 ++echo "fts not in libc and libfts not found."
99 ++exit 1
100 ++fi
101 ++fi
102 ++
103 ++rm $tmpc
104 +
105 + cat > Makefile.inc.$$ <<EOF
106 + prefix ?= ${prefix}
107 +@@ -70,6 +101,13 @@
108 + KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
109 + EOF
110 +
111 ++if $fts_library ; then
112 ++cat >> Makefile.inc.$$ <<EOF
113 ++FTS_CFLAGS ?= $(${PKG_CONFIG} --cflags " fts-standalone ")
114 ++FTS_LIBS ?= $(${PKG_CONFIG} --libs " fts-standalone ")
115 ++EOF
116 ++fi
117 ++
118 + {
119 + [[ $programprefix ]] && echo "programprefix ?= ${programprefix}"
120 + [[ $execprefix ]] && echo "execprefix ?= ${execprefix}"