1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

Add gchemutils a set of C++ class and GTK+-2 widgets related to chemistry.

PR:		50538
Submitted by:	Pav Lucistnik <pav@oook.cz>
This commit is contained in:
Joe Marcus Clarke 2003-04-08 00:04:57 +00:00
parent f94d9f68d8
commit 2bd3beaf37
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78560
9 changed files with 151 additions and 0 deletions

View File

@ -6,6 +6,7 @@
SUBDIR += clhep
SUBDIR += euler
SUBDIR += flounder
SUBDIR += gchemutils
SUBDIR += gdis
SUBDIR += glens
SUBDIR += libctl

View File

@ -0,0 +1,29 @@
# New ports collection makefile for: gchemutils
# Date created: Mar 18, 2003
# Whom: Pav Lucistnik <pav@oook.cz>
#
# $FreeBSD$
PORTNAME= gchemutils
PORTVERSION= 0.1.3
CATEGORIES= science
MASTER_SITES= http://savannah.nongnu.org/download/gchemutils/unstable.pkg/${PORTVERSION}/
DISTNAME= gnome-chemistry-utils-${PORTVERSION}
MAINTAINER= pav@oook.cz
COMMENT= C++ classes and Gtk2 widgets related to chemistry
LIB_DEPENDS= gtkglext-x11-1.0:${PORTSDIR}/x11-toolkits/gtkglext
USE_BZIP2= yes
USE_X_PREFIX= yes
USE_GNOME= gnomehack gnomeprefix libglade2 libgnomeprint
USE_GMAKE= yes
USE_LIBTOOL= yes
INSTALLS_SHLIB= yes
post-patch:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g ; \
s|DATADIRNAME=lib|DATADIRNAME=share|g' ${WRKSRC}/configure
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (gnome-chemistry-utils-0.1.3.tar.bz2) = 0be12cb53fad3ccbb70aaa600da34cf7

View File

@ -0,0 +1,13 @@
diff -u -r1.3 element.cc
--- chemistry/element.cc 1 Mar 2003 17:02:49 -0000 1.3
+++ chemistry/element.cc 2 Apr 2003 04:14:46 -0000
@@ -97,7 +97,7 @@
if (!strcmp((const char*)child->name, "name"))
{
tmp = (char*) xmlNodeGetLang(child);
- if ((!tmp) && (!lang) && (!strncmp(lang, tmp, 2))) Elt->name = (char*) xmlNodeGetContent(child);
+ if (tmp && lang && (!strncmp(lang, tmp, 2))) Elt->name = (char*) xmlNodeGetContent(child);
else DefaultName = (char*) xmlNodeGetContent(child);
}
else if (!strcmp((const char*)child->name, "color"))

View File

@ -0,0 +1,11 @@
--- configure.orig Sat Mar 1 22:09:31 2003
+++ configure Tue Mar 18 12:30:50 2003
@@ -8256,6 +8256,8 @@
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+$ac_aux_dir/ltconfig $LIBTOOL_DEPS
+
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'

View File

@ -0,0 +1,35 @@
--- gtkperiodic/gtkperiodic.c.orig Sat Mar 1 20:49:14 2003
+++ gtkperiodic/gtkperiodic.c Wed Mar 19 01:13:51 2003
@@ -157,6 +157,9 @@
{
GladeXML* xml;
GtkStyle* style;
+ char name[8] = "elt";
+ GtkToggleButton* button;
+ int i;
xml = glade_xml_new(DATADIR"/gchemutils/glade/gtkperiodic.glade", "vbox1", NULL);
if (xml) glade_xml_signal_autoconnect (xml);
periodic->priv = g_new0(GtkPeriodicPrivate, 1);
@@ -164,9 +167,6 @@
periodic->priv->vbox = GTK_VBOX(glade_xml_get_widget(xml, "vbox1"));
periodic->priv->colorstyle = GTK_PERIODIC_COLOR_NONE;
memset(periodic->priv->buttons, 0, sizeof(GtkToggleButton*) * 119);
- char name[8] = "elt";
- GtkToggleButton* button;
- int i;
for (i = 1; i <= 118; i++)
{
sprintf(name + 3, "%d", i);
@@ -217,10 +217,11 @@
static gboolean change = FALSE;
if (button != periodic->priv->buttons[0])
{
+ const gchar* name;
change = TRUE;
if (periodic->priv->buttons[0]) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(periodic->priv->buttons[0]), FALSE);
periodic->priv->buttons[0] = button;
- const gchar* name = gtk_widget_get_name(GTK_WIDGET(periodic->priv->buttons[0]));
+ name = gtk_widget_get_name(GTK_WIDGET(periodic->priv->buttons[0]));
periodic->priv->Z = atoi(name + 3);
g_signal_emit(periodic, gtk_periodic_signals[ELEMENT_CHANGED], 0, periodic->priv->Z);
change = FALSE;

View File

@ -0,0 +1,23 @@
--- tests/testgtkcrystalviewer.c.orig Mon Nov 11 19:50:18 2002
+++ tests/testgtkcrystalviewer.c Tue Mar 18 11:25:55 2003
@@ -8,6 +8,8 @@
{
GtkWidget *window;
GtkWidget *viewer;
+ const char* filename;
+ xmlDocPtr xml;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -16,10 +18,9 @@
GTK_SIGNAL_FUNC(gtk_main_quit),
NULL);
- const char* filename;
if (argc >= 2) filename = argv[1];
else filename = "nickel.gcrystal";
- xmlDocPtr xml = xmlParseFile(filename);
+ xml = xmlParseFile(filename);
viewer = gtk_crystal_viewer_new(xml->children);
gtk_container_add(GTK_CONTAINER(window), viewer);

View File

@ -0,0 +1,5 @@
Gnome Chemistry Utils provide C++ classes and Gtk+-2 widgets related
to chemistry. They will be used in future versions of Gnome Crystal
and GChemPaint.
WWW: http://www.nongnu.org/gchemutils/

View File

@ -0,0 +1,33 @@
include/gcu/chemistry/atom.h
include/gcu/chemistry/bond.h
include/gcu/chemistry/object.h
include/gcu/chemistry/element.h
include/gcu/chemistry/matrix.h
include/gcu/chemistry/xml-utils.h
include/gcu/chemistry/chemistry.h
include/gcu/crystalviewer/gtkcrystalviewer.h
include/gcu/crystalviewer/crystalview.h
include/gcu/crystalviewer/crystaldoc.h
include/gcu/crystalviewer/crystalatom.h
include/gcu/crystalviewer/crystalbond.h
include/gcu/crystalviewer/crystalline.h
include/gcu/crystalviewer/crystalcleavage.h
include/gcu/gtkperiodic/gtkperiodic.h
lib/libgcu.a
lib/libgcu.so
lib/libgcu.so.1
lib/libgtkcrystalviewer.a
lib/libgtkcrystalviewer.so
lib/libgtkcrystalviewer.so.1
lib/libgtkperiodic.a
lib/libgtkperiodic.so
lib/libgtkperiodic.so.1
libdata/pkgconfig/gcu.pc
share/gnome/gchemutils/elements.xml
share/gnome/gchemutils/glade/gtkperiodic.glade
@dirrm include/gcu/chemistry
@dirrm include/gcu/crystalviewer
@dirrm include/gcu/gtkperiodic
@dirrm include/gcu
@dirrm share/gnome/gchemutils/glade
@dirrm share/gnome/gchemutils