Add upstream python3 PR

This commit is contained in:
leigh123linux 2018-08-16 20:00:32 +01:00
parent e3f96367af
commit 3655f2e869
2 changed files with 78 additions and 2 deletions

71
autotools_py3.patch Normal file
View File

@ -0,0 +1,71 @@
From 90f973f74d88d5f7085220fb606b0bbc0d3c1646 Mon Sep 17 00:00:00 2001
From: Mathieu Bridon <bochecha@daitauha.fr>
Date: Thu, 16 Aug 2018 13:55:15 +0200
Subject: [PATCH] build: Find Python the Autotools way
An added advantage to this is that it makes it really easy to build with
Python 3, the same way other Autotools projects support it:
$ export PYTHON=/usr/bin/python3
$ ./configure
---
configure.ac | 2 +-
src/EGL/Makefile.am | 4 ++--
src/GL/Makefile.am | 3 +--
src/GLdispatch/vnd-glapi/Makefile.am | 2 +-
4 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 05efca0..149e345 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,7 +27,7 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_PROG_MKDIR_P
-AC_CHECK_PROGS([PYTHON2], [python2.7 python2 python])
+AM_PATH_PYTHON([2.7])
if test "x$ac_cv_prog_cc_c99" = xno; then
AC_MSG_ERROR([Building libglvnd requires a C99-enabled compiler])
diff --git a/src/EGL/Makefile.am b/src/EGL/Makefile.am
index 1a2ee7c..6ade4cc 100644
--- a/src/EGL/Makefile.am
+++ b/src/EGL/Makefile.am
@@ -100,7 +100,7 @@ GENERATE_DEPS = \
$(GENERATE_LIST_FILES)
g_egldispatchstubs.c : $(GENERATE_DEPS)
- $(VM_V_GEN)$(PYTHON2) $(GENERATE_DISPATCH_SCRIPT) source $(GENERATE_LIST_FILES) > $@
+ $(VM_V_GEN)$(PYTHON) $(GENERATE_DISPATCH_SCRIPT) source $(GENERATE_LIST_FILES) > $@
g_egldispatchstubs.h : $(GENERATE_DEPS)
- $(VM_V_GEN)$(PYTHON2) $(GENERATE_DISPATCH_SCRIPT) header $(GENERATE_LIST_FILES) > $@
+ $(VM_V_GEN)$(PYTHON) $(GENERATE_DISPATCH_SCRIPT) header $(GENERATE_LIST_FILES) > $@
diff --git a/src/GL/Makefile.am b/src/GL/Makefile.am
index 769dcb6..854d8b7 100644
--- a/src/GL/Makefile.am
+++ b/src/GL/Makefile.am
@@ -50,8 +50,7 @@ glapi_gen_libglglxstubs_deps = \
$(glapi_gen_glx_xml)
g_libglglxwrapper.c : $(glapi_gen_libglglxstubs_deps)
- $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) \
- $(glapi_gen_libglglxstubs_script) $(glapi_gen_glx_xml) > $@
+ $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS) $(glapi_gen_libglglxstubs_script) $(glapi_gen_glx_xml) > $@
libGL_la_CFLAGS = \
-I$(top_srcdir)/include
diff --git a/src/GLdispatch/vnd-glapi/Makefile.am b/src/GLdispatch/vnd-glapi/Makefile.am
index 7a40611..b799b81 100644
--- a/src/GLdispatch/vnd-glapi/Makefile.am
+++ b/src/GLdispatch/vnd-glapi/Makefile.am
@@ -12,7 +12,7 @@ glapi_gen_mapi_deps = \
$(glapi_gen_mapi_script) \
$(top_srcdir)/src/generate/genCommon.py \
$(glapi_gen_gl_xml)
-glapi_gen_mapi = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS) $(glapi_gen_mapi_script)
+glapi_gen_mapi = $(AM_V_GEN)$(PYTHON) $(PYTHON_FLAGS) $(glapi_gen_mapi_script)
noinst_HEADERS = \
glapi.h \

View File

@ -7,7 +7,7 @@
Name: libglvnd Name: libglvnd
Version: 1.1.0 Version: 1.1.0
Release: 1%{?commit0:.git%{shortcommit0}}%{?dist} Release: 2%{?commit0:.git%{shortcommit0}}%{?dist}
# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1 # Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
Epoch: 1 Epoch: 1
Summary: The GL Vendor-Neutral Dispatch library Summary: The GL Vendor-Neutral Dispatch library
@ -18,10 +18,11 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
#Source0: %%{url}/archive/%%{commit0}.tar.gz#/%%{name}-%%{shortcommit0}.tar.gz #Source0: %%{url}/archive/%%{commit0}.tar.gz#/%%{name}-%%{shortcommit0}.tar.gz
Patch0: libglvnd-python3.patch Patch0: libglvnd-python3.patch
Patch1: 0001-glx-Add-another-fallback-library-name.patch Patch1: 0001-glx-Add-another-fallback-library-name.patch
Patch2: %{url}/pull/157/commits/90f973f74d88d5f7085220fb606b0bbc0d3c1646.patch#/autotools_py3.patch
BuildRequires: libtool BuildRequires: libtool
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python3 BuildRequires: python3-rpm-macros
BuildRequires: python3-libxml2 BuildRequires: python3-libxml2
BuildRequires: pkgconfig(glproto) BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(x11)
@ -137,6 +138,7 @@ autoreconf -vif
%endif %endif
%build %build
export PYTHON=%{__python3}
#Prefer asm and tls for x86* and ppc64* #Prefer asm and tls for x86* and ppc64*
#armhfp and aarch64 fallback to asm and tsd #armhfp and aarch64 fallback to asm and tsd
#Others arches fallback to pure-c and tls. #Others arches fallback to pure-c and tls.
@ -234,6 +236,9 @@ xvfb-run -s '-screen 0 640x480x24' -d make check V=1 || \
%changelog %changelog
* Thu Aug 16 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:1.1.0-2
- Add upstream python3 PR
* Thu Aug 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:1.1.0-1 * Thu Aug 09 2018 Leigh Scott <leigh123linux@googlemail.com> - 1:1.1.0-1
- Update to 1.1.0 release - Update to 1.1.0 release