diff options
author | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-08-11 00:16:31 +0200 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2021-08-11 00:16:31 +0200 |
commit | 8551292e0a0f847ab7072ffab9626a3003dca1ab (patch) | |
tree | e663f731ea7b8df6db874af06407e0683a7ee170 | |
parent | ur-profile: require certbot on server (diff) | |
download | dilfridge-8551292e0a0f847ab7072ffab9626a3003dca1ab.tar.gz dilfridge-8551292e0a0f847ab7072ffab9626a3003dca1ab.tar.bz2 dilfridge-8551292e0a0f847ab7072ffab9626a3003dca1ab.zip |
sys-fs/e2fsprogs: first attempt at reunification
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r-- | sys-fs/e2fsprogs/Manifest | 2 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/e2fsprogs-1.46.3-r100.ebuild | 139 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsck.conf | 6 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch | 11 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch | 13 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/metadata.xml | 18 |
6 files changed, 189 insertions, 0 deletions
diff --git a/sys-fs/e2fsprogs/Manifest b/sys-fs/e2fsprogs/Manifest new file mode 100644 index 0000000..ad025ff --- /dev/null +++ b/sys-fs/e2fsprogs/Manifest @@ -0,0 +1,2 @@ +DIST e2fsprogs-1.42.9-mint-r1.patch.xz 9012 BLAKE2B ae6421587c3cca2f9b26805c5f8d236d3fecde78cc7df3776ae9c23c7f254d7240e06507568fdd2154a16113c47609a8143535ab9cb2925426d3c578d077ce26 SHA512 591a7c80d65082eebcdc455028be6ade05c9aae96c94f654106be0facef330a8875dae82891e6e3ad2b48dece2b4e1c1940dbc47cd3eba3e6eea3b5ddba9a8fc +DIST e2fsprogs-1.46.3.tar.xz 7024896 BLAKE2B 86f65cf9997f09aa7a27be35b2f38d6385f565de565b1c4cda710dbbea8312312ff77d92beb2b579a3caffa7ce82ee6b2726eb8f97daf41bba46379a94198c8f SHA512 27da6e38d3463e7a283dacfb88a3210dd6d8c63f4d990db879f63bdf503aaa5c447ef0ccc566b71526c12a8ab0a7a6529014b1010be300ad56a6ad5ce9066196 diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.46.3-r100.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.46.3-r100.ebuild new file mode 100644 index 0000000..e8d1ce6 --- /dev/null +++ b/sys-fs/e2fsprogs/e2fsprogs-1.46.3-r100.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic systemd toolchain-funcs multilib-minimal udev usr-ldscript + +DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities and libraries" +HOMEPAGE="http://e2fsprogs.sourceforge.net/" +SRC_URI="https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v${PV}/${P}.tar.xz + elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )" + +LICENSE="GPL-2 BSD" +SLOT="0" +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="cron fuse lto nls static-libs +threads elibc_FreeBSD" + +RDEPEND=" + >=sys-apps/util-linux-2.16 + cron? ( sys-fs/lvm2[-device-mapper-only(-)] ) + fuse? ( sys-fs/fuse:0 ) + nls? ( virtual/libintl ) + !sys-libs/com_err + !sys-libs/ss + !sys-libs/e2fsprogs-libs +" +DEPEND="${RDEPEND}" +BDEPEND=" + nls? ( sys-devel/gettext ) + virtual/pkgconfig + sys-apps/texinfo +" + +PATCHES=( + "${FILESDIR}"/${PN}-1.40-fbsd.patch + "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854 + + # Upstream patches (can usually removed with next version bump) +) + +src_prepare() { + if [[ ${CHOST} == *-mint* ]] ; then + PATCHES+=( "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch ) + fi + + default + + cp doc/RelNotes/v${PV}.txt ChangeLog || die "Failed to copy Release Notes" + + # # Get rid of doc -- we don't use them. This also prevents a sandbox + # # violation due to mktexfmt invocation + # rm -r doc || die "Failed to remove doc dir" +} + +multilib_src_configure() { + # Keep the package from doing silly things #261411 + export VARTEXFONTS="${T}/fonts" + + # needs open64() prototypes and friends + append-cppflags -D_GNU_SOURCE + + local myeconfargs=( + --with-root-prefix="${EPREFIX}" + $(use_with cron crond-dir "${EPREFIX}/etc/cron.d") + --with-systemd-unit-dir="$(systemd_get_systemunitdir)" + --with-udev-rules-dir="${EPREFIX}$(get_udevdir)/rules.d" + --enable-symlink-install + --enable-elf-shlibs + $(tc-has-tls || echo --disable-tls) + $(use_enable fuse fuse2fs) + $(use_enable nls) + --disable-fsck + --disable-uuidd + $(use_enable lto) + $(use_with threads pthread) + ) + + # we use blkid/uuid from util-linux now + if use kernel_linux ; then + export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes + myeconfargs+=( --disable-lib{blkid,uuid} ) + fi + + ac_cv_path_LDCONFIG=: \ + ECONF_SOURCE="${S}" \ + CC="$(tc-getCC)" \ + BUILD_CC="$(tc-getBUILD_CC)" \ + BUILD_LD="$(tc-getBUILD_LD)" \ + econf "${myeconfargs[@]}" + + if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then + eerror "INTL sanity check failed, aborting build." + eerror "Please post your ${S}/config.log file as an" + eerror "attachment to https://bugs.gentoo.org/show_bug.cgi?id=81096" + die "Preventing included intl cruft from building" + fi +} + +multilib_src_compile() { + emake V=1 COMPILE_ET=compile_et MK_CMDS=mk_cmds +} + +multilib_src_install() { + # need to set root_libdir= manually as any --libdir options in the + # econf above (i.e. multilib) will screw up the default #276465 + emake \ + STRIP=: \ + root_libdir="${EPREFIX}/usr/$(get_libdir)" \ + DESTDIR="${D}" \ + install + + einstalldocs + + insinto /etc + doins "${FILESDIR}"/e2fsck.conf + + # Move shared libraries to /lib/, install static libraries to + # /usr/lib/, and install linker scripts to /usr/lib/. + gen_usr_ldscript -a e2p ext2fs com_err ss $(usex kernel_linux '' 'uuid blkid') + + # configure doesn't have an option to disable static libs :/ + if ! use static-libs ; then + find "${ED}" -name '*.a' -delete || die + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + emake V=1 check + fi +} + +multilib_src_install_all() { + # Package installs same header twice -- use symlink instead + dosym et/com_err.h /usr/include/com_err.h + + einstalldocs +} + diff --git a/sys-fs/e2fsprogs/files/e2fsck.conf b/sys-fs/e2fsprogs/files/e2fsck.conf new file mode 100644 index 0000000..401cec4 --- /dev/null +++ b/sys-fs/e2fsprogs/files/e2fsck.conf @@ -0,0 +1,6 @@ +# See the e2fsck.conf man page for more info + +[options] + +# allow fsck to run sanely at any point in time #142850 +buggy_init_scripts = yes diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch new file mode 100644 index 0000000..7d09196 --- /dev/null +++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch @@ -0,0 +1,11 @@ +--- a/lib/ext2fs/ext2_fs.h ++++ b/lib/ext2fs/ext2_fs.h +@@ -414,7 +414,7 @@ + + #define i_size_high i_dir_acl + +-#if defined(__KERNEL__) || defined(__linux__) ++#if defined(__KERNEL__) || defined(__linux__) || defined(__FreeBSD__) + #define i_reserved1 osd1.linux1.l_i_reserved1 + #define i_frag osd2.linux2.l_i_frag + #define i_fsize osd2.linux2.l_i_fsize diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch new file mode 100644 index 0000000..dcab9a3 --- /dev/null +++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/516854 + +--- e2fsprogs-1.42.13/configure ++++ e2fsprogs-1.42.13/configure +@@ -1315,6 +1315,8 @@ + if test $cross_compiling = no; then + BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H" + BUILD_LDFLAGS="$LDFLAGS" ++else ++ BUILD_CFLAGS="$INCLUDES" + fi + + diff --git a/sys-fs/e2fsprogs/metadata.xml b/sys-fs/e2fsprogs/metadata.xml new file mode 100644 index 0000000..8442510 --- /dev/null +++ b/sys-fs/e2fsprogs/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <use> + <flag name="cron">Install e2scrub_all cron script</flag> + <flag name="fuse">Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems</flag> + <flag name="lto">Build with link time optimization (LTO)</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:e2fsprogs_project:e2fsprogs</remote-id> + <remote-id type="github">tytso/e2fsprogs</remote-id> + <remote-id type="sourceforge">e2fsprogs</remote-id> + </upstream> +</pkgmetadata> |