[geomorph] Initial import (#1101521)

didier fabert tartare at fedoraproject.org
Thu May 29 13:08:24 UTC 2014


commit c74e1fa695f49820967851d90e7992f790a4f271
Author: Didier Fabert <didier.fabert at gmail.com>
Date:   Thu May 29 15:07:53 2014 +0200

    Initial import (#1101521)

 .gitignore                     |    1 +
 geomorph-array-bounds.patch    |   14 ++++++
 geomorph-format-security.patch |   24 +++++++++++
 geomorph.desktop               |   12 +++++
 geomorph.spec                  |   90 ++++++++++++++++++++++++++++++++++++++++
 sources                        |    1 +
 6 files changed, 142 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..23ecf96 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/geomorph-0.60.1.tar.gz
diff --git a/geomorph-array-bounds.patch b/geomorph-array-bounds.patch
new file mode 100644
index 0000000..4743663
--- /dev/null
+++ b/geomorph-array-bounds.patch
@@ -0,0 +1,14 @@
+diff -rup a/src/app/thisappinit.c b/src/app/thisappinit.c
+--- a/src/app/thisappinit.c	2010-12-06 05:51:01.000000000 +0100
++++ b/src/app/thisappinit.c	2014-05-29 13:46:49.894195170 +0200
+@@ -660,8 +660,8 @@ types_wrapper* instantiate_types(GtkWidg
+ 
+ 	doc_type_list[0].def_dir = (gchar *) x_malloc(strlen(HF_DIR)+1, "gchar (def_dir - HF_DIR)");
+ 	strcpy(doc_type_list[0].def_dir,HF_DIR);
+-	doc_type_list[1].def_dir = (gchar *) x_malloc(strlen(POV_DIR)+1, "gchar (def_dir - POV_DIR)");
+-	strcpy(doc_type_list[1].def_dir,POV_DIR);
++	/*doc_type_list[1].def_dir = (gchar *) x_malloc(strlen(POV_DIR)+1, "gchar (def_dir - POV_DIR)");
++	strcpy(doc_type_list[1].def_dir,POV_DIR);*/
+ 	return types_wrapper_new(main_window, doc_type_list, doc_type_item, NBDOCTYPES);
+ 
+ }
diff --git a/geomorph-format-security.patch b/geomorph-format-security.patch
new file mode 100644
index 0000000..990328c
--- /dev/null
+++ b/geomorph-format-security.patch
@@ -0,0 +1,24 @@
+diff -rup a/src/hf/gl_preview.c b/src/hf/gl_preview.c
+--- a/src/hf/gl_preview.c	2010-11-28 04:34:44.000000000 +0100
++++ b/src/hf/gl_preview.c	2014-05-28 14:37:00.048364287 +0200
+@@ -30,7 +30,7 @@ in Linux Magazine France, n. 33-34.
+  /* 2005-11: change library from gtkglarea to gtkglext
+  */
+ 
+-
++#include <locale.h>
+ #include <GL/gl.h>
+ #include <GL/glu.h>
+ #include <gtk/gtk.h>
+diff -rup a/src/utils/menus_n_tools.c b/src/utils/menus_n_tools.c
+--- a/src/utils/menus_n_tools.c	2010-07-31 06:10:44.000000000 +0200
++++ b/src/utils/menus_n_tools.c	2014-05-28 13:50:01.853495106 +0200
+@@ -27,7 +27,7 @@
+ // #define _(x) pr(x)
+ 
+ gchar *pr(gchar *x) {
+-	printf(x);
++	printf("%s", x);
+ 	return (gchar *) gettext(x);
+ }
+ 
diff --git a/geomorph.desktop b/geomorph.desktop
new file mode 100644
index 0000000..62973c3
--- /dev/null
+++ b/geomorph.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Geomorph
+GenericName=Height field editor for Linux
+GenericName[fr]=Editeur de terrains pour Linux
+Exec=geomorph %f
+Icon=/usr/share/icons/GeoMorph.xpm
+Terminal=false
+MimeType=image/png;
+Categories=Graphics;3DGraphics;
+StartupNotify=true
diff --git a/geomorph.spec b/geomorph.spec
new file mode 100644
index 0000000..e0fcf7d
--- /dev/null
+++ b/geomorph.spec
@@ -0,0 +1,90 @@
+%global major_ver 0.60
+Name:           geomorph
+Version:        %{major_ver}.1
+Release:        2%{?dist}
+Summary:        A height field editor for Linux
+License:        GPLv2
+Group:          Applications/Multimedia
+URL:            http://geomorph.sourceforge.net
+Source0:        http://sourceforge.net/projects/geomorph/files/geomorph/%{major_ver}/%{name}-%{version}.tar.gz
+Source1:        geomorph.desktop
+Patch0:         geomorph-format-security.patch
+Patch1:         geomorph-array-bounds.patch
+BuildRequires:  gtkglext-devel
+BuildRequires:  mesa-libGLU-devel
+BuildRequires:  desktop-file-utils
+Requires:       povray
+
+%description
+Geomorph is a height field generator and editor for the Linux operating system.
+A height field is a kind of topographic map.  It is a 2D projection of a 
+3D landscape.
+Geomorph generates square images and shows a 3D preview of the resulting
+landscape.  The resulting 2D image can be processed with a tool like Povray
+for rendering the landscape.
+
+%prep
+%setup -qn %{name}-%{version}
+%patch0 -p1 -b .format-security
+%patch1 -p1 -b .array-bounds
+
+# to avoid rpmlint warnings
+# Remove exe bit from pixmaps
+find . -name \*.xpm -exec chmod -x {} \;
+# Change fsf address
+find src -type f -exec sed -i -e '/Foundation/ s#Inc.,.*#51 Franklin Street, Fifth Floor, Boston, MA 02110-1301#' {} \;
+# Switch to UTF-8
+for file in LISEZMOI AFAIRE FAQ-fr
+do
+    iconv -f ISO-8859-1 -t UTF-8 $file > $file.utf8
+    touch -r $file $file.utf8
+    mv -f $file.utf8 $file
+done
+# Tarball contains an already compiled app.
+# Remove and recompile it.
+%{__rm} -f scenes/colmap
+
+# Remove Hardcoded path
+for file in install-step1-dir install-step2-rcfile install-step3-menu install-step4-desktop install-user
+do
+    sed -i -e '/^VERSION/ s#=.*#=%{version}#g' \
+        -e 's#/usr/local/share/geomorph#%{_datadir}/geomorph#g' \
+        $file
+done
+
+%configure \
+    --disable-rpath
+
+%build
+pushd scenes
+%{__cc} ${RPM_OPT_FLAGS} -o colmap colmap.c
+popd
+make %{?_smp_mflags}
+
+%install
+make install DESTDIR="%{buildroot}"
+%find_lang %{name}
+mv %{buildroot}%{_datadir}/geomorph/%{version}/scenes/colmap %{buildroot}%{_bindir}/
+%{__rm} -f %{buildroot}%{_datadir}/geomorph/%{version}/scenes/colmap.c
+# Create directories
+%{__mkdir_p} %{buildroot}%{_datadir}/icons
+%{__mkdir_p} %{buildroot}%{_datadir}/applications
+# Copy new desktop file
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE1}
+# Copy icon file
+%{__cp} GeoMorph.xpm %{buildroot}%{_datadir}/icons
+
+%files -f %{name}.lang
+%doc ABOUT-NLS AFAIRE AUTHORS ChangeLog FAQ FAQ-fr LISEZMOI NEWS README TODO geomorphrc_de geomorphrc_en geomorphrc_fr
+%{_bindir}/geomorph
+%{_bindir}/colmap
+%{_datadir}/geomorph
+%{_datadir}/applications/geomorph.desktop
+%{_datadir}/icons/GeoMorph.xpm
+
+%changelog
+* Tue May 27 2014 Didier Fabert <didier.fabert at gmail.com> 0.60.1-2
+- Follow Fedora Guidelines
+
+* Tue Feb 14 2012 Didier Fabert <didier.fabert at gmail.com> 0.60.1-1
+- First Release
diff --git a/sources b/sources
index e69de29..31e8c91 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+91d46ac4b2d1a630bca712d675cb3b25  geomorph-0.60.1.tar.gz


More information about the scm-commits mailing list