In the mdbtools-0.5.ebuild, there is the following dependance : X? ( >=x11-libs/gtk+-2 >=gnome-base/libglade-2 >=gnome-base/libgnomeui-2 ) I think this dependeance should be replaced by this one : gnome? ( >=x11-libs/gtk+-2 >=gnome-base/libglade-2 >=gnome-base/libgnomeui-2 ) Secondly, the version of mdbtools could be upgraded to the last 0.6_pre1 which is really usable. Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 70445 [details] mdbtools-0.6_pre1.ebuild
I looked into this dependency at length, and I agree with Fr
I looked into this dependency at length, and I agree with Frédéric about the USE flags. No question, X should be replaced with gnome in DEPEND. mdbtools is primarily a library and a set of command line tools to manipulate mdb files (MS Access). It also comes with an "optional" GUI database browser tool. The tool not only depends on X and gtk, but it requires libglade and gnomeui as well, which are clearly part of gnome-base. The optional browser tool is called "gmdb" or "gmdb2" and the configure script silently omits it from the build if the libglade and gnomeui libraries are not found. If you do have libglade and gnomeui installed, it will build the gmdb binary regardless of configure flags specified (in fact there is no configure flag to turn this add-on on or off.) This has been a problem in other packages and many times maintainers have insisted on patching the autoconf files to add a configure option to hardware the add-on component to the status of the USE flag. In this case, I think the relationship between the "gnome" USE flag and the gmbd tool is fairly loose. When people turn on "gnome" they expect to get extra user interface apps with packages, and that is the way this ebuild has operated so far. Therefore I do not think we need to patch the autoconf files. I'm interested to hear what other people think too. I will attach patches eventually, but first some related comments.
On a side note, I experienced a compile error with 0.5 that I cannot seem to reproduce now. It went away when I upgraded to 0.6pre1. I wanted to add this as encouragement to upgrade the version, but I won't open another bug.
Created attachment 70965 [details, diff] mdbtools-0.6_pre1.ebuild.diff To apply this patch: cp mdbtools-0.5.ebuild mdbtools-0.6_pre1.ebuild patch -p0 mdbtools-0.6_pre1.ebuild.diff Changes: - Upgrade version to 0.6pre1 - Change X use flag to gnome - Removed gtk dependency because gnomeui and libglade depend on gtk already - Made the compatibility symlink dependent on the gnome use flag - Keyworded unstable on my two test archs
Created attachment 70966 [details, diff] mdbtools-0.6_pre1-gcc34.patch Changes: - Updated patch to apply cleanly to 0.6pre1. Basically, aside from the code shifting around a bit, I removed the C99/gcc 3.4 fix for the CASE statement, because it's now fixed elegantly in the code with a proper default { break; } clause.
I would suggest to ad a USE flag, such as "gui" in order to build or not to build the gmdb (or gmdb2) - GUI part of the project. Some people don't mind working from the command line, and some hates it. ;-)
*** Bug 112552 has been marked as a duplicate of this bug. ***
*** Bug 118180 has been marked as a duplicate of this bug. ***
I committed the new version to CVS. Please test!
It fails to compile with gcc-4, the problem is : i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -march=athlon-xp -O2 -pipe -DSQL -DUNIXODBC -MT backend.lo -MD -MP -MF .deps/backend.Tpo -c backend.c -fPIC -DPIC -o .libs/backend.o backend.c:31: error: static declaration of 'mdb_backends' follows non-static declaration ../../include/mdbtools.h:150: error: previous declaration of 'mdb_backends' was here make[2]: *** [backend.lo] Error 1 make[2]: Leaving directory `/var/tmp/portage/mdbtools-0.6_pre1/work/mdbtools-0.6pre1/src/libmdb' which seems to be corrected in cvs long time ago (removing the static qualifier), this 0.6_pre1 version is 2 years old, please consider adding ebuild fo some more recent cvs-snapshot (probably even reusing the debian snapshot).
Any particular snapshot dates you recommend that are more recent than Debian's patch?
well I thought of mdbtools_0.5.99.0.6pre1.0.20051109.orig.tar.gz although I haven't tested it, but reading the comments in the debian diff and looking at the cvs it seems that gcc4 problem was fixed upstream. On the other hand halcy0n has already commited a gcc4 patch (upstream change is http://mdbtools.cvs.sourceforge.net/mdbtools/mdbtools/src/libmdb/backend.c?r1=1.23&r2=1.24 in the backend.c not in the includes), but the compilation dies on another place now: /bin/sh ../../libtool --mode=link i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -DSQL -DUNIXODBC -Wl,-O1 -Wl,--as-needed -o unittest unittest.o libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la -lfl -lglib-2.0 -L/usr/lib -lodbcinst i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -DSQL -DUNIXODBC -Wl,-O1 -Wl,--as-needed -o .libs/unittest unittest.o ./.libs/libmdbodbc -L/usr/lib ../libmdb/.libs/libmdb -lm ../sql/.libs/libmdbsql -lfl -lglib-2.0 -lodbcinst ./.libs/libmdbodbc: undefined reference to `ceil' ./.libs/libmdbodbc: undefined reference to `log10' collect2: ld returned 1 exit status make[2]: *** [unittest] Error 1 but this could be simply because of the --as-needed, so nothing bad :)
In my case, the mdbtools-0.6_pre1.ebuild which is currently in portage compiles fine with gcc-4.1.1 (without odbc and gnome).
Did you compiled it with the GUI?
(In reply to comment #14) > Did you compiled it with the GUI? > No : I haven't tried with the 'gnome' USE flags (Gnome isn't installed on my PC)
Afaict, this bug is fixed.