Репозиторий Sisyphus
Последнее обновление: 21 августа 2019 | Пакетов: 17343 | Посещений: 14698220
en ru br
Репозитории ALT

Группа :: Разработка/Прочее
Пакет: castxml

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

Name:    castxml
Release: alt1.gitc3a239d
Summary: C-family abstract syntax tree XML output tool
Group:   Development/Other

# The main program is Apache 2.0

# src/kwsys/* is BSD
License: Apache 2.0 and BSD
URL:     https://github.com/CastXML/CastXML

# https://github.com/CastXML/CastXML.git

Source: %name-%version.tar

# Link against the shared llvm library (one common library).

Patch1: %name-fedora-shared.patch

BuildRequires: cmake ctest gcc-c++
BuildRequires: llvm-devel lld
# The llvm cmake files get confused if the static libraries are
# not present even though we don't link against them.
BuildRequires: llvm-devel-static
BuildRequires: clang-devel
# Required clang libraries are built statically at the moment
BuildRequires: clang-devel-static
BuildRequires: libedit-devel
BuildRequires: zlib-devel
BuildRequires: python-module-sphinx
BuildRequires: /proc

Requires: /proc

Obsoletes: gccxml

Parse C-family source files and optionally write a subset of the
Abstract Syntax Tree (AST) to a representation in XML.

Source files are parsed as complete translation units using the clang
compiler. XML output is enabled by the --castxml-gccxml option and
produces a format close to that of gccxml. Future versions of castxml
may support alternative output formats.

%patch1 -p1

# LLVM_LIBRARY_DIRS does not work, and can not be overridden with -D flag

#sed 's!${LLVM_LIBRARY_DIRS}!${LLVM_LIBRARY_DIR}!' -i CMakeLists.txt

export CC=clang
export CXX=clang++
%remove_optflags -frecord-gcc-switches

%cmake \
      -DCastXML_INSTALL_DOC_DIR:STRING=share/doc/%name \
      -DCastXML_INSTALL_MAN_DIR:STRING=share/man \
      -DCLANG_RESOURCE_DIR:PATH=$(clang -print-file-name=include)/.. \
      -DCMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld \
      -DLLVM_DIR=$(llvm-config --cmakedir) \



rm -f %buildroot%_datadir/doc/%name/LICENSE
rm -f %buildroot%_datadir/doc/%name/NOTICE

pushd BUILD

%dir %_datadir/%name


Полный changelog можно просмотреть здесь

дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin