parameters: (input_args,
                                     output_stages: typing.MutableMapping[str, hpccm.Stage])
docstring: Add appropriate layers according to doxygen input arguments.
docstring_summary: Add appropriate layers according to doxygen input arguments.
docstring_tokens: Add appropriate layers according to doxygen input arguments .
function: def add_documentation_dependencies(input_args,
                                     output_stages: typing.MutableMapping[str, hpccm.Stage]):
      """Add appropriate layers according to doxygen input arguments."""
      if input_args.doxygen is None:
          return
      # Always clone the same version of linkchecker (latest release at June 1, 2021)
      output_stages['main'] += hpccm.building_blocks.pip(pip='pip3', packages=[
          'git+https://github.com/linkchecker/linkchecker.git@v10.0.1'])
      output_stages['main'] += hpccm.primitives.shell(
          commands=[
              'sed -i \'/\"XPS\"/d;/\"PDF\"/d;/\"PS\"/d;/\"EPS\"/d;/disable ghostscript format types/d\' /etc/ImageMagick-6/policy.xml'])
      if input_args.doxygen == '1.8.5':
          doxygen_commit = 'ed4ed873ab0e7f15116e2052119a6729d4589f7a'
          output_stages['main'] += hpccm.building_blocks.generic_autotools(
              repository='https://github.com/westes/flex.git',
              commit='f7788a9a0ecccdc953ed12043ccb59ca25714018',
              prefix='/tmp/install-of-flex',
              configure_opts=['--disable-shared'],
              preconfigure=['./autogen.sh'])
          output_stages['main'] += hpccm.building_blocks.generic_autotools(
              repository='https://github.com/doxygen/doxygen.git',
              commit=doxygen_commit,
              prefix='',
              configure_opts=[
                  '--flex /tmp/install-of-flex/bin/flex',
                  '--static'])
      else:
          version = input_args.doxygen
          archive_name = f'doxygen-{version}.linux.bin.tar.gz'
          archive_url = f'https://sourceforge.net/projects/doxygen/files/rel-{version}/{archive_name}'
          binary_path = f'doxygen-{version}/bin/doxygen'
          commands = [
              'mkdir doxygen && cd doxygen',
              f'wget {archive_url}',
              f'tar xf {archive_name} {binary_path}',
              f'cp {binary_path} /usr/local/bin/',
              'cd .. && rm -rf doxygen'
          ]
          output_stages['main'] += hpccm.primitives.shell(commands=commands)
function_tokens: def add_documentation_dependencies ( input_args , output_stages : typing . MutableMapping [ str , hpccm . Stage ] ) : if input_args . doxygen is None : return # Always clone the same version of linkchecker (latest release at June 1, 2021) output_stages [ 'main' ] += hpccm . building_blocks . pip ( pip = 'pip3' , packages = [ 'git+https://github.com/linkchecker/linkchecker.git@v10.0.1' ] ) output_stages [ 'main' ] += hpccm . primitives . shell ( commands = [ 'sed -i \'/\"XPS\"/d;/\"PDF\"/d;/\"PS\"/d;/\"EPS\"/d;/disable ghostscript format types/d\' /etc/ImageMagick-6/policy.xml' ] ) if input_args . doxygen == '1.8.5' : doxygen_commit = 'ed4ed873ab0e7f15116e2052119a6729d4589f7a' output_stages [ 'main' ] += hpccm . building_blocks . generic_autotools ( repository = 'https://github.com/westes/flex.git' , commit = 'f7788a9a0ecccdc953ed12043ccb59ca25714018' , prefix = '/tmp/install-of-flex' , configure_opts = [ '--disable-shared' ] , preconfigure = [ './autogen.sh' ] ) output_stages [ 'main' ] += hpccm . building_blocks . generic_autotools ( repository = 'https://github.com/doxygen/doxygen.git' , commit = doxygen_commit , prefix = '' , configure_opts = [ '--flex /tmp/install-of-flex/bin/flex' , '--static' ] ) else : version = input_args . doxygen archive_name = f'doxygen-{version}.linux.bin.tar.gz' archive_url = f'https://sourceforge.net/projects/doxygen/files/rel-{version}/{archive_name}' binary_path = f'doxygen-{version}/bin/doxygen' commands = [ 'mkdir doxygen && cd doxygen' , f'wget {archive_url}' , f'tar xf {archive_name} {binary_path}' , f'cp {binary_path} /usr/local/bin/' , 'cd .. && rm -rf doxygen' ] output_stages [ 'main' ] += hpccm . primitives . shell ( commands = commands )