]> git.pld-linux.org Git - packages/plplot.git/commitdiff
- added adadirs patch, build ada binding auto/th/plplot-5_9_9-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 8 Dec 2011 15:17:03 +0000 (15:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    plplot-adadirs.patch -> 1.1
    plplot.spec -> 1.61

plplot-adadirs.patch [new file with mode: 0644]
plplot.spec

diff --git a/plplot-adadirs.patch b/plplot-adadirs.patch
new file mode 100644 (file)
index 0000000..ddc685b
--- /dev/null
@@ -0,0 +1,18 @@
+--- plplot-5.9.9/cmake/modules/instdirs.cmake.orig     2011-10-13 02:43:01.000000000 +0200
++++ plplot-5.9.9/cmake/modules/instdirs.cmake  2011-12-07 21:03:03.074770218 +0100
+@@ -94,11 +94,13 @@
+ # Ada source files (*.adb, *.ads) (following recommendations in
+ # http://www.ada-france.org/debian/debian-ada-policy.html
+-set(ADA_INCLUDE_DIR ${CMAKE_INSTALL_DATADIR}/ada/adainclude/plplotada${LIB_TAG})
++set(ADA_INCLUDE_PATH ${CMAKE_INSTALL_DATADIR}/ada/adainclude CACHE PATH "Ada include path")
++set(ADA_INCLUDE_DIR ${ADA_INCLUDE_PATH}/plplotada${LIB_TAG})
+ # Ada library information files (*.ali) (following recommendations in
+ # http://www.ada-france.org/debian/debian-ada-policy.html
+-set(ADA_LIB_DIR ${CMAKE_INSTALL_LIBDIR}/ada/adalib/plplotada${LIB_TAG})
++set(ADA_LIB_PATH ${CMAKE_INSTALL_LIBDIR}/ada/adalib CACHE PATH "Ada library path")
++set(ADA_LIB_DIR ${ADA_LIB_PATH}/plplotada${LIB_TAG})
+ # Drivers.
+ set(DRV_DIR ${CMAKE_INSTALL_LIBDIR}/${PACKAGE}${VERSION}/drivers${LIB_TAG})
index a6adca160184cd94fceebe766c6d4bb611b726d5..0e10f74cb33e9264fce74b02fd8f6be80475a856 100644 (file)
@@ -1,16 +1,17 @@
 # TODO:
 # - perl_pdl - why disabled?
-# - bindings: ada, d, gnome2, tk-x-plat?
+# - bindings: d, gnome2, tk-x-plat?
 # NOTES:
 # aqt driver is Darwin-only
 # wingcc driver is Windows-only
 # gd driver is not maintained
-# dg300,gcw,gnome,hpgl,impress,linuxvga,ljii,ljiip,pbm,tek are retired
-# pstex deprecated in favour of psttf and pscairo
+# dg300,gcw,gnome,hpgl,impress,linuxvga,ljii,ljiip,pbm,tek drivers are retired
+# pstex driver deprecated in favour of psttf and pscairo
 #
 # Conditional build:
 %bcond_without gnome2          # GNOME 2 and pygtk bindings
 %bcond_with    perl_pdl        # enable perl examples in tests
+%bcond_without ada             # Ada binding
 %bcond_without java            # Java binding
 %bcond_without itcl            # [incr Tcl]/[incr Tk] support in Tcl/Tk binding
 %bcond_without lua             # Lua binding
@@ -30,6 +31,7 @@ Patch1:               %{name}-qhull.patch
 Patch2:                %{name}-link.patch
 Patch3:                %{name}-cmake.patch
 Patch4:                %{name}-nofonts.patch
+Patch5:                %{name}-adadirs.patch
 URL:           http://plplot.sourceforge.net/
 BuildRequires: QtGui-devel
 BuildRequires: QtSvg-devel
@@ -40,6 +42,7 @@ BuildRequires:        docbook-style-dsssl
 BuildRequires: fftw3-devel
 BuildRequires: fftw3-single-devel
 BuildRequires: freetype-devel >= 2.1.0
+%{?with_ada:BuildRequires:     gcc-ada >= 5:4.1}
 BuildRequires: gcc-c++
 BuildRequires: gcc-fortran
 %{?with_itcl:BuildRequires:    itcl-devel >= 3.4.1}
@@ -97,6 +100,10 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                octave_oct_sitedir      %(octave-config --oct-site-dir)
 %define                octave_m_sitedir        %(octave-config --m-site-dir)
 
+%define                gcc_target      %(%{__cc} -dumpmachine)
+%define                ada_incdir      %{_libdir}/%{gcc_target}/%{cc_version}/adainclude
+%define                ada_objdir      %{_libdir}/%{gcc_target}/%{cc_version}/adalib
+
 %description
 PLplot is a library of functions that are useful for making scientific
 plots. It can be used from within compiled languages such as C, C++,
@@ -335,6 +342,31 @@ PLplot library - FORTRAN 95 binding development files.
 Biblioteka PLplot - pliki programistyczne wiązania dla języka FORTRAN
 95.
 
+%package ada
+Summary:       PLplot library - Ada binding
+Summary(pl.UTF-8):     Biblioteka PLplot - wiązanie dla Ady
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description ada
+PLplot library - Ada binding.
+
+%description ada -l pl.UTF-8
+Biblioteka PLplot - wiązanie dla Ady.
+
+%package ada-devel
+Summary:       PLplot library - Ada binding development files
+Summary(pl.UTF-8):     Biblioteka PLplot - pliki programistyczne wiązania dla Ady
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-ada = %{version}-%{release}
+
+%description ada-devel
+PLplot library - Ada binding development files.
+
+%description ada-devel -l pl.UTF-8
+Biblioteka PLplot - pliki programistyczne wiązania dla Ady.
+
 %package java
 Summary:       PLplot library - Java binding
 Summary(pl.UTF-8):     Biblioteka PLplot - wiązanie dla Javy
@@ -585,12 +617,20 @@ Biblioteka PLplot - przykłady do wiązania dla Pythona.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %build
 mkdir build
 cd build
 # NOTE: no %{_libdir}/jni in PLD, use plain %{_libdir}
 %cmake .. \
+%if %{with ada}
+       -DENABLE_ada=ON \
+       -DADA_INCLUDE_PATH=%{ada_incdir} \
+       -DADA_LIB_PATH=%{ada_objdir} \
+%else
+       -DENABLE_ada=OFF \
+%endif
 %if %{with java}
        -DCMAKE_Java_RUNTIME=%{java} \
        -DCMAKE_Java_COMPILER=%{javac} \
@@ -614,7 +654,6 @@ cd build
        -DUSE_RPATH=OFF \
        -DENABLE_tk=ON \
        -DENABLE_ocaml=%{?with_ocaml:ON}%{!?with_ocaml:OFF} \
-       -DENABLE_ada=OFF \
        -DENABLE_itcl=%{?with_itcl:ON}%{!?with_itcl:OFF} \
        -DENABLE_itk=%{?with_itcl:ON}%{!?with_itcl:OFF} \
        -DPLD_cgm=ON \
@@ -661,6 +700,9 @@ rm -rf $RPM_BUILD_ROOT
 %post  f95 -p /sbin/ldconfig
 %postun        f95 -p /sbin/ldconfig
 
+%post  ada -p /sbin/ldconfig
+%postun        ada -p /sbin/ldconfig
+
 %post  tcl -p /sbin/ldconfig
 %postun        tcl -p /sbin/ldconfig
 
@@ -852,6 +894,22 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/test_f95.sh
 %{_examplesdir}/%{name}-%{version}/f95
 
+%if %{with ada}
+%files ada
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libplplotadad.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libplplotadad.so.0
+
+%files ada-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libplplotadad.so
+%{ada_objdir}/plplotadad
+%{ada_incdir}/plplotadad
+%{_pkgconfigdir}/plplotd-ada.pc
+%{_examplesdir}/%{name}-%{version}/ada
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/test_ada.sh
+%endif
+
 %if %{with java}
 %files java
 %defattr(644,root,root,755)
This page took 0.047495 seconds and 4 git commands to generate.