forked from pool/apfel
Accepting request 1129819 from science
- Update to version 3.1.0: - Add apfel-fix-project-version.patch -- Use the correct version in defining project in CMakeLists.txt - Add apfel-dont-set-default-reltype.patch -- Don't assume 'RELEASE' as the release type, this should be set at the cmake command line. - Build static lib and install it as part of a -devel-static package; upstream cmake does not allow disabling static libs and it ends up everywhere in the cmake files, so cannot just ignore it either. - Use cmake for build in keeping with upstream; BuildRequires: cmake >= 3.15. - Add BuildRequires: swig needed to generate python wrappings. OBS-URL: https://build.opensuse.org/request/show/1129819 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apfel?expand=0&rev=15
This commit is contained in:
commit
4fd41341f7
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61
|
||||
size 8388625
|
3
apfel-3.1.0.tar.gz
Normal file
3
apfel-3.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0a7e693536de6a9a84504c221a77cd8154fd939c3332d21dfce74432d468f4fd
|
||||
size 8059076
|
20
apfel-dont-set-default-reltype.patch
Normal file
20
apfel-dont-set-default-reltype.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Index: apfel-3.1.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- apfel-3.1.0.orig/CMakeLists.txt
|
||||
+++ apfel-3.1.0/CMakeLists.txt
|
||||
@@ -13,7 +13,6 @@ set(PROJECT_VERSION 3.1.0)
|
||||
SET(APFEL_VERSION_MAJOR 3)
|
||||
SET(APFEL_VERSION_MINOR 1)
|
||||
SET(APFEL_VERSION_PATCH 0)
|
||||
-set(CMAKE_VERBOSE_MAKEFILE OFF)
|
||||
include("GNUInstallDirs")
|
||||
|
||||
option(APFEL_ENABLE_PYTHON "Enables building of python bindings" ON)
|
||||
@@ -21,7 +20,6 @@ option(APFEL_ENABLE_TESTS "Enables
|
||||
option(APFEL_ENABLE_LHAPDF "Enables LHAPDF" ON)
|
||||
option(APFEL_DOWNLOAD_PDFS "Download LHAPDF sets" ON)
|
||||
|
||||
-set(CMAKE_BUILD_TYPE Release)
|
||||
# Flags for GNU compilers ==============================================
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wall>")
|
||||
add_compile_options("$<$<COMPILE_LANG_AND_ID:CXX,GNU>:-Wextra>")
|
20
apfel-fix-project-version.patch
Normal file
20
apfel-fix-project-version.patch
Normal file
@ -0,0 +1,20 @@
|
||||
Index: apfel-3.1.0/CMakeLists.txt
|
||||
===================================================================
|
||||
--- apfel-3.1.0.orig/CMakeLists.txt
|
||||
+++ apfel-3.1.0/CMakeLists.txt
|
||||
@@ -8,11 +8,11 @@ cmake_policy(SET CMP0078 OLD)
|
||||
|
||||
# define project name, version and its languages
|
||||
project(apfel LANGUAGES C CXX Fortran)
|
||||
-set(apfel_VERSION 3.0.7)
|
||||
-set(PROJECT_VERSION 3.0.7)
|
||||
+set(apfel_VERSION 3.1.0)
|
||||
+set(PROJECT_VERSION 3.1.0)
|
||||
SET(APFEL_VERSION_MAJOR 3)
|
||||
-SET(APFEL_VERSION_MINOR 0)
|
||||
-SET(APFEL_VERSION_PATCH 7)
|
||||
+SET(APFEL_VERSION_MINOR 1)
|
||||
+SET(APFEL_VERSION_PATCH 0)
|
||||
set(CMAKE_VERBOSE_MAKEFILE OFF)
|
||||
include("GNUInstallDirs")
|
||||
|
@ -1,3 +1,32 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 22 08:12:23 UTC 2023 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
- Update to version 3.1.0:
|
||||
* F2C_CCE and F2C_CCP (gh#scarazza/apfel#41).
|
||||
* Make the --disable-pywrap option work (gh#scarazza/apfel#43).
|
||||
* Some changes to cmake build system to simplify the flags
|
||||
treatment and the python installation (gh#scarazza/apfel#42).
|
||||
* Actually functioning cmake (gh#scarazza/apfel#44).
|
||||
* cmake fixes and CI with cmake (gh#scarazza/apfel#46).
|
||||
* Update README (gh#scarazza/apfel#47).
|
||||
* Remove Circle CI (gh#scarazza/apfel#48).
|
||||
* Drop CircleCI badge (gh#scarazza/apfel#51).
|
||||
* Remove autotool builds (gh#scarazza/apfel#49).
|
||||
* Update README removing autotools instructions
|
||||
(gh#scarazza/apfel#52).
|
||||
- Add apfel-fix-project-version.patch -- Use the correct version
|
||||
in defining project in CMakeLists.txt
|
||||
- Add apfel-dont-set-default-reltype.patch -- Don't assume
|
||||
'RELEASE' as the release type, this should be set at the cmake
|
||||
command line.
|
||||
- Build static lib and install it as part of a -devel-static
|
||||
package; upstream cmake does not allow disabling static libs and
|
||||
it ends up everywhere in the cmake files, so cannot just ignore
|
||||
it either.
|
||||
- Use cmake for build in keeping with upstream; BuildRequires:
|
||||
cmake >= 3.15.
|
||||
- Add BuildRequires: swig needed to generate python wrappings.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 20 00:19:05 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||
|
||||
|
73
apfel.spec
73
apfel.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package apfel
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,26 +16,35 @@
|
||||
#
|
||||
|
||||
|
||||
%define soname libAPFEL0
|
||||
%define soname libAPFEL0_0_0
|
||||
# Need -ffat-lto-objects for the static lib
|
||||
%define _lto_cflags -flto=auto -ffat-lto-objects
|
||||
Name: apfel
|
||||
Version: 3.0.6
|
||||
Version: 3.1.0
|
||||
Release: 0
|
||||
Summary: A Probability Distribution Function Evolution Library
|
||||
License: GPL-3.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
URL: http://apfel.hepforge.org/
|
||||
Source: https://github.com/scarrazza/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM apfel-fix-project-version.patch badshah400@gmail.com -- Use the correct version in defining project in CMakeLists.txt
|
||||
Patch0: apfel-fix-project-version.patch
|
||||
# PATCH-FIX-UPSTREAM apfel-dont-set-default-reltype.patch badshah400@gmail.com -- Don't assume 'RELEASE' as the release type, this should be set by user
|
||||
Patch1: apfel-dont-set-default-reltype.patch
|
||||
BuildRequires: %{python_module LHAPDF}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: LHAPDF-devel
|
||||
BuildRequires: cmake >= 3.15
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gcc-fortran
|
||||
BuildRequires: libboost_headers-devel
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: swig
|
||||
Requires: python-LHAPDF
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -45,6 +54,8 @@ evolution of parton distributions.
|
||||
%package -n %{soname}
|
||||
Summary: A Probability Distribution Function Evolution Library
|
||||
Group: System/Libraries
|
||||
# Problem with older naming scheme
|
||||
Conflicts: libAPFEL0 <= 3.0.6
|
||||
|
||||
%description -n %{soname}
|
||||
APFEL is a library to perform the combined QCD+QED DGLAP
|
||||
@ -54,7 +65,6 @@ This package provides the shared libraries for %{name}.
|
||||
|
||||
%package -n %{name}-devel
|
||||
Summary: Development files for Apfel, a PDF Evolution Library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{soname} = %{version}
|
||||
Requires: LHAPDF-devel
|
||||
Recommends: %{name}-doc = %{version}
|
||||
@ -66,9 +76,20 @@ evolution of parton distributions.
|
||||
This package provides the source files required to develop
|
||||
applications with %{name}.
|
||||
|
||||
%package -n %{name}-devel-static
|
||||
# We need to build and install the static lib as there is no way to
|
||||
# disable it during configuration stage and it pollutes the cmake files
|
||||
Summary: Static development files for Apfel, a PDF Evolution library
|
||||
|
||||
%description -n %{name}-devel-static
|
||||
APFEL is a library to perform the combined QCD+QED DGLAP
|
||||
evolution of parton distributions.
|
||||
|
||||
This package provides the static library required to develop
|
||||
applications with %{name}.
|
||||
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation for APFEL, a PDF evolution library
|
||||
Group: Documentation/Other
|
||||
|
||||
%description -n %{name}-doc
|
||||
This package provides documentation for APFEL in PDF (Portable
|
||||
@ -79,22 +100,24 @@ library.
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%{python_expand # Necessary to run configure with all python flavors
|
||||
%{python_expand # Necessary to run configure with all $python flavors
|
||||
export PYTHON=%{_bindir}/$python
|
||||
mkdir ../{$python}_build
|
||||
cp -pr ./ ../{$python}_build
|
||||
pushd ../{$python}_build
|
||||
%configure \
|
||||
--disable-static
|
||||
%make_build
|
||||
mkdir ../$python
|
||||
cp -pr ./ ../$python
|
||||
pushd ../$python
|
||||
%cmake \
|
||||
-DCMAKE_RELEASE_TYPE="RelwithDebInfo" \
|
||||
-DPython_EXECUTABLE:PATH=${PYTHON} \
|
||||
-DAPFEL_DOWNLOAD_PDFS:BOOL=OFF
|
||||
%cmake_build
|
||||
popd
|
||||
}
|
||||
|
||||
%install
|
||||
%{python_expand # all python flavors as configured above
|
||||
%{python_expand # all $python flavors as configured above
|
||||
export PYTHON=%{_bindir}/$python
|
||||
pushd ../{$python}_build
|
||||
%make_install
|
||||
pushd ../$python
|
||||
%cmake_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/apfel
|
||||
popd
|
||||
}
|
||||
@ -103,7 +126,7 @@ popd
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
# FIX env BASED SCRIPT INTERPRETER
|
||||
sed -Ei "1{s|#\!\s*/usr/bin/env bash|#\!/bin/bash|}" %{buildroot}%{_bindir}/apfel-config
|
||||
sed -Ei "1{s|#\!\s*%{_bindir}/env bash|#\!/bin/bash|}" %{buildroot}%{_bindir}/apfel-config
|
||||
|
||||
# REMOVE INSTALLED README, INSTALL IT USING %%doc INSTEAD
|
||||
rm -fr %{buildroot}%{_datadir}/doc/apfel/README
|
||||
@ -122,21 +145,21 @@ rm -fr %{buildroot}%{_datadir}/apfel/README
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%files -n %{name}-devel
|
||||
%{_includedir}/APFEL/
|
||||
%license COPYING
|
||||
%doc AUTHORS ChangeLog NEWS README
|
||||
%{_bindir}/CheckAPFEL
|
||||
%{_bindir}/%{name}-config
|
||||
%{_bindir}/ListFunctions
|
||||
%{_includedir}/APFEL/
|
||||
%{_libdir}/*.so
|
||||
|
||||
%files -n %{name}-devel-static
|
||||
%license COPYING
|
||||
%{_libdir}/*.a
|
||||
%{_datadir}/APFEL/
|
||||
|
||||
%files %{python_files}
|
||||
%python_alternative %{_bindir}/apfel
|
||||
%{python_sitearch}/apfel.py
|
||||
%{python_sitearch}/*.so
|
||||
%pycache_only %{python_sitearch}/__pycache__/*.pyc
|
||||
%python2_only %{python_sitearch}/*.pyc
|
||||
%{python_sitearch}/APFEL-%{version}-py%{python_version}.egg-info
|
||||
%{python_sitearch}/apfel/
|
||||
%{python_sitearch}/apfel-%{version}-py%{python_version}.egg-info
|
||||
|
||||
%files -n %{name}-doc
|
||||
%doc doc/pdfs/manual.pdf
|
||||
|
Loading…
Reference in New Issue
Block a user