The package rpms/lhapdf.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/lhapdf.git/commit/?id=6f9b0a4e300....
Change:
-%ifnarch s390 %{arm}
Thanks.
Full change:
============
commit 6f9b0a4e3000491fe929f078e73310a6da226dd1
Author: Mattias Ellert <mattias.ellert(a)physics.uu.se>
Date: Wed Jul 4 15:25:17 2018 +0200
Update to version 6.2.1
Change license tag from GPLv2+ to GPLv3+
Add Python 3 bindings
Drop packages not provided by LHAPDF6: octave-lhapdf, lhapdf-pdfsets-minimal
diff --git a/lhapdf-config.1 b/lhapdf-config.1
deleted file mode 100644
index e0f63d2..0000000
--- a/lhapdf-config.1
+++ /dev/null
@@ -1,40 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.39.4.
-.TH LHAPDF-CONFIG "1" "May 2011" "lhapdf-config" "User
Commands"
-.SH NAME
-lhapdf-config \- script to get version number and compiler flags of the installed LHAPDF
library
-.SH SYNOPSIS
-.B lhapdf-config
-[[\fI--help|-h\fR] \fI| \fR[\fI--prefix\fR] \fI| \fR[\fI--pdfsets-path\fR]]
-.SH DESCRIPTION
-\fIlhapdf-config\fP is a tool that is used to configure to determine
-the compiler and linker flags that should be used to compile
-and link programs that use \fILHAPDF\fP.
-.SH OPTIONS
-.TP
-\fB\-\-help\fR | \fB\-h\fR
-: show this help message
-.TP
-\fB\-\-prefix\fR
-: show the installation prefix (cf. autoconf)
-.TP
-\fB\-\-incdir\fR
-: show the path to the LHAPDF header directory (for C++ interface)
-.TP
-\fB\-\-libdir\fR
-: show the path to the LHAPDF library directory
-.TP
-\fB\-\-datadir\fR
-: show the path to the LHAPDF installed data directory
-.HP
-\fB\-\-pdfsets\-path\fR : show the path to the directory containing the PDF set data
files
-.TP
-\fB\-\-cppflags\fR
-: get compiler flags for use with the C preprocessor stage of C++ compilation
-.TP
-\fB\-\-ldflags\fR
-: get compiler flags for use with the linker stage of any compilation
-.TP
-\fB\-\-version\fR
-: returns LHAPDF release version number
-.SH AUTHOR
-This manual page was written by Lifeng Sun <lifongsun(a)gmail.com> for the Debian
system (but may be used by others).
diff --git a/lhapdf-fix-lhapdf-config.patch b/lhapdf-fix-lhapdf-config.patch
deleted file mode 100644
index 09b5ee6..0000000
--- a/lhapdf-fix-lhapdf-config.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fix the package name in lhapdf-config.
-
---- a/bin/lhapdf-config.in
-+++ b/bin/lhapdf-config.in
-@@ -22,7 +22,7 @@
- echo " --cppflags : get compiler flags for use with the C preprocessor
stage of C++ compilation"
- echo " --ldflags : get compiler flags for use with the linker stage of
any compilation"
- echo
-- echo " --version : returns Rivet release version number"
-+ echo " --version : returns LHAPDF release version number"
- fi
-
- OUT=""
diff --git a/lhapdf-fix-test-environment.patch b/lhapdf-fix-test-environment.patch
deleted file mode 100644
index 8287201..0000000
--- a/lhapdf-fix-test-environment.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Fix test environment.
-
---- a/octave/Makefile.am
-+++ b/octave/Makefile.am
-@@ -5,5 +5,5 @@
- lhapdf.oct: wrapoctave.cc
- $(MKOCTFILE) -I$(top_srcdir)/include -v -g -o lhapdf.oct wrapoctave.cc
-L$(top_builddir)/lib -L$(top_builddir)/lib/.libs -lLHAPDF
-
--TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets $(OCTAVE)
-+TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets
LD_LIBRARY_PATH="$(top_builddir)/lib/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}"
$(OCTAVE)
- TESTS = $(srcdir)/lhapdf-octave-example1.m
---- a/octave/Makefile.in
-+++ b/octave/Makefile.in
-@@ -195,7 +195,7 @@
- top_srcdir = @top_srcdir@
- EXTRA_DIST = lhapdf-octave-example1.m wrapoctave.cc
- pkgdata_DATA = lhapdf.oct
--TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets $(OCTAVE)
-+TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets
LD_LIBRARY_PATH="$(top_builddir)/lib/.libs$${LD_LIBRARY_PATH:+:$$LD_LIBRARY_PATH}"
$(OCTAVE)
- TESTS = $(srcdir)/lhapdf-octave-example1.m
- all: all-am
-
---- a/examples/Makefile.am
-+++ b/examples/Makefile.am
-@@ -12,7 +12,7 @@
- lhapdf_example9_SOURCES = Example9.f
- lhapdf_example10_SOURCES = Example10.f
-
--#TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets
-+TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets
- TESTS = lhapdf-example1
- # lhapdf-example2 lhapdf-example3
-
-diff -ur lhapdf-5.8.8.orig/examples/Makefile.in lhapdf-5.8.8/examples/Makefile.in
---- a/examples/Makefile.in
-+++ b/examples/Makefile.in
-@@ -37,6 +37,7 @@
- lhapdf-example8$(EXEEXT) lhapdf-example9$(EXEEXT) \
- lhapdf-example10$(EXEEXT) $(am__EXEEXT_1) $(am__EXEEXT_2)
- TESTS = lhapdf-example1$(EXEEXT) $(am__EXEEXT_3) $(am__EXEEXT_4)
-+TESTS_ENVIRONMENT = LHAPATH=$(top_srcdir)/PDFsets
- @ENABLE_LHAGLUE_TRUE@am__append_1 = lhapdf-example4 lhapdf-example5 lhapdf-example6
- @ENABLE_LHAGLUE_TRUE@am__append_2 = lhapdf-example4
- @ENABLE_CCWRAP_TRUE@am__append_3 = lhapdf-cctest1 lhapdf-cctest2 lhapdf-cctest3
lhapdf-cctest4 lhapdf-cctest5
diff --git a/lhapdf-fix-typo.patch b/lhapdf-fix-typo.patch
deleted file mode 100644
index 71eb447..0000000
--- a/lhapdf-fix-typo.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Fix typo: AVAIABLE->AVAILABLE.
-
---- a/src/wrapevolve.F
-+++ b/src/wrapevolve.F
-@@ -315,7 +315,7 @@
- if(index(setpath,'NNPDF').gt.0) then
- if(nset.gt.1) then
-
if((index(setpath,'1000.').gt.0.and.nnpdf.gt.0).or.(index(setpath,'100.').gt.0.and.nnpdf1000.gt.0))
then
-- print *,'LHAPDF ERROR: MULTISET-INITIALIZATION with NNPDF 1000
sets IS NOT AVAIABLE (AT THE MOMENT)!'
-+ print *,'LHAPDF ERROR: MULTISET-INITIALIZATION with NNPDF 1000
sets IS NOT AVAILABLE (AT THE MOMENT)!'
- STOP
- endif
- endif
diff --git a/lhapdf-getdata.1 b/lhapdf-getdata.1
deleted file mode 100644
index aaec653..0000000
--- a/lhapdf-getdata.1
+++ /dev/null
@@ -1,64 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.39.4.
-.TH LHAPDF-GETDATA "1" "May 2011" "lhapdf-getdata"
"User Commands"
-.SH NAME
-lhapdf-getdata \- Get PDF sets from the LHAPDF repository
-.SH SYNOPSIS
-.B lhapdf-getdata
-[\fI--main\fR] [\fI--all\fR] [\fI--repo=URL\fR] [\fI--dest=DEST\fR] [\fI--dryrun\fR]
-<name|number> [<name|number> ...]
-.SH DESCRIPTION
-.IP
-.PP
-Grab PDF grid and param files from the LHAPDF repository and install
-them into the local LHAPDF data directory.
-.SH OPTIONS
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-show this help message and exit
-.TP
-\fB\-\-repo\fR=\fIURL\fR
-Base URL of online sets repository
-(http://www.hepforge.org/archive/lhapdf/pdfsets/current)
-.TP
-\fB\-\-dest\fR=\fIDEST\fR
-PDF sets directory to install to (/usr/share/lhapdf/PDFsets)
-.TP
-\fB\-\-all\fR
-Get ALL sets (this will be hundreds of megabytes... be
-careful!)
-.TP
-\fB\-\-list\fR
-Just list available files
-.TP
-\fB\-\-force\fR
-Overwrite existing files
-.TP
-\fB\-\-dryrun\fR
-Don't actually do any downloading
-.TP
-\fB\-Q\fR, \fB\-\-quiet\fR
-Suppress normal messages
-.TP
-\fB\-V\fR, \fB\-\-verbose\fR
-Add extra debug messages
-.SH EXAMPLES
-.TP
-Show all available sets:
-lhapdf\-getdata \fB\-\-list\fR
-.TP
-Get all NNPDF PDFs with pattern matching:
-lhapdf\-getdata NNPDF
-.TP
-Get CTEQ6L1, CTEQ66, MRST\-S LO* and LO** PDFs with pattern matching:
-lhapdf\-getdata CTEQ6ll CTEQ66 lomod MCal
-.TP
-Get MSTW2008 68% confidence PDF by full name:
-lhapdf\-getdata MSTW2008lo68cl.LHgrid
-.TP
-See how much downloading would be involved in getting all PDF sets:
-lhapdf\-getdata \fB\-\-all\fR \fB\-\-dryrun\fR
-.TP
-I'm hardcore, give me the whole collection:
-lhapdf\-getdata \fB\-\-all\fR
-.SH AUTHOR
-This manual page was written by Lifeng Sun <lifongsun(a)gmail.com> for the Debian
system (but may be used by others).
diff --git a/lhapdf-lhacontrol.patch b/lhapdf-lhacontrol.patch
deleted file mode 100644
index cc4d0f2..0000000
--- a/lhapdf-lhacontrol.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ur lhapdf-5.9.1.orig/examples/Example6.f lhapdf-5.9.1/examples/Example6.f
---- lhapdf-5.9.1.orig/examples/Example6.f 2008-10-21 13:09:33.000000000 +0200
-+++ lhapdf-5.9.1/examples/Example6.f 2015-03-07 06:15:27.094311950 +0100
-@@ -10,7 +10,8 @@
- data inset/20200,20201,231/
- character*20 lhaparm(20)
- double precision lhavalue(20)
-- common/lhacontrol/lhaparm,lhavalue
-+ character*20 commoninitflag
-+ common/lhacontrol/lhaparm,lhavalue,commoninitflag
- common/W50513/xmin,xmax,q2min,q2max
- !open(7,file='/home/whalley/lhapdf/lhanames')
- parm(1)='DEFAULT'
diff --git a/lhapdf-path-max.patch b/lhapdf-path-max.patch
deleted file mode 100644
index b209dc9..0000000
--- a/lhapdf-path-max.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/src/binreloc.c
-+++ b/src/binreloc.c
-@@ -24,6 +24,10 @@
- #include <string.h>
- #include "binreloc.h"
-
-+#ifndef PATH_MAX
-+#define PATH_MAX 4096
-+#endif
-+
- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
diff --git a/lhapdf-query.1 b/lhapdf-query.1
deleted file mode 100644
index 43a09c5..0000000
--- a/lhapdf-query.1
+++ /dev/null
@@ -1,25 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.39.4.
-.TH LHAPDF-QUERY "1" "May 2011" "lhapdf-query" "User
Commands"
-.SH NAME
-lhapdf-query \- Query PDF values from LHAPDF
-.SH SYNOPSIS
-.B lhapdf-query
-[cmd] [setname|num] [memnum] x Q [flavourID]
-.SH DESCRIPTION
-.PP
-Retrieve PDF values from LHAPDF, given a set name, member number
-and values for x and Q. This will return a list of xf(x,Q2) values
-for each parton; specifying a parton name on the command line will
-return the single appropriate xf(x,Q2) value for that flavour.
-.SH OPTIONS
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show this help message and exit
-.TP
-\fB\-Q\fR, \fB\-\-quiet\fR
-Suppress normal messages
-.TP
-\fB\-V\fR, \fB\-\-verbose\fR
-Add extra debug messages
-.SH AUTHOR
-This manual page was written by Lifeng Sun <lifongsun(a)gmail.com> for the Debian
system (but may be used by others).
diff --git a/lhapdf-soname.patch b/lhapdf-soname.patch
new file mode 100644
index 0000000..2141b66
--- /dev/null
+++ b/lhapdf-soname.patch
@@ -0,0 +1,41 @@
+diff -ur LHAPDF-6.2.1.orig/src/Makefile.am LHAPDF-6.2.1/src/Makefile.am
+--- LHAPDF-6.2.1.orig/src/Makefile.am 2017-08-10 22:08:13.000000000 +0200
++++ LHAPDF-6.2.1/src/Makefile.am 2018-06-21 10:22:17.548034288 +0200
+@@ -22,6 +22,7 @@
+ libLHAPDFPaths_la_CPPFLAGS = $(AM_CPPFLAGS)
-DLHAPDF_INSTALL_PREFIX=\"$(prefix)\"
-DLHAPDF_DATA_PREFIX=\"$(datadir)\"
+
+ libLHAPDF_la_LIBADD = libLHAPDFInfo.la libLHAPDFPaths.la
++libLHAPDF_la_LDFLAGS = -release ${PACKAGE_VERSION}
+
+ if ENABLE_LHAGLUE
+ noinst_LTLIBRARIES += libLHAPDFGlue.la
+diff -ur LHAPDF-6.2.1.orig/src/Makefile.in LHAPDF-6.2.1/src/Makefile.in
+--- LHAPDF-6.2.1.orig/src/Makefile.in 2017-08-11 11:27:33.000000000 +0200
++++ LHAPDF-6.2.1/src/Makefile.in 2018-06-21 10:37:36.956148357 +0200
+@@ -148,6 +148,9 @@
+ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+ am__v_lt_0 = --silent
+ am__v_lt_1 =
++libLHAPDF_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
++ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
++ $(CXXFLAGS) $(libLHAPDF_la_LDFLAGS) $(LDFLAGS) -o $@
+ libLHAPDFGlue_la_LIBADD =
+ am__libLHAPDFGlue_la_SOURCES_DIST = LHAGlue.cc
+ @ENABLE_LHAGLUE_TRUE@am_libLHAPDFGlue_la_OBJECTS = \
+@@ -429,6 +432,7 @@
+ libLHAPDFPaths_la_CPPFLAGS = $(AM_CPPFLAGS)
-DLHAPDF_INSTALL_PREFIX=\"$(prefix)\"
-DLHAPDF_DATA_PREFIX=\"$(datadir)\"
+ libLHAPDF_la_LIBADD = libLHAPDFInfo.la libLHAPDFPaths.la \
+ $(am__append_2)
++libLHAPDF_la_LDFLAGS = -release ${PACKAGE_VERSION}
+ @ENABLE_LHAGLUE_TRUE@libLHAPDFGlue_la_SOURCES = LHAGlue.cc
+ @ENABLE_LHAGLUE_TRUE@libLHAPDFGlue_la_CPPFLAGS = $(AM_CPPFLAGS) -DENABLE_LHAGLUE_CXX
+ all: all-recursive
+@@ -512,7 +516,7 @@
+ }
+
+ libLHAPDF.la: $(libLHAPDF_la_OBJECTS) $(libLHAPDF_la_DEPENDENCIES)
$(EXTRA_libLHAPDF_la_DEPENDENCIES)
+- $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(libLHAPDF_la_OBJECTS) $(libLHAPDF_la_LIBADD)
$(LIBS)
++ $(AM_V_CXXLD)$(libLHAPDF_la_LINK) -rpath $(libdir) $(libLHAPDF_la_OBJECTS)
$(libLHAPDF_la_LIBADD) $(LIBS)
+
+ libLHAPDFGlue.la: $(libLHAPDFGlue_la_OBJECTS) $(libLHAPDFGlue_la_DEPENDENCIES)
$(EXTRA_libLHAPDFGlue_la_DEPENDENCIES)
+ $(AM_V_CXXLD)$(CXXLINK) $(am_libLHAPDFGlue_la_rpath) $(libLHAPDFGlue_la_OBJECTS)
$(libLHAPDFGlue_la_LIBADD) $(LIBS)
diff --git a/lhapdf.spec b/lhapdf.spec
index 75fe735..f599811 100644
--- a/lhapdf.spec
+++ b/lhapdf.spec
@@ -1,59 +1,53 @@
-# Octave is no longer available for EPEL 6 ppc64
-%if %{?rhel}%{!?rhel:0} == 6
-%ifarch ppc64
-%global octave 0
-%else
-%global octave 1
-%endif
-%else
-%global octave 1
-%endif
-
Name: lhapdf
-Version: 5.9.1
-Release: 23%{?dist}
+Version: 6.2.1
+Release: 1%{?dist}
Summary: Les Houches Accord PDF Interface
-License: GPLv2+
-URL:
http://lhapdf.hepforge.org/
-Source0:
http://www.hepforge.org/archive/lhapdf/%{name}-%{version}.tar.gz
-# Minimal set of PDFs (needed to run make check)
-Source1:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/cteq5l.LHgrid
-Source2:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/cteq6ll.LHpdf
-Source3:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/cteq61.LHgrid
-Source4:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/CT10.LHgrid
-Source5:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/GRV98nlo.LHgrid
-Source6:
http://www.hepforge.org/archive/lhapdf/pdfsets/%{version}/MRST2001nlo.LHgrid
-# Man pages (from the Debian package)
-Source7: %{name}-config.1
-Source8: %{name}-getdata.1
-Source9: %{name}-query.1
-# Patches (from the Debian package)
-Patch0: %{name}-fix-lhapdf-config.patch
-Patch1: %{name}-fix-test-environment.patch
-Patch2: %{name}-fix-typo.patch
-Patch3: %{name}-path-max.patch
-Patch4: %{name}-lhacontrol.patch
-
-%if %{octave}
-BuildRequires: octave-devel
-%endif
-BuildRequires: ncurses-devel
+License: GPLv3+
+URL:
https://lhapdf.hepforge.org/
+Source0:
https://www.hepforge.org/archive/lhapdf/LHAPDF-6.2.1.tar.gz
+# Add soname to the shared library, cf. SuSE's spec file.
+Patch0: %{name}-soname.patch
+
+BuildRequires: gcc-c++
+BuildRequires: /usr/bin/cython
BuildRequires: python2-devel
-BuildRequires: gcc-gfortran
-BuildRequires: swig
+%if %{?fedora}%{!?fedora:0} || %{?rhel}%{!?rhel:0} >= 8
+BuildRequires: python3-devel
+%endif
+%if %{?rhel}%{!?rhel:0} == 7
+BuildRequires: python34-devel
+%endif
BuildRequires: doxygen
-BuildRequires: tex(latex)
-BuildRequires: ghostscript
+
+# Obsolete LHAPDF5 packages not provided by LHAPDF6
+Obsoletes: octave-lhapdf < 6
+Obsoletes: lhapdf-pdfsets-minimal < 6
%description
-LHAPDF provides a unified and easy to use interface to modern PDF
-sets. It is designed to work not only with individual PDF sets but
-also with the more recent multiple "error" sets. It can be viewed as
-the successor to PDFLIB, incorporating many of the older sets found in
-the latter, including pion and photon PDFs. In LHAPDF the computer
-code and input parameters/grids are separated thus allowing more easy
-updating and no limit to the expansion possibilities.
+LHAPDF is a general purpose C++ interpolator, used for evaluating PDFs
+from discretized data files. Previous versions of LHAPDF were written
+in Fortran 77/90 and are documented at
http://lhapdf.hepforge.org/lhapdf5/.
+
+LHAPDF6 vastly reduces the memory overhead of the Fortran LHAPDF (from
+gigabytes to megabytes!), entirely removes restrictions on numbers of
+concurrent PDFs, allows access to single PDF members without needing
+to load whole sets, and separates a new standardized PDF data format
+from the code library so that new PDF sets may be created and released
+easier and faster. The C++ LHAPDF6 also permits arbitrary parton
+contents via the standard PDG ID code scheme, is computationally more
+efficient (particularly if only one or two flavors are required at
+each phase space point, as in PDF reweighting), and uses a flexible
+metadata system which fixes many fundamental metadata and concurrency
+bugs in LHAPDF5.
+
+Compatibility routines are provided as standard for existing C++ and
+Fortran codes using the LHAPDF5 and PDFLIB legacy interfaces, so you
+can keep using your existing codes. But the new interface is much more
+powerful and pleasant to work with, so we think you'll want to switch
+once you've used it!
+
+LHAPDF6 is documented in more detail in
http://arxiv.org/abs/1412.7420
%package devel
Summary: Les Houches Accord PDF Interface - development files
@@ -62,178 +56,105 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package provides development files of LHAPDF, including C++ bindings.
-%if %{octave}
-%global octpkg %{name}
-
-%package -n octave-%{name}
-Summary: Les Houches Accord PDF Interface - Octave module
-Requires: %{name}%{?_isa} = %{version}-%{release}
-Requires: octave(api) = %{octave_api}
-Requires(post): octave
-Requires(postun): octave
-
-%description -n octave-%{name}
-This package provides Octave bindings for LHAPDF.
-%endif
-
%package -n python2-%{name}
-Summary: Les Houches Accord PDF Interface - Python module
+Summary: Les Houches Accord PDF Interface - Python 2 module
%{?python_provide:%python_provide python2-%{name}}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description -n python2-%{name}
-This package provides Python bindings for LHAPDF.
+This package provides Python 2 bindings for LHAPDF.
-%package pdfsets-minimal
-Summary: Les Houches Accord PDF Interface - PDF sets
-BuildArch: noarch
-Requires: %{name} = %{version}-%{release}
+This package also provides a script called "lhapdf" which can be used
+to query the catalogue of PDF sets and to install and update them from
+the command line. It accepts commands "list", "update",
"install" and
+"upgrade". Please run "lhapdf help" for full usage instructions.
+
+%package -n python%{python3_pkgversion}-%{name}
+Summary: Les Houches Accord PDF Interface - Python 3 module
+%{?python_provide:%python_provide python%{python3_pkgversion}-%{name}}
+Requires: %{name}%{?_isa} = %{version}-%{release}
-%description pdfsets-minimal
-This package provides a minimal PDF sets required by the test suites.
-Note: the python2-lhapdf package provides the lhapdf-getdata script to
-download other PDF sets.
+%description -n python%{python3_pkgversion}-%{name}
+This package provides Python 3 bindings for LHAPDF.
%package doc
Summary: Les Houches Accord PDF Interface - documentation
BuildArch: noarch
%description doc
-This package provides documentation of C++ bindings for LHAPDF.
+This package provides API documentation and examples for LHAPDF.
%prep
-%setup -q
+%setup -q -n LHAPDF-%{version}
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-mkdir PDFsets
-install -m 644 -p %SOURCE1 PDFsets
-install -m 644 -p %SOURCE2 PDFsets
-install -m 644 -p %SOURCE3 PDFsets
-install -m 644 -p %SOURCE4 PDFsets
-install -m 644 -p %SOURCE5 PDFsets
-install -m 644 -p %SOURCE6 PDFsets
-
-sed 's!/usr/bin/env python!/usr/bin/python2!' -i bin/lhapdf-* examples/*.py
-sed 's!/usr/bin/env bash!/bin/bash!' -i bin/lhapdf-config.in
-# Remove bundled swig generated sources
-rm pyext/lhapdf_wrap.cc
-rm pyext/lhapdf.py
+# Remove cython generated file
+rm wrappers/python/lhapdf.cpp
+
+# Fix python shebangs
+sed 's!/usr/bin/env python!/usr/bin/python2!' -i bin/lhapdf.in examples/*.py
+sed 's!/usr/bin/env bash!/bin/bash!' -i bin/lhapdf-config.in
%build
-%if %{?fedora}%{!?fedora:0} >= 28 || %{?rhel}%{!?rhel:0} >= 8
-# The code fails to compile without -std=legacy with gfortran >= 8
-# Error: Actual argument contains too few elements for dummy argument
-export FFLAGS="%{__global_fflags} -std=legacy"
-%endif
-%if %{octave}
-%configure --disable-static --enable-octave
-%else
-%configure --disable-static --disable-octave
-%endif
+export PYTHON=%{__python2}
+%configure --disable-static --disable-silent-rules
+
+%make_build
-# Reduce overlinking
-sed 's!CC \(.*-shared\) !CC \\\${wl}--as-needed \1 !' -i libtool
+# Python 3 module
+( cd wrappers/python ; %make_build PYTHON=%{__python3} )
-make %{?_smp_mflags}
+# Build doxygen documentation
+%make_build doxy
%install
-make install DESTDIR=%{buildroot}
+%make_install
-mkdir -p %{buildroot}%{_mandir}/man1
-install -m 644 -p %SOURCE7 %{buildroot}%{_mandir}/man1
-install -m 644 -p %SOURCE8 %{buildroot}%{_mandir}/man1
-install -m 644 -p %SOURCE9 %{buildroot}%{_mandir}/man1
+# Python 3 module
+( cd wrappers/python ; %make_install PYTHON=%{__python3} )
rm %{buildroot}%{_libdir}/libLHAPDF.la
-rm %{buildroot}%{_datadir}/%{name}/doc/html
-
-%if %{octave}
-APIDIR=$(octave-config -p CANONICAL_HOST_TYPE)-$(octave-config -p API_VERSION)
-mkdir -p %{buildroot}%{octpkglibdir}/${APIDIR}
-mv %{buildroot}%{_datadir}/%{name}/%{name}.oct \
- %{buildroot}%{octpkglibdir}/${APIDIR}/%{name}.oct
-chmod 755 %{buildroot}%{octpkglibdir}/${APIDIR}/%{name}.oct
-mkdir -p %{buildroot}%{octpkgdir}/packinfo
-install -m 644 -p COPYING %{buildroot}%{octpkgdir}/packinfo/COPYING
-cat << EOF > %{buildroot}%{octpkgdir}/packinfo/DESCRIPTION
-Name: %{name}
-Version: %{version}
-Date: `date -I`
-Author: W Giele <giele(a)fnal.gov>, Mike R Whalley <m.r.whalley(a)durham.ac.uk>
-Maintainer: W Giele <giele(a)fnal.gov>, Mike R Whalley
<m.r.whalley(a)durham.ac.uk>
-Title: Les Houches Accord PDF Interface
-Description: LHAPDF provides a unified and easy to use interface to
- modern PDF sets. It is designed to work not only with individual PDF
- sets but also with the more recent multiple "error" sets. It can be
- viewed as the successor to PDFLIB, incorporating many of the older sets
- found in the latter, including pion and photon PDFs. In LHAPDF the
- computer code and input parameters/grids are separated thus allowing
- more easy updating and no limit to the expansion possibilities.
-EOF
-
-sed '2a pkg load lhapdf' octave/lhapdf-octave-example1.m \
- > lhapdf-octave-example1.m
-%endif
-mkdir -p %{buildroot}%{_datadir}/%{name}/PDFsets
-install -m 644 -p PDFsets/* %{buildroot}%{_datadir}/%{name}/PDFsets
+rm examples/Makefile*
%check
-%ifnarch s390 %{arm}
-GNUTERM=dumb make check
-%endif
+%make_build check
%ldconfig_scriptlets
-%if %{octave}
-%post -n octave-%{name}
-%octave_cmd pkg rebuild
-
-%postun -n octave-%{name}
-%octave_cmd pkg rebuild
-%endif
-
%files
-%{_libdir}/libLHAPDF.so.*
-%doc AUTHORS ChangeLog README TODO
+%{_libdir}/libLHAPDF-%{version}.so
+%{_datadir}/LHAPDF
+%doc AUTHORS ChangeLog
%license COPYING
%files devel
-%{_bindir}/lhapdf-config
-%{_mandir}/man1/lhapdf-config.1*
+%{_bindir}/%{name}-config
%{_includedir}/LHAPDF
%{_libdir}/libLHAPDF.so
-%doc examples/CC*.cc examples/Example*.f
-
-%if %{octave}
-%files -n octave-%{name}
-%{octpkglibdir}
-%{octpkgdir}
-%doc lhapdf-octave-example1.m
-%endif
+%{_libdir}/pkgconfig/%{name}.pc
%files -n python2-%{name}
-%{_bindir}/lhapdf-getdata
-%{_bindir}/lhapdf-query
-%{_mandir}/man1/lhapdf-getdata.1*
-%{_mandir}/man1/lhapdf-query.1*
-%{python_sitearch}/*
-%doc examples/pdf-*.py
-
-%files pdfsets-minimal
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/PDFsets
-%{_datadir}/%{name}/PDFsets.index
+%{_bindir}/%{name}
+%{python2_sitearch}/LHAPDF-*.egg-info
+%{python2_sitearch}/%{name}.so
+
+%files -n python%{python3_pkgversion}-%{name}
+%{python3_sitearch}/LHAPDF-*.egg-info
+%{python3_sitearch}/%{name}.*.so
%files doc
-%doc ccwrap/doxy/html
+%doc doc/doxygen
+%doc examples
%license COPYING
%changelog
+* Wed Jul 04 2018 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 6.2.1-1
+- Update to version 6.2.1
+- Change license tag from GPLv2+ to GPLv3+
+- Add Python 3 bindings
+- Drop packages not provided by LHAPDF6: octave-lhapdf, lhapdf-pdfsets-minimal
+
* Wed Feb 07 2018 Mattias Ellert <mattias.ellert(a)physics.uu.se> - 5.9.1-23
- Compile with -std=legacy when using gfortran >= 8
diff --git a/sources b/sources
index e589fa6..cae8da2 100644
--- a/sources
+++ b/sources
@@ -1,7 +1 @@
-5260c1979355243f6584c16a5f19bfd1 lhapdf-5.9.1.tar.gz
-b592db3245a875f1a2ab5b0be0e06b5b cteq5l.LHgrid
-330dc600f0ee7f9b5fa8051eef732930 cteq6ll.LHpdf
-f85b82894b43df936fa395465ba155c4 cteq61.LHgrid
-49276a39307a609d446722302915b09a CT10.LHgrid
-4b93c4101fa8f162ae744da3b3fce031 GRV98nlo.LHgrid
-a5121e3ab1912a4a72e85889ba5e9234 MRST2001nlo.LHgrid
+SHA512 (LHAPDF-6.2.1.tar.gz) =
158ded21a91eee55e1d1c99e6674a4bf588d976d6379bc417416e4c7840ed83f0b93abe68d2999a7a054a9f1e93d5f7a4c0a43ef496e113e6a8f9c6992deb41b