summaryrefslogtreecommitdiff
path: root/graphics/geomorph
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2014-01-11 00:52:02 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2014-01-11 00:52:02 +0000
commit2fc2b5b8debfd2992727e5f217fb9784d126d2d1 (patch)
tree89e0cd105552887d43cd2ea3d4ccfaa4afe371c9 /graphics/geomorph
parent- Add LICENSE (diff)
- Update to 0.60.1
- Support staging - Use new LIB_DEPENDS syntax - Use new OPTIONS features - Fix build on 10.x
Diffstat (limited to 'graphics/geomorph')
-rw-r--r--graphics/geomorph/Makefile44
-rw-r--r--graphics/geomorph/distinfo4
-rw-r--r--graphics/geomorph/files/patch-src-app-main.c39
-rw-r--r--graphics/geomorph/files/patch-src-fourier-fft.h18
-rw-r--r--graphics/geomorph/files/patch-src-hf-view__area.c10
-rw-r--r--graphics/geomorph/files/patch-src-utils-writepng.c19
-rw-r--r--graphics/geomorph/pkg-plist57
7 files changed, 49 insertions, 142 deletions
diff --git a/graphics/geomorph/Makefile b/graphics/geomorph/Makefile
index ebbebee184eb..964f75b85030 100644
--- a/graphics/geomorph/Makefile
+++ b/graphics/geomorph/Makefile
@@ -2,57 +2,41 @@
# $FreeBSD$
PORTNAME= geomorph
-PORTVERSION= 0.50
-PORTREVISION= 5
+PORTVERSION= 0.60.1
CATEGORIES= graphics
-MASTER_SITES= SF
-EXTRACT_SUFX= .tgz
+MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/0.60/
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Height field generator and editor
-LIB_DEPENDS= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext \
- png15:${PORTSDIR}/graphics/png
+LIB_DEPENDS= libgtkglext-x11-1.0.so:${PORTSDIR}/x11-toolkits/gtkglext \
+ libpng.so:${PORTSDIR}/graphics/png
USES= gmake pkgconfig
USE_GL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-libintl-prefix="${LOCALBASE}"
+USE_GCC= any # lots of severely broken code
PLIST_SUB= PORTVERSION=${PORTVERSION}
+PORTDATA= *
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE= NLS
+OPTIONS_SUB= yes
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext
-PLIST_SUB+= NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.endif
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "sparc64"
-CFLAGS+= -O0
-.endif
+NLS_USES= gettext
+NLS_CONFIGURE_ENABLE= nls
post-patch:
- @${REINPLACE_CMD} -e 's|libpng|libpng15|' ${WRKSRC}/configure
- @${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}|'
+ @${FIND} ${WRKSRC} -type f -exec ${REINPLACE_CMD} -i '' -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:
- ${INSTALL_DATA} ${WRKSRC}/geomorph.desktop ${PREFIX}/share/applications/
- ${INSTALL_DATA} ${WRKSRC}/GeoMorph.xpm ${PREFIX}/share/pixmaps/geomorph.xpm
+ ${INSTALL_DATA} ${WRKSRC}/geomorph.desktop ${STAGEDIR}${PREFIX}/share/applications/
+ ${INSTALL_DATA} ${WRKSRC}/GeoMorph.xpm ${STAGEDIR}${PREFIX}/share/pixmaps/
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/graphics/geomorph/distinfo b/graphics/geomorph/distinfo
index 03d9c2999791..839d16259076 100644
--- a/graphics/geomorph/distinfo
+++ b/graphics/geomorph/distinfo
@@ -1,2 +1,2 @@
-SHA256 (geomorph-0.50.tgz) = 8d99c05808c9a4a95c5a3f0b882922230a21343825dc821819895cb4213c4d29
-SIZE (geomorph-0.50.tgz) = 705015
+SHA256 (geomorph-0.60.1.tar.gz) = 47cdda8c778d5260362d71adfa52eaf556b4f0dfc169c65fa6c809e216c5d572
+SIZE (geomorph-0.60.1.tar.gz) = 749579
diff --git a/graphics/geomorph/files/patch-src-app-main.c b/graphics/geomorph/files/patch-src-app-main.c
index 47dafbe6ece6..f2efd5de2a6d 100644
--- a/graphics/geomorph/files/patch-src-app-main.c
+++ b/graphics/geomorph/files/patch-src-app-main.c
@@ -1,6 +1,6 @@
---- 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 @@
+--- src/app/main.c.orig 2010-10-30 08:17:00.000000000 +0400
++++ src/app/main.c 2013-08-28 03:51:05.535226256 +0400
+@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
@@ -8,8 +8,8 @@
#include "./main.h"
#include "./globals.h"
#include "./app.h"
-@@ -56,6 +57,12 @@
- if (command) free(command);
+@@ -68,6 +69,12 @@
+ if (command) x_free(command);
}
+char *get_current_dir_name() {
@@ -21,7 +21,7 @@
gchar *find_config_file() {
// Returns the config file name (name OPTION_FILE, defined in globals.h),
// with its full path
-@@ -71,55 +78,22 @@
+@@ -83,59 +90,23 @@
// 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)
@@ -31,16 +31,16 @@
- 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);
+- x_free(path_n_file);
- 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);
+- x_free(path_n_file);
- 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);
+- if (path_n_file) x_free(path_n_file);
- path_n_file = concat_dname_fname(default_dir, OPTION_FILE);
- if (directory_exists(default_dir)) {
- if (!filexists(path_n_file)) {
@@ -51,29 +51,34 @@
- 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));
+- buf = (gchar *) x_malloc(strlen(_("Creation of the default working directory?"))+1+strlen(default_dir), "const gchar (buf - Creation of the default working directory MSG)");
- sprintf(buf,_("Creation of the default working directory?"),default_dir);
- if (!yes_no(buf,TRUE))
- exit(0);
-- if (buf) free(buf);
+-// if (buf) x_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);
+- if (command) x_free(command);
- create_config_file(path_n_file);
+- command = concat_dname_fname(get_data_dir(),"install-step3-menu");
+- if (system(command))
+- my_msg(_("Error during the creation of Geomorph in the Gnome or KDE menu"),WARNING);
+- if (command) x_free(command);
- if (shortcuts) {
-- command = concat_dname_fname(get_data_dir(),"install-step3-desktop");
+- command = concat_dname_fname(get_data_dir(),"install-step4-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 (buf) x_free(buf);
+- if (command) x_free(command);
- }
-- if (path_n_file) free(path_n_file);
+- if (path_n_file) x_free(path_n_file);
- }
- }
+ default_dir = concat_dname_fname(getenv("HOME"), DEF_DIR_NAME);
-+ path_n_file = concat_dname_fname(default_dir, OPTION_FILE);
++ 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
diff --git a/graphics/geomorph/files/patch-src-fourier-fft.h b/graphics/geomorph/files/patch-src-fourier-fft.h
deleted file mode 100644
index e855451b6f3d..000000000000
--- a/graphics/geomorph/files/patch-src-fourier-fft.h
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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-view__area.c b/graphics/geomorph/files/patch-src-hf-view__area.c
new file mode 100644
index 000000000000..d17e1b570a2d
--- /dev/null
+++ b/graphics/geomorph/files/patch-src-hf-view__area.c
@@ -0,0 +1,10 @@
+--- src/hf/view_area.c.orig 2010-07-31 07:31:37.000000000 +0400
++++ src/hf/view_area.c 2013-12-24 08:09:42.420751997 +0400
+@@ -20,6 +20,7 @@
+
+ // Modified 2005-01-09 for removing double buffering (now auto with GTK2) PSTG
+
++#include "../utils/x_alloc.h"
+ #include "view_area.h"
+ #include <stdlib.h>
+ #include <stdio.h>
diff --git a/graphics/geomorph/files/patch-src-utils-writepng.c b/graphics/geomorph/files/patch-src-utils-writepng.c
deleted file mode 100644
index b4a0e142681a..000000000000
--- a/graphics/geomorph/files/patch-src-utils-writepng.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/utils/writepng.c.orig 2008-01-23 03:14:22.000000000 +0100
-+++ src/utils/writepng.c 2012-05-04 12:28:50.000000000 +0200
-@@ -20,6 +20,7 @@
- */
-
- #include <png.h>
-+#include <zlib.h>
- #include <stdlib.h>
- #include "./utils.h"
-
-@@ -75,7 +76,7 @@
-
- /* Set error handling. */
-
-- if (setjmp(png_ptr->jmpbuf))
-+ if (setjmp(png_jmpbuf(png_ptr)))
- {
- /* If we get here, we had a problem writing the file */
- fclose(fp);
diff --git a/graphics/geomorph/pkg-plist b/graphics/geomorph/pkg-plist
index 1bcf01650231..c31404593092 100644
--- a/graphics/geomorph/pkg-plist
+++ b/graphics/geomorph/pkg-plist
@@ -1,61 +1,6 @@
bin/geomorph
share/applications/geomorph.desktop
-%%DATADIR%%/%%PORTVERSION%%/AFAIRE
-%%DATADIR%%/%%PORTVERSION%%/FAQ
-%%DATADIR%%/%%PORTVERSION%%/FAQ-fr
-%%DATADIR%%/%%PORTVERSION%%/LISEZMOI
-%%DATADIR%%/%%PORTVERSION%%/README
-%%DATADIR%%/%%PORTVERSION%%/TODO
-%%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/cracknet.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/cracknet_bumptest.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/cracknet_nobump.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/desert.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/desert_new.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/geomorph.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/geomorph_txtr.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/giant_causeway.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/global_settings.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/iced_satellite.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/maprock1.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/maprock_brownmud.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/maprock_redmud.inc
-%%DATADIR%%/%%PORTVERSION%%/scenes/moon.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/mountains.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/mountains_test.pov
-%%DATADIR%%/%%PORTVERSION%%/scenes/mountains_with_water.pov
-%%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/terraces.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.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%%
+share/pixmaps/GeoMorph.xpm