- Update to 0.9rc4

- Enable grib, udunits2, and wxWidgets support
- Build python module and add sub-package for it
- Use %global instead of %define
This commit is contained in:
Orion Poplawski 2010-02-15 20:42:51 +00:00
parent 1f59ea702f
commit 5c46d395b8
10 changed files with 201 additions and 63 deletions

View File

@ -1 +1 @@
gdl-0.9rc3.tar.gz
gdl-0.9rc4.tar.gz

View File

@ -1,37 +0,0 @@
--- gdl-0.9rc2-20090504/configure.in.antlr-auto 2009-04-30 16:07:55.000000000 -0600
+++ gdl-0.9rc2-20090504/configure.in 2009-05-04 16:17:25.000000000 -0600
@@ -842,7 +842,7 @@
dnl perform program name transformation
dnl AC_ARG_PROGRAM
-AC_CONFIG_FILES(Makefile src/Makefile src/antlr/Makefile)
+AC_CONFIG_FILES(Makefile src/Makefile)
AC_OUTPUT
--- gdl-0.9rc2-20090504/src/Makefile.am.antlr-auto 2009-03-03 16:32:14.000000000 -0700
+++ gdl-0.9rc2-20090504/src/Makefile.am 2009-05-04 16:17:18.000000000 -0600
@@ -1,6 +1,5 @@
# set the include path found by configure
INCLUDES = $(EXT_INCLUDES) $(all_includes)
-SUBDIRS = antlr
noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp
cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \
@@ -53,7 +52,7 @@
gdl_CXXFLAGS = $(AM_CXXFLAGS)
# the library search path.
gdl_LDFLAGS = $(all_libraries)
-gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+gdl_LDADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
endif
# build as library (for python module)
@@ -69,6 +68,6 @@
libgdl_la_LDFLAGS = $(all_libraries) -Wl,-z,muldefs
endif
-libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+libgdl_la_LIBADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
endif

11
gdl-0.9rc4-GDLLexer.patch Normal file
View File

@ -0,0 +1,11 @@
--- gdl-0.9rc4/src/widget.cpp.GDLLexer 2010-02-02 11:13:51.000000000 -0700
+++ gdl-0.9rc4/src/widget.cpp 2010-02-04 08:41:11.835418064 -0700
@@ -589,7 +589,7 @@
RefDNode theAST;
- GDLLexer lexer(istr, "");
+ GDLLexer lexer(istr, "", GDLParser::NONE);
GDLParser& parser = lexer.Parser();
parser.interactive();

View File

