Package init
This commit is contained in:
commit
dc71a64bfa
30
0001-glx-Add-another-fallback-library-name.patch
Normal file
30
0001-glx-Add-another-fallback-library-name.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 24606973bfabd75285fbd489264235167ba0f44c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
|
Date: Thu, 14 Jun 2018 11:25:21 -0400
|
||||||
|
Subject: [PATCH] glx: Add another fallback library name
|
||||||
|
|
||||||
|
This is mostly to avoid file conflicts with external packaging.
|
||||||
|
|
||||||
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
---
|
||||||
|
src/GLX/libglxmapping.c | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/GLX/libglxmapping.c b/src/GLX/libglxmapping.c
|
||||||
|
index be384f8..2016a04 100644
|
||||||
|
--- a/src/GLX/libglxmapping.c
|
||||||
|
+++ b/src/GLX/libglxmapping.c
|
||||||
|
@@ -591,6 +591,10 @@ __GLXvendorInfo *__glXLookupVendorByScreen(Display *dpy, const int screen)
|
||||||
|
vendor = __glXLookupVendorByName(FALLBACK_VENDOR_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!vendor) {
|
||||||
|
+ vendor = __glXLookupVendorByName("system");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
dpyInfo->vendors[screen] = vendor;
|
||||||
|
}
|
||||||
|
__glvndPthreadFuncs.rwlock_unlock(&dpyInfo->vendorLock);
|
||||||
|
--
|
||||||
|
2.17.0
|
||||||
|
|
||||||
71
autotools_py3.patch
Normal file
71
autotools_py3.patch
Normal 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 \
|
||||||
BIN
libglvnd-1.1.0.tar.gz
Normal file
BIN
libglvnd-1.1.0.tar.gz
Normal file
Binary file not shown.
54
libglvnd-python3.patch
Normal file
54
libglvnd-python3.patch
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
diff -up libglvnd-1.0.0/src/generate/eglFunctionList.py.jx libglvnd-1.0.0/src/generate/eglFunctionList.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/eglFunctionList.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/eglFunctionList.py 2018-03-15 12:43:19.113294070 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Contains a list of EGL functions to generate dispatch functions for.
|
||||||
|
diff -up libglvnd-1.0.0/src/generate/genCommon.py.jx libglvnd-1.0.0/src/generate/genCommon.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/genCommon.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/genCommon.py 2018-03-15 12:37:13.260268667 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# (C) Copyright 2015, NVIDIA CORPORATION.
|
||||||
|
# All Rights Reserved.
|
||||||
|
diff -up libglvnd-1.0.0/src/generate/gen_egl_dispatch.py.jx libglvnd-1.0.0/src/generate/gen_egl_dispatch.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/gen_egl_dispatch.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/gen_egl_dispatch.py 2018-03-15 12:43:00.057032312 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/python
|
||||||
|
+#!/usr/bin/python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Generates dispatch functions for EGL.
|
||||||
|
diff -up libglvnd-1.0.0/src/generate/gen_gldispatch_mapi.py.jx libglvnd-1.0.0/src/generate/gen_gldispatch_mapi.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/gen_gldispatch_mapi.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/gen_gldispatch_mapi.py 2018-03-15 12:37:13.283268982 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# Copyright (C) 2010 LunarG Inc.
|
||||||
|
# (C) Copyright 2015, NVIDIA CORPORATION.
|
||||||
|
diff -up libglvnd-1.0.0/src/generate/gen_libgl_glxstubs.py.jx libglvnd-1.0.0/src/generate/gen_libgl_glxstubs.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/gen_libgl_glxstubs.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/gen_libgl_glxstubs.py 2018-03-15 12:37:10.684233282 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# (C) Copyright 2015, NVIDIA CORPORATION.
|
||||||
|
# All Rights Reserved.
|
||||||
|
diff -up libglvnd-1.0.0/src/generate/gen_libOpenGL_exports.py.jx libglvnd-1.0.0/src/generate/gen_libOpenGL_exports.py
|
||||||
|
--- libglvnd-1.0.0/src/generate/gen_libOpenGL_exports.py.jx 2017-11-02 12:58:38.000000000 -0400
|
||||||
|
+++ libglvnd-1.0.0/src/generate/gen_libOpenGL_exports.py 2018-03-15 12:37:13.308269324 -0400
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-#!/usr/bin/env python
|
||||||
|
+#!/usr/bin/env python3
|
||||||
|
|
||||||
|
# (C) Copyright 2015, NVIDIA CORPORATION.
|
||||||
|
# All Rights Reserved.
|
||||||
82
libglvnd.spec
Normal file
82
libglvnd.spec
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
Name: libglvnd
|
||||||
|
Version: 1.1.0
|
||||||
|
Release: 3
|
||||||
|
Epoch: 1
|
||||||
|
Summary: The GL Vendor-Neutral Dispatch library
|
||||||
|
License: MIT
|
||||||
|
URL: https://github.com/NVIDIA/libglvnd
|
||||||
|
Source0: https://github.com/NVIDIA/libglvnd/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: libglvnd-python3.patch
|
||||||
|
Patch1: 0001-glx-Add-another-fallback-library-name.patch
|
||||||
|
Patch2: %{url}/pull/157/commits/90f973f74d88d5f7085220fb606b0bbc0d3c1646.patch#/autotools_py3.patch
|
||||||
|
|
||||||
|
BuildRequires: libtool xorg-x11-server-Xvfb pkgconfig(xext) pkgconfig(x11)
|
||||||
|
BuildRequires: gcc python3-rpm-macros python3-libxml2 pkgconfig(glproto)
|
||||||
|
|
||||||
|
Requires: mesa-libEGL%{?_isa} >= 13.0.4-1
|
||||||
|
Requires: mesa-libGL%{?_isa} >= 13.0.4-1
|
||||||
|
|
||||||
|
Provides: %{name}-egl %{name}-egl%{?_isa} %{name}-gles %{name}-gles%{?_isa} %{name}-glx
|
||||||
|
Obsoletes: %{name}-egl %{name}-egl%{?_isa} %{name}-gles %{name}-gles%{?_isa} %{name}-glx
|
||||||
|
Provides: %{name}-glx%{?_isa} %{name}-opengl %{name}-opengl%{?_isa} libGLES libGLES%{?_isa}
|
||||||
|
Obsoletes: %{name}-glx%{?_isa} %{name}-opengl %{name}-opengl%{?_isa} libGLES libGLES%{?_isa}
|
||||||
|
Provides: libEG libEGL%{?_isa} libEGL libEGL%{?_isa} libGL libGL%{?_isa}
|
||||||
|
Obsoletes: libEG libEGL%{?_isa} libEGL libEGL%{?_isa} libGL libGL%{?_isa}
|
||||||
|
|
||||||
|
%description
|
||||||
|
libglvnd is a vendor-neutral dispatch layer for arbitrating OpenGL API calls between multiple vendors.
|
||||||
|
It allows multiple drivers from different vendors to coexist on the same filesystem, and determines
|
||||||
|
which vendor to dispatch each API call to at runtime.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: Development files for %{name}
|
||||||
|
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for
|
||||||
|
developing applications that use %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
autoreconf -vif
|
||||||
|
|
||||||
|
%build
|
||||||
|
export PYTHON=%{__python3}
|
||||||
|
%configure --enable-asm --enable-tls
|
||||||
|
|
||||||
|
%make_build V=1
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
%delete_la
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/glvnd/egl_vendor.d/
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/glvnd/egl_vendor.d/
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/egl/egl_external_platform.d/
|
||||||
|
mkdir -p %{buildroot}%{_datadir}/egl/egl_external_platform.d/
|
||||||
|
|
||||||
|
%check
|
||||||
|
export DO_X11_TESTS=1
|
||||||
|
xvfb-run -s '-screen 0 640x480x24' -d make check V=1 || (cat `find . -name test-suite.log` ; exit 1)
|
||||||
|
|
||||||
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc README.md
|
||||||
|
%{_libdir}/*.so.*
|
||||||
|
%dir %{_sysconfdir}/glvnd/egl_vendor.d/
|
||||||
|
%dir %{_sysconfdir}/egl/egl_external_platform.d/
|
||||||
|
%dir %{_datadir}/glvnd/egl_vendor.d/
|
||||||
|
%dir %{_datadir}/egl/egl_external_platform.d/
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_libdir}/lib*.so
|
||||||
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
%{_includedir}/glvnd/*.h
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Sep 17 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:1.1.0-3
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user