From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 613021396D9 for ; Mon, 30 Oct 2017 06:05:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5BD96E0FA6; Mon, 30 Oct 2017 06:05:58 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 272CDE0FA6 for ; Mon, 30 Oct 2017 06:05:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 462F03416D3 for ; Mon, 30 Oct 2017 06:05:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DCF72828 for ; Mon, 30 Oct 2017 06:05:54 +0000 (UTC) From: "Maciej Mrozowski" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Maciej Mrozowski" Message-ID: <1509343545.ac489776e5c17f2e6a91b0ee7603caa7ad797a4e.reavertm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libmspack/files/, dev-libs/libmspack/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-libs/libmspack/files/libmspack-0.6_alpha-fix-tests.patch dev-libs/libmspack/libmspack-0.6_alpha.ebuild X-VCS-Directories: dev-libs/libmspack/ dev-libs/libmspack/files/ X-VCS-Committer: reavertm X-VCS-Committer-Name: Maciej Mrozowski X-VCS-Revision: ac489776e5c17f2e6a91b0ee7603caa7ad797a4e X-VCS-Branch: master Date: Mon, 30 Oct 2017 06:05:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 14ef92dd-dfde-499b-90af-c31373dd8054 X-Archives-Hash: 702d400f87be5b95a8c576ef25cdbd33 commit: ac489776e5c17f2e6a91b0ee7603caa7ad797a4e Author: Maciej Mrozowski gentoo org> AuthorDate: Mon Oct 30 06:05:30 2017 +0000 Commit: Maciej Mrozowski gentoo org> CommitDate: Mon Oct 30 06:05:45 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac489776 dev-libs/libmspack: Fix tests, bug #635776 Package-Manager: Portage-2.3.8, Repoman-2.3.4 .../files/libmspack-0.6_alpha-fix-tests.patch | 96 ++++++++++++++++++++++ dev-libs/libmspack/libmspack-0.6_alpha.ebuild | 4 + 2 files changed, 100 insertions(+) diff --git a/dev-libs/libmspack/files/libmspack-0.6_alpha-fix-tests.patch b/dev-libs/libmspack/files/libmspack-0.6_alpha-fix-tests.patch new file mode 100644 index 00000000000..2f010d87a37 --- /dev/null +++ b/dev-libs/libmspack/files/libmspack-0.6_alpha-fix-tests.patch @@ -0,0 +1,96 @@ +From deb65056f436a4ce06946c4dde270f533e3cab4d Mon Sep 17 00:00:00 2001 +From: Stuart Caie +Date: Mon, 16 Oct 2017 13:59:05 +0100 +Subject: [PATCH] Fix cabd_test.c test and msdecompile_md5 script + +--- + libmspack/ChangeLog | 10 +++++++++ + libmspack/test/cabd_test.c | 3 ++- + libmspack/test/msdecompile_md5 | 47 +++++++++++++++++++++--------------------- + 3 files changed, 36 insertions(+), 24 deletions(-) + +diff --git a/libmspack/ChangeLog b/libmspack/ChangeLog +index 6861b19..4aef85f 100644 +--- a/libmspack/ChangeLog ++++ b/libmspack/ChangeLog +@@ -1,3 +1,13 @@ ++2017-10-16 Stuart Caie ++ ++ * test/cabd_test.c: update the short string tests to expect not only ++ MSPACK_ERR_DATAFORMAT but also MSPACK_ERR_READ, because of the recent ++ change to cabd_read_string(). Thanks to maitreyee43 for spotting this. ++ ++ * test/msdecompile_md5: update the setup instructions for this script, ++ and also change the script so it works with current Wine. Again, thanks ++ to maitreyee43 for trying to use it and finding it not working. ++ + 2017-08-13 Stuart Caie + + * src/chmextract.c: support MinGW one-arg mkdir(). Thanks to AntumDeluge +diff --git a/libmspack/test/cabd_test.c b/libmspack/test/cabd_test.c +index 5e8851c..abed65c 100644 +--- a/libmspack/test/cabd_test.c ++++ b/libmspack/test/cabd_test.c +@@ -186,7 +186,8 @@ void cabd_open_test_05() { + for (i = 0; i < (sizeof(str_files)/sizeof(char *)); i++) { + cab = cabd->open(cabd, str_files[i]); + TEST(cab == NULL); +- TEST(cabd->last_error(cabd) == MSPACK_ERR_DATAFORMAT); ++ TEST(cabd->last_error(cabd) == MSPACK_ERR_DATAFORMAT || ++ cabd->last_error(cabd) == MSPACK_ERR_READ); + } + + /* lack of data blocks should NOT be a problem for merely reading */ +diff --git a/libmspack/test/msdecompile_md5 b/libmspack/test/msdecompile_md5 +index a1d3b4b..9efbfac 100755 +--- a/libmspack/test/msdecompile_md5 ++++ b/libmspack/test/msdecompile_md5 +@@ -1,24 +1,25 @@ +-#!/usr/bin/perl -w +-# put hh.exe, hhctrl.ocx and itss.dll into this directory +-# for this script to work. You can get them by downloading +-# the HTML Help Workshop from Microsoft and then doing: +-# $ cabextract -F 'hh*' htmlhelp.exe +-# $ cabextract -F itircl.dll hhupd.exe +-# $ cabextract -F itss.dll hhupd.exe +-# $ cp -a itircl.dll ~/.wine/drive_c/windows/system32/ +-# $ cp -a itss.dll ~/.wine/drive_c/windows/system32/ +-# $ wine regsvr32 /s 'C:\WINDOWS\SYSTEM32\itircl.dll' +-# $ wine regsvr32 /s 'C:\WINDOWS\SYSTEM32\itss.dll' ++#!/bin/sh ++# This script needs the following setup to work: ++# - hh.exe and hhctrl.ocx copied to Wine's system32 ++# - itss.dll and itircl.dll installed as Wine DLLs ++# ++# Download the HTML Help Workshop (htmlhelp.exe) from Microsoft: ++# ++# https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx ++# ++# and then run these commands: ++# ++# cabextract htmlhelp.exe -F hhupd.exe ++# cabextract hhupd.exe -F hh.exe ++# cabextract hhupd.exe -F hhctrl.ocx ++# cabextract hhupd.exe -F itircl.dll ++# cabextract hhupd.exe -F itss.dll ++# mv hh.exe hhctrl.ocx itircl.dll itss.dll ~/.wine/drive_c/windows/system32/ ++# wine regsvr32 /s 'c:\windows\system32\itircl.dll' ++# wine regsvr32 /s 'c:\windows\system32\itss.dll' + +-use strict; +-use File::Temp qw(tempdir); +- +-die "Usage: $0 \n" unless @ARGV == 1; +-my $hh = $0; $hh =~ s{[^/]+$}{hh.exe}; +-my $dir = tempdir("./.tempXXXX", CLEANUP => 1); +- +-$ENV{LANG} = 'C'; +-$ENV{WINEDLLOVERRIDES}='hhctrl.ocx,itss=n'; +-print "*** $ARGV[0]\n"; +-system("wine $hh -decompile $dir $ARGV[0] 1>&2 && " . +- "cd $dir && find * -type f -print0 | xargs -0 md5sum"); ++dir=`mktemp -d` ++echo "*** $1" ++LANG=C WINEDLLOVERRIDES='hhctrl.ocx=n' wine hh -decompile $dir "$1" ++cd $dir && find * -type f -exec md5sum {} + ++rm -rf $dir diff --git a/dev-libs/libmspack/libmspack-0.6_alpha.ebuild b/dev-libs/libmspack/libmspack-0.6_alpha.ebuild index b8c96e78ed0..6a40351178f 100644 --- a/dev-libs/libmspack/libmspack-0.6_alpha.ebuild +++ b/dev-libs/libmspack/libmspack-0.6_alpha.ebuild @@ -20,6 +20,10 @@ IUSE="debug doc static-libs" DEPEND="" RDEPEND="" +PATCHES=( + "${FILESDIR}/${P}-fix-tests.patch" +) + S="${WORKDIR}/${MY_P}" multilib_src_configure() {