rpms/GMT/EL-5 GMT-4.2.1-cp-pr.patch, NONE, 1.1 GMT-4.3.0-destdir.patch, NONE, 1.1 GMT-4.3.0-link.patch, NONE, 1.1 GMT-4.3.0-nostrip.patch, NONE, 1.1 GMT-4.3.0-segfault.patch, NONE, 1.1 GMT-4.3.0-warning.patch, NONE, 1.1 GMT.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Wed May 21 15:56:15 UTC 2008


Author: orion

Update of /cvs/pkgs/rpms/GMT/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv464/EL-5

Modified Files:
	.cvsignore sources 
Added Files:
	GMT-4.2.1-cp-pr.patch GMT-4.3.0-destdir.patch 
	GMT-4.3.0-link.patch GMT-4.3.0-nostrip.patch 
	GMT-4.3.0-segfault.patch GMT-4.3.0-warning.patch GMT.spec 
Log Message:
Initial import

GMT-4.2.1-cp-pr.patch:

--- NEW FILE GMT-4.2.1-cp-pr.patch ---
--- GMT4.2.1/Makefile.cp-pr	2007-10-10 13:28:23.000000000 -0600
+++ GMT4.2.1/Makefile	2008-04-29 10:52:32.000000000 -0600
@@ -131,7 +131,7 @@
 install-data:
 		if [ ! $(rootdir)/share = $(datadir) ]; then \
 			mkdir -p $(datadir); \
-			cp -r share/* $(datadir); \
+			cp -pr share/* $(datadir); \
 		else \
 			echo "Install share directory the same as distribution share directory - nothing copied"; \
 		fi

GMT-4.3.0-destdir.patch:

--- NEW FILE GMT-4.3.0-destdir.patch ---
--- GMT4.3.0/src/makegmt.macros.in.destdir	2008-04-30 01:52:33.000000000 -0600
+++ GMT4.3.0/src/makegmt.macros.in	2008-05-05 10:51:32.000000000 -0600
@@ -76,8 +76,8 @@
 MEX_LIB	= @MEX_LIB@
 MEX_INC	= @MEX_INC@
 MEX_EXT	= @MEX_EXT@
-MEX_XDIR	= @MEX_XDIR@
-MEX_MDIR	= @MEX_MDIR@
+MEX_XDIR	= $(DESTDIR)@MEX_XDIR@
+MEX_MDIR	= $(DESTDIR)@MEX_MDIR@
 #
 #-------------------------------------------------------------------------------
 #	Miscellaneous macros for Cygwin

GMT-4.3.0-link.patch:

--- NEW FILE GMT-4.3.0-link.patch ---
--- GMT4.3.0/src/x2sys/makefile.shlibs	2008-04-25 14:14:36.000000000 -0600
+++ GMT4.3.0/src/x2sys/makefile	2008-05-12 13:39:35.000000000 -0600
@@ -11,7 +11,7 @@
 include $(GMTSRCDIR)gmtalldeps.macros
 
 INCLUDES	= -I$(srcdir) -I../mgg -I../mgd77 -I$(NETCDF_INC)
-ALLLIB		= -L../mgd77 -lmgd77 -L../mgg -lgmt_mgg -L.. -lgmt $(NC_LIBS) $(LIBS)
+ALLLIB		= -L../mgd77 -lmgd77 -L../mgg -lgmt_mgg -L.. -lgmt $(LIBS)
 
 PROGS_H		= x2sys.h
 PROGS_O		= x2sys_init.o x2sys_put.o x2sys_get.o x2sys_binlist.o x2sys_datalist.o x2sys_cross.o
--- GMT4.3.0/src/makefile.shlibs	2008-05-02 16:37:06.000000000 -0600
+++ GMT4.3.0/src/makefile	2008-05-12 13:42:22.000000000 -0600
@@ -198,13 +198,13 @@
 		$(RANLIB) $@
 
 libpsl.$(SL):	libpsl.a
-		$(LD) $(LD_OPT) pslib.o $(NC_LIBS) $(LIBS) -o $@
+		$(LD) $(LD_OPT) pslib.o $(LIBS) -o $@
 
 libgmt.$(SL):	libgmt.a
 		$(LD) $(LD_OPT) $(LIB_O) $(TRIANGLE_O) $(ALPHA_SINCOS_O) $(NC_LIBS) $(LIBS) -o $@
 
 libgmtps.$(SL):	libgmtps.a
-		$(LD) $(LD_OPT) $(LIBPS_O) libpsl.$(SL) $(NC_LIBS) $(LIBS) -o $@
+		$(LD) $(LD_OPT) $(LIBPS_O) libpsl.$(SL) libgmt.$(SL) $(LIBS) -o $@
 
 #-------------------------------------------------------------------------------
 #	program rules

GMT-4.3.0-nostrip.patch:

--- NEW FILE GMT-4.3.0-nostrip.patch ---
--- GMT4.3.0/configure.nostrip	2008-05-02 16:38:12.000000000 -0600
+++ GMT4.3.0/configure	2008-05-06 10:56:49.000000000 -0600
@@ -11114,11 +11114,10 @@
 	CPPFLAGS="$CPPFLAGS -DDEBUG"
 	CFLAGS="$CFLAGS -g"
 else
-	CFLAGS=`echo $CFLAGS | sed 's/-g//'`
 	if test "$os" = "Darwin" ; then
 		LDFLAGS="$LDFLAGS -Wl,-x"
 	else
-		LDFLAGS="$LDFLAGS -s"
+		LDFLAGS="$LDFLAGS"
 	fi
 	if test "$GCC" = "yes" || test "$os" = "Linux" || test "$os" = "AIX"; then
 		CFLAGS="$CFLAGS -O2"

GMT-4.3.0-segfault.patch:

--- NEW FILE GMT-4.3.0-segfault.patch ---
--- GMT4.3.0/src/psxyz.c.segfault	2008-04-30 21:00:39.000000000 -0600
+++ GMT4.3.0/src/psxyz.c	2008-05-06 09:10:31.000000000 -0600
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------
- *	$Id: psxyz.c,v 1.130 2008/05/01 03:00:39 guru Exp $
+ *	$Id: psxyz.c,v 1.131 2008/05/06 04:03:12 guru Exp $
  *
  *	Copyright (c) 1991-2008 by P. Wessel and W. H. F. Smith
  *	See COPYING file for copying and redistribution conditions.
@@ -549,6 +549,7 @@
 				data1[n].flag = 0;
 				data1[n].lon = in[0];
 				data1[n].lat = in[1];
+				data1[n].string = NULL;
 				if (S.read_vector) {
 					data1[n].x_size = (float)in[three];	/* direction */
 					data1[n].y_size = (float)(in[four] * GMT_u2u[S.u][GMT_INCH]);	/* length */
