SHA256
1
0
forked from pool/apfel
Dominique Leuenberger 2022-01-24 22:10:26 +00:00 committed by Git OBS Bridge
commit 19c26a9e32
5 changed files with 47 additions and 71 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72fce224bf9a47b7a5da778d691fe7cb8715bd40662bdcf0f91197d4cf49d2f8
size 8381558

3
apfel-3.0.6.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7063c9eee457e030b97926ac166cdaedd84625b31397e1dfd01ae47371fb9f61
size 8388625

View File

@ -1,42 +0,0 @@
Index: apfel-3.0.4/configure.ac
===================================================================
--- apfel-3.0.4.orig/configure.ac
+++ apfel-3.0.4/configure.ac
@@ -87,7 +87,6 @@ AC_ARG_ENABLE(pywrap, [AC_HELP_STRING(--
[don't build Python module (default=build)])],
[], [enable_pywrap=yes])
-enable_pywrap=yes
AZ_PYTHON_DEFAULT
## Basic Python checks
if test x$enable_pywrap == xyes; then
Index: apfel-3.0.4/Makefile.am
===================================================================
--- apfel-3.0.4.orig/Makefile.am
+++ apfel-3.0.4/Makefile.am
@@ -1,6 +1,9 @@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = include ccwrap src lib examples pywrap doc bin
+SUBDIRS = include ccwrap src lib examples doc bin
+if ENABLE_PYWRAP
+ SUBDIRS+=pywrap
+endif
dist_doc_DATA = README
dist_pkgdata_DATA = src/HELL/data/*
Index: apfel-3.0.4/bin/Makefile.am
===================================================================
--- apfel-3.0.4.orig/bin/Makefile.am
+++ apfel-3.0.4/bin/Makefile.am
@@ -1,2 +1,7 @@
-EXTRA_DIST = apfel-config.in apfel.in
-bin_SCRIPTS = apfel-config apfel ../examples/.libs/ListFunctions ../examples/.libs/CheckAPFEL
\ No newline at end of file
+EXTRA_DIST = apfel-config.in
+bin_SCRIPTS = apfel-config ../examples/.libs/ListFunctions ../examples/.libs/CheckAPFEL
+
+if ENABLE_PYWRAP
+EXTRA_DIST+=apfel.in
+bin_SCRIPTS+=apfel
+endif

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Jan 20 00:19:05 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 3.0.6:
* Merging vbertone fork.
- Drop apfel-allow-disabling-pywrap.patch: With py3 supported,
this is no longer required.
- Enable python bindings: apfel now python3 compliant.
- Enable multiple python flavours; Requires(post) and
Requires(postun) for update-alternatives.
-------------------------------------------------------------------
Tue Jun 8 22:56:27 UTC 2021 - Atri Bhattacharya <badshah400@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package apfel
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,37 +16,25 @@
#
# PYTHON BINDINGS INCOMPATIBLE WITH PYTHON3
%if 0%{?suse_version} >= 1550
%bcond_with pywrap
%else
%bcond_without pywrap
%endif
%define skip_python3 1
%define soname libAPFEL0
Name: apfel
Version: 3.0.5
Version: 3.0.6
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-allow-disabling-pywrap.patch badshah400@gmail.com -- Allow building with python extension disabled, for example due to lack of python2 support in the system
Patch0: apfel-allow-disabling-pywrap.patch
BuildRequires: %{python_module LHAPDF}
BuildRequires: %{python_module devel}
BuildRequires: LHAPDF-devel
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: libboost_headers-devel
BuildRequires: libtool
BuildRequires: python-rpm-macros
%if %{with pywrap}
BuildRequires: %{python_module LHAPDF}
BuildRequires: %{python_module devel}
%endif
Requires: python-LHAPDF
Requires(post): update-alternatives
Requires(postun):update-alternatives
%python_subpackages
@ -91,14 +79,25 @@ library.
%autosetup -p1
%build
autoreconf -fvi
%{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 \
%{!?with_pywrap:--disable-pywrap}
make %{?_smp_mflags}
--disable-static
%make_build
popd
}
%install
%{python_expand # all python flavors as configured above
export PYTHON=%{_bindir}/$python
pushd ../{$python}_build
%make_install
%python_clone -a %{buildroot}%{_bindir}/apfel
popd
}
# REMOVE libtool ARCHIVES
find %{buildroot} -type f -name "*.la" -delete -print
@ -113,6 +112,12 @@ rm -fr %{buildroot}%{_datadir}/apfel/README
%post -n %{soname} -p /sbin/ldconfig
%postun -n %{soname} -p /sbin/ldconfig
%post
%python_install_alternative apfel
%postun
%python_uninstall_alternative apfel
%files -n %{soname}
%{_libdir}/*.so.*
@ -125,11 +130,13 @@ rm -fr %{buildroot}%{_datadir}/apfel/README
%{_bindir}/ListFunctions
%{_libdir}/*.so
%if %{with pywrap}
%files %{python_files}
%{_bindir}/apfel
%{python_sitearch}/*
%endif
%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
%files -n %{name}-doc
%doc doc/pdfs/manual.pdf