upgpkg: libgraphqlparser 0.7.0-3

Replace build dependency: python2 with python3.
This commit is contained in:
George Rawlinson 2021-12-04 03:46:08 +00:00
parent 66b189d2cb
commit cbeadc8aaa
Signed by: grawlinson
GPG key ID: E0959FEA8B550539
2 changed files with 33 additions and 4 deletions

View file

@ -2,15 +2,30 @@
pkgname=libgraphqlparser pkgname=libgraphqlparser
pkgver=0.7.0 pkgver=0.7.0
pkgrel=2 pkgrel=3
pkgdesc="A GraphQL query parser in C++ with C and C++ APIs" pkgdesc="A GraphQL query parser in C++ with C and C++ APIs"
arch=('x86_64') arch=('x86_64')
url="https://github.com/graphql/libgraphqlparser" url="https://github.com/graphql/libgraphqlparser"
license=('BSD') license=('BSD')
depends=('gcc-libs') depends=('gcc-libs')
makedepends=('git' 'cmake' 'python2') makedepends=('git' 'cmake' 'python')
source=("$pkgname-$pkgver.tar.gz::https://github.com/graphql/$pkgname/archive/v$pkgver.tar.gz") source=(
sha512sums=('973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede') "$pkgname-$pkgver.tar.gz::https://github.com/graphql/$pkgname/archive/v$pkgver.tar.gz"
'use_python3.patch'
)
sha512sums=('973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede'
'bf20aad5ce3708aed8508c999b03f24ea1f63c281d95a4e1d5683f85309eadca3c2caa9f2ef43cedf0d849c571b853adf05de2ded30a8fa306fd544dde6a4c40')
prepare() {
cd "$pkgname-$pkgver"
# Python 2 is super *super* _super_ EOL.
patch -p1 -i ../use_python3.patch
2to3 \
--write \
--nobackups \
ast
}
build() { build() {
cd "$pkgname-$pkgver" cd "$pkgname-$pkgver"

View file

@ -0,0 +1,14 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,10 +7,7 @@ INCLUDE(version)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
-FIND_PACKAGE(PythonInterp 2 REQUIRED)
-IF (NOT PYTHON_VERSION_MAJOR EQUAL 2)
- MESSAGE(FATAL_ERROR "Python 2 is required.")
-ENDIF()
+FIND_PACKAGE(PythonInterp 3 REQUIRED)
FIND_PROGRAM(CTYPESGEN_FOUND ctypesgen.py)