diff --git a/py3-dxr.spec b/py3-dxr.spec index 722db4b75bb..8f8a1794e6a 100644 --- a/py3-dxr.spec +++ b/py3-dxr.spec @@ -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 diff --git a/trilite.patch b/trilite.patch deleted file mode 100644 index b5e6f09c29f..00000000000 --- a/trilite.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/makefile b/makefile -index 7e746da..2405469 100644 ---- a/makefile -+++ b/makefile -@@ -1,5 +1,5 @@ --CFLAGS := -Ire2/ $(shell pkg-config --cflags sqlite3) -Wall -fPIC -ansi --LDFLAGS := -Lre2/obj -lre2 $(shell pkg-config --libs sqlite3) -shared -+CFLAGS := -Ire2/ -I$(SQLITE_ROOT)/include -Wall -fPIC -ansi -fcommon -+LDFLAGS := -Lre2/obj -lre2 -L$(SQLITE_ROOT)/lib -lsqlite3 -shared - SOURCES := kmp.c scanstr.c varint.c hash.c expr.c match.c regexp.cpp cursor.c vtable.c trilite.c - OBJECTS := $(patsubst %.cpp,%.o,$(patsubst %.c,%.o,$(SOURCES))) - all: debug -@@ -9,7 +9,7 @@ release: CFLAGS += -DNDEBUG -O3 - release: LDFLAGS += -O3 - release: re2/obj/libre2.a libtrilite.so - re2: -- hg clone https://re2.googlecode.com/hg re2 -+ curl https://re2.googlecode.com/files/re2-20140304.tgz | tar xfz - - re2/obj/libre2.a: re2 - $(MAKE) -C re2 CXXFLAGS='-Wall -O3 -pthread -fPIC' - %.o: %.cpp -diff --git a/trilite.h b/trilite.h -index 684a5fd..193e657 100644 ---- a/trilite.h -+++ b/trilite.h -@@ -5,6 +5,6 @@ - - int sqlite3_extension_init(sqlite3*, char**, const sqlite3_api_routines*); - --void load_trigram_extension(); -+void load_trilite_extension(); - - #endif /* TRILITE_TRILITE_H */