aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2003-04-29 10:35:44 +0800
committermi <mi@FreeBSD.org>2003-04-29 10:35:44 +0800
commitee866b313a0cfa25d9b6a51d981597bd7ec9c172 (patch)
tree5849fd7ab7466d0ee2cd622adfdfd40d43a3da92
parente8b73a696fda66d49f814b15e52827ddfab60227 (diff)
downloadfreebsd-ports-gnome-ee866b313a0cfa25d9b6a51d981597bd7ec9c172.tar.gz
freebsd-ports-gnome-ee866b313a0cfa25d9b6a51d981597bd7ec9c172.tar.zst
freebsd-ports-gnome-ee866b313a0cfa25d9b6a51d981597bd7ec9c172.zip
Upgrade from the ancient 1.53 to the fresh 2.14. Add WWW.
-rw-r--r--databases/mysqltcl/Makefile12
-rw-r--r--databases/mysqltcl/distinfo2
-rw-r--r--databases/mysqltcl/files/Makefile.bsd10
-rw-r--r--databases/mysqltcl/files/patch-aa172
-rw-r--r--databases/mysqltcl/files/patch-ab4
-rw-r--r--databases/mysqltcl/pkg-descr2
6 files changed, 16 insertions, 186 deletions
diff --git a/databases/mysqltcl/Makefile b/databases/mysqltcl/Makefile
index b7eab14c8825..82757d45ec43 100644
--- a/databases/mysqltcl/Makefile
+++ b/databases/mysqltcl/Makefile
@@ -6,14 +6,14 @@
#
PORTNAME= mysqltcl
-PORTVERSION= 1.53
+PORTVERSION= 2.14
CATEGORIES= databases tcl83
-MASTER_SITES= http://telia.dl.sourceforge.net/mirrors/mysql/Downloads/Contrib/
+MASTER_SITES= http://www.xdobry.de/mysqltcl/
MAINTAINER= mi@aldan.algebra.com
COMMENT= TCL module for accessing MySQL databases based on msqltcl
-LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client \
+LIB_DEPENDS= mysqlclient:${PORTSDIR}/databases/mysql323-client \
${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT}
TCL_VERSION?= tcl8.3
@@ -30,10 +30,10 @@ do-build:
do-install:
${MKDIR} ${SQL_DIR}
${INSTALL_DATA} ${WRKSRC}/${LIB_NAME} ${SQL_DIR}
- ${ECHO} "package ifneeded mysql 1.53 {load ${SQL_DIR}/${LIB_NAME}}" \
+ ${ECHO} "package ifneeded mysqltcl ${PORTVERSION} {load ${SQL_DIR}/${LIB_NAME}}" \
> ${SQL_DIR}/pkgIndex.tcl
- ${INSTALL_MAN} ${WRKSRC}/${MANN} ${PREFIX}/man/mann
+ ${INSTALL_MAN} ${WRKSRC}/doc/${MANN} ${PREFIX}/man/mann
.include <bsd.port.mk>
-LIB_NAME!= ${MAKE} -f ${FILESDIR}/Makefile.bsd printname
+LIB_NAME!= ${MAKE} -f ${FILESDIR}/Makefile.bsd -V SHLIB_NAME
diff --git a/databases/mysqltcl/distinfo b/databases/mysqltcl/distinfo
index 36414fe674e2..461708e92e2c 100644
--- a/databases/mysqltcl/distinfo
+++ b/databases/mysqltcl/distinfo
@@ -1 +1 @@
-MD5 (mysqltcl-1.53.tar.gz) = c8ff173c74dae1abd1b356262e7dda3b
+MD5 (mysqltcl-2.14.tar.gz) = 9de2de463abd28968692ebb32b012e9d
diff --git a/databases/mysqltcl/files/Makefile.bsd b/databases/mysqltcl/files/Makefile.bsd
index a4e6e10047a1..6587f847af63 100644
--- a/databases/mysqltcl/files/Makefile.bsd
+++ b/databases/mysqltcl/files/Makefile.bsd
@@ -1,16 +1,16 @@
+.PATH: ${.CURDIR}/generic
+
LIB = mysqltcl
-SHLIB_MAJOR= 1
-SHLIB_MINOR= 0
+SHLIB_MAJOR= 2
+SHLIB_MINOR= 14
SRCS = mysqltcl.c
CFLAGS += -I${PREFIX}/include/${TCL_VERSION}/
CFLAGS += -I${PREFIX}/include/mysql/ -Wall
LDADD += -L${PREFIX}/lib -l${TCL_NODOT}
LDADD += -L${PREFIX}/lib/mysql -lmysqlclient
+CFLAGS += -DVERSION='"${SHLIB_MAJOR}.${SHLIB_MINOR}"'
all: ${SHLIB_NAME}
-printname:
- @echo ${SHLIB_NAME}
-
.include <bsd.lib.mk>
diff --git a/databases/mysqltcl/files/patch-aa b/databases/mysqltcl/files/patch-aa
deleted file mode 100644
index a801304bc85d..000000000000
--- a/databases/mysqltcl/files/patch-aa
+++ /dev/null
@@ -1,172 +0,0 @@
---- mysqltcl.c Mon Jul 6 11:35:17 1998
-+++ mysqltcl.c Wed Jul 12 17:46:20 2000
-@@ -34,7 +34,7 @@
- #include <string.h>
- #include <ctype.h>
- #include <unistd.h>
--
-+#include <stdlib.h>
-
- #define MYSQL_HANDLES 15 /* Default number of handles available. */
- #define MYSQL_BUFF_SIZE 1024 /* Conversion buffer size for various needs. */
-@@ -60,7 +60,7 @@
- #define MYSQL_HPREFIX_LEN 5
-
- /* Array for status info, and its elements. */
--static char *MysqlStatusArr = "mysqlstatus";
-+#define MysqlStatusArr "mysqlstatus"
- #define MYSQL_STATUS_CODE "code"
- #define MYSQL_STATUS_CMD "command"
- #define MYSQL_STATUS_MSG "message"
-@@ -686,7 +686,6 @@
- Mysqltcl_Init (interp)
- Tcl_Interp *interp;
- {
-- int i;
- char nbuf[MYSQL_SMALL_SIZE];
-
- /*
-@@ -742,7 +739,7 @@
- * If this message appears you must change the source code and recompile.
- */
- if (strlen (MysqlHandlePrefix) == MYSQL_HPREFIX_LEN)
-- return TCL_OK;
-+ return Tcl_PkgProvide(interp, "mysql", "1.53");
- else
- {
- fprintf (stderr, "*** mysqltcl (mysqltcl.c): handle prefix inconsistency!\n") ;
-@@ -921,13 +917,13 @@
-
- if ((MysqlHandle[hand].result = mysql_store_result (MysqlHandle[hand].mysql)) == NULL)
- {
-- (void)strcpy (interp->result, "-1") ;
-+ Tcl_SetObjResult(interp, Tcl_NewIntObj(-1));
- }
- else
- {
- MysqlHandle[hand].res_count = mysql_num_rows (MysqlHandle[hand].result) ;
- MysqlHandle[hand].col_count = mysql_num_fields (MysqlHandle[hand].result) ;
-- (void)sprintf (interp->result, "%d", MysqlHandle[hand].res_count) ;
-+ Tcl_SetObjResult(interp, Tcl_NewIntObj(MysqlHandle[hand].res_count));
- }
-
- return TCL_OK;
-@@ -1073,7 +1069,7 @@
- MysqlHandle[hand].res_count = total - row;
- }
-
-- (void)sprintf (interp->result, "%d", MysqlHandle[hand].res_count) ;
-+ Tcl_SetObjResult(interp, Tcl_NewIntObj(MysqlHandle[hand].res_count));
- return TCL_OK;
- }
-
-@@ -1244,7 +1240,7 @@
- {
- case MYSQL_INFNAME_OPT:
- case MYSQL_INFNAMEQ_OPT:
-- strcpy (interp->result, MysqlHandle[hand].database) ;
-+ Tcl_SetResult(interp, MysqlHandle[hand].database, TCL_STATIC);
- break ;
- case MYSQL_INFTABLES_OPT:
- if ((list = mysql_list_tables (MysqlHandle[hand].mysql,(char*)NULL)) == NULL)
-@@ -1259,7 +1255,7 @@
- break ;
- case MYSQL_INFHOST_OPT:
- case MYSQL_INFHOSTQ_OPT:
-- strcpy (interp->result, MysqlHandle[hand].host) ;
-+ Tcl_SetResult(interp, MysqlHandle[hand].host, TCL_STATIC);
- break ;
- case MYSQL_INFLIST_OPT:
- if ((list = mysql_list_dbs (MysqlHandle[hand].mysql,(char*)NULL)) == NULL)
-@@ -1299,8 +1295,6 @@
- int count ;
- int hand ;
- int idx ;
-- MYSQL_RES* list ;
-- MYSQL_ROW row ;
-
-
- /* We can't fully check the handle at this stage. */
-@@ -1342,19 +1336,20 @@
- {
- case MYSQL_RESROWS_OPT:
- case MYSQL_RESROWSQ_OPT:
-- sprintf (interp->result, "%d", MysqlHandle[hand].res_count) ;
-+ count = MysqlHandle[hand].res_count;
- break ;
- case MYSQL_RESCOLS_OPT:
- case MYSQL_RESCOLSQ_OPT:
-- sprintf (interp->result, "%d", MysqlHandle[hand].col_count) ;
-+ count = MysqlHandle[hand].col_count;
- break ;
- case MYSQL_RESCUR_OPT:
- case MYSQL_RESCURQ_OPT:
-- sprintf (interp->result, "%d", mysql_num_rows (MysqlHandle[hand].result)
-- - MysqlHandle[hand].res_count) ;
-+ count = mysql_num_rows (MysqlHandle[hand].result)
-+ - MysqlHandle[hand].res_count;
- default:
-- ;
-+ return TCL_OK; /* none of the above -- return without touching result */
- }
-+ Tcl_SetObjResult(interp, Tcl_NewIntObj(count));
- return TCL_OK ;
- }
-
-@@ -1500,8 +1495,12 @@
- int hi;
- char* hp ;
- int numeric ;
-- char* res ;
--
-+ register short res;
-+
-+ static const char *states[] = {
-+ "NOT_A_HANDLE", "UNCONNECTED", "CONNECTED", "IN_USE", "RESULT_PENDING"
-+ };
-+
- if (mysql_prologue(interp, argc, argv, 2, NULL, "?-numeric? handle") < 0)
- return TCL_ERROR;
-
-@@ -1511,17 +1510,18 @@
- hp = (numeric)?argv[2]:argv[1] ;
-
- if (HSYNTAX(hp,hi) < 0)
-- res = (numeric)?"0":"NOT_A_HANDLE" ;
-+ res = 0;
- else if (MysqlHandle[hi].connection == 0)
-- res = (numeric)?"1":"UNCONNECTED" ;
-+ res = 1;
- else if (MysqlHandle[hi].database[0] == '\0')
-- res = (numeric)?"2":"CONNECTED" ;
-+ res = 2;
- else if (MysqlHandle[hi].result == NULL)
-- res = (numeric)?"3":"IN_USE" ;
-+ res = 3;
- else
-- res = (numeric)?"4":"RESULT_PENDING" ;
-+ res = 4;
-
-- (void)strcpy (interp->result, res) ;
-+ if (numeric) Tcl_SetObjResult(interp, Tcl_NewIntObj(res));
-+ else Tcl_SetResult(interp, (char *)states[res], TCL_STATIC);
- return TCL_OK ;
- }
-
-@@ -1543,7 +1543,6 @@
- char **argv;
- {
- int hand;
-- char* res ;
- MYSQL* mysql;
-
- if ((hand = mysql_prologue(interp, argc, argv, 2, get_handle_conn,
-@@ -1552,7 +1551,7 @@
-
- mysql = MysqlHandle[hand].mysql;
-
-- (void)sprintf (interp->result, "%d", mysql_insert_id(mysql)) ;
-+ Tcl_SetObjResult(interp, Tcl_NewIntObj(mysql_insert_id(mysql)));
-
- return TCL_OK;
- }
diff --git a/databases/mysqltcl/files/patch-ab b/databases/mysqltcl/files/patch-ab
index 3a4ff6902986..97ea5adde723 100644
--- a/databases/mysqltcl/files/patch-ab
+++ b/databases/mysqltcl/files/patch-ab
@@ -1,5 +1,5 @@
---- mysqltcl.n Mon Jul 6 12:04:27 1998
-+++ mysqltcl.n Wed Sep 1 01:52:23 1999
+--- doc/mysqltcl.n Mon Jul 6 12:04:27 1998
++++ doc/mysqltcl.n Wed Sep 1 01:52:23 1999
@@ -36,2 +36,5 @@
MySQLTcl - MySQL server access commands for Tcl
+.SH SYNOPSIS
diff --git a/databases/mysqltcl/pkg-descr b/databases/mysqltcl/pkg-descr
index f9033353063d..b07b2922ab6b 100644
--- a/databases/mysqltcl/pkg-descr
+++ b/databases/mysqltcl/pkg-descr
@@ -13,3 +13,5 @@ From the package man-page:
This port makes use of some of the Tcl-8.x niceties, but more on that
front can be done.
+
+WWW: http://www.xdobry.de/mysqltcl/