Skip to content
Snippets Groups Projects
Commit 37fc252a authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Merge branch 'dd4hep_v1.16.1' into 'master'

Upgrade to dd4hep 1.16.1

See merge request containers/eic_container!34
parents 0387f5a0 f160cf8c
Branches
Tags
1 merge request!34Upgrade to dd4hep 1.16.1
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
from spack.operating_systems.mac_os import macos_version
import os
import sys
MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
class Graphviz(AutotoolsPackage):
"""Graph Visualization Software"""
homepage = 'http://www.graphviz.org'
git = 'https://gitlab.com/graphviz/graphviz.git'
# This commit hash is tag='stable_release_2.44.1'
version('2.44.1', commit='771bc4dbff3e6f358fa75cdc7774a413ccacad51')
# This commit hash is tag='stable_release_2.42.2'
version('2.42.2', commit='da4c2ec6f24ca1b6d1752c6b5bc4389e55682147')
# This commit hash is tag='stable_release_2.40.1'
version('2.40.1', commit='67cd2e5121379a38e0801cc05cce5033f8a2a609')
conflicts('%gcc@:5.9',
when='@2.40.1+qt ^qt@5:',
msg='graphviz-2.40.1 needs gcc-6 or greater to compile with QT5 '
'suppport')
# Language bindings
language_bindings = ['java']
# Additional language bindings are nominally supported by GraphViz via SWIG
# but are untested and need the proper dependencies added:
# language_bindings += ['sharp', 'go', 'guile', 'io', 'lua', 'ocaml',
# 'perl', 'php', 'python', 'r', 'ruby', 'tcl']
for lang in language_bindings:
variant(lang, default=False,
description='Enable for optional {0} language '
'bindings'.format(lang))
# Feature variants
variant('expat', default=False,
description='Build with Expat support (enables HTML-like labels)')
variant('gts', default=False,
description='Build with GNU Triangulated Surface Library')
variant('ghostscript', default=False,
description='Build with Ghostscript support')
variant('gtkplus', default=False,
description='Build with GTK+ support')
variant('libgd', default=False,
description='Build with libgd support (more output formats)')
variant('pangocairo', default=False,
description='Build with pango+cairo support (more output formats)')
variant('poppler', default=False,
description='Build with poppler support (pdf formats)')
variant('qt', default=False,
description='Build with Qt support')
variant('quartz', default=(MACOS_VERSION is not None),
description='Build with Quartz and PDF support')
variant('x', default=False,
description='Use the X Window System')
patch('http://www.linuxfromscratch.org/patches/blfs/9.0/graphviz-2.40.1-qt5-1.patch',
sha256='bd532df325df811713e311d17aaeac3f5d6075ea4fd0eae8d989391e6afba930',
when='@:2.40+qt^qt@5:')
patch('https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/master/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0_icc_sfio.patch',
sha256='393a0a772315a89dcc970b5efd4765d22dba83493d7956303673eb89c45b949f',
level=0,
when='@:2.40%intel')
patch('https://raw.githubusercontent.com/easybuilders/easybuild-easyconfigs/master/easybuild/easyconfigs/g/Graphviz/Graphviz-2.40.1_icc_vmalloc.patch',
sha256='813e6529e79161a18b0f24a969b7de22f8417b2e942239e658b5402884541bc2',
when='@:2.40%intel')
patch('ps2pdf.patch')
## Don't apply to newer versions, as they are already fixed
patch('implicit.patch', when='@:2.42.0')
if not MACOS_VERSION:
conflicts('+quartz',
msg="Graphviz can only be build with Quartz on macOS.")
elif MACOS_VERSION >= Version('10.9'):
# Doesn't detect newer mac os systems as being new
patch('fix-quartz-darwin.patch')
# Language dependencies
depends_on('java', when='+java')
for lang in language_bindings:
depends_on('swig', when=('+' + lang))
# Feature dependencies
depends_on('expat', when='+expat')
depends_on('libgd', when='+libgd')
depends_on('fontconfig', when='+libgd')
depends_on('freetype', when='+libgd')
depends_on('ghostscript', when='+ghostscript')
depends_on('gtkplus', when='+gtkplus')
depends_on('gts', when='+gts')
depends_on('cairo+pdf+png+svg', when='+pangocairo')
depends_on('fontconfig', when='+pangocairo')
depends_on('freetype', when='+pangocairo')
depends_on('glib', when='+pangocairo')
depends_on('libpng', when='+pangocairo')
depends_on('pango', when='+pangocairo')
depends_on('poppler+glib', when='+poppler')
depends_on('zlib')
depends_on('qt', when='+qt')
depends_on('libx11', when="+x")
# Build dependencies
depends_on('pkgconfig', type='build')
# The following are needed when building from git
depends_on('automake', type='build')
depends_on('autoconf', type='build')
depends_on('bison', type='build')
depends_on('flex', type='build')
depends_on('libtool', type='build')
# required to build docs
depends_on('groff', type='build')
depends_on('ghostscript', type='build')
parallel = False
def autoreconf(self, spec, prefix):
# We need to generate 'configure' when checking out sources from git
# If configure exists nothing needs to be done
if os.path.exists(self.configure_abs_path):
return
# Else bootstrap (disabling auto-configure with NOCONFIG)
bash = which('bash')
bash('./autogen.sh', 'NOCONFIG')
def setup_build_environment(self, env):
if '+quartz' in self.spec:
env.set('OBJC', self.compiler.cc)
@when('%clang platform=darwin')
def patch(self):
# When using Clang, replace GCC's libstdc++ with LLVM's libc++
mkdirs = ['cmd/dot', 'cmd/edgepaint', 'cmd/mingle', 'plugin/gdiplus']
filter_file(r'-lstdc\+\+', '-lc++', 'configure.ac',
*(d + '/Makefile.am' for d in mkdirs))
@when('%apple-clang')
def patch(self):
# When using Clang, replace GCC's libstdc++ with LLVM's libc++
mkdirs = ['cmd/dot', 'cmd/edgepaint', 'cmd/mingle', 'plugin/gdiplus']
filter_file(r'-lstdc\+\+', '-lc++', 'configure.ac',
*(d + '/Makefile.am' for d in mkdirs))
def configure_args(self):
spec = self.spec
args = ['--disable-silent-rules']
use_swig = False
for lang in self.language_bindings:
if '+' + lang in spec:
use_swig = True
args.append('--enable-' + lang)
args.append('--{0}-swig'.format('enable' if use_swig else 'disable'))
for var in ["expat", "gts", "ghostscript", "libgd", "pangocairo",
"poppler", "qt", "quartz", "x"]:
args += self.with_or_without(var)
args.append('--{0}-gtk'.format(
"with" if "+gtkplus" in spec else "without"))
return args
https://gitlab.com/graphviz/graphviz/-/issues/1826
https://github.com/Homebrew/homebrew-core/pull/57132
diff --git a/configure.ac b/configure.ac
index cf42504..68db027 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,8 +284,7 @@ AC_CHECK_PROGS(SORT,gsort sort,false)
AC_CHECK_PROG(EGREP,egrep,egrep,false)
AC_CHECK_PROG(GROFF,groff,groff,false)
-AC_CHECK_PROG(PS2PDF,ps2pdf,ps2pdf,false)
-AC_CHECK_PROG(PS2PDF,pstopdf,pstopdf,false)
+AC_CHECK_PROGS(PS2PDF,ps2pdf pstopdf,false)
PKG_PROG_PKG_CONFIG
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import sys
class Mesa(MesonPackage):
"""Mesa is an open-source implementation of the OpenGL specification
- a system for rendering interactive 3D graphics."""
homepage = "http://www.mesa3d.org"
maintainers = ['chuckatkins', 'v-dobrev']
git = "https://gitlab.freedesktop.org/mesa/mesa.git"
url = "https://archive.mesa3d.org/mesa-20.2.1.tar.xz"
version('master', tag='master')
version('21.0.0', sha256='e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84')
version('20.3.4', sha256='dc21a987ec1ff45b278fe4b1419b1719f1968debbb80221480e44180849b4084')
version('20.2.1', sha256='d1a46d9a3f291bc0e0374600bdcb59844fa3eafaa50398e472a36fc65fd0244a')
depends_on('meson@0.52:', type='build')
depends_on('pkgconfig', type='build')
depends_on('binutils', when=(sys.platform != 'darwin'), type='build')
depends_on('bison', type='build')
depends_on('cmake', type='build')
depends_on('flex', type='build')
depends_on('gettext', type='build')
depends_on('python@3:', type='build')
depends_on('py-mako@0.8.0:', type='build')
depends_on('expat')
depends_on('zlib@1.2.3:')
# Internal options
variant('llvm', default=True, description="Enable LLVM.")
variant('swr', default='auto',
values=('auto', 'none', 'avx', 'avx2', 'knl', 'skx'),
multi=True,
description="Enable the SWR driver.")
# conflicts('~llvm', when='~swr=none')
# Front ends
variant('osmesa', default=True, description="Enable the OSMesa frontend.")
is_linux = sys.platform.startswith('linux')
variant('glx', default=is_linux, description="Enable the GLX frontend.")
# TODO: effectively deal with EGL. The implications of this have not been
# worked through yet
# variant('egl', default=False, description="Enable the EGL frontend.")
# TODO: Effectively deal with hardware drivers
# The implication of this is enabling DRI, among other things, and
# needing to check which llvm targets were built (ptx or amdgpu, etc.)
# Back ends
variant('opengl', default=True, description="Enable full OpenGL support.")
variant('opengles', default=False, description="Enable OpenGL ES support.")
# Provides
provides('gl@4.5', when='+opengl')
provides('glx@1.4', when='+glx')
# provides('egl@1.5', when='+egl')
provides('osmesa', when='+osmesa')
# Variant dependencies
depends_on('llvm@6:', when='+llvm')
depends_on('libx11', when='+glx')
depends_on('libxcb', when='+glx')
depends_on('libxext', when='+glx')
depends_on('libxt', when='+glx')
depends_on('xrandr', when='+glx')
depends_on('glproto@1.4.14:', when='+glx')
# version specific issue
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96130
conflicts('%gcc@10.1.0', msg='GCC 10.1.0 has a bug')
# Require at least 1 front-end
# TODO: Add egl to this conflict once made available
conflicts('~osmesa ~glx')
# Require at least 1 back-end
# TODO: Add vulkan to this conflict once made available
conflicts('~opengl ~opengles')
# OpenGL ES requires OpenGL
conflicts('~opengl +opengles')
# 'auto' needed when shared llvm is built
@when('^llvm~shared_libs')
def patch(self):
filter_file(
r"_llvm_method = 'auto'",
"_llvm_method = 'config-tool'",
"meson.build")
def meson_args(self):
spec = self.spec
args = [
'-Dvulkan-drivers=',
'-Dgallium-vdpau=disabled',
'-Dgallium-xvmc=disabled',
'-Dgallium-omx=disabled',
'-Dgallium-va=disabled',
'-Dgallium-xa=disabled',
'-Dgallium-nine=false',
'-Dgallium-opencl=disabled',
'-Dbuild-tests=false',
'-Dglvnd=false']
args_platforms = []
args_gallium_drivers = ['swrast']
args_dri_drivers = []
opt_enable = lambda c, o: '-D%s=%sabled' % (o, 'en' if c else 'dis')
opt_bool = lambda c, o: '-D%s=%s' % (o, str(c).lower())
if spec.target.family == 'arm' or spec.target.family == 'aarch64':
args.append('-Dlibunwind=disabled')
num_frontends = 0
if '+osmesa' in spec:
num_frontends += 1
args.append('-Dosmesa=gallium')
else:
#S. Joosten --> this line does not work in latest container
#args.append('-Dosmesa=none')
args.append('-Dosmesa=false')
if '+glx' in spec:
num_frontends += 1
if '+egl' in spec:
args.append('-Dglx=dri')
else:
args.append('-Dglx=gallium-xlib')
args_platforms.append('x11')
else:
args.append('-Dglx=disabled')
if '+egl' in spec:
num_frontends += 1
args.extend(['-Degl=enabled', '-Dgbm=enabled', '-Ddri3=enabled'])
args_platforms.append('surfaceless')
else:
args.extend(
['-Degl=disabled', '-Dgbm=disabled', '-Ddri3=disabled'])
args.append(opt_bool('+opengl' in spec, 'opengl'))
args.append(opt_enable('+opengles' in spec, 'gles1'))
args.append(opt_enable('+opengles' in spec, 'gles2'))
args.append(opt_enable(num_frontends > 1, 'shared-glapi'))
if '+llvm' in spec:
args.append('-Dllvm=enabled')
args.append(opt_enable(
'+link_dylib' in spec['llvm'], 'shared-llvm'))
else:
args.append('-Dllvm=disabled')
args_swr_arches = []
if 'swr=auto' in spec:
if 'avx' in spec.target:
args_swr_arches.append('avx')
if 'avx2' in spec.target:
args_swr_arches.append('avx2')
if 'avx512f' in spec.target:
if 'avx512er' in spec.target:
args_swr_arches.append('knl')
if 'avx512bw' in spec.target:
args_swr_arches.append('skx')
else:
if 'swr=avx' in spec:
args_swr_arches.append('avx')
if 'swr=avx2' in spec:
args_swr_arches.append('avx2')
if 'swr=knl' in spec:
args_swr_arches.append('knl')
if 'swr=skx' in spec:
args_swr_arches.append('skx')
if args_swr_arches:
if '+llvm' not in spec:
raise SpecError('Variant swr requires +llvm')
args_gallium_drivers.append('swr')
args.append('-Dswr-arches=' + ','.join(args_swr_arches))
# Add the remaining list args
args.append('-Dplatforms=' + ','.join(args_platforms))
args.append('-Dgallium-drivers=' + ','.join(args_gallium_drivers))
args.append('-Ddri-drivers=' + ','.join(args_dri_drivers))
return args
@property
def libs(self):
spec = self.spec
libs_to_seek = set()
if '+osmesa' in spec:
libs_to_seek.add('libOSMesa')
if '+glx' in spec:
libs_to_seek.add('libGL')
if '+opengl' in spec:
libs_to_seek.add('libGL')
if '+opengles' in spec:
libs_to_seek.add('libGLES')
libs_to_seek.add('libGLES2')
if libs_to_seek:
return find_libraries(list(libs_to_seek),
root=self.spec.prefix,
recursive=True)
return LibraryList()
@property
def osmesa_libs(self):
return find_libraries('libOSMesa',
root=self.spec.prefix,
recursive=True)
@property
def glx_libs(self):
return find_libraries('libGL',
root=self.spec.prefix,
recursive=True)
@property
def gl_libs(self):
return find_libraries('libGL',
root=self.spec.prefix,
recursive=True)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,7 +86,7 @@ include(cmake/podioMacros.cmake)
include(CTest)
#--- enable CPack --------------------------------------------------------------
-include(cmake/podioCPack.cmake)
+#include(cmake/podioCPack.cmake)
#--- target for Doxygen documentation ------------------------------------------
if(CREATE_DOC)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 120a899..05991f1 100755
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,7 +41,7 @@ SET(headers
${CMAKE_SOURCE_DIR}/include/podio/PythonEventStore.h
)
PODIO_GENERATE_DICTIONARY(podioDict ${headers} SELECTION selection.xml
- OPTIONS --library ${CMAKE_SHARED_LIBRARY_PREFIX}podio${CMAKE_SHARED_LIBRARY_SUFFIX}
+ OPTIONS --library ${CMAKE_SHARED_LIBRARY_PREFIX}podioDict${CMAKE_SHARED_LIBRARY_SUFFIX}
)
# prevent generating dictionary twice
set_target_properties(podioDict-dictgen PROPERTIES EXCLUDE_FROM_ALL TRUE)
@@ -58,5 +58,5 @@ install(TARGETS podio podioDict podioRootIO
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/podio DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/podioDictDict.rootmap
- ${CMAKE_CURRENT_BINARY_DIR}/libpodio_rdict.pcm
+ ${CMAKE_CURRENT_BINARY_DIR}/libpodioDict_rdict.pcm
DESTINATION "${CMAKE_INSTALL_LIBDIR}")
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Podio(CMakePackage):
"""PODIO, or plain-old-data I/O, is a C++ library to support the creation
and handling of data models in particle physics."""
homepage = "https://github.com/AIDASoft/podio"
url = "https://github.com/AIDASoft/podio/archive/v00-09-02.tar.gz"
git = "https://github.com/AIDASoft/podio.git"
maintainers = ['vvolkl', 'drbenmorgan']
tags = ["hep", "key4hep"]
version('master', branch='master')
version('0.13', sha256='e9cbd4e25730003d3706ad82e28b15cb5bdc524a78b0a26e90b89ea852101498')
version('0.12', sha256='1729a2ce21e8b307fc37dfb9a9f5ae031e9f4be4992385cf99dba3e5fdf5323a')
version('0.11', sha256='4b2765566a14f0ddece2c894634e0a8e4f42f3e44392addb9110d856f6267fb6')
version('0.10', sha256='b5b42770ec8b96bcd2748abc05669dd3e4d4cc84f81ed57d57d2eda1ade90ef2')
version('0.9.2', sha256='8234d1b9636029124235ef81199a1220968dcc7fdaeab81cdc96a47af332d240')
version('0.9', sha256='3cde67556b6b76fd2d004adfaa3b3b6173a110c0c209792bfdb5f9353e21076f')
version('0.8', sha256='9d035a7f5ebfae5279a17405003206853271af692f762e2bac8e73825f2af327')
variant('build_type', default='Release',
description='The build type to build',
values=('Debug', 'Release'))
variant('sio', default=False,
description='Build the SIO I/O backend')
# cpack config throws an error on some systems
patch('cpack.patch', when="@:0.10.0")
patch('dictloading.patch', when="@0.10.0")
depends_on('root@6.08.06: cxxstd=17')
depends_on('cmake@3.8:', type='build')
depends_on('python', type=('build', 'run'))
depends_on('py-pyyaml', type=('build', 'run'))
depends_on('py-jinja2@2.10.1:', type=('build', 'run'), when='@0.12.0:')
depends_on('sio', type=('build', 'run'), when='+sio')
conflicts('+sio', when='@:0.12', msg='sio support requires at least podio@0.13')
def cmake_args(self):
args = [
self.define_from_variant('ENABLE_SIO', 'sio')
]
return args
def setup_run_environment(self, env):
env.prepend_path('PYTHONPATH', self.prefix.python)
def url_for_version(self, version):
"""Translate version numbers to ilcsoft conventions.
in spack, the convention is: 0.1 (or 0.1.0) 0.1.1, 0.2, 0.2.1 ...
in ilcsoft, releases are dashed and padded with a leading zero
the patch version is omitted when 0
so for example v01-12-01, v01-12 ...
:param self: spack package class that has a url
:type self: class: `spack.PackageBase`
:param version: version
:type param: str
"""
base_url = self.url.rsplit('/', 1)[0]
if len(version) == 1:
major = version[0]
minor, patch = 0, 0
elif len(version) == 2:
major, minor = version
patch = 0
else:
major, minor, patch = version
# By now the data is normalized enough to handle it easily depending
# on the value of the patch version
if patch == 0:
version_str = 'v%02d-%02d.tar.gz' % (major, minor)
else:
version_str = 'v%02d-%02d-%02d.tar.gz' % (major, minor, patch)
return base_url + '/' + version_str
...@@ -28,6 +28,7 @@ class Root(CMakePackage): ...@@ -28,6 +28,7 @@ class Root(CMakePackage):
# Development version (when more recent than production). # Development version (when more recent than production).
# Production version # Production version
version('6.22.08', sha256='6f061ff6ef8f5ec218a12c4c9ea92665eea116b16e1cd4df4f96f00c078a2f6f')
version('6.22.06', sha256='c4688784a7e946cd10b311040b6cf0b2f75125a7520e04d1af0b746505911b57') version('6.22.06', sha256='c4688784a7e946cd10b311040b6cf0b2f75125a7520e04d1af0b746505911b57')
version('6.22.02', sha256='89784afa9c9047e9da25afa72a724f32fa8aa646df267b7731e4527cc8a0c340') version('6.22.02', sha256='89784afa9c9047e9da25afa72a724f32fa8aa646df267b7731e4527cc8a0c340')
version('6.22.00', sha256='efd961211c0f9cd76cf4a486e4f89badbcf1d08e7535bba556862b3c1a80beed') version('6.22.00', sha256='efd961211c0f9cd76cf4a486e4f89badbcf1d08e7535bba556862b3c1a80beed')
...@@ -247,11 +248,18 @@ class Root(CMakePackage): ...@@ -247,11 +248,18 @@ class Root(CMakePackage):
depends_on('shadow', when='+shadow') depends_on('shadow', when='+shadow')
depends_on('sqlite', when='+sqlite') depends_on('sqlite', when='+sqlite')
depends_on('tbb', when='+tbb') depends_on('tbb', when='+tbb')
# See: https://github.com/root-project/root/issues/6933
conflicts('^intel-tbb@2021.1:', when='@:6.22',
msg='Please use an older intel-tbb version')
conflicts('^intel-oneapi-tbb@2021.1:', when='@:6.22',
msg='Please use an older intel-tbb/intel-oneapi-tbb version')
# depends_on('intel-tbb@:2021.0', when='@:6.22 ^intel-tbb')
depends_on('unuran', when='+unuran') depends_on('unuran', when='+unuran')
depends_on('vc', when='+vc') depends_on('vc', when='+vc')
depends_on('vdt', when='+vdt') depends_on('vdt', when='+vdt')
depends_on('libxml2', when='+xml') depends_on('libxml2', when='+xml')
depends_on('xrootd@:4.99.99', when='+xrootd') depends_on('xrootd', when='+xrootd')
depends_on('xrootd@:4.99.99', when='@:6.22.03 +xrootd')
# ###################### Conflicts ###################### # ###################### Conflicts ######################
...@@ -271,7 +279,7 @@ class Root(CMakePackage): ...@@ -271,7 +279,7 @@ class Root(CMakePackage):
# See README.md # See README.md
## S. Joosten --> commented out, this is not an issue when building in ## S. Joosten --> commented out, this is not an issue when building in
## a container ## our container
#conflicts('+http', #conflicts('+http',
# msg='HTTP server currently unsupported due to dependency issues') # msg='HTTP server currently unsupported due to dependency issues')
......
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class XcbProto(AutotoolsPackage):
"""xcb-proto provides the XML-XCB protocol descriptions that libxcb uses to
generate the majority of its code and API."""
homepage = "http://xcb.freedesktop.org/"
url = "http://xcb.freedesktop.org/dist/xcb-proto-1.13.tar.gz"
version('1.13', sha256='0698e8f596e4c0dbad71d3dc754d95eb0edbb42df5464e0f782621216fa33ba7')
version('1.12', sha256='cfa49e65dd390233d560ce4476575e4b76e505a0e0bacdfb5ba6f8d0af53fd59')
version('1.11', sha256='d12152193bd71aabbdbb97b029717ae6d5d0477ab239614e3d6193cc0385d906')
# TODO: uncomment once build deps can be resolved separately
# See #7646, #4145, #4063, and #2548 for details
# extends('python')
patch('xcb-proto-1.12-schema-1.patch', when='@1.12')
## using fractions.gcd has been deprecated since python 3.5
## always apply fix
patch('python-fix.patch')
diff --git a/xcbgen/align.py b/xcbgen/align.py
index d4c12ee..cc39764 100644
--- a/xcbgen/align.py
+++ b/xcbgen/align.py
@@ -2,7 +2,7 @@
This module contains helper classes for alignment arithmetic and checks
'''
-from fractions import gcd
+import math
class Alignment(object):
@@ -73,14 +73,14 @@ class Alignment(object):
def combine_with(self, other):
# returns the alignment that is guaranteed when
# both, self or other, can happen
- new_align = gcd(self.align, other.align)
+ new_align = math.gcd(self.align, other.align)
new_offset_candidate1 = self.offset % new_align
new_offset_candidate2 = other.offset % new_align
if new_offset_candidate1 == new_offset_candidate2:
new_offset = new_offset_candidate1
else:
offset_diff = abs(new_offset_candidate2 - new_offset_candidate1)
- new_align = gcd(new_align, offset_diff)
+ new_align = math.gcd(new_align, offset_diff)
new_offset_candidate1 = self.offset % new_align
new_offset_candidate2 = other.offset % new_align
assert new_offset_candidate1 == new_offset_candidate2
Submitted By: Bruce Dubbs <bdubbs at linuxfromscratch dot org>
Date: 2016-06-01
Initial Package Version: 1.12
Upstream Status: Not Committed
Origin: https://lists.freedesktop.org/archives/xcb/2016-February/010676.html
Description: Fixes make check
--- a/src/xcb.xsd
+++ b/src/xcb.xsd
@@ -44,6 +44,15 @@ authorization from the authors.
<xsd:complexType>
<xsd:attribute name="bytes" type="xsd:integer" use="optional" />
<xsd:attribute name="align" type="xsd:integer" use="optional" />
+ <xsd:attribute name="serialize" type="xsd:boolean" use="optional" />
+ </xsd:complexType>
+ </xsd:element>
+
+ <!-- Alignment -->
+ <xsd:element name="required_start_align" >
+ <xsd:complexType>
+ <xsd:attribute name="align" type="xsd:integer" use="required" />
+ <xsd:attribute name="offset" type="xsd:integer" use="optional" />
</xsd:complexType>
</xsd:element>
@@ -76,14 +85,13 @@ authorization from the authors.
<xsd:sequence>
<!-- switch(expression) -->
<xsd:group ref="expression" minOccurs="1" maxOccurs="1" />
+ <xsd:element ref="required_start_align" minOccurs="0" maxOccurs="1" />
<xsd:choice>
<!-- bitcase expression - bit test -->
<xsd:element name="bitcase" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
<!-- case expression - value test -->
<xsd:element name="case" type="caseexpr" minOccurs="0" maxOccurs="unbounded" />
</xsd:choice>
- <!-- default: -->
- <xsd:group ref="fields" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
@@ -201,6 +209,7 @@ authorization from the authors.
<xsd:element ref="field" />
<xsd:element ref="list" />
<xsd:element ref="fd" />
+ <xsd:element ref="required_start_align" />
</xsd:choice>
</xsd:group>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment