[plplot/f14/master] - conditionalize Ada and Ocaml support

Dan Horák sharkcz at fedoraproject.org
Mon Sep 6 19:27:28 UTC 2010


commit 73b93ef78d5d42162b5ea5a8d39f8508b3b99c65
Author: Dan Horák <dan at danny.cz>
Date:   Mon Sep 6 21:27:29 2010 +0200

    - conditionalize Ada and Ocaml support

 plplot.spec |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)
---
diff --git a/plplot.spec b/plplot.spec
index 2425f6a..6ab9f18 100644
--- a/plplot.spec
+++ b/plplot.spec
@@ -8,9 +8,23 @@
 # bootstrap or for soname bumps in a plplot dependency
 %bcond_without pdl
 
+# conditionalize Ada support
+%ifarch %{sparc} s390 s390x
+%bcond_with ada
+%else
+%bcond_without ada
+%endif
+
+# conditionalize Ocaml support
+%ifarch sparc64 s390 s390x
+%bcond_with ocaml
+%else
+%bcond_without ocaml
+%endif
+
 Name:           plplot
 Version:        5.9.6
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Library of functions for making scientific plots
 
 Group:          Applications/Engineering
@@ -23,7 +37,10 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  cmake, libtool-ltdl-devel, swig
 BuildRequires:  gcc-gfortran
+%if %{with ada}
 BuildRequires:  gcc-gnat
+BuildRequires:  lapack-devel
+%endif
 %if %{with octave}
 BuildRequires:  octave-devel
 %define build_octave %{nil}
@@ -39,8 +56,6 @@ BuildRequires:  python-devel, pygtk2-devel, numpy
 BuildRequires:  libgnomeui-devel, libgnomeprintui22-devel, gnome-python2-devel
 BuildRequires:  gnome-python2-canvas, gnome-python2-gnome
 BuildRequires:  perl(XML::DOM), lasi-devel, wxGTK-devel, agg-devel
-#For ada
-BuildRequires:  lapack-devel
 BuildRequires:  gnu-free-mono-fonts
 BuildRequires:  gnu-free-sans-fonts
 BuildRequires:  gnu-free-serif-fonts
@@ -50,7 +65,7 @@ BuildRequires:  perl(PDL::Graphics::PLplot)
 %if %{with doc}
 BuildRequires:  texlive, texinfo, openjade, jadetex, docbook2X, docbook-style-dsssl
 %endif
-%ifnarch sparc64 s390 s390x
+%if %{with ocaml}
 BuildRequires:  ocaml
 BuildRequires:  ocaml-cairo-devel
 BuildRequires:  ocaml-camlidl-devel
@@ -120,6 +135,7 @@ Requires:       qhull-devel, freetype-devel, libtool-ltdl-devel
 %{summary}.
 
 
+%if %{with ada}
 %package        ada
 Summary:        Functions for scientific plotting with Ada
 Group:          Development/Libraries
@@ -139,6 +155,7 @@ Requires:       gcc-gnat
 
 %description    ada-devel
 %{summary}.
+%endif
 
 
 %package        fortran-devel
@@ -183,7 +200,7 @@ Requires:       lua
 %{summary}.
 
 
-%ifnarch sparc64 s390 s390x
+%if %{with ocaml}
 %package        ocaml
 Summary:        Functions for scientific plotting with OCaml
 Group:          Development/Libraries
@@ -412,8 +429,10 @@ fi
 %post   libs -p /sbin/ldconfig
 %postun libs -p /sbin/ldconfig
 
+%if %{with ada}
 %post   ada -p /sbin/ldconfig
 %postun ada -p /sbin/ldconfig
+%endif
 
 %if %{with octave}
 %post   octave -p /sbin/ldconfig
@@ -510,7 +529,9 @@ fi
 %{_datadir}/plplot%{version}/examples/cmake/modules/export_plplot-noconfig.cmake
 %{_datadir}/plplot%{version}/examples/cmake/modules/export_plplot.cmake
 %{_datadir}/plplot%{version}/examples/cmake/modules/language_support.cmake
+%if %{with ada}
 %{_datadir}/plplot%{version}/examples/cmake/modules/language_support/
+%endif
 %{_datadir}/plplot%{version}/examples/cmake/modules/pkg-config.cmake
 %{_datadir}/plplot%{version}/examples/cmake/modules/plplot_configure.cmake
 %{_datadir}/plplot%{version}/examples/c/
@@ -523,6 +544,7 @@ fi
 %{_mandir}/man3/pl*.3*
 
 
+%if %{with ada}
 %files ada
 %defattr(-,root,root,-)
 %{_libdir}/libplplotadad.so.*
@@ -539,6 +561,7 @@ fi
 #%{_datadir}/ada/adainclude/plplotadad/
 %{_datadir}/plplot%{version}/examples/ada/
 %{_datadir}/plplot%{version}/examples/test_ada.sh
+%endif
 
 %files fortran-devel
 %defattr(-,root,root,-)
@@ -572,7 +595,7 @@ fi
 %{_datadir}/plplot%{version}/examples/lua/
 %{_datadir}/plplot%{version}/examples/test_lua.sh
 
-%ifnarch sparc64 s390 s390x
+%if %{with ocaml}
 %files ocaml
 %defattr(-,root,root,-)
 %dir %{_libdir}/ocaml/plcairo/
@@ -670,6 +693,9 @@ fi
 
 
 %changelog
+* Mon Sep 6 2010 Dan Horák <dan at danny.cz> - 5.9.6-6
+- conditionalize Ada and Ocaml support
+
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 5.9.6-5
 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
 


More information about the scm-commits mailing list