forked from pool/apfel
Accepting request 798705 from home:badshah400:branches:science
- Add apfel-allow-disabling-pywrap.patch to support building without building the python extensions and binaries; build python bindings and python-based binaries only for distributions supporting python2 since apfel does not support python3. - Add libtool BuildRequires and run autoreconf since patch touches build files. OBS-URL: https://build.opensuse.org/request/show/798705 OBS-URL: https://build.opensuse.org/package/show/science/apfel?expand=0&rev=31
This commit is contained in:
parent
586511d96e
commit
c75f813a8b
42
apfel-allow-disabling-pywrap.patch
Normal file
42
apfel-allow-disabling-pywrap.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
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
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 28 09:50:35 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
- Add apfel-allow-disabling-pywrap.patch to support building
|
||||||
|
without building the python extensions and binaries; build
|
||||||
|
python bindings and python-based binaries only for distributions
|
||||||
|
supporting python2 since apfel does not support python3.
|
||||||
|
- Add libtool BuildRequires and run autoreconf since patch touches
|
||||||
|
build files.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 25 09:36:25 UTC 2019 - Atri Bhattacharya <badshah400@gmail.com>
|
Tue Jun 25 09:36:25 UTC 2019 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
71
apfel.spec
71
apfel.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package apfel
|
# spec file for package apfel
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,8 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# 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
|
%define soname libAPFEL0
|
||||||
%define pypackage python-%{name}
|
|
||||||
Name: apfel
|
Name: apfel
|
||||||
Version: 3.0.4
|
Version: 3.0.4
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -26,15 +34,21 @@ License: GPL-3.0-or-later
|
|||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
URL: http://apfel.hepforge.org/
|
URL: http://apfel.hepforge.org/
|
||||||
Source: https://github.com/scarrazza/%{name}/archive/%{version}.tar.gz
|
Source: https://github.com/scarrazza/%{name}/archive/%{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: LHAPDF-devel
|
BuildRequires: LHAPDF-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: gcc-fortran
|
BuildRequires: gcc-fortran
|
||||||
BuildRequires: python-devel
|
|
||||||
%if 0%{?suse_version} > 1320
|
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
%else
|
BuildRequires: libtool
|
||||||
BuildRequires: boost-devel
|
BuildRequires: python-rpm-macros
|
||||||
|
%if %{with pywrap}
|
||||||
|
BuildRequires: %{python_module LHAPDF}
|
||||||
|
BuildRequires: %{python_module devel}
|
||||||
%endif
|
%endif
|
||||||
|
Requires: python-LHAPDF
|
||||||
|
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
APFEL is a library to perform the combined QCD+QED DGLAP
|
APFEL is a library to perform the combined QCD+QED DGLAP
|
||||||
@ -50,44 +64,37 @@ evolution of parton distributions.
|
|||||||
|
|
||||||
This package provides the shared libraries for %{name}.
|
This package provides the shared libraries for %{name}.
|
||||||
|
|
||||||
%package devel
|
%package -n %{name}-devel
|
||||||
Summary: Development files for Apfel, a PDF Evolution Library
|
Summary: Development files for Apfel, a PDF Evolution Library
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{soname} = %{version}
|
Requires: %{soname} = %{version}
|
||||||
Requires: LHAPDF-devel
|
Requires: LHAPDF-devel
|
||||||
Recommends: %{name}-doc = %{version}
|
Recommends: %{name}-doc = %{version}
|
||||||
|
|
||||||
%description devel
|
%description -n %{name}-devel
|
||||||
APFEL is a library to perform the combined QCD+QED DGLAP
|
APFEL is a library to perform the combined QCD+QED DGLAP
|
||||||
evolution of parton distributions.
|
evolution of parton distributions.
|
||||||
|
|
||||||
This package provides the source files required to develop
|
This package provides the source files required to develop
|
||||||
applications with %{name}.
|
applications with %{name}.
|
||||||
|
|
||||||
%package -n %{pypackage}
|
%package -n %{name}-doc
|
||||||
Summary: A PDF Evolution Library
|
|
||||||
Group: Development/Languages/Python
|
|
||||||
|
|
||||||
%description -n %{pypackage}
|
|
||||||
APFEL is a library to perform the combined QCD+QED DGLAP
|
|
||||||
evolution of parton distributions.
|
|
||||||
|
|
||||||
This package provides the shared libraries for %{name}.
|
|
||||||
|
|
||||||
%package doc
|
|
||||||
Summary: Documentation for APFEL, a PDF evolution library
|
Summary: Documentation for APFEL, a PDF evolution library
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
|
|
||||||
%description doc
|
%description -n %{name}-doc
|
||||||
This package provides documentation for APFEL in PDF (Portable
|
This package provides documentation for APFEL in PDF (Portable
|
||||||
Document Format), a PDF (Probability Distribution Function) evolution
|
Document Format), a PDF (Probability Distribution Function) evolution
|
||||||
library.
|
library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static
|
autoreconf -fvi
|
||||||
|
%configure \
|
||||||
|
--disable-static \
|
||||||
|
%{!?with_pywrap:--disable-pywrap}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
@ -99,9 +106,9 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
# FIX env BASED SCRIPT INTERPRETER
|
# 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*/usr/bin/env bash|#\!/bin/bash|}" %{buildroot}%{_bindir}/apfel-config
|
||||||
|
|
||||||
# REMOVE README FROM NON-STD LOCATIONS, INSTALL IT USING %%doc INSTEAD
|
# REMOVE INSTALLED README, INSTALL IT USING %%doc INSTEAD
|
||||||
|
rm -fr %{buildroot}%{_datadir}/doc/apfel/README
|
||||||
rm -fr %{buildroot}%{_datadir}/apfel/README
|
rm -fr %{buildroot}%{_datadir}/apfel/README
|
||||||
rm -fr %{buildroot}%{_datadir}/doc/apfel
|
|
||||||
|
|
||||||
%post -n %{soname} -p /sbin/ldconfig
|
%post -n %{soname} -p /sbin/ldconfig
|
||||||
%postun -n %{soname} -p /sbin/ldconfig
|
%postun -n %{soname} -p /sbin/ldconfig
|
||||||
@ -109,7 +116,7 @@ rm -fr %{buildroot}%{_datadir}/doc/apfel
|
|||||||
%files -n %{soname}
|
%files -n %{soname}
|
||||||
%{_libdir}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
|
|
||||||
%files devel
|
%files -n %{name}-devel
|
||||||
%{_includedir}/APFEL/
|
%{_includedir}/APFEL/
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc AUTHORS ChangeLog NEWS README
|
%doc AUTHORS ChangeLog NEWS README
|
||||||
@ -118,15 +125,13 @@ rm -fr %{buildroot}%{_datadir}/doc/apfel
|
|||||||
%{_bindir}/ListFunctions
|
%{_bindir}/ListFunctions
|
||||||
%{_libdir}/*.so
|
%{_libdir}/*.so
|
||||||
|
|
||||||
%files -n %{pypackage}
|
%if %{with pywrap}
|
||||||
%{_bindir}/%{name}
|
%files %{python_files}
|
||||||
%{python_sitearch}/%{name}.py
|
%{_bindir}/apfel
|
||||||
# COMPILED OBJECT FILE CONTAINS BUILDROOT
|
%{python_sitearch}/*
|
||||||
%exclude %{python_sitearch}/%{name}.pyc
|
%endif
|
||||||
%{python_sitearch}/_%{name}.so
|
|
||||||
%{python_sitearch}/APFEL-*py%{py_ver}.egg-info
|
|
||||||
|
|
||||||
%files doc
|
%files -n %{name}-doc
|
||||||
%doc doc/pdfs/manual.pdf
|
%doc doc/pdfs/manual.pdf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user