aboutsummaryrefslogtreecommitdiffstats
path: root/science/gchemutils
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2003-04-08 08:04:57 +0800
committermarcus <marcus@FreeBSD.org>2003-04-08 08:04:57 +0800
commit1d3ed677052f2b06baa758b285f8726595fc05c4 (patch)
tree51b7853634d7bae3ab143ea03d6990a80ac5ca27 /science/gchemutils
parent5db04e3a470e4734067efa77f9057db37c9f147f (diff)
downloadfreebsd-ports-gnome-1d3ed677052f2b06baa758b285f8726595fc05c4.tar.gz
freebsd-ports-gnome-1d3ed677052f2b06baa758b285f8726595fc05c4.tar.zst
freebsd-ports-gnome-1d3ed677052f2b06baa758b285f8726595fc05c4.zip
Add gchemutils a set of C++ class and GTK+-2 widgets related to chemistry.
PR: 50538 Submitted by: Pav Lucistnik <pav@oook.cz>
Diffstat (limited to 'science/gchemutils')
-rw-r--r--science/gchemutils/Makefile29
-rw-r--r--science/gchemutils/distinfo1
-rw-r--r--science/gchemutils/files/patch-chemistry_element.cc13
-rw-r--r--science/gchemutils/files/patch-configure11
-rw-r--r--science/gchemutils/files/patch-gtkperiodic-gtkperiodic.c35
-rw-r--r--science/gchemutils/files/patch-tests-testgtkcrystalviewer.c23
-rw-r--r--science/gchemutils/pkg-descr5
-rw-r--r--science/gchemutils/pkg-plist33
8 files changed, 150 insertions, 0 deletions
diff --git a/science/gchemutils/Makefile b/science/gchemutils/Makefile
new file mode 100644
index 000000000000..cd304ef4c521
--- /dev/null
+++ b/science/gchemutils/Makefile
@@ -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>
diff --git a/science/gchemutils/distinfo b/science/gchemutils/distinfo
new file mode 100644
index 000000000000..e75d456b0142
--- /dev/null
+++ b/science/gchemutils/distinfo
@@ -0,0 +1 @@
+MD5 (gnome-chemistry-utils-0.1.3.tar.bz2) = 0be12cb53fad3ccbb70aaa600da34cf7
diff --git a/science/gchemutils/files/patch-chemistry_element.cc b/science/gchemutils/files/patch-chemistry_element.cc
new file mode 100644
index 000000000000..aceb4fe25c99
--- /dev/null
+++ b/science/gchemutils/files/patch-chemistry_element.cc
@@ -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"))
+
diff --git a/science/gchemutils/files/patch-configure b/science/gchemutils/files/patch-configure
new file mode 100644
index 000000000000..d7a69558f534
--- /dev/null
+++ b/science/gchemutils/files/patch-configure
@@ -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'
+
diff --git a/science/gchemutils/files/patch-gtkperiodic-gtkperiodic.c b/science/gchemutils/files/patch-gtkperiodic-gtkperiodic.c
new file mode 100644
index 000000000000..d80aeb660567
--- /dev/null
+++ b/science/gchemutils/files/patch-gtkperiodic-gtkperiodic.c
@@ -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;
diff --git a/science/gchemutils/files/patch-tests-testgtkcrystalviewer.c b/science/gchemutils/files/patch-tests-testgtkcrystalviewer.c
new file mode 100644
index 000000000000..ce17206cfa84
--- /dev/null
+++ b/science/gchemutils/files/patch-tests-testgtkcrystalviewer.c
@@ -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);
diff --git a/science/gchemutils/pkg-descr b/science/gchemutils/pkg-descr
new file mode 100644
index 000000000000..4cea59d9dd7d
--- /dev/null
+++ b/science/gchemutils/pkg-descr
@@ -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/
diff --git a/science/gchemutils/pkg-plist b/science/gchemutils/pkg-plist
new file mode 100644
index 000000000000..3d43187c3e79
--- /dev/null
+++ b/science/gchemutils/pkg-plist
@@ -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