Bug 247764 - databases/mdbtools: Update to 0.8.2
Summary: databases/mdbtools: Update to 0.8.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: buildisok
Depends on:
Blocks:
 
Reported: 2020-07-04 16:56 UTC by Rainer Hurling
Modified: 2020-08-02 14:52 UTC (History)
4 users (show)

See Also:


Attachments
patch to update databases/mdbtools from 0.7.1 to 0.8.2 (4.43 KB, patch)
2020-07-04 16:56 UTC, Rainer Hurling
rhurlin: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Hurling 2020-07-04 16:56:55 UTC
Created attachment 216199 [details]
patch to update databases/mdbtools from 0.7.1 to 0.8.2

mdbtools v0.7.1 [1] is not updated for years and the release is from 2013. For quite some time now (~ 2017), there is a fork from Cyber Emissary[2] and after some testing I decided to follow this one.

The fork from Cyber Emissary is at version 0.8.2 ATM and some more pull request were committed since then.

[1] https://github.com/brjohnsn/mdbtools
[2] https://github.com/cyberemissary



So this PR should update databases/mdbtools from 0.7.1 to 0.8.2 (from 2018-12-28) and brings some improvements and new features. User visible changes are

- Improved support for Access 2010, 2013, and 2016
- Build script and readme improvements
- Use bigger buffer when reading big blobs for better performance
- Use bulk inserts on supporting platforms for significantly better performance
- Added mdb-count utility to return row count in tables
- Update unknown flag to ddl flag for properties
- Print unknown Jet versions in libmdb


The port itself changes

- from version 0.7.1 to 0.8.2
- add CONFIGURE_ARGS=--enable-gtk-doc
- change GITHUB account
- add USE_GNOME=gdkpixbuf2
- reorder entries in Makefile (USES=, GITHUB=, ...)
- rm files/patch-src__sql__Makefile.am (upstream included)
- add newest fork URL to pkg-descr
- update pkg-plist


The patch is tested on Poudriere (11.4i/a, 12.1i/a, and HEADi/a).

'portlint -AC' suggest to add a NLS knob, but there is no easy way to disable gettext usage in the sources?



########################################################################
IMPORTANT NOTICE:  MDBTools 0.8.2 does not build, if 0.7.1 is installed:


[..snip..]
file.c:232:7: error: use of undeclared identifier 'MDB_VER_ACCDB_2013'; did you mean 'MDB_VER_ACCDB_2010'?
        case MDB_VER_ACCDB_2013:
             ^~~~~~~~~~~~~~~~~~
             MDB_VER_ACCDB_2010
/usr/local/include/mdbtools.h:71:2: note: 'MDB_VER_ACCDB_2010' declared here
        MDB_VER_ACCDB_2010 = 0x0103
        ^
file.c:233:7: error: use of undeclared identifier 'MDB_VER_ACCDB_2016'; did you mean 'MDB_VER_ACCDB_2010'?
        case MDB_VER_ACCDB_2016:
             ^~~~~~~~~~~~~~~~~~
             MDB_VER_ACCDB_2010
/usr/local/include/mdbtools.h:71:2: note: 'MDB_VER_ACCDB_2010' declared here
        MDB_VER_ACCDB_2010 = 0x0103
        ^
file.c:232:7: error: duplicate case value 'MDB_VER_ACCDB_2010'
        case MDB_VER_ACCDB_2013:
             ^
file.c:231:7: note: previous case defined here
        case MDB_VER_ACCDB_2010:
             ^
file.c:233:7: error: duplicate case value 'MDB_VER_ACCDB_2010'
        case MDB_VER_ACCDB_2016:
             ^
file.c:232:7: note: previous case defined here
        case MDB_VER_ACCDB_2013:
             ^
4 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/databases/mdbtools/work/mdbtools-0.8.2/src/libmdb


As a workaround, one can deinstall 0.7.1 before building 0.8.2. 
I could need some help here to get rid of this behaviour.
########################################################################
Comment 1 Automation User 2020-07-04 17:16:16 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/163118995
Comment 2 Li-Wen Hsu freebsd_committer 2020-07-05 04:04:04 UTC
(In reply to Rainer Hurling from comment #0)
Do you want to write an entry in UPDATING about upgrading from 0.7.1?
Comment 3 Rainer Hurling 2020-07-05 06:19:58 UTC
(In reply to Li-Wen Hsu from comment #2)

Writing an UPDATING entry is one possibility.

I was in the hope, that someone find a way to tell the build process not to use header files from the installed version (something like using rpath?). My skills are not good enough for that, unfortunately.
Comment 4 Kurt Jaeger freebsd_committer 2020-07-20 18:55:59 UTC
(In reply to Rainer Hurling from comment #3)
CONFLICTS_BUILD=mdbtools-* might work, give it a test.
Comment 5 Rainer Hurling 2020-07-21 05:11:09 UTC
(In reply to Kurt Jaeger from comment #4)
Hi Kurt, Thanks for the suggestion.

For some reason, CONFLICTS_BUILDS=mdbtools-* is completely ignored, while building the port in the presence of an installed one ...
Comment 6 Rainer Hurling 2020-07-22 12:34:58 UTC
(In reply to Li-Wen Hsu from comment #2)

After I had no luck with the suggestion from Kurt, to add CONLICTS_BUILD=mdbtools to the Makefile, I think it would be ok to add an entry to the UPDATING file. Something like the following text should be sufficient. What do you think?


20200722:
  AFFECTS: users of databases/mdbtools
  AUTHOR: rhurlin@gwdg.de

  In MDBTools the build process is broken, if mdbtools is installed
  already, because it picks up some files from ${LOCALBASE} instead of
  the ports working directory.

  If you are using a tool like portmaster or portupgrade, please first
  deinstall (any version) of mdbtools, then follow the normal upgrade
  method.

  # pkg delete -f mdbtools
  # rm -R /var/db/pkg/mdbtools-*
Comment 7 commit-hook freebsd_committer 2020-08-02 14:51:25 UTC
A commit references this bug:

Author: swills
Date: Sun Aug  2 14:50:57 UTC 2020
New revision: 543967
URL: https://svnweb.freebsd.org/changeset/ports/543967

Log:
  atabases/mdbtools: Update to 0.8.2

  PR:		247764
  Submitted by:	Rainer Hurling <rhurlin@gwdg.de> (maintainer)

Changes:
  head/databases/mdbtools/Makefile
  head/databases/mdbtools/distinfo
  head/databases/mdbtools/files/patch-src__sql__Makefile.am
  head/databases/mdbtools/pkg-descr
  head/databases/mdbtools/pkg-plist
Comment 8 Steve Wills freebsd_committer 2020-08-02 14:52:23 UTC
Committed, thanks!