Bug 152693 - [patch] databases/dbf2mysql can be compiled with current MySQL client library
Summary: [patch] databases/dbf2mysql can be compiled with current MySQL client library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Beech Rintoul
Depends on:
Reported: 2010-11-30 02:10 UTC by Miroslav Lachman
Modified: 2010-12-04 21:30 UTC (History)
0 users

See Also:

file.diff (2.73 KB, patch)
2010-11-30 02:10 UTC, Miroslav Lachman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2010-11-30 02:10:12 UTC
The port databases/dbf2mysql has hardoced dependency on mysql-client-3.23.59.n.20050301_2 which is too old in these days and can't be compiled with newer gcc.

root@roxy dbf2mysql/# make
===>  Extracting for dbf2mysql-1.14_2
=> MD5 Checksum OK for dbf2mysql-1.14.tar.gz.
=> SHA256 Checksum OK for dbf2mysql-1.14.tar.gz.
===>  Patching for dbf2mysql-1.14_2
===>  Applying FreeBSD patches for dbf2mysql-1.14_2
===>   dbf2mysql-1.14_2 depends on shared library: mysqlclient.10 - not found
===>    Verifying install for mysqlclient.10 in /usr/ports/databases/mysql323-client
===>  mysql-client-3.23.59.n.20050301_2 obsolete and does not build with gcc4.2; use mysql 5 or later.
*** Error code 1

Stop in /usr/ports/databases/mysql323-client.
*** Error code 1

Stop in /usr/ports/databases/dbf2mysql. 

It is better to make it compilable with current versions of MySQL client library (5.0 or 5.1 for example) and use generic:


instead of

LIB_DEPENDS=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client

Fix: The problem is first discussed here

And working patch is attached. 
Now it works with MySQL 5.0.90 client library.

Patch attached with submission follows:
How-To-Repeat: Try to build and use dbf2mysql in todays systems (GCC 4.2, MySQL 5.0.x etc.)
Comment 1 Miroslav Lachman 2010-12-02 11:29:24 UTC
There are additional improvements from Debian's patch

It adds support for charset settings.

But charset support is incomplete, it needs CHARACTER SET in LOAD DATA 

sprintf (query, "LOAD DATA LOCAL INFILE '%s' REPLACE INTO table %s 
table, charset);

If somebody is willing to test & committ it, I can produce the patches 
for FreeBSD ports system. Just let me know.

Miroslav Lachman
Comment 2 Beech Rintoul freebsd_committer 2010-12-03 23:23:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->beech

I'll take it.
Comment 3 dfilter service freebsd_committer 2010-12-04 21:21:18 UTC
beech       2010-12-04 21:21:14 UTC

  FreeBSD ports repository

  Modified files:
    databases/dbf2mysql  Makefile 
  Added files:
    databases/dbf2mysql/files patch-mysql2dbf.c 
  Fix can be compiled with current MySQL client library
  PR:             ports/152693
  Submitted by:   Miroslav Lachman (000.fbsd@quip.cz) (maintainer)
  Approved by:    itetcu (mentor) (implicit)
  Revision  Changes    Path
  1.16      +1 -1      ports/databases/dbf2mysql/Makefile
  1.1       +88 -0     ports/databases/dbf2mysql/files/patch-mysql2dbf.c (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Beech Rintoul freebsd_committer 2010-12-04 21:22:17 UTC
State Changed
From-To: open->closed

Committed, Thanks!