imake will be removed, according to bug 289296
Created attachment 208157 [details] configure.ac
Created attachment 208158 [details] Makefile.am The huge long list of -D flags is to replace the sed usage in the Imakefile, to change yy* identifiers to LayYY* (I only changed the ones that show up as visible symbols in the final library). If anyone knows a nicer way to do this in autotools, let me know.
Created attachment 208160 [details, diff] Xaw3d-1.5-r1.ebuild.patch Ebuild patch (some of the deps are gone because they're not actually used, they were just pulled in by imake because it's stupid)
The ebuild patch also adds the proper flex dependency, per bug 221417
(In reply to comment #2) > The huge long list of -D flags is to replace the sed usage in the Imakefile, to > change yy* identifiers to LayYY* (I only changed the ones that show up as > visible symbols in the final library). If anyone knows a nicer way to do this > in autotools, let me know. > You're right, plain ugly. I don't know much about flex/bison, but following files/changes seem to work for me. Consider those: AFAICT, it should produce a lib with a nearly same output, as far as defined symbols go.
Created attachment 208166 [details, diff] patch for lexer/parser This adds prefix and ansifies those two files (most of X gone through ansifying, so it shouldn't be a problem).
Created attachment 208168 [details] my configure.ac More or less the same.
Created attachment 208170 [details] my Makefile.am As you may see in this file, configure.ac need bit more work - probably a modified check for wchar.h, so that extra define can leave Makefile.am.
And la file needs to be removed, of course.
Officially, this is x11 but to be honest, I have no interest in Xaw3d as it's not even part of X.org. I'd be more than happy to hand over maintainership so that you guys can make the modifications that you want. Just make sure that users of Xaw3d (emacs comes to mind) still work with that. I would suggest you import the current Xaw3d code into a git repo and work on that instead. Then I suggest applying for a FreeDesktop account to host it closer to X.org. Cheers
Now on to the patches themselves : configure.ac: PKG_CHECK_MODULES(X11, [x11, xt, xmu]) should be PKG_CHECK_MODULES(X11, [x11 xt xmu]) (no comas in the second argument) Makefile.am: -DHAS_WCHAR_H <= should be defined by configure.ac ${X11_LIBS} is wrong, it should be $(X11_LIBS) or @X11_LIBS@ Cheers
Reassigning :)
(In reply to comment #6) > This adds prefix and ansifies those two files > (most of X gone through ansifying, so it shouldn't be a problem). I was trying to keep my changes to the build system, but yeah, if there's no way to do it just in automake, this is probably a better approach. It does seem to miss a lot, though (seemingly the ones defined by the lexer): [dleverton@shiny-one ~] $ nm -D /usr/lib64/libXaw3d.so | grep -i yy 0000000000257cc0 B LayYYchar 0000000000042110 T LayYYerror U LayYYlex 0000000000257cd0 B LayYYlval 0000000000257ce8 B LayYYnerrs 00000000000413a0 T LayYYparse 0000000000041390 T LayYYsetdest 0000000000042100 T LayYYsetsource 0000000000041380 T LayYYwrap 00000000000428a0 T yy_create_buffer 0000000000042200 T yy_delete_buffer 0000000000257c60 B yy_flex_debug 0000000000041fd0 T yy_flush_buffer 0000000000042670 T yy_scan_buffer 0000000000042730 T yy_scan_bytes 00000000000427d0 T yy_scan_string 00000000000425c0 T yy_switch_to_buffer 00000000000423f0 T yyalloc 00000000000421f0 T yyfree 00000000000420e0 T yyget_debug 0000000000042070 T yyget_in 0000000000042090 T yyget_leng 0000000000042060 T yyget_lineno 0000000000042080 T yyget_out 00000000000420a0 T yyget_text 0000000000257c50 B yyin 0000000000257cf0 B yyleng 0000000000042a20 T yylex 0000000000042320 T yylex_destroy 00000000002579f4 D yylineno 0000000000257c58 B yyout 0000000000042270 T yypop_buffer_state 0000000000042500 T yypush_buffer_state 00000000000423e0 T yyrealloc 0000000000042930 T yyrestart 00000000000420f0 T yyset_debug 00000000000420c0 T yyset_in 00000000000420b0 T yyset_lineno 00000000000420d0 T yyset_out 0000000000257cf8 B yytext U yywrap > +%name-prefix "LayYY" Needs a = there, at least for bison 2.3 (In reply to comment #7) > AC_CONFIG_MACRO_DIR([m4]) I don't see the point of that, and it makes aclocal fail unless the directory is created beforehand. > AC_CHECK_HEADERS([stdlib.h string.h wchar.h wctype.h]) > AC_CHECK_FUNCS([bzero isascii memmove strchr strerror]) Are any of these checks actually used by the code? A quick grep for HAVE_ reveals nothing. (In reply to comment #8) > libXaw3d_la_CPPFLAGS = -I. -DARROW_SCROLLBAR -DUSEGRAY -DHAS_WCHAR_H Is -I. necessary? > libXaw3d_la_LDFLAGS = -version-info 8:0 -version-number is possibly better when trying to match the existing library versioning, but in this case it works out the same. > libXaw3d_ladir = $(includedir)/X11/Xaw3d That variable name is quite confusing.... > ACLOCAL_AMFLAGS = -I m4 See above, although it doesn't seem to break anything this time. (In reply to comment #11) > configure.ac: > PKG_CHECK_MODULES(X11, [x11, xt, xmu]) should be PKG_CHECK_MODULES(X11, [x11 > xt xmu]) (no comas in the second argument) Oops. > Makefile.am: > -DHAS_WCHAR_H <= should be defined by configure.ac That's not part of mine (probably because I forgot it, not because I don't think it should be there), but I was trying for the minimal autotools usage to make it build from the ebuild. Doing it "properly" would take a bit more work. > ${X11_LIBS} is wrong, it should be $(X11_LIBS) or @X11_LIBS@ ${} is legal in Makefiles, although $() is more common. Another problem I just noticed is that this fails on a fresh install, because it tries to include its own headers as X11/Xaw3d/.... I'll try and come up with a fix for that.
(In reply to comment #13) > Another problem I just noticed is that this fails on a fresh install, because > it tries to include its own headers as X11/Xaw3d/.... I'll try and come up > with a fix for that. Adapted slightly from the current ebuild, I added mkdir X11 || die "mkdir failed" ln -s .. X11/Xaw3d || die "ln failed" Also, dependencies on libXext and xproto should be added to RDEPEND (xproto in RDEPEND because some of Xaw3d's headers include Xfuntproto.h) and xextproto to DEPEND, plus the appropriate pkgconfig invocation in configure.ac (In reply to comment #9) > And la file needs to be removed, of course. I don't think it's worth going to any effort for this, it's not hurting anything in any way.
As for the missing symbols, I was getting better matches with '%option prefix="LayYY"' in laylex.l, but that didn't work well with ylwrap. Anyway, those symbols should not be exported anyway, but it was probably to hard to do with imake, that's why LayYY came up. '%name-prefix "LayYY"' doesn't need '=' in 2.4.1. As for la file, if there was none before, there's no need for it now. Other packages tend to remove them. '-I.' will be needed for that link hack, so it includes those from sources, not system. '-DHAS_WCHAR_H' was in Makefile created by imake (on my system), but yes, should be an autoconf check.
I've pushed this to http://cgit.freedesktop.org/~mattst88/libXaw3d/ from where I hope to make it an official project on freedesktop.org.
(In reply to comment #16) > I've pushed this to > > http://cgit.freedesktop.org/~mattst88/libXaw3d/ > > from where I hope to make it an official project on freedesktop.org. Based on this, I've added a libXaw3d-9999.ebuild to the X11 overlay. I'll rename Xaw3d in the tree to libXaw3d as well to fit with the other x11-libs/.
Renamed from Xaw3d to libXaw3d.
I released libXaw3d-1.6 upstream and bumped it in portage. This is finally fixed! Thanks a lot!