%global commit e7252f578951cfebb57e7ab122b388404f278bc3 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: castxml Version: 0.1 Release: 0.15.20170113git%{shortcommit}%{?dist} Summary: C-family abstract syntax tree XML output tool # The main program is Apache 2.0 # src/kwsys/* is BSD License: ASL 2.0 and BSD URL: https://github.com/CastXML/CastXML Source0: https://github.com/CastXML/CastXML/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz # Link against the shared llvm library (one common library). Patch0: %{name}-shared.patch BuildRequires: cmake BuildRequires: llvm-devel >= 3.6.0 # The llvm cmake files get confused if the static libraries are # not present even though we don't link against them. BuildRequires: llvm-static >= 3.6.0 BuildRequires: clang-devel >= 3.6.0 BuildRequires: libedit-devel BuildRequires: zlib-devel BuildRequires: python-sphinx # Bundled components of the kitware system library # https://fedorahosted.org/fpc/ticket/555 Provides: bundled(kwsys-encoding) Provides: bundled(kwsys-process) Provides: bundled(kwsys-system) Obsoletes: gccxml < 0.9.0-0.28 %description 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. %prep %setup -q -n CastXML-%{commit} %patch0 -p1 %if %{?fedora}%{!?fedora:0} == 23 # 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 %endif %build %cmake -DCastXML_INSTALL_DOC_DIR:STRING=share/doc/%{name} \ -DCastXML_INSTALL_MAN_DIR:STRING=share/man \ %if %{?fedora}%{!?fedora:0} == 23 -DLLVM_LIBRARY_DIR=%{_libdir}/llvm \ %endif -DCLANG_RESOURCE_DIR:PATH=$(clang -print-file-name=include)/.. \ -DKWSYS_BUILD_SHARED:BOOL=OFF \ -DBUILD_TESTING:BOOL=ON \ -DSPHINX_MAN:BOOL=ON make %{?_smp_mflags} %install make %{?_smp_mflags} install DESTDIR=%{buildroot} rm %{buildroot}%{_pkgdocdir}/LICENSE rm %{buildroot}%{_pkgdocdir}/NOTICE %check ctest %{?_smp_mflags} %files %{_bindir}/castxml %doc %{_mandir}/man1/castxml.1* %dir %{_datadir}/%{name} %{_datadir}/%{name}/clang %{_datadir}/%{name}/detect_vs.c %{_datadir}/%{name}/detect_vs.cpp %{_datadir}/%{name}/empty.c %{_datadir}/%{name}/empty.cpp %license LICENSE NOTICE src/kwsys/Copyright.txt %changelog * Wed Feb 08 2017 Mattias Ellert - 0.1-0.15.20170113gite7252f5 - New git snapshot * Mon Nov 07 2016 Mattias Ellert - 0.1-0.14.20161006git05db76f - Rebuild for LLVM 3.9 (Fedora 26) * Tue Oct 25 2016 Mattias Ellert - 0.1-0.13.20161006git05db76f - New git snapshot * Fri Jul 01 2016 Mattias Ellert - 0.1-0.12.20160617gitd5934bd - New git snapshot * Thu May 26 2016 Mattias Ellert - 0.1-0.11.20160510git9a83414 - New git snapshot * Thu Feb 25 2016 Mattias Ellert - 0.1-0.10.20160125gitfc71eb9 - Adjust to llvm library changes again (the split was revoked) * Wed Feb 03 2016 Fedora Release Engineering - 0.1-0.9.20160125gitfc71eb9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jan 28 2016 Mattias Ellert - 0.1-0.8.20160125gitfc71eb9 - New git snapshot - Properly adjust to the new llvm library split * Wed Jan 27 2016 Adam Jackson 0.1-0.7.20150924git552dd69 - Rebuild for llvm 3.7.1 library split * Fri Sep 25 2015 Mattias Ellert - 0.1-0.6.20150924git552dd69 - Adjust gccxml obsolete version * Thu Sep 24 2015 Mattias Ellert - 0.1-0.5.20150924git552dd69 - New git snapshot - Allow warnings about guessing the float ABI during tests (fixes tests on arm) * Thu Sep 17 2015 Mattias Ellert - 0.1-0.4.20150902git7acd634 - New git snapshot * Fri Aug 21 2015 Mattias Ellert - 0.1-0.3.20150820git2e55b35 - New git snapshot - Upstream has deleted the parts of the bundled kwsys sources that are not used by castxml from the source repository - Add bundled provides for the remaining kwsys components according to revised FPC decision 2015-08-20 https://fedorahosted.org/fpc/ticket/555 * Fri Aug 07 2015 Mattias Ellert - 0.1-0.2.20150807git8a08a44 - New git snapshot - Unbundle kwsys library according to FPC decision 2015-08-06 https://fedorahosted.org/fpc/ticket/555 * Tue Apr 14 2015 Mattias Ellert - 0.1-0.1.20150414git43fa139 - First packaging for Fedora