diff options
author | 2018-06-22 22:34:23 -0500 | |
---|---|---|
committer | 2018-06-22 22:34:23 -0500 | |
commit | d4ca966c1aecbdad89d1dba6f2b839d54d3bcdb1 (patch) | |
tree | d54bdc4108a44ffcd9dd733caf04e4f83c3e5b84 | |
parent | compton updated from asciidoc --> asciidoctor (diff) | |
download | ag-ops-d4ca966c1aecbdad89d1dba6f2b839d54d3bcdb1.tar.gz ag-ops-d4ca966c1aecbdad89d1dba6f2b839d54d3bcdb1.tar.bz2 ag-ops-d4ca966c1aecbdad89d1dba6f2b839d54d3bcdb1.zip |
xorg-2 eclass added to remove dependency on asciidoc --> asciidoctor
-rw-r--r-- | eclass/xorg-2.eclass | 580 | ||||
-rw-r--r-- | x11-base/xorg-server/Manifest | 15 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xdm-setup.initd-1 | 13 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xdm.confd-4 | 10 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xdm.initd-11 | 230 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch | 53 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch | 53 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch | 36 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch | 39 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch | 224 | ||||
-rw-r--r-- | x11-base/xorg-server/files/xorg-sets.conf | 6 | ||||
-rw-r--r-- | x11-base/xorg-server/metadata.xml | 23 | ||||
-rw-r--r-- | x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild | 224 | ||||
-rw-r--r-- | x11-base/xorg-server/xorg-server-1.20.0.ebuild | 221 | ||||
-rw-r--r-- | x11-base/xorg-server/xorg-server-9999.ebuild | 220 |
15 files changed, 1947 insertions, 0 deletions
diff --git a/eclass/xorg-2.eclass b/eclass/xorg-2.eclass new file mode 100644 index 0000000..fd16cf4 --- /dev/null +++ b/eclass/xorg-2.eclass @@ -0,0 +1,580 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: xorg-2.eclass +# @MAINTAINER: +# x11@gentoo.org +# @AUTHOR: +# Author: Tomáš Chvátal <scarabeus@gentoo.org> +# Author: Donnie Berkholz <dberkholz@gentoo.org> +# @BLURB: Reduces code duplication in the modularized X11 ebuilds. +# @DESCRIPTION: +# This eclass makes trivial X ebuilds possible for apps, fonts, drivers, +# and more. Many things that would normally be done in various functions +# can be accessed by setting variables instead, such as patching, +# running eautoreconf, passing options to configure and installing docs. +# +# All you need to do in a basic ebuild is inherit this eclass and set +# DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted +# with the other X packages, you don't need to set SRC_URI. Pretty much +# everything else should be automatic. + +GIT_ECLASS="" +if [[ ${PV} == *9999* ]]; then + GIT_ECLASS="git-r3" + XORG_EAUTORECONF="yes" +fi + +# If we're a font package, but not the font.alias one +FONT_ECLASS="" +if [[ ${PN} == font* \ + && ${CATEGORY} = media-fonts \ + && ${PN} != font-alias \ + && ${PN} != font-util ]]; then + # Activate font code in the rest of the eclass + FONT="yes" + FONT_ECLASS="font" +fi + +# @ECLASS-VARIABLE: XORG_MULTILIB +# @DESCRIPTION: +# If set to 'yes', the multilib support for package will be enabled. Set +# before inheriting this eclass. +: ${XORG_MULTILIB:="no"} + +# we need to inherit autotools first to get the deps +inherit autotools autotools-utils eutils libtool multilib toolchain-funcs \ + flag-o-matic ${FONT_ECLASS} ${GIT_ECLASS} + +if [[ ${XORG_MULTILIB} == yes ]]; then + inherit autotools-multilib +fi + +EXPORTED_FUNCTIONS="src_unpack src_compile src_install pkg_postinst pkg_postrm" +case "${EAPI:-0}" in + 3|4|5) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare src_configure" ;; + *) die "EAPI=${EAPI} is not supported" ;; +esac + +# exports must be ALWAYS after inherit +EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS} + +IUSE="" +HOMEPAGE="https://www.x.org/wiki/ https://cgit.freedesktop.org/" + +# @ECLASS-VARIABLE: XORG_EAUTORECONF +# @DESCRIPTION: +# If set to 'yes' and configure.ac exists, eautoreconf will run. Set +# before inheriting this eclass. +: ${XORG_EAUTORECONF:="no"} + +# @ECLASS-VARIABLE: XORG_BASE_INDIVIDUAL_URI +# @DESCRIPTION: +# Set up SRC_URI for individual modular releases. If set to an empty +# string, no SRC_URI will be provided by the eclass. +: ${XORG_BASE_INDIVIDUAL_URI="https://www.x.org/releases/individual"} + +# @ECLASS-VARIABLE: XORG_MODULE +# @DESCRIPTION: +# The subdirectory to download source from. Possible settings are app, +# doc, data, util, driver, font, lib, proto, xserver. Set above the +# inherit to override the default autoconfigured module. +if [[ -z ${XORG_MODULE} ]]; then + case ${CATEGORY} in + app-doc) XORG_MODULE=doc/ ;; + media-fonts) XORG_MODULE=font/ ;; + x11-apps|x11-wm) XORG_MODULE=app/ ;; + x11-misc|x11-themes) XORG_MODULE=util/ ;; + x11-base) XORG_MODULE=xserver/ ;; + x11-drivers) XORG_MODULE=driver/ ;; + x11-libs) XORG_MODULE=lib/ ;; + *) XORG_MODULE= ;; + esac +fi + +# @ECLASS-VARIABLE: XORG_PACKAGE_NAME +# @DESCRIPTION: +# For git checkout the git repository might differ from package name. +# This variable can be used for proper directory specification +: ${XORG_PACKAGE_NAME:=${PN}} + +if [[ -n ${GIT_ECLASS} ]]; then + : ${EGIT_REPO_URI:="https://anongit.freedesktop.org/git/xorg/${XORG_MODULE}${XORG_PACKAGE_NAME}.git"} +elif [[ -n ${XORG_BASE_INDIVIDUAL_URI} ]]; then + SRC_URI="${XORG_BASE_INDIVIDUAL_URI}/${XORG_MODULE}${P}.tar.bz2" +fi + +: ${SLOT:=0} + +# Set the license for the package. This can be overridden by setting +# LICENSE after the inherit. Nearly all FreeDesktop-hosted X packages +# are under the MIT license. (This is what Red Hat does in their rpms) +: ${LICENSE:=MIT} + +# Set up autotools shared dependencies +# Remember that all versions here MUST be stable +XORG_EAUTORECONF_ARCHES="ppc-aix x86-winnt" +EAUTORECONF_DEPEND+=" + >=sys-devel/libtool-2.2.6a + sys-devel/m4" +if [[ ${PN} != util-macros ]] ; then + EAUTORECONF_DEPEND+=" >=x11-misc/util-macros-1.18" + # Required even by xorg-server + [[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0" +fi +WANT_AUTOCONF="latest" +WANT_AUTOMAKE="latest" +for arch in ${XORG_EAUTORECONF_ARCHES}; do + EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )" +done +DEPEND+=" ${EAUTORECONF_DEPENDS}" +[[ ${XORG_EAUTORECONF} != no ]] && DEPEND+=" ${EAUTORECONF_DEPEND}" +unset EAUTORECONF_DEPENDS +unset EAUTORECONF_DEPEND + +if [[ ${FONT} == yes ]]; then + RDEPEND+=" media-fonts/encodings + x11-apps/mkfontscale + x11-apps/mkfontdir" + PDEPEND+=" media-fonts/font-alias" + DEPEND+=" >=media-fonts/font-util-1.2.0" + + # @ECLASS-VARIABLE: FONT_DIR + # @DESCRIPTION: + # If you're creating a font package and the suffix of PN is not equal to + # the subdirectory of /usr/share/fonts/ it should install into, set + # FONT_DIR to that directory or directories. Set before inheriting this + # eclass. + [[ -z ${FONT_DIR} ]] && FONT_DIR=${PN##*-} + + # Fix case of font directories + FONT_DIR=${FONT_DIR/ttf/TTF} + FONT_DIR=${FONT_DIR/otf/OTF} + FONT_DIR=${FONT_DIR/type1/Type1} + FONT_DIR=${FONT_DIR/speedo/Speedo} + + # Set up configure options, wrapped so ebuilds can override if need be + [[ -z ${FONT_OPTIONS} ]] && FONT_OPTIONS="--with-fontdir=\"${EPREFIX}/usr/share/fonts/${FONT_DIR}\"" + + [[ ${PN} = font-misc-misc || ${PN} = font-schumacher-misc || ${PN##*-} = 75dpi || ${PN##*-} = 100dpi || ${PN##*-} = cyrillic ]] && IUSE+=" nls" +fi + +# If we're a driver package, then enable DRIVER case +[[ ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] && DRIVER="yes" + +# @ECLASS-VARIABLE: XORG_STATIC +# @DESCRIPTION: +# Enables static-libs useflag. Set to no, if your package gets: +# +# QA: configure: WARNING: unrecognized options: --disable-static +: ${XORG_STATIC:="yes"} + +# Add static-libs useflag where usefull. +if [[ ${XORG_STATIC} == yes \ + && ${FONT} != yes \ + && ${CATEGORY} != app-doc \ + && ${CATEGORY} != x11-apps \ + && ${CATEGORY} != x11-drivers \ + && ${CATEGORY} != media-fonts \ + && ${PN} != util-macros \ + && ${PN} != xbitmaps \ + && ${PN} != xorg-cf-files \ + && ${PN/xcursor} = ${PN} ]]; then + IUSE+=" static-libs" +fi + +DEPEND+=" virtual/pkgconfig" + +# @ECLASS-VARIABLE: XORG_DRI +# @DESCRIPTION: +# Possible values are "always" or the value of the useflag DRI capabilities +# are required for. Default value is "no" +# +# Eg. XORG_DRI="opengl" will pull all dri dependant deps for opengl useflag +: ${XORG_DRI:="no"} + +DRI_COMMON_DEPEND=" + x11-base/xorg-server[-minimal] + x11-libs/libdrm +" +case ${XORG_DRI} in + no) + ;; + always) + COMMON_DEPEND+=" ${DRI_COMMON_DEPEND}" + ;; + *) + COMMON_DEPEND+=" ${XORG_DRI}? ( ${DRI_COMMON_DEPEND} )" + IUSE+=" ${XORG_DRI}" + ;; +esac +unset DRI_COMMON_DEPEND + +if [[ -n "${DRIVER}" ]]; then + COMMON_DEPEND+=" + x11-base/xorg-server[xorg] + " +fi +if [[ -n "${DRIVER}" && ${PN} == xf86-input-* ]]; then + DEPEND+=" x11-base/xorg-proto" +fi +if [[ -n "${DRIVER}" && ${PN} == xf86-video-* ]]; then + COMMON_DEPEND+=" + x11-libs/libpciaccess + " + DEPEND+=" x11-base/xorg-proto" +fi + +# @ECLASS-VARIABLE: XORG_DOC +# @DESCRIPTION: +# Possible values are "always" or the value of the useflag doc packages +# are required for. Default value is "no" +# +# Eg. XORG_DOC="manual" will pull all doc dependant deps for manual useflag +: ${XORG_DOC:="no"} + +DOC_DEPEND=" + doc? ( + dev-ruby/asciidoctor + app-text/xmlto + app-doc/doxygen + app-text/docbook-xml-dtd:4.1.2 + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xml-dtd:4.3 + ) +" +case ${XORG_DOC} in + no) + ;; + always) + DEPEND+=" ${DOC_DEPEND}" + ;; + *) + DEPEND+=" ${XORG_DOC}? ( ${DOC_DEPEND} )" + IUSE+=" ${XORG_DOC}" + ;; +esac +unset DOC_DEPEND + +# @ECLASS-VARIABLE: XORG_MODULE_REBUILD +# @DESCRIPTION: +# Describes whether a package contains modules that need to be rebuilt on +# xorg-server upgrade. This has an effect only since EAPI=5. +# Possible values are "yes" or "no". Default value is "yes" for packages which +# are recognized as DRIVER by this eclass and "no" for all other packages. +if [[ "${DRIVER}" == yes ]]; then + : ${XORG_MODULE_REBUILD:="yes"} +else + : ${XORG_MODULE_REBUILD:="no"} +fi + +if [[ ${XORG_MODULE_REBUILD} == yes ]]; then + case ${EAPI} in + 3|4) + ;; + *) + RDEPEND+=" x11-base/xorg-server:=" + ;; + esac +fi + +DEPEND+=" ${COMMON_DEPEND}" +RDEPEND+=" ${COMMON_DEPEND}" +unset COMMON_DEPEND + +debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND=${DEPEND}" +debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND=${RDEPEND}" +debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: PDEPEND=${PDEPEND}" + +# @FUNCTION: xorg-2_pkg_setup +# @DESCRIPTION: +# Setup prefix compat +xorg-2_pkg_setup() { + debug-print-function ${FUNCNAME} "$@" + + [[ ${FONT} == yes ]] && font_pkg_setup "$@" +} + +# @FUNCTION: xorg-2_src_unpack +# @DESCRIPTION: +# Simply unpack source code. +xorg-2_src_unpack() { + debug-print-function ${FUNCNAME} "$@" + + if [[ -n ${GIT_ECLASS} ]]; then + git-r3_src_unpack + else + unpack ${A} + fi + + [[ -n ${FONT_OPTIONS} ]] && einfo "Detected font directory: ${FONT_DIR}" +} + +# @FUNCTION: xorg-2_patch_source +# @DESCRIPTION: +# Apply all patches +xorg-2_patch_source() { + debug-print-function ${FUNCNAME} "$@" + + # Use standardized names and locations with bulk patching + # Patch directory is ${WORKDIR}/patch + # See epatch() in eutils.eclass for more documentation + EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} + + [[ -d "${EPATCH_SOURCE}" ]] && epatch +} + +# @FUNCTION: xorg-2_reconf_source +# @DESCRIPTION: +# Run eautoreconf if necessary, and run elibtoolize. +xorg-2_reconf_source() { + debug-print-function ${FUNCNAME} "$@" + + case ${CHOST} in + *-aix* | *-winnt*) + # some hosts need full eautoreconf + [[ -e "./configure.ac" || -e "./configure.in" ]] \ + && AUTOTOOLS_AUTORECONF=1 + ;; + *) + # elibtoolize required for BSD + [[ ${XORG_EAUTORECONF} != no && ( -e "./configure.ac" || -e "./configure.in" ) ]] \ + && AUTOTOOLS_AUTORECONF=1 + ;; + esac +} + +# @FUNCTION: xorg-2_src_prepare +# @DESCRIPTION: +# Prepare a package after unpacking, performing all X-related tasks. +xorg-2_src_prepare() { + debug-print-function ${FUNCNAME} "$@" + + xorg-2_patch_source + xorg-2_reconf_source + autotools-utils_src_prepare "$@" +} + +# @FUNCTION: xorg-2_font_configure +# @DESCRIPTION: +# If a font package, perform any necessary configuration steps +xorg-2_font_configure() { + debug-print-function ${FUNCNAME} "$@" + + if has nls ${IUSE//+} && ! use nls; then + if grep -q -s "disable-all-encodings" ${ECONF_SOURCE:-.}/configure; then + FONT_OPTIONS+=" + --disable-all-encodings + --enable-iso8859-1" + else + FONT_OPTIONS+=" + --disable-iso8859-2 + --disable-iso8859-3 + --disable-iso8859-4 + --disable-iso8859-5 + --disable-iso8859-6 + --disable-iso8859-7 + --disable-iso8859-8 + --disable-iso8859-9 + --disable-iso8859-10 + --disable-iso8859-11 + --disable-iso8859-12 + --disable-iso8859-13 + --disable-iso8859-14 + --disable-iso8859-15 + --disable-iso8859-16 + --disable-jisx0201 + --disable-koi8-r" + fi + fi +} + +# @FUNCTION: xorg-2_flags_setup +# @DESCRIPTION: +# Set up CFLAGS for a debug build +xorg-2_flags_setup() { + debug-print-function ${FUNCNAME} "$@" + + # Win32 require special define + [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ + # hardened ldflags + [[ ${PN} = xorg-server || -n ${DRIVER} ]] && append-ldflags -Wl,-z,lazy + + # Quite few libraries fail on runtime without these: + if has static-libs ${IUSE//+}; then + filter-flags -Wl,-Bdirect + filter-ldflags -Bdirect + filter-ldflags -Wl,-Bdirect + fi +} + +# @FUNCTION: xorg-2_src_configure +# @DESCRIPTION: +# Perform any necessary pre-configuration steps, then run configure +xorg-2_src_configure() { + debug-print-function ${FUNCNAME} "$@" + + xorg-2_flags_setup + + # @VARIABLE: XORG_CONFIGURE_OPTIONS + # @DESCRIPTION: + # Array of an additional options to pass to configure. + # @DEFAULT_UNSET + if [[ $(declare -p XORG_CONFIGURE_OPTIONS 2>&-) != "declare -a"* ]]; then + # fallback to CONFIGURE_OPTIONS, deprecated. + if [[ -n "${CONFIGURE_OPTIONS}" ]]; then + eqawarn "CONFIGURE_OPTIONS are deprecated. Please migrate to XORG_CONFIGURE_OPTIONS" + eqawarn "to preserve namespace." + fi + + local xorgconfadd=(${CONFIGURE_OPTIONS} ${XORG_CONFIGURE_OPTIONS}) + else + local xorgconfadd=("${XORG_CONFIGURE_OPTIONS[@]}") + fi + + [[ -n "${FONT}" ]] && xorg-2_font_configure + + # Check if package supports disabling of dep tracking + # Fixes warnings like: + # WARNING: unrecognized options: --disable-dependency-tracking + if grep -q -s "disable-depencency-tracking" ${ECONF_SOURCE:-.}/configure; then + local dep_track="--disable-dependency-tracking" + fi + + # Check if package supports disabling of selective -Werror=... + if grep -q -s "disable-selective-werror" ${ECONF_SOURCE:-.}/configure; then + local selective_werror="--disable-selective-werror" + fi + + local myeconfargs=( + ${dep_track} + ${selective_werror} + ${FONT_OPTIONS} + "${xorgconfadd[@]}" + ) + + if [[ ${XORG_MULTILIB} == yes ]]; then + autotools-multilib_src_configure "$@" + else + autotools-utils_src_configure "$@" + fi +} + +# @FUNCTION: xorg-2_src_compile +# @DESCRIPTION: +# Compile a package, performing all X-related tasks. +xorg-2_src_compile() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${XORG_MULTILIB} == yes ]]; then + autotools-multilib_src_compile "$@" + else + autotools-utils_src_compile "$@" + fi +} + +# @FUNCTION: xorg-2_src_install +# @DESCRIPTION: +# Install a built package to ${D}, performing any necessary steps. +# Creates a ChangeLog from git if using live ebuilds. +xorg-2_src_install() { + debug-print-function ${FUNCNAME} "$@" + + local install_args=( docdir="${EPREFIX}/usr/share/doc/${PF}" ) + + if [[ ${XORG_MULTILIB} == yes ]]; then + autotools-multilib_src_install "${install_args[@]}" + else + autotools-utils_src_install "${install_args[@]}" + fi + + if [[ -n ${GIT_ECLASS} ]]; then + pushd "${EGIT_STORE_DIR}/${EGIT_CLONE_DIR}" > /dev/null || die + git log ${EGIT_COMMIT} > "${S}"/ChangeLog + popd > /dev/null || die + fi + + if [[ -e "${S}"/ChangeLog ]]; then + dodoc "${S}"/ChangeLog || die "dodoc failed" + fi + + # Don't install libtool archives (even for modules) + prune_libtool_files --all + + [[ -n ${FONT} ]] && remove_font_metadata +} + +# @FUNCTION: xorg-2_pkg_postinst +# @DESCRIPTION: +# Run X-specific post-installation tasks on the live filesystem. The +# only task right now is some setup for font packages. +xorg-2_pkg_postinst() { + debug-print-function ${FUNCNAME} "$@" + + if [[ -n ${FONT} ]]; then + create_fonts_scale + create_fonts_dir + font_pkg_postinst "$@" + + ewarn "Installed fonts changed. Run 'xset fp rehash' if you are using non-fontconfig applications." + fi +} + +# @FUNCTION: xorg-2_pkg_postrm +# @DESCRIPTION: +# Run X-specific post-removal tasks on the live filesystem. The only +# task right now is some cleanup for font packages. +xorg-2_pkg_postrm() { + debug-print-function ${FUNCNAME} "$@" + + if [[ -n ${FONT} ]]; then + # if we're doing an upgrade, postinst will do + if [[ ${EAPI} -lt 4 || -z ${REPLACED_BY_VERSION} ]]; then + create_fonts_scale + create_fonts_dir + font_pkg_postrm "$@" + fi + fi +} + +# @FUNCTION: remove_font_metadata +# @DESCRIPTION: +# Don't let the package install generated font files that may overlap +# with other packages. Instead, they're generated in pkg_postinst(). +remove_font_metadata() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then + einfo "Removing font metadata" + rm -rf "${ED}"/usr/share/fonts/${FONT_DIR}/fonts.{scale,dir,cache-1} + fi +} + +# @FUNCTION: create_fonts_scale +# @DESCRIPTION: +# Create fonts.scale file, used by the old server-side fonts subsystem. +create_fonts_scale() { + debug-print-function ${FUNCNAME} "$@" + + if [[ ${FONT_DIR} != Speedo && ${FONT_DIR} != CID ]]; then + ebegin "Generating fonts.scale" + mkfontscale \ + -a "${EROOT}/usr/share/fonts/encodings/encodings.dir" \ + -- "${EROOT}/usr/share/fonts/${FONT_DIR}" + eend $? + fi +} + +# @FUNCTION: create_fonts_dir +# @DESCRIPTION: +# Create fonts.dir file, used by the old server-side fonts subsystem. +create_fonts_dir() { + debug-print-function ${FUNCNAME} "$@" + + ebegin "Generating fonts.dir" + mkfontdir \ + -e "${EROOT}"/usr/share/fonts/encodings \ + -e "${EROOT}"/usr/share/fonts/encodings/large \ + -- "${EROOT}/usr/share/fonts/${FONT_DIR}" + eend $? +} diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest new file mode 100644 index 0000000..f692365 --- /dev/null +++ b/x11-base/xorg-server/Manifest @@ -0,0 +1,15 @@ +AUX xdm-setup.initd-1 225 BLAKE2B 16823bad1346820adcb51041ed71791635353e4355f615d0de5d5456919da910c427d348b2300fa8c0e963e1b4fe3ce71cfeb039ab3f084173a20f307c0fd192 SHA512 c6bdf1e195c9af97cd504ef9b63fc0835fe79d24738295d21277aa97951405721b96cff11097098edb707f9b351dce26993de04198d22251ca0655a313083083 +AUX xdm.confd-4 573 BLAKE2B 0c2a282acc851b95f925715c31915be469ef3758bbaa800d5fc5058051bf0bde4d30fb7de7de753d0dea1b515d68ad9a254fe6f3c225ebdab9112e23a889cea9 SHA512 6d27507cc5ea8eabf11fe8068c40269f5f94483e8328a3c3f1e9ff9cfaea33e89b19d6c40570e6a0a3b6491fffa47e74a7eb456ff807faea30f01688edab14d4 +AUX xdm.initd-11 6021 BLAKE2B 75b0ae0adb0a96324d6cd7be98686e3806ea87dada2cdd8ecb128e59e18add456a55ecd30080ab9ff5fb96ae972c05625913a333b5e42a7c8fed19ed8698f154 SHA512 c599d41e2476239ee3ba704ca2493f2d976c5de660ca05393580ca6387eba91156a00a1aa919da2b0d4a5f943eb858f801dc8d3cd907d1abd487fe4fe69bd321 +AUX xorg-server-1.12-unloadsubmodule.patch 1373 BLAKE2B 4c6017bcdc53964ecc796e1beaf8a8714a85f1cfe65032df3e9ea23378b4d2db0057ea7a75ab00e8d5d89ae0d63c766dce05350446f69ffe69bb668d06e2e68b SHA512 a6a8ebbb1005f2ea9cfdfc928209a23fe213caab31a889c3290f14bcae0a9afd40176330e2e56cb5ff986d522505e7fb98fa0c71187f403e2afd33c9c919780e +AUX xorg-server-1.18-support-multiple-Files-sections.patch 1902 BLAKE2B 69ba852b425d652ebb83d116cabbf92d1530d2c616910ddbb96fb574cdad8d3f1ce2b4fcf9fb16aa2950b40a0723c9d00465d8e6d72299f1ea181a257d014c80 SHA512 5cd0a4ce9c2efef7abc84df805a3c6da33bd64fdb16c3aa2fa61da4f805605a3d12cab0f452d3bc217b6e5d5d5bea29c9f3bf262e46347a074770ebd75ddf5b5 +AUX xorg-server-1.19.4-sysmacros.patch 986 BLAKE2B 04c111591a6a558913217b24aa2357478e7d931b6cee5185dda31ebd38d68463b4a158a18d8a60ffa7ccc5c65e246f261ebbf7c0ebc81fd3ae31e7579b7adab4 SHA512 858676058779363741901ffbf79666f723f917b49f8627ddd2f31768873adfb416a70bc298e2356861cb5abca8be54a6c64f8fa4fd11a91cce072b93857ad168 +AUX xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch 1555 BLAKE2B ef0a52b2341939f254bdce6b705f0591d0888c8043e5c0da1c4c4e97cdac632c56b27392ac2d7ac63653c7dfe1d381edd619a5e0c1c78f3bf255348c99c30f24 SHA512 66cd27608019557029f15aa81cf1a067e124ec0f854af9e732fef8b12bade4f1797481c86de2437b63ec5364fbeb1e3e05a39aa08df71ad08df79cd7d244e280 +AUX xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch 8053 BLAKE2B a6acfbdddc8a4114856ed8bfb7cf215f47e5c3ca9c58d539b9e5affb760cab7c61979e2252d2aba4fc138ac29078b8aa03fe83539aca54044b19b828c88ac472 SHA512 ad46621216f9a8c2b4ac044e02bac528df8696ee203d32310ac6665a519d36c98936f2f1c3598afc269e95ecf68e256f62faba9ab087abbe50aed2faff9d458a +AUX xorg-sets.conf 199 BLAKE2B e9414694f372d3f2a65bee903522094a60e261ddcd0c49a1d85a2ee804f3edbb5c605ed2d0b44839a91e98957f05ea88da87530f5f36b2db249e09ee56ee2975 SHA512 910fe28f20909243044f079ff35136942b8790f4f28ac42ffc64a76b7f03cd22057087fa5e4e01192080b52c0d89000ea96d5a807c6f11f680d3f43312c5be41 +DIST xorg-server-1.19.5.tar.bz2 5965044 BLAKE2B 23375793ea4459a962f412440e307081ce2acd3c646e5db4d1bfac20e267bcbb1752ba8f6de66df06d25eaf92d1b55082a80eced0d44c257a757d5926ca6a7f3 SHA512 928dea5850b98cd815004cfa133eca23cfa9521920c934c68a92787f2cae13cca1534eee772a4fb74b8ae8cb92662b5d68b95b834c8aa8ec57cd57cb4e5dd45c +DIST xorg-server-1.20.0.tar.bz2 6096838 BLAKE2B 34ee6d6dbbde54d54e082a0791e85ad52d728e239a7d8fadb75ebcbdbaab8752b90ca6d075f096d971db7ec68ce4ecac5c70fcf536ce23c20b8dce8f32e2c046 SHA512 1489e8511c9da682ef0460182dfeeddd241c72d4ef4d206d9706f1e39572c09953df851fab18cefb65a1ee4c6710c6ba13c63c9c9fc0bc1b5f12c50780412cde +EBUILD xorg-server-1.19.5-r2.ebuild 5777 BLAKE2B 474ad648bed1effaac54a894d2c40639ff64b446a2ec5690bc34aeb67b2b66df54d4200f9b89d03ad855edacaf523464b4ce1e2c13f628e6d24fe62e12f9911e SHA512 63672025c57fb3f9d8d55dba7399d9a16dc558c4f927e66f70b5c0f5483ecebe33a501615d6e099456a6c9534ffe46f568dd3d5da57e3de5203d0c1a73848e11 +EBUILD xorg-server-1.20.0.ebuild 5626 BLAKE2B 05227cacf2ff76a088680fd126c4dcc5e817d58d4f954e29f42791b964cd2eb5527dd3e0c48f18a41218ad9b944d4ec92b8bbedb9dba7bc0daa0fd4b99f77298 SHA512 07a7a65ec9b875bcfca749f14492455515227ae301ca76195ae4f2b066288daf9dbab86ff17e545e9617c30afe62901460af5b0e6b4e60cd2ff091db10b465e7 +EBUILD xorg-server-9999.ebuild 5552 BLAKE2B 0ece108bba123a51a8c2340918e27871b9602672a71ef120740691c0e19ed1c27231adc2b542a3185227b42204be101025a517df27de95aae50ad6113edaee21 SHA512 554816fecf3e275839c5ad92c09fb8145e3131310bff060e3e58e61e11e00b0700831fcbeda792045a7616773eda87568b87e32c1cb13c92b2cc1361678095a3 +MISC metadata.xml 934 BLAKE2B ffffcceb822cadfd48ff18063acd7adfeba6b651099c91f14159b2af4486b1475578da54865d99ef0acc78e34bfc3b1e7e6bca1d179ab7f151417c53c1a05a35 SHA512 97fffbdf402a70c9cb84062ac6c906b8a9d35ceebbe35b28547387e4a9e2706c595f842f64bee92925415bd49593f3a3b0213072ff2c0ab22209dc37e243d4ac diff --git a/x11-base/xorg-server/files/xdm-setup.initd-1 b/x11-base/xorg-server/files/xdm-setup.initd-1 new file mode 100644 index 0000000..8f2ed27 --- /dev/null +++ b/x11-base/xorg-server/files/xdm-setup.initd-1 @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount +} + +start() { + if get_bootparam "nox" ; then + touch /etc/.noxdm + fi +} diff --git a/x11-base/xorg-server/files/xdm.confd-4 b/x11-base/xorg-server/files/xdm.confd-4 new file mode 100644 index 0000000..880d463 --- /dev/null +++ b/x11-base/xorg-server/files/xdm.confd-4 @@ -0,0 +1,10 @@ +# We always try and start X on a static VT. The various DMs normally default +# to using VT7. If you wish to use the xdm init script, then you should ensure +# that the VT checked is the same VT your DM wants to use. We do this check to +# ensure that you haven't accidentally configured something to run on the VT +# in your /etc/inittab file so that you don't get a dead keyboard. +CHECKVT=7 + +# What display manager do you use ? [ xdm | gdm | sddm | gpe | lightdm | entrance ] +# NOTE: If this is set in /etc/rc.conf, that setting will override this one. +DISPLAYMANAGER="xdm" diff --git a/x11-base/xorg-server/files/xdm.initd-11 b/x11-base/xorg-server/files/xdm.initd-11 new file mode 100644 index 0000000..c9ec367 --- /dev/null +++ b/x11-base/xorg-server/files/xdm.initd-11 @@ -0,0 +1,230 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +# This is here to serve as a note to myself, and future developers. +# +# Any Display manager (gdm,kdm,xdm) has the following problem: if +# it is started before any getty, and no vt is specified, it will +# usually run on vt2. When the getty on vt2 then starts, and the +# DM is already started, the getty will take control of the keyboard, +# leaving us with a "dead" keyboard. +# +# Resolution: add the following line to /etc/inittab +# +# x:a:once:/etc/X11/startDM.sh +# +# and have /etc/X11/startDM.sh start the DM in daemon mode if +# a lock is present (with the info of what DM should be started), +# else just fall through. +# +# How this basically works, is the "a" runlevel is a additional +# runlevel that you can use to fork processes with init, but the +# runlevel never gets changed to this runlevel. Along with the "a" +# runlevel, the "once" key word means that startDM.sh will only be +# run when we specify it to run, thus eliminating respawning +# startDM.sh when "xdm" is not added to the default runlevel, as was +# done previously. +# +# This script then just calls "telinit a", and init will run +# /etc/X11/startDM.sh after the current runlevel completes (this +# script should only be added to the actual runlevel the user is +# using). +# +# Martin Schlemmer +# aka Azarah +# 04 March 2002 + +depend() { + need localmount xdm-setup + + # this should start as early as possible + # we can't do 'before *' as that breaks it + # (#139824) Start after ypbind and autofs for network authentication + # (#145219 #180163) Could use lirc mouse as input device + # (#70689 comment #92) Start after consolefont to avoid display corruption + # (#291269) Start after quota, since some dm need readable home + # (#390609) gdm-3 will fail when dbus is not running + # (#366753) starting keymaps after X causes problems + after bootmisc consolefont modules netmount + after readahead-list ypbind autofs openvpn gpm lircmd + after quota keymaps + before alsasound + + # Start before X + use consolekit dbus xfs +} + +setup_dm() { + local MY_XDM + + MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]') + + # Load our root path from profile.env + # Needed for kdm + PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}") + + NAME= + case "${MY_XDM}" in + kdm|kde) + EXE=/usr/bin/kdm + PIDFILE=/run/kdm.pid + ;; + entrance*) + EXE=/usr/sbin/entrance + PIDFILE=/run/entrance.pid + ;; + gdm|gnome) + # gdm-3 and above has different paths + if [ -f /usr/sbin/gdm ]; then + EXE=/usr/sbin/gdm + PIDFILE=/run/gdm/gdm.pid + START_STOP_ARGS="--background" + AUTOCLEAN_CGROUP="yes" + else + EXE=/usr/bin/gdm + PIDFILE=/run/gdm.pid + fi + [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary + ;; + wdm) + EXE=/usr/bin/wdm + PIDFILE= + ;; + gpe) + EXE=/usr/bin/gpe-dm + PIDFILE=/run/gpe-dm.pid + ;; + lxdm) + EXE=/usr/sbin/lxdm-binary + PIDFILE=/run/lxdm.pid + START_STOP_ARGS="--background" + ;; + lightdm) + EXE=/usr/sbin/lightdm + PIDFILE=/run/lightdm.pid + START_STOP_ARGS="--background" + ;; + sddm) + EXE="/usr/bin/sddm" + START_STOP_ARGS="-m --background" + PIDFILE=/run/sddm.pid + ;; + *) + # first find out if there is such executable + EXE="$(command -v ${MY_XDM} 2>/dev/null)" + PIDFILE="/run/${MY_XDM}.pid" + + # warn user that he is doing sick things if the exe was not found + if [ -z "${EXE}" ]; then + echo "ERROR: Your XDM value is invalid." + echo " No ${MY_XDM} executable could be found on your system." + fi + ;; + esac + + if ! [ -x "${EXE}" ]; then + EXE=/usr/bin/xdm + PIDFILE=/run/xdm.pid + if ! [ -x "/usr/bin/xdm" ]; then + echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm," + echo " or install x11-apps/xdm package" + eend 255 + fi + fi +} + +# Check to see if something is defined on our VT +vtstatic() { + if [ -e /etc/inittab ] ; then + grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab + elif [ -e /etc/ttys ] ; then + grep -q "^ttyv$(($1 - 1))" /etc/ttys + else + return 1 + fi +} + +start() { + local EXE NAME PIDFILE AUTOCLEAN_CGROUP + setup_dm + + if [ -f /etc/.noxdm ]; then + einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed." + rm /etc/.noxdm + return 0 + fi + + ebegin "Setting up ${EXE##*/}" + + # save the prefered DM + save_options "service" "${EXE}" + save_options "name" "${NAME}" + save_options "pidfile" "${PIDFILE}" + save_options "start_stop_args" "${START_STOP_ARGS}" + save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}" + + if [ -n "${CHECKVT-y}" ] ; then + if vtstatic "${CHECKVT:-7}" ; then + if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then + ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later" + telinit a >/dev/null 2>&1 + return 0 + else + eerror "Something is already defined on VT ${CHECKVT:-7}, not starting" + return 1 + fi + fi + fi + + /etc/X11/startDM.sh + eend 0 +} + +stop() { + local curvt retval + + retval=0 + if [ -t 0 ]; then + if type fgconsole >/dev/null 2>&1; then + curvt=$(fgconsole 2>/dev/null) + else + curvt=$(tty) + case "${curvt}" in + /dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;; + *) curvt= ;; + esac + fi + fi + local myexe myname mypidfile myservice + myexe=$(get_options "service") + myname=$(get_options "name") + mypidfile=$(get_options "pidfile") + myservice=${myexe##*/} + yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup") + + [ -z "${myexe}" ] && return 0 + + ebegin "Stopping ${myservice}" + + if start-stop-daemon --quiet --test --stop --exec "${myexe}"; then + start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \ + ${mypidfile:+--pidfile} ${mypidfile} \ + ${myname:+--name} ${myname} + retval=${?} + fi + + # switch back to original vt + if [ -n "${curvt}" ]; then + if type chvt >/dev/null 2>&1; then + chvt "${curvt}" + else + vidcontrol -s "$((curvt + 1))" + fi + fi + + eend ${retval} "Error stopping ${myservice}" + return ${retval} +} + +# vim: set ts=4 : diff --git a/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch new file mode 100644 index 0000000..57c7349 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch @@ -0,0 +1,53 @@ +diff -u13 -r xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c xorg-server-1.12.3/hw/xfree86/loader/loadmod.c +--- xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c 2012-09-05 18:26:42.000000000 +0200 ++++ xorg-server-1.12.3/hw/xfree86/loader/loadmod.c 2012-09-05 18:28:54.000000000 +0200 +@@ -1109,39 +1109,38 @@ + static void + RemoveChild(ModuleDescPtr child) + { + ModuleDescPtr mdp; + ModuleDescPtr prevsib; + ModuleDescPtr parent; + + if (!child->parent) + return; + + parent = child->parent; + if (parent->child == child) { + parent->child = child->sib; +- return; +- } +- +- prevsib = parent->child; +- mdp = prevsib->sib; +- while (mdp && mdp != child) { +- prevsib = mdp; +- mdp = mdp->sib; ++ } ++ else { ++ prevsib = parent->child; ++ mdp = prevsib->sib; ++ while (mdp && mdp != child) { ++ prevsib = mdp; ++ mdp = mdp->sib; ++ } ++ if (mdp == child) ++ prevsib->sib = child->sib; + } +- if (mdp == child) +- prevsib->sib = child->sib; + child->sib = NULL; +- return; + } + + void + LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) + { + const char *msg; + MessageType type = X_ERROR; + + switch (errmaj) { + case LDR_NOERROR: + msg = "no error"; + break; + case LDR_NOMEM: diff --git a/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch b/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch new file mode 100644 index 0000000..0a61145 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch @@ -0,0 +1,53 @@ +See http://lists.x.org/archives/xorg-devel/2015-February/045755.html + +diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c +index 849bf92..5cc3ec7 100644 +--- a/hw/xfree86/parser/Files.c ++++ b/hw/xfree86/parser/Files.c +@@ -76,14 +76,18 @@ static xf86ConfigSymTabRec FilesTab[] = { + #define CLEANUP xf86freeFiles + + XF86ConfFilesPtr +-xf86parseFilesSection(void) ++xf86parseFilesSection(XF86ConfFilesPtr ptr) + { + int i, j; + int k, l; + char *str; + int token; + +- parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) ++ if (!ptr) { ++ if( (ptr=calloc(1,sizeof(XF86ConfFilesRec))) == NULL ) { ++ return NULL; ++ } ++ } + + while ((token = xf86getToken(FilesTab)) != ENDSECTION) { + switch (token) { +diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h +index 171f8e8..e8199fe 100644 +--- a/hw/xfree86/parser/configProcs.h ++++ b/hw/xfree86/parser/configProcs.h +@@ -36,7 +36,7 @@ void xf86freeDeviceList(XF86ConfDevicePtr ptr); + int xf86validateDevice(XF86ConfigPtr p); + + /* Files.c */ +-XF86ConfFilesPtr xf86parseFilesSection(void); ++XF86ConfFilesPtr xf86parseFilesSection(XF86ConfFilesPtr ptr); + void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); + void xf86freeFiles(XF86ConfFilesPtr p); + +diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c +index 327c02a..e0d6139 100644 +--- a/hw/xfree86/parser/read.c ++++ b/hw/xfree86/parser/read.c +@@ -110,7 +110,7 @@ xf86readConfigFile(void) + if (xf86nameCompare(xf86_lex_val.str, "files") == 0) { + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; +- HANDLE_RETURN(conf_files, xf86parseFilesSection()); ++ HANDLE_RETURN(conf_files, xf86parseFilesSection(ptr->conf_files)); + } + else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) { + free(xf86_lex_val.str); diff --git a/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch b/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch new file mode 100644 index 0000000..8a3cb76 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch @@ -0,0 +1,36 @@ +From 7d097c0c38ab82115a1e56489bfe09f9f01b24de Mon Sep 17 00:00:00 2001 +From: Mart Raudsepp <leio@gentoo.org> +Date: Wed, 11 Oct 2017 16:11:49 +0300 +Subject: [PATCH] config/udev: Add sys/sysmacros.h include for major/minor + functions for new glibc + +Commits d732c36597fa and 84e3b96b5313 added the include to some files, but +missed config/udev.c, where the major and minor functions are used as well. +This should be Linux-only, so we don't need the sys/mkdev.h case here for +Solaris. + +Signed-off-by: Mart Raudsepp <leio@gentoo.org> +--- +https://bugs.gentoo.org/633530 +https://patchwork.freedesktop.org/patch/181800/ + + config/udev.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/config/udev.c b/config/udev.c +index 932f230..b3b8d0f 100644 +--- a/config/udev.c ++++ b/config/udev.c +@@ -30,6 +30,9 @@ + #include <libudev.h> + #include <ctype.h> + #include <unistd.h> ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + + #include "input.h" + #include "inputstr.h" +-- +2.10.2 + diff --git a/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch new file mode 100644 index 0000000..d7e5e51 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch @@ -0,0 +1,39 @@ +From c2954b16c8730c7ed8441fd8dba25900f3aed265 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tapani=20P=C3=A4lli?= <tapani.palli@intel.com> +Date: Tue, 28 Nov 2017 09:23:29 +0200 +Subject: [PATCH] glx: do not pick sRGB config for 32-bit RGBA visual +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes blending issues seen with kwin and gnome-shell when +32bit visual has sRGB capability set. + +Reviewed-by: Adam Jackson <ajax@redhat.com> +Signed-off-by: Tapani Pälli <tapani.palli@intel.com> +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699 +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646 +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655 +--- + glx/glxscreens.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/glx/glxscreens.c b/glx/glxscreens.c +index 73444152a..596d972e0 100644 +--- a/glx/glxscreens.c ++++ b/glx/glxscreens.c +@@ -271,6 +271,11 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual) + /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */ + if (visual->nplanes == 32 && config->rgbBits != 32) + continue; ++ /* If it's the 32-bit RGBA visual, do not pick sRGB capable config. ++ * This can cause issues with compositors that are not sRGB aware. ++ */ ++ if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE) ++ continue; + /* Can't use the same FBconfig for multiple X visuals. I think. */ + if (config->visualID != 0) + continue; +-- +2.17.0 + diff --git a/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch b/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch new file mode 100644 index 0000000..ebf677a --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch @@ -0,0 +1,224 @@ +From eecedfffd40f0465d85347f14547ddc6b30e57df Mon Sep 17 00:00:00 2001 +From: Matt Turner <mattst88@gmail.com> +Date: Tue, 22 May 2018 21:10:55 -0700 +Subject: [PATCH xserver] xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on + alpha + +In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we +somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the +function pointer indirection was intended to support dense vs sparse and +sparse support is now gone, we can just make the functions static inline +in compiler.h and avoid all of this. + +Bugzilla: https://bugs.gentoo.org/548906 +Tested-by: Christopher May-Townsend <chris@maytownsend.co.uk> +Reviewed-by: Adam Jackson <ajax@redhat.com> +Signed-off-by: Matt Turner <mattst88@gmail.com> +--- + configure.ac | 4 -- + hw/xfree86/common/compiler.h | 67 ++++++++++++++++++++++++--------- + hw/xfree86/os-support/bsd/Makefile.am | 3 +- + hw/xfree86/os-support/linux/Makefile.am | 12 ------ + hw/xfree86/os-support/linux/lnx_video.c | 27 ------------- + hw/xfree86/os-support/meson.build | 1 - + 6 files changed, 50 insertions(+), 64 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ddc47faa2..0075b6ace 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1908,9 +1908,6 @@ if test "x$XORG" = xyes; then + XORG_OS_SUBDIR="linux" + linux_acpi="no" + case $host_cpu in +- alpha*) +- linux_alpha=yes +- ;; + i*86|amd64*|x86_64*|ia64*) + linux_acpi=$enable_linux_acpi + ;; +@@ -2075,7 +2072,6 @@ AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) + AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) + AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) + AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) +-AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) + AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) + AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes]) + AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) +diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h +index eea29dfb5..7144c6a27 100644 +--- a/hw/xfree86/common/compiler.h ++++ b/hw/xfree86/common/compiler.h +@@ -986,33 +986,64 @@ inl(unsigned PORT_SIZE port) + #endif + + #ifdef __alpha__ +-/* entry points for Mmio memory access routines */ +-extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long); +-extern _X_EXPORT int (*xf86ReadMmio16) (void *, unsigned long); +-extern _X_EXPORT int (*xf86ReadMmio32) (void *, unsigned long); +-extern _X_EXPORT void (*xf86WriteMmio8) (int, void *, unsigned long); +-extern _X_EXPORT void (*xf86WriteMmio16) (int, void *, unsigned long); +-extern _X_EXPORT void (*xf86WriteMmio32) (int, void *, unsigned long); ++static inline int ++xf86ReadMmio8(void *Base, unsigned long Offset) ++{ ++ mem_barrier(); ++ return *(CARD8 *) ((unsigned long) Base + (Offset)); ++} ++ ++static inline int ++xf86ReadMmio16(void *Base, unsigned long Offset) ++{ ++ mem_barrier(); ++ return *(CARD16 *) ((unsigned long) Base + (Offset)); ++} ++ ++static inline int ++xf86ReadMmio32(void *Base, unsigned long Offset) ++{ ++ mem_barrier(); ++ return *(CARD32 *) ((unsigned long) Base + (Offset)); ++} ++ ++static inline void ++xf86WriteMmio8(int Value, void *Base, unsigned long Offset) ++{ ++ write_mem_barrier(); ++ *(CARD8 *) ((unsigned long) Base + (Offset)) = Value; ++} ++ ++static inline void ++xf86WriteMmio16(int Value, void *Base, unsigned long Offset) ++{ ++ write_mem_barrier(); ++ *(CARD16 *) ((unsigned long) Base + (Offset)) = Value; ++} ++ ++static inline void ++xf86WriteMmio32(int Value, void *Base, unsigned long Offset) ++{ ++ write_mem_barrier(); ++ *(CARD32 *) ((unsigned long) Base + (Offset)) = Value; ++} ++ + extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, + int); + extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); + + /* Some macros to hide the system dependencies for MMIO accesses */ + /* Changed to kill noise generated by gcc's -Wcast-align */ +-#define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset) +-#define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset) +-#define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset) +- +-#define MMIO_OUT32(base, offset, val) \ +- do { \ +- write_mem_barrier(); \ +- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ +- } while (0) ++#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) ++#define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) ++#define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) + + #define MMIO_OUT8(base, offset, val) \ +- (*xf86WriteMmio8)((CARD8)(val), base, offset) ++ xf86WriteMmio8((CARD8)(val), base, offset) + #define MMIO_OUT16(base, offset, val) \ +- (*xf86WriteMmio16)((CARD16)(val), base, offset) ++ xf86WriteMmio16((CARD16)(val), base, offset) ++#define MMIO_OUT32(base, offset, val) \ ++ xf86WriteMmio32((CARD32)(val), base, offset) + + #elif defined(__powerpc__) || defined(__sparc__) + /* +diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am +index b01ea5bca..66ac83805 100644 +--- a/hw/xfree86/os-support/bsd/Makefile.am ++++ b/hw/xfree86/os-support/bsd/Makefile.am +@@ -26,8 +26,7 @@ endif + if ALPHA_VIDEO + # Cheat here and piggyback other alpha bits on ALPHA_VIDEO. + ARCH_SOURCES = \ +- alpha_video.c \ +- bsd_ev56.c ++ alpha_video.c + endif + + if ARM_VIDEO +diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am +index 26e40bb93..9b4535b53 100644 +--- a/hw/xfree86/os-support/linux/Makefile.am ++++ b/hw/xfree86/os-support/linux/Makefile.am +@@ -1,13 +1,5 @@ + noinst_LTLIBRARIES = liblinux.la + +-if LINUX_ALPHA +-noinst_LTLIBRARIES += liblinuxev56.la +- +-liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56 +- +-liblinuxev56_la_SOURCES = lnx_ev56.c +-endif +- + if LNXACPI + ACPI_SRCS = lnx_acpi.c + if !LNXAPM +@@ -39,7 +31,3 @@ liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ + AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) + + AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) +- +-if LINUX_ALPHA +-liblinux_la_LIBADD = liblinuxev56.la +-endif +diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c +index c09d71947..04e45092a 100644 +--- a/hw/xfree86/os-support/linux/lnx_video.c ++++ b/hw/xfree86/os-support/linux/lnx_video.c +@@ -166,30 +166,3 @@ xf86DisableIO(void) + + ExtendedEnabled = FALSE; + } +- +-#if defined (__alpha__) +- +-extern int readDense8(void *Base, register unsigned long Offset); +-extern int readDense16(void *Base, register unsigned long Offset); +-extern int readDense32(void *Base, register unsigned long Offset); +-extern void +- writeDense8(int Value, void *Base, register unsigned long Offset); +-extern void +- writeDense16(int Value, void *Base, register unsigned long Offset); +-extern void +- writeDense32(int Value, void *Base, register unsigned long Offset); +- +-void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) +- = writeDense8; +-void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) +- = writeDense16; +-void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) +- = writeDense32; +-int (*xf86ReadMmio8) (void *Base, unsigned long Offset) +- = readDense8; +-int (*xf86ReadMmio16) (void *Base, unsigned long Offset) +- = readDense16; +-int (*xf86ReadMmio32) (void *Base, unsigned long Offset) +- = readDense32; +- +-#endif /* __alpha__ */ +diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build +index 901422786..b6e5c975d 100644 +--- a/hw/xfree86/os-support/meson.build ++++ b/hw/xfree86/os-support/meson.build +@@ -100,7 +100,6 @@ elif host_machine.system().endswith('bsd') + srcs_xorg_os_support += 'shared/ioperm_noop.c' + elif host_machine.cpu_family() == 'alpha' + srcs_xorg_os_support += 'bsd/alpha_video.c' +- srcs_xorg_os_support += 'bsd/bsd_ev56.c' + endif + + if host_machine.system() == 'freebsd' +-- +2.16.1 + diff --git a/x11-base/xorg-server/files/xorg-sets.conf b/x11-base/xorg-server/files/xorg-sets.conf new file mode 100644 index 0000000..5cd8112 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-sets.conf @@ -0,0 +1,6 @@ +# Rebuild all X11 modules (mostly useful after xorg-server ABI change). +[x11-module-rebuild] +class = portage.sets.dbapi.VariableSet +world-candidate = false +variable = CATEGORY +includes = x11-drivers diff --git a/x11-base/xorg-server/metadata.xml b/x11-base/xorg-server/metadata.xml new file mode 100644 index 0000000..8c8c243 --- /dev/null +++ b/x11-base/xorg-server/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>x11@gentoo.org</email> + <name>X11</name> +</maintainer> +<use> + <flag name="dmx">Build the Distributed Multiheaded X server</flag> + <flag name="glamor">Enable Glamor OpenGL 2D acceleration</flag> + <flag name="kdrive">Build the kdrive X servers</flag> + <flag name="tslib">Build with tslib support for touchscreen devices</flag> + <flag name="unwind">Enable libunwind usage for backtraces</flag> + <flag name="xcsecurity">Build Security extension</flag> + <flag name="xnest">Build the Xnest server</flag> + <flag name="xephyr">Build the Xephyr server</flag> + <flag name="xorg">Build the Xorg X server (HIGHLY RECOMMENDED)</flag> + <flag name="xvfb">Build the Xvfb server</flag> +</use> +<upstream> + <remote-id type="cpe">cpe:/a:x.org:xorg-server</remote-id> +</upstream> +</pkgmetadata> diff --git a/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild new file mode 100644 index 0000000..5e59d2a --- /dev/null +++ b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_DOC=doc +inherit xorg-2 multilib versionator flag-o-matic +EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git" + +DESCRIPTION="X.Org X servers" +SLOT="0/${PV}" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" + +IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb" +IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux +suid systemd tslib +udev unwind xcsecurity" + +CDEPEND=">=app-eselect/eselect-opengl-1.3.0 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=x11-apps/iceauth-1.0.2 + >=x11-apps/rgb-1.0.3 + >=x11-apps/xauth-1.0.3 + x11-apps/xkbcomp + >=x11-libs/libdrm-2.4.46 + >=x11-libs/libpciaccess-0.12.901 + >=x11-libs/libXau-1.0.4 + >=x11-libs/libXdmcp-1.0.2 + >=x11-libs/libXfont2-2.0.1 + >=x11-libs/libxkbfile-1.0.4 + >=x11-libs/libxshmfence-1.1 + >=x11-libs/pixman-0.27.2 + >=x11-libs/xtrans-1.3.5 + >=x11-misc/xbitmaps-1.0.1 + >=x11-misc/xkeyboard-config-2.4.1-r3 + dmx? ( + x11-libs/libXt + >=x11-libs/libdmx-1.0.99.1 + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXaw-1.0.4 + >=x11-libs/libXext-1.0.99.4 + >=x11-libs/libXfixes-5.0 + >=x11-libs/libXi-1.2.99.1 + >=x11-libs/libXmu-1.0.3 + x11-libs/libXrender + >=x11-libs/libXres-1.0.3 + >=x11-libs/libXtst-1.0.99.2 + ) + glamor? ( + media-libs/libepoxy[X] + >=media-libs/mesa-10.3.4-r1[egl,gbm] + !x11-libs/glamor + ) + kdrive? ( + >=x11-libs/libXext-1.0.5 + x11-libs/libXv + ) + xephyr? ( + x11-libs/libxcb[xkb] + x11-libs/xcb-util + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) + !minimal? ( + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXext-1.0.5 + >=media-libs/mesa-10.3.4-r1 + ) + tslib? ( >=x11-libs/tslib-1.0 ) + udev? ( >=virtual/udev-150 ) + unwind? ( sys-libs/libunwind ) + wayland? ( + >=dev-libs/wayland-1.3.0 + media-libs/libepoxy + >=dev-libs/wayland-protocols-1.1 + ) + >=x11-apps/xinit-1.3.3-r1 + systemd? ( + sys-apps/dbus + sys-apps/systemd + )" + +DEPEND="${CDEPEND} + sys-devel/flex + x11-base/xorg-proto + dmx? ( + doc? ( + || ( + www-client/links + www-client/lynx + www-client/w3m + ) + ) + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-xserver ) + !x11-drivers/xf86-video-modesetting +" + +PDEPEND=" + xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" + +REQUIRED_USE="!minimal? ( + || ( ${IUSE_SERVERS} ) + ) + xephyr? ( kdrive )" + +#UPSTREAMED_PATCHES=( +# "${WORKDIR}/patches/" +#) + +PATCHES=( + "${UPSTREAMED_PATCHES[@]}" + "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch + # needed for new eselect-opengl, bug #541232 + "${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch + "${FILESDIR}"/${PN}-1.19.4-sysmacros.patch #633530 + "${FILESDIR}"/${PN}-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch #653688 +) + +pkg_pretend() { + # older gcc is not supported + [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 ]] && \ + die "Sorry, but gcc earlier than 4.0 will not work for xorg-server." +} + +pkg_setup() { + if use wayland && ! use glamor; then + ewarn "glamor is necessary for acceleration under Xwayland." + ewarn "Performance may be unacceptable without it." + fi +} + +src_configure() { + # localstatedir is used for the log location; we need to override the default + # from ebuild.sh + # sysconfdir is used for the xorg.conf location; same applies + # NOTE: fop is used for doc generating; and I have no idea if Gentoo + # package it somewhere + XORG_CONFIGURE_OPTIONS=( + $(use_enable ipv6) + $(use_enable debug) + $(use_enable dmx) + $(use_enable glamor) + $(use_enable kdrive) + $(use_enable kdrive kdrive-kbd) + $(use_enable kdrive kdrive-mouse) + $(use_enable kdrive kdrive-evdev) + $(use_enable suid install-setuid) + $(use_enable tslib) + $(use_enable unwind libunwind) + $(use_enable wayland xwayland) + $(use_enable !minimal record) + $(use_enable !minimal xfree86-utils) + $(use_enable !minimal dri) + $(use_enable !minimal dri2) + $(use_enable !minimal glx) + $(use_enable xcsecurity) + $(use_enable xephyr) + $(use_enable xnest) + $(use_enable xorg) + $(use_enable xvfb) + $(use_enable udev config-udev) + $(use_with doc doxygen) + $(use_with doc xmlto) + $(use_with systemd systemd-daemon) + $(use_enable systemd systemd-logind) + --enable-libdrm + --sysconfdir="${EPREFIX}"/etc/X11 + --localstatedir="${EPREFIX}"/var + --with-fontrootdir="${EPREFIX}"/usr/share/fonts + --with-xkb-output="${EPREFIX}"/var/lib/xkb + --disable-config-hal + --disable-linux-acpi + --without-dtrace + --without-fop + --with-os-vendor=Gentoo + --with-sha1=libcrypto + ) + + xorg-2_src_configure +} + +src_install() { + xorg-2_src_install + + server_based_install + + if ! use minimal && use xorg; then + # Install xorg.conf.example into docs + dodoc "${AUTOTOOLS_BUILD_DIR}"/hw/xfree86/xorg.conf.example + fi + + newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup + newinitd "${FILESDIR}"/xdm.initd-11 xdm + newconfd "${FILESDIR}"/xdm.confd-4 xdm + + # install the @x11-module-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/xorg-sets.conf xorg.conf +} + +pkg_postinst() { + # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) + eselect opengl set xorg-x11 --use-old +} + +pkg_postrm() { + # Get rid of module dir to ensure opengl-update works properly + if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then + rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules + fi +} + +server_based_install() { + if ! use xorg; then + rm "${ED}"/usr/share/man/man1/Xserver.1x \ + "${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \ + "${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \ + "${ED}"/usr/share/man/man1/Xserver.1x + fi +} diff --git a/x11-base/xorg-server/xorg-server-1.20.0.ebuild b/x11-base/xorg-server/xorg-server-1.20.0.ebuild new file mode 100644 index 0000000..0fa84f2 --- /dev/null +++ b/x11-base/xorg-server/xorg-server-1.20.0.ebuild @@ -0,0 +1,221 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_EAUTORECONF=yes +XORG_DOC=doc +inherit xorg-2 multilib versionator flag-o-matic +EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git" + +DESCRIPTION="X.Org X servers" +SLOT="0/${PV}" +if [[ ${PV} != 9999* ]]; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +fi + +IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb" +IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux systemd +udev unwind xcsecurity" + +CDEPEND=">=app-eselect/eselect-opengl-1.3.0 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=x11-apps/iceauth-1.0.2 + >=x11-apps/rgb-1.0.3 + >=x11-apps/xauth-1.0.3 + x11-apps/xkbcomp + >=x11-libs/libdrm-2.4.89 + >=x11-libs/libpciaccess-0.12.901 + >=x11-libs/libXau-1.0.4 + >=x11-libs/libXdmcp-1.0.2 + >=x11-libs/libXfont2-2.0.1 + >=x11-libs/libxkbfile-1.0.4 + >=x11-libs/libxshmfence-1.1 + >=x11-libs/pixman-0.27.2 + >=x11-libs/xtrans-1.3.5 + >=x11-misc/xbitmaps-1.0.1 + >=x11-misc/xkeyboard-config-2.4.1-r3 + dmx? ( + x11-libs/libXt + >=x11-libs/libdmx-1.0.99.1 + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXaw-1.0.4 + >=x11-libs/libXext-1.0.99.4 + >=x11-libs/libXfixes-5.0 + >=x11-libs/libXi-1.2.99.1 + >=x11-libs/libXmu-1.0.3 + x11-libs/libXrender + >=x11-libs/libXres-1.0.3 + >=x11-libs/libXtst-1.0.99.2 + ) + glamor? ( + media-libs/libepoxy[X] + >=media-libs/mesa-10.3.4-r1[egl,gbm] + !x11-libs/glamor + ) + kdrive? ( + >=x11-libs/libXext-1.0.5 + x11-libs/libXv + ) + xephyr? ( + x11-libs/libxcb[xkb] + x11-libs/xcb-util + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) + !minimal? ( + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXext-1.0.5 + >=media-libs/mesa-10.3.4-r1 + ) + udev? ( virtual/libudev:= ) + unwind? ( sys-libs/libunwind ) + wayland? ( + >=dev-libs/wayland-1.3.0 + media-libs/libepoxy + >=dev-libs/wayland-protocols-1.1 + ) + >=x11-apps/xinit-1.3.3-r1 + systemd? ( + sys-apps/dbus + sys-apps/systemd + )" + +DEPEND="${CDEPEND} + sys-devel/flex + >=x11-base/xorg-proto-2018.3 + dmx? ( + doc? ( + || ( + www-client/links + www-client/lynx + www-client/w3m + ) + ) + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-xserver ) + !x11-drivers/xf86-video-modesetting +" + +PDEPEND=" + xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" + +REQUIRED_USE="!minimal? ( + || ( ${IUSE_SERVERS} ) + ) + xephyr? ( kdrive )" + +UPSTREAMED_PATCHES=( + "${FILESDIR}"/${P}-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch +) + +PATCHES=( + "${UPSTREAMED_PATCHES[@]}" + "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch + # needed for new eselect-opengl, bug #541232 + "${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch +) + +pkg_pretend() { + # older gcc is not supported + [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 ]] && \ + die "Sorry, but gcc earlier than 4.0 will not work for xorg-server." +} + +pkg_setup() { + if use wayland && ! use glamor; then + ewarn "glamor is necessary for acceleration under Xwayland." + ewarn "Performance may be unacceptable without it." + fi +} + +src_configure() { + # localstatedir is used for the log location; we need to override the default + # from ebuild.sh + # sysconfdir is used for the xorg.conf location; same applies + # NOTE: fop is used for doc generating; and I have no idea if Gentoo + # package it somewhere + XORG_CONFIGURE_OPTIONS=( + $(use_enable ipv6) + $(use_enable debug) + $(use_enable dmx) + $(use_enable glamor) + $(use_enable kdrive) + $(use_enable unwind libunwind) + $(use_enable wayland xwayland) + $(use_enable !minimal record) + $(use_enable !minimal xfree86-utils) + $(use_enable !minimal dri) + $(use_enable !minimal dri2) + $(use_enable !minimal glx) + $(use_enable xcsecurity) + $(use_enable xephyr) + $(use_enable xnest) + $(use_enable xorg) + $(use_enable xvfb) + $(use_enable udev config-udev) + $(use_with doc doxygen) + $(use_with doc xmlto) + $(use_with systemd systemd-daemon) + $(use_enable systemd systemd-logind) + $(use_enable systemd suid-wrapper) + $(use_enable !systemd install-setuid) + --enable-libdrm + --sysconfdir="${EPREFIX}"/etc/X11 + --localstatedir="${EPREFIX}"/var + --with-fontrootdir="${EPREFIX}"/usr/share/fonts + --with-xkb-output="${EPREFIX}"/var/lib/xkb + --disable-config-hal + --disable-linux-acpi + --without-dtrace + --without-fop + --with-os-vendor=Gentoo + --with-sha1=libcrypto + ) + + xorg-2_src_configure +} + +src_install() { + xorg-2_src_install + + server_based_install + + if ! use minimal && use xorg; then + # Install xorg.conf.example into docs + dodoc "${AUTOTOOLS_BUILD_DIR}"/hw/xfree86/xorg.conf.example + fi + + newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup + newinitd "${FILESDIR}"/xdm.initd-11 xdm + newconfd "${FILESDIR}"/xdm.confd-4 xdm + + # install the @x11-module-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/xorg-sets.conf xorg.conf +} + +pkg_postinst() { + # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) + eselect opengl set xorg-x11 --use-old +} + +pkg_postrm() { + # Get rid of module dir to ensure opengl-update works properly + if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then + rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules + fi +} + +server_based_install() { + if ! use xorg; then + rm "${ED}"/usr/share/man/man1/Xserver.1x \ + "${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \ + "${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \ + "${ED}"/usr/share/man/man1/Xserver.1x + fi +} diff --git a/x11-base/xorg-server/xorg-server-9999.ebuild b/x11-base/xorg-server/xorg-server-9999.ebuild new file mode 100644 index 0000000..3daddd8 --- /dev/null +++ b/x11-base/xorg-server/xorg-server-9999.ebuild @@ -0,0 +1,220 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +XORG_DOC=doc +inherit xorg-2 multilib versionator flag-o-matic +EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git" + +DESCRIPTION="X.Org X servers" +SLOT="0/${PV}" +if [[ ${PV} != 9999* ]]; then + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" +fi + +IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb" +IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux systemd +udev unwind xcsecurity" + +CDEPEND=">=app-eselect/eselect-opengl-1.3.0 + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + >=x11-apps/iceauth-1.0.2 + >=x11-apps/rgb-1.0.3 + >=x11-apps/xauth-1.0.3 + x11-apps/xkbcomp + >=x11-libs/libdrm-2.4.89 + >=x11-libs/libpciaccess-0.12.901 + >=x11-libs/libXau-1.0.4 + >=x11-libs/libXdmcp-1.0.2 + >=x11-libs/libXfont2-2.0.1 + >=x11-libs/libxkbfile-1.0.4 + >=x11-libs/libxshmfence-1.1 + >=x11-libs/pixman-0.27.2 + >=x11-libs/xtrans-1.3.5 + >=x11-misc/xbitmaps-1.0.1 + >=x11-misc/xkeyboard-config-2.4.1-r3 + dmx? ( + x11-libs/libXt + >=x11-libs/libdmx-1.0.99.1 + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXaw-1.0.4 + >=x11-libs/libXext-1.0.99.4 + >=x11-libs/libXfixes-5.0 + >=x11-libs/libXi-1.2.99.1 + >=x11-libs/libXmu-1.0.3 + x11-libs/libXrender + >=x11-libs/libXres-1.0.3 + >=x11-libs/libXtst-1.0.99.2 + ) + glamor? ( + media-libs/libepoxy[X] + >=media-libs/mesa-10.3.4-r1[egl,gbm] + !x11-libs/glamor + ) + kdrive? ( + >=x11-libs/libXext-1.0.5 + x11-libs/libXv + ) + xephyr? ( + x11-libs/libxcb[xkb] + x11-libs/xcb-util + x11-libs/xcb-util-image + x11-libs/xcb-util-keysyms + x11-libs/xcb-util-renderutil + x11-libs/xcb-util-wm + ) + !minimal? ( + >=x11-libs/libX11-1.1.5 + >=x11-libs/libXext-1.0.5 + >=media-libs/mesa-10.3.4-r1 + ) + udev? ( virtual/libudev:= ) + unwind? ( sys-libs/libunwind ) + wayland? ( + >=dev-libs/wayland-1.3.0 + media-libs/libepoxy + >=dev-libs/wayland-protocols-1.1 + ) + >=x11-apps/xinit-1.3.3-r1 + systemd? ( + sys-apps/dbus + sys-apps/systemd + )" + +DEPEND="${CDEPEND} + sys-devel/flex + >=x11-base/xorg-proto-2018.3 + dmx? ( + doc? ( + || ( + www-client/links + www-client/lynx + www-client/w3m + ) + ) + )" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-xserver ) + !x11-drivers/xf86-video-modesetting +" + +PDEPEND=" + xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )" + +REQUIRED_USE="!minimal? ( + || ( ${IUSE_SERVERS} ) + ) + xephyr? ( kdrive )" + +#UPSTREAMED_PATCHES=( +# "${WORKDIR}/patches/" +#) + +PATCHES=( + "${UPSTREAMED_PATCHES[@]}" + "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch + # needed for new eselect-opengl, bug #541232 + "${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch +) + +pkg_pretend() { + # older gcc is not supported + [[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 ]] && \ + die "Sorry, but gcc earlier than 4.0 will not work for xorg-server." +} + +pkg_setup() { + if use wayland && ! use glamor; then + ewarn "glamor is necessary for acceleration under Xwayland." + ewarn "Performance may be unacceptable without it." + fi +} + +src_configure() { + # localstatedir is used for the log location; we need to override the default + # from ebuild.sh + # sysconfdir is used for the xorg.conf location; same applies + # NOTE: fop is used for doc generating; and I have no idea if Gentoo + # package it somewhere + XORG_CONFIGURE_OPTIONS=( + $(use_enable ipv6) + $(use_enable debug) + $(use_enable dmx) + $(use_enable glamor) + $(use_enable kdrive) + $(use_enable unwind libunwind) + $(use_enable wayland xwayland) + $(use_enable !minimal record) + $(use_enable !minimal xfree86-utils) + $(use_enable !minimal dri) + $(use_enable !minimal dri2) + $(use_enable !minimal glx) + $(use_enable xcsecurity) + $(use_enable xephyr) + $(use_enable xnest) + $(use_enable xorg) + $(use_enable xvfb) + $(use_enable udev config-udev) + $(use_with doc doxygen) + $(use_with doc xmlto) + $(use_with systemd systemd-daemon) + $(use_enable systemd systemd-logind) + $(use_enable systemd suid-wrapper) + $(use_enable !systemd install-setuid) + --enable-libdrm + --sysconfdir="${EPREFIX}"/etc/X11 + --localstatedir="${EPREFIX}"/var + --with-fontrootdir="${EPREFIX}"/usr/share/fonts + --with-xkb-output="${EPREFIX}"/var/lib/xkb + --disable-config-hal + --disable-linux-acpi + --without-dtrace + --without-fop + --with-os-vendor=Gentoo + --with-sha1=libcrypto + ) + + xorg-2_src_configure +} + +src_install() { + xorg-2_src_install + + server_based_install + + if ! use minimal && use xorg; then + # Install xorg.conf.example into docs + dodoc "${AUTOTOOLS_BUILD_DIR}"/hw/xfree86/xorg.conf.example + fi + + newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup + newinitd "${FILESDIR}"/xdm.initd-11 xdm + newconfd "${FILESDIR}"/xdm.confd-4 xdm + + # install the @x11-module-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/xorg-sets.conf xorg.conf +} + +pkg_postinst() { + # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) + eselect opengl set xorg-x11 --use-old +} + +pkg_postrm() { + # Get rid of module dir to ensure opengl-update works properly + if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then + rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules + fi +} + +server_based_install() { + if ! use xorg; then + rm "${ED}"/usr/share/man/man1/Xserver.1x \ + "${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \ + "${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \ + "${ED}"/usr/share/man/man1/Xserver.1x + fi +} |