summaryrefslogtreecommitdiff
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/Makefile1
-rw-r--r--databases/dbf2mysql/Makefile33
-rw-r--r--databases/dbf2mysql/distinfo2
-rw-r--r--databases/dbf2mysql/files/patch-Makefile35
-rw-r--r--databases/dbf2mysql/files/patch-dbf2mysql.c199
-rw-r--r--databases/dbf2mysql/files/patch-mysql2dbf.c88
-rw-r--r--databases/dbf2mysql/pkg-descr4
7 files changed, 0 insertions, 362 deletions
diff --git a/databases/Makefile b/databases/Makefile
index f1c16091a29c..3abc5e29cadd 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -51,7 +51,6 @@
SUBDIR += db6
SUBDIR += dbconnect
SUBDIR += dbf
- SUBDIR += dbf2mysql
SUBDIR += dbh
SUBDIR += dbixx
SUBDIR += dbow
diff --git a/databases/dbf2mysql/Makefile b/databases/dbf2mysql/Makefile
deleted file mode 100644
index 0cc19aed9f69..000000000000
--- a/databases/dbf2mysql/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Created by: jedgar@fxp.org
-# $FreeBSD$
-
-PORTNAME= dbf2mysql
-PORTVERSION= 1.14
-PORTREVISION= 5
-CATEGORIES= databases
-MASTER_SITES= MYSQL/Contrib/Old-Versions
-
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Programs to convert .dbf files to MySQL tables and vice versa
-
-LICENSE= NONE
-
-DEPRECATED= unknown license
-EXPIRATION_DATE= 2018-08-15
-
-USES= mysql
-
-PORTDOCS= README
-PLIST_FILES= bin/dbf2mysql bin/mysql2dbf
-
-OPTIONS_DEFINE= DOCS
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/dbf2mysql ${STAGEDIR}${PREFIX}/bin
- ${INSTALL_PROGRAM} ${WRKSRC}/mysql2dbf ${STAGEDIR}${PREFIX}/bin
-
-do-install-DOCS-on:
- @${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
-
-.include <bsd.port.mk>
diff --git a/databases/dbf2mysql/distinfo b/databases/dbf2mysql/distinfo
deleted file mode 100644
index 76928a3acdf6..000000000000
--- a/databases/dbf2mysql/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (dbf2mysql-1.14.tar.gz) = d52610c36acee853f805c27620166b799fd6020575afa6c20405714c4d479635
-SIZE (dbf2mysql-1.14.tar.gz) = 21256
diff --git a/databases/dbf2mysql/files/patch-Makefile b/databases/dbf2mysql/files/patch-Makefile
deleted file mode 100644
index e65f0edb2616..000000000000
--- a/databases/dbf2mysql/files/patch-Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
---- Makefile.orig Fri Jul 7 20:19:19 2000
-+++ Makefile Wed Feb 7 13:07:42 2001
-@@ -2,27 +2,27 @@
- # Maarten Boekhold (boekhold@cindy.et.tudelft.nl) 1995
-
- # Set this to your C-compiler
--CC=gcc
-+CC?=gcc
-
- # set this to your install-program (what does Solaris have
- # in /usr/sbin/install? SYSV install?)
- INSTALL=/usr/bin/install
-
- #AR=/usr/bin/ar
--AR=ar
-+AR?=ar
-
- # Set this to whatever your compiler accepts. Nothing special is needed
- #CFLAGS=-g -Wall -pedantic -include /usr/include/mpatrol.h
- #CFLAGS=-g -Wall
--CFLAGS=-O2 -Wall
-+CFLAGS?=-O2 -Wall
-
- # Set this to make smaller binaries
- #STRIP=
- STRIP=-s
-
- # Set this to your MySQL installation-path
--MYSQLINC=-I/usr/include/mysql
--MYSQLLIB=-L/usr/lib/mysql
-+MYSQLINC=-I${PREFIX}/include/mysql
-+MYSQLLIB=-L${PREFIX}/lib/mysql
-
- # Set this to where you want the binary (no man-page yet, don't know
- # how to write them)
diff --git a/databases/dbf2mysql/files/patch-dbf2mysql.c b/databases/dbf2mysql/files/patch-dbf2mysql.c
deleted file mode 100644
index 8dce31cac340..000000000000
--- a/databases/dbf2mysql/files/patch-dbf2mysql.c
+++ /dev/null
@@ -1,199 +0,0 @@
---- dbf2mysql.c.orig Fri Jul 7 04:55:02 2000
-+++ dbf2mysql.c Mon Mar 15 16:46:17 2004
-@@ -9,6 +9,12 @@
- Fixxed Quick mode insert for blank Numeric fields
- Modified to use -x flag to add _rec and _timestamp fields to start of record.
- ( only those lines immediately affect by if(express) (and getopt) )
-+
-+ Bart Friederichs (bart@friesoft.nl) feb 2003
-+ Added MYSQL_OPT_LOCAL_INFILE to options for compatibility with
-+ MySQL >3.23.49 and >4.0.2, new option -L enables it
-+ Replaced mysql_connect with mysql_real_connect, SQLsock isn't used anymore
-+
- */
- #include <stdio.h>
- #include <fcntl.h>
-@@ -17,10 +23,15 @@
- #include <string.h>
- #include <ctype.h>
- #include <mysql.h>
-+#include <paths.h>
- #include "dbf.h"
-
-+#if !defined(_PATH_TMP)
-+#define _PATH_TMP "/tmp/"
-+#endif
-+
- int verbose=0, upper=0, lower=0, create=0, fieldlow=0, var_chars=1;
--int express=0;
-+int express=0, enable_local=0;
- int null_fields=0, trim=0, quick=0;
- char primary[11];
- char *host = NULL;
-@@ -79,7 +90,7 @@
- printf("dbf2mysql %s\n", VERSION);
- printf("usage: dbf2mysql [-h hostname] [-d dbase] [-t table] [-p primary key]\n");
- printf(" [-o field[,field]] [-s oldname=newname[,oldname=newname]]\n");
-- printf(" [-i field[,field]] [-c] [-f] [-F] [-n] [-r] [-u|-l] \n");
-+ printf(" [-i field[,field]] [-c] [-f] [-F] [-n] [-r] [-u|-l] [-L]\n");
- printf(" [-v[v]] [-x] [-q] [-P password] [-U user] dbf-file\n");
- }
-
-@@ -319,7 +330,7 @@
- /* Patched by GLC to fix quick mode Numeric fields */
- void do_inserts(MYSQL *SQLsock, char *table, dbhead *dbh)
- {
-- int result, i, j, nc = 0, h;
-+ int result, i, j, nc = 0, h, fd;
- field *fields;
- char *query, *vpos, *pos;
- char str[257], *cvt = NULL, *s;
-@@ -395,9 +406,17 @@
- strcat(query, "NULL,NULL,");
- else /* if specified -q create file for 'LOAD DATA' */
- {
-- datafile = tempnam ("/tmp", "d2my");
-- tempfile = fopen (datafile, "wt");
-- if (tempfile == NULL || datafile == NULL)
-+ if (asprintf(&datafile, "%s/d2myXXXXXXXX",
-+ getenv("TMPDIR") ? getenv("TMPDIR") : _PATH_TMP) == -1) {
-+ fprintf (stderr, "asprintf() failed");
-+ return;
-+ }
-+ if ((fd = mkstemp(datafile)) == -1) {
-+ fprintf (stderr, "mkstemp() failed");
-+ return;
-+ }
-+ tempfile = fdopen (fd, "w");
-+ if (tempfile == NULL)
- {
- fprintf (stderr, "Cannot open file '%s' for writing\n", datafile);
- return;
-@@ -575,7 +594,7 @@
- }
- if (mysql_query(SQLsock, query) == -1) {
- fprintf(stderr,
-- "Error sending LOAD DATA INFILE from file '%s'\n", datafile);
-+ "Error sending LOAD DATA LOCAL INFILE from file '%s'\n", datafile);
- fprintf(stderr,
- "Detailed report: %s\n",
- mysql_error(SQLsock));
-@@ -591,7 +610,7 @@
- int main(int argc, char **argv)
- {
- int i;
-- MYSQL *SQLsock,mysql;
-+ MYSQL mysql;
- extern int optind;
- extern char *optarg;
- char *query;
-@@ -599,7 +618,7 @@
-
- primary[0] = '\0';
-
-- while ((i = getopt(argc, argv, "xqfFrne:lucvi:h:p:d:t:s:o:U:P:")) != EOF) {
-+ while ((i = getopt(argc, argv, "xqLfFrne:lucvi:h:p:d:t:s:o:U:P:")) != EOF) {
- switch (i) {
- case 'P':
- pass = (char *)strdup(optarg);
-@@ -666,6 +685,9 @@
- case 'o':
- flist = (char *)strdup(optarg);
- break;
-+ case 'L':
-+ enable_local = 1;
-+ break;
- case ':':
- usage();
- printf("missing argument!\n");
-@@ -704,6 +726,7 @@
- table);
- printf("Number of records: %ld\n", dbh->db_records);
- }
-+
- if (verbose > 1) {
- printf("Name\t\t Length\tDisplay\t Type\n");
- printf("-------------------------------------\n");
-@@ -720,7 +743,20 @@
- printf("Making connection to MySQL-server\n");
- }
-
-- if (!(SQLsock = mysql_connect(&mysql,host,user,pass))) {
-+ mysql_init(&mysql);
-+
-+ if (enable_local == 1) {
-+ if (verbose) {
-+ printf("Setting MySQL option MYSQL_OPT_LOCAL_INFILE\n");
-+ }
-+
-+ if (mysql_options(&mysql, MYSQL_OPT_LOCAL_INFILE, 0)) {
-+ printf("Setting options failed.");
-+ exit(1);
-+ }
-+ }
-+
-+ if (!mysql_real_connect(&mysql,host,user,pass, dbase, 0, NULL,0)) {
- fprintf(stderr, "Couldn't get a connection with the ");
- fprintf(stderr, "designated host!\n");
- fprintf(stderr, "Detailed report: %s\n", mysql_error(&mysql));
-@@ -728,23 +764,12 @@
- exit(1);
- }
-
-- if (verbose > 2) {
-- printf("Selecting database '%s'\n", dbase);
-- }
--
-- if ((mysql_select_db(SQLsock, dbase)) == -1) {
-- fprintf(stderr, "Couldn't select database %s.\n", dbase);
-- fprintf(stderr, "Detailed report: %s\n", mysql_error(SQLsock));
-- mysql_close(SQLsock);
-- dbf_close(&dbh);
-- exit(1);
-- }
- /* Substitute field names */
- do_onlyfields(flist, dbh);
- do_substitute(subarg, dbh);
-
- if (!create) {
-- if (!check_table(SQLsock, table)) {
-+ if (!check_table(&mysql, table)) {
- printf("Table does not exist!\n");
- exit(1);
- }
-@@ -755,30 +780,30 @@
-
- if (!(query = (char *)malloc(12 + strlen(table)))) {
- printf("Memory-allocation error in main (drop)!\n");
-- mysql_close(SQLsock);
-+ mysql_close(&mysql);
- dbf_close(&dbh);
- exit(1);
- }
-
- sprintf(query, "DROP TABLE %s", table);
-- mysql_query(SQLsock, query);
-+ mysql_query(&mysql, query);
- free(query);
-
- /* Build a CREATE-clause
- */
-- do_create(SQLsock, table, dbh);
-+ do_create(&mysql, table, dbh);
- }
-
- /* Build an INSERT-clause
- */
- if (create < 2)
-- do_inserts(SQLsock, table, dbh);
-+ do_inserts(&mysql, table, dbh);
-
- if (verbose > 2) {
- printf("Closing up....\n");
- }
-
-- mysql_close(SQLsock);
-+ mysql_close(&mysql);
- dbf_close(&dbh);
- exit(0);
- }
diff --git a/databases/dbf2mysql/files/patch-mysql2dbf.c b/databases/dbf2mysql/files/patch-mysql2dbf.c
deleted file mode 100644
index 7df624bf106b..000000000000
--- a/databases/dbf2mysql/files/patch-mysql2dbf.c
+++ /dev/null
@@ -1,88 +0,0 @@
-Index: databases/dbf2mysql/work/dbf2mysql-1.14/mysql2dbf.c
-===================================================================
---- mysql2dbf.c.orig 2010-11-28 19:46:34.000000000 +0100
-+++ mysql2dbf.c 2010-11-28 21:23:22.000000000 +0100
-@@ -1,6 +1,11 @@
- /* utility to read out an mySQL-table, and store it into a DBF-file
-
- M. Boekhold (boekhold@cindy.et.tudelft.nl) April 1996
-+
-+ M. Lachman Nov 2010
-+ Replaced mysql_connect with mysql_real_connect, SQLsock isn't used anymore
-+ Can be compiled with MySQL client 5.0.x
-+
- */
-
- #include <stdio.h>
-@@ -47,7 +52,7 @@
-
- int main(int argc, char **argv) {
- int i;
-- MYSQL *SQLsock,mysql;
-+ MYSQL mysql;
- extern int optind;
- extern char *optarg;
- char *query = NULL;
-@@ -148,7 +153,9 @@
- printf("Making connection with mySQL-server\n");
- }
-
-- if (!(SQLsock = mysql_connect(&mysql,host,user,pass))) {
-+ mysql_init(&mysql);
-+
-+ if (!mysql_real_connect(&mysql,host,user,pass, dbase, 0, NULL,0)) {
- fprintf(stderr, "Couldn't get a connection with the ");
- fprintf(stderr, "designated host!\n");
- fprintf(stderr, "Detailed report: %s\n", mysql_error(&mysql));
-@@ -157,37 +164,24 @@
- exit(1);
- }
-
-- if (verbose > 1) {
-- printf("Selecting database\n");
-- }
--
-- if ((mysql_select_db(SQLsock, dbase)) == -1) {
-- fprintf(stderr, "Couldn't select database %s.\n", dbase);
-- fprintf(stderr, "Detailed report: %s\n", mysql_error(SQLsock));
-- close(dbh->db_fd);
-- free(dbh);
-- mysql_close(SQLsock);
-- exit(1);
-- }
--
- if (verbose > 1) {
- printf("Sending query\n");
- }
-
-
-- if (mysql_query(SQLsock, query) == -1) {
-+ if (mysql_query(&mysql, query) == -1) {
- fprintf(stderr, "Error sending query.\nDetailed report: %s\n",
-- mysql_error(SQLsock));
-+ mysql_error(&mysql));
- if (verbose > 1) {
- fprintf(stderr, "%s\n", query);
- }
-- mysql_close(SQLsock);
-+ mysql_close(&mysql);
- close(dbh->db_fd);
- free(dbh);
- exit(1);
- }
-
-- qres = mysql_store_result(SQLsock);
-+ qres = mysql_store_result(&mysql);
- numfields = mysql_num_fields(qres);
- numrows = mysql_num_rows(qres);
-
-@@ -303,7 +297,7 @@
- }
-
- mysql_free_result(qres);
-- mysql_close(SQLsock);
-+ mysql_close(&mysql);
- close(dbh->db_fd);
- free(dbh);
- exit(0);
-
diff --git a/databases/dbf2mysql/pkg-descr b/databases/dbf2mysql/pkg-descr
deleted file mode 100644
index 48f4dd1a127f..000000000000
--- a/databases/dbf2mysql/pkg-descr
+++ /dev/null
@@ -1,4 +0,0 @@
-Programs to convert .dbf files to MySQL tables and vice versa
-
-dbf2mysql: converts a .dbf to a MySQL table
-mysql2dbf: converts a MySQL table to a .dbf file