@@ -824,6 +825,7 @@
 							GMT_text3D (data1[i].x, data1[i].y, data1[i].z, font_size, S.font_no, data1[i].string, 0.0, 6, FALSE);
 						else
 							GMT_text3D (data1[i].x, data1[i].y, data1[i].z, font_size, S.font_no, data1[i].string, 0.0, 6, TRUE);
+						GMT_free ((void *)data1[i].string);
 						break;
 					case GMT_SYMBOL_VECTOR:
 						if (data1[i].flag & 2) {
@@ -923,7 +925,6 @@
 						GMT_draw_custom_symbol (data1[i].x, data1[i].y, data1[i].z, (double)data1[i].x_size, S.custom, &current_pen, &current_fill, data1[i].outline);
 						break;
 				}
-				if (data1[i].string) GMT_free ((void *)data1[i].string);
 			}
 			GMT_free ((void *)data1);
 		}
--- GMT4.3.0/src/project.c.segfault	2008-04-30 21:00:39.000000000 -0600
+++ GMT4.3.0/src/project.c	2008-05-06 10:32:43.000000000 -0600
@@ -1,5 +1,5 @@
 /*--------------------------------------------------------------------
- *	$Id: project.c,v 1.57 2008/05/01 03:00:39 guru Exp $
+ *	$Id: project.c,v 1.58 2008/05/06 04:03:12 guru Exp $
  *
  *	Copyright (c) 1991-2008 by P. Wessel and W. H. F. Smith
  *	See COPYING file for copying and redistribution conditions.
@@ -484,8 +484,7 @@
 
 	/*  Now we are ready to work  */
 
-	n_used = 0;
-	n_total_read = 0;
+	n_used = n_total_read = 0;
 
 	if (Ctrl->G.active) {	/* Not input data expected, just generate track from arguments given */
 		n_outputs = 3;
@@ -497,6 +496,8 @@
 		d_along = Ctrl->L.min;
 		while ((Ctrl->L.max - d_along) > (GMT_CONV_LIMIT*Ctrl->G.inc)) {
 			p_data[n_used].a[2] = d_along;
+			p_data[n_used].t = NULL;	/* Initialize since that is not done by realloc */
+			p_data[n_used].z = NULL;	/* Initialize since that is not done by realloc */
 			n_used++;
 			d_along = Ctrl->L.min + n_used * Ctrl->G.inc;
 			if (n_used == (n_alloc-1)) {
@@ -505,6 +506,8 @@
 			}
 		}
 		p_data[n_used].a[2] = Ctrl->L.max;
+		p_data[n_used].t = NULL;	/* Initialize since that is not done by realloc */
+		p_data[n_used].z = NULL;	/* Initialize since that is not done by realloc */
 		n_used ++;
 
 		/* We need to find r,s  */
@@ -643,6 +646,8 @@
 					p_data[n_used].a[1] = yy;
 					p_data[n_used].a[2] = xt[0];
 					p_data[n_used].a[3] = xt[1];
+					p_data[n_used].t = NULL;	/* Initialize since that is not done by realloc */
+					p_data[n_used].z = NULL;	/* Initialize since that is not done by realloc */
 					if (n_z) {	/* Copy over z column(s) */
 						if (pure_ascii) {	/* Must store all text beyond x,y columns */
 							p_data[n_used].t = (char *) GMT_memory (VNULL, strlen (GMT_io.current_record), sizeof (char), GMT_program);

GMT-4.3.0-warning.patch:

--- NEW FILE GMT-4.3.0-warning.patch ---
--- GMT4.3.0/src/gmt_support.c.warning	2008-04-16 13:38:04.000000000 -0600
+++ GMT4.3.0/src/gmt_support.c	2008-05-05 15:37:33.000000000 -0600
@@ -6191,7 +6191,7 @@
 	/* Opens up GMT_custom_symbols.lis and dislays the list of custom symbols */
 
 	FILE *fp;
-	char list[GMT_LONG_TEXT], buffer[GMT_LONG_TEXT];
+	char list[GMT_LONG_TEXT], buffer[BUFSIZ];
 
 	/* Open the list in $GMT_SHAREDIR */
 


--- NEW FILE GMT.spec ---
%define gmthome %{_datadir}/GMT
%define gmtconf %{_sysconfdir}/GMT

%{!?octave_api: %define octave_api %(octave-config -p API_VERSION 2>/dev/null || echo 0)}
%define octave_mdir %(octave-config -p LOCALAPIFCNFILEDIR || echo)
%define octave_octdir %(octave-config -p LOCALAPIOCTFILEDIR || echo)

Name:           GMT
Version:        4.3.0
Release:        2%{?dist}
Summary:        Generic Mapping Tools

Group:          Applications/Engineering
License:        GPLv2
URL:            http://gmt.soest.hawaii.edu/
Source0:       ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_src.tar.bz2
Source1:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_share.tar.bz2
Source2:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_suppl.tar.bz2
Source3:        ftp://ftp.soest.hawaii.edu/gmt/GMT%{version}_scripts.tar.bz2
#Add DESTDIR to octave install patch, submitted upstream, will be in 4.3.1
Patch0:         GMT-4.3.0-destdir.patch
Patch1:         GMT-4.3.0-warning.patch
#Patch from upstream to fix examples segfaulting
Patch2:         GMT-4.3.0-segfault.patch
#Use cp -pr to copy data, submitted upstream, will be in 4.3.1
Patch3:         GMT-4.2.1-cp-pr.patch
#Don't strip binaries, submitted upstream
Patch4:         GMT-4.3.0-nostrip.patch
#Don't link unneeded and link needed libraries, submitted upstream
Patch5:         GMT-4.3.0-link.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  libXt-devel libXaw-devel libXmu-devel libXext-devel
BuildRequires:  netcdf-devel
BuildRequires:  GMT-coastlines
BuildRequires:  octave-devel
# less is detected by configure, and substituted in GMT.in
BuildRequires:  less
Requires:       less
Requires:       GMT-coastlines
Provides:       gmt = %{name}-%{release}

%description
GMT is an open source collection of ~60 tools for manipulating geographic and
Cartesian data sets (including filtering, trend fitting, gridding, projecting,
etc.) and producing Encapsulated PostScript File (EPS) illustrations ranging
from simple x-y plots via contour maps to artificially illuminated surfaces
and 3-D perspective views.  GMT supports ~30 map projections and transforma-
tions and comes with support data such as coastlines, rivers, and political
boundaries.

GMT is developed and maintained by Paul Wessel and Walter H. F.  Smith with
help from a global set of volunteers, and is supported by the National
Science Foundation.


%package        devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Provides:       gmt-devel = %{name}-%{release}

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.


%package        static
Summary:        Static libraries for %{name}
Group:          Development/Libraries
Requires:       %{name}-devel = %{version}-%{release}
Provides:       gmt-static = %{name}-%{release}

%description    static
The %{name}-static package contains static libraries for developing
applications that use %{name}.


%package        octave
Summary:        Octave libraries for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       octave(api) = %{octave_api}
Provides:       gmt-octave = %{name}-%{release}

%description    octave
The %{name}-octave package contains and Octave interface for developing
applications that use %{name}.


%package        examples
Summary:        Generic Mapping Tools (Examples)
Group:          Applications/Engineering
Requires:       %{name} = %{version}-%{release}
Provides:       gmt-examples = %{name}-%{release}

%description    examples
Example scripts for the Generic Mapping Tools.


# X11 application in a subpackage. No .desktop file since it
# requires a file name as argument
%package -n      xgridedit
Summary:         GMT grid code graphical editor
Group:           Applications/Engineering

%description -n xgridedit
XGridEdit is an application for viewing and editing the numerical values in
GMT 2 dimensional grids.


%prep
%setup -q -b1 -b2 -b3 -n GMT%{version}
%patch -p1 -b .destdir
%patch1 -p1 -b .warning
%patch2 -p1 -b .segfault
%patch3 -p1 -b .cp-pr
%patch4 -p1 -b .nostrip
%patch5 -p1 -b .link
#We don't care about .bat files
find -name \*.bat | xargs rm
#Fix permissions
find -name \*.c | xargs chmod a-x

%build
#So we execute do_examples.sh
export CSH=sh
export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf-3"
export LDFLAGS="-L%{_libdir}/netcdf-3"
%configure --datadir=%{gmthome} \
           --enable-shared \
           --enable-octave --enable-mex-mdir=%{octave_mdir} \
           --enable-mex-xdir=%{octave_octdir} \
           --disable-rpath --enable-www=%{_docdir}/%{name}-%{version}
make
make suppl
# correct paths
#sed -i.gmthome \
 #-e 's:\${prefix}/www/gmt/gmt_services.html:%{_docdir}/%{name}-%{version}/gmt_services.html:' src/GMT


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -c -p'  install-all
#Don't ship .in files
find $RPM_BUILD_ROOT%{gmthome}/conf -name \*.in | xargs rm
#Setup configuration files 
mkdir -p $RPM_BUILD_ROOT%{gmtconf}/{mgg,dbase,mgd77,conf}
pushd $RPM_BUILD_ROOT%{gmthome}/
# put conf files in %{gmtconf} and do links in %{gmthome}
for file in conf/*.conf conf/.gmtdefaults_* mgg/gmtfile_paths dbase/grdraster.info \
    mgd77/mgd77_paths.txt; do
  mv $file $RPM_BUILD_ROOT%{gmtconf}/$file
  ln -s ../../../../../%{gmtconf}/$file $RPM_BUILD_ROOT%{gmthome}/$file
done
popd
#Install examples
cp -pr examples $RPM_BUILD_ROOT/%{gmthome}
#Don't bring in csh for the csh examples
find $RPM_BUILD_ROOT/%{gmthome}/examples -name \*.csh | 
  xargs chmod a-x
# separate the README files that are associated with gmt main package
rm -rf __package_docs
mkdir __package_docs
cp -p src/*/README.* __package_docs
rm __package_docs/README.xgrid __package_docs/README.mex
#Fix permissions
chmod a-x $RPM_BUILD_ROOT%{octave_mdir}/*.m


%check
export GMT_SHAREDIR=$RPM_BUILD_DIR/GMT%{version}/share
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_libdir}
#Link in the coastline data
ln -s %{gmthome}/coast $RPM_BUILD_DIR/GMT%{version}/share
make run-examples


%clean
rm -rf $RPM_BUILD_ROOT


%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-,root,root,-)
%doc README __package_docs/* COPYING ChangeLog www/gmt/doc/html gmt_bench-marks
%dir %{gmtconf}
%dir %{gmtconf}/mgg
%dir %{gmtconf}/dbase
%dir %{gmtconf}/mgd77
%dir %{gmtconf}/conf
%config(noreplace) %{gmtconf}/conf/*.conf 
%config(noreplace) %{gmtconf}/conf/.gmtdefaults_* 
%config(noreplace) %{gmtconf}/mgg/gmtfile_paths
%config(noreplace) %{gmtconf}/dbase/grdraster.info 
%config(noreplace) %{gmtconf}/mgd77/mgd77_paths.txt
%{_bindir}/*
%exclude %{_bindir}/xgridedit
%{_libdir}/*.so.*
%dir %{gmthome}
%{gmthome}/*
%exclude %{gmthome}/examples
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*

%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%{_libdir}/*.so
%{_mandir}/man3/*.3*

%files static
%defattr(-,root,root,-)
%{_libdir}/*.a

%files octave
%defattr(-,root,root,-)
%{octave_mdir}/*.m
%{octave_octdir}/*.mex

%files examples
%defattr(-,root,root,-)
%doc %{gmthome}/examples

%files -n xgridedit
%defattr(-,root,root,-)
%doc src/xgrid/README.xgrid
%{_bindir}/xgridedit


%changelog
* Mon May 12 2008 Orion Poplawski <orion at cora.nwra.com> 4.3.0-2
- Add patch to link libraries properly
- Run ldconfig in %%post, dummy
- Don't ship .bat file
- Don't ship .in files
- Don't make .csh examples executable
- Drop execute bit on .m files

* Tue May 6 2008 Orion Poplawski <orion at cora.nwra.com> 4.3.0-1
- Update to 4.3.0, drop many upsreamed patches
- Add patch to install octave files in DESTDIR
- Add patch to fix segfaults due to uninitialized memory
- Add patch to fix a possible buffer overflow warning
- Remove duplicate html directory from examples package
- Create __package_docs directory for main package docs

* Tue Apr 28 2008 Orion Poplawski <orion at cora.nwra.com> 4.2.1-3
- Remove unfree source
- Split out xgridedit into sub-package
- Add BR and R on less
- Redirect octave-config stderr to /dev/null
- Move config files to /etc/GMT
- Use install -c -p to preserve timestamps
- Use cp -pr to copy share data
- Add sonames to shared libraries

* Mon Mar 24 2008 Orion Poplawski <orion at cora.nwra.com> 4.2.1-2
- Drop -doc sub-package, will have separate -docs package
- Add lower case name provides
- Build Octave files

* Mon Mar 17 2008 Orion Poplawski <orion at cora.nwra.com> 4.2.1-1
- Initial version


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/GMT/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	13 May 2008 17:04:57 -0000	1.1
+++ .cvsignore	21 May 2008 15:54:56 -0000	1.2
@@ -0,0 +1,4 @@
+GMT4.3.0_scripts.tar.bz2
+GMT4.3.0_share.tar.bz2
+GMT4.3.0_src.tar.bz2
+GMT4.3.0_suppl.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/GMT/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 May 2008 17:04:57 -0000	1.1
+++ sources	21 May 2008 15:54:56 -0000	1.2
@@ -0,0 +1,4 @@
+41a3c25bf74a151e423f6821dcc2fa25  GMT4.3.0_scripts.tar.bz2
+a7ce8c0fa2bd85131dfc8b67d8fe8235  GMT4.3.0_share.tar.bz2
+2890ee76b44cc32ee41d54eda425b212  GMT4.3.0_src.tar.bz2
+362438041a80570db1842524370c76e1  GMT4.3.0_suppl.tar.bz2




More information about the fedora-extras-commits mailing list