summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>2015-05-19 01:51:59 +0200
committerAnthony G. Basile <blueness@gentoo.org>2015-05-19 17:43:40 -0400
commit36fb89758109b0507ae735d1925b9633f843f0c8 (patch)
treecd1a6281ef64f4a366573c753bcaa7b04dc72ede
parentf22fe41501caf83660b9eeb672a5541e85921a42 (diff)
downloadhardened-dev-36fb89758109b0507ae735d1925b9633f843f0c8.tar.gz
hardened-dev-36fb89758109b0507ae735d1925b9633f843f0c8.tar.bz2
hardened-dev-36fb89758109b0507ae735d1925b9633f843f0c8.tar.xz
hardened-dev-36fb89758109b0507ae735d1925b9633f843f0c8.zip
sys-fs/dosfstools: fix build of dosfstools on musl
-rw-r--r--sys-fs/dosfstools/Manifest5
-rw-r--r--sys-fs/dosfstools/dosfstools-3.0.28-r99.ebuild29
-rw-r--r--sys-fs/dosfstools/files/dosfstools-3.0.27-Fix-format-string-in-check.c.patch25
-rw-r--r--sys-fs/dosfstools/files/dosfstools-3.0.28-fix_build_with_musl.patch25
-rw-r--r--sys-fs/dosfstools/metadata.xml5
5 files changed, 89 insertions, 0 deletions
diff --git a/sys-fs/dosfstools/Manifest b/sys-fs/dosfstools/Manifest
new file mode 100644
index 0000000..1ee4cd4
--- /dev/null
+++ b/sys-fs/dosfstools/Manifest
@@ -0,0 +1,5 @@
+AUX dosfstools-3.0.27-Fix-format-string-in-check.c.patch 886 SHA256 44f80903b89d69d51ec71fb0fb1a1a560c5e795c8c9a3a25e8d84ac81cf423fa SHA512 d278ba4fbf79bfd1490c1f693113da5e047a394b639e3ca29e13e98604dddecf61c860e9dc1a0ef9b84c97c1d467a05d61a9e9e8942d24ca8dfe39e05599bfb4 WHIRLPOOL fa2bd8339a3cab8787ada26ab2df54af5e27c980dd33761aa7d603d115053f8b756ff7252d8168280579d99d5287ae88c6e313c2f92a31c397f3014fb0d17e28
+AUX dosfstools-3.0.28-fix_build_with_musl.patch 815 SHA256 fb8cafac2fc31b726aa5a8a74b29554a6865a6b92fb8aacf01fafc630dcc18bd SHA512 f1bc61db4f28ceb70ec30be007ca1b67616b61ec44c82cb373d83803fa8a075cc051ae77a002ed487764f2623309db6d61b5bbb9a5764d48511feeaf2ef6fb54 WHIRLPOOL 1627ff041848a67f768ec6e706f22c7dded41992499694e073107d5cad745f5c452f2d69ec4e8d3be5d0231152e96fc52a3af088e8a0900ce01cf6d0b65a7409
+DIST dosfstools-3.0.28.tar.xz 82980 SHA256 ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2 SHA512 7325a9e05f51715b358cab0a8fa8f8096422b470f1a43eecfab2adbb954e1daf6a24003121be5b3a22de5fcb3e3adffbf1551e2158852b6663fd57a109f057ad WHIRLPOOL b584aa1dee4db96c04f19b6ac46b6322c533fcadbafb09546412e4d6a7568e23abe6985389dc446dacbe2d14f36dd7a8b52fc83b93ab1f5864b4b61f14f6ffd0
+EBUILD dosfstools-3.0.28-r99.ebuild 954 SHA256 667f2342d0b8db2b51568a71157988835b7bdf15a21a5ede942332e6617768b4 SHA512 96718cff2640c6279419114e127d4b319858fd62dc9d26392e07011ecc421a5dd7e5161223def86f340af1e47720250e48fd2c7bdf4954ae7ca62fb256aa63f7 WHIRLPOOL df0b1ce733cd5669fb30672abb6487f2eaf08639162f242a16c5031bbec8c78a939e393eeb53dc0054e5d087cf1ca97e9b7fa72169e27aa759138237cce293b2
+MISC metadata.xml 164 SHA256 f5f2891f2a4791cd31350bb2bb572131ad7235cd0eeb124c9912c187ac10ce92 SHA512 8eb0d5153d388f6ea069c64b93882244816a0a09aecc0d73cb872121ce0eb24c5ccafa96aad0b620b2300f319e1af101fa7fa6c5d0d561719d49bb07da0a2eca WHIRLPOOL 11a1441bddb7a6c69653c663902b7da5767ae6ad515ac2aabfc42fe37927a1ccc21472deeee454009ff720201a41c3e4a912df42661a0a87150fb46126da2d52
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 <h.v.bruinehsen@fu-berlin.de>
+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>