Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/squashfs-tools: ChangeLog squashfs-tools-4.1-r1.ebuild
Date: Mon, 31 Jan 2011 02:53:32
Message-Id: 20110131025319.C3D4220057@flycatcher.gentoo.org
1 jer 11/01/31 02:53:19
2
3 Modified: ChangeLog
4 Added: squashfs-tools-4.1-r1.ebuild
5 Log:
6 Die sooner (and explain why) when no compression USE flag is set (bug #352861). Fix USE=-lzma case (it tried to fix xz_SUPPORT in the Makefile instead of XZ_SUPPORT, so it would always link against liblzma or die if not found).
7
8 (Portage version: 2.2.0_alpha19/cvs/Linux i686)
9
10 Revision Changes Path
11 1.73 sys-fs/squashfs-tools/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/squashfs-tools/ChangeLog?rev=1.73&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/squashfs-tools/ChangeLog?rev=1.73&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/squashfs-tools/ChangeLog?r1=1.72&r2=1.73
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/ChangeLog,v
20 retrieving revision 1.72
21 retrieving revision 1.73
22 diff -u -r1.72 -r1.73
23 --- ChangeLog 14 Nov 2010 13:49:59 -0000 1.72
24 +++ ChangeLog 31 Jan 2011 02:53:19 -0000 1.73
25 @@ -1,6 +1,14 @@
26 # ChangeLog for sys-fs/squashfs-tools
27 -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/ChangeLog,v 1.72 2010/11/14 13:49:59 jlec Exp $
29 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
30 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/ChangeLog,v 1.73 2011/01/31 02:53:19 jer Exp $
31 +
32 +*squashfs-tools-4.1-r1 (31 Jan 2011)
33 +
34 + 31 Jan 2011; Jeroen Roovers <jer@g.o> +squashfs-tools-4.1-r1.ebuild:
35 + Die sooner (and explain why) when no compression USE flag is set (bug
36 + #352861). Fix USE=-lzma case (it tried to fix xz_SUPPORT in the Makefile
37 + instead of XZ_SUPPORT, so it would always link against liblzma or die if not
38 + found).
39
40 14 Nov 2010; Justin Lecher <jlec@g.o> squashfs-tools-3.2_p2.ebuild,
41 squashfs-tools-3.4.ebuild, squashfs-tools-4.0.ebuild,
42
43
44
45 1.1 sys-fs/squashfs-tools/squashfs-tools-4.1-r1.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.1-r1.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.1-r1.ebuild?rev=1.1&content-type=text/plain
49
50 Index: squashfs-tools-4.1-r1.ebuild
51 ===================================================================
52 # Copyright 1999-2011 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sys-fs/squashfs-tools/squashfs-tools-4.1-r1.ebuild,v 1.1 2011/01/31 02:53:19 jer Exp $
55
56 EAPI="2"
57
58 inherit toolchain-funcs eutils
59
60 MY_PV=${PV}
61 DESCRIPTION="Tool for creating compressed filesystem type squashfs"
62 HOMEPAGE="http://squashfs.sourceforge.net/"
63 SRC_URI="mirror://sourceforge/squashfs/squashfs${MY_PV}.tar.gz"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
68 IUSE="+gzip +lzma lzo xattr"
69
70 RDEPEND="gzip? ( sys-libs/zlib )
71 lzma? ( app-arch/xz-utils )
72 lzo? ( dev-libs/lzo )
73 !lzma? ( !lzo? ( sys-libs/zlib ) )
74 xattr? ( sys-apps/attr )"
75 DEPEND="${RDEPEND}"
76
77 S=${WORKDIR}/squashfs${MY_PV}/squashfs-tools
78
79 src_prepare() {
80 sed -i \
81 -e "s:-O2:${CFLAGS} ${CPPFLAGS}:" \
82 -e '/^LIBS =/s:$: $(LDFLAGS):' \
83 Makefile || die
84 }
85
86 use_sed() {
87 local u=$1 s="${2:-`echo $1 | tr '[:lower:]' '[:upper:]'`}_SUPPORT"
88 printf '/^#?%s =/%s\n' "${s}" \
89 "$( use $u && echo s:.*:${s} = 1: || echo d )"
90 }
91 src_configure() {
92 tc-export CC
93 local def
94 if use gzip; then def="gzip"
95 einfo "enabling gzip"
96 elif use lzma; then def="lzma"
97 einfo "enabling lzma"
98 elif use lzo; then def="lzo"
99 einfo "enabling lzo"
100 else
101 die "Please set at least one of the gzip, lzma and lzo USE flags as compression algorithm."
102 fi
103
104 einfo "Using ${def} as compression algorithm."
105
106 sed -i -r \
107 -e "/^COMP_DEFAULT =/s:=.*:= ${def}:" \
108 -e "$(use_sed gzip)" \
109 -e "$(use_sed lzma XZ)" \
110 -e "$(use_sed lzo)" \
111 -e "$(use_sed xattr)" \
112 Makefile || die
113 }
114
115 src_install() {
116 dobin mksquashfs unsquashfs || die
117 cd ..
118 dodoc README ACKNOWLEDGEMENTS CHANGES PERFORMANCE.README || die
119 }
120
121 pkg_postinst() {
122 ewarn "This version of mksquashfs requires a 2.6.29 kernel or better"
123 }