Skip to content

Commit

Permalink
Merge pull request #2819 from iahmad-khan/lwtnn80x530
Browse files Browse the repository at this point in the history
backports lwtnn to 80x
  • Loading branch information
davidlange6 authored Feb 17, 2017
2 parents b4eaa4c + 614239c commit fce061f
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 3 deletions.
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Requires: libpng-toolfile
Requires: libtiff-toolfile
Requires: libungif-toolfile
Requires: libxml2-toolfile
Requires: lwtnn-toolfile
Requires: mcdb-toolfile
Requires: meschach-toolfile
Requires: openssl-toolfile
Expand Down
2 changes: 1 addition & 1 deletion eigen-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/eigen.xml
<tool name="eigen" version="@TOOL_VERSION@">
<client>
<environment name="EIGEN_BASE" default="@TOOL_ROOT@"/>
<environment name="INCLUDE" default="$EIGEN_BASE/include"/>
<environment name="INCLUDE" default="$EIGEN_BASE/include/eigen3"/>
</client>
<flags CPPDEFINES="EIGEN_DONT_PARALLELIZE"/>
</tool>
Expand Down
12 changes: 10 additions & 2 deletions eigen.spec
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
### RPM external eigen 3.2.2
## INITENV +PATH PKG_CONFIG_PATH %{i}/share/pkgconfig
## NOCOMPILER
%define tag 87b069eefbf748ee3aba16fe5f84b4ccd6227082
%define branch cms/3.2.2
%define github_user cms-externals
Source: git+https://github.com/%github_user/eigen.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz

BuildRequires: cmake

%prep
%setup -n %n-%{realversion}

%build
mkdir -p %i/include
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{i} ../

%install
cp -r Eigen %i/include
cd build
make install

%post
%{relocateConfig}share/pkgconfig/eigen3.pc
16 changes: 16 additions & 0 deletions lwtnn-1.0-boost-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/makefile b/makefile
index 8e7e65a..53270ac 100644
--- a/makefile
+++ b/makefile
@@ -24,9 +24,9 @@

# --- set compiler and flags (roll c options and include paths together)
CXX ?= g++
-CXXFLAGS := -O2 -Wall -fPIC -I$(INC) -g -std=c++11 -pedantic
-LIBS := # blank, more will be added below
-LDFLAGS := # blank, more will be added below
+CXXFLAGS := -O2 -Wall -fPIC -I$(INC) -I$(BOOST_ROOT)/include -DBOOST_SPIRIT_THREADSAFE -DPHOENIX_THREADSAFE -g -std=c++11 -pedantic
+LIBS := -lboost_thread -lboost_system # blank, more will be added below
+LDFLAGS := -L$(BOOST_ROOT)/lib # blank, more will be added below
# add eigen
CXXFLAGS += $(shell pkg-config eigen3 --cflags)
24 changes: 24 additions & 0 deletions lwtnn-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### RPM external lwtnn-toolfile 1.0
Requires: lwtnn
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/lwtnn.xml
<tool name="lwtnn" version="@TOOL_VERSION@">
<info url="https://github.com/lwtnn/lwtnn"/>
<lib name="lwtnn"/>
<client>
<environment name="LWTNN_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$LWTNN_BASE/lib"/>
<environment name="INCLUDE" default="$LWTNN_BASE/include"/>
</client>
<runtime name="PATH" value="$LWTNN_BASE/bin" type="path"/>
<use name="eigen"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
17 changes: 17 additions & 0 deletions lwtnn.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### RPM external lwtnn 1.0
Source: https://github.com/lwtnn/lwtnn/archive/v%{realversion}.tar.gz
BuildRequires: py2-pkgconfig
Requires: eigen boost
Patch0: lwtnn-1.0-boost-fix
%prep
%setup -n %{n}-%{realversion}
%patch0 -p1

%build

export BOOST_ROOT
make all

%install
cp -r {lib,bin,include} %{i}/

24 changes: 24 additions & 0 deletions py2-nose-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### RPM external py2-nose-toolfile 1.0
Requires: py2-nose
%prep

%build

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/py2-nose.xml
<tool name="py2-nose" version="@TOOL_VERSION@">
<info url="https://pypi.python.org/pypi/nose"/>
<client>
<environment name="PY2_NOSE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$PY2_NOSE/lib"/>
<runtime name="PYTHONPATH" value="$PY2_NOSE/lib/python@PYTHONV@/site-packages" type="path"/>
</client>
</tool>
EOF_TOOLFILE

export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)

## IMPORT scram-tools-post

17 changes: 17 additions & 0 deletions py2-nose.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### RPM external py2-nose 1.3.7
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES
%define my_name %(echo %n | cut -f2 -d-)
Source: https://pypi.python.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a3068acfa754d44d88107a44/nose-%{realversion}.tar.gz
Requires: python
BuildRequires: py2-setuptools

%prep
%setup -n %{my_name}-%{realversion}

%build
python setup.py build

%install
python setup.py install --single-version-externally-managed --record=/dev/null --skip-build --prefix=%{i}
perl -p -i -e "s|^#!.*python|#!/usr/bin/env python|" %{i}/bin/nosetests-2.7 %{i}/bin/nosetests

24 changes: 24 additions & 0 deletions py2-pkgconfig-toolfile.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### RPM external py2-pkgconfig-toolfile 1.0
Requires: py2-pkgconfig
%prep

%build

%install

mkdir -p %i/etc/scram.d
cat << \EOF_TOOLFILE >%i/etc/scram.d/py2-pkgconfig.xml
<tool name="py2-pkgconfig" version="@TOOL_VERSION@">
<client>
<environment name="PY2_PKGCONFIG_BASE" default="@TOOL_ROOT@"/>
</client>
<runtime name="PYTHONPATH" value="$PY2_PKGCONFIG_BASE/lib/python@PYTHONV@/site-packages" type="path"/>
<use name="python"/>
</tool>
EOF_TOOLFILE

export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)

## IMPORT scram-tools-post


16 changes: 16 additions & 0 deletions py2-pkgconfig.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### RPM external py2-pkgconfig 1.1.0
## INITENV +PATH PYTHONPATH %{i}/$PYTHON_LIB_SITE_PACKAGES

Source: https://pypi.python.org/packages/87/35/4af9634270c00e3411cf951b7e0ea796c262922357cfc7609a86d31f072b/pkgconfig-1.1.0.tar.gz
BuildRequires: py2-setuptools
Requires: python py2-nose

%prep
%setup -n pkgconfig-%{realversion}

%build
python setup.py build

%install
python setup.py install --single-version-externally-managed --record=/dev/null --skip-build --prefix=%{i}

0 comments on commit fce061f

Please sign in to comment.