commit:     bf8d89b066d171bb948858823451bd1716be578c
Author:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Mon Nov 20 18:50:34 2017 +0000
Commit:     Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Mon Nov 20 18:50:34 2017 +0000
URL:        https://gitweb.gentoo.org/proj/musl.git/commit/?id=bf8d89b0

sys-kernel/dracut: bump patch

 sys-kernel/dracut/dracut-046.ebuild             |  2 +-
 sys-kernel/dracut/files/dracut-046-libfts.patch | 87 +++++++++++++++++++++++++
 2 files changed, 88 insertions(+), 1 deletion(-)

diff --git a/sys-kernel/dracut/dracut-046.ebuild 
b/sys-kernel/dracut/dracut-046.ebuild
index f9edae9..55a83e3 100644
--- a/sys-kernel/dracut/dracut-046.ebuild
+++ b/sys-kernel/dracut/dracut-046.ebuild
@@ -52,7 +52,7 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*"
 
 PATCHES=(
        "${FILESDIR}/045-systemdutildir.patch"
-       "${FILESDIR}"/dracut-045-libfts.patch
+       "${FILESDIR}"/${P}-libfts.patch
 )
 
 src_configure() {

diff --git a/sys-kernel/dracut/files/dracut-046-libfts.patch 
b/sys-kernel/dracut/files/dracut-046-libfts.patch
new file mode 100644
index 0000000..6eeb73b
--- /dev/null
+++ b/sys-kernel/dracut/files/dracut-046-libfts.patch
@@ -0,0 +1,87 @@
+diff -Naur dracut-046.orig/Makefile dracut-046/Makefile
+--- dracut-046.orig/Makefile   2017-08-11 04:44:06.000000000 -0700
++++ dracut-046/Makefile        2017-11-20 10:47:53.667837476 -0800
+@@ -13,7 +13,7 @@
+ bindir ?= ${prefix}/bin
+ mandir ?= ${prefix}/share/man
+ CFLAGS ?= -O2 -g -Wall
+-CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS)
++CFLAGS += -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security 
-Wp,-D_FORTIFY_SOURCE=2 $(KMOD_CFLAGS) $(FTS_CFLAGS)
+ bashcompletiondir ?= ${datadir}/bash-completion/completions
+ pkgconfigdatadir ?= $(datadir)/pkgconfig
+ 
+@@ -61,7 +61,7 @@
+ install/strv.o: install/strv.c install/strv.h install/util.h install/macro.h 
install/log.h
+ 
+ install/dracut-install: $(DRACUT_INSTALL_OBJECTS)
+-      $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS)
++      $(CC) $(LDFLAGS) -o $@ $(DRACUT_INSTALL_OBJECTS) $(LDLIBS) $(KMOD_LIBS) 
$(FTS_LIBS)
+ 
+ dracut-install: install/dracut-install
+       ln -fs $< $@
+diff -Naur dracut-046.orig/configure dracut-046/configure
+--- dracut-046.orig/configure  2017-08-11 04:44:06.000000000 -0700
++++ dracut-046/configure       2017-11-20 10:49:33.023835696 -0800
+@@ -7,6 +7,7 @@
+ 
+ enable_documentation=yes
+ 
++CC="${CC:-gcc}"
+ PKG_CONFIG="${PKG_CONFIG:-pkg-config}"
+ 
+ # Little helper function for reading args from the commandline.
+@@ -52,10 +53,40 @@
+     shift
+ done
+ 
++printf "checking for libkmod... "
+ if ! ${PKG_CONFIG} --exists --print-errors " libkmod >= 15 "; then
++    printf "no\n"
+     echo "dracut needs pkg-config and libkmod >= 15." >&2
+     exit 1
+ fi
++printf "yes\n"
++
++tmpc="./conftest.c"
++
++printf "checking whether we have fts available from libc... "
++echo '#if !defined(__x86_64__)' > "$tmpc"
++echo '#undef _FILE_OFFSET_BITS' >> "$tmpc"
++echo '#define _FILE_OFFSET_BITS 32' >> "$tmpc"
++echo '#endif' >> "$tmpc"
++echo '#include <fts.h>' >> "$tmpc"
++echo 'int main() { FTS* fts = 0; return fts_close(fts); return 0; }' >> 
"$tmpc"
++if $CC -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
++printf "yes\n"
++fts_library=false
++else
++printf "no\n"
++printf "checking whether we have fts available from libfts... "
++if $CC -lfts -o /dev/null "$tmpc" >/dev/null 2>&1 ; then
++printf "yes\n"
++fts_library=true
++else
++printf "no\n"
++echo "fts not in libc and libfts not found."
++exit 1
++fi
++fi
++
++rm $tmpc
+ 
+ cat > Makefile.inc.$$ <<EOF
+ prefix ?= ${prefix}
+@@ -70,6 +101,13 @@
+ KMOD_LIBS ?= $(${PKG_CONFIG} --libs " libkmod >= 15 ")
+ EOF
+ 
++if $fts_library ; then
++cat >> Makefile.inc.$$ <<EOF
++FTS_CFLAGS ?= $(${PKG_CONFIG} --cflags " fts-standalone ")
++FTS_LIBS ?= $(${PKG_CONFIG} --libs " fts-standalone ")
++EOF
++fi
++
+ {
+     [[ $programprefix ]] && echo "programprefix ?= ${programprefix}"
+     [[ $execprefix ]] && echo "execprefix ?= ${execprefix}"

Reply via email to