tech-pkg archive

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

Re: switching remaining platforms to modular X by default



On Tue, Jun 04, 2013 at 06:28:05PM +0000, David Holland wrote:
 > When I fell asleep last night I was looking at inserting logic into
 > bsd.buildlink3.mk (at line 123) to walk the depends tree and clear
 > USE_BUILTIN=yes for any package that depends on a package with
 > USE_BUILTIN=no. This isn't entirely trivial. It only fixes problem (1)
 > though...

Here goes. This forces USE_BUILTIN.Xft2 to no as desired when
USE_BUILTIN.fontconfig is no.

However, we're still going to have to do something about the libXft
vs. Xft2 issue or applying this change will leave the world broken in
a different way.

Index: bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.221
diff -u -r1.221 bsd.buildlink3.mk
--- bsd.buildlink3.mk   13 May 2013 12:01:51 -0000      1.221
+++ bsd.buildlink3.mk   5 Jun 2013 01:01:42 -0000
@@ -121,6 +121,52 @@
 .endif
 .endfor
 
+# Go through the packages in tree order and make sure USE_BUILTIN.pkg
+# is set to "no" if that package depends on any other packages where
+# USE_BUILTIN.pkg is set to "no".
+#
+
+_stack_:=bot
+_ok_:=yes
+.for _pkg_ in ${BUILDLINK_TREE}
+# work around PR 47888
+_enter_:=${_pkg_:M-*}
+
+.  if ${_pkg_} == x11-links || ${_pkg_} == -x11-links
+     # (nothing)
+.  elif empty(_enter_)
+     # entering a package (in the buildlink tree)
+     #.say "${_stack_:C/.*/  /} ${_pkg_}:"
+     _stack_:=${_ok_} ${_stack_}
+     _ok_:=yes
+.  else
+     # leaving a package (in the buildlink tree)
+.    if !empty(USE_BUILTIN.${_pkg_:S/^-//}:M[Yy][Ee][Ss])
+       # this package is going to use the builtin version
+.      if ${_ok_} == no
+         # not ok for it to be builtin; force it to pkgsrc
+         USE_BUILTIN.${_pkg_:S/^-//}:=no
+         FORCED_PKGSRC+=${_pkg_:S/^-//}
+         #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} pkgsrc FORCED"
+.      else
+         #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} built-in"
+.      endif
+.    else
+       # no builtin version or not using it
+       #.say "${_stack_:C/.*/  /} ${_pkg_:S/^-//} pkgsrc"
+       _ok_:=no
+.    endif
+     # pop the stack
+.    if ${_ok_} == yes
+       _ok_:=${_stack_:[1]}
+.    endif
+     _stack_:=${_stack_:[2..-1]}
+.  endif
+.endfor
+.if ${_stack_} != "bot"
+.error "The above loop through BUILDLINK_TREE failed to balance"
+.endif
+
 # Sorted and unified version of BUILDLINK_TREE without recursion
 # data.
 _BUILDLINK_TREE:=      ${BUILDLINK_TREE:N-*:O:u}



-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index