sys-fs/squashfs-tools: Fix CFLAGS=-fno-common
authorJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 11:51:05 +0000 (12:51 +0100)
committerJeroen Roovers <jer@gentoo.org>
Mon, 27 Jan 2020 12:00:11 +0000 (13:00 +0100)
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Closes: https://bugs.gentoo.org/706456
Signed-off-by: Jeroen Roovers <jer@gentoo.org>
sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch [new file with mode: 0644]
sys-fs/squashfs-tools/squashfs-tools-4.4.ebuild
sys-fs/squashfs-tools/squashfs-tools-9999.ebuild

diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.4-fno-common.patch
new file mode 100644 (file)
index 0000000..dfbf42a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/squashfs-tools/mksquashfs.h
++++ b/squashfs-tools/mksquashfs.h
+@@ -143,7 +143,7 @@ struct append_file {
+ #endif
+ extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
+-struct cache *bwriter_buffer, *fwriter_buffer;
++extern struct cache *bwriter_buffer, *fwriter_buffer;
+ extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
+       *to_frag, *locked_fragment, *to_process_frag;
+ extern struct append_file **file_mapping;
index ae823c3e1979e5f699af58c262a79121aa4456cd..fcc3ce5bf79e179a9e9e2fca0392580868755710 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -30,7 +30,9 @@ DEPEND="
        ${RDEPEND}
        static? ( ${LIB_DEPEND} )
 "
-S=${WORKDIR}/${P}/${PN}
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.4-fno-common.patch
+)
 
 use10() { usex $1 1 0 ; }
 
@@ -55,12 +57,11 @@ src_configure() {
 }
 
 src_compile() {
-       emake "${EMAKE_SQUASHFS_CONF[@]}"
+       emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
 }
 
 src_install() {
-       dobin mksquashfs unsquashfs
-       cd ..
+       dobin ${PN}/{mksquashfs,unsquashfs}
        dodoc ACKNOWLEDGEMENTS CHANGES README*
        dodoc -r RELEASE-READMEs
 }
index 56e2a3332c0ba14fd7205f2711f9ce4321f24327..c5bf886e7767519a1e547f3c742d0d5df5fe9d6e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -34,12 +34,12 @@ DEPEND="
 "
 PATCHES=(
        "${FILESDIR}"/${PN}-4.3-sysmacros.patch
+       "${FILESDIR}"/${PN}-4.4-fno-common.patch
 )
 
 use10() { usex $1 1 0 ; }
 
 src_configure() {
-       cd "${WORKDIR}"/${P}/${PN} || die
 
        # set up make command line variables in EMAKE_SQUASHFS_CONF
        EMAKE_SQUASHFS_CONF=(
@@ -57,11 +57,10 @@ src_configure() {
 }
 
 src_compile() {
-       cd "${WORKDIR}"/${P}/${PN} || die
-       emake "${EMAKE_SQUASHFS_CONF[@]}"
+       emake "${EMAKE_SQUASHFS_CONF[@]}" -C ${PN}
 }
 
 src_install() {
-       dobin "${WORKDIR}"/${P}/${PN}/{mksquashfs,unsquashfs}
+       dobin ${PN}/{mksquashfs,unsquashfs}
        dodoc CHANGES README RELEASE-READMEs/*
 }