summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorIan Jordan <immoloism@gmail.com>2022-11-17 23:20:40 +0000
committerSam James <sam@gentoo.org>2022-11-18 02:18:03 +0000
commit5e7ab79918a995d18bb4b61fc3404ca05e20fda3 (patch)
tree5bac9229da8ca3578def1a9bdf2f21b874a98094 /sys-fs
parentsys-cluster/resource-agents: add 4.11.0 (diff)
downloadgentoo-5e7ab79918a995d18bb4b61fc3404ca05e20fda3.tar.gz
gentoo-5e7ab79918a995d18bb4b61fc3404ca05e20fda3.tar.bz2
gentoo-5e7ab79918a995d18bb4b61fc3404ca05e20fda3.zip
sys-fs/jfsutils: musl patch
Patch from Alpine Linux to fix jfsutils not working on Musl systems. This has been tested on both Glibc and Musl systems to work. Orginal Alpine commit - https://git.alpinelinux.org/aports/commit/main/jfsutils/musl-fix-includes.patch?id=d9768c312ddc047df6c2c9b1674b2ab37ddf4e2a Closes: https://bugs.gentoo.org/715568 Signed-off-by: Ian Jordan <immoloism@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/28317 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/jfsutils/files/jfsutils-1.1.15-musl-fix-includes.patch23
-rw-r--r--sys-fs/jfsutils/jfsutils-1.1.15-r2.ebuild55
2 files changed, 78 insertions, 0 deletions
diff --git a/sys-fs/jfsutils/files/jfsutils-1.1.15-musl-fix-includes.patch b/sys-fs/jfsutils/files/jfsutils-1.1.15-musl-fix-includes.patch
new file mode 100644
index 000000000000..08599a2d001d
--- /dev/null
+++ b/sys-fs/jfsutils/files/jfsutils-1.1.15-musl-fix-includes.patch
@@ -0,0 +1,23 @@
+Closes: https://bugs.gentoo.org/715568
+
+From https://git.alpinelinux.org/aports/commit/main/jfsutils/musl-fix-includes.patch?id=d9768c312ddc047df6c2c9b1674b2ab37ddf4e2a 2013-12-17 13:59:36 +0000
+From Timo Teräs <timo.teras@iki.fi>
+
+--- a/libfs/fssubs.c
++++ b/libfs/fssubs.c
+@@ -24,6 +24,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <paths.h>
+
+ #if HAVE_MNTENT_H
+ #include <mntent.h>
+@@ -31,7 +32,6 @@
+ #endif
+
+ #if HAVE_GETMNTINFO
+-#include <paths.h>
+ #include <sys/param.h>
+ #include <sys/mount.h>
+ #endif
diff --git a/sys-fs/jfsutils/jfsutils-1.1.15-r2.ebuild b/sys-fs/jfsutils/jfsutils-1.1.15-r2.ebuild
new file mode 100644
index 000000000000..19d2ac302052
--- /dev/null
+++ b/sys-fs/jfsutils/jfsutils-1.1.15-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="IBM's Journaling Filesystem (JFS) Utilities"
+HOMEPAGE="http://jfs.sourceforge.net/"
+SRC_URI="http://jfs.sourceforge.net/project/pub/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+IUSE="static"
+
+LIB_DEPEND="sys-apps/util-linux:=[static-libs]"
+
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )"
+
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
+
+DOCS=( AUTHORS ChangeLog NEWS README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-linux-headers.patch #448844
+ "${FILESDIR}"/${P}-sysmacros.patch #580056
+ "${FILESDIR}"/${P}-check-for-ar.patch #726032
+ "${FILESDIR}"/${P}-gcc10.patch #707314
+ "${FILESDIR}"/${P}-format-security-errors.patch #557140
+ "${FILESDIR}"/${P}-musl-fix-includes.patch # 715568
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
+src_configure() {
+ # It doesn't compile on alpha without this LDFLAGS
+ use alpha && append-ldflags "-Wl,--no-relax"
+
+ use static && append-ldflags -static
+ econf --sbindir=/sbin
+}
+
+src_install() {
+ default
+
+ rm -f "${ED}"/sbin/{mkfs,fsck}.jfs || die
+ dosym jfs_mkfs /sbin/mkfs.jfs
+ dosym jfs_fsck /sbin/fsck.jfs
+}