packages: plplot/plplot.spec, plplot/plplot-adadirs.patch (NEW) - added ada...

qboosh qboosh at pld-linux.org
Thu Dec 8 16:17:08 CET 2011


Author: qboosh                       Date: Thu Dec  8 15:17:08 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- added adadirs patch, build ada binding

---- Files affected:
packages/plplot:
   plplot.spec (1.60 -> 1.61) , plplot-adadirs.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/plplot/plplot.spec
diff -u packages/plplot/plplot.spec:1.60 packages/plplot/plplot.spec:1.61
--- packages/plplot/plplot.spec:1.60	Wed Dec  7 19:50:20 2011
+++ packages/plplot/plplot.spec	Thu Dec  8 16:17:03 2011
@@ -1,17 +1,18 @@
 # $Revision$, $Date$
 # 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
@@ -31,6 +32,7 @@
 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
@@ -41,6 +43,7 @@
 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}
@@ -98,6 +101,10 @@
 %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++,
@@ -336,6 +343,31 @@
 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
@@ -586,12 +618,20 @@
 %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} \
@@ -615,7 +655,6 @@
 	-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 \
@@ -662,6 +701,9 @@
 %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
 
@@ -853,6 +895,22 @@
 %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)
@@ -987,6 +1045,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.61  2011/12/08 15:17:03  qboosh
+- added adadirs patch, build ada binding
+
 Revision 1.60  2011/12/07 18:50:20  qboosh
 - copy-pasto
 

================================================================
Index: packages/plplot/plplot-adadirs.patch
diff -u /dev/null packages/plplot/plplot-adadirs.patch:1.1
--- /dev/null	Thu Dec  8 16:17:08 2011
+++ packages/plplot/plplot-adadirs.patch	Thu Dec  8 16:17:03 2011
@@ -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})
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/plplot/plplot.spec?r1=1.60&r2=1.61&f=u



More information about the pld-cvs-commit mailing list