FreeBSD Bugzilla – Attachment 223581 Details for
Bug 254557
x11-servers/xorg-server: unbundle libxcvt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v0
bug254557.diff (text/plain), 48.78 KB, created by
Jan Beich
on 2021-03-25 19:05:42 UTC
(
hide
)
Description:
v0
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2021-03-25 19:05:42 UTC
Size:
48.78 KB
patch
obsolete
>From a6a90af8218baedfa217b28059f61ab067c0e803 Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Thu, 25 Mar 2021 18:44:26 +0000 >Subject: [PATCH] x11-servers/xorg-server: unbundle libxcvt > >PR: 254557 >Approved by: ? >--- > x11-servers/xorg-server/Makefile | 5 +- > x11-servers/xorg-server/files/patch-libxcvt | 1058 +++++++++++++++++++ > x11-servers/xorg-server/pkg-plist | 2 - > x11-servers/xwayland-devel/Makefile | 8 +- > x11-servers/xwayland-devel/distinfo | 8 + > x11-servers/xwayland/Makefile | 2 +- > x11/libxcvt/Makefile | 1 + > x11/libxcvt/pkg-plist | 4 +- > 8 files changed, 1080 insertions(+), 8 deletions(-) > create mode 100644 x11-servers/xorg-server/files/patch-libxcvt > >diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile >index bf56659f4dbd..49bbdb5c5339 100644 >--- a/x11-servers/xorg-server/Makefile >+++ b/x11-servers/xorg-server/Makefile >@@ -3,7 +3,7 @@ > > PORTNAME?= xorg-server > PORTVERSION?= 1.20.9 >-PORTREVISION?= 3 >+PORTREVISION?= 4 > PORTEPOCH?= 1 > CATEGORIES= x11-servers > MASTER_SITES= XORG/individual/xserver >@@ -75,7 +75,8 @@ CPE_VENDOR= x.org > > .if ${SLAVE_PORT} == "no" || ${PORTNAME} == "xephyr" || ${PORTNAME} == "xwayland" > LIB_DEPENDS+= libdrm.so:graphics/libdrm \ >- libepoxy.so:graphics/libepoxy >+ libepoxy.so:graphics/libepoxy \ >+ libxcvt.so:x11/libxcvt > .else > BUILD_DEPENDS+= libepoxy>0:graphics/libepoxy # only for configure > .endif >diff --git a/x11-servers/xorg-server/files/patch-libxcvt b/x11-servers/xorg-server/files/patch-libxcvt >new file mode 100644 >index 000000000000..03cc21782a45 >--- /dev/null >+++ b/x11-servers/xorg-server/files/patch-libxcvt >@@ -0,0 +1,1058 @@ >+https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637 >+ >+--- configure.orig 2020-08-25 15:40:04 UTC >++++ configure >+@@ -858,6 +858,8 @@ PCI_TXT_IDS_PATH >+ PCIACCESS_LIBS >+ PCIACCESS_CFLAGS >+ symbol_visibility >++LIBXCVT_LIBS >++LIBXCVT_CFLAGS >+ XNEST_SYS_LIBS >+ XNEST_LIBS >+ XNEST_FALSE >+@@ -1448,6 +1450,8 @@ LIBUNWIND_CFLAGS >+ LIBUNWIND_LIBS >+ XNESTMODULES_CFLAGS >+ XNESTMODULES_LIBS >++LIBXCVT_CFLAGS >++LIBXCVT_LIBS >+ PCIACCESS_CFLAGS >+ PCIACCESS_LIBS >+ DGA_CFLAGS >+@@ -2403,6 +2407,10 @@ Some influential environment variables: >+ C compiler flags for XNESTMODULES, overriding pkg-config >+ XNESTMODULES_LIBS >+ linker flags for XNESTMODULES, overriding pkg-config >++ LIBXCVT_CFLAGS >++ C compiler flags for LIBXCVT, overriding pkg-config >++ LIBXCVT_LIBS >++ linker flags for LIBXCVT, overriding pkg-config >+ PCIACCESS_CFLAGS >+ C compiler flags for PCIACCESS, overriding pkg-config >+ PCIACCESS_LIBS >+@@ -24784,6 +24792,7 @@ LIBUDEV="libudev >= 143" >+ LIBSELINUX="libselinux >= 2.0.86" >+ LIBDBUS="dbus-1 >= 1.0" >+ LIBPIXMAN="pixman-1 >= 0.27.2" >++LIBXCVT="libxcvt >= 0.0.1" >+ >+ >+ pkg_failed=no >+@@ -28912,8 +28921,100 @@ if test "x$XORG" = xyes; then >+ XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' >+ XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" >+ XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" >+- XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" >++ XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB $LIBXCVT_LIB" >+ >++ >++pkg_failed=no >++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXCVT" >&5 >++$as_echo_n "checking for LIBXCVT... " >&6; } >++ >++if test -n "$LIBXCVT_CFLAGS"; then >++ pkg_cv_LIBXCVT_CFLAGS="$LIBXCVT_CFLAGS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBXCVT_CFLAGS=`$PKG_CONFIG --cflags "$LIBXCVT" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++if test -n "$LIBXCVT_LIBS"; then >++ pkg_cv_LIBXCVT_LIBS="$LIBXCVT_LIBS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBXCVT_LIBS=`$PKG_CONFIG --libs "$LIBXCVT" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++ >++ >++ >++if test $pkg_failed = yes; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ >++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then >++ _pkg_short_errors_supported=yes >++else >++ _pkg_short_errors_supported=no >++fi >++ if test $_pkg_short_errors_supported = yes; then >++ LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXCVT" 2>&1` >++ else >++ LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXCVT" 2>&1` >++ fi >++ # Put the nasty error message in config.log where it belongs >++ echo "$LIBXCVT_PKG_ERRORS" >&5 >++ >++ as_fn_error $? "Package requirements ($LIBXCVT) were not met: >++ >++$LIBXCVT_PKG_ERRORS >++ >++Consider adjusting the PKG_CONFIG_PATH environment variable if you >++installed software in a non-standard prefix. >++ >++Alternatively, you may set the environment variables LIBXCVT_CFLAGS >++and LIBXCVT_LIBS to avoid the need to call pkg-config. >++See the pkg-config man page for more details." "$LINENO" 5 >++elif test $pkg_failed = untried; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 >++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} >++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it >++is in your PATH or set the PKG_CONFIG environment variable to the full >++path to pkg-config. >++ >++Alternatively, you may set the environment variables LIBXCVT_CFLAGS >++and LIBXCVT_LIBS to avoid the need to call pkg-config. >++See the pkg-config man page for more details. >++ >++To get pkg-config, see <http://pkg-config.freedesktop.org/>. >++See \`config.log' for more details" "$LINENO" 5; } >++else >++ LIBXCVT_CFLAGS=$pkg_cv_LIBXCVT_CFLAGS >++ LIBXCVT_LIBS=$pkg_cv_LIBXCVT_LIBS >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 >++$as_echo "yes" >&6; } >++ >++fi >++ >+ symbol_visibility= >+ have_visibility=disabled >+ if test x$SYMBOL_VISIBILITY != xno; then >+@@ -32283,6 +32384,98 @@ $as_echo "#define XWL_HAS_EGLSTREAM 1" >>confdefs.h >+ >+ fi >+ >++ >++pkg_failed=no >++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXCVT" >&5 >++$as_echo_n "checking for LIBXCVT... " >&6; } >++ >++if test -n "$LIBXCVT_CFLAGS"; then >++ pkg_cv_LIBXCVT_CFLAGS="$LIBXCVT_CFLAGS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBXCVT_CFLAGS=`$PKG_CONFIG --cflags "$LIBXCVT" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++if test -n "$LIBXCVT_LIBS"; then >++ pkg_cv_LIBXCVT_LIBS="$LIBXCVT_LIBS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBXCVT_LIBS=`$PKG_CONFIG --libs "$LIBXCVT" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++ >++ >++ >++if test $pkg_failed = yes; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ >++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then >++ _pkg_short_errors_supported=yes >++else >++ _pkg_short_errors_supported=no >++fi >++ if test $_pkg_short_errors_supported = yes; then >++ LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXCVT" 2>&1` >++ else >++ LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXCVT" 2>&1` >++ fi >++ # Put the nasty error message in config.log where it belongs >++ echo "$LIBXCVT_PKG_ERRORS" >&5 >++ >++ as_fn_error $? "Package requirements ($LIBXCVT) were not met: >++ >++$LIBXCVT_PKG_ERRORS >++ >++Consider adjusting the PKG_CONFIG_PATH environment variable if you >++installed software in a non-standard prefix. >++ >++Alternatively, you may set the environment variables LIBXCVT_CFLAGS >++and LIBXCVT_LIBS to avoid the need to call pkg-config. >++See the pkg-config man page for more details." "$LINENO" 5 >++elif test $pkg_failed = untried; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 >++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} >++as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it >++is in your PATH or set the PKG_CONFIG environment variable to the full >++path to pkg-config. >++ >++Alternatively, you may set the environment variables LIBXCVT_CFLAGS >++and LIBXCVT_LIBS to avoid the need to call pkg-config. >++See the pkg-config man page for more details. >++ >++To get pkg-config, see <http://pkg-config.freedesktop.org/>. >++See \`config.log' for more details" "$LINENO" 5; } >++else >++ LIBXCVT_CFLAGS=$pkg_cv_LIBXCVT_CFLAGS >++ LIBXCVT_LIBS=$pkg_cv_LIBXCVT_LIBS >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 >++$as_echo "yes" >&6; } >++ >++fi >++ >+ XWAYLAND_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB" >+ XWAYLAND_SYS_LIBS="$XWAYLANDMODULES_LIBS $GLX_SYS_LIBS" >+ >+@@ -32611,7 +32804,7 @@ $as_echo "$as_me: WARNING: >+ ***********************************************" >&2;} >+ fi >+ >+-ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/config/man/Makefile hw/dmx/doc/Makefile hw/dmx/doxygen/doxygen.conf hw/dmx/doxygen/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile hw/xwayland/Makefile test/Makefile xserver.ent xorg-server.pc" >++ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/config/man/Makefile hw/dmx/doc/Makefile hw/dmx/doxygen/doxygen.conf hw/dmx/doxygen/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/dmx/man/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile hw/xwayland/Makefile test/Makefile xserver.ent xorg-server.pc" >+ >+ cat >confcache <<\_ACEOF >+ # This file is a shell script that caches the results of configure >+@@ -34110,7 +34303,6 @@ do >+ "hw/xfree86/xkb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xkb/Makefile" ;; >+ "hw/xfree86/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/Makefile" ;; >+ "hw/xfree86/utils/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/man/Makefile" ;; >+- "hw/xfree86/utils/cvt/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/cvt/Makefile" ;; >+ "hw/xfree86/utils/gtf/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/gtf/Makefile" ;; >+ "hw/dmx/config/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/Makefile" ;; >+ "hw/dmx/config/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/dmx/config/man/Makefile" ;; >+--- hw/xfree86/Makefile.in.orig 2020-08-25 15:40:06 UTC >++++ hw/xfree86/Makefile.in >+@@ -374,6 +374,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ >+ LIBTOOL = @LIBTOOL@ >+ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ >+ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ >++LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ >++LIBXCVT_LIBS = @LIBXCVT_LIBS@ >+ LIB_MAN_DIR = @LIB_MAN_DIR@ >+ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ >+ LIPO = @LIPO@ >+@@ -625,7 +627,7 @@ DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os- >+ utils doc man glamor_egl drivers >+ >+ nodist_Xorg_SOURCES = sdksyms.c >+-AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ >++AM_CFLAGS = $(DIX_CFLAGS) $(LIBXCVT_CFLAGS) @XORG_CFLAGS@ >+ AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/parser \ >+ -I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \ >+ -I$(srcdir)/dri -I$(srcdir)/dri2 -I$(top_srcdir)/dri3 >+@@ -656,7 +658,8 @@ LOCAL_LIBS = \ >+ Xorg_LDADD = \ >+ $(LOCAL_LIBS) \ >+ $(XORG_SYS_LIBS) \ >+- $(XSERVER_SYS_LIBS) >++ $(XSERVER_SYS_LIBS) \ >++ $(LIBXCVT_LIBS) >+ >+ Xorg_DEPENDENCIES = $(LOCAL_LIBS) >+ Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) >+--- hw/xfree86/meson.build.orig 2020-08-25 15:39:55 UTC >++++ hw/xfree86/meson.build >+@@ -153,15 +153,6 @@ if get_option('suid_wrapper') >+ ) >+ endif >+ >+-executable('cvt', >+- ['utils/cvt/cvt.c', 'modes/xf86cvt.c'], >+- include_directories: [inc, xorg_inc], >+- dependencies: xorg_deps, >+- link_with: libxserver_os, >+- c_args: xorg_c_args, >+- install: true, >+-) >+- >+ executable('gtf', >+ 'utils/gtf/gtf.c', >+ include_directories: [inc, xorg_inc], >+@@ -213,12 +204,6 @@ install_man(configure_file( >+ install_man(configure_file( >+ input: 'man/xorg.conf.d.man', >+ output: 'xorg.conf.d.5', >+- configuration: manpage_config, >+-)) >+- >+-install_man(configure_file( >+- input: 'utils/man/cvt.man', >+- output: 'cvt.1', >+ configuration: manpage_config, >+ )) >+ >+--- hw/xfree86/modes/Makefile.in.orig 2020-08-25 15:40:07 UTC >++++ hw/xfree86/modes/Makefile.in >+@@ -351,6 +351,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ >+ LIBTOOL = @LIBTOOL@ >+ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ >+ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ >++LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ >++LIBXCVT_LIBS = @LIBXCVT_LIBS@ >+ LIB_MAN_DIR = @LIB_MAN_DIR@ >+ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ >+ LIPO = @LIPO@ >+@@ -605,7 +607,7 @@ sdk_HEADERS = \ >+ xf86Modes.h \ >+ xf86RandR12.h >+ >+-AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) >++AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(LIBXCVT_CFLAGS) >+ all: all-am >+ >+ .SUFFIXES: >+--- hw/xfree86/modes/meson.build.orig 2020-08-25 15:39:55 UTC >++++ hw/xfree86/modes/meson.build >+@@ -15,8 +15,8 @@ endif >+ >+ xorg_modes = static_library('xorg_modes', >+ srcs_xorg_modes, >+- include_directories: [inc, xorg_inc], >+- dependencies: common_dep, >++ include_directories: [ inc, xorg_inc ], >++ dependencies: [ common_dep, libxcvt_dep ], >+ c_args: xorg_c_args, >+ ) >+ >+--- hw/xfree86/modes/xf86cvt.c.orig 2020-08-25 15:39:55 UTC >++++ hw/xfree86/modes/xf86cvt.c >+@@ -20,12 +20,6 @@ >+ * OTHER DEALINGS IN THE SOFTWARE. >+ */ >+ >+-/* >+- * The reason for having this function in a file of its own is >+- * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode >+- * code is shared directly. >+- */ >+- >+ #ifdef HAVE_XORG_CONFIG_H >+ #include <xorg-config.h> >+ #endif >+@@ -34,6 +28,7 @@ >+ #include "xf86Modes.h" >+ >+ #include <string.h> >++#include <libxcvt/libxcvt.h> >+ >+ /* >+ * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh. >+@@ -63,233 +58,25 @@ DisplayModePtr >+ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, >+ Bool Interlaced) >+ { >++ struct libxcvt_mode_info *libxcvt_mode_info; >+ DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec)); >+ >+- /* 1) top/bottom margin size (% of height) - default: 1.8 */ >+-#define CVT_MARGIN_PERCENTAGE 1.8 >++ libxcvt_mode_info = >++ libxcvt_gen_mode_info(HDisplay, VDisplay, VRefresh, Reduced, Interlaced); >+ >+- /* 2) character cell horizontal granularity (pixels) - default 8 */ >+-#define CVT_H_GRANULARITY 8 >++ Mode->VDisplay = libxcvt_mode_info->vdisplay; >++ Mode->HDisplay = libxcvt_mode_info->hdisplay; >++ Mode->Clock = libxcvt_mode_info->dot_clock; >++ Mode->HSyncStart = libxcvt_mode_info->hsync_start; >++ Mode->HSyncEnd = libxcvt_mode_info->hsync_end; >++ Mode->HTotal = libxcvt_mode_info->htotal; >++ Mode->VSyncStart = libxcvt_mode_info->vsync_start; >++ Mode->VSyncEnd = libxcvt_mode_info->vsync_end; >++ Mode->VTotal = libxcvt_mode_info->vtotal; >++ Mode->VRefresh = libxcvt_mode_info->vrefresh; >++ Mode->Flags = libxcvt_mode_info->mode_flags; >+ >+- /* 4) Minimum vertical porch (lines) - default 3 */ >+-#define CVT_MIN_V_PORCH 3 >+- >+- /* 4) Minimum number of vertical back porch lines - default 6 */ >+-#define CVT_MIN_V_BPORCH 6 >+- >+- /* Pixel Clock step (kHz) */ >+-#define CVT_CLOCK_STEP 250 >+- >+- Bool Margins = FALSE; >+- float VFieldRate, HPeriod; >+- int HDisplayRnd, HMargin; >+- int VDisplayRnd, VMargin, VSync; >+- float Interlace; /* Please rename this */ >+- char *tmp; >+- >+- /* CVT default is 60.0Hz */ >+- if (!VRefresh) >+- VRefresh = 60.0; >+- >+- /* 1. Required field rate */ >+- if (Interlaced) >+- VFieldRate = VRefresh * 2; >+- else >+- VFieldRate = VRefresh; >+- >+- /* 2. Horizontal pixels */ >+- HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY); >+- >+- /* 3. Determine left and right borders */ >+- if (Margins) { >+- /* right margin is actually exactly the same as left */ >+- HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); >+- HMargin -= HMargin % CVT_H_GRANULARITY; >+- } >+- else >+- HMargin = 0; >+- >+- /* 4. Find total active pixels */ >+- Mode->HDisplay = HDisplayRnd + 2 * HMargin; >+- >+- /* 5. Find number of lines per field */ >+- if (Interlaced) >+- VDisplayRnd = VDisplay / 2; >+- else >+- VDisplayRnd = VDisplay; >+- >+- /* 6. Find top and bottom margins */ >+- /* nope. */ >+- if (Margins) >+- /* top and bottom margins are equal again. */ >+- VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); >+- else >+- VMargin = 0; >+- >+- Mode->VDisplay = VDisplay + 2 * VMargin; >+- >+- /* 7. Interlace */ >+- if (Interlaced) >+- Interlace = 0.5; >+- else >+- Interlace = 0.0; >+- >+- /* Determine VSync Width from aspect ratio */ >+- if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay)) >+- VSync = 4; >+- else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay)) >+- VSync = 5; >+- else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay)) >+- VSync = 6; >+- else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay)) >+- VSync = 7; >+- else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay)) >+- VSync = 7; >+- else /* Custom */ >+- VSync = 10; >+- >+- if (!Reduced) { /* simplified GTF calculation */ >+- >+- /* 4) Minimum time of vertical sync + back porch interval (µs) >+- * default 550.0 */ >+-#define CVT_MIN_VSYNC_BP 550.0 >+- >+- /* 3) Nominal HSync width (% of line period) - default 8 */ >+-#define CVT_HSYNC_PERCENTAGE 8 >+- >+- float HBlankPercentage; >+- int VSyncAndBackPorch, VBackPorch; >+- int HBlank; >+- >+- /* 8. Estimated Horizontal period */ >+- HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) / >+- (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace); >+- >+- /* 9. Find number of lines in sync + backporch */ >+- if (((int) (CVT_MIN_VSYNC_BP / HPeriod) + 1) < >+- (VSync + CVT_MIN_V_PORCH)) >+- VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH; >+- else >+- VSyncAndBackPorch = (int) (CVT_MIN_VSYNC_BP / HPeriod) + 1; >+- >+- /* 10. Find number of lines in back porch */ >+- VBackPorch = VSyncAndBackPorch - VSync; >+- (void) VBackPorch; >+- >+- /* 11. Find total number of lines in vertical field */ >+- Mode->VTotal = VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace >+- + CVT_MIN_V_PORCH; >+- >+- /* 5) Definition of Horizontal blanking time limitation */ >+- /* Gradient (%/kHz) - default 600 */ >+-#define CVT_M_FACTOR 600 >+- >+- /* Offset (%) - default 40 */ >+-#define CVT_C_FACTOR 40 >+- >+- /* Blanking time scaling factor - default 128 */ >+-#define CVT_K_FACTOR 128 >+- >+- /* Scaling factor weighting - default 20 */ >+-#define CVT_J_FACTOR 20 >+- >+-#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256 >+-#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \ >+- CVT_J_FACTOR >+- >+- /* 12. Find ideal blanking duty cycle from formula */ >+- HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod / 1000.0; >+- >+- /* 13. Blanking time */ >+- if (HBlankPercentage < 20) >+- HBlankPercentage = 20; >+- >+- HBlank = Mode->HDisplay * HBlankPercentage / (100.0 - HBlankPercentage); >+- HBlank -= HBlank % (2 * CVT_H_GRANULARITY); >+- >+- /* 14. Find total number of pixels in a line. */ >+- Mode->HTotal = Mode->HDisplay + HBlank; >+- >+- /* Fill in HSync values */ >+- Mode->HSyncEnd = Mode->HDisplay + HBlank / 2; >+- >+- Mode->HSyncStart = Mode->HSyncEnd - >+- (Mode->HTotal * CVT_HSYNC_PERCENTAGE) / 100; >+- Mode->HSyncStart += CVT_H_GRANULARITY - >+- Mode->HSyncStart % CVT_H_GRANULARITY; >+- >+- /* Fill in VSync values */ >+- Mode->VSyncStart = Mode->VDisplay + CVT_MIN_V_PORCH; >+- Mode->VSyncEnd = Mode->VSyncStart + VSync; >+- >+- } >+- else { /* Reduced blanking */ >+- /* Minimum vertical blanking interval time (µs) - default 460 */ >+-#define CVT_RB_MIN_VBLANK 460.0 >+- >+- /* Fixed number of clocks for horizontal sync */ >+-#define CVT_RB_H_SYNC 32.0 >+- >+- /* Fixed number of clocks for horizontal blanking */ >+-#define CVT_RB_H_BLANK 160.0 >+- >+- /* Fixed number of lines for vertical front porch - default 3 */ >+-#define CVT_RB_VFPORCH 3 >+- >+- int VBILines; >+- >+- /* 8. Estimate Horizontal period. */ >+- HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) / >+- (VDisplayRnd + 2 * VMargin); >+- >+- /* 9. Find number of lines in vertical blanking */ >+- VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1; >+- >+- /* 10. Check if vertical blanking is sufficient */ >+- if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH)) >+- VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH; >+- >+- /* 11. Find total number of lines in vertical field */ >+- Mode->VTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines; >+- >+- /* 12. Find total number of pixels in a line */ >+- Mode->HTotal = Mode->HDisplay + CVT_RB_H_BLANK; >+- >+- /* Fill in HSync values */ >+- Mode->HSyncEnd = Mode->HDisplay + CVT_RB_H_BLANK / 2; >+- Mode->HSyncStart = Mode->HSyncEnd - CVT_RB_H_SYNC; >+- >+- /* Fill in VSync values */ >+- Mode->VSyncStart = Mode->VDisplay + CVT_RB_VFPORCH; >+- Mode->VSyncEnd = Mode->VSyncStart + VSync; >+- } >+- >+- /* 15/13. Find pixel clock frequency (kHz for xf86) */ >+- Mode->Clock = Mode->HTotal * 1000.0 / HPeriod; >+- Mode->Clock -= Mode->Clock % CVT_CLOCK_STEP; >+- >+- /* 16/14. Find actual Horizontal Frequency (kHz) */ >+- Mode->HSync = ((float) Mode->Clock) / ((float) Mode->HTotal); >+- >+- /* 17/15. Find actual Field rate */ >+- Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) / >+- ((float) (Mode->HTotal * Mode->VTotal)); >+- >+- /* 18/16. Find actual vertical frame frequency */ >+- /* ignore - just set the mode flag for interlaced */ >+- if (Interlaced) >+- Mode->VTotal *= 2; >+- >+- XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay); >+- Mode->name = tmp; >+- >+- if (Reduced) >+- Mode->Flags |= V_PHSYNC | V_NVSYNC; >+- else >+- Mode->Flags |= V_NHSYNC | V_PVSYNC; >+- >+- if (Interlaced) >+- Mode->Flags |= V_INTERLACE; >++ free(libxcvt_mode_info); >+ >+ return Mode; >+ } >+--- hw/xfree86/utils/Makefile.in.orig 2020-08-25 15:40:08 UTC >++++ hw/xfree86/utils/Makefile.in >+@@ -550,7 +550,6 @@ top_builddir = @top_builddir@ >+ top_srcdir = @top_srcdir@ >+ SUBDIRS = \ >+ gtf \ >+- cvt \ >+ man >+ >+ all: all-recursive >+--- hw/xfree86/utils/man/Makefile.in.orig 2020-08-25 15:40:08 UTC >++++ hw/xfree86/utils/man/Makefile.in >+@@ -565,7 +565,7 @@ fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) >+ EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) >+ CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) >+ SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man >+-appman_PRE = cvt.man gtf.man >++appman_PRE = gtf.man >+ all: all-am >+ >+ .SUFFIXES: >+--- hw/xwayland/Makefile.in.orig 2020-08-25 15:40:08 UTC >++++ hw/xwayland/Makefile.in >+@@ -107,7 +107,8 @@ bin_PROGRAMS = Xwayland$(EXEEXT) >+ @GLAMOR_EGL_FALSE@ $(top_builddir)/glx/libglxvnd.la \ >+ @GLAMOR_EGL_FALSE@ $(am__DEPENDENCIES_1) \ >+ @GLAMOR_EGL_FALSE@ $(top_builddir)/Xext/libXvidmode.la \ >+-@GLAMOR_EGL_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) >++@GLAMOR_EGL_FALSE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ >++@GLAMOR_EGL_FALSE@ $(am__DEPENDENCIES_2) >+ @XWAYLAND_EGLSTREAM_TRUE@am__append_6 = \ >+ @XWAYLAND_EGLSTREAM_TRUE@ wayland-eglstream-client-protocol.h \ >+ @XWAYLAND_EGLSTREAM_TRUE@ wayland-eglstream-protocol.c \ >+@@ -397,6 +398,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ >+ LIBTOOL = @LIBTOOL@ >+ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ >+ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ >++LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ >++LIBXCVT_LIBS = @LIBXCVT_LIBS@ >+ LIB_MAN_DIR = @LIB_MAN_DIR@ >+ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ >+ LIPO = @LIPO@ >+@@ -631,7 +634,8 @@ Xwayland_CFLAGS = \ >+ $(XWAYLANDMODULES_CFLAGS) \ >+ $(DIX_CFLAGS) \ >+ $(GLAMOR_CFLAGS) \ >+- $(GBM_CFLAGS) >++ $(GBM_CFLAGS) \ >++ $(LIBXCVT_CFLAGS) >+ >+ Xwayland_SOURCES = xwayland.c xwayland-input.c xwayland-cursor.c \ >+ xwayland-shm.c xwayland-output.c xwayland-cvt.c \ >+@@ -641,7 +645,7 @@ Xwayland_SOURCES = xwayland.c xwayland-input.c xwaylan >+ Xwayland_LDADD = $(glamor_lib) $(XWAYLAND_LIBS) \ >+ $(top_builddir)/glx/libglxvnd.la $(XWAYLAND_SYS_LIBS) \ >+ $(top_builddir)/Xext/libXvidmode.la $(XSERVER_SYS_LIBS) \ >+- $(am__append_5) >++ $(LIBXCVT_LIBS) $(am__append_5) >+ Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) >+ Xwayland_built_sources = $(am__append_4) \ >+ relative-pointer-unstable-v1-client-protocol.h \ >+--- hw/xwayland/xwayland-cvt.c.orig 2020-08-25 15:39:55 UTC >++++ hw/xwayland/xwayland-cvt.c >+@@ -1,8 +1,6 @@ >+-/* Copied from hw/xfree86/modes/xf86cvt.c into xwayland DDX and >+- * changed to generate an RRMode */ >+- >+ /* >+ * Copyright 2005-2006 Luc Verhaegen. >++ * Copyright © 2021 Red Hat, Inc. >+ * >+ * Permission is hereby granted, free of charge, to any person obtaining a >+ * copy of this software and associated documentation files (the "Software"), >+@@ -23,12 +21,6 @@ >+ * OTHER DEALINGS IN THE SOFTWARE. >+ */ >+ >+-/* >+- * The reason for having this function in a file of its own is >+- * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode >+- * code is shared directly. >+- */ >+- >+ #ifdef HAVE_DIX_CONFIG_H >+ #include <dix-config.h> >+ #endif >+@@ -37,271 +29,32 @@ >+ #include <randrstr.h> >+ #include "xwayland.h" >+ >+-/* >+- * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh. >+- * >+- * These calculations are stolen from the CVT calculation spreadsheet written >+- * by Graham Loveridge. He seems to be claiming no copyright and there seems to >+- * be no license attached to this. He apparently just wants to see his name >+- * mentioned. >+- * >+- * This file can be found at http://www.vesa.org/Public/CVT/CVTd6r1.xls >+- * >+- * Comments and structure corresponds to the comments and structure of the xls. >+- * This should ease importing of future changes to the standard (not very >+- * likely though). >+- * >+- * About margins; i'm sure that they are to be the bit between HDisplay and >+- * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and >+- * VTotal, where the overscan colour is shown. FB seems to call _all_ blanking >+- * outside sync "margin" for some reason. Since we prefer seeing proper >+- * blanking instead of the overscan colour, and since the Crtc* values will >+- * probably get altered after us, we will disable margins altogether. With >+- * these calculations, Margins will plainly expand H/VDisplay, and we don't >+- * want that. -- libv >+- * >+- */ >++#include <libxcvt/libxcvt.h> >++ >+ RRModePtr >+-xwayland_cvt(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, >+- Bool Interlaced) >++xwayland_cvt(int hdisplay, int vdisplay, float vrefresh, Bool reduced, >++ Bool interlaced) >+ { >+- /* 1) top/bottom margin size (% of height) - default: 1.8 */ >+-#define CVT_MARGIN_PERCENTAGE 1.8 >+- >+- /* 2) character cell horizontal granularity (pixels) - default 8 */ >+-#define CVT_H_GRANULARITY 8 >+- >+- /* 4) Minimum vertical porch (lines) - default 3 */ >+-#define CVT_MIN_V_PORCH 3 >+- >+- /* 4) Minimum number of vertical back porch lines - default 6 */ >+-#define CVT_MIN_V_BPORCH 6 >+- >+- /* Pixel Clock step (kHz) */ >+-#define CVT_CLOCK_STEP 250 >+- >+- Bool Margins = FALSE; >+- float VFieldRate, HPeriod; >+- int HDisplayRnd, HMargin; >+- int VDisplayRnd, VMargin, VSync; >+- float Interlace; /* Please rename this */ >++ struct libxcvt_mode_info *libxcvt_mode_info; >+ char name[128]; >+ xRRModeInfo modeinfo; >+ >++ libxcvt_mode_info = >++ libxcvt_gen_mode_info(hdisplay, vdisplay, vrefresh, reduced, interlaced); >++ >+ memset(&modeinfo, 0, sizeof modeinfo); >++ modeinfo.width = libxcvt_mode_info->hdisplay; >++ modeinfo.height = libxcvt_mode_info->vdisplay; >++ modeinfo.dotClock = libxcvt_mode_info->dot_clock * 1000.0; >++ modeinfo.hSyncStart = libxcvt_mode_info->hsync_start; >++ modeinfo.hSyncEnd = libxcvt_mode_info->hsync_end; >++ modeinfo.hTotal = libxcvt_mode_info->htotal; >++ modeinfo.vSyncStart = libxcvt_mode_info->vsync_start; >++ modeinfo.vSyncEnd = libxcvt_mode_info->vsync_end; >++ modeinfo.vTotal = libxcvt_mode_info->vtotal; >++ modeinfo.modeFlags = libxcvt_mode_info->mode_flags; >+ >+- /* CVT default is 60.0Hz */ >+- if (!VRefresh) >+- VRefresh = 60.0; >+- >+- /* 1. Required field rate */ >+- if (Interlaced) >+- VFieldRate = VRefresh * 2; >+- else >+- VFieldRate = VRefresh; >+- >+- /* 2. Horizontal pixels */ >+- HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY); >+- >+- /* 3. Determine left and right borders */ >+- if (Margins) { >+- /* right margin is actually exactly the same as left */ >+- HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); >+- HMargin -= HMargin % CVT_H_GRANULARITY; >+- } >+- else >+- HMargin = 0; >+- >+- /* 4. Find total active pixels */ >+- modeinfo.width = HDisplayRnd + 2 * HMargin; >+- >+- /* 5. Find number of lines per field */ >+- if (Interlaced) >+- VDisplayRnd = VDisplay / 2; >+- else >+- VDisplayRnd = VDisplay; >+- >+- /* 6. Find top and bottom margins */ >+- /* nope. */ >+- if (Margins) >+- /* top and bottom margins are equal again. */ >+- VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); >+- else >+- VMargin = 0; >+- >+- modeinfo.height = VDisplay + 2 * VMargin; >+- >+- /* 7. Interlace */ >+- if (Interlaced) >+- Interlace = 0.5; >+- else >+- Interlace = 0.0; >+- >+- /* Determine VSync Width from aspect ratio */ >+- if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay)) >+- VSync = 4; >+- else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay)) >+- VSync = 5; >+- else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay)) >+- VSync = 6; >+- else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay)) >+- VSync = 7; >+- else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay)) >+- VSync = 7; >+- else /* Custom */ >+- VSync = 10; >+- >+- if (!Reduced) { /* simplified GTF calculation */ >+- >+- /* 4) Minimum time of vertical sync + back porch interval (µs) >+- * default 550.0 */ >+-#define CVT_MIN_VSYNC_BP 550.0 >+- >+- /* 3) Nominal HSync width (% of line period) - default 8 */ >+-#define CVT_HSYNC_PERCENTAGE 8 >+- >+- float HBlankPercentage; >+- int VSyncAndBackPorch, VBackPorch; >+- int HBlank; >+- >+- /* 8. Estimated Horizontal period */ >+- HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) / >+- (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace); >+- >+- /* 9. Find number of lines in sync + backporch */ >+- if (((int) (CVT_MIN_VSYNC_BP / HPeriod) + 1) < >+- (VSync + CVT_MIN_V_PORCH)) >+- VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH; >+- else >+- VSyncAndBackPorch = (int) (CVT_MIN_VSYNC_BP / HPeriod) + 1; >+- >+- /* 10. Find number of lines in back porch */ >+- VBackPorch = VSyncAndBackPorch - VSync; >+- (void) VBackPorch; >+- >+- /* 11. Find total number of lines in vertical field */ >+- modeinfo.vTotal = >+- VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace + >+- CVT_MIN_V_PORCH; >+- >+- /* 5) Definition of Horizontal blanking time limitation */ >+- /* Gradient (%/kHz) - default 600 */ >+-#define CVT_M_FACTOR 600 >+- >+- /* Offset (%) - default 40 */ >+-#define CVT_C_FACTOR 40 >+- >+- /* Blanking time scaling factor - default 128 */ >+-#define CVT_K_FACTOR 128 >+- >+- /* Scaling factor weighting - default 20 */ >+-#define CVT_J_FACTOR 20 >+- >+-#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256 >+-#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \ >+- CVT_J_FACTOR >+- >+- /* 12. Find ideal blanking duty cycle from formula */ >+- HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod / 1000.0; >+- >+- /* 13. Blanking time */ >+- if (HBlankPercentage < 20) >+- HBlankPercentage = 20; >+- >+- HBlank = modeinfo.width * HBlankPercentage / (100.0 - HBlankPercentage); >+- HBlank -= HBlank % (2 * CVT_H_GRANULARITY); >+- >+- /* 14. Find total number of pixels in a line. */ >+- modeinfo.hTotal = modeinfo.width + HBlank; >+- >+- /* Fill in HSync values */ >+- modeinfo.hSyncEnd = modeinfo.width + HBlank / 2; >+- >+- modeinfo.hSyncStart = modeinfo.hSyncEnd - >+- (modeinfo.hTotal * CVT_HSYNC_PERCENTAGE) / 100; >+- modeinfo.hSyncStart += CVT_H_GRANULARITY - >+- modeinfo.hSyncStart % CVT_H_GRANULARITY; >+- >+- /* Fill in VSync values */ >+- modeinfo.vSyncStart = modeinfo.height + CVT_MIN_V_PORCH; >+- modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync; >+- >+- } >+- else { /* Reduced blanking */ >+- /* Minimum vertical blanking interval time (µs) - default 460 */ >+-#define CVT_RB_MIN_VBLANK 460.0 >+- >+- /* Fixed number of clocks for horizontal sync */ >+-#define CVT_RB_H_SYNC 32.0 >+- >+- /* Fixed number of clocks for horizontal blanking */ >+-#define CVT_RB_H_BLANK 160.0 >+- >+- /* Fixed number of lines for vertical front porch - default 3 */ >+-#define CVT_RB_VFPORCH 3 >+- >+- int VBILines; >+- >+- /* 8. Estimate Horizontal period. */ >+- HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) / >+- (VDisplayRnd + 2 * VMargin); >+- >+- /* 9. Find number of lines in vertical blanking */ >+- VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1; >+- >+- /* 10. Check if vertical blanking is sufficient */ >+- if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH)) >+- VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH; >+- >+- /* 11. Find total number of lines in vertical field */ >+- modeinfo.vTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines; >+- >+- /* 12. Find total number of pixels in a line */ >+- modeinfo.hTotal = modeinfo.width + CVT_RB_H_BLANK; >+- >+- /* Fill in HSync values */ >+- modeinfo.hSyncEnd = modeinfo.width + CVT_RB_H_BLANK / 2; >+- modeinfo.hSyncStart = modeinfo.hSyncEnd - CVT_RB_H_SYNC; >+- >+- /* Fill in VSync values */ >+- modeinfo.vSyncStart = modeinfo.height + CVT_RB_VFPORCH; >+- modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync; >+- } >+- >+- /* 15/13. Find pixel clock frequency (kHz for xf86) */ >+- modeinfo.dotClock = modeinfo.hTotal * 1000.0 / HPeriod; >+- modeinfo.dotClock -= modeinfo.dotClock % CVT_CLOCK_STEP; >+- modeinfo.dotClock *= 1000.0; >+-#if 0 >+- /* 16/14. Find actual Horizontal Frequency (kHz) */ >+- modeinfo.hSync = ((float) modeinfo.dotClock) / ((float) modeinfo.hTotal); >+-#endif >+- >+-#if 0 >+- /* 17/15. Find actual Field rate */ >+- modeinfo.vRefresh = (1000.0 * ((float) modeinfo.dotClock)) / >+- ((float) (modeinfo.hTotal * modeinfo.vTotal)); >+-#endif >+- >+- /* 18/16. Find actual vertical frame frequency */ >+- /* ignore - just set the mode flag for interlaced */ >+- if (Interlaced) >+- modeinfo.vTotal *= 2; >+- >+- if (Reduced) >+- modeinfo.modeFlags |= RR_HSyncPositive | RR_VSyncNegative; >+- else >+- modeinfo.modeFlags |= RR_HSyncNegative | RR_VSyncPositive; >+- >+- if (Interlaced) >+- modeinfo.modeFlags |= RR_Interlace; >+- >+- /* FWXGA hack adapted from hw/xfree86/modes/xf86EdidModes.c, because you can't say 1366 */ >+- if (HDisplay == 1366 && VDisplay == 768) { >+- modeinfo.width = 1366; >+- modeinfo.hSyncStart--; >+- modeinfo.hSyncEnd--; >+- } >++ free(libxcvt_mode_info); >+ >+ snprintf(name, sizeof name, "%dx%d", >+ modeinfo.width, modeinfo.height); >+--- meson.build.orig 2020-08-25 15:39:55 UTC >++++ meson.build >+@@ -162,6 +162,7 @@ if (host_machine.system() != 'darwin' and >+ endif >+ endif >+ xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg') >++libxcvt_dep = dependency('libxcvt', required: build_xorg) >+ >+ build_xwayland = false >+ if (host_machine.system() != 'darwin' and >+@@ -172,6 +173,7 @@ if (host_machine.system() != 'darwin' and >+ xwayland_dep = [ >+ dependency('wayland-client', version: '>= 1.3.0', required: xwayland_required), >+ dependency('wayland-protocols', version: '>= 1.10', required: xwayland_required), >++ dependency('libxcvt', required: xwayland_required), >+ dependency('libdrm', version: '>= 2.4.89', required: xwayland_required), >+ dependency('epoxy', required: xwayland_required), >+ ] >+--- test/Makefile.in.orig 2020-08-25 15:40:09 UTC >++++ test/Makefile.in >+@@ -157,7 +157,8 @@ host_triplet = @host@ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la \ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(XSERVER_LIBS) \ >+-@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(XORG_LIBS) >++@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(XORG_LIBS) \ >++@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(LIBXCVT_LIBS) >+ >+ @ENABLE_UNIT_TESTS_TRUE@@SPECIAL_DTRACE_OBJECTS_FALSE@@XORG_TRUE@am__append_11 = $(top_builddir)/os/libos.la >+ @ENABLE_UNIT_TESTS_TRUE@@GLX_TRUE@@XORG_TRUE@am__append_12 = $(top_builddir)/glx/libglxvnd.la >+@@ -252,6 +253,7 @@ am__DEPENDENCIES_1 = >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la \ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(am__DEPENDENCIES_1) \ >++@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(am__DEPENDENCIES_1) \ >+ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(am__DEPENDENCIES_1) >+ @ENABLE_UNIT_TESTS_TRUE@tests_DEPENDENCIES = $(am__DEPENDENCIES_2) \ >+ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_11) $(am__append_12) \ >+@@ -724,6 +726,8 @@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ >+ LIBTOOL = @LIBTOOL@ >+ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ >+ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ >++LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ >++LIBXCVT_LIBS = @LIBXCVT_LIBS@ >+ LIB_MAN_DIR = @LIB_MAN_DIR@ >+ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ >+ LIPO = @LIPO@ >+@@ -952,7 +956,7 @@ top_build_prefix = @top_build_prefix@ >+ top_builddir = @top_builddir@ >+ top_srcdir = @top_srcdir@ >+ @ENABLE_UNIT_TESTS_TRUE@SUBDIRS = . >+-@ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ >++@ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) $(LIBXCVT_CFLAGS) @XORG_CFLAGS@ >+ @ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = $(XORG_INCS) $(am__append_1) >+ @ENABLE_UNIT_TESTS_TRUE@tests_CPPFLAGS = $(am__append_2) \ >+ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_5) $(am__append_6) >diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist >index 71dd5a690605..f7403ec70abc 100644 >--- a/x11-servers/xorg-server/pkg-plist >+++ b/x11-servers/xorg-server/pkg-plist >@@ -1,7 +1,6 @@ > bin/X > bin/Xorg > %%SUID%%@(,,4555) bin/Xorg.wrap >-bin/cvt > bin/gtf > include/xorg/BT.h > include/xorg/IBM.h >@@ -182,7 +181,6 @@ libdata/pkgconfig/xorg-server.pc > man/man1/Xorg.1.gz > %%SUID%%man/man1/Xorg.wrap.1.gz > man/man1/Xserver.1.gz >-man/man1/cvt.1.gz > man/man1/gtf.1.gz > man/man4/exa.4.gz > man/man4/fbdevhw.4.gz >diff --git a/x11-servers/xwayland-devel/Makefile b/x11-servers/xwayland-devel/Makefile >index a3a350240336..ce84648e4544 100644 >--- a/x11-servers/xwayland-devel/Makefile >+++ b/x11-servers/xwayland-devel/Makefile >@@ -4,6 +4,7 @@ PORTNAME= xwayland > DISTVERSIONPREFIX= xorg-server- > DISTVERSION= 1.20.0-877 > DISTVERSIONSUFFIX= -g1b7dca27e >+PORTREVISION= 1 > CATEGORIES= x11-servers > PKGNAMESUFFIX= -devel > >@@ -11,6 +12,10 @@ PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ > PATCHFILES+= 231720f8b212.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/432 > PATCHFILES+= 48a7bfeb4687.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/432 > PATCHFILES+= 2b3c4983f937.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/432 >+PATCHFILES+= 1194dae3551c.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637 >+PATCHFILES+= 7a135f8b559e.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637 >+PATCHFILES+= e72591ff6740.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637 >+PATCHFILES+= 94bd7286aa3e.patch:-p1 # https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/637 > > MAINTAINER= jbeich@FreeBSD.org > COMMENT= X11 server as Wayland client (development snapshot) >@@ -23,7 +28,8 @@ BUILD_DEPENDS= evdev-proto>0:devel/evdev-proto \ > wayland-protocols>=1.18:graphics/wayland-protocols > LIB_DEPENDS= libdrm.so:graphics/libdrm \ > libepoxy.so:graphics/libepoxy \ >- libwayland-client.so:graphics/wayland >+ libwayland-client.so:graphics/wayland \ >+ libxcvt.so:x11/libxcvt > RUN_DEPENDS= xkbcomp:x11/xkbcomp \ > xkeyboard-config>0:x11/xkeyboard-config > >diff --git a/x11-servers/xwayland-devel/distinfo b/x11-servers/xwayland-devel/distinfo >index 864bd10e0259..1219d96370e3 100644 >--- a/x11-servers/xwayland-devel/distinfo >+++ b/x11-servers/xwayland-devel/distinfo >@@ -7,3 +7,11 @@ SHA256 (48a7bfeb4687.patch) = ae284622227b317085360f61553bae7fc21a57f4d2b6d4133a > SIZE (48a7bfeb4687.patch) = 17542 > SHA256 (2b3c4983f937.patch) = 9927abf281cff8d44694a883bd60e90337e9d635a3714de1a51f91c4f112c46e > SIZE (2b3c4983f937.patch) = 2567 >+SHA256 (1194dae3551c.patch) = 512cdfd156584d2b33fbc356c962faa2a3e451406cdd8df940cd6dd3e2c720d2 >+SIZE (1194dae3551c.patch) = 3003 >+SHA256 (7a135f8b559e.patch) = d13784ad5c397930df03d88a1648212e144eeb9bc502d1cc98cbc66067a73ac0 >+SIZE (7a135f8b559e.patch) = 12505 >+SHA256 (e72591ff6740.patch) = 6d57ace6c46243c5f1676505fa549e1410dd104c638925288b187ba8f00ff249 >+SIZE (e72591ff6740.patch) = 13783 >+SHA256 (94bd7286aa3e.patch) = 70198a446056fa78dbf89c5edea96e49f7601c6acfff8a2c1314054b1240471c >+SIZE (94bd7286aa3e.patch) = 15227 >diff --git a/x11-servers/xwayland/Makefile b/x11-servers/xwayland/Makefile >index 33266f967e7f..67bddd7478f1 100644 >--- a/x11-servers/xwayland/Makefile >+++ b/x11-servers/xwayland/Makefile >@@ -1,7 +1,7 @@ > # $FreeBSD$ > > PORTNAME= xwayland >-PORTREVISION= 2 >+PORTREVISION= 3 > > COMMENT= X Clients under Wayland > >diff --git a/x11/libxcvt/Makefile b/x11/libxcvt/Makefile >index 5c1902d71135..260ae20e28b2 100644 >--- a/x11/libxcvt/Makefile >+++ b/x11/libxcvt/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= libxcvt > PORTVERSION= s20210325 >+PORTREVISION= 1 > CATEGORIES= x11 > > MAINTAINER= jbeich@FreeBSD.org >diff --git a/x11/libxcvt/pkg-plist b/x11/libxcvt/pkg-plist >index 20384f802cbe..cf19adbb7a70 100644 >--- a/x11/libxcvt/pkg-plist >+++ b/x11/libxcvt/pkg-plist >@@ -1,6 +1,6 @@ >-@comment bin/cvt >+bin/cvt > include/libxcvt/libxcvt.h > include/libxcvt/libxcvt_mode.h > lib/libxcvt.so > libdata/pkgconfig/libxcvt.pc >-@comment man/man1/cvt.1.gz >+man/man1/cvt.1.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254557
: 223581