diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2006-03-18 17:13:52 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2006-03-18 17:13:52 +0000 |
commit | 195e1f0a249fc5c721fd8018c887bb81739e860b (patch) | |
tree | eb407c2917373e8b82140b206189addfddadbdbf /graphics/geomorph | |
parent | 0f3bde51ba024120f1df8fbfede98a2d53bc0a3a (diff) | |
download | ports-195e1f0a249fc5c721fd8018c887bb81739e860b.tar.gz ports-195e1f0a249fc5c721fd8018c887bb81739e860b.zip |
Notes
Diffstat (limited to 'graphics/geomorph')
-rw-r--r-- | graphics/geomorph/Makefile | 41 | ||||
-rw-r--r-- | graphics/geomorph/distinfo | 3 | ||||
-rw-r--r-- | graphics/geomorph/files/extra-patch-src-hf-gl_preview.c | 34 | ||||
-rw-r--r-- | graphics/geomorph/files/extra-patch-src-hf-hf_calc.c | 11 | ||||
-rw-r--r-- | graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c | 13 | ||||
-rw-r--r-- | graphics/geomorph/files/patch-src-app-main.c | 65 | ||||
-rw-r--r-- | graphics/geomorph/pkg-descr | 11 | ||||
-rw-r--r-- | graphics/geomorph/pkg-plist | 50 |
8 files changed, 228 insertions, 0 deletions
diff --git a/graphics/geomorph/Makefile b/graphics/geomorph/Makefile new file mode 100644 index 000000000000..5b1bcd270714 --- /dev/null +++ b/graphics/geomorph/Makefile @@ -0,0 +1,41 @@ +# ports collection makefile for: geomorph +# Date created: 24 Feb 2006 +# Whom: Dmitry Marakasov <amdmi3@mail.ru> +# +# $FreeBSD$ +# + +PORTNAME= geomorph +PORTVERSION= 0.31 +CATEGORIES= graphics +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= ${PORTNAME} +EXTRACT_SUFX= .tgz + +MAINTAINER= amdmi3@mail.ru +COMMENT= Height field generator and editor + +LIB_DEPENDS= gtkglext-x11-1.0.2:${PORTSDIR}/x11-toolkits/gtkglext + +USE_X_PREFIX= yes +USE_GL= yes +USE_GMAKE= yes +GNU_CONFIGURE= yes + +PLIST_SUB= PORTVERSION=${PORTVERSION} + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-* +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|libpng|libpng12|' ${WRKSRC}/configure + @${REINPLACE_CMD} -e 's|/usr/local/share/geomorph|${DATADIR}|' ${WRKSRC}/install-step* ${WRKSRC}/install-user ${WRKSRC}/src/app/app.c + @${REINPLACE_CMD} -e 's|\$$HOME/geomorph|\$$HOME/.geomorph|' ${WRKSRC}/install-step* ${WRKSRC}/install-user + @${REINPLACE_CMD} -e 's|>&|>|' ${WRKSRC}/install-step2-rcfile + @${REINPLACE_CMD} -e '/DEFAULT_DIR/ s|geomorph|.geomorph|' ${WRKSRC}/src/app/globals.h ${WRKSRC}/src/hf/globals.h + @${RM} ${WRKSRC}/install-step*.bak ${WRKSRC}/install-user*.bak + +.include <bsd.port.post.mk> diff --git a/graphics/geomorph/distinfo b/graphics/geomorph/distinfo new file mode 100644 index 000000000000..5e12595852a4 --- /dev/null +++ b/graphics/geomorph/distinfo @@ -0,0 +1,3 @@ +MD5 (geomorph-0.31.tgz) = 778b2ec4efba77b7efb402bc17dc90ac +SHA256 (geomorph-0.31.tgz) = 8c505f6ee9a0d4c53565e608e68a62b54b966bbae41ced562fabcb191f0097a1 +SIZE (geomorph-0.31.tgz) = 1041449 diff --git a/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c b/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c new file mode 100644 index 000000000000..2457bf134b72 --- /dev/null +++ b/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c @@ -0,0 +1,34 @@ +--- src/hf/gl_preview.c.orig Wed Nov 23 06:44:22 2005 ++++ src/hf/gl_preview.c Mon Mar 6 12:59:24 2006 +@@ -337,10 +337,10 @@ + // printf ("Realize Event\n"); + + gl_preview_struct *gl_hf; +- gl_hf = ((hf_wrapper_struct *) data)->gl_preview; + + GdkGLContext *glcontext = gtk_widget_get_gl_context (widget); + GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget); ++ gl_hf = ((hf_wrapper_struct *) data)->gl_preview; + + /*** OpenGL BEGIN ***/ + if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) { +@@ -588,6 +588,8 @@ + gint i; + camera_struct *camera; + gl_preview_struct *gl_hf; ++ GdkGLContext *glcontext; ++ GdkGLDrawable *gldrawable; + gl_hf = ((hf_wrapper_struct *) data)->gl_preview; + camera = gl_hf->cameras[gl_hf->current_camera_id]; + /* Draw only on the last expose event. */ +@@ -600,8 +602,8 @@ + + // printf("************* GL DRAWING 2 ************** - HFW: %d\n", data); + +- GdkGLContext *glcontext = gtk_widget_get_gl_context (widget); +- GdkGLDrawable *gldrawable = gtk_widget_get_gl_drawable (widget); ++ glcontext = gtk_widget_get_gl_context (widget); ++ gldrawable = gtk_widget_get_gl_drawable (widget); + + /*** OpenGL BEGIN ***/ + if (!gdk_gl_drawable_gl_begin (gldrawable, glcontext)) diff --git a/graphics/geomorph/files/extra-patch-src-hf-hf_calc.c b/graphics/geomorph/files/extra-patch-src-hf-hf_calc.c new file mode 100644 index 000000000000..cf8173f9c00a --- /dev/null +++ b/graphics/geomorph/files/extra-patch-src-hf-hf_calc.c @@ -0,0 +1,11 @@ +--- src/hf/hf_calc.c.orig Tue Nov 22 07:25:40 2005 ++++ src/hf/hf_calc.c Mon Mar 6 13:08:02 2006 +@@ -1298,6 +1298,8 @@ + overflow); + } + ++#define lround(x) (((x) - (gdouble)(long int)(x)) < 0.5 ? (x) : (x+1.0)) ++ + void hf_fast_rotate (hf_type *hf_in, hf_type *hf_out, gint hf_size, gint angle) { + // Rotation of a square HF, preview style, with aliasing + // "Wraps" diff --git a/graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c b/graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c new file mode 100644 index 000000000000..ff2ff2701875 --- /dev/null +++ b/graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c @@ -0,0 +1,13 @@ +--- src/hf/subdiv1_dialog.c.orig Thu Apr 7 05:34:56 2005 ++++ src/hf/subdiv1_dialog.c Mon Mar 6 12:55:02 2006 +@@ -55,9 +55,9 @@ + } + + gint change_subdiv1_seed(GtkWidget *entry, gpointer data) { ++ unsigned int s; + hf_wrapper_struct *hfw; + hfw = (hf_wrapper_struct *) * (hf_wrapper_struct **) data; +- unsigned int s; + // Avoid double display... the callback seems always to be called twice, + // the first time with an empty entry, I don't know why + // (maybe because "gtk_entry_set_text" blanks the field before writing in it??) diff --git a/graphics/geomorph/files/patch-src-app-main.c b/graphics/geomorph/files/patch-src-app-main.c new file mode 100644 index 000000000000..7abe210a6f2f --- /dev/null +++ b/graphics/geomorph/files/patch-src-app-main.c @@ -0,0 +1,65 @@ +--- src/app/main.c.orig Sun Nov 6 08:52:50 2005 ++++ src/app/main.c Tue Feb 28 04:00:28 2006 +@@ -19,6 +19,7 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + ++#include <sys/param.h> + #include "./main.h" + #include "./globals.h" + // Gtkglext - 2005-11 +@@ -48,37 +49,21 @@ + if (command) free(command); + } + ++char *get_current_dir_name() { ++ char *buf = malloc(MAXPATHLEN); ++ getwd(buf); ++ return buf; ++} ++ + gchar *find_config_file() { + // Returns the config file name (name OPTIONS_FILE, defined in globals.h), + // with its full path + gchar *default_dir, *path_n_file, *buf, *command; + gboolean shortcuts; + +-// We try: +-// 1. in the current directory. (./OPTIONS_FILE = ./geomorphrc) +-// 2. if not found, we try ./DEFAULT_DIR/OPTIONS_FILE (./geomorph/geomorphrc) +-// 3. if not found, we try $HOME/OPTIONS_FILE (~/geomorphrc) +-// 4. if not found, we try in $HOME/DEFAULT_DIR (~/geomorph/geomorphrc) +-// --> if OPTIONS_FILE was not found, and +-// if $HOME/DEFAULT_DIR doesn't exist, we create the required files +-// The directory where OPTIONS_FILE is found becomes the default one (DEF_DIR) +- +- // Try ./OPTIONS_FILE +- default_dir = (gchar *) get_current_dir_name(); +- path_n_file = concat_dname_fname(default_dir,OPTIONS_FILE); +- if (!filexists(path_n_file)) { // Try ./DEFAULT_DIR/OPTIONS_FILE +- default_dir = concat_dname_fname(default_dir,DEFAULT_DIR); +- if (path_n_file) +- free(path_n_file); +- path_n_file = concat_dname_fname(default_dir,OPTIONS_FILE); +- if (!filexists(path_n_file)) { // Try in the home directory - ~/OPTIONS_FILE ++ // Config file is located under $HOME/.geomorph/geomorphrc + default_dir = getenv("HOME"); +- if (path_n_file) +- free(path_n_file); +- path_n_file = concat_dname_fname(default_dir, OPTIONS_FILE); +- if (!filexists(path_n_file)) { // Try ~/DEFAULT_DIR/OPTIONS_FILE + default_dir = concat_dname_fname(default_dir,DEFAULT_DIR); +- if (path_n_file) free(path_n_file); + path_n_file = concat_dname_fname(default_dir, OPTIONS_FILE); + if (directory_exists(default_dir)) { + if (!filexists(path_n_file)) { +@@ -109,9 +94,6 @@ + } + if (path_n_file) free(path_n_file); + } +- } +- } +- } + return add_filesep(default_dir); + } + diff --git a/graphics/geomorph/pkg-descr b/graphics/geomorph/pkg-descr new file mode 100644 index 000000000000..dbcb6990bab6 --- /dev/null +++ b/graphics/geomorph/pkg-descr @@ -0,0 +1,11 @@ +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. + +WWW: http://geomorph.sourceforge.net/ diff --git a/graphics/geomorph/pkg-plist b/graphics/geomorph/pkg-plist new file mode 100644 index 000000000000..8e88fd477811 --- /dev/null +++ b/graphics/geomorph/pkg-plist @@ -0,0 +1,50 @@ +bin/geomorph +%%DATADIR%%/%%PORTVERSION%%/AFAIRE +%%DATADIR%%/%%PORTVERSION%%/FAQ +%%DATADIR%%/%%PORTVERSION%%/FAQ-fr +%%DATADIR%%/%%PORTVERSION%%/LISEZMOI +%%DATADIR%%/%%PORTVERSION%%/README +%%DATADIR%%/%%PORTVERSION%%/TODO +%%DATADIR%%/%%PORTVERSION%%/geomorphrc +%%DATADIR%%/%%PORTVERSION%%/geomorphrc_de +%%DATADIR%%/%%PORTVERSION%%/geomorphrc_en +%%DATADIR%%/%%PORTVERSION%%/geomorphrc_fr +%%DATADIR%%/%%PORTVERSION%%/install-step1-dir +%%DATADIR%%/%%PORTVERSION%%/install-step2-rcfile +%%DATADIR%%/%%PORTVERSION%%/install-step3-desktop +%%DATADIR%%/%%PORTVERSION%%/install-user +%%DATADIR%%/%%PORTVERSION%%/scenes/canyon.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/colmap +%%DATADIR%%/%%PORTVERSION%%/scenes/colmap.c +%%DATADIR%%/%%PORTVERSION%%/scenes/desert.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/desert_new.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/desert_with_tree.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/geomorph_txtr.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/global_settings.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/iced_satellite.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/maprock1.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/moon.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/mountains.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/olivier4.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/painted_desert.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/painted_desert_map1.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/painted_desert_map2.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/painted_desert_map3.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/sea_and_fog.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/sea_and_rocks.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/sea_n_moon.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/simple_terrain.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/slope_patterns.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/stars.inc +%%DATADIR%%/%%PORTVERSION%%/scenes/sunseta.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/sunsetb.pov +%%DATADIR%%/%%PORTVERSION%%/scenes/uranus.inc +%%DATADIR%%/%%PORTVERSION%%/splash.jpg +%%DATADIR%%/%%PORTVERSION%%/update-rc +%%DATADIR%%/%%PORTVERSION%%/v0_30_new_sections +%%DATADIR%%/GeoMorph.xpm +%%DATADIR%%/Geomorph-gnome.desktop +%%DATADIR%%/Geomorph-kde.desktop +@dirrm %%DATADIR%%/%%PORTVERSION%%/scenes +@dirrm %%DATADIR%%/%%PORTVERSION%% +@dirrm %%DATADIR%% |