commit: 36fb89758109b0507ae735d1925b9633f843f0c8 Author: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin <DOT> de> AuthorDate: Mon May 18 23:51:59 2015 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Tue May 19 21:43:40 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-dev.git/commit/?id=36fb8975
sys-fs/dosfstools: fix build of dosfstools on musl sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild | 29 ++++++++++++++++++++++ ...tools-3.0.27-Fix-format-string-in-check.c.patch | 25 +++++++++++++++++++ .../dosfstools-3.0.28-fix_build_with_musl.patch | 25 +++++++++++++++++++ sys-fs/dosfstools/metadata.xml | 5 ++++ 4 files changed, 84 insertions(+) diff --git a/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild b/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild new file mode 100644 index 0000000..63dc7c2 --- /dev/null +++ b/sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/dosfstools/dosfstools-3.0.27.ebuild,v 1.1 2015/04/03 07:05:29 vapier Exp $ + +EAPI="5" + +inherit toolchain-funcs flag-o-matic eutils + +DESCRIPTION="DOS filesystem tools - provides mkdosfs, mkfs.msdos, mkfs.vfat" +HOMEPAGE="http://www.daniel-baumann.ch/software/dosfstools/" +SRC_URI="https://github.com/dosfstools/dosfstools/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~arm ~mips ~ppc ~x86" +RESTRICT="test" # there is no test target #239071 + +src_prepare() { + sed -i \ + -e "/^PREFIX/s:=.*:= ${EPREFIX}/usr:" \ + -e '/^OPTFLAGS/d' \ + -e '/^DEBUGFLAGS/d' \ + -e "/\$(DOCDIR)/s:${PN}:${PF}:" \ + Makefile || die + epatch "${FILESDIR}"/${PN}-3.0.27-Fix-format-string-in-check.c.patch + epatch "${FILESDIR}"/${PN}-3.0.28-fix_build_with_musl.patch + append-lfs-flags + tc-export CC +} diff --git a/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch b/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch new file mode 100644 index 0000000..8a5bbb6 --- /dev/null +++ b/sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch @@ -0,0 +1,25 @@ +From 04d5d990904df782a7a774827e0c860eac640272 Mon Sep 17 00:00:00 2001 +From: Hinnerk van Bruinehsen <[email protected]> +Date: Thu, 16 Apr 2015 14:19:57 +0000 +Subject: [PATCH 2/2] Fix format string in check.c + +--- + src/check.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/check.c b/src/check.c +index d8880a8..bb783e5 100644 +--- a/src/check.c ++++ b/src/check.c +@@ -582,7 +582,7 @@ static int check_file(DOS_FS * fs, DOS_FILE * file) + if (!(file->dir_ent.attr & ATTR_DIR) && le32toh(file->dir_ent.size) <= + (uint64_t)clusters * fs->cluster_size) { + printf +- ("%s\n File size is %u bytes, cluster chain length is > %lu " ++ ("%s\n File size is %u bytes, cluster chain length is > %llu " + "bytes.\n Truncating file to %u bytes.\n", path_name(file), + le32toh(file->dir_ent.size), + (uint64_t)clusters * fs->cluster_size, +-- +2.3.5 + diff --git a/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch b/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch new file mode 100644 index 0000000..b495378 --- /dev/null +++ b/sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch @@ -0,0 +1,25 @@ +diff --git a/Makefile b/Makefile +index f22a4c5..967defe 100644 +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ MANDIR = $(PREFIX)/share/man + #OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 + #WARNFLAGS = -Wall -pedantic -std=c99 + WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings +-CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) ++CFLAGS += $(OPTFLAGS) $(WARNFLAGS) $(DEBUGFLAGS) -D _GNU_SOURCE + + VPATH = src + +diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c +index b38d116..7e6c996 100644 +--- a/src/mkfs.fat.c ++++ b/src/mkfs.fat.c +@@ -60,6 +60,7 @@ + #include <sys/ioctl.h> + #include <sys/stat.h> + #include <sys/time.h> ++#include <sys/types.h> + #include <unistd.h> + #include <time.h> + #include <errno.h> diff --git a/sys-fs/dosfstools/metadata.xml b/sys-fs/dosfstools/metadata.xml new file mode 100644 index 0000000..96a2d58 --- /dev/null +++ b/sys-fs/dosfstools/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>base-system</herd> +</pkgmetadata>
