From 3867f31f21c6baaa1f959ccdde9ff07729bd4da7 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Sat, 2 Mar 2013 06:29:42 +0000 Subject: - Update to 0.90 PR: 176549 Submitted by: Ports Fury --- science/gdis/Makefile | 89 +++++++++++++++++------- science/gdis/distinfo | 4 +- science/gdis/files/patch-crystal_graph.c | 71 ------------------- science/gdis/files/patch-file_bgf.c | 20 ------ science/gdis/files/patch-file_cgf.c | 69 ------------------- science/gdis/files/patch-grid.c | 20 ++++++ science/gdis/files/patch-gui_monty.c | 37 ---------- science/gdis/files/patch-gui_siesta.c | 113 ------------------------------- science/gdis/files/patch-main.c | 32 --------- science/gdis/files/patch-module.c | 10 --- science/gdis/files/patch-molsurf.c | 22 ------ 11 files changed, 87 insertions(+), 400 deletions(-) delete mode 100644 science/gdis/files/patch-crystal_graph.c delete mode 100644 science/gdis/files/patch-file_bgf.c delete mode 100644 science/gdis/files/patch-file_cgf.c create mode 100644 science/gdis/files/patch-grid.c delete mode 100644 science/gdis/files/patch-gui_monty.c delete mode 100644 science/gdis/files/patch-gui_siesta.c delete mode 100644 science/gdis/files/patch-main.c delete mode 100644 science/gdis/files/patch-module.c delete mode 100644 science/gdis/files/patch-molsurf.c (limited to 'science') diff --git a/science/gdis/Makefile b/science/gdis/Makefile index 4d969a0cdd2d..012da24cc565 100644 --- a/science/gdis/Makefile +++ b/science/gdis/Makefile @@ -1,47 +1,88 @@ -# ex:ts=8 -# Ports collection Makefile for: gdis -# Date created: Mar 3, 2002 -# Whom: ijliao -# +# Created y: ijliao # $FreeBSD$ -# PORTNAME= gdis -PORTVERSION= 0.89 -PORTREVISION= 6 +PORTVERSION= 0.90 CATEGORIES= science -MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} -EXTRACT_SUFX= -source.tgz +MASTER_SITES= SF +EXTRACT_SUFX= -src.tgz MAINTAINER= ports@FreeBSD.org COMMENT= Display and manipulation of isolated molecules and periodic systems -LIB_DEPENDS= gtkglext-x11-1.0.0:${PORTSDIR}/x11-toolkits/gtkglext +LICENSE= GPLv2 # (or later) -USE_GL= yes +LIB_DEPENDS= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext + +OPTIONS_DEFINE= DOCS + +USE_GL= glu USE_GNOME= gtk20 USE_GMAKE= yes -MAKEFILE= makefile -MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}" -ALL_TARGET= ${PORTNAME} - -CFLAGS+= -DINSTALL=\"\\\"${DATADIR}\\\"\" +MAKEFILE= GNUmakefile PORTDOCS= CHANGELOG README TODO PLIST_FILES= bin/gdis %%DATADIR%%/gdis.elements %%DATADIR%%/gdis.library \ - %%DATADIR%%/gdis.manual + %%DATADIR%%/gdis.manual share/pixmaps/gdis.xpm PLIST_DIRS= %%DATADIR%% +DESKTOP_ENTRIES="GDIS" "Molecular modelling GUI" \ + "${PREFIX}/share/pixmaps/gdis.xpm" "${PORTNAME}" "" true + +.include + +post-patch: + @${REINPLACE_CMD} -e \ + 's|"\(gdis.elements\)|"../share/gdis/\1| ; \ + s|"\(gdis.library\)|"../share/gdis/\1|' ${WRKSRC}/gdis.h + @${REINPLACE_CMD} -e \ + 's|"\(gdis.manual\)|"../share/gdis/\1|' ${WRKSRC}/gui_help.c + +do-configure: + @${ECHO_CMD} -n \ + > ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'USE_GUI=YES' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'USE_GRISU=NO' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'include makefile.src' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'CFLAGS:=$$(CFLAGS) -DWITH_GUI' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'INCS=`pkg-config --cflags gtkglext-1.0`' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'LIBS=`pkg-config --libs gtkglext-1.0`' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'OBJ=$$(SRC:.c=.o)' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'all: gdis' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} 'gdis: $$(OBJ)' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} ' $$(CC) $$(OBJ) $$(LDFLAGS) -o gdis $$(LIBS)' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} '.c.o:' \ + >> ${WRKSRC}/${MAKEFILE} + @${ECHO_CMD} ' $$(CC) $$(CFLAGS) -c $$< $$(INCS)' \ + >> ${WRKSRC}/${MAKEFILE} + @(cd ${WRKSRC} && ${SED} -e 's|logo_right_81|gdis|' \ + < logo_right.xpm > gdis.xpm) + do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/gdis ${PREFIX}/bin + (cd ${WRKSRC} && ${INSTALL_PROGRAM} gdis ${PREFIX}/bin) + (cd ${WRKSRC} && ${INSTALL_DATA} gdis.xpm ${PREFIX}/share/pixmaps) @${MKDIR} ${DATADIR} -.for file in gdis.elements gdis.library gdis.manual - ${INSTALL_DATA} ${WRKSRC}/${file} ${DATADIR} +.for i in gdis.elements gdis.library gdis.manual + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DATADIR}) .endfor -.if !defined(NOPORTDOCS) +.if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${DOCSDIR} -.for file in CHANGELOG README TODO - ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR} +.for i in ${PORTDOCS} + (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR}) .endfor .endif diff --git a/science/gdis/distinfo b/science/gdis/distinfo index f90d1a96b7de..dc355e7cf3cd 100644 --- a/science/gdis/distinfo +++ b/science/gdis/distinfo @@ -1,2 +1,2 @@ -SHA256 (gdis-0.89-source.tgz) = 594e9c199d1911e2b3d4da0a704e8cf14e7813c099e1bfdde294abb4895dfcec -SIZE (gdis-0.89-source.tgz) = 829113 +SHA256 (gdis-0.90-src.tgz) = bbf9de62dc978199d8e13e10d009b03753cee1172dcb7f9ee54c8f96b652d890 +SIZE (gdis-0.90-src.tgz) = 1895353 diff --git a/science/gdis/files/patch-crystal_graph.c b/science/gdis/files/patch-crystal_graph.c deleted file mode 100644 index d1f76909f64e..000000000000 --- a/science/gdis/files/patch-crystal_graph.c +++ /dev/null @@ -1,71 +0,0 @@ ---- crystal_graph.c.orig Thu Nov 24 15:07:31 2005 -+++ crystal_graph.c Thu Nov 2 00:00:23 2006 -@@ -110,6 +110,9 @@ - gdouble run_gulp(GSList *cores, gchar *species) - { - struct model_pak *new_model, *result_model; -+ gchar *cmd; -+ gdouble result; -+ - new_model = g_malloc(sizeof(struct model_pak)); - result_model = g_malloc(sizeof(struct model_pak)); - -@@ -128,13 +131,13 @@ - new_model->periodic = 0; - - write_gulp(new_model->gulp.temp_file, new_model); -- gchar * cmd = g_strdup_printf("%s < %s > %s", sysenv.gulp_path, -+ cmd = g_strdup_printf("%s < %s > %s", sysenv.gulp_path, - new_model->gulp.temp_file, new_model->gulp.out_file); - system(cmd); - g_free(cmd); - - read_gulp_output(new_model->gulp.out_file, result_model); -- gdouble result = result_model->gulp.energy; -+ result = result_model->gulp.energy; - model_free(new_model); - model_free(result_model); - -@@ -156,6 +159,9 @@ - gint b_images =(gint) model->monty.image_y + 0.5; - gint c_images =(gint) model->monty.image_z + 0.5; - -+ gint nr_molecules; -+ gdouble * single_energies; -+ - /* checks */ - g_return_val_if_fail(sysenv.gulp_path != NULL, 4); - g_return_val_if_fail(model != NULL, 1); -@@ -165,7 +171,7 @@ - gui_text_show(ERROR, "Can not calculate a crystal graph for non crystalline models"); - return 3; - } -- gint nr_molecules = g_slist_length(model->moles); -+ nr_molecules = g_slist_length(model->moles); - /* initialize the key chunk to hold the maximum number of */ - key_chunk = g_mem_chunk_create(gint, - nr_molecules * nr_molecules *(2*a_images+1)*(2*b_images+1)*(2*c_images+1), -@@ -180,7 +186,7 @@ - type_dreiding_gasteiger(model, DREIDING); - - /* calculate the single energies */ -- gdouble * single_energies = g_new0(gdouble, nr_molecules); -+ single_energies = g_new0(gdouble, nr_molecules); - - for (mol_iter = model->moles; mol_iter; mol_iter = mol_iter->next) - { -@@ -218,12 +224,13 @@ - if (pair != NULL) - { - gdouble *key_ptr; -+ gchar * combination; - key_ptr = g_chunk_new(gdouble, key_chunk); - *key_ptr = run_gulp(pair, model->gulp.species); - *key_ptr *= 96.48474; //eV --> kJ / mol - *key_ptr -= single_energies[m1]; - *key_ptr -= single_energies[m2]; -- gchar * combination = g_strdup_printf(" %i - %i [ %i %i %i ]", m1+1, m2+1, x,y,z); -+ combination = g_strdup_printf(" %i - %i [ %i %i %i ]", m1+1, m2+1, x,y,z); - g_tree_insert(tree, key_ptr, combination); - } - } diff --git a/science/gdis/files/patch-file_bgf.c b/science/gdis/files/patch-file_bgf.c deleted file mode 100644 index 634868ed7248..000000000000 --- a/science/gdis/files/patch-file_bgf.c +++ /dev/null @@ -1,20 +0,0 @@ ---- file_bgf.c.orig Thu Nov 24 13:58:48 2005 -+++ file_bgf.c Thu Nov 2 00:04:15 2006 -@@ -140,7 +140,7 @@ - gint read_bgf(gchar *filename, struct model_pak *data) - { - gint n=0, w, i, num_tokens; -- gchar **buff, **buff2, line[LINELEN]; -+ gchar **buff, **buff2, line[LINELEN], *species_string; - struct core_pak *core, *core_bond_to; - - GHashTable * atom_types_and_labels = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); -@@ -278,7 +278,7 @@ - } - - /* allocate 25 characters for each species line, that should be enough */ -- gchar * species_string = g_new(gchar, g_hash_table_size(atom_types_and_labels) * 25 ); -+ species_string = g_new(gchar, g_hash_table_size(atom_types_and_labels) * 25 ); - /* get all species from the hash table */ - g_hash_table_foreach(atom_types_and_labels, species_line_from_hash_table, &species_string); - diff --git a/science/gdis/files/patch-file_cgf.c b/science/gdis/files/patch-file_cgf.c deleted file mode 100644 index 3ba1b617f06f..000000000000 --- a/science/gdis/files/patch-file_cgf.c +++ /dev/null @@ -1,69 +0,0 @@ ---- file_cgf.c.orig Thu Nov 24 13:58:48 2005 -+++ file_cgf.c Thu Nov 2 00:10:25 2006 -@@ -188,7 +188,7 @@ - GSList *core_iter, *bond_iter;//, - GSList *primary_cores = NULL; - FILE *fp; -- gint nr_primary_cores = 0, max_bonds = 0, bond_counter = 0, num_tokens = 0, offset_counter = 0; -+ gint nr_primary_cores = 0, max_bonds = 0, bond_counter = 0, num_tokens = 0, offset_counter = 0, total_bonds = 0; - - gint *nr_bonds = g_new(gint, g_slist_length(data->cores)); - -@@ -197,6 +197,9 @@ - - gchar **buff; - -+ gdouble *bond_strengths; -+ gint *bond_to_values, *bond_offsets; -+ - /* checks and open file */ - g_return_val_if_fail(data != NULL, 1); - fp = fopen(filename, "wt"); -@@ -208,8 +211,6 @@ - fprintf(fp, "alpha= %3.5f beta= %3.5f gamma= %3.5f\n", data->pbc[3] * R2D, data->pbc[4] * R2D, data->pbc[5] * R2D); - fprintf(fp, "Spacegroup information: SPGR = %-24s OPT = %i\n", data->sginfo.spacename, data->sginfo.cellchoice); - -- gint total_bonds = 0; -- - for (core_iter = data->cores; core_iter; core_iter = core_iter->next) - { - core = (struct core_pak *)core_iter->data; -@@ -229,9 +230,9 @@ - } - } - -- gdouble * bond_strengths = g_new0(gdouble, total_bonds); -- gint * bond_to_values = g_new0(gint, total_bonds); -- gint * bond_offsets = g_new0(gint, total_bonds * 3); -+ bond_strengths = g_new0(gdouble, total_bonds); -+ bond_to_values = g_new0(gint, total_bonds); -+ bond_offsets = g_new0(gint, total_bonds * 3); - - fprintf(fp, "Nr of centres of mass: %i\n", nr_primary_cores); - fprintf(fp, "Maximum connectivity: %i\n", max_bonds); -@@ -280,6 +281,8 @@ - gint *bondto; - gdouble *bond_offsets; - gdouble *bond_strengths; -+ -+ gint bondto_counter = 0, bond_offsets_counter = 0, total_bonds = 0; - - /* checks */ - g_return_val_if_fail(data != NULL, 1); -@@ -366,8 +369,6 @@ - bond_offsets = g_new(gdouble, nr_bond_lines * num_gu * 15); - //bond_strengths = g_new(gdouble, nr_bond_lines * num_gu * 5); - -- gint bondto_counter = 0, bond_offsets_counter = 0; -- - /* create GUs a priori */ - for (n = 0; n < num_gu; ++n) - { -@@ -442,7 +443,6 @@ - fgetline(fp, line); - } - -- gint total_bonds = 0; - /* now we create new cores for each bond */ - w = 0; - for (n = 0; n < num_gu; ++n) diff --git a/science/gdis/files/patch-grid.c b/science/gdis/files/patch-grid.c new file mode 100644 index 000000000000..81b00d3d591d --- /dev/null +++ b/science/gdis/files/patch-grid.c @@ -0,0 +1,20 @@ +--- grid.c.orig ++++ grid.c +@@ -58,7 +58,7 @@ + if (grid_table) + g_hash_table_replace(grid_table, g_strdup(name), g_strdup(value)); + #else +-return(NULL); ++return; + #endif + } + +@@ -80,7 +80,7 @@ + if (grid_table) + g_hash_table_remove(grid_table, name); + #else +-return(NULL); ++return; + #endif + } + diff --git a/science/gdis/files/patch-gui_monty.c b/science/gdis/files/patch-gui_monty.c deleted file mode 100644 index 84c29b055ce5..000000000000 --- a/science/gdis/files/patch-gui_monty.c +++ /dev/null @@ -1,37 +0,0 @@ ---- gui_monty.c.orig Thu Nov 24 13:58:48 2005 -+++ gui_monty.c Thu Nov 2 00:13:29 2006 -@@ -492,6 +492,7 @@ - FILE *fp; - struct model_pak *model = data; - gchar *last_dirsep, *yes, *no; -+ gchar **hkls, **supersats, **out_dirs; - gint i; - - yes = g_strdup("yes"); -@@ -513,7 +514,7 @@ - g_strstrip(model->monty.hkls); - - /* split the string by endline characters */ -- gchar **hkls = g_strsplit(model->monty.hkls, "\n", INT_MAX); -+ hkls = g_strsplit(model->monty.hkls, "\n", INT_MAX); - - /* print all hkl values to the file */ - for (i = 0; *(hkls+i); ++i) -@@ -523,7 +524,7 @@ - - /* remove any whitespace, this also includes trailing \n characters */ - g_strstrip(model->monty.supersaturations); -- gchar **supersats = g_strsplit(model->monty.supersaturations, "\n", INT_MAX); -+ supersats = g_strsplit(model->monty.supersaturations, "\n", INT_MAX); - for (i = 0; *(supersats+i); ++i) - { - fprintf(fp, " -supersat %s\n", *(supersats +i)); -@@ -551,7 +552,7 @@ - - /* remove any whitespace, this also includes trailing \n characters */ - g_strstrip(model->monty.output_dirs); -- gchar **out_dirs = g_strsplit(model->monty.output_dirs, "\n", INT_MAX); -+ out_dirs = g_strsplit(model->monty.output_dirs, "\n", INT_MAX); - for (i = 0; *(out_dirs + i); ++i) - { - fprintf(fp, " -directory %s %s\n", *(hkls + i), *(out_dirs + i)); diff --git a/science/gdis/files/patch-gui_siesta.c b/science/gdis/files/patch-gui_siesta.c deleted file mode 100644 index 39450b620bf8..000000000000 --- a/science/gdis/files/patch-gui_siesta.c +++ /dev/null @@ -1,113 +0,0 @@ ---- gui_siesta.c.orig Mon Oct 16 10:59:37 2006 -+++ gui_siesta.c Thu Nov 2 00:30:56 2006 -@@ -58,10 +58,10 @@ - /*************************/ - void gui_siesta_dialog(void) - { -- siestafileWRITE = FALSE; - GtkWidget *window; - gpointer dialog; - struct model_pak *model; -+ siestafileWRITE = FALSE; - - model = sysenv.active_model; - -@@ -797,6 +797,8 @@ - struct model_pak * model; - struct core_pak *core_i; - struct core_pak *core_j; -+GtkWidget *hbox, *vbox, *vbox2, *window; -+GtkWidget *dialog, *frame; - - - model = sysenv.active_model; -@@ -826,8 +828,6 @@ - - num_lines = 3*2*num_atoms*num_atoms; - -- GtkWidget *hbox, *vbox, *vbox2, *window; -- GtkWidget *dialog, *frame; - /* Create the widgets */ - - /* request a dialog */ -@@ -844,6 +844,10 @@ - FILE *fp, *matout; - - gchar * modelFCname, *modelFCnameCSV; -+ gdouble correction; -+ gint temp_int; -+ gdouble freq_i, freq_ii; -+ gint sizeofeig; - - modelFCname = g_strdup_printf("%s/%s.FC", sysenv.cwd, model->basename); - modelFCnameCSV = g_strdup_printf("%s.csv", modelFCname); -@@ -1102,7 +1106,6 @@ - // enddo - // enddo - -- gdouble correction; - for (i=0; isiesta.sorted_eig_values[i] = i; - } - -- gint temp_int; -- gdouble freq_i, freq_ii; - - /* - gint sizeofeig = model->siesta.eigen_values->dim; - */ -- gint sizeofeig = mesch_dim_get(model->siesta.eigen_values); -+ sizeofeig = mesch_dim_get(model->siesta.eigen_values); - - - for (j=sizeofeig-1; j>1; j--) -@@ -1350,10 +1351,10 @@ - { - //evil active model call - evil evil evil - struct model_pak *model; -- model = sysenv.active_model; -- - gchar *buff; - -+ model = sysenv.active_model; -+ - buff = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(data)->entry))); - if (g_ascii_strncasecmp("Verlet", buff, 6) == 0) - model->siesta.md_type_of_run = VERLET_MDRUN; -@@ -1747,6 +1748,9 @@ - - for (i=0; isiesta.md_fc_first = i* model->siesta.atoms_per_job + 1; - model->siesta.md_fc_last = i * model->siesta.atoms_per_job + model->siesta.atoms_per_job; -@@ -1763,9 +1767,6 @@ - // call the fdf save bit.... - file_save_as(filename, model); - -- //grab current grid_config_pak -- struct grid_config_pak * grid_pak; -- - //get job directory - siesta_make_runscript(model->basename, sysenv.cwd, grid_pak); - -@@ -1851,12 +1852,11 @@ - int i, jobID; - int total_files; - gchar * filename, * orig_basename, *queuepath, *jobID_string; -+ struct grid_config_pak * grid_pak; - - total_files = model->num_atoms / model->siesta.atoms_per_job +1; - - orig_basename = g_strdup(model->basename); -- -- struct grid_config_pak * grid_pak; - - //default jobstorage dir?? - //"$homedir/.gdis_jobs/ ? diff --git a/science/gdis/files/patch-main.c b/science/gdis/files/patch-main.c deleted file mode 100644 index 221909b316a3..000000000000 --- a/science/gdis/files/patch-main.c +++ /dev/null @@ -1,32 +0,0 @@ ---- main.c.orig Wed Jul 26 15:15:28 2006 -+++ main.c Wed Nov 1 23:53:11 2006 -@@ -364,7 +364,7 @@ - void sys_init(gint argc, gchar *argv[]) - { - gchar *temp; --const gchar *ctemp; -+const gchar *envdir, *ctemp; - struct light_pak *light; - FILE *fp; - -@@ -500,7 +500,7 @@ - - /* setup directory and file pointers */ - sysenv.cwd = g_get_current_dir(); --const gchar *envdir = g_getenv("GDIS_START_DIR"); -+envdir = g_getenv("GDIS_START_DIR"); - if (envdir) - sysenv.cwd = (gchar *) envdir; - -@@ -510,7 +510,11 @@ - - /* generate element file full pathname */ - /* sometimes this returns the program name, and sometimes it doesn't */ -+#ifdef INSTALL -+temp = g_strdup(INSTALL); -+#else - temp = g_find_program_in_path(argv[0]); -+#endif - /* remove program name (if attached) */ - if (g_file_test(temp, G_FILE_TEST_IS_DIR)) - sysenv.gdis_path = temp; diff --git a/science/gdis/files/patch-module.c b/science/gdis/files/patch-module.c deleted file mode 100644 index b47419741de7..000000000000 --- a/science/gdis/files/patch-module.c +++ /dev/null @@ -1,10 +0,0 @@ ---- module.c.orig Tue Jun 15 16:05:21 2004 -+++ module.c Mon Jul 5 05:01:06 2004 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - - #include "gdis.h" diff --git a/science/gdis/files/patch-molsurf.c b/science/gdis/files/patch-molsurf.c deleted file mode 100644 index 3f9b741f653b..000000000000 --- a/science/gdis/files/patch-molsurf.c +++ /dev/null @@ -1,22 +0,0 @@ ---- molsurf.c.orig Mon Jun 19 17:42:29 2006 -+++ molsurf.c Wed Nov 1 23:55:43 2006 -@@ -745,7 +745,7 @@ - gdouble Dx, Dy, Dz; /* gradient */ - gdouble temp[3]; /* the dreaded temporary variable */ - gdouble theta, sinTheta, cosTheta; --gfloat hue, red, green, blue; -+gfloat hue, red, green, blue, colourRange, hueStep; - time_t jobStartTime; - - #if DEBUG_SHAPE -@@ -761,9 +761,7 @@ - #endif - - /* setup for colours */ -- gfloat colourRange= 256; -- gfloat hueStep; -- -+ colourRange= 256; - hueStep = 240/colourRange; - - -- cgit v1.2.3