[HepMC/el5] Initial commit after review

Mattias Ellert ellert at fedoraproject.org
Thu Jun 6 08:33:13 UTC 2013


commit 4d11f9f28271d8061fa9dc0b5557e77660eb3736
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Jun 6 10:32:22 2013 +0200

    Initial commit after review

 .gitignore                              |    1 +
 HepMC-examples-hwaend.patch             |   24 +++++++
 HepMC-examples-makefile.patch           |   47 +++++++++++++
 HepMC-fix-typo-hierachy-hierarchy.patch |   19 +++++
 HepMC-linking.patch                     |   24 +++++++
 HepMC.spec                              |  113 +++++++++++++++++++++++++++++++
 sources                                 |    1 +
 7 files changed, 229 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f6a3a77 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/*.tar.gz
diff --git a/HepMC-examples-hwaend.patch b/HepMC-examples-hwaend.patch
new file mode 100644
index 0000000..134ac82
--- /dev/null
+++ b/HepMC-examples-hwaend.patch
@@ -0,0 +1,24 @@
+provide dummy hwaend_ function in examples.
+
+--- a/examples/fio/example_MyHerwig.cc
++++ b/examples/fio/example_MyHerwig.cc
+@@ -21,6 +21,8 @@
+ #include "HepMC/GenEvent.h"
+ #include "HepMC/HEPEVT_Wrapper.h"
+ 
++extern "C" void hwaend_() {}
++
+ int main() { 
+     //
+     //........................................HEPEVT
+--- a/examples/fio/testHerwigCopies.cc
++++ b/examples/fio/testHerwigCopies.cc
+@@ -13,6 +13,8 @@
+ #include "HepMC/CompareGenEvent.h"
+ #include "HepMC/HEPEVT_Wrapper.h"
+ 
++extern "C" void hwaend_() {}
++
+ int main() { 
+     //
+     //........................................HEPEVT
diff --git a/HepMC-examples-makefile.patch b/HepMC-examples-makefile.patch
new file mode 100644
index 0000000..74c6101
--- /dev/null
+++ b/HepMC-examples-makefile.patch
@@ -0,0 +1,47 @@
+--- a/examples/fio/GNUmakefile.example.in
++++ b/examples/fio/GNUmakefile.example.in
+@@ -12,18 +12,16 @@
+ #    You may have to change GENSERdir and/or other variables
+ #
+   HepMCdir             = @prefix@
+-  HepMClib             = -L$(HepMCdir)/lib -lHepMC
+-  HepMCfiolib          = -L$(HepMCdir)/lib -lHepMCfio
++  HepMClib             = -lHepMC
++  HepMCfiolib          = -lHepMCfio
+   GENSERdir            = @GENSERdir@
+-  Pythia_LIB	= -L$(GENSERdir)/lib -Wl,-rpath -Wl,$(GENSERdir)/lib \
+-                  -lpythia6_403 -lpythia6_403_dumm -lpythia6_403_pdfdumm
+-  Herwig_LIB	= -L$(GENSERdir)/lib -Wl,-rpath -Wl,$(GENSERdir)/lib \
+-                  -lherwig6_510 -lherwig6_510_dumm -lherwig6_510_pdfdumm
++  Pythia_LIB	= -lpythia6
++  Herwig_LIB	= -lherwig6
+ 
+ ################################################################################ Compiler options
+ #
+   CXX           = @CXX@
+-  F77		= @F77@
++  F77		= gfortran
+   INCLUDES 	= -I$(HepMCdir)/include -I$(CLHEPdir)/include
+   CXXFLAGS      =  @AM_CXXFLAGS@ @CXXFLAGS@ $(INCLUDES)
+ ifeq "$(CXX)" "g++"
+--- a/examples/pythia8/GNUmakefile.example.in
++++ b/examples/pythia8/GNUmakefile.example.in
+@@ -14,15 +14,13 @@
+ #
+   HepMCdir      = @prefix@
+   HEPMCLOCATION = $(HepMCdir)
+-  HepMClib      = -L$(HEPMCLOCATION)/lib -Wl,-rpath -Wl,$(HEPMCLOCATION)/lib \
+-                  -lHepMC
+-  Pythia_LIB	= -L$(PYTHIA8_HOME)/lib -Wl,-rpath -Wl,$(PYTHIA8_HOME)/lib \
+-                  -lpythia8 -llhapdfdummy -lhepmcinterface
++  HepMClib      = -lHepMC
++  Pythia_LIB	= -lpythia8 -lLHAPDF -lhepmcinterface
+ 
+ ################################################################################ Compiler options
+ #
+   CXX           = @CXX@
+-  INCLUDES 	= -I$(HEPMCLOCATION)/include -I$(PYTHIA8_HOME)/include
++  INCLUDES 	= -I/usr/include/pythia8
+   CXXFLAGS      =  @AM_CXXFLAGS@ @CXXFLAGS@ -Wshadow -fbounds-check $(INCLUDES)
+ ifeq "$(CXX)" "g++"
+    FLAGS 	= $(DFLG) -fno-second-underscore $(INCDIR)
diff --git a/HepMC-fix-typo-hierachy-hierarchy.patch b/HepMC-fix-typo-hierachy-hierarchy.patch
new file mode 100644
index 0000000..0efed0c
--- /dev/null
+++ b/HepMC-fix-typo-hierachy-hierarchy.patch
@@ -0,0 +1,19 @@
+commit 59755b58f1a6e2fe1521223a4dcf0d17a51f7181
+Author: Lifeng Sun <lifongsun at gmail.com>
+Date:   Sun Apr 3 08:22:36 2011 +0800
+
+    fix typo: hierachy -> hierarchy.
+
+diff --git a/fio/HEPEVT_Wrapper.cc b/fio/HEPEVT_Wrapper.cc
+index 1f382a8..9906002 100644
+--- a/fio/HEPEVT_Wrapper.cc
++++ b/fio/HEPEVT_Wrapper.cc
+@@ -186,7 +186,7 @@ namespace HepMC {
+ 	       << "\n relationships ... but all other information "
+ 	       << "\n (4-vectors etc) will be correctly transferred."
+ 	       << "\n In order for HepMC to be able to interpret the mother/"
+-	       << "\n daughter hierachy, it MUST be given consistent input."
++	       << "\n daughter hierarchy, it MUST be given consistent input."
+ 	       << "\n This is one of the design criteria of HepMC: "
+ 	       << "\n consistency is enforced by the code.";
+ 	    os << "\nThere is a switch in IO_HEPEVT, set-able using "
diff --git a/HepMC-linking.patch b/HepMC-linking.patch
new file mode 100644
index 0000000..2793acc
--- /dev/null
+++ b/HepMC-linking.patch
@@ -0,0 +1,24 @@
+diff -ur HepMC-2.06.09.orig/fio/Makefile.am HepMC-2.06.09/fio/Makefile.am
+--- HepMC-2.06.09.orig/fio/Makefile.am	2011-10-31 20:05:37.000000000 +0100
++++ HepMC-2.06.09/fio/Makefile.am	2012-11-16 16:22:11.373692129 +0100
+@@ -10,6 +10,8 @@
+ 
+ lib_LTLIBRARIES = libHepMCfio.la
+ 
++libHepMCfio_la_LIBADD = $(top_builddir)/src/libHepMC.la
++
+ if BUILD_VISUAL
+   lib_shared = HepMC.$(SHEXT)
+ else
+diff -ur HepMC-2.06.09.orig/fio/Makefile.in HepMC-2.06.09/fio/Makefile.in
+--- HepMC-2.06.09.orig/fio/Makefile.in	2012-06-05 22:50:44.000000000 +0200
++++ HepMC-2.06.09/fio/Makefile.in	2012-11-16 16:23:07.581987610 +0100
+@@ -55,7 +55,7 @@
+ am__installdirs = "$(DESTDIR)$(libdir)"
+ libLTLIBRARIES_INSTALL = $(INSTALL)
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+-libHepMCfio_la_LIBADD =
++libHepMCfio_la_LIBADD = $(top_builddir)/src/libHepMC.la
+ am_libHepMCfio_la_OBJECTS = HEPEVT_Wrapper.lo IO_HEPEVT.lo \
+ 	IO_HERWIG.lo HerwigWrapper.lo
+ libHepMCfio_la_OBJECTS = $(am_libHepMCfio_la_OBJECTS)
diff --git a/HepMC.spec b/HepMC.spec
new file mode 100644
index 0000000..7e20b53
--- /dev/null
+++ b/HepMC.spec
@@ -0,0 +1,113 @@
+Name:		HepMC
+Version:	2.06.09
+Release:	3%{?dist}
+Summary:	C++ Event Record for Monte Carlo Generators
+Group:		System Environment/Libraries
+
+License:	GPLv2+
+URL:		http://lcgapp.cern.ch/project/simu/HepMC/
+Source0:	http://lcgapp.cern.ch/project/simu/HepMC/download/%{name}-%{version}.tar.gz
+Patch0:		%{name}-fix-typo-hierachy-hierarchy.patch
+Patch1:		%{name}-examples-makefile.patch
+Patch2:		%{name}-examples-hwaend.patch
+Patch3:		%{name}-linking.patch
+
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+%description
+The HepMC package is an object oriented event record written in C++
+for High Energy Physics Monte Carlo Generators. Many extensions from
+HEPEVT, the Fortran HEP standard, are supported: the number of entries
+is unlimited, spin density matrices can be stored with each vertex,
+flow patterns (such as color) can be stored and traced, integers
+representing random number generator states can be stored, and an
+arbitrary number of event weights can be included. Particles and
+vertices are kept separate in a graph structure, physically similar to
+a physics event. The added information supports the modularization of
+event generators. The package has been kept as simple as possible with
+minimal internal/external dependencies. Event information is accessed
+by means of iterators supplied with the package.
+
+%package devel
+Summary:	C++ Event Record for Monte Carlo Generators - development files
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package provides development files of HepMC.
+
+%package doc
+Summary:	C++ Event Record for Monte Carlo Generators - documentation
+Group:		Documentation
+%if %{?fedora}%{!?fedora:0} >= 10 || %{?rhel}%{!?rhel:0} >= 6
+BuildArch:	noarch
+%endif
+
+%description doc
+This package provides HepMC manuals and examples.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+chmod 644 ChangeLog
+
+%build
+%configure --with-momentum=GEV --with-length=MM --disable-static
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+
+rm %{buildroot}%{_libdir}/libHepMC.la
+rm %{buildroot}%{_libdir}/libHepMCfio.la
+
+rm %{buildroot}%{_datadir}/%{name}/examples/pythia8/config.sh
+rm %{buildroot}%{_datadir}/%{name}/examples/pythia8/config.csh
+rm %{buildroot}%{_datadir}/%{name}/examples/pythia8/README
+
+mkdir -p %{buildroot}%{_docdir}/%{name}-doc-%{version}
+mv %{buildroot}%{_datadir}/%{name}/examples \
+   %{buildroot}%{_docdir}/%{name}-doc-%{version}
+mv %{buildroot}%{_datadir}/%{name}/doc/HepMC2_reference_manual.pdf \
+   %{buildroot}%{_docdir}/%{name}-doc-%{version}/%{name}-reference-manual.pdf
+mv %{buildroot}%{_datadir}/%{name}/doc/HepMC2_user_manual.pdf \
+   %{buildroot}%{_docdir}/%{name}-doc-%{version}/%{name}-user-manual.pdf
+install -p -m 644 COPYING %{buildroot}%{_docdir}/%{name}-doc-%{version}
+
+%check
+make check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{_libdir}/libHepMC.so.*
+%{_libdir}/libHepMCfio.so.*
+%doc AUTHORS ChangeLog COPYING README
+
+%files devel
+%{_libdir}/libHepMC.so
+%{_libdir}/libHepMCfio.so
+%{_includedir}/%{name}
+
+%files doc
+%dir %{_docdir}/%{name}-doc-%{version}
+%doc %{_docdir}/%{name}-doc-%{version}/examples
+%doc %{_docdir}/%{name}-doc-%{version}/*.pdf
+%doc %{_docdir}/%{name}-doc-%{version}/COPYING
+
+%changelog
+* Wed Jun 05 2013 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.06.09-3
+- Make doc package independent
+
+* Wed May 22 2013 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.06.09-2
+- Add isa to dependencies
+
+* Fri Nov 16 2012 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.06.09-1
+- Initial build
diff --git a/sources b/sources
index e69de29..9db317e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c47627ced4255b40e731b8666848b087  HepMC-2.06.09.tar.gz


More information about the scm-commits mailing list