- Update to 0.50

- Add optional NLS support
- Install icon & desktop entry

Approved by:	miwi (mentor implicit)
This commit is contained in:
Dmitry Marakasov
2008-08-02 19:22:57 +00:00
parent f97e18adcb
commit a7d797e163
9 changed files with 118 additions and 121 deletions

View File

@@ -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>

View File

@@ -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

View File

@@ -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))

View File

@@ -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"

View File

@@ -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??)

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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"

View File

@@ -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