ports/128757: Request addition of mysql-embedded to ports

Matt datahead4 at gmail.com
Mon Nov 10 19:30:02 UTC 2008


>Number:         128757
>Category:       ports
>Synopsis:       Request addition of mysql-embedded to ports
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 10 19:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Matt
>Release:        
>Organization:
>Environment:
>Description:
The upcoming Amarok 2 requires the mysql-embedded library to build.  Can we get a port to create the mysql-embedded library?
>How-To-Repeat:

>Fix:
I've created an example patch set against the mysql51-server port that appears to work.  The port allows Amarok 2 to compile and run and it builds cleanly in a tinderbox.  Attached file is a shell archive with the needed files.

Patch attached with submission follows:

# 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:
#
#	.
#	./mysql51-embedded
#	./mysql51-embedded/Makefile
#	./mysql51-embedded/files
#	./mysql51-embedded/files/patch-include_mysql.h
#	./mysql51-embedded/files/patch-include_myisam.h
#	./mysql51-server
#	./mysql51-server/pkg-plist.embedded
#	./mysql51-server/mysql51-embedded.patch
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo c - ./mysql51-embedded
mkdir -p ./mysql51-embedded > /dev/null 2>&1
echo x - ./mysql51-embedded/Makefile
sed 's/^X//' >./mysql51-embedded/Makefile << '285307b3b56d18ddce06e9ab8b9db38b'
X# New ports collection makefile for:	MySQL-embedded
X# Date created:				06 Oct 2008
X# Whom:					Alex Dupre <ale at FreeBSD.org>
X#
X# $FreeBSD: ports/databases/mysql51-embedded/Makefile,v 1.00 2008/10/06 21:25:06 ale Exp $
X#
X
XPORTNAME=	mysql
XPKGNAMESUFFIX=	-embedded
X
XCOMMENT=	Multithreaded SQL database (embedded server library)
X
XMASTERDIR=	${.CURDIR}/../mysql51-server
X
XPKGINSTALL=	mustnotexist
XPKGMESSAGE=	mustnotexist
XPLIST=		${PKGDIR}/pkg-plist.embedded
XEXTRA_PATCHES=	${.CURDIR}/files/patch-include_mysql.h \
X		${.CURDIR}/files/patch-include_myisam.h
X
XEMBEDDED_ONLY=	yes
X
X.include "${MASTERDIR}/Makefile"
285307b3b56d18ddce06e9ab8b9db38b
echo c - ./mysql51-embedded/files
mkdir -p ./mysql51-embedded/files > /dev/null 2>&1
echo x - ./mysql51-embedded/files/patch-include_mysql.h
sed 's/^X//' >./mysql51-embedded/files/patch-include_mysql.h << 'bf531b5b6d9e8ef234d22356e6b96e9c'
X--- include/mysql.h	2008-07-29 21:33:00.000000000 +0400
X+++ include/mysql.h	2008-07-29 21:38:34.000000000 +0400
X@@ -27,6 +27,10 @@
X #ifndef _mysql_h
X #define _mysql_h
X 
X+#include <stdlib.h>
X+
X+#define exit(x) { fprintf( stderr, "MySQLe exit( %d ) at " __FILE__ ":%d .\n", (x), __LINE__ ), exit( x );  }
X+
X #ifdef _AIX           /* large-file support will break without this */
X #include <standards.h>
X #endif
X
bf531b5b6d9e8ef234d22356e6b96e9c
echo x - ./mysql51-embedded/files/patch-include_myisam.h
sed 's/^X//' >./mysql51-embedded/files/patch-include_myisam.h << '3ccca17b8eb3e3cbced2976792274588'
X--- include/myisam.h	2008-07-29 21:33:57.000000000 +0400
X+++ include/myisam.h	2008-07-29 21:34:29.000000000 +0400
X@@ -53,7 +53,7 @@
X   The following defines can be increased if necessary.
X   But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH.
X */
X-#define MI_MAX_KEY_LENGTH           1000            /* Max length in bytes */
X+#define MI_MAX_KEY_LENGTH           4000            /* Max length in bytes */
X #define MI_MAX_KEY_SEG              16              /* Max segments for key */
X 
X #define MI_MAX_KEY_BUFF  (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
X
3ccca17b8eb3e3cbced2976792274588
echo c - ./mysql51-server
mkdir -p ./mysql51-server > /dev/null 2>&1
echo x - ./mysql51-server/pkg-plist.embedded
sed 's/^X//' >./mysql51-server/pkg-plist.embedded << 'd705e5d758e99e88368a7423c71df7a3'
Xbin/mysql_client_test_embedded
Xbin/mysqltest_embedded
Xlib/mysql/libmysqld.a
X at dirrmtry lib/mysql/plugin
X at dirrmtry lib/mysql
d705e5d758e99e88368a7423c71df7a3
echo x - ./mysql51-server/mysql51-embedded.patch
sed 's/^X//' >./mysql51-server/mysql51-embedded.patch << 'ff5a0ae6559a30a63729d235fa387010'
Xdiff -r -U3 --new-file /usr/ports/databases/mysql51-server/Makefile mysql51-server/Makefile
X--- Makefile.orig	2008-09-23 00:43:45.000000000 -0500
X+++ Makefile	2008-10-06 20:09:56.000000000 -0500
X@@ -17,7 +17,7 @@
X MAINTAINER=	ale at FreeBSD.org
X COMMENT?=	Multithreaded SQL database (server)
X 
X-SLAVEDIRS=	databases/mysql51-client databases/mysql51-scripts
X+SLAVEDIRS=	databases/mysql51-client databases/mysql51-scripts databases/mysql51-embedded
X USE_AUTOTOOLS=	libtool:15
X USE_GMAKE=	yes
X 
X@@ -84,7 +84,7 @@
X CXXFLAGS+=	-fno-exceptions
X 
X # MySQL-Server part
X-.if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY)
X+.if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY) && !defined(EMBEDDED_ONLY)
X USE_MYSQL=	yes
X WANT_MYSQL_VER=	51
X 
X@@ -143,6 +143,33 @@
X 	@${CAT} ${PKGMESSAGE}
X .endif
X 
X+# MySQL-Embedded part
X+.elif defined(EMBEDDED_ONLY)
X+LATEST_LINK=	mysql51-embedded
X+CONFIGURE_ARGS+=--with-embedded-server \
X+		--without-docs \
X+		--without-man \
X+		--without-server \
X+		--without-bench \
X+		--without-ssl \
X+		--without-plugin-example
X+
X+post-patch:
X+	@${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include sql-common strings regex mysys dbug vio libmysql storage sql @libmysqld_dirs@|g" ${WRKSRC}/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/include/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/strings/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/mysys/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/dbug/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/vio/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLTLIBRARIES|install-exec-am:|g" ${WRKSRC}/libmysql/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-binPROGRAMS install-libexecPROGRAMS|install-exec-am:|g" ${WRKSRC}/sql/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-data-am: install-data-local|install-data-am:|g" ${WRKSRC}/sql/share/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-data-am: install-pkgdataDATA|install-data-am:|g" ${WRKSRC}/storage/myisam/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/myisammrg/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/heap/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-exec-am: install-binPROGRAMS install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/myisam/Makefile.in
X+	@${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/extra/Makefile.in
X+
X .else
X # MySQL-Client part
X .if defined(CLIENT_ONLY)
Xdiff -r -U3 --new-file /usr/ports/databases/mysql51-server/pkg-plist.embedded mysql51-server/pkg-plist.embedded
X--- pkg-plist.embedded.orig	1969-12-31 18:00:00.000000000 -0600
X+++ pkg-plist.embedded	2008-10-06 16:19:02.000000000 -0500
X@@ -0,0 +1,5 @@
X+bin/mysql_client_test_embedded
X+bin/mysqltest_embedded
X+lib/mysql/libmysqld.a
X+ at dirrmtry lib/mysql/plugin
X+ at dirrmtry lib/mysql
ff5a0ae6559a30a63729d235fa387010
exit



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



More information about the freebsd-ports-bugs mailing list