Source-Changes-HG archive

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

[src/netbsd-9]: src/share/mk Pull up following revision(s) (requested by kim ...



details:   https://anonhg.NetBSD.org/src/rev/8773b8f7eb64
branches:  netbsd-9
changeset: 964083:8773b8f7eb64
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Aug 20 16:15:43 2020 +0000

description:
Pull up following revision(s) (requested by kim in ticket #1059):

        share/mk/bsd.x11.mk: revision 1.133
        share/mk/bsd.x11.mk: revision 1.136
        external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile: revision 1.8
        external/mit/xorg/server/xorg-server/doc/Makefile: revision 1.6

Allow overriding the default man substitutions with X11EXTRAMANTRANSFORMS
fix various missing transforms for man page, ala PR#55422.
add method to transform both the "__foo__" and "@foo@"
version of various transforms, while upstream are converting
from the former to the latter it seems.  convert all the
common transforms to this method.

expand the grep for .pc files to look for missing @foo@

fixes to the man page genration, and ignore a few things
(thanks uwe@ - .IN lines, and stuff between tab(@) and .TE.)

xorg-server __default_font_path__ -> @default_font_path@,
and xfree86 transform xconfigdir, xkbdir, and modulepath
using new both method.

diffstat:

 external/mit/xorg/server/xorg-server/doc/Makefile            |   4 +-
 external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile |   7 +-
 share/mk/bsd.x11.mk                                          |  93 +++++++----
 3 files changed, 68 insertions(+), 36 deletions(-)

diffs (185 lines):

diff -r 7946f40e45b9 -r 8773b8f7eb64 external/mit/xorg/server/xorg-server/doc/Makefile
--- a/external/mit/xorg/server/xorg-server/doc/Makefile Wed Aug 19 18:38:02 2020 +0000
+++ b/external/mit/xorg/server/xorg-server/doc/Makefile Thu Aug 20 16:15:43 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2016/08/14 00:03:58 mrg Exp $
+#      $NetBSD: Makefile,v 1.5.16.1 2020/08/20 16:15:44 martin Exp $
 
 .include <bsd.own.mk>
 
@@ -7,7 +7,7 @@
 .PATH: ${X11SRCDIR.xorg-server}/doc
 .PATH: ${X11SRCDIR.xorg-server}/man
 MAN=   Xserver.1
-X11EXTRAMANDEFS+=      -e 's%__default_font_path__%${X11DEFAULTFONTPATH:ts,:S/,/, /g}%g'
+X11EXTRAMANDEFS+=      -e 's%@default_font_path@%${X11DEFAULTFONTPATH:ts,:S/,/, /g}%g'
 
 .include <bsd.x11.mk>
 .include <bsd.man.mk>
diff -r 7946f40e45b9 -r 8773b8f7eb64 external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile
--- a/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile      Wed Aug 19 18:38:02 2020 +0000
+++ b/external/mit/xorg/server/xorg-server/hw/xfree86/doc/Makefile      Thu Aug 20 16:15:43 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2016/08/14 03:43:04 mrg Exp $
+#      $NetBSD: Makefile,v 1.7.16.1 2020/08/20 16:15:43 martin Exp $
 
 .include <bsd.own.mk>
 
@@ -12,5 +12,10 @@
 MAN=   Xorg.1 xorg.conf.5
 # xorg.conf.d.5?
 
+X11EXTRAMANTRANSFORMS_BOTH+= \
+       xconfigdir              xorg.conf.d \
+       xkbdir                  ${X11LIBDIR}/xkb \
+       modulepath              ${X11ROOTDIR}/modules
+
 .include <bsd.x11.mk>
 .include <bsd.prog.mk>
diff -r 7946f40e45b9 -r 8773b8f7eb64 share/mk/bsd.x11.mk
--- a/share/mk/bsd.x11.mk       Wed Aug 19 18:38:02 2020 +0000
+++ b/share/mk/bsd.x11.mk       Thu Aug 20 16:15:43 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.x11.mk,v 1.132.2.1 2020/07/26 10:59:47 martin Exp $
+#      $NetBSD: bsd.x11.mk,v 1.132.2.2 2020/08/20 16:15:43 martin Exp $
 
 .include <bsd.init.mk>
 
@@ -136,7 +136,7 @@
 XORG_SERVER_MINOR=     20
 XORG_SERVER_TEENY=     5
 .endif
-  
+
 XVENDORNAMESHORT=      '"X.Org"'
 XVENDORNAME=           '"The X.Org Foundation"'
 XORG_RELEASE=          '"Release ${XORG_SERVER_MAJOR}.${XORG_SERVER_MINOR}.${XORG_SERVER_TEENY}"'
@@ -194,6 +194,15 @@
 CLEANFILES+= ${CPPSCRIPTS}
 .endif                                                         # }
 
+# Used by pkg-config and manual handling to ensure we picked up all
+# the necessary changes.
+#
+# Skip any line that starts with .IN (old X11 indexing method),
+# or between a tab(@) and .TE.
+_X11SKIP_FALSE_POSITIVE_GREP_CMD= \
+       ${TOOL_SED} -e '/tab(@)/,/^\.TE/d' -e '/^\.IN /d' ${.TARGET}.tmp | \
+       ${TOOL_GREP} -E '@([^   ]+)@'
+
 #
 # X.Org pkgconfig files handling
 #
@@ -356,14 +365,13 @@
                s,@FREETYPE_CFLAGS@,-I${X11ROOTDIR}/include/freetype2 -I${X11ROOTDIR}/include,;" \
                -e '/^Libs:/ s%-L\([^   ]*\)%-Wl,-rpath,\1 &%g' \
                < ${.IMPSRC} > ${.TARGET}.tmp
-       if ${TOOL_GREP} '@.*@' ${.TARGET}.tmp; then \
-               echo "${.TARGET} matches @.*@, probably missing updates" 1>&2; \
+       if ${_X11SKIP_FALSE_POSITIVE_GREP_CMD}; then \
+               echo "pkg-config ${.TARGET} matches @.*@, probably missing updates" 1>&2; \
                false; \
        else \
                ${MV} ${.TARGET}.tmp ${.TARGET}; \
        fi
 
-
 CLEANFILES+= ${_PKGCONFIG_FILES} ${_PKGCONFIG_FILES:C/$/.tmp/}
 .endif
 
@@ -396,40 +404,53 @@
 
 .SUFFIXES:     .man .man.pre .1 .3 .4 .5 .7
 
+# Note the escaping trick for _X11MANTRANSFORM using % to replace spaces
+XORGVERSION=   '"X Version 11"'
+
 _X11MANTRANSFORM= \
-       __adminmansuffix__      8 \
-       __apploaddir__          ${X11ROOTDIR}/lib/X11/app-defaults \
-       __appmansuffix__        1 \
-       __bindir__              ${X11BINDIR} \
-       __datadir__             ${X11LIBDIR} \
-       __libdir__              ${X11ROOTDIR}/lib \
-       __xkbconfigroot__       ${X11LIBDIR}/xkb \
-       __sysconfdir__          /etc \
-       __drivermansuffix__     4 \
-       __filemansuffix__       5 \
-       __LIB_MAN_SUFFIX__      3 \
-       __libmansuffix__        3 \
-       __logdir__              /var/log \
-       __mandir__              ${X11MANDIR} \
-       __miscmansuffix__       7 \
-       __oslibmansuffix__      3 \
-       __projectroot__         ${X11ROOTDIR} \
        ${X11EXTRAMANTRANSFORMS}
 
-# Note the escaping trick for _X11MANTRANSFORM using % to replace spaces
-XORGVERSION=   '"X Version 11"'
-X11MANCPP?=    no
+# These ones used to appear as __foo__ but may be now @foo@.
+_X11MANTRANSFORMS_BOTH=\
+       ${X11EXTRAMANTRANSFORMS_BOTH} \
+       appmansuffix            1 \
+       LIB_MAN_SUFFIX          3 \
+       libmansuffix            3 \
+       oslibmansuffix          3 \
+       drivermansuffix         4 \
+       filemansuffix           5 \
+       miscmansuffix           7 \
+       adminmansuffix          8 \
+       logdir                  /var/log \
+       sysconfdir              /etc \
+       apploaddir              ${X11ROOTDIR}/lib/X11/app-defaults \
+       bindir                  ${X11BINDIR} \
+       datadir                 ${X11LIBDIR} \
+       libdir                  ${X11ROOTDIR}/lib \
+       mandir                  ${X11MANDIR} \
+       projectroot             ${X11ROOTDIR} \
+       xkbconfigroot           ${X11LIBDIR}/xkb \
+       vendorversion           ${XORGVERSION:C/ /%/gW} \
+       XCONFIGFILE             xorg.conf \
+       xconfigfile             xorg.conf \
+       XCONFIGFILEMAN          'xorg.conf(5)' \
+       xorgversion             ${XORGVERSION:C/ /%/gW} \
+       XSERVERNAME             Xorg \
+       xservername             Xorg
+
+.for __def__ __value__ in ${_X11MANTRANSFORMS_BOTH}
 _X11MANTRANSFORM+= \
-       __vendorversion__       ${XORGVERSION:C/ /%/gW} \
-       __XCONFIGFILE__         xorg.conf \
-       __xconfigfile__         xorg.conf \
-       __XCONFIGFILEMAN__      'xorg.conf(5)' \
-       __xorgversion__         ${XORGVERSION:C/ /%/gW} \
-       __XSERVERNAME__         Xorg \
-       __xservername__         Xorg
+       __${__def__}__          ${__value__} \
+       @${__def__}@            ${__value__}
+.endfor
+
+_X11MANTRANSFORM+= \
 
 _X11MANTRANSFORMCMD=   ${TOOL_SED} -e 's/\\$$/\\ /' ${.IMPSRC}
 
+# XXX document me.
+X11MANCPP?=    no
+
 .if ${X11MANCPP} != "no"
 _X11MANTRANSFORMCMD+=  | ${CC} -E -undef -traditional -
 . for __def__ __value__ in ${_X11MANTRANSFORM}
@@ -446,7 +467,13 @@
 .man.1 .man.3 .man.4 .man.5 .man.7 .man.pre.1 .man.pre.4 .man.pre.5:
        ${_MKTARGET_CREATE}
        rm -f ${.TARGET}
-       ${_X11MANTRANSFORMCMD} | ${X11TOOL_UNXCOMM} > ${.TARGET}
+       ${_X11MANTRANSFORMCMD} | ${X11TOOL_UNXCOMM} > ${.TARGET}.tmp
+       if ${_X11SKIP_FALSE_POSITIVE_GREP_CMD}; then \
+               echo "manual ${.TARGET} matches @.*@, probably missing updates" 1>&2; \
+               false; \
+       else \
+               ${MV} ${.TARGET}.tmp ${.TARGET}; \
+       fi
 
 ##### Pull in related .mk logic
 .include <bsd.clean.mk>



Home | Main Index | Thread Index | Old Index