@ -0,0 +1,40 @@
diff -up gdl-0.9rc4/configure.in.antlr-auto gdl-0.9rc4/configure.in
--- gdl-0.9rc4/configure.in.antlr-auto 2010-02-03 15:33:19.000000000 -0700
+++ gdl-0.9rc4/configure.in 2010-02-03 15:34:22.271329291 -0700
@@ -988,7 +988,7 @@ dnl AC_CHECK_FUNCS(strdup strtod strtol
dnl perform program name transformation
dnl AC_ARG_PROGRAM
-AC_CONFIG_FILES(Makefile src/Makefile src/antlr/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile)
+AC_CONFIG_FILES(Makefile src/Makefile src/pro/Makefile src/pro/dicom/Makefile testsuite/Makefile doc/Makefile)
AC_OUTPUT
dnl == summary table =======================================
diff -up gdl-0.9rc4/src/Makefile.am.antlr-auto gdl-0.9rc4/src/Makefile.am
--- gdl-0.9rc4/src/Makefile.am.antlr-auto 2010-02-02 11:13:51.000000000 -0700
+++ gdl-0.9rc4/src/Makefile.am 2010-02-03 15:34:48.470350773 -0700
@@ -1,6 +1,6 @@
# set the include path found by configure
INCLUDES = $(EXT_INCLUDES) $(all_includes)
-SUBDIRS = antlr pro
+SUBDIRS = pro
noinst_HEADERS = gdlwidget.hpp prognode.hpp prognodeexpr.hpp
cpp_hpp_files = accessdesc.hpp arrayindex.hpp assocdata.cpp assocdata.hpp \
@@ -56,7 +56,7 @@ gdl_SOURCES = $(cpp_hpp_files) gdl.cpp
gdl_CXXFLAGS = $(AM_CXXFLAGS)
# the library search path.
gdl_LDFLAGS = $(all_libraries)
-gdl_LDADD = $(top_builddir)/src/antlr/libantlr.a -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+gdl_LDADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
endif
# build as library (for python module)
@@ -72,6 +72,6 @@ else
libgdl_la_LDFLAGS = $(all_libraries) -Wl,-z,muldefs
endif
-libgdl_la_LIBADD = $(top_builddir)/src/antlr/libantlr.la -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
+libgdl_la_LIBADD = -lantlr -L/usr/X11R6/lib64 -L/usr/X11R6/lib -lX11
endif

28
gdl-0.9rc4-python.patch Normal file
View File

@ -0,0 +1,28 @@
--- gdl-0.9rc4/src/pythongdl.cpp.python 2010-02-02 11:13:51.000000000 -0700
+++ gdl-0.9rc4/src/pythongdl.cpp 2010-02-04 09:29:30.855905623 -0700
@@ -176,7 +176,7 @@
if( kwDict != NULL)
{
PyObject *key, *value;
- int dictPos = 0;
+ Py_ssize_t dictPos = 0;
int nKW = PyDict_Size( kwDict);
@@ -242,7 +242,7 @@
if( kwDict != NULL)
{
PyObject *key, *value;
- int dictPos = 0;
+ Py_ssize_t dictPos = 0;
int nKW = PyDict_Size( kwDict);
for( SizeT k=0; k<nKW; ++k)
@@ -263,7 +263,6 @@
int (*oldInputHook)();
int GDLEventHandlerPy()
{
- GDLEventHandler();
if( oldInputHook != NULL)
(*oldInputHook)();
}

View File

@ -0,0 +1,27 @@
--- gdl-0.9rc4/configure.in.wx-config 2010-02-02 11:13:51.000000000 -0700
+++ gdl-0.9rc4/configure.in 2010-02-03 15:43:32.849333374 -0700
@@ -322,23 +322,8 @@
dnl SA: this is needed to compile on Leopard
dnl (see e.g. the "OpenGL bug section" in http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug)
dnl LDFLAGS="$LDFLAGS -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"
+ AC_DEFINE([HAVE_LIBWXWIDGETS], [1], [wxWidgets library])
fi
-
- tmp="`wx-config --basename`-`wx-config --release`"
- AC_CHECK_LIB($tmp, wxFatalSignalHandler,
- [AC_DEFINE([HAVE_LIBWXWIDGETS], [1], [wxWidgets library])], [
- dnl SA: handling the multi-port wxWidgets installation case
- tmp="`wx-config --basename --toolkit=base`-`wx-config --release`"
- AC_CHECK_LIB($tmp, wxInteger_compare, [AC_DEFINE([HAVE_LIBWXWIDGETS], [1])], [
- echo ""
- echo "Error! wxWidgets version 2.8 or later is required but was not found"
- echo " Use --with-wxWidgets=DIR to specify the wxWidgets directory tree"
- echo " Use --with-wxWidgets=no to not use it"
- echo " Check the README or use configure --help for other libraries needed"
- echo " (--with-xxxdir = obligatory, --with-xxx = optional (--with-xxx=no to disable))"
- exit -1
- ])
- ])
fi
dnl == ImageMagick =========================================

11
gdl-0.9rc4-wx.patch Normal file
View File

@ -0,0 +1,11 @@
--- gdl-0.9rc4/src/basic_pro.cpp.wx 2010-02-02 11:13:51.000000000 -0700
+++ gdl-0.9rc4/src/basic_pro.cpp 2010-02-04 10:54:58.336905605 -0700
@@ -689,7 +689,7 @@
{
#ifdef HAVE_LIBWXWIDGETS
- wxTheApp->OnExit(); // Defined in GDLApp::OnExit() in gdlwidget.cpp
+ if (wxTheApp) wxTheApp->OnExit(); // Defined in GDLApp::OnExit() in gdlwidget.cpp
wxUninitialize();
#endif

100
gdl.spec
View File

@ -1,37 +1,44 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: gdl
Version: 0.9
Release: 0.9.rc3%{?dist}
Release: 0.10.rc4%{?dist}
Summary: GNU Data Language
Group: Applications/Engineering
License: GPLv2+
URL: http://gnudatalanguage.sourceforge.net/
Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}rc3.tar.gz
# Made with makecvstarball
#Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}rc2-20090603.tar.bz2
Source0: http://downloads.sourceforge.net/gnudatalanguage/%{name}-%{version}rc4.tar.gz
Source1: gdl.csh
Source2: gdl.sh
Source3: makecvstarball
Patch0: gdl-0.9rc4-wx-config.patch
Patch1: gdl-0.9rc4-GDLLexer.patch
Patch2: gdl-0.9rc4-python.patch
# Build with system antlr library. Request for upstream change here:
# https://sourceforge.net/tracker/index.php?func=detail&aid=2685215&group_id=97659&atid=618686
Patch3: gdl-0.9rc3-antlr.patch
Patch4: gdl-0.9rc2-20090504-antlr-auto.patch
Patch4: gdl-0.9rc4-antlr-auto.patch
Patch5: gdl-0.9rc4-wx.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#RHEL doesn't have the needed antlr version/headers, old plplot
#RHEL doesn't have the needed antlr version/headers, has old plplot
%if !0%{?rhel}
BuildRequires: antlr
%define plplot_config %{nil}
%global plplot_config %{nil}
%else
%define plplot_config --enable-oldplplot
%global plplot_config --enable-oldplplot
%endif
BuildRequires: readline-devel, ncurses-devel
BuildRequires: gsl-devel, plplot-devel, ImageMagick-c++-devel
BuildRequires: netcdf-devel, hdf5-devel, libjpeg-devel
BuildRequires: python-devel, python-numarray, python-matplotlib
BuildRequires: fftw-devel, hdf-static, hdf-devel, proj-devel
BuildRequires: fftw-devel, hdf-static, proj-devel
BuildRequires: grib_api-static
#TODO - Build with mpi support
#BuildRequires: mpich2-devel
BuildRequires: udunits2-devel
BuildRequires: wxGTK-devel
BuildRequires: autoconf, automake, libtool
# Needed to pull in drivers
Requires: plplot
@ -57,12 +64,28 @@ BuildArch: noarch
Common files for GDL
%package python
Summary: GDL python module
Group: Applications/Engineering
# Needed to pull in drivers
Requires: plplot
Requires: %{name}-common = %{version}-%{release}
Provides: %{name}-runtime = %{version}-%{release}
%description python
%{summary}.
%prep
%setup -q -n %{name}-%{version}rc3
%setup -q -n %{name}-%{version}rc4
%patch0 -p1 -b .wx-config
%patch1 -p1 -b .GDLLexer
%patch2 -p1 -b .python
%if !0%{?rhel}
%patch3 -p1 -b .antlr
#patch3 -p1 -b .antlr
%patch4 -p1 -b .antlr-auto
%endif
%patch5 -p1 -b .wx
%if !0%{?rhel}
rm -rf src/antlr
%endif
@ -70,23 +93,47 @@ rm ltmain.sh
autoreconf --install
%global _configure ../configure
%global configure_opts \\\
--disable-dependency-tracking --disable-static \\\
--with-fftw \\\
--with-udunits \\\
--with-grib \\\
--with-wxWidgets \\\
%{plplot_config} \\\
INCLUDES="-I%{_includedir}/udunits2" \\\
LIBS="-L%{_libdir}/hdf -ldl" \\\
%{nil}
# TODO - build an mpi version
# INCLUDES="-I/usr/include/mpich2" \
# --with-mpich=%{_libdir}/mpich2 \
%build
export CPPFLAGS="-DH5_USE_16_API"
%configure --disable-dependency-tracking --disable-static --with-fftw \
%{plplot_config} \
INCLUDES="-I/usr/include/netcdf -I/usr/include/hdf" \
LIBS="-L%{_libdir}/hdf"
mkdir build build-python
#Build the standalone executable
pushd build
%configure %{configure_opts}
make %{?_smp_mflags}
popd
#Build the python module
pushd build-python
%configure %{configure_opts} --enable-python_module
make %{?_smp_mflags}
popd
%install
rm -rf $RPM_BUILD_ROOT
pushd build
make install DESTDIR=$RPM_BUILD_ROOT
rm -r $RPM_BUILD_ROOT%{_libdir}
popd
# Install the library
install -d -m 0755 $RPM_BUILD_ROOT/%{_datadir}
cp -r src/pro $RPM_BUILD_ROOT/%{_datadir}/gdl
# Install the python module
install -d -m 0755 $RPM_BUILD_ROOT/%{python_sitearch}
install -m 0755 build-python/src/.libs/libgdl.so.0.0.0 \
$RPM_BUILD_ROOT/%{python_sitearch}/GDL.so
# Install the profile file to set GDL_PATH
install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d
@ -96,7 +143,7 @@ install -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/profile.d
%check
cd testsuite
echo ".r test_suite" | ../src/gdl
echo ".r test_suite" | ../build/src/gdl
%clean
@ -108,13 +155,24 @@ rm -rf $RPM_BUILD_ROOT
%doc AUTHORS ChangeLog COPYING HACKING NEWS README TODO
%config(noreplace) %{_sysconfdir}/profile.d/gdl.*sh
%{_bindir}/gdl
%{_mandir}/man1/gdl.1*
%files common
%defattr(-,root,root,-)
%{_datadir}/gdl/
%{_datadir}/gnudatalanguage/
%files python
%defattr(-,root,root,-)
%{python_sitearch}/GDL.so
%changelog
* Wed Feb 15 2010 Orion Poplawski <orion@cora.nwra.com> - 0.9-0.10.rc4
- Update to 0.9rc4
- Enable grib, udunits2, and wxWidgets support
- Build python module and add sub-package for it
- Use %%global instead of %%define
* Tue Dec 8 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.9-0.9.rc3
- Explicitly BR hdf-static in accordance with the Packaging
Guidelines (hdf-devel is still static-only).

View File

@ -1,9 +1,9 @@
#!/bin/sh
if [ -n "$" ]
if [ -n "$1" ]
then
date=$1
else
date=`date +%Y%m%d`
fi
cvs -z3 -d :pserver:anonymous@gnudatalanguage.cvs.sourceforge.net:/cvsroot/gnudatalanguage export -D ${date} -d gdl-0.9rc2-${date} gdl
tar cjf gdl-0.9rc2-${date}.tar.bz2 gdl-0.9rc2-${date}
cvs -z3 -d :pserver:anonymous@gnudatalanguage.cvs.sourceforge.net:/cvsroot/gnudatalanguage export -D ${date} -d gdl-0.9rc4-${date} gdl
tar cjf gdl-0.9rc4-${date}.tar.bz2 gdl-0.9rc4-${date}

View File

@ -1 +1 @@
94a29e13ec5d71e664659b32e421b02e gdl-0.9rc3.tar.gz
dcef0d75308a13856a799d12755c80a3 gdl-0.9rc4.tar.gz