aboutsummaryrefslogtreecommitdiff
path: root/graphics/geomorph
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2008-08-02 19:22:57 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2008-08-02 19:22:57 +0000
commita7d797e163439bc894eba43319edeb7af848bb9f (patch)
tree07cfa6941621899b6cf67c4837984467ad35280d /graphics/geomorph
parentf97e18adcb0d36da14c3a522c59aea42f654cf23 (diff)
downloadports-a7d797e163439bc894eba43319edeb7af848bb9f.tar.gz
ports-a7d797e163439bc894eba43319edeb7af848bb9f.zip
- Update to 0.50
- Add optional NLS support - Install icon & desktop entry Approved by: miwi (mentor implicit)
Notes
Notes: svn path=/head/; revision=217949
Diffstat (limited to 'graphics/geomorph')
-rw-r--r--graphics/geomorph/Makefile34
-rw-r--r--graphics/geomorph/distinfo6
-rw-r--r--graphics/geomorph/files/extra-patch-src-hf-gl_preview.c34
-rw-r--r--graphics/geomorph/files/extra-patch-src-hf-hf_calc.c11
-rw-r--r--graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c13
-rw-r--r--graphics/geomorph/files/patch-src-app-main.c100
-rw-r--r--graphics/geomorph/files/patch-src-fourier-fft.h18
-rw-r--r--graphics/geomorph/files/patch-src-hf-img_process.c11
-rw-r--r--graphics/geomorph/pkg-plist12
9 files changed, 118 insertions, 121 deletions
diff --git a/graphics/geomorph/Makefile b/graphics/geomorph/Makefile
index f71bd4706401..2650b7047d97 100644
--- a/graphics/geomorph/Makefile
+++ b/graphics/geomorph/Makefile
@@ -6,11 +6,9 @@
#
PORTNAME= geomorph
-PORTVERSION= 0.40
-PORTREVISION= 2
+PORTVERSION= 0.50
CATEGORIES= graphics
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
+MASTER_SITES= SF
EXTRACT_SUFX= .tgz
MAINTAINER= amdmi3@FreeBSD.org
@@ -21,14 +19,34 @@ LIB_DEPENDS= gtkglext-x11-1.0.0:${PORTSDIR}/x11-toolkits/gtkglext
USE_GL= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --with-libintl-prefix="${LOCALBASE}"
PLIST_SUB= PORTVERSION=${PORTVERSION}
+.if !defined(WITHOUT_NLS)
+USE_GETTEXT= yes
+PLIST_SUB+= NLS=""
+.else
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB+= NLS="@comment "
+.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 '/DEFAULT_DIR/ s|geomorph|.geomorph|' ${WRKSRC}/src/app/globals.h ${WRKSRC}/src/hf/globals.h
- @${RM} ${WRKSRC}/install-step*.bak ${WRKSRC}/install-user*.bak
+ @${REINPLACE_CMD} -e 's|/usr/local/share/geomorph/GeoMorph.xpm|geomorph.xpm|' \
+ ${WRKSRC}/geomorph.desktop
+ @${FIND} ${WRKSRC} -exec ${GREP} -q /usr/local/share/geomorph {} \; -print | \
+ ${XARGS} ${REINPLACE_CMD} -e 's|/usr/local/share/geomorph|${DATADIR}|'
+ @${REINPLACE_CMD} -e 's|\$$HOME/geomorph|\$$HOME/.geomorph|' \
+ ${WRKSRC}/install-step* ${WRKSRC}/install-user ${WRKSRC}/update-rc
+ @${REINPLACE_CMD} -e '/DEF_DIR_NAME/ s|geomorph|.geomorph|' \
+ ${WRKSRC}/src/app/globals.h ${WRKSRC}/src/hf/globals.h
+ @${FIND} ${WRKSRC} -name "*.bak" -delete
+ @${RM} ${WRKSRC}/install*~
+
+post-install:
+ ${MKDIR} ${PREFIX}/share/applications
+ ${INSTALL_DATA} ${WRKSRC}/geomorph.desktop ${PREFIX}/share/applications/
+ ${INSTALL_DATA} ${WRKSRC}/GeoMorph.xpm ${PREFIX}/share/pixmaps/geomorph.xpm
.include <bsd.port.mk>
diff --git a/graphics/geomorph/distinfo b/graphics/geomorph/distinfo
index 1452387119ca..f147896c33fc 100644
--- a/graphics/geomorph/distinfo
+++ b/graphics/geomorph/distinfo
@@ -1,3 +1,3 @@
-MD5 (geomorph-0.40.tgz) = a094b0fea21affbef449c7df38b19e62
-SHA256 (geomorph-0.40.tgz) = e7bb107bb46d9098762383af3d8ee0d1c02629dc624166de5cb0a4fc44712768
-SIZE (geomorph-0.40.tgz) = 676510
+MD5 (geomorph-0.50.tgz) = 57c3872f33f9012c3167fc07a92e1d54
+SHA256 (geomorph-0.50.tgz) = 8d99c05808c9a4a95c5a3f0b882922230a21343825dc821819895cb4213c4d29
+SIZE (geomorph-0.50.tgz) = 705015
diff --git a/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c b/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c
deleted file mode 100644
index 2457bf134b72..000000000000
--- a/graphics/geomorph/files/extra-patch-src-hf-gl_preview.c
+++ /dev/null
@@ -1,34 +0,0 @@
---- 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
deleted file mode 100644
index cf8173f9c00a..000000000000
--- a/graphics/geomorph/files/extra-patch-src-hf-hf_calc.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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
deleted file mode 100644
index ff2ff2701875..000000000000
--- a/graphics/geomorph/files/extra-patch-src-hf-subdiv1_dialog.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- 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
index 7abe210a6f2f..47dafbe6ece6 100644
--- a/graphics/geomorph/files/patch-src-app-main.c
+++ b/graphics/geomorph/files/patch-src-app-main.c
@@ -1,5 +1,5 @@
---- src/app/main.c.orig Sun Nov 6 08:52:50 2005
-+++ src/app/main.c Tue Feb 28 04:00:28 2006
+--- src/app/main.c.orig 2008-06-02 08:16:24.000000000 +0400
++++ src/app/main.c 2008-08-02 19:32:26.000000000 +0400
@@ -19,6 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
@@ -7,8 +7,8 @@
+#include <sys/param.h>
#include "./main.h"
#include "./globals.h"
- // Gtkglext - 2005-11
-@@ -48,37 +49,21 @@
+ #include "./app.h"
+@@ -56,6 +57,12 @@
if (command) free(command);
}
@@ -19,47 +19,75 @@
+}
+
gchar *find_config_file() {
- // Returns the config file name (name OPTIONS_FILE, defined in globals.h),
+ // Returns the config file name (name OPTION_FILE, defined in globals.h),
// with its full path
- gchar *default_dir, *path_n_file, *buf, *command;
- gboolean shortcuts;
+@@ -71,55 +78,22 @@
+ // if $HOME/DEF_DIR_NAME doesn't exist, we create the required files
+ // The directory where OPTION_FILE is found becomes the default one (DEF_DIR)
--// 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
+- // Try ./OPTION_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);
+- path_n_file = concat_dname_fname(default_dir,OPTION_FILE);
+- if (!filexists(path_n_file)) { // Try ./DEF_DIR_NAME/OPTION_FILE
+- default_dir = concat_dname_fname(default_dir,DEF_DIR_NAME);
- 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");
+- path_n_file = concat_dname_fname(default_dir,OPTION_FILE);
+- if (!filexists(path_n_file)) { // Try in the home directory - ~/OPTION_FILE
+- 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);
+- path_n_file = concat_dname_fname(default_dir, OPTION_FILE);
+- if (!filexists(path_n_file)) { // Try ~/DEFAULT_DIR/OPTION_FILE
+- default_dir = concat_dname_fname(default_dir,DEF_DIR_NAME);
- 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);
- }
+- path_n_file = concat_dname_fname(default_dir, OPTION_FILE);
+- if (directory_exists(default_dir)) {
+- if (!filexists(path_n_file)) {
+- // Big problem, create a default rc file
+- create_config_file(path_n_file);
+- }
+- }
+- else {
+- // Geomorph directory ("default_dir") doesn't exist
+- // Create one with default scenes and rc file
+- buf = malloc(strlen(_("Creation of the default working directory?"))+1+strlen(default_dir));
+- sprintf(buf,_("Creation of the default working directory?"),default_dir);
+- if (!yes_no(buf,TRUE))
+- exit(0);
+- if (buf) free(buf);
+- shortcuts = yes_no(_("Add shortcuts on the KDE and GNOME desktops?"), TRUE);
+- command = concat_dname_fname(get_data_dir(),"install-step1-dir");
+- if (system(command))
+- my_msg(_("Fatal error during the creation of the default working directory"),ABORT);
+- if (command) free(command);
+- create_config_file(path_n_file);
+- if (shortcuts) {
+- command = concat_dname_fname(get_data_dir(),"install-step3-desktop");
+- if (system(command))
+- my_msg(_("Error during the creation of one shortcut or both"),WARNING);
+- if (buf) free(buf);
+- if (command) free(command);
+- }
+- if (path_n_file) free(path_n_file);
+- }
- }
-- }
-- }
++ default_dir = concat_dname_fname(getenv("HOME"), DEF_DIR_NAME);
++ path_n_file = concat_dname_fname(default_dir, OPTION_FILE);
++ if (directory_exists(default_dir)) {
++ if (!filexists(path_n_file)) {
++ // Big problem, create a default rc file
++ create_config_file(path_n_file);
+ }
+ }
++ else {
++ command = concat_dname_fname(get_data_dir(),"install-step1-dir");
++ if (system(command))
++ my_msg(_("Fatal error during the creation of the default working directory"),ABORT);
++ if (command) free(command);
++ create_config_file(path_n_file);
++ }
++ if (path_n_file) free(path_n_file);
return add_filesep(default_dir);
}
diff --git a/graphics/geomorph/files/patch-src-fourier-fft.h b/graphics/geomorph/files/patch-src-fourier-fft.h
new file mode 100644
index 000000000000..e855451b6f3d
--- /dev/null
+++ b/graphics/geomorph/files/patch-src-fourier-fft.h
@@ -0,0 +1,18 @@
+--- src/fourier/fft.h.orig 2007-12-03 06:52:12.000000000 +0300
++++ src/fourier/fft.h 2008-08-02 18:46:31.000000000 +0400
+@@ -25,14 +25,7 @@
+ #define FFT_H
+ #include <stdlib.h>
+ #include <complex.h>
+-
+-#ifndef u_int
+- #define u_int unsigned int
+-#endif
+-
+-#ifndef u_char
+- #define u_char unsigned char
+-#endif
++#include <sys/types.h>
+
+ // Module computation
+
diff --git a/graphics/geomorph/files/patch-src-hf-img_process.c b/graphics/geomorph/files/patch-src-hf-img_process.c
deleted file mode 100644
index 00fc203b1e59..000000000000
--- a/graphics/geomorph/files/patch-src-hf-img_process.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/hf/img_process.c.orig Tue Dec 26 07:44:14 2006
-+++ src/hf/img_process.c Sun Feb 25 01:07:13 2007
-@@ -1828,6 +1828,8 @@
- free(buffer_out);
- }
-
-+#define log2(x) log(x)/log(2)
-+
- void hf_cut_graph (hf_struct_type *hf, gint index, gint axis) {
-
- // Draw a graph of line / column "index" on axis "axis"
diff --git a/graphics/geomorph/pkg-plist b/graphics/geomorph/pkg-plist
index 1c27ddb9aff1..b7c1d96bab6a 100644
--- a/graphics/geomorph/pkg-plist
+++ b/graphics/geomorph/pkg-plist
@@ -1,4 +1,5 @@
bin/geomorph
+share/applications/geomorph.desktop
%%DATADIR%%/%%PORTVERSION%%/AFAIRE
%%DATADIR%%/%%PORTVERSION%%/FAQ
%%DATADIR%%/%%PORTVERSION%%/FAQ-fr
@@ -50,11 +51,12 @@ bin/geomorph
%%DATADIR%%/%%PORTVERSION%%/update-rc
%%DATADIR%%/%%PORTVERSION%%/v0_30_new_sections
%%DATADIR%%/GeoMorph.xpm
-%%DATADIR%%/Geomorph-gnome.desktop
-%%DATADIR%%/Geomorph-kde.desktop
-share/locale/de/LC_MESSAGES/geomorph.mo
-share/locale/en/LC_MESSAGES/geomorph.mo
-share/locale/fr/LC_MESSAGES/geomorph.mo
+%%DATADIR%%/geomorph.desktop
+%%NLS%%share/locale/de/LC_MESSAGES/geomorph.mo
+%%NLS%%share/locale/en/LC_MESSAGES/geomorph.mo
+%%NLS%%share/locale/fr/LC_MESSAGES/geomorph.mo
+share/pixmaps/geomorph.xpm
@dirrm %%DATADIR%%/%%PORTVERSION%%/scenes
@dirrm %%DATADIR%%/%%PORTVERSION%%
@dirrm %%DATADIR%%
+@dirrmtry share/applications