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.
This commit is contained in:
martin 2020-08-20 16:15:43 +00:00
parent 474f210565
commit 69e5345e80
3 changed files with 69 additions and 37 deletions

View File

@ -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> .include <bsd.own.mk>
@ -7,7 +7,7 @@
.PATH: ${X11SRCDIR.xorg-server}/doc .PATH: ${X11SRCDIR.xorg-server}/doc
.PATH: ${X11SRCDIR.xorg-server}/man .PATH: ${X11SRCDIR.xorg-server}/man
MAN= Xserver.1 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.x11.mk>
.include <bsd.man.mk> .include <bsd.man.mk>

View File

@ -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> .include <bsd.own.mk>
@ -12,5 +12,10 @@ FILESDIR= ${X11USRLIBDIR}/X11/doc
MAN= Xorg.1 xorg.conf.5 MAN= Xorg.1 xorg.conf.5
# xorg.conf.d.5? # xorg.conf.d.5?
X11EXTRAMANTRANSFORMS_BOTH+= \
xconfigdir xorg.conf.d \
xkbdir ${X11LIBDIR}/xkb \
modulepath ${X11ROOTDIR}/modules
.include <bsd.x11.mk> .include <bsd.x11.mk>
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -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> .include <bsd.init.mk>
@ -136,7 +136,7 @@ XORG_SERVER_TEENY= 6
XORG_SERVER_MINOR= 20 XORG_SERVER_MINOR= 20
XORG_SERVER_TEENY= 5 XORG_SERVER_TEENY= 5
.endif .endif
XVENDORNAMESHORT= '"X.Org"' XVENDORNAMESHORT= '"X.Org"'
XVENDORNAME= '"The X.Org Foundation"' XVENDORNAME= '"The X.Org Foundation"'
XORG_RELEASE= '"Release ${XORG_SERVER_MAJOR}.${XORG_SERVER_MINOR}.${XORG_SERVER_TEENY}"' XORG_RELEASE= '"Release ${XORG_SERVER_MAJOR}.${XORG_SERVER_MINOR}.${XORG_SERVER_TEENY}"'
@ -194,6 +194,15 @@ realall: ${CPPSCRIPTS}
CLEANFILES+= ${CPPSCRIPTS} CLEANFILES+= ${CPPSCRIPTS}
.endif # } .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 # X.Org pkgconfig files handling
# #
@ -356,14 +365,13 @@ ${_pkg}.pc: ${PKGDIST.${_pkg}}/configure Makefile
s,@FREETYPE_CFLAGS@,-I${X11ROOTDIR}/include/freetype2 -I${X11ROOTDIR}/include,;" \ s,@FREETYPE_CFLAGS@,-I${X11ROOTDIR}/include/freetype2 -I${X11ROOTDIR}/include,;" \
-e '/^Libs:/ s%-L\([^ ]*\)%-Wl,-rpath,\1 &%g' \ -e '/^Libs:/ s%-L\([^ ]*\)%-Wl,-rpath,\1 &%g' \
< ${.IMPSRC} > ${.TARGET}.tmp < ${.IMPSRC} > ${.TARGET}.tmp
if ${TOOL_GREP} '@.*@' ${.TARGET}.tmp; then \ if ${_X11SKIP_FALSE_POSITIVE_GREP_CMD}; then \
echo "${.TARGET} matches @.*@, probably missing updates" 1>&2; \ echo "pkg-config ${.TARGET} matches @.*@, probably missing updates" 1>&2; \
false; \ false; \
else \ else \
${MV} ${.TARGET}.tmp ${.TARGET}; \ ${MV} ${.TARGET}.tmp ${.TARGET}; \
fi fi
CLEANFILES+= ${_PKGCONFIG_FILES} ${_PKGCONFIG_FILES:C/$/.tmp/} CLEANFILES+= ${_PKGCONFIG_FILES} ${_PKGCONFIG_FILES:C/$/.tmp/}
.endif .endif
@ -396,40 +404,53 @@ CLEANDIRFILES+= ${MAN:U${PROG:D${PROG.1}}}
.SUFFIXES: .man .man.pre .1 .3 .4 .5 .7 .SUFFIXES: .man .man.pre .1 .3 .4 .5 .7
_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 # Note the escaping trick for _X11MANTRANSFORM using % to replace spaces
XORGVERSION= '"X Version 11"' XORGVERSION= '"X Version 11"'
X11MANCPP?= no
_X11MANTRANSFORM= \
${X11EXTRAMANTRANSFORMS}
# 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+= \
__${__def__}__ ${__value__} \
@${__def__}@ ${__value__}
.endfor
_X11MANTRANSFORM+= \ _X11MANTRANSFORM+= \
__vendorversion__ ${XORGVERSION:C/ /%/gW} \
__XCONFIGFILE__ xorg.conf \
__xconfigfile__ xorg.conf \
__XCONFIGFILEMAN__ 'xorg.conf(5)' \
__xorgversion__ ${XORGVERSION:C/ /%/gW} \
__XSERVERNAME__ Xorg \
__xservername__ Xorg
_X11MANTRANSFORMCMD= ${TOOL_SED} -e 's/\\$$/\\ /' ${.IMPSRC} _X11MANTRANSFORMCMD= ${TOOL_SED} -e 's/\\$$/\\ /' ${.IMPSRC}
# XXX document me.
X11MANCPP?= no
.if ${X11MANCPP} != "no" .if ${X11MANCPP} != "no"
_X11MANTRANSFORMCMD+= | ${CC} -E -undef -traditional - _X11MANTRANSFORMCMD+= | ${CC} -E -undef -traditional -
. for __def__ __value__ in ${_X11MANTRANSFORM} . for __def__ __value__ in ${_X11MANTRANSFORM}
@ -446,7 +467,13 @@ _X11MANTRANSFORMCMD+= ${X11EXTRAMANDEFS}
.man.1 .man.3 .man.4 .man.5 .man.7 .man.pre.1 .man.pre.4 .man.pre.5: .man.1 .man.3 .man.4 .man.5 .man.7 .man.pre.1 .man.pre.4 .man.pre.5:
${_MKTARGET_CREATE} ${_MKTARGET_CREATE}
rm -f ${.TARGET} 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 ##### Pull in related .mk logic
.include <bsd.clean.mk> .include <bsd.clean.mk>