Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  5 Aug 2004 16:33:30 -0600
From:      "Jie Gao" <gaoj@cpsc.ucalgary.ca>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/70050: [New Port] databases/mysqlcppapi -- A branch of MySQL++, C++ API for MySQL
Message-ID:  <200408052233.i75MXUpi019026@imgw1.cpsc.ucalgary.ca>
Resent-Message-ID: <200408052240.i75MePjc087287@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         70050
>Category:       ports
>Synopsis:       [New Port] databases/mysqlcppapi -- A branch of MySQL++, C++ API for MySQL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 05 22:40:25 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jie Gao
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
>Environment:
System: FreeBSD aibsd-stable.cpsc.ucalgary.ca 4.10-STABLE FreeBSD 4.10-STABLE #0: Wed Aug 4 17:21:59 MDT 2004 root@aibsd-stable.cpsc.ucalgary.ca:/usr/obj/usr/src/sys/AIBSDSTABLE i386


	
>Description:
	
This is a new port: databases/mysqlcppapi

mysqlcppapi is a C++ wrapper for the MySQL C API library.

It is a branch of the MySql++ project, but it has diverged significantly for
the following reasons:

* MySQL++ is aggressively optimised for speed, but optimisation should happen
  after the design is mature, and that optimisation should be targeted.
  Premature optimisation obscures the design and prevents it from improving.
* MySQL++ provides too many ways to do things instead of deciding on an
  interface. Again, this obscures the design.
* MySQL++ uses preprocessor macros to an extent that is unacceptable in a C++
  library.

WWW: http://mysqlcppapi.sourceforge.net

This package uses better C++ codes than mysql++. It compiles without problem
on CURRENT with gcc-3.4.2 (while mysql++ is currently broken with gcc-3.4).

>How-To-Repeat:
	
N/A
>Fix:

	
The following script creates the port skeleton directory. My work in the port
includes:

1. Fix new mysql_shutdown() api problem.
2. pkgconfig specifications to libdata
3. Avoid things like libmysqlcppapi-1.9-1.9 and mysqlcppapi-2.0/mysqlcppapi/
4. Remove pointless -I... and -L... flags in pkgconfig specification

--- databases-mysqlcppapi.sh begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	databases/mysqlcppapi
#	databases/mysqlcppapi/files
#	databases/mysqlcppapi/files/patch-mysqlcppapi-Connection.cc
#	databases/mysqlcppapi/files/patch-configure
#	databases/mysqlcppapi/files/patch-mysqlcppapi-2.0.pc.in
#	databases/mysqlcppapi/Makefile
#	databases/mysqlcppapi/distinfo
#	databases/mysqlcppapi/pkg-descr
#	databases/mysqlcppapi/pkg-plist
#
echo c - databases/mysqlcppapi
mkdir -p databases/mysqlcppapi > /dev/null 2>&1
echo c - databases/mysqlcppapi/files
mkdir -p databases/mysqlcppapi/files > /dev/null 2>&1
echo x - databases/mysqlcppapi/files/patch-mysqlcppapi-Connection.cc
sed 's/^X//' >databases/mysqlcppapi/files/patch-mysqlcppapi-Connection.cc << 'END-of-databases/mysqlcppapi/files/patch-mysqlcppapi-Connection.cc'
X--- mysqlcppapi/Connection.cc.orig	Wed Aug  4 23:15:58 2004
X+++ mysqlcppapi/Connection.cc	Wed Aug  4 23:18:13 2004
X@@ -211,9 +211,11 @@
X bool Connection::shutdown ()
X {
X   check_connection_is_open();
X-  
X+#if  ( MYSQL_VERSION_ID == 40103 ) || ( MYSQL_VERSION_ID == 50001 )
X+  bool suc = !(mysql_shutdown(m_sharedptr_connection.obj(),SHUTDOWN_DEFAULT));
X+#else
X   bool suc = !(mysql_shutdown(m_sharedptr_connection.obj()));
X-
X+#endif
X   if (!suc)
X     throw ex_BadQuery(error());
X 
END-of-databases/mysqlcppapi/files/patch-mysqlcppapi-Connection.cc
echo x - databases/mysqlcppapi/files/patch-configure
sed 's/^X//' >databases/mysqlcppapi/files/patch-configure << 'END-of-databases/mysqlcppapi/files/patch-configure'
X--- configure~	Wed Aug  4 23:58:41 2004
X+++ configure	Thu Aug  5 00:12:29 2004
X@@ -18465,8 +18465,8 @@
X fi;
X 
X 
X-MYSQL_LIBS="-L${MYSQL_PREFIX}/mysql/lib/mysql -lmysqlclient -L${MYSQL_PREFIX}/lib/mysql -lmysqlclient"
X-MYSQL_CFLAGS="-I${MYSQL_PREFIX}/mysql/include"
X+MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql -lmysqlclient"
X+MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
X 
X 
X 
END-of-databases/mysqlcppapi/files/patch-configure
echo x - databases/mysqlcppapi/files/patch-mysqlcppapi-2.0.pc.in
sed 's/^X//' >databases/mysqlcppapi/files/patch-mysqlcppapi-2.0.pc.in << 'END-of-databases/mysqlcppapi/files/patch-mysqlcppapi-2.0.pc.in'
X--- mysqlcppapi-2.0.pc.in.orig	Thu Mar 21 03:06:01 2002
X+++ mysqlcppapi-2.0.pc.in	Thu Aug  5 15:37:18 2004
X@@ -7,6 +7,6 @@
X Description: C++ wrapper for MySQL client library
X Requires:
X Version: @VERSION@
X-Libs: -L${libdir} -lmysqlcppapi-1.9  @MYSQL_LIBS@
X-Cflags: -I${includedir}/mysqlcppapi-2.0 -I${libdir}/mysqlcppapi-2.0/include  @MYSQL_CFLAGS@
X+Libs: -L${libdir} -lmysqlcppapi  @MYSQL_LIBS@ @LDFLAGS@
X+Cflags: @CPPFLAGS@ @MYSQL_CFLAGS@ -I${prefix}/include
X 
END-of-databases/mysqlcppapi/files/patch-mysqlcppapi-2.0.pc.in
echo x - databases/mysqlcppapi/Makefile
sed 's/^X//' >databases/mysqlcppapi/Makefile << 'END-of-databases/mysqlcppapi/Makefile'
X# ports collection makefile for:	mysqlcppapi
X# Date created:				4 August 2004
X# Whom:					Jie Gao <gaoj@cpsc.ucalgary.ca>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mysqlcppapi
XPORTVERSION=	1.9.3
XCATEGORIES=	databases devel
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=mysqlcppapi
X
XMAINTAINER=	gaoj@cpsc.ucalgary.ca
XCOMMENT=	A fork of mysql++ C++ API for MySQL
X
XUSE_MYSQL=	yes
XUSE_REINPLACE=	yes
XUSE_LIBTOOL_VER=15
XGNU_CONFIGURE=	yes
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500035
XBUILD_DEPENDS+=	${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
XRUN_DEPENDS+=	${LOCALBASE}/lib/libstlport_gcc.so:${PORTSDIR}/devel/stlport
XCONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/stlport" \
X		LDFLAGS="-L${LOCALBASE}/lib -lstlport_gcc ${PTHREAD_LIBS}"
X.else
XCONFIGURE_ENV+=	CPPFLAGS="-I${LOCALBASE}/include" \
X		LDFLAGS="-L${LOCALBASE}/lib"
X.endif
XCONFIGURE_ARGS=	--with-mysql=${LOCALBASE}
XINSTALLS_SHLIB=	yes
X
X
Xpost-patch:
X	${REINPLACE_CMD} -e '/^pkgconfigdir =/s,\$$(libdir),$$(prefix)/libdata,g' \
X		${WRKSRC}/Makefile.in
X	${REINPLACE_CMD} s/libmysqlcppapi-1.9/libmysqlcppapi/g \
X		${WRKSRC}/mysqlcppapi/Makefile.in ${WRKSRC}/examples/Makefile.in
X	${FIND} ${WRKSRC}/mysqlcppapi -name Makefile.in \
X       		-exec ${REINPLACE_CMD} -e \
X		'/^library_includedir =/s,\$$(GENERIC_LIBRARY_NAME)-2.0/,,g' '{}' \;
X
X.include <bsd.port.post.mk>
END-of-databases/mysqlcppapi/Makefile
echo x - databases/mysqlcppapi/distinfo
sed 's/^X//' >databases/mysqlcppapi/distinfo << 'END-of-databases/mysqlcppapi/distinfo'
XMD5 (mysqlcppapi-1.9.3.tar.gz) = 2479e6ab1f0f490119ead67e254fed3b
XSIZE (mysqlcppapi-1.9.3.tar.gz) = 354688
END-of-databases/mysqlcppapi/distinfo
echo x - databases/mysqlcppapi/pkg-descr
sed 's/^X//' >databases/mysqlcppapi/pkg-descr << 'END-of-databases/mysqlcppapi/pkg-descr'
Xmysqlcppapi is a C++ wrapper for the MySQL C API library.
X
XIt is a branch of the MySql++ project, but it has diverged significantly for
Xthe following reasons:
X
X* MySQL++ is aggressively optimised for speed, but optimisation should happen
X  after the design is mature, and that optimisation should be targeted.
X  Premature optimisation obscures the design and prevents it from improving.
X* MySQL++ provides too many ways to do things instead of deciding on an
X  interface. Again, this obscures the design.
X* MySQL++ uses preprocessor macros to an extent that is unacceptable in a C++
X  library.
X
XWWW: http://mysqlcppapi.sourceforge.net
END-of-databases/mysqlcppapi/pkg-descr
echo x - databases/mysqlcppapi/pkg-plist
sed 's/^X//' >databases/mysqlcppapi/pkg-plist << 'END-of-databases/mysqlcppapi/pkg-plist'
Xinclude/mysqlcppapi/Allocator_Connection.h
Xinclude/mysqlcppapi/ColData.h
Xinclude/mysqlcppapi/Connection.h
Xinclude/mysqlcppapi/const_subscript_container.h
Xinclude/mysqlcppapi/convert.h
Xinclude/mysqlcppapi/datetime/Date.h
Xinclude/mysqlcppapi/datetime/DateTime.h
Xinclude/mysqlcppapi/datetime/Time.h
Xinclude/mysqlcppapi/datetime/date_base.h
Xinclude/mysqlcppapi/datetime/datetime_base.h
Xinclude/mysqlcppapi/datetime/stream2string.h
Xinclude/mysqlcppapi/datetime/time_base.h
Xinclude/mysqlcppapi/exceptions/ex_BadConversion.h
Xinclude/mysqlcppapi/exceptions/ex_BadNullConversion.h
Xinclude/mysqlcppapi/exceptions/ex_BadQuery.h
Xinclude/mysqlcppapi/exceptions/ex_BadQuery_NotEnoughParameters.h
Xinclude/mysqlcppapi/exceptions/ex_Locked.h
Xinclude/mysqlcppapi/exceptions/ex_base.h
Xinclude/mysqlcppapi/fields/FieldInfo.h
Xinclude/mysqlcppapi/fields/FieldType.h
Xinclude/mysqlcppapi/fields/Fields.h
Xinclude/mysqlcppapi/mysqlcppapi.h
Xinclude/mysqlcppapi/mysqlcppapi_internal.h
Xinclude/mysqlcppapi/null.h
Xinclude/mysqlcppapi/query/Query.h
Xinclude/mysqlcppapi/query/sql_query.h
Xinclude/mysqlcppapi/query_results/Allocator_Result.h
Xinclude/mysqlcppapi/query_results/Result_NoData.h
Xinclude/mysqlcppapi/query_results/Result_Store.h
Xinclude/mysqlcppapi/query_results/Result_Use.h
Xinclude/mysqlcppapi/row/Row.h
Xinclude/mysqlcppapi/row/row_template.h
Xinclude/mysqlcppapi/smartpointer/Allocator.h
Xinclude/mysqlcppapi/smartpointer/SharedPtr.h
Xinclude/mysqlcppapi/string_util.h
Xinclude/mysqlcppapi/windows_includes.h
Xlib/libmysqlcppapi-1.9.so
Xlib/libmysqlcppapi-1.9.so.4
Xlib/libmysqlcppapi.a
Xlib/libmysqlcppapi.so
Xlibdata/pkgconfig/mysqlcppapi-2.0.pc
X@dirrm include/mysqlcppapi/smartpointer
X@dirrm include/mysqlcppapi/row
X@dirrm include/mysqlcppapi/query_results
X@dirrm include/mysqlcppapi/query
X@dirrm include/mysqlcppapi/fields
X@dirrm include/mysqlcppapi/exceptions
X@dirrm include/mysqlcppapi/datetime
X@dirrm include/mysqlcppapi
END-of-databases/mysqlcppapi/pkg-plist
exit
--- databases-mysqlcppapi.sh ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408052233.i75MXUpi019026>