From 3a418bfc82713d71cdefa33db2a04aebc78fd052 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Thu, 22 Nov 2018 14:53:24 +0100 Subject: app-arch/cabextract: fix big-endian Closes: https://bugs.gentoo.org/670654 Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann --- app-arch/cabextract/cabextract-1.9-r1.ebuild | 71 ++++++++++++++++++++++ app-arch/cabextract/cabextract-1.9.ebuild | 66 -------------------- .../files/cabextract-1.9-fix-bigendian.patch | 17 ++++++ ...cabextract-1.9-remove-spurious-test_files.patch | 17 ++++++ 4 files changed, 105 insertions(+), 66 deletions(-) create mode 100644 app-arch/cabextract/cabextract-1.9-r1.ebuild delete mode 100644 app-arch/cabextract/cabextract-1.9.ebuild create mode 100644 app-arch/cabextract/files/cabextract-1.9-fix-bigendian.patch create mode 100644 app-arch/cabextract/files/cabextract-1.9-remove-spurious-test_files.patch (limited to 'app-arch/cabextract') diff --git a/app-arch/cabextract/cabextract-1.9-r1.ebuild b/app-arch/cabextract/cabextract-1.9-r1.ebuild new file mode 100644 index 000000000000..f435083a5f26 --- /dev/null +++ b/app-arch/cabextract/cabextract-1.9-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit autotools toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/kyz/libmspack.git" + inherit git-r3 + MY_P="${PN}-9999" + + LIBMSPACK_DEPEND="~dev-libs/libmspack-9999:=" +else + KEYWORDS="amd64 ~arm ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" + MY_PV="${PV/_alpha/alpha}" + MY_P="${PN}-${MY_PV}" + SRC_URI="https://www.cabextract.org.uk/${P}.tar.gz" + + LIBMSPACK_DEPEND=">=dev-libs/libmspack-0.8_alpha:=" +fi + +DESCRIPTION="Extracts files from Microsoft cabinet archive files" +HOMEPAGE="https://www.cabextract.org.uk/" + +LICENSE="GPL-3" +SLOT="0" +IUSE="extras" + +DEPEND="${LIBMSPACK_DEPEND} + virtual/pkgconfig" +RDEPEND="extras? ( dev-lang/perl )" + +PATCHES=( + "${FILESDIR}"/${P}-fix-bigendian.patch + "${FILESDIR}"/${P}-remove-spurious-test_files.patch +) + +src_prepare() { + if [[ ${PV} == "9999" ]] ; then + # Re-create file layout from release tarball + pushd "${WORKDIR}" &>/dev/null || die + cp -aL "${S}"/${PN} "${WORKDIR}"/${PN}-source || die + rm -r "${S}" || die + mv "${WORKDIR}"/${PN}-source "${S}" || die + popd &>/dev/null || die + fi + + default + + eautoreconf +} + +src_configure() { + econf \ + --with-external-libmspack=yes +} + +src_compile() { + emake AR="$(tc-getAR)" +} + +src_install() { + local DOCS=( AUTHORS ChangeLog NEWS README TODO doc/magic ) + default + docinto html + dodoc doc/wince_cab_format.html + if use extras; then + dobin src/{wince_info,wince_rename,cabinfo,cabsplit} + fi +} diff --git a/app-arch/cabextract/cabextract-1.9.ebuild b/app-arch/cabextract/cabextract-1.9.ebuild deleted file mode 100644 index 547506966c97..000000000000 --- a/app-arch/cabextract/cabextract-1.9.ebuild +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit autotools toolchain-funcs - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/kyz/libmspack.git" - inherit git-r3 - MY_P="${PN}-9999" - - LIBMSPACK_DEPEND="~dev-libs/libmspack-9999:=" -else - KEYWORDS="amd64 ~arm ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" - MY_PV="${PV/_alpha/alpha}" - MY_P="${PN}-${MY_PV}" - SRC_URI="https://www.cabextract.org.uk/${P}.tar.gz" - - LIBMSPACK_DEPEND=">=dev-libs/libmspack-0.8_alpha:=" -fi - -DESCRIPTION="Extracts files from Microsoft cabinet archive files" -HOMEPAGE="https://www.cabextract.org.uk/" - -LICENSE="GPL-3" -SLOT="0" -IUSE="extras" - -DEPEND="${LIBMSPACK_DEPEND} - virtual/pkgconfig" -RDEPEND="extras? ( dev-lang/perl )" - -src_prepare() { - if [[ ${PV} == "9999" ]] ; then - # Re-create file layout from release tarball - pushd "${WORKDIR}" &>/dev/null || die - cp -aL "${S}"/${PN} "${WORKDIR}"/${PN}-source || die - rm -r "${S}" || die - mv "${WORKDIR}"/${PN}-source "${S}" || die - popd &>/dev/null || die - fi - - default - - eautoreconf -} - -src_configure() { - econf \ - --with-external-libmspack=yes -} - -src_compile() { - emake AR="$(tc-getAR)" -} - -src_install() { - local DOCS=( AUTHORS ChangeLog NEWS README TODO doc/magic ) - default - docinto html - dodoc doc/wince_cab_format.html - if use extras; then - dobin src/{wince_info,wince_rename,cabinfo,cabsplit} - fi -} diff --git a/app-arch/cabextract/files/cabextract-1.9-fix-bigendian.patch b/app-arch/cabextract/files/cabextract-1.9-fix-bigendian.patch new file mode 100644 index 000000000000..760dd9dbb013 --- /dev/null +++ b/app-arch/cabextract/files/cabextract-1.9-fix-bigendian.patch @@ -0,0 +1,17 @@ +https://github.com/kyz/libmspack/commit/c19e707936947b45cf05bc9aaee68517c6c2aca6 + +--- + configure.ac | 1 + + 1 files changed, 1 insertions(+) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -30,6 +30,7 @@ AC_CHECK_HEADERS([inttypes.h]) + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST + AC_C_INLINE ++AC_C_BIGENDIAN + AC_TYPE_MODE_T + AC_TYPE_OFF_T + AC_TYPE_SIZE_T diff --git a/app-arch/cabextract/files/cabextract-1.9-remove-spurious-test_files.patch b/app-arch/cabextract/files/cabextract-1.9-remove-spurious-test_files.patch new file mode 100644 index 000000000000..d80b8704834c --- /dev/null +++ b/app-arch/cabextract/files/cabextract-1.9-remove-spurious-test_files.patch @@ -0,0 +1,17 @@ +https://github.com/kyz/libmspack/commit/2f78851e3927b05931574b380ca6dccaf91e3807 + +--- + test/bugs.test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/test/bugs.test ++++ b/test/bugs.test +@@ -2,7 +2,7 @@ + # test that known crash bugs remain fixed + . test/testcase + +-$cabextract -t $test_files/bugs/*.cab ++$cabextract -t bugs/*.cab + + # fail if exit code indicates a crash (SIGBUS, SIGSEGV, etc.) + test $? -le 1 -- cgit v1.2.3-65-gdbad