pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/44471: graphics/cairo compile failure - renderproto / x11-links issue (NetBSD 5.0)



The following reply was made to PR pkg/44471; it has been noted by GNATS.

From: Thomas Klausner <wiz%NetBSD.org@localhost>
To: NetBSD bugtracking <gnats-bugs%NetBSD.org@localhost>
Cc: 
Subject: Re: pkg/44471: graphics/cairo compile failure - renderproto /
 x11-links issue (NetBSD 5.0)
Date: Thu, 27 Jan 2011 11:11:18 +0100

 --zYM0uCDKw75PZbzx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Thu, Jan 27, 2011 at 09:25:00AM +0000, kre%munnari.OZ.AU@localhost wrote:
 >      The underlying cause of the problem seems to be the following logic
 >      in pkgtools/x11-links/version.mk
 > 
 > BUILTIN_X11_TYPE.XFree86=    XFree86
 > 
 > BUILTIN_FIND_FILES_VAR:=             CF_XFREE86 CF_XFREE86_VERSION
 > BUILTIN_FIND_FILES.CF_XFREE86=               
 > ${X11BASE}/lib/X11/config/xfree86.cf
 > BUILTIN_FIND_FILES.CF_XFREE86_VERSION=       
 > ${X11BASE}/lib/X11/config/version.def
 > .include "../../mk/buildlink3/find-files.mk"
 > 
 > .if !defined(BUILTIN_X11_VERSION.XFree86) && \
 >     exists(${CF_XFREE86}) && exists(${CF_XFREE86_VERSION})
 > BUILTIN_X11_VERSION.XFree86!=                                                
 > \
 >              ....
 >  
 >      The awk script that sets BUILTIN_X11_VERSION.XFree86 omitted
 >      here as that's not the problem.
 > 
 >      The assumption in that test is that if both xfree86.cf and
 >      version.def exist (in the appropriate place) then the system is
 >      an old XFree86 based X11, and for NetBSD 5.0 that's just not true.
 > 
 >      It has both of those files, but is xorg based (it also has xorg.cf)
 >      The version in version.def is 4.3.99.902.
 > 
 >      This problem isn't seen on 5.1 or current, as in those version.def
 >      has been removed, and a new file, xorgversion.def has appeared in
 >      its place.
 > 
 >      But pkgsrc is supposed to still be supporting 5.0 so I think we
 >      need a fix, but I don't feel qualified to work out what the
 >      proper fix should be.
 > 
 >      One possibility would be to test for xorg.cf and if it exists,
 >      than we know it is not XFree86 (I think...)
 
 I think this dates back to 2007 when x11/xorg-libs/version.mk was
 removed and the inclusion removed from version.mk, which effectively
 broke this file. I wonder why this didn't cause more trouble so far.
 
 Can you please try the attached patch?
  Thomas
 
 --zYM0uCDKw75PZbzx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="xorg-version-check.diff"
 
 Index: version.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/x11-links/version.mk,v
 retrieving revision 1.4
 diff -u -r1.4 version.mk
 --- version.mk 8 Jan 2011 21:46:56 -0000       1.4
 +++ version.mk 27 Jan 2011 10:09:51 -0000
 @@ -13,6 +13,7 @@
  #
  
  .if !defined(BUILTIN_X11_VERSION.native)
 +.  include "xorg-version.mk"
  .  include "xfree-version.mk"
  
  .  if defined(BUILTIN_X11_VERSION.xorg)
 Index: xorg-version.mk
 ===================================================================
 RCS file: xorg-version.mk
 diff -N xorg-version.mk
 --- /dev/null  1 Jan 1970 00:00:00 -0000
 +++ xorg-version.mk    27 Jan 2011 10:09:51 -0000
 @@ -0,0 +1,34 @@
 +# $NetBSD: version.mk,v 1.2 2005/06/20 22:13:10 jlam Exp $
 +#
 +# This Makefile fragment is included by Makefiles that need to access
 +# the X11_TYPE and version number of an X.org distribution.
 +#
 +# The following variables are provided by this file:
 +#
 +#    BUILTIN_X11_TYPE.xorg is the X11_TYPE of the X.org distribution
 +#     and is simply "xorg".
 +#
 +#    BUILTIN_X11_VERSION.xorg is the version number of the X.org
 +#     distribution detected on the system.
 +#
 +
 +BUILTIN_X11_TYPE.xorg=        xorg
 +
 +BUILTIN_FIND_FILES_VAR:=              CF_XORG CF_XORG_VERSION
 +BUILTIN_FIND_FILES.CF_XORG=           ${X11BASE}/lib/X11/config/xorg.cf
 +BUILTIN_FIND_FILES.CF_XORG_VERSION=   
${X11BASE}/lib/X11/config/xorgversion.def
 +.include "../../mk/buildlink3/find-files.mk"
 +
 +.if !defined(BUILTIN_X11_VERSION.xorg) && \
 +    exists(${CF_XORG}) && exists(${CF_XORG_VERSION})
 +BUILTIN_X11_VERSION.xorg!=                                            \
 +      ${AWK} '/\#define[      ]*XORG_VERSION_MAJOR/ { M = $$3 }       \
 +              /\#define[      ]*XORG_VERSION_MINOR/ { m = "."$$3 }    \
 +              /\#define[      ]*XORG_VERSION_PATCH/ { p = "."$$3 }    \
 +              /\#define[      ]*XORG_VERSION_SNAP/ { s = "."$$3 }     \
 +              END { if (s == ".0") s = "";                            \
 +                    if (p == ".0" && s == "") p = "";                 \
 +                    printf "%s%s%s%s\n", M, m, p, s }'                \
 +              ${CF_XORG_VERSION}
 +.endif
 +MAKEVARS+=    BUILTIN_X11_VERSION.xorg
 
 --zYM0uCDKw75PZbzx--
 


Home | Main Index | Thread Index | Old Index