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 3D37C1396D0 for ; Sat, 23 Sep 2017 13:24:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1A6E5E08DB; Sat, 23 Sep 2017 13:23:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 DB6B8E08DB for ; Sat, 23 Sep 2017 13:23:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 52065340DF9 for ; Sat, 23 Sep 2017 13:23:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2F1B2906C for ; Sat, 23 Sep 2017 13:23:51 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1506172793.f61cc139dc76de82a5cc0a0960c19c9afb383da7.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-runtime/, dev-util/mingw64-runtime/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/mingw64-runtime/files/mingw64-runtime-5.0.2-locale.patch dev-util/mingw64-runtime/mingw64-runtime-5.0.2-r2.ebuild X-VCS-Directories: dev-util/mingw64-runtime/files/ dev-util/mingw64-runtime/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: f61cc139dc76de82a5cc0a0960c19c9afb383da7 X-VCS-Branch: master Date: Sat, 23 Sep 2017 13:23:51 +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: b2c23ef5-1670-4973-a51d-ae10c67d8e62 X-Archives-Hash: 38b7798e18e4e267b3d529098bd8bc27 commit: f61cc139dc76de82a5cc0a0960c19c9afb383da7 Author: Marty E. Plummer protonmail com> AuthorDate: Mon Sep 18 16:54:46 2017 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Sat Sep 23 13:19:53 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f61cc139 dev-util/mingw64-runtime: fix build of dev-libs/icu Fixes building dev-libs/icu against mingw-w64 targets. References: http://ssl.icu-project.org/trac/ticket/12896 https://sourceforge.net/p/mingw-w64/mingw-w64/ci/b508bb87ad179421d10df68a7ebc48b33570f9b0/ Package-Manager: Portage-2.3.8, Repoman-2.3.3 Closes: https://github.com/gentoo/gentoo/pull/5726 .../files/mingw64-runtime-5.0.2-locale.patch | 36 +++++++ .../mingw64-runtime-5.0.2-r2.ebuild | 115 +++++++++++++++++++++ 2 files changed, 151 insertions(+) diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.2-locale.patch b/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.2-locale.patch new file mode 100644 index 00000000000..a7a0a09dc16 --- /dev/null +++ b/dev-util/mingw64-runtime/files/mingw64-runtime-5.0.2-locale.patch @@ -0,0 +1,36 @@ +--- a/mingw-w64-crt/lib32/msvcrt.def.in ++++ b/mingw-w64-crt/lib32/msvcrt.def.in +@@ -138,6 +138,7 @@ _copysign + _cprintf + _cputs + _creat ++_create_locale + _cscanf + _ctype DATA + _cwait +@@ -192,6 +193,7 @@ _fpieee_flt + _fpreset DATA + _fputchar + _fputwchar ++_free_locale + _fsopen + _fstat + _fstat32 == _fstat +--- a/mingw-w64-crt/lib64/msvcrt.def.in ++++ b/mingw-w64-crt/lib64/msvcrt.def.in +@@ -240,6 +240,7 @@ _cprintf_p_l + _cputs + _cputws + _creat ++_create_locale + _cscanf + _cscanf_l + _cscanf_s +@@ -315,6 +316,7 @@ _fputchar + _fputwchar + _fscanf_l + _fscanf_s_l ++_free_locale + _fsopen + _fstat + _fstat64 diff --git a/dev-util/mingw64-runtime/mingw64-runtime-5.0.2-r2.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-5.0.2-r2.ebuild new file mode 100644 index 00000000000..0edd83c0035 --- /dev/null +++ b/dev-util/mingw64-runtime/mingw64-runtime-5.0.2-r2.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +WANT_AUTOMAKE="1.15" + +inherit autotools flag-o-matic eutils + +DESCRIPTION="Free Win64 runtime and import library definitions" +HOMEPAGE="http://mingw-w64.sourceforge.net/" +SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="crosscompile_opts_headers-only idl libraries tools" +RESTRICT="strip" + +S="${WORKDIR}/mingw-w64-v${PV}" + +PATCHES=( + "${FILESDIR}/${PN}-4.0.1-winpthreads.patch" + "${FILESDIR}/${PN}-4.0.1-build.patch" + "${FILESDIR}/${PN}-5.0.2-implicit-fallthrough.patch" + "${FILESDIR}/${PN}-5.0.2-locale.patch" +) + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} +just_headers() { + use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] +} +crt_with() { + just_headers && echo --without-$1 || echo --with-$1 +} +crt_use_enable() { + just_headers && echo --without-$2 || use_enable "$@" +} +crt_use_with() { + just_headers && echo --without-$2 || use_with "$@" +} + +pkg_setup() { + if [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then + die "Invalid configuration" + fi +} + +src_prepare() { + default + eautoreconf +} + +src_configure() { + CHOST=${CTARGET} strip-unsupported-flags + + if ! just_headers; then + mkdir "${WORKDIR}/headers" + pushd "${WORKDIR}/headers" > /dev/null + CHOST=${CTARGET} "${S}/configure" \ + --prefix="${T}/tmproot" \ + --with-headers \ + --without-crt \ + || die + popd > /dev/null + append-cppflags "-I${T}/tmproot/include" + fi + + CHOST=${CTARGET} econf \ + --prefix=/usr/${CTARGET} \ + --includedir=/usr/${CTARGET}/usr/include \ + --libdir=/usr/${CTARGET}/usr/lib \ + --with-headers \ + --enable-sdk \ + $(crt_with crt) \ + $(crt_use_enable idl) \ + $(crt_use_with libraries libraries winpthreads,libmangle) \ + $(crt_use_with tools) \ + $( + $(tc-getCPP ${CTARGET}) ${CPPFLAGS} -dM - < /dev/null | grep -q __MINGW64__ \ + && echo --disable-lib32 --enable-lib64 \ + || echo --enable-lib32 --disable-lib64 + ) +} + +src_compile() { + if ! just_headers; then + emake -C "${WORKDIR}/headers" install + fi + default +} + +src_install() { + default + + if is_crosscompile ; then + # gcc is configured to look at specific hard-coded paths for mingw #419601 + dosym usr /usr/${CTARGET}/mingw + dosym usr /usr/${CTARGET}/${CTARGET} + dosym usr/include /usr/${CTARGET}/sys-include + fi + + env -uRESTRICT CHOST=${CTARGET} prepallstrip + rm -rf "${ED}/usr/share" +}