[plplot] - conditionalize Ada and Ocaml support

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


commit 78419d9856b9582fd60bf5a11fb59a49547ac7f6
Author: Dan Horák <dan at danny.cz>
Date:   Mon Sep 6 21:23:12 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 183d473..f10037b 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:        6%{?dist}
+Release:        7%{?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
@@ -511,7 +530,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/
@@ -524,6 +545,7 @@ fi
 %{_mandir}/man3/pl*.3*
 
 
+%if %{with ada}
 %files ada
 %defattr(-,root,root,-)
 %{_libdir}/libplplotadad.so.*
@@ -540,6 +562,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,-)
@@ -573,7 +596,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/
@@ -671,6 +694,9 @@ fi
 
 
 %changelog
+* Mon Sep 6 2010 Dan Horák <dan at danny.cz> - 5.9.6-7
+- conditionalize Ada and Ocaml support
+
 * Fri Jul 30 2010 Orion Poplawski <orion at cora.nwra.com> - 5.9.6-6
 - Add licenses to libs sub-package
 


More information about the scm-commits mailing list