The ebuild applies a patch for Solaris 11: [[ ${CHOST} == *-solaris2.11 ]] \ && epatch "${FILESDIR}/${PN}-2.3.2-solaris-2.11.patch" I'd like to get rid of this conditional patch, because it prevents me from moving the patches into a patchset. If possible, the check should be done with preprocessor conditionals instead (and the issue should be reported upstream). Above code originates from the Prefix overlay: http://overlays.gentoo.org/proj/alt/changeset/31404
It doesn't compile without the patch, need to check if it actually does with the patch. Nevertheless I don't see why this patch would need to be conditional unless it breaks Solaris 10. It shouldn't break linux for as far as I can tell.
on OpenIndiana: - installs with patch - fails without patch: /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c: In function ‘_XmOSGetDirEntries’: /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c:805:7: error: too few arguments to function ‘readdir_r’ In file included from /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/../Xm/Xmos_r.h:549:0, from /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c:92: /usr/include/dirent.h:234:12: note: declared here make[3]: *** [Xmos.lo] Error 1 on Solaris 10: - installs without patch - fails with patch: /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c: In function ‘_XmOSGetDirEntries’: /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c:805:7: error: too many arguments to function ‘readdir_r’ In file included from /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/../Xm/Xmos_r.h:549:0, from /gentoo/prefix64/var/tmp/portage/x11-libs/motif-2.3.4-r1/work/motif-2.3.4/lib/Xm/Xmos.c:92: /usr/include/dirent.h:234:12: note: declared here make[3]: *** [Xmos.lo] Error 1
(In reply to comment #2) > on OpenIndiana: > [...] > error: too few arguments to function ‘readdir_r’ > on Solaris 10: > [...] > error: too many arguments to function ‘readdir_r’ Darn. I see two ways to fix it: - Find a macro that allows us to identify Solaris 10 - Write a configure test that finds out how many arguments are needed for readdir_r
I'd say the configure check is the way to go
Created attachment 346802 [details, diff] files/motif-2.3.4-solaris-2.11.patch
Created attachment 346804 [details, diff] Diff for motif-2.3.4-r1.ebuild (In reply to comment #4) > I'd say the configure check is the way to go Looking into the issue, it turns out that the configure check would involve compiling some test programs, and the header files for them (dirent.h vs sys/dir.h vs sys/ndir.h etc.) are themselves system dependent. Also the configure test would be needed only for the case when <X11/Xos_r.h> doesn't exist. Testing for a symbol defined by the ebuild is much easier. Can you test if attached patches work?
patches work on OpenIndiana/OpenSolaris 5.11 patches work on Solaris 10
Committed. Thanks for testing.