From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 83B001381F1 for ; Thu, 12 May 2016 00:59:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 38754E085C; Thu, 12 May 2016 00:59:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C0DA6E085C for ; Thu, 12 May 2016 00:59:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6C8FE340890 for ; Thu, 12 May 2016 00:59:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CFBE416 for ; Thu, 12 May 2016 00:59:04 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1463014725.3f74e0196b4719fb8f10118c80de15fa823797a6.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/python/files/, dev-lang/python/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/python/files/3.5.1-cross-compile.patch dev-lang/python/python-3.5.1-r2.ebuild X-VCS-Directories: dev-lang/python/files/ dev-lang/python/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 3f74e0196b4719fb8f10118c80de15fa823797a6 X-VCS-Branch: master Date: Thu, 12 May 2016 00:59:04 +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: e34fbba0-b1d6-41d8-a18b-753577c3ffc7 X-Archives-Hash: f52d216a82e30f3121e7bdf8f4745ff9 commit: 3f74e0196b4719fb8f10118c80de15fa823797a6 Author: Mike Gilbert gentoo org> AuthorDate: Thu May 12 00:58:45 2016 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu May 12 00:58:45 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f74e019 dev-lang/python: fix cross-compiles for 3.5.1 Bug: https://bugs.gentoo.org/581304 Package-Manager: portage-2.2.28_p106 dev-lang/python/files/3.5.1-cross-compile.patch | 75 +++++++++++++++++++++++++ dev-lang/python/python-3.5.1-r2.ebuild | 7 +-- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/dev-lang/python/files/3.5.1-cross-compile.patch b/dev-lang/python/files/3.5.1-cross-compile.patch new file mode 100644 index 0000000..25a518b --- /dev/null +++ b/dev-lang/python/files/3.5.1-cross-compile.patch @@ -0,0 +1,75 @@ +# HG changeset patch +# User Martin Panter +# Date 1461373124 0 +# Node ID 66e40df31faca467937c7b9d5d2e825471f97822 +# Parent a246047734b3496a7dc4ebaf1f0232dadf22eab6 +Issue #22359: Disable running cross-compiled _freeze_importlib and pgen + +Patch by Xavier de Gaye. + +diff --git a/Makefile.pre.in b/Makefile.pre.in +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -221,6 +221,7 @@ LIBOBJS= @LIBOBJS@ + PYTHON= python$(EXE) + BUILDPYTHON= python$(BUILDEXE) + ++cross_compiling=@cross_compiling@ + PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@ + _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@ + BUILD_GNU_TYPE= @build@ +@@ -718,12 +719,16 @@ Programs/_freeze_importlib: Programs/_fr + $(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ +- $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h ++ if test "$(cross_compiling)" != "yes"; then \ ++ ./Programs/_freeze_importlib \ ++ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \ ++ fi + + Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib +- ./Programs/_freeze_importlib \ +- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h ++ if test "$(cross_compiling)" != "yes"; then \ ++ ./Programs/_freeze_importlib \ ++ $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h; \ ++ fi + + + ############################################################################ +@@ -784,10 +789,18 @@ Python/sysmodule.o: $(srcdir)/Python/sys + $(IO_OBJS): $(IO_H) + + $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN) +- @$(MKDIR_P) Include +- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) ++ @$(MKDIR_P) Include ++ if test "$(cross_compiling)" != "yes"; then \ ++ $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C); \ ++ else \ ++ cp $(srcdir)/Include/graminit.h $(GRAMMAR_H); \ ++ fi + $(GRAMMAR_C): $(GRAMMAR_H) +- touch $(GRAMMAR_C) ++ if test "$(cross_compiling)" != "yes"; then \ ++ touch $(GRAMMAR_C); \ ++ else \ ++ cp $(srcdir)/Python/graminit.c $(GRAMMAR_C); \ ++ fi + + $(PGEN): $(PGENOBJS) + $(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -49,6 +49,7 @@ fi + AC_CONFIG_SRCDIR([Include/object.h]) + AC_CONFIG_HEADER(pyconfig.h) + ++AC_SUBST(cross_compiling) + AC_CANONICAL_HOST + AC_SUBST(build) + AC_SUBST(host) + diff --git a/dev-lang/python/python-3.5.1-r2.ebuild b/dev-lang/python/python-3.5.1-r2.ebuild index 0f2fa79..480c6ad 100644 --- a/dev-lang/python/python-3.5.1-r2.ebuild +++ b/dev-lang/python/python-3.5.1-r2.ebuild @@ -71,7 +71,7 @@ src_prepare() { EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" epatch "${FILESDIR}/${PN}-3.4.3-ncurses-pkg-config.patch" - epatch "${FILESDIR}/3.5-secondary-targets.patch" + epatch "${FILESDIR}/3.5.1-cross-compile.patch" epatch_user @@ -87,8 +87,6 @@ src_prepare() { Modules/Setup.dist \ setup.py || die "sed failed to replace @@GENTOO_LIBDIR@@" - #sed -i -e 's/\$(GRAMMAR_H): \$(GRAMMAR_INPUT) \$(PGEN)/$(GRAMMAR_H): \$(GRAMMAR_INPUT)/' Makefile.pre.in || die - eautoreconf } @@ -174,9 +172,6 @@ src_configure() { } src_compile() { - # Avoid regenerating these for cross-compiles - touch Include/graminit.h Python/graminit.c Python/importlib.h Python/importlib_external.h || die - cd "${BUILD_DIR}" || die emake CPPFLAGS= CFLAGS= LDFLAGS=