On Mon, Oct 6, 2008 at 2:28 PM, Dorian Büttner <[EMAIL PROTECTED]> wrote: > On Monday 06 October 2008 16:52:59 Matt wrote: >> It's working for me with a dirty hack applied to the mysql51-server >> port that I have built in the tinderbox. Patch is attached and >> available at: >> http://www.datahead.org/fbsdfiles/mysql51-server_libmysqld.patch >> >> I haven't spent much time researching the recommended way to build >> JUST the embedded MySQL library, so this patch adds it in to the >> general server build. However, in doing it this way, some files >> installed by the mysql51-client port are overwritten if the port is >> compiled locally (i.e. not in a tinderbox). It really seems that this >> is the wrong way to build the embedded library, but it worked well >> enough for me to get the amarok port built. > > Looks like the amarok guys would be fiddling with this as well: > > http://lists.kde.org/?l=amarok&m=122225696713011&w=2 > > Does this look promising to get a distinct --embedded option into the mysql > port? As far as I understand it's only the libmysql needed. > > The supplementary scripts being talked about are linked here: > http://lists.kde.org/?l=amarok&m=122275982306865&w=2 > How to check them out into the mysql/work dir? > > Regards, > Dorian > Here's a go at an embedded MySQL library port that shouldn't overwrite anything in the -server and -client ports. Tested with mysql51 only and successfully run through my tinderbox (build of mysql51-server, mysql51-embedded and amarok2 in tinderbox resulted in a usable amarok binary). The patch should apply from within the mysql51-server port directory. Portlint and my tinderbox runs don't show any blatant problems, but please proceed at your own risk with any builds - I am not an experienced port writer.
Matt
diff -r -U3 --new-file /usr/ports/databases/mysql51-server/Makefile mysql51-server/Makefile
--- Makefile.orig 2008-09-23 00:43:45.000000000 -0500
+++ Makefile 2008-10-06 20:09:56.000000000 -0500
@@ -17,7 +17,7 @@
MAINTAINER= [EMAIL PROTECTED]
COMMENT?= Multithreaded SQL database (server)
-SLAVEDIRS= databases/mysql51-client databases/mysql51-scripts
+SLAVEDIRS= databases/mysql51-client databases/mysql51-scripts databases/mysql51-embedded
USE_AUTOTOOLS= libtool:15
USE_GMAKE= yes
@@ -84,7 +84,7 @@
CXXFLAGS+= -fno-exceptions
# MySQL-Server part
-.if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY)
+.if !defined(CLIENT_ONLY) && !defined(SCRIPTS_ONLY) && !defined(EMBEDDED_ONLY)
USE_MYSQL= yes
WANT_MYSQL_VER= 51
@@ -143,6 +143,33 @@
@${CAT} ${PKGMESSAGE}
.endif
+# MySQL-Embedded part
+.elif defined(EMBEDDED_ONLY)
+LATEST_LINK= mysql51-embedded
+CONFIGURE_ARGS+=--with-embedded-server \
+ --without-docs \
+ --without-man \
+ --without-server \
+ --without-bench \
+ --without-ssl \
+ --without-plugin-example
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|SUBDIRS =|SUBDIRS = include sql-common strings regex mysys dbug vio libmysql storage sql @libmysqld_dirs@|g" ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/include/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/strings/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/mysys/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/dbug/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/vio/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLTLIBRARIES|install-exec-am:|g" ${WRKSRC}/libmysql/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-binPROGRAMS install-libexecPROGRAMS|install-exec-am:|g" ${WRKSRC}/sql/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-data-local|install-data-am:|g" ${WRKSRC}/sql/share/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-pkgdataDATA|install-data-am:|g" ${WRKSRC}/storage/myisam/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/myisammrg/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/heap/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-exec-am: install-binPROGRAMS install-pkglibLIBRARIES|install-exec-am:|g" ${WRKSRC}/storage/myisam/Makefile.in
+ @${REINPLACE_CMD} -e "s|install-data-am: install-pkgincludeHEADERS|install-data-am:|g" ${WRKSRC}/extra/Makefile.in
+
.else
# MySQL-Client part
.if defined(CLIENT_ONLY)
diff -r -U3 --new-file /usr/ports/databases/mysql51-server/pkg-plist.embedded mysql51-server/pkg-plist.embedded
--- pkg-plist.embedded.orig 1969-12-31 18:00:00.000000000 -0600
+++ pkg-plist.embedded 2008-10-06 16:19:02.000000000 -0500
@@ -0,0 +1,5 @@
+bin/mysql_client_test_embedded
+bin/mysqltest_embedded
+lib/mysql/libmysqld.a
[EMAIL PROTECTED] lib/mysql/plugin
[EMAIL PROTECTED] lib/mysql
mysql51-embedded.tar
Description: Unix tar archive
_______________________________________________ kde-freebsd mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-freebsd See also http://freebsd.kde.org/ for latest information
