Skip to content

Commit

Permalink
Merge pull request #7850 from cms-sw/dxr-sources
Browse files Browse the repository at this point in the history
dxr: bundle up dxr/trilite and re2 sources
  • Loading branch information
smuzaffar authored May 11, 2022
2 parents b5557e5 + 281c32e commit a5958d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 57 deletions.
28 changes: 4 additions & 24 deletions py3-dxr.spec
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,19 @@
## INITENV +PATH PYTHON3PATH %i/${PYTHON3_LIB_SITE_PACKAGES}
Requires: zlib llvm sqlite
Requires: py3-Jinja2 py3-parsimonious py3-pysqlite3 py3-Pygments
%define dxrCommit 4d24ba871f9f0df418c02fbbc7b949cb4371a4c5
%define triliteCommit e64a2a1
%define re2Version 20140304
%define dxrCommit de41946bc5601d100efb44780f11db71dafaeb1e
%define branch cms/6ea764102a/py3

Source0: git+https://github.com/cms-externals/dxr.git?obj=%{branch}/%{dxrCommit}&export=dxr-%{dxrCommit}&module=dxr-%dxrCommit&output=/dxr-%{dxrCommit}.tgz
Source1: git+https://github.com/jonasfj/trilite.git?obj=master/%{triliteCommit}&export=trilite-%{triliteCommit}&module=trilite-%triliteCommit&output=/trilite-%{triliteCommit}.tgz
Source2: https://re2.googlecode.com/files/re2-%re2Version.tgz
Patch0: trilite
%define keep_archives true

%prep
%setup -T -b0 -n dxr-%dxrCommit
%setup -T -D -a1 -c -n dxr-%dxrCommit
%setup -T -D -a2 -n dxr-%dxrCommit/trilite-%triliteCommit
%patch0 -p1
cd ..
mv trilite-%triliteCommit/* trilite
%setup -T -D -n dxr-%dxrCommit
%setup -n dxr-%dxrCommit

%build
export SQLITE_ROOT
LDFLAGS="-L${ZLIB_ROOT}/lib" make build-plugin-clang build-plugin-pygmentize
cd trilite
make release
cd re2
make
cd ../../
python3 setup.py build
LDFLAGS="-L${ZLIB_ROOT}/lib" make %{makeprocesses}

%install
mkdir %i/lib
cp -p trilite/libtrilite.so %i/lib
cp -p trilite/re2/obj/libre2.a %i/lib
python3 setup.py install --prefix=%i --single-version-externally-managed --record=/dev/null
make %{makeprocesses} install PREFIX=%i
perl -p -i -e "s|^#!%{cmsroot}/.*|#!/usr/bin/env python3|" %{i}/bin/*.py
33 changes: 0 additions & 33 deletions trilite.patch

This file was deleted.

0 comments on commit a5958d9

Please sign in to comment.