summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2017-01-14 13:42:42 +0100
committerMartin Väth <martin@mvath.de>2017-01-14 13:44:11 +0100
commit4b0f2e6e67a4b0fe8bb2630b127872ee69323f66 (patch)
tree9132281e712062c77c1955fabe33230a837f3199 /sys-fs/squashfs-tools
parentFix exec bits (diff)
downloadmv-4b0f2e6e67a4b0fe8bb2630b127872ee69323f66.tar.gz
mv-4b0f2e6e67a4b0fe8bb2630b127872ee69323f66.tar.bz2
mv-4b0f2e6e67a4b0fe8bb2630b127872ee69323f66.zip
sys-fs/squashfs-tools: Support USE debug, static. Fix 595290
Diffstat (limited to 'sys-fs/squashfs-tools')
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.3-static-inline.patch88
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild29
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild29
3 files changed, 120 insertions, 26 deletions
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-static-inline.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-static-inline.patch
new file mode 100644
index 00000000..a103f173
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-static-inline.patch
@@ -0,0 +1,88 @@
+--- 1/mksquashfs.c
++++ 1/mksquashfs.c
+@@ -828,13 +828,13 @@ char *subpathname(struct dir_ent *dir_ent)
+ }
+
+
+-inline unsigned int get_inode_no(struct inode_info *inode)
++static inline unsigned int get_inode_no(struct inode_info *inode)
+ {
+ return inode->inode_number;
+ }
+
+
+-inline unsigned int get_parent_no(struct dir_info *dir)
++static inline unsigned int get_parent_no(struct dir_info *dir)
+ {
+ return dir->depth ? get_inode_no(dir->dir_ent->inode) : inode_no;
+ }
+@@ -2027,7 +2027,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
+ }
+
+
+-inline int is_fragment(struct inode_info *inode)
++static inline int is_fragment(struct inode_info *inode)
+ {
+ off_t file_size = inode->buf.st_size;
+
+@@ -2996,13 +2996,13 @@ struct inode_info *lookup_inode2(struct stat *buf, int pseudo, int id)
+ }
+
+
+-inline struct inode_info *lookup_inode(struct stat *buf)
++static inline struct inode_info *lookup_inode(struct stat *buf)
+ {
+ return lookup_inode2(buf, 0, 0);
+ }
+
+
+-inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
++static inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ {
+ if (inode->inode_number == 0) {
+ inode->inode_number = use_this ? : inode_no ++;
+@@ -3013,7 +3013,7 @@ inline void alloc_inode_no(struct inode_info *inode, unsigned int use_this)
+ }
+
+
+-inline struct dir_ent *create_dir_entry(char *name, char *source_name,
++static inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+ char *nonstandard_pathname, struct dir_info *dir)
+ {
+ struct dir_ent *dir_ent = malloc(sizeof(struct dir_ent));
+@@ -3031,7 +3031,7 @@ inline struct dir_ent *create_dir_entry(char *name, char *source_name,
+ }
+
+
+-inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
++static inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+ struct inode_info *inode_info)
+ {
+ struct dir_info *dir = dir_ent->our_dir;
+@@ -3047,7 +3047,7 @@ inline void add_dir_entry(struct dir_ent *dir_ent, struct dir_info *sub_dir,
+ }
+
+
+-inline void add_dir_entry2(char *name, char *source_name,
++static inline void add_dir_entry2(char *name, char *source_name,
+ char *nonstandard_pathname, struct dir_info *sub_dir,
+ struct inode_info *inode_info, struct dir_info *dir)
+ {
+@@ -3059,7 +3059,7 @@ inline void add_dir_entry2(char *name, char *source_name,
+ }
+
+
+-inline void free_dir_entry(struct dir_ent *dir_ent)
++static inline void free_dir_entry(struct dir_ent *dir_ent)
+ {
+ if(dir_ent->name)
+ free(dir_ent->name);
+@@ -3080,7 +3080,7 @@ inline void free_dir_entry(struct dir_ent *dir_ent)
+ }
+
+
+-inline void add_excluded(struct dir_info *dir)
++static inline void add_excluded(struct dir_info *dir)
+ {
+ dir->excluded ++;
+ }
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
index 177749bb..2b6af3dd 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2016 Gentoo Foundation
+# Copyright 2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,18 +23,18 @@ SRC_URI="mirror://sourceforge/squashfs/squashfs${PV}.tar.gz
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="lz4 lzma lzo xattr +xz"
+IUSE="debug lz4 lzma lzo static xattr +xz"
-RDEPEND="
- sys-libs/zlib
- !xz? ( !lzo? ( sys-libs/zlib ) )
- lz4? ( app-arch/lz4 )
- lzma? ( app-arch/xz-utils )
- lzo? ( dev-libs/lzo )
- xattr? ( sys-apps/attr )
- xz? ( app-arch/xz-utils )
-"
-DEPEND="${RDEPEND}"
+LIB_DEPEND="sys-libs/zlib[static-libs(+)]
+ !xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
+ lz4? ( app-arch/lz4[static-libs(+)] )
+ lzma? ( app-arch/xz-utils[static-libs(+)] )
+ lzo? ( dev-libs/lzo[static-libs(+)] )
+ xattr? ( sys-apps/attr[static-libs(+)] )
+ xz? ( app-arch/xz-utils[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
S="${WORKDIR}/squashfs${PV}/${PN}"
@@ -63,9 +63,10 @@ src_prepare() {
eapply -p2 "${FILESDIR}"/${Pm}-sysmacros.patch
eapply -p2 "${FILESDIR}"/${Pm}-aligned-data.patch
${LIVE} || eapply -p2 "${FILESDIR}"/${Pm}-2gb.patch
- eapply -p1 "${FILESDIR}"/${Pm}-local-cve-fix.patch
+ eapply "${FILESDIR}"/${Pm}-local-cve-fix.patch
${LIVE} || eapply -p2 "${FILESDIR}"/${Pm}-mem-overflow.patch
eapply -p2 "${FILESDIR}"/${Pm}-xattrs.patch
+ eapply "${FILESDIR}"/${Pm}-static-inline.patch
eapply "${FILESDIR}"/${Pm}-quiet.patch
eapply_user
}
@@ -84,6 +85,8 @@ src_configure() {
filter-flags -fno-common
tc-export CC
+ use debug && append-cppflags -DSQUASHFS_TRACE
+ use static && append-ldflags -static
}
src_compile() {
diff --git a/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild b/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
index 177749bb..2b6af3dd 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2016 Gentoo Foundation
+# Copyright 2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -23,18 +23,18 @@ SRC_URI="mirror://sourceforge/squashfs/squashfs${PV}.tar.gz
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-IUSE="lz4 lzma lzo xattr +xz"
+IUSE="debug lz4 lzma lzo static xattr +xz"
-RDEPEND="
- sys-libs/zlib
- !xz? ( !lzo? ( sys-libs/zlib ) )
- lz4? ( app-arch/lz4 )
- lzma? ( app-arch/xz-utils )
- lzo? ( dev-libs/lzo )
- xattr? ( sys-apps/attr )
- xz? ( app-arch/xz-utils )
-"
-DEPEND="${RDEPEND}"
+LIB_DEPEND="sys-libs/zlib[static-libs(+)]
+ !xz? ( !lzo? ( sys-libs/zlib[static-libs(+)] ) )
+ lz4? ( app-arch/lz4[static-libs(+)] )
+ lzma? ( app-arch/xz-utils[static-libs(+)] )
+ lzo? ( dev-libs/lzo[static-libs(+)] )
+ xattr? ( sys-apps/attr[static-libs(+)] )
+ xz? ( app-arch/xz-utils[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="${RDEPEND}
+ static? ( ${LIB_DEPEND} )"
S="${WORKDIR}/squashfs${PV}/${PN}"
@@ -63,9 +63,10 @@ src_prepare() {
eapply -p2 "${FILESDIR}"/${Pm}-sysmacros.patch
eapply -p2 "${FILESDIR}"/${Pm}-aligned-data.patch
${LIVE} || eapply -p2 "${FILESDIR}"/${Pm}-2gb.patch
- eapply -p1 "${FILESDIR}"/${Pm}-local-cve-fix.patch
+ eapply "${FILESDIR}"/${Pm}-local-cve-fix.patch
${LIVE} || eapply -p2 "${FILESDIR}"/${Pm}-mem-overflow.patch
eapply -p2 "${FILESDIR}"/${Pm}-xattrs.patch
+ eapply "${FILESDIR}"/${Pm}-static-inline.patch
eapply "${FILESDIR}"/${Pm}-quiet.patch
eapply_user
}
@@ -84,6 +85,8 @@ src_configure() {
filter-flags -fno-common
tc-export CC
+ use debug && append-cppflags -DSQUASHFS_TRACE
+ use static && append-ldflags -static
}
src_compile() {