summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2010-04-28 00:10:13 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 10:45:23 +0200
commit1fd47cdef01ffeeb7d7d03257d23878eb6d0d335 (patch)
tree175bc479436b9d4d52a09738075feb4467914c13
parentmagus: fix dates (diff)
downloadmv-1fd47cdef01ffeeb7d7d03257d23878eb6d0d335.tar.gz
mv-1fd47cdef01ffeeb7d7d03257d23878eb6d0d335.tar.bz2
mv-1fd47cdef01ffeeb7d7d03257d23878eb6d0d335.zip
Bump squash_dir; add squashfs-tools with USE=progress-redirect patch
-rw-r--r--sys-fs/squash_dir/ChangeLog10
-rw-r--r--sys-fs/squash_dir/Manifest8
-rw-r--r--sys-fs/squash_dir/metadata.xml3
-rw-r--r--sys-fs/squash_dir/squash_dir-10.2.ebuild35
-rw-r--r--sys-fs/squash_dir/squash_dir-10.4.ebuild64
-rw-r--r--sys-fs/squashfs-tools/ChangeLog7
-rw-r--r--sys-fs/squashfs-tools/Manifest11
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-3.3-progress-stderr.patch26
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-3.4-progress-stderr.patch37
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-stderr.patch29
-rw-r--r--sys-fs/squashfs-tools/metadata.xml12
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild42
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-3.4.ebuild42
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.0.ebuild45
14 files changed, 330 insertions, 41 deletions
diff --git a/sys-fs/squash_dir/ChangeLog b/sys-fs/squash_dir/ChangeLog
index bf957072..84d39ff1 100644
--- a/sys-fs/squash_dir/ChangeLog
+++ b/sys-fs/squash_dir/ChangeLog
@@ -2,6 +2,16 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header $
+ 28 Apr 2010; Martin Väth <martin@mvath.de>
+ +squash_dir-10.4.ebuild -squash_dir-10.3.ebuild:
+ Version bump because of a stupid automake bug.
+
+ 27 Apr 2010; Martin Väth <martin@mvath.de>
+ +squash_dir-10.3.ebuild -squash_dir-10.2.ebuild:
+ Version bump. Support USE=readonly, making USE=+unionfs-fuse obsolete.
+ Remove USE=hack-squash-utils and warn for previous installs.
+ Recommend sys-fs/squashfs-tools[progress-redirect] from mv overlay.
+
01 Apr 2010; Martin Väth <martin@mvath.de>
Update tarball without revbump (remove ebuild from tarball).
diff --git a/sys-fs/squash_dir/Manifest b/sys-fs/squash_dir/Manifest
index 3a35971f..bf968515 100644
--- a/sys-fs/squash_dir/Manifest
+++ b/sys-fs/squash_dir/Manifest
@@ -1,4 +1,4 @@
-DIST squash_dir-10.2.tar.bz2 19839 RMD160 3a6841e63e086df9f789c368808167e66dfef6d9 SHA1 0680080ef4a3e33ddfa42bebdcd29ab293b257c6 SHA256 c8a7ab6e9072c636f73c15c5edb59ec217926847cecc33912ed6b830d7c2d7d1
-EBUILD squash_dir-10.2.ebuild 908 RMD160 c01bab86e9b33791af3e1c1a8672f8bdb1bacf20 SHA1 75bf99dc597aa2533a6ffa3ca47a49ba999dce50 SHA256 bfedc1becbeb025ae13d513dd356a6c05c95c7546f73c83a5c3288dfec3cc509
-MISC ChangeLog 388 RMD160 81300d6c28bb663ed3bad0c3de209d331ed88488 SHA1 4fbed42519d6f17e1185c3adcdc89d2cd448aeae SHA256 dcb13d41375c583caacfa78cda905d9d0aa4eed37e6239b96985351a684cda27
-MISC metadata.xml 576 RMD160 1e3535fb3cb5e5e23d82745bc7f656a449897392 SHA1 efd97148dba120df69224949119d2123f040bd07 SHA256 66368a4743e876b2ee910287c2bb1bdccaa276e61782c8d6fef7523c41e89271
+DIST squash_dir-10.4.tar.bz2 18647 RMD160 c2d2051e49e4f6994cba1f8a6bb73fbd6b20b5ef SHA1 365d61f1b8786ef1ea7ca1a429f3731e4ea93c6b SHA256 0b12934d618fa3b4d9852f8310ee0bc9273396396ec551b1f43bf68bc1a1841b
+EBUILD squash_dir-10.4.ebuild 1598 RMD160 fc43de52d97ff0414bc431a1b39c3da8a632464b SHA1 dce915e1841bfc9c01a2c242dc573f10c075435e SHA256 b453b0f3dc2c5fe06334cf14ab8b4fc737111b3cdf85e552c525c7a4814be772
+MISC ChangeLog 875 RMD160 514d270cd1ea8dc24b14a40bb30433225d1f5630 SHA1 875330fa75e7e8b0cf0cd10f24465339ff050469 SHA256 7bcd4eb5462e02185b1ea978d017c45698778364382406632ade6166dc42cf4f
+MISC metadata.xml 524 RMD160 695348b2ec91e6e657132f92d92355b3a9aa9cb3 SHA1 031aa7e4a43e9653e6ff5f5760f109cff893278c SHA256 9f7f3ee8acbeea6d82c33bfbab9ddf6076bac7f80f5789c95173223c2c658037
diff --git a/sys-fs/squash_dir/metadata.xml b/sys-fs/squash_dir/metadata.xml
index 2552ab84..804cf03e 100644
--- a/sys-fs/squash_dir/metadata.xml
+++ b/sys-fs/squash_dir/metadata.xml
@@ -8,7 +8,6 @@
<description>Upstream developer</description>
</maintainer>
<use>
- <flag name="hack-squash-utils">Activate hackishly a patch to emerge squashfs-utils next time with redirection of progress bar to stderr.</flag>
- <flag name="unionfs-fuse">Depend on unionfs-fuse (used by default if aufs/aufs2 is not available).</flag>
+ <flag name="readonly">Do not depend on any of aufs|aufs2|unionfs|unionfs-fuse|funionfs. At least one of these must be installed and active to make the squash_dir-mounted filesystems writable.</flag>
</use>
</pkgmetadata>
diff --git a/sys-fs/squash_dir/squash_dir-10.2.ebuild b/sys-fs/squash_dir/squash_dir-10.2.ebuild
deleted file mode 100644
index 4c0f245c..00000000
--- a/sys-fs/squash_dir/squash_dir-10.2.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header $
-
-EAPI=2
-inherit autotools
-RESTRICT="mirror"
-
-DESCRIPTION="Keep directories compressed with squashfs. Useful for portage tree, texmf-dist"
-HOMEPAGE="http://www.mathematik.uni-wuerzburg.de/~vaeth/gentoo/index.html"
-SRC_URI="http://www.mathematik.uni-wuerzburg.de/~vaeth/gentoo/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="hack-squash-utils +unionfs-fuse"
-
-RDEPEND="sys-fs/squashfs-tools
- unionfs-fuse? ( sys-fs/unionfs-fuse )"
-DEPEND=">=sys-devel/autoconf-2.65"
-
-src_prepare () {
- eautoreconf
-}
-
-src_configure () {
- econf $(use_enable hack-squash-utils squashfs-tools-patch) \
- --with-decompress="${PORTAGE_COMPRESS} -dc --" \
- --docdir="${EPREFIX}/usr/share/doc/${PF}"
-}
-
-src_install () {
- emake DESTDIR="${D}" install || die "emake install failed"
- prepalldocs
-}
diff --git a/sys-fs/squash_dir/squash_dir-10.4.ebuild b/sys-fs/squash_dir/squash_dir-10.4.ebuild
new file mode 100644
index 00000000..e3ddac8a
--- /dev/null
+++ b/sys-fs/squash_dir/squash_dir-10.4.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+EAPI="3"
+inherit autotools
+RESTRICT="mirror"
+
+DESCRIPTION="Keep directories compressed with squashfs. Useful for portage tree, texmf-dist"
+HOMEPAGE="http://www.mathematik.uni-wuerzburg.de/~vaeth/gentoo/index.html"
+SRC_URI="http://www.mathematik.uni-wuerzburg.de/~vaeth/gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="readonly"
+
+RDEPEND="sys-fs/squashfs-tools
+ !readonly? ( || (
+ sys-fs/aufs2
+ sys-fs/unionfs-fuse
+ sys-fs/funionfs
+ sys-fs/unionfs
+ sys-fs/aufs
+ ) )"
+DEPEND=">=sys-devel/autoconf-2.65"
+
+src_prepare () {
+ eautoreconf
+}
+
+src_configure () {
+ econf --docdir="${EPREFIX}/usr/share/doc/${PF}"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "emake install failed"
+ prepalldocs
+}
+
+check_for_obsolete () {
+ local a
+ a="${EPREFIX}/etc/portage/env/sys-fs/squashfs-tools"
+ test -e "${a}" && grep -q "squash_dir's hack" "${a}" || return 0
+ ewarn "You probably had installed ${PN} with USE=hack-squash-utils"
+ ewarn "${a} is left from this."
+ ewarn "This file is now obsolete."
+ ewarn "It is recommended to remove it and to install instead"
+ ewarn "sys-fs/squashfs-tools from the mv overlay with USE=progress-redirect"
+ return 1
+}
+
+pkg_postinst () {
+ check_for_obsolete && \
+ ! has_version sys-fs/squashfs-tools[progress-redirect] || return 0
+ ewarn "For better output of ${PN}, it is recommended to install"
+ ewarn "sys-fs/squashfs-tools from the mv overlay with USE=progress-redirect"
+ :
+}
+
+pkg_postrm () {
+ check_for_obsolete
+ :
+}
diff --git a/sys-fs/squashfs-tools/ChangeLog b/sys-fs/squashfs-tools/ChangeLog
new file mode 100644
index 00000000..5a6fc4a2
--- /dev/null
+++ b/sys-fs/squashfs-tools/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for sys-fs/squashfs-tools
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header $
+
+ 27 Apr 2010; Martin Väth <martin@mvath.de>
+ Copy from the portage tree to add USE=progress-redirect
+ Clear previous ChangeLog.
diff --git a/sys-fs/squashfs-tools/Manifest b/sys-fs/squashfs-tools/Manifest
new file mode 100644
index 00000000..f712ed70
--- /dev/null
+++ b/sys-fs/squashfs-tools/Manifest
@@ -0,0 +1,11 @@
+AUX squashfs-tools-3.3-progress-stderr.patch 582 RMD160 6f7f864e3c24787c8a6c8daaa48acd7b722e6e44 SHA1 cd5ff9590da7e38300634fd920834fcbfe8b7a05 SHA256 215ca62f54bdb4b4863df5a8b7c9fe0be7c186d15324498bc4055368f033ebf1
+AUX squashfs-tools-3.4-progress-stderr.patch 810 RMD160 0f6f7f07a1f6fa0d9488e568c918eb1ea8ba7fdf SHA1 40d3434bd008796384b7b180b00180e4b0dd3384 SHA256 a39aa4af03c7b7a72a7b4f57b12cc9eef3f281cd41652792075dd9f0eef021e5
+AUX squashfs-tools-4.0-progress-stderr.patch 631 RMD160 2c5bd994669e01202afcbceb75866aaf74ea1482 SHA1 730df34a4ef395fbbb162b5d45aa4a419ddf7dfc SHA256 556a3a436063fdef0d815ba55b82dd86027b689f27e1fe20d6f72c6bdbf2208b
+DIST squashfs3.2-r2.tar.gz 314764 RMD160 6f21ad0ee90e4b5c6ad2b0b92c96d24af8e19531 SHA1 e38c16c09435291b2c97aa0a321c29da442ff686 SHA256 8482465d58d78099c608b32fc034921f7c8c3cf7934b5edc68c463cd450b40a7
+DIST squashfs3.4.tar.gz 352660 RMD160 e75c9a9e5220e80a8e321536f8fe8372bfe5d830 SHA1 6933a8f3098d94f93ec4002a54026b15a6e11640 SHA256 9ea1a9b3bd4f387ca11b5e96f00f8ae996fb81c4c7ad41f7c7f359917628a339
+DIST squashfs4.0.tar.gz 103979 RMD160 b67dd14ff7255d245617466566ac29d9a08aff68 SHA1 3efe764ac27c507ee4a549fc6507bc86ea0660dd SHA256 18948edbe06bac2c4307eea99bfb962643e4b82e5b7edd541b4d743748e12e21
+EBUILD squashfs-tools-3.2_p2.ebuild 1110 RMD160 f60cf4e15304073d83b675294cab2c6b1f467e33 SHA1 2801c4dccb2c706486e74e32e48ed5d0204135af SHA256 5258456e1b71f878bcdaa65b842d5ccd59fad4a30616be267b4ac39f342e7703
+EBUILD squashfs-tools-3.4.ebuild 1088 RMD160 dbf034f89abae8180dd1f83d2cffa92a00b8f4d0 SHA1 9090da84d30ce5edd5408056438cf0b95c6420e1 SHA256 c3fa78a607db8657f808e4e4902ad585ad85531423648efadc7f19d3dfcde55b
+EBUILD squashfs-tools-4.0.ebuild 1082 RMD160 953346afde453fbe4a01e3e95f231f198121d5c4 SHA1 db3ab258f9b251ff3c8eba678e674e486f3856ee SHA256 8e902b57cd16eca3490b0f7a6ea5a21f15d277298d87f661db764cbf2af6f7d7
+MISC ChangeLog 271 RMD160 e9fdf45dc23587bd58bf57a60b8bf9ca142d7d5a SHA1 bfddb625547707c814ca2bc180af70e723f9013f SHA256 77224a5a9a8878bf61733946bc204d29af04395702952779f975665b1b5ad08e
+MISC metadata.xml 431 RMD160 c7ccbb800d3ac8606a3edf90fec3a501afab018e SHA1 81f9701f070043f1e505ea804b42d73cf5490dab SHA256 eda5db4e930c106c63cf8402fce9b70c009d73ccd4698620687639c38f75c49c
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-3.3-progress-stderr.patch b/sys-fs/squashfs-tools/files/squashfs-tools-3.3-progress-stderr.patch
new file mode 100644
index 00000000..4f1d0bdf
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-3.3-progress-stderr.patch
@@ -0,0 +1,26 @@
+--- squashfs-tools/mksquashfs.c
++++ squashfs-tools/mksquashfs.c
+@@ -1832,17 +1832,17 @@
+ if(!progress || columns - used < 0)
+ return;
+
+- printf("\r[");
++ fprintf(stderr, "\r[");
+
+ while (hashes --)
+- putchar('=');
++ putc('=', stderr);
+
+ while(spaces --)
+- putchar(' ');
++ putc(' ', stderr);
+
+- printf("] %*lld/%*lld", max_digits, current, max_digits, max);
+- printf(" %3lld%%", current * 100 / max);
+- fflush(stdout);
++ fprintf(stderr, "] %*lld/%*lld", max_digits, current, max_digits, max);
++ fprintf(stderr, " %3lld%%", current * 100 / max);
++ fflush(stderr);
+ }
+
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-3.4-progress-stderr.patch b/sys-fs/squashfs-tools/files/squashfs-tools-3.4-progress-stderr.patch
new file mode 100644
index 00000000..d06f9789
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-3.4-progress-stderr.patch
@@ -0,0 +1,37 @@
+--- squashfs-tools/mksquashfs.c
++++ squashfs-tools/mksquashfs.c
+@@ -2254,26 +2254,26 @@
+ int spaces = columns - used - hashes;
+
+ if(current > max) {
+- printf("%lld %lld\n", current, max);
++ fprintf(stderr, "%lld %lld\n", current, max);
+ return;
+ }
+
+ if(columns - used < 0)
+ return;
+
+- printf("\r[");
++ fprintf(stderr, "\r[");
+
+ while (hashes --)
+- putchar('=');
++ putc('=', stderr);
+
+- putchar(rotate_list[rotate]);
++ putc(rotate_list[rotate], stderr);
+
+ while(spaces --)
+- putchar(' ');
++ putc(' ', stderr);
+
+- printf("] %*lld/%*lld", max_digits, current, max_digits, max);
+- printf(" %3lld%%", current * 100 / max);
+- fflush(stdout);
++ fprintf(stderr, "] %*lld/%*lld", max_digits, current, max_digits, max);
++ fprintf(stderr, " %3lld%%", current * 100 / max);
++ fflush(stderr);
+ }
+
+
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-stderr.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-stderr.patch
new file mode 100644
index 00000000..d6669773
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.0-progress-stderr.patch
@@ -0,0 +1,29 @@
+--- squashfs-tools/mksquashfs.c
++++ squashfs-tools/mksquashfs.c
+@@ -2570,19 +2570,19 @@
+ previous = current;
+ }
+
+- printf("\r[");
++ fprintf(stderr, "\r[");
+
+ while (hashes --)
+- putchar('=');
++ putc('=', stderr);
+
+- putchar(rotate_list[rotate]);
++ putc(rotate_list[rotate], stderr);
+
+ while(spaces --)
+- putchar(' ');
++ putc(' ', stderr);
+
+- printf("] %*lld/%*lld", max_digits, current, max_digits, max);
+- printf(" %3lld%%", current * 100 / max);
+- fflush(stdout);
++ fprintf(stderr, "] %*lld/%*lld", max_digits, current, max_digits, max);
++ fprintf(stderr, " %3lld%%", current * 100 / max);
++ fflush(stderr);
+ }
+
+
diff --git a/sys-fs/squashfs-tools/metadata.xml b/sys-fs/squashfs-tools/metadata.xml
new file mode 100644
index 00000000..f3b3198c
--- /dev/null
+++ b/sys-fs/squashfs-tools/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+</maintainer>
+<use>
+ <flag name="progress-redirect">Redirect printing of progress bar to stderr. This gives a nicer output if used from scripts like sys-fs/squash_dir</flag>
+</use>
+</pkgmetadata>
diff --git a/sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild b/sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild
new file mode 100644
index 00000000..c35f0715
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-3.2_p2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+inherit toolchain-funcs eutils
+
+MY_PV=${PV/_p/-r}
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="3.0" # squashfs filesystem version
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="+progress-redirect"
+
+RDEPEND="sys-libs/zlib"
+
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e 's:-O2:$(CFLAGS):' \
+ -e '/-lz/s:$: $(LDFLAGS):' \
+ Makefile || die "sed failed"
+ use progress-redirect && \
+ epatch "${FILESDIR}/${PN}-3.3-progress-stderr.patch"
+ echo "struct dir_info; `grep '^int dir_scan2' mksquashfs.c`;" >> global.h
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ newbin mksquashfs mksquashfs-${SLOT} || die
+ newbin unsquashfs unsquashfs-${SLOT} || die
+ cd ..
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README README-3.2
+}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-3.4.ebuild b/sys-fs/squashfs-tools/squashfs-tools-3.4.ebuild
new file mode 100644
index 00000000..4979fa36
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-3.4.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+inherit toolchain-funcs eutils
+
+MY_PV=${PV/_p/-r}
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="3.1" # squashfs filesystem version
+KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
+IUSE="+progress-redirect"
+
+RDEPEND="sys-libs/zlib"
+
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e 's:-O2:$(CFLAGS):' \
+ -e '/-lz/s:$: $(LDFLAGS):' \
+ Makefile || die "sed failed"
+ use progress-redirect && \
+ epatch "${FILESDIR}/${P}-progress-stderr.patch"
+ sed -i -e 's:get_nprocs():sysconf(_SC_NPROCESSORS_ONLN):' *.c
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ newbin mksquashfs mksquashfs-${SLOT} || die
+ newbin unsquashfs unsquashfs-${SLOT} || die
+ cd ..
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README README
+}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.0.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.0.ebuild
new file mode 100644
index 00000000..938134c1
--- /dev/null
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header $
+
+inherit toolchain-funcs eutils
+
+MY_PV=${PV}
+DESCRIPTION="Tool for creating compressed filesystem type squashfs"
+HOMEPAGE="http://squashfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="+progress-redirect"
+
+RDEPEND="sys-libs/zlib"
+
+S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ sed -i \
+ -e 's:-O2:$(CFLAGS):' \
+ -e '/-lz/s:$: $(LDFLAGS):' \
+ Makefile || die "sed failed"
+ use progress-redirect && \
+ epatch "${FILESDIR}/${P}-progress-stderr.patch"
+ sed -i -e 's:get_nprocs():sysconf(_SC_NPROCESSORS_ONLN):' *.c
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ dobin mksquashfs unsquashfs || die
+ cd ..
+ dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README
+}
+
+pkg_postinst() {
+ ewarn "This version of mksquashfs requires a 2.6.29 kernel or better."
+}