aboutsummaryrefslogtreecommitdiffstats
path: root/textproc
diff options
context:
space:
mode:
authortota <tota@FreeBSD.org>2013-05-06 22:10:45 +0800
committertota <tota@FreeBSD.org>2013-05-06 22:10:45 +0800
commit659dc451559345fc9eecb0852f7d31becbc65899 (patch)
tree3de4d333ee3fe1b5de3cd2be8cc0705cf65c6165 /textproc
parent38b041f5891ed315c7d97f90dd9c3ba842bee425 (diff)
downloadfreebsd-ports-gnome-659dc451559345fc9eecb0852f7d31becbc65899.tar.gz
freebsd-ports-gnome-659dc451559345fc9eecb0852f7d31becbc65899.tar.zst
freebsd-ports-gnome-659dc451559345fc9eecb0852f7d31becbc65899.zip
- Add new port: textproc/mysqlviz
Render a graphical representation of a MySQL or SQLite database from a mysqldump or sqlite3 .dump file. Features: - Can infer foreign key relationships if you do not have them defined - Handles partial dumps (FK to tables that are not defined within the dump) - Fast! Uses sed and grep for data extraction (MySQL only) WWW: http://code.google.com/p/mysqlviz/
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/mysqlviz/Makefile37
-rw-r--r--textproc/mysqlviz/distinfo2
-rw-r--r--textproc/mysqlviz/files/patch-mysqlviz25
-rw-r--r--textproc/mysqlviz/pkg-descr9
5 files changed, 74 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index 3812e107a08a..b0dbb209e4b0 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -457,6 +457,7 @@
SUBDIR += multimarkdown
SUBDIR += muse
SUBDIR += mxml
+ SUBDIR += mysqlviz
SUBDIR += mythes
SUBDIR += nb-aspell
SUBDIR += nds-aspell
diff --git a/textproc/mysqlviz/Makefile b/textproc/mysqlviz/Makefile
new file mode 100644
index 000000000000..6d53abf579d3
--- /dev/null
+++ b/textproc/mysqlviz/Makefile
@@ -0,0 +1,37 @@
+# Created by: TAKATSU Tomonari <tota@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= mysqlviz
+PORTVERSION= 0.3
+CATEGORIES= textproc
+MASTER_SITES= GOOGLE_CODE
+
+MAINTAINER= tota@FreeBSD.org
+COMMENT= MySQL and SQLite Database Visualisation Tool
+
+NO_BUILD= yes
+USE_BZIP2= yes
+USE_PHP= yes
+WANT_PHP_CLI= yes
+
+PLIST_FILES= bin/${PORTNAME}
+
+PORTEXAMPLES= eg.png eg.sql sqlite-eg.sql
+
+OPTIONS_DEFINE= EXAMPLES
+
+.include <bsd.port.options.mk>
+
+post-patch:
+ @${REINPLACE_CMD} \
+ -e 's|/usr/bin/php|${LOCALBASE}/bin/php|' \
+ ${WRKSRC}/${PORTNAME}
+
+do-install:
+ @${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+.if ${PORT_OPTIONS:MEXAMPLES}
+ @${MKDIR} ${EXAMPLESDIR}
+ @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/textproc/mysqlviz/distinfo b/textproc/mysqlviz/distinfo
new file mode 100644
index 000000000000..0edfc05dc6f3
--- /dev/null
+++ b/textproc/mysqlviz/distinfo
@@ -0,0 +1,2 @@
+SHA256 (mysqlviz-0.3.tar.bz2) = fdfc89771b821dfa6e9dda7a189d9f6d7db22a0bedb8450ba96dc08cf0221d8e
+SIZE (mysqlviz-0.3.tar.bz2) = 15377
diff --git a/textproc/mysqlviz/files/patch-mysqlviz b/textproc/mysqlviz/files/patch-mysqlviz
new file mode 100644
index 000000000000..6eb5a295518a
--- /dev/null
+++ b/textproc/mysqlviz/files/patch-mysqlviz
@@ -0,0 +1,25 @@
+--- mysqlviz.orig 2010-11-13 08:54:02.000000000 +0900
++++ mysqlviz 2013-05-06 17:56:14.000000000 +0900
+@@ -184,17 +184,16 @@
+
+ # usage information
+ function usage() {
+- global $argv;
+- print '[' . basename($argv[0]) . " - mysql + sqlite database visualisation tool]\n\n";
++ print "[mysqlviz - mysql + sqlite database visualisation tool]\n\n";
+ print "usage:\n";
+- print " " . $argv[0] . " -f <sqldumpfile> [-r]\n";
+- print " ^--- 'redump' mode: generates a\n";
+- print " mysqldump command line to redump.\n";
++ print " mysqlviz -f <sqldumpfile> [-r]\n";
++ print " ^--- 'redump' mode: generates a\n";
++ print " mysqldump command line to redump.\n";
+ print "toolchain:\n";
+ print " $ mysqldump -d db >db.sql # MySQL: -d = 'no data', only structure\n";
+ print " - OR -\n";
+ print " $ sqlite database.db .dump >db.sql # SQLite (also: 'sqlite3 ...')\n";
+- print " $ $argv[0] -f ./db.sql >./db.dot # 'dot' is a graphviz format.\n";
++ print " $ mysqlviz -f ./db.sql >./db.dot # 'dot' is a graphviz format.\n";
+ print " $ dot -Tpng db.dot >db.png # generate image with graphviz\n\n";
+ print "notes:\n";
+ print " if you do not have any foreign keys defined, relationships will be\n";
diff --git a/textproc/mysqlviz/pkg-descr b/textproc/mysqlviz/pkg-descr
new file mode 100644
index 000000000000..9366f19b8c43
--- /dev/null
+++ b/textproc/mysqlviz/pkg-descr
@@ -0,0 +1,9 @@
+Render a graphical representation of a MySQL or SQLite database
+from a mysqldump or sqlite3 .dump file.
+
+Features:
+- Can infer foreign key relationships if you do not have them defined
+- Handles partial dumps (FK to tables that are not defined within the dump)
+- Fast! Uses sed and grep for data extraction (MySQL only)
+
+WWW: http://code.google.com/p/mysqlviz/