From ad2985c6b1ae99cc4f5da80b2bd5b5f7e28df8b1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: May 21 2008 19:46:26 +0000 Subject: - Update to 4.3.1, drop upstreamed patches - Remove other install fixes upstreamed --- diff --git a/.cvsignore b/.cvsignore index 257b7f2..174fffb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +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 +GMT4.3.1_scripts.tar.bz2 +GMT4.3.1_share.tar.bz2 +GMT4.3.1_src.tar.bz2 +GMT4.3.1_suppl.tar.bz2 diff --git a/GMT-4.2.1-cp-pr.patch b/GMT-4.2.1-cp-pr.patch deleted file mode 100644 index e6fe088..0000000 --- a/GMT-4.2.1-cp-pr.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 diff --git a/GMT-4.3.0-destdir.patch b/GMT-4.3.0-destdir.patch deleted file mode 100644 index a214569..0000000 --- a/GMT-4.3.0-destdir.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- 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 diff --git a/GMT-4.3.0-link.patch b/GMT-4.3.0-link.patch deleted file mode 100644 index e2f9be6..0000000 --- a/GMT-4.3.0-link.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- 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 diff --git a/GMT-4.3.0-nostrip.patch b/GMT-4.3.0-nostrip.patch deleted file mode 100644 index a28095c..0000000 --- a/GMT-4.3.0-nostrip.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- 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" diff --git a/GMT-4.3.0-segfault.patch b/GMT-4.3.0-segfault.patch deleted file mode 100644 index 3c21fa2..0000000 --- a/GMT-4.3.0-segfault.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- 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, ¤t_pen, ¤t_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); diff --git a/GMT-4.3.0-warning.patch b/GMT-4.3.0-warning.patch deleted file mode 100644 index 4f9a170..0000000 --- a/GMT-4.3.0-warning.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 */ - diff --git a/GMT.spec b/GMT.spec index 86a00d0..d8f9205 100644 --- a/GMT.spec +++ b/GMT.spec @@ -6,28 +6,17 @@ %define octave_octdir %(octave-config -p LOCALAPIOCTFILEDIR || echo) Name: GMT -Version: 4.3.0 -Release: 2%{?dist} +Version: 4.3.1 +Release: 1%{?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 +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 @@ -111,19 +100,13 @@ 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 +#So we execute do_examples.sh instead of do_examples.csh export CSH=sh export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf" %configure --datadir=%{gmthome} \ @@ -133,21 +116,16 @@ export CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/netcdf" --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 \ +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 @@ -163,15 +141,20 @@ 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 +#Cleanup from previous runs +rm -f $RPM_BUILD_DIR/GMT%{version}/share/coast + +#Setup environment for the tests 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 + +#Run the examples - not that this doesn't return errors if any fail, check logs! make run-examples @@ -192,8 +175,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{gmtconf}/dbase %dir %{gmtconf}/mgd77 %dir %{gmtconf}/conf -%config(noreplace) %{gmtconf}/conf/*.conf -%config(noreplace) %{gmtconf}/conf/.gmtdefaults_* +%config(noreplace) %{gmtconf}/conf/* %config(noreplace) %{gmtconf}/mgg/gmtfile_paths %config(noreplace) %{gmtconf}/dbase/grdraster.info %config(noreplace) %{gmtconf}/mgd77/mgd77_paths.txt @@ -232,6 +214,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed May 21 2008 Orion Poplawski 4.3.1-1 +- Update to 4.3.1, drop upstreamed patches +- Remove other install fixes upstreamed + * Mon May 12 2008 Orion Poplawski 4.3.0-2 - Add patch to link libraries properly - Run ldconfig in %%post, dummy diff --git a/sources b/sources index 464416a..1c05e42 100644 --- a/sources +++ b/sources @@ -1,4 +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 +dec8b190c44faa9dc7a6eb512b9e7fd8 GMT4.3.1_scripts.tar.bz2 +f392f35e189e4c27742d23100bbba294 GMT4.3.1_share.tar.bz2 +43db0e2ab2ee48299832f04da4083cee GMT4.3.1_src.tar.bz2 +c5d522d4b16a3d616898055046f5ecc9 GMT4.3.1_suppl.tar.bz2