From c8a86c3d65f8a150a442ab8968a8c9629eff6aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Tue, 25 Feb 2020 14:21:07 +0700 Subject: [PATCH] python3-typed-ast: update to 1.4.1. --- srcpkgs/python3-typed-ast/template | 36 +++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python3-typed-ast/template b/srcpkgs/python3-typed-ast/template index 504c5917d6a..e5fe6e9afdf 100644 --- a/srcpkgs/python3-typed-ast/template +++ b/srcpkgs/python3-typed-ast/template @@ -1,16 +1,40 @@ # Template file for 'python3-typed-ast' pkgname=python3-typed-ast -version=1.4.0 -revision=2 +version=1.4.1 +revision=1 wrksrc="typed_ast-${version}" build_style=python3-module -pycompile_module="typed_ast" -hostmakedepends="python3-devel python3-setuptools" +hostmakedepends="python3-setuptools" makedepends="python3-devel" short_desc="Ast module with type comment support" maintainer="whoami " license="Apache-2.0" homepage="https://github.com/python/typed_ast" distfiles="https://github.com/python/typed_ast/archive/${version}.tar.gz" -checksum=bd02998404953db788e9d09c1030c4f0eb9d87986b08bd30e9fc00a8e30d6dd8 -nocross="https://travis-ci.org/void-linux/void-packages/jobs/509366923#L1009" +checksum=498a6cd88f78e4b2058092ff38c9941d61f4eba2c12b371240ba663f063adf7d + +do_patch() { + # python3-typed-ast uses the same header name with Python + # Thus, we'll run to problem on cross-compile. + # Fix it by specify include file relative to the file. + # And -Iast/Include + local _ifile _rfile + local _ast27_re="" + local _ast3_re="" + cd ast27/Include + for _ifile in *.h; do + _rfile=${_ifile/./[.]} + _ast27_re+="s%^[[:space:]]*#[[:space:]]*include[[:space:]]*\"$_rfile\".*$%#include \"../Include/$_ifile\"%;" + done + cd .. + find . -type f -exec sed -i -e "$_ast27_re" {} + + cd .. + cd ast3/Include + for _ifile in *.h; do + _rfile=${_ifile/./[.]} + _ast3_re+="s%^[[:space:]]*#[[:space:]]*include[[:space:]]*\"$_rfile\".*$%#include \"../Include/$_ifile\"%;" + done + cd .. + find . -type f -exec sed -i -e "$_ast3_re" {} + + cd .. +}