From 216cf2312ec6fe4f4626cf061700c27b18571eb1 Mon Sep 17 00:00:00 2001 From: wilfried Date: Mon, 2 Apr 2001 15:13:05 +0000 Subject: [PATCH] Import of mysql++-1.7.8 MySQL++ is a C++ API for MySQL (and other SQL Databases Soon). The goal of this API is to make working with queries as easy as working with other STL Containers. --- devel/mysql++/Makefile | 30 +++++++ devel/mysql++/files/md5 | 3 + devel/mysql++/patches/patch-Makefile_am | 9 +++ devel/mysql++/patches/patch-ltconfig | 52 +++++++++++++ devel/mysql++/patches/patch-ltmain_sh | 65 ++++++++++++++++ .../patches/patch-sqlplusint_Makefile_am | 12 +++ .../patches/patch-sqlplusint_connection_cc | 45 +++++++++++ devel/mysql++/pkg/DESCR | 5 ++ devel/mysql++/pkg/PFRAG.shared | 3 + devel/mysql++/pkg/PLIST | 78 +++++++++++++++++++ 10 files changed, 302 insertions(+) create mode 100644 devel/mysql++/Makefile create mode 100644 devel/mysql++/files/md5 create mode 100644 devel/mysql++/patches/patch-Makefile_am create mode 100644 devel/mysql++/patches/patch-ltconfig create mode 100644 devel/mysql++/patches/patch-ltmain_sh create mode 100644 devel/mysql++/patches/patch-sqlplusint_Makefile_am create mode 100644 devel/mysql++/patches/patch-sqlplusint_connection_cc create mode 100644 devel/mysql++/pkg/DESCR create mode 100644 devel/mysql++/pkg/PFRAG.shared create mode 100644 devel/mysql++/pkg/PLIST diff --git a/devel/mysql++/Makefile b/devel/mysql++/Makefile new file mode 100644 index 00000000000..9d72c700429 --- /dev/null +++ b/devel/mysql++/Makefile @@ -0,0 +1,30 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ + +COMMENT= 'C++ API for MySQL' + +DISTNAME= mysql++-1.7.8 +CATEGORIES= devel +NEED_VERSION= 1.380 + +HOMEPAGE= http://www.mysql.com/downloads/api-mysql++.html + +MAINTAINER= Peter Stromberg + +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/mysql++/ \ + ftp://ftp.mysql.com/mysql++/ + +BUILD_DEPENDS= automake::devel/automake +LIB_DEPENDS= mysqlclient::databases/mysql + +USE_GMAKE= Yes +CONFIGURE_STYLE= gnu autoconf + +pre-configure: + @cd ${WRKSRC} && automake -a + +.include diff --git a/devel/mysql++/files/md5 b/devel/mysql++/files/md5 new file mode 100644 index 00000000000..e241a6cc74f --- /dev/null +++ b/devel/mysql++/files/md5 @@ -0,0 +1,3 @@ +MD5 (mysql++-1.7.8.tar.gz) = f9b61381dd67676079ab9ca26e46db49 +RMD160 (mysql++-1.7.8.tar.gz) = bcf6be2cb95a350834a8aa3c114eb5f45dc35751 +SHA1 (mysql++-1.7.8.tar.gz) = 4cb71a50b480d74fa79244c65a35601491e59b3a diff --git a/devel/mysql++/patches/patch-Makefile_am b/devel/mysql++/patches/patch-Makefile_am new file mode 100644 index 00000000000..4f65ecf8454 --- /dev/null +++ b/devel/mysql++/patches/patch-Makefile_am @@ -0,0 +1,9 @@ +$OpenBSD: patch-Makefile_am,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +--- Makefile.am.orig Tue Nov 14 13:17:19 2000 ++++ Makefile.am Fri Feb 9 15:42:21 2001 +@@ -1,4 +1,4 @@ + EXTRA_DIST = .version Configure doc devel + + #SUBDIRS = sqlplusint examples doc +-SUBDIRS = sqlplusint examples ++SUBDIRS = sqlplusint diff --git a/devel/mysql++/patches/patch-ltconfig b/devel/mysql++/patches/patch-ltconfig new file mode 100644 index 00000000000..26458da69ea --- /dev/null +++ b/devel/mysql++/patches/patch-ltconfig @@ -0,0 +1,52 @@ +$OpenBSD: patch-ltconfig,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +--- ltconfig.orig Tue Nov 14 13:17:22 2000 ++++ ltconfig Mon Feb 12 16:16:51 2001 +@@ -1105,6 +1105,9 @@ cygwin* | mingw*) + with_gnu_ld=no + fi + ;; ++openbsd*) ++ with_gnu_ld=no ++ ;; + + esac + +@@ -1391,10 +1394,21 @@ else + ;; + + openbsd*) +- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' +- hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts' ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then ++ export_dynamic_flag_spec='${wl}-E' ++ fi ++ ;; ++ esac + ;; + + os2*) +@@ -1955,13 +1969,10 @@ netbsd*) + + openbsd*) + version_type=sunos +- if test "$with_gnu_ld" = yes; then +- need_lib_prefix=no +- need_version=no +- fi + library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH ++ deplibs_check_method='pass_all' + ;; + + os2*) diff --git a/devel/mysql++/patches/patch-ltmain_sh b/devel/mysql++/patches/patch-ltmain_sh new file mode 100644 index 00000000000..19f91763836 --- /dev/null +++ b/devel/mysql++/patches/patch-ltmain_sh @@ -0,0 +1,65 @@ +$OpenBSD: patch-ltmain_sh,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +--- ltmain.sh.orig Tue Nov 14 13:17:22 2000 ++++ ltmain.sh Fri Feb 9 15:05:25 2001 +@@ -1073,6 +1073,10 @@ compiler." + # These systems don't actually have c library (as such) + continue + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ continue ++ ;; + esac + elif test "$arg" = "-lm"; then + case "$host" in +@@ -1789,6 +1793,9 @@ compiler." + *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; ++ *-*-openbsd*) ++ # Do not include libc due to us having libc/libc_r. ++ ;; + *) + # Add libc to deplibs on all other systems. + deplibs="$deplibs -lc" +@@ -3522,40 +3529,6 @@ libdir='$install_libdir'\ + # Exit here if they wanted silent mode. + test "$show" = : && exit 0 + +- echo "----------------------------------------------------------------------" +- echo "Libraries have been installed in:" +- for libdir in $libdirs; do +- echo " $libdir" +- done +- echo +- echo "If you ever happen to want to link against installed libraries" +- echo "in a given directory, LIBDIR, you must either use libtool, and" +- echo "specify the full pathname of the library, or use \`-LLIBDIR'" +- echo "flag during linking and do at least one of the following:" +- if test -n "$shlibpath_var"; then +- echo " - add LIBDIR to the \`$shlibpath_var' environment variable" +- echo " during execution" +- fi +- if test -n "$runpath_var"; then +- echo " - add LIBDIR to the \`$runpath_var' environment variable" +- echo " during linking" +- fi +- if test -n "$hardcode_libdir_flag_spec"; then +- libdir=LIBDIR +- eval flag=\"$hardcode_libdir_flag_spec\" +- +- echo " - use the \`$flag' linker flag" +- fi +- if test -n "$admincmds"; then +- echo " - have your system administrator run these commands:$admincmds" +- fi +- if test -f /etc/ld.so.conf; then +- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" +- fi +- echo +- echo "See any operating system documentation about shared libraries for" +- echo "more information, such as the ld(1) and ld.so(8) manual pages." +- echo "----------------------------------------------------------------------" + exit 0 + ;; + diff --git a/devel/mysql++/patches/patch-sqlplusint_Makefile_am b/devel/mysql++/patches/patch-sqlplusint_Makefile_am new file mode 100644 index 00000000000..e9be48f2b59 --- /dev/null +++ b/devel/mysql++/patches/patch-sqlplusint_Makefile_am @@ -0,0 +1,12 @@ +$OpenBSD: patch-sqlplusint_Makefile_am,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +--- sqlplusint/Makefile.am.orig Tue Nov 14 13:17:19 2000 ++++ sqlplusint/Makefile.am Fri Feb 9 15:41:42 2001 +@@ -8,7 +8,7 @@ libsqlplus_la_SOURCES = coldata.cc conne + field_types.cc manip.cc query.cc result.cc set.cc sql_query.cc \ + type_info.cc vallist.cc string_util.cc + +-libsqlplus_la_LDFLAGS = -version-info $(SQLPLUS_MAJOR_VERSION):$(SQLPLUS_MINOR_VERSION):$(SQLPLUS_MICRO_VERSION) ++libsqlplus_la_LDFLAGS = -version-info $(SQLPLUS_MAJOR_VERSION):$(SQLPLUS_MINOR_VERSION) + + include_HEADERS = sqlplus.hh coldata1.hh coldata2.hh coldata3.hh coldata4.hh \ + compare1.hh compare2.hh compare3.hh connection0.hh connection1.hh \ diff --git a/devel/mysql++/patches/patch-sqlplusint_connection_cc b/devel/mysql++/patches/patch-sqlplusint_connection_cc new file mode 100644 index 00000000000..ede5d16d0ee --- /dev/null +++ b/devel/mysql++/patches/patch-sqlplusint_connection_cc @@ -0,0 +1,45 @@ +$OpenBSD: patch-sqlplusint_connection_cc,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +--- sqlplusint/connection.cc.orig Tue Nov 14 13:17:19 2000 ++++ sqlplusint/connection.cc Mon Feb 12 19:17:09 2001 +@@ -45,7 +45,10 @@ bool Connection::real_connect (cchar *db + { + mysql.options.compress = compress; + mysql.options.connect_timeout=connect_timeout; +- locked = true; mysql.options.my_cnf_file="my"; ++ locked = true; //mysql.options.my_cnf_file="my"; ++ ++ mysql_options(&mysql, MYSQL_READ_DEFAULT_FILE, "my"); ++ + if (mysql_real_connect(&mysql,host,user,passwd,db, port,socket_name,client_flag)) + { + locked = false; +@@ -56,7 +59,7 @@ bool Connection::real_connect (cchar *db + locked = false; Success = is_connected = false; + if (throw_exceptions) throw BadQuery(error()); + } +- mysql.options.my_cnf_file=0; ++ // mysql.options.my_cnf_file=0; + if (!Success) return Success; + if (db && db[0]) // if db is not empty + Success = select_db(db); +@@ -86,7 +89,10 @@ bool Connection::shutdown () { + } + + bool Connection::connect (cchar *db, cchar *host, cchar *user, cchar *passwd) { +- locked = true; mysql.options.my_cnf_file="my"; ++ locked = true; // mysql.options.my_cnf_file="my"; ++ ++ mysql_options(&mysql, MYSQL_READ_DEFAULT_FILE, "my"); ++ + if (mysql_real_connect(&mysql,host,user,passwd,db, 3306,NULL,0)) { + locked = false; + Success = is_connected = true; +@@ -95,7 +101,7 @@ bool Connection::connect (cchar *db, cch + if (throw_exceptions) throw BadQuery(error()); + Success = is_connected = false; + } +- mysql.options.my_cnf_file=0; ++ // mysql.options.my_cnf_file=0; + if (!Success) return Success; + if (db && db[0]) // if db is not empty + Success = select_db(db); diff --git a/devel/mysql++/pkg/DESCR b/devel/mysql++/pkg/DESCR new file mode 100644 index 00000000000..e9eca43d983 --- /dev/null +++ b/devel/mysql++/pkg/DESCR @@ -0,0 +1,5 @@ +MySQL++ is a C++ API for MySQL (and other SQL Databases Soon). The +goal of this API is to make working with queries as easy as working +with other STL Containers. + +WWW: ${HOMEPAGE} diff --git a/devel/mysql++/pkg/PFRAG.shared b/devel/mysql++/pkg/PFRAG.shared new file mode 100644 index 00000000000..6e79ce9e16d --- /dev/null +++ b/devel/mysql++/pkg/PFRAG.shared @@ -0,0 +1,3 @@ +@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +lib/libsqlplus.so.1.7 +DYNLIBDIR(%D/lib) diff --git a/devel/mysql++/pkg/PLIST b/devel/mysql++/pkg/PLIST new file mode 100644 index 00000000000..19625d4cf31 --- /dev/null +++ b/devel/mysql++/pkg/PLIST @@ -0,0 +1,78 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/04/02 15:13:05 wilfried Exp $ +include/coldata1.hh +include/coldata2.hh +include/coldata3.hh +include/coldata4.hh +include/compare1.hh +include/compare2.hh +include/compare3.hh +include/connection0.hh +include/connection1.hh +include/connection2.hh +include/connection3.hh +include/const_string1.hh +include/const_string2.hh +include/const_string3.hh +include/convert1.hh +include/convert2.hh +include/convert3.hh +include/custom-macros.hh +include/custom.hh +include/datetime1.hh +include/datetime2.hh +include/datetime3.hh +include/define_short +include/defs +include/exceptions.hh +include/field_names1.hh +include/field_names2.hh +include/field_names3.hh +include/field_types1.hh +include/field_types2.hh +include/field_types3.hh +include/fields1.hh +include/fields2.hh +include/manip1.hh +include/manip2.hh +include/manip3.hh +include/mysql++ +include/null1.hh +include/null2.hh +include/null3.hh +include/query1.hh +include/query2.hh +include/query3.hh +include/resiter1.hh +include/result1.hh +include/result2.hh +include/result3.hh +include/row1.hh +include/row2.hh +include/row3.hh +include/set1.hh +include/set2.hh +include/set3.hh +include/sql_query0.hh +include/sql_query1.hh +include/sql_query2.hh +include/sql_query3.hh +include/sql_string1.hh +include/sql_string2.hh +include/sql_string3.hh +include/sqlplus.hh +include/stream2string1.hh +include/stream2string2.hh +include/stream2string3.hh +include/string_util.hh +include/tiny_int1.hh +include/tiny_int2.hh +include/tiny_int3.hh +include/type_info1.hh +include/type_info2.hh +include/type_info3.hh +include/vallist1.hh +include/vallist2.hh +include/vallist3.hh +lib/libsqlplus.a +lib/libsqlplus.la +%%SHARED%%