code:
commit b770266fa9c3fab5374bdf109676e0b129ac4546
Author: Bryce Harrington <bryce@canonical.com>
Date:   Wed Apr 3 13:36:20 2013 -0700

    Don't bother probing -nv on linux.

    For linux this driver is long obsolete now.  It may have some relevance
    on non-linux systems.

diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index b2545be..73a662d 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -1220,8 +1220,9 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
         driverList[idx++] = "nvidia";
 #ifdef __linux__
         driverList[idx++] = "nouveau";
-#endif
+#else
         driverList[idx++] = "nv";
+#endif
         break;
     }
     case 0x1106:


code:
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index c790d50..a47c2d0 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -387,7 +387,7 @@ xf86platformProbeDev(DriverPtr drvp)
     Bool foundScreen = FALSE;
     GDevPtr *devList;
     const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList);
-    int i, j;
+    int i, j, flags;

     /* find the main device or any device specificed in xorg.conf */
     for (i = 0; i < numDevs; i++) {
@@ -415,7 +415,11 @@ xf86platformProbeDev(DriverPtr drvp)
         if (j == xf86_num_platform_devices)
              continue;

-        foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], 0);
+        flags = 0;
+        if (!devList[i]->active)
+            flags |= PLATFORM_PROBE_GPU_SCREEN;
+
+        foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], flags);
         if (!foundScreen)
             continue;
     }

repo_name: ayhanyalcinsoy/main


code:
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 92d0f6d..a33366a 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -234,7 +234,7 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num)
     XF86XVScreenPtr ScreenPriv;
     XvScreenPtr pxvs;

-    if (num <= 0 || noXvExtension)
+    if (num <= 0 || noXvExtension || pScreen->isGPU)
         return FALSE;

     if (Success != XvScreenInit(pScreen))
diff --git a/hw/xfree86/common/xf86xvmc.c b/hw/xfree86/common/xf86xvmc.c
index 78a32bf..a0f6fcd 100644
--- a/hw/xfree86/common/xf86xvmc.c
+++ b/hw/xfree86/common/xf86xvmc.c
@@ -148,11 +148,15 @@ xf86XvMCScreenInit(ScreenPtr pScreen,
 {
     XvMCAdaptorPtr pAdapt;
     xf86XvMCScreenPtr pScreenPriv;
-    XvScreenPtr pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
-                                                      XF86XvScreenKey);
+    XvScreenPtr pxvs;
     int i, j;

-    if (noXvExtension)
+    if (noXvExtension || pScreen->isGPU || !XF86XvScreenKey)
+        return FALSE;
+
+    pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates,
+                                          XF86XvScreenKey);
+    if (!pxvs)
         return FALSE;

     if (!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors)))


code:
#!/bin/sh

ROOT=$1
test -d "$ROOT" || exit 1

eval "$(xprop -root -notype 8s "=1; RULES=\$0; MODEL=\$1; LAYOUT=\$2; VARIANT=\$3; OPTIONS=\$4" _XKB_RULES_NAMES)"

test -z "$_XKB_RULES_NAMES" && exit 1
test -z "$VARIANT" && COMMENT_VARIANT="#"
test -z "$OPTIONS" && COMMENT_OPTIONS="#"

cat << EOF > $ROOT/etc/X11/xorg.conf.d/00-configured-keymap.conf
# This file is generated by $0.
#
# If you want to override settings in this file, edit
# 10-keyboard.conf in the same directory.

Section "InputClass"
    Identifier      "Configured Keymap"
    MatchIsKeyboard "on"
    MatchTag        "use_configured_keymap"

    Option          "xkb_rules"     "$RULES"
    Option          "xkb_model"     "$MODEL"
    Option          "xkb_layout"    "$LAYOUT"
    ${COMMENT_VARIANT}Option          "xkb_variant"   "$VARIANT"
    ${COMMENT_OPTIONS}Option          "xkb_options"   "$OPTIONS"
EndSection
EOF


code:
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:


code:
Submitted By:            Armin K. <krejzi at email dot com>
Date:                    2012-12-30
Initial Package Version: 1.13.1
Upstream Status:         Not submitted.
Origin:                  Upstream mailing list.
Description:             Adds PRIME support to Xorg Server to make GPU offloading work.

--- xorg-server.orig/hw/xfree86/common/xf86Init.c	2012-10-14 01:38:50.000000000 +0200
+++ xorg-server/hw/xfree86/common/xf86Init.c	2012-12-01 19:51:53.249922134 +0100
@@ -361,6 +361,16 @@
     return ret;
 }

+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
+static void
+xf86AutoConfigOutputDevices(void)
+{
+    int i;
+
+    for (i = 0; i < xf86NumGPUScreens; i++)
+        xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
+}
+
 static void
 InstallSignalHandlers(void)
 {
@@ -927,6 +937,8 @@
     for (i = 0; i < xf86NumGPUScreens; i++)
         AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);

+    xf86AutoConfigOutputDevices();
+
     xf86VGAarbiterWrapFunctions();
     if (sigio_blocked)
         OsReleaseSIGIO();
--- xorg-server.orig/hw/xfree86/common/xf86platformBus.c	2012-11-02 05:17:59.000000000 +0100
+++ xorg-server/hw/xfree86/common/xf86platformBus.c	2012-12-01 19:51:53.249922134 +0100
@@ -387,6 +387,8 @@
     return foundScreen;
 }

+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
+
 int
 xf86platformAddDevice(int index)
 {
@@ -446,6 +448,7 @@

    /* attach unbound to 0 protocol screen */
    AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+   xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);

    return 0;
 }
--- xorg-server.orig/hw/xfree86/modes/xf86Crtc.c	2012-10-14 01:38:50.000000000 +0200
+++ xorg-server/hw/xfree86/modes/xf86Crtc.c	2012-12-01 19:51:53.250922153 +0100
@@ -3258,3 +3258,31 @@
             crtc->x = crtc->y = 0;
         }
 }
+
+
+void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
+{
+    RRProviderPtr master_provider;
+    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master);
+    xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+    if (!config || !slave_config)
+        return;
+
+    master_provider = config->randr_provider;
+
+    if ((master->capabilities & RR_Capability_SinkOffload) &&
+        pScrn->capabilities & RR_Capability_SourceOffload) {
+            /* source offload */
+
+        DetachUnboundGPU(pScrn->pScreen);
+        AttachOffloadGPU(master->pScreen, pScrn->pScreen);
+        slave_config->randr_provider->offload_sink = master_provider;
+    } else if ((master->capabilities & RR_Capability_SourceOutput) &&
+               pScrn->capabilities & RR_Capability_SinkOutput) {
+        /* sink offload */
+        DetachUnboundGPU(pScrn->pScreen);
+        AttachOutputGPU(master->pScreen, pScrn->pScreen);
+        slave_config->randr_provider->output_source = master_provider;
+    }
+}


code:
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2014-08-18
Initial Package Version: 1.16.0
Upstream Status: Applied
Origin: Upstream
Description: Fixes bug in glamor.

From 3c0431b8911241552a15a43e4279c50658b50a18 Mon Sep 17 00:00:00 2001
From: Keith Packard <keithp@keithp.com>
Date: Wed, 16 Jul 2014 16:03:23 -0700
Subject: glamor: Fix temp picture coordinates in
 glamor_composite_clipped_region

To understand this patch, let's start at the protocol interface where
the relationship between the coordinate spaces is documented:

        static Bool
        _glamor_composite(CARD8 op,
                          PicturePtr source,
                          PicturePtr mask,
                          PicturePtr dest,
                          INT16 x_source,
                          INT16 y_source,
                          INT16 x_mask,
                          INT16 y_mask,
                          INT16 x_dest, INT16 y_dest,
                          CARD16 width, CARD16 height, Bool fallback)

The coordinates are passed to this function directly off the wire and
are all relative to their respective drawables. For Windows, this means
that they are relative to the upper left corner of the window, in
whatever pixmap that window is getting drawn to.

_glamor_composite calls miComputeCompositeRegion to construct a clipped
region to actually render to. In reality, miComputeCompositeRegion clips
only to the destination these days; source clip region based clipping
would have to respect the transform, which isn't really possible. The
returned region is relative to the screen in which dest lives; offset by
dest->drawable.x and dest->drawable.y.

What is important to realize here is that, because of clipping, the
composite region may not have the same position within the destination
drawable as x_dest, y_dest. The protocol coordinates now exist solely to
'pin' the three objects together.

        extents->x1,y1		Screen origin of clipped operation
        width,height            Extents of the clipped operation
        x_dest,y_dest		Unclipped destination-relative operation coordinate
        x_source,y_source	Unclipped source-relative operation coordinate
        x_mask,y_mask		Unclipped mask-relative operation coordinate

One thing we want to know is what the offset is from the original
operation origin to the clipped origin

        Destination drawable relative coordinates of the clipped operation:

               x_dest_clipped = extents->x1 - dest->drawable.x
               y_dest_clipped = extents->y1 - dest->drawable.y

        Offset from the original operation origin:

                x_off_clipped = x_dest_clipped - x_dest
                y_off_clipped = y_dest_clipped - y_dest

        Source drawable relative coordinates of the clipped operation:

                x_source_clipped = x_source + x_off_clipped;
                y_source_clipped = y_source + y_off_clipped;

        Mask drawable relative coordinates of the clipped operation:

                x_mask_clipped = x_source + x_off_clipped;
                y_mask_clipped = y_source + y_off_clipped;

This is where the original code fails -- it doesn't subtract the
destination drawable location when computing the distance that the
operation has been moved by clipping. Here's what it does when
constructing a temporary source picture:

        temp_src =
            glamor_convert_gradient_picture(screen, source,
                                            extent->x1 + x_source - x_dest,
                                            extent->y1 + y_source - y_dest,
                                            width, height);
        ...
        x_temp_src = -extent->x1 + x_dest;
        y_temp_src = -extent->y1 + y_dest;

glamor_convert_gradient_picture needs source drawable relative
coordinates, but that is not what it's getting; it's getting
screen-relative coordinates for the destination, adjusted by the
distance between the provided source and destination operation
coordinates. We want x_source_clipped and y_source_clipped:

        x_source_clipped = x_source + x_off_clipped
                         = x_source + x_dest_clipped - x_dest
                         = x_source + extents->x1 - dest->drawable.x - x_dest

x_temp_src/y_temp_src are supposed to be the coordinates of the original
operation translated to the temporary picture:

        x_temp_src = x_source - x_source_clipped;
        y_temp_src = y_source - y_source_clipped;

Note that x_source_clipped/y_source_clipped will never be less than
x_source/y_source because all we're doing is clipping. This means that
x_temp_src/y_temp_src will always be non-positive; the original source
coordinate can never be strictly *inside* the temporary image or we
could have made the temporary image smaller.

        x_temp_src = x_source - x_source_clipped
                   = x_source - (x_source + x_off_clipped)
                   = -x_off_clipped
                   = x_dest - x_dest_clipped
                   = x_dest - (extents->x1 - dest->drawable.x)

Again, this is off by the destination origin within the screen
coordinate space.

The code should look like:

        temp_src =
            glamor_convert_gradient_picture(screen, source,
                                            extent->x1 + x_source - x_dest - dest->pDrawable->x,
                                            extent->y1 + y_source - y_dest - dest->pDrawable->y,
                                            width, height);

        x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x;
        y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y;

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Markus Wick <markus@selfnet.de>
(cherry picked from commit 55f5bfb578e934319d1308cbb56c900c5ac7cfa7)
Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index 14ab738..e5d5d2c 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1450,8 +1450,8 @@ glamor_composite_clipped_region(CARD8 op,
                     || source_pixmap->drawable.height != height)))) {
         temp_src =
             glamor_convert_gradient_picture(screen, source,
-                                            extent->x1 + x_source - x_dest,
-                                            extent->y1 + y_source - y_dest,
+                                            extent->x1 + x_source - x_dest - dest->pDrawable->x,
+                                            extent->y1 + y_source - y_dest - dest->pDrawable->y,
                                             width, height);
         if (!temp_src) {
             temp_src = source;
@@ -1459,8 +1459,8 @@ glamor_composite_clipped_region(CARD8 op,
         }
         temp_src_priv =
             glamor_get_pixmap_private((PixmapPtr) (temp_src->pDrawable));
-        x_temp_src = -extent->x1 + x_dest;
-        y_temp_src = -extent->y1 + y_dest;
+        x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x;
+        y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y;
     }

     if (mask
@@ -1474,8 +1474,8 @@ glamor_composite_clipped_region(CARD8 op,
          * to do reduce one convertion. */
         temp_mask =
             glamor_convert_gradient_picture(screen, mask,
-                                            extent->x1 + x_mask - x_dest,
-                                            extent->y1 + y_mask - y_dest,
+                                            extent->x1 + x_mask - x_dest - dest->pDrawable->x,
+                                            extent->y1 + y_mask - y_dest - dest->pDrawable->y,
                                             width, height);
         if (!temp_mask) {
             temp_mask = mask;
@@ -1483,8 +1483,8 @@ glamor_composite_clipped_region(CARD8 op,
         }
         temp_mask_priv =
             glamor_get_pixmap_private((PixmapPtr) (temp_mask->pDrawable));
-        x_temp_mask = -extent->x1 + x_dest;
-        y_temp_mask = -extent->y1 + y_dest;
+        x_temp_mask = -extent->x1 + x_dest + dest->pDrawable->x;
+        y_temp_mask = -extent->y1 + y_dest + dest->pDrawable->y;
     }
     /* Do two-pass PictOpOver componentAlpha, until we enable
      * dual source color blending.
--
cgit v0.10.2


code:
Submitted By:            Armin K. <krejzi at email dot com>
Date:                    2012-12-30
Initial Package Version: 1.13.1
Upstream Status:         Not submitted.
Origin:                  Upstream mailing list.
Description:             Adds PRIME support to Xorg Server to make GPU offloading work.

--- a/hw/xfree86/common/xf86Init.c	2014-06-04 12:49:11.000000000 +0200
+++ b/hw/xfree86/common/xf86Init.c	2014-06-04 14:00:29.539324458 +0200
@@ -363,6 +363,16 @@
     return ret;
 }

+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
+static void
+xf86AutoConfigOutputDevices(void)
+{
+    int i;
+
+    for (i = 0; i < xf86NumGPUScreens; i++)
+        xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
+}
+
 static void
 InstallSignalHandlers(void)
 {
@@ -952,6 +962,8 @@
     for (i = 0; i < xf86NumGPUScreens; i++)
         AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);

+    xf86AutoConfigOutputDevices();
+
     xf86VGAarbiterWrapFunctions();
     if (sigio_blocked)
         OsReleaseSIGIO();
--- a/hw/xfree86/common/xf86platformBus.c	2014-06-04 12:49:11.000000000 +0200
+++ b/hw/xfree86/common/xf86platformBus.c	2014-06-04 14:00:29.539324458 +0200
@@ -426,6 +426,8 @@
     return foundScreen;
 }

+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
+
 int
 xf86platformAddDevice(int index)
 {
@@ -494,6 +496,7 @@
    }
    /* attach unbound to 0 protocol screen */
    AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+   xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);

    RRResourcesChanged(xf86Screens[0]->pScreen);
    RRTellChanged(xf86Screens[0]->pScreen);
--- a/hw/xfree86/modes/xf86Crtc.c	2014-06-04 12:49:11.000000000 +0200
+++ b/hw/xfree86/modes/xf86Crtc.c	2014-06-04 14:00:29.540324474 +0200
@@ -3387,3 +3387,35 @@
             crtc->x = crtc->y = 0;
         }
 }
+
+
+void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
+{
+    RRProviderPtr master_provider;
+    xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master);
+    xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn);
+    Bool unbound = FALSE;
+
+    if (!config || !slave_config)
+        return;
+
+    master_provider = config->randr_provider;
+
+    if ((master->capabilities & RR_Capability_SinkOffload) &&
+        pScrn->capabilities & RR_Capability_SourceOffload) {
+            /* source offload */
+
+        DetachUnboundGPU(pScrn->pScreen);
+        unbound = TRUE;
+        AttachOffloadGPU(master->pScreen, pScrn->pScreen);
+        slave_config->randr_provider->offload_sink = master_provider;
+    }
+    if ((master->capabilities & RR_Capability_SourceOutput) &&
+               pScrn->capabilities & RR_Capability_SinkOutput) {
+        /* sink offload */
+        if (!unbound)
+            DetachUnboundGPU(pScrn->pScreen);
+        AttachOutputGPU(master->pScreen, pScrn->pScreen);
+        slave_config->randr_provider->output_source = master_provider;
+    }
+}


code:
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);


code:
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


code:
From 4471df41ea6e94834a2b10643ca7fcd69682d276 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 17 Aug 2012 09:49:24 +1000
Subject: [PATCH xserver v3] autobind GPUs to the screen

This is a modified version of a patch we've been carry-ing in Fedora and
RHEL for years now. This patch automatically adds secondary GPUs to the
master as output sink / offload source making e.g. the use of
slave-outputs just work, with requiring the user to manually run
"xrandr --setprovideroutputsource" before he can hookup an external
monitor to his hybrid graphics laptop.

There is one problem with this patch, which is why it was not upstreamed
before. What to do when a secondary GPU gets detected really is a policy
decission (e.g. one may want to autobind PCI GPUs but not USB ones) and
as such should be under control of the Desktop Environment.

Unconditionally adding autobinding support to the xserver will result
in races between the DE dealing with the hotplug of a secondary GPU
and the server itself dealing with it.

However we've waited for years for any Desktop Environments to actually
start doing some sort of autoconfiguration of secondary GPUs and there
is still not a single DE dealing with this, so I believe that it is
time to upstream this now.

To avoid potential future problems if any DEs get support for doing
secondary GPU configuration themselves, the new autobind functionality
is made optional. Since no DEs currently support doing this themselves it
is enabled by default. When DEs grow support for doing this themselves
they can disable the servers autobinding through the servers cmdline or a
xorg.conf snippet.

Signed-off-by: Dave Airlie <airlied@gmail.com>
[hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Make the default enabled instead of installing a xorg.conf
 snippet which enables it unconditionally
Changes in v3:
-Handle GPUScreen autoconfig in randr/rrprovider.c, looking at
 rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c
 looking at xf86CrtcConfig->provider. This fixes the autoconfig not
 working with the nvidia binary driver
---
 hw/xfree86/common/xf86Config.c      | 19 +++++++++++++++++++
 hw/xfree86/common/xf86Globals.c     |  2 ++
 hw/xfree86/common/xf86Init.c        | 20 ++++++++++++++++++++
 hw/xfree86/common/xf86Priv.h        |  1 +
 hw/xfree86/common/xf86Privstr.h     |  1 +
 hw/xfree86/common/xf86platformBus.c |  4 ++++
 hw/xfree86/man/Xorg.man             |  7 +++++++
 hw/xfree86/man/xorg.conf.man        |  6 ++++++
 randr/randrstr.h                    |  3 +++
 randr/rrprovider.c                  | 22 ++++++++++++++++++++++
 10 files changed, 85 insertions(+)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 21daf1a..df3ca50 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -719,6 +719,7 @@ typedef enum {
     FLAG_DRI2,
     FLAG_USE_SIGIO,
     FLAG_AUTO_ADD_GPU,
+    FLAG_AUTO_BIND_GPU,
     FLAG_MAX_CLIENTS,
     FLAG_IGLX,
 } FlagValues;
@@ -778,6 +779,8 @@ static OptionInfoRec FlagOptions[] = {
      {0}, FALSE},
     {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN,
      {0}, FALSE},
+    {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN,
+     {0}, FALSE},
     {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER,
      {0}, FALSE },
     {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN,
@@ -857,6 +860,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
     }
     xf86Msg(from, "%sutomatically adding GPU devices\n",
             xf86Info.autoAddGPU ? "A" : "Not a");
+
+    if (xf86AutoBindGPUDisabled) {
+        xf86Info.autoBindGPU = FALSE;
+        from = X_CMDLINE;
+    }
+    else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) {
+        xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU,
+                          &xf86Info.autoBindGPU);
+        from = X_CONFIG;
+    }
+    else {
+        from = X_DEFAULT;
+    }
+    xf86Msg(from, "%sutomatically binding GPU devices\n",
+            xf86Info.autoBindGPU ? "A" : "Not a");
+
     /*
      * Set things up based on the config file information.  Some of these
      * settings may be overridden later when the command line options are
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index e962b75..0d1e31b 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -136,6 +136,7 @@ xf86InfoRec xf86Info = {
 #else
     .autoAddGPU = FALSE,
 #endif
+    .autoBindGPU = TRUE,
 };

 const char *xf86ConfigFile = NULL;
@@ -197,6 +198,7 @@ Bool xf86FlipPixels = FALSE;
 Gamma xf86Gamma = { 0.0, 0.0, 0.0 };

 Bool xf86AllowMouseOpenFail = FALSE;
+Bool xf86AutoBindGPUDisabled = FALSE;

 #ifdef XF86VIDMODE
 Bool xf86VidModeDisabled = FALSE;
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index a544b65..b0cba3d 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -76,6 +76,7 @@
 #include "xf86DDC.h"
 #include "xf86Xinput.h"
 #include "xf86InPriv.h"
+#include "xf86Crtc.h"
 #include "picturestr.h"

 #include "xf86Bus.h"
@@ -298,6 +299,19 @@ xf86PrivsElevated(void)
 }

 static void
+xf86AutoConfigOutputDevices(void)
+{
+    int i;
+
+    if (!xf86Info.autoBindGPU)
+        return;
+
+    for (i = 0; i < xf86NumGPUScreens; i++)
+        RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+                                      xf86ScrnToScreen(xf86Screens[0]));
+}
+
+static void
 InstallSignalHandlers(void)
 {
     /*
@@ -871,6 +885,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
     for (i = 0; i < xf86NumGPUScreens; i++)
         AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);

+    xf86AutoConfigOutputDevices();
+
     xf86VGAarbiterWrapFunctions();
     if (sigio_blocked)
         input_unlock();
@@ -1389,6 +1405,10 @@ ddxProcessArgument(int argc, char **argv, int i)
         xf86Info.iglxFrom = X_CMDLINE;
         return 0;
     }
+    if (!strcmp(argv[i], "-noautoBindGPU")) {
+        xf86AutoBindGPUDisabled = TRUE;
+        return 1;
+    }

     /* OS-specific processing */
     return xf86ProcessArgument(argc, argv, i);
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index c1f8a18..9a3d0df 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -46,6 +46,7 @@
 extern _X_EXPORT const char *xf86ConfigFile;
 extern _X_EXPORT const char *xf86ConfigDir;
 extern _X_EXPORT Bool xf86AllowMouseOpenFail;
+extern _X_EXPORT Bool xf86AutoBindGPUDisabled;

 #ifdef XF86VIDMODE
 extern _X_EXPORT Bool xf86VidModeDisabled;
diff --git a/hw/xfree86/common/xf86Privstr.h b/hw/xfree86/common/xf86Privstr.h
index c29b3cc..4c5f54b 100644
--- a/hw/xfree86/common/xf86Privstr.h
+++ b/hw/xfree86/common/xf86Privstr.h
@@ -102,6 +102,7 @@ typedef struct {
     MessageType dri2From;

     Bool autoAddGPU;
+    Bool autoBindGPU;
 } xf86InfoRec, *xf86InfoPtr;

 #ifdef DPMSExtension
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 063e81c..42789ca 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -48,6 +48,7 @@
 #include "Pci.h"
 #include "xf86platformBus.h"
 #include "xf86Config.h"
+#include "xf86Crtc.h"

 #include "randrstr.h"
 int platformSlotClaimed;
@@ -579,6 +580,9 @@ xf86platformAddDevice(int index)
    }
    /* attach unbound to 0 protocol screen */
    AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+   if (xf86Info.autoBindGPU)
+       RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
+                                     xf86ScrnToScreen(xf86Screens[0]));

    RRResourcesChanged(xf86Screens[0]->pScreen);
    RRTellChanged(xf86Screens[0]->pScreen);
diff --git a/hw/xfree86/man/Xorg.man b/hw/xfree86/man/Xorg.man
index def9bfc..8df6b7d 100644
--- a/hw/xfree86/man/Xorg.man
+++ b/hw/xfree86/man/Xorg.man
@@ -283,6 +283,13 @@ is a comma separated list of directories to search for
 server modules.  This option is only available when the server is run
 as root (i.e, with real-uid 0).
 .TP 8
+.B \-noautoBindGPU
+Disable automatically setting secondary GPUs up as output sinks and offload
+sources. This is equivalent to setting the
+.B AutoBindGPU
+xorg.conf(__filemansuffix__) file option. To
+.B false.
+.TP 8
 .B \-nosilk
 Disable Silken Mouse support.
 .TP 8
diff --git a/hw/xfree86/man/xorg.conf.man b/hw/xfree86/man/xorg.conf.man
index 7d0c524..3e596e4 100644
--- a/hw/xfree86/man/xorg.conf.man
+++ b/hw/xfree86/man/xorg.conf.man
@@ -673,6 +673,12 @@ Enabled by default.
 If this option is disabled, then no GPU devices will be added from the udev
 backend. Enabled by default. (May need to be disabled to setup Xinerama).
 .TP 7
+.BI "Option \*qAutoBindGPU\*q  \*q" boolean \*q
+If enabled then secondary GPUs will be automatically set up as output-sinks and
+offload-sources. Making e.g. laptop outputs connected only to the secondary
+GPU directly available for use without needing to run
+"xrandr --setprovideroutputsource". Enabled by default.
+.TP 7
 .BI "Option \*qLog\*q \*q" string \*q
 This option controls whether the log is flushed and/or synced to disk after
 each message.
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 706e9a7..66999d5 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -976,6 +976,9 @@ RRProviderLookup(XID id, RRProviderPtr *provider_p);
 extern _X_EXPORT void
 RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);

+extern _X_EXPORT void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen);
+
 /* rrproviderproperty.c */

 extern _X_EXPORT void
diff --git a/randr/rrprovider.c b/randr/rrprovider.c
index f9df67e..abc5685 100644
--- a/randr/rrprovider.c
+++ b/randr/rrprovider.c
@@ -482,3 +482,25 @@ RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider)

     WriteEventsToClient(client, 1, (xEvent *) &pe);
 }
+
+void
+RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr masterScreen)
+{
+    rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
+    rrScrPrivPtr masterPriv = rrGetScrPriv(masterScreen);
+    RRProviderPtr provider = pScrPriv->provider;
+    RRProviderPtr master_provider = masterPriv->provider;
+
+    if (!provider || !master_provider)
+        return;
+
+    if ((provider->capabilities & RR_Capability_SinkOutput) &&
+        (master_provider->capabilities & RR_Capability_SourceOutput)) {
+        pScrPriv->rrProviderSetOutputSource(pScreen, provider, master_provider);
+        RRInitPrimeSyncProps(pScreen);
+    }
+
+    if ((provider->capabilities & RR_Capability_SourceOffload) &&
+        (master_provider->capabilities & RR_Capability_SinkOffload))
+        pScrPriv->rrProviderSetOffloadSink(pScreen, provider, master_provider);
+}
--
2.9.3


code:
#!/bin/sh
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../xorg-server/xvfb-run.sh
# Copyright (C) 2005 The T2 SDE Project
# Copyright (C) XXXX - 2005 Debian
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- T2-COPYRIGHT-NOTE-END ---

# $Id: xvfb-run 2166 2005-01-27 07:54:19Z branden $
# from: http://necrotic.deadbeast.net/xsf/XFree86/trunk/debian/local/xvfb-run

# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done.  The return
# value of the command becomes the return value of this script.
#
# If anyone is using this to build a Debian package, make sure the package
# Build-Depends on xvfb, xbase-clients, and xfonts-base.

set -e

PROGNAME=xvfb-run
SERVERNUM=99
AUTHFILE=
ERRORFILE=/dev/null
STARTWAIT=3
XVFBARGS="-screen 0 640x480x8"
LISTENTCP="-nolisten tcp"
XAUTHPROTO=.

# Query the terminal to establish a default number of columns to use for
# displaying messages to the user.  This is used only as a fallback in the event
# the COLUMNS variable is not set.  ($COLUMNS can react to SIGWINCH while the
# script is running, and this cannot, only being calculated once.)
DEFCOLUMNS=$(stty size 2>/dev/null | awk '{print $2}') || true
if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" >/dev/null 2>&1; then
    DEFCOLUMNS=80
fi

# Display a message, wrapping lines at the terminal width.
message () {
    echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS}
}

# Display an error message.
error () {
    message "error: $*" >&2
}

# Display a usage message.
usage () {
    if [ -n "$*" ]; then
        message "usage error: $*"
    fi
    cat <<EOF
Usage: $PROGNAME [OPTION ...] COMMAND
Run COMMAND (usually an X client) in a virtual X server environment.
Options:
-a        --auto-servernum          try to get a free server number, starting at
                                    --server-num
-e FILE   --error-file=FILE         file used to store xauth errors and Xvfb
                                    output (default: $ERRORFILE)
-f FILE   --auth-file=FILE          file used to store auth cookie
                                    (default: ./.Xauthority)
-h        --help                    display this usage message and exit
-n NUM    --server-num=NUM          server number to use (default: $SERVERNUM)
-l        --listen-tcp              enable TCP port listening in the X server
-p PROTO  --xauth-protocol=PROTO    X authority protocol name to use
                                    (default: xauth command's default)
-s ARGS   --server-args=ARGS        arguments (other than server number and
                                    "-nolisten tcp") to pass to the Xvfb server
                                    (default: "$XVFBARGS")
-w DELAY  --wait=DELAY              delay in seconds to wait for Xvfb to start
                                    before running COMMAND (default: $STARTWAIT)
EOF
}

# Find a free server number by looking at .X*-lock files in /tmp.
find_free_servernum() {
    # Sadly, the "local" keyword is not POSIX.  Leave the next line commented in
    # the hope Debian Policy eventually changes to allow it in /bin/sh scripts
    # anyway.
    #local i

    i=$SERVERNUM
    while [ -f /tmp/.X$i-lock ]; do
        i=$(($i + 1))
    done
    echo $i
}

# Parse the command line.
ARGS=$(getopt --options +ae:f:hn:lp:s:w: \
       --long auto-servernum,error-file:auth-file:,help,server-num:,listen-tcp,xauth-protocol:,server-args:,wait: \
       --name "$PROGNAME" -- "$@")
GETOPT_STATUS=$?

if [ $GETOPT_STATUS -ne 0 ]; then
    error "internal error; getopt exited with status $GETOPT_STATUS"
    exit 6
fi

eval set -- "$ARGS"

while :; do
    case "$1" in
        -a|--auto-servernum) SERVERNUM=$(find_free_servernum) ;;
        -e|--error-file) ERRORFILE="$2"; shift ;;
        -f|--auth-file) AUTHFILE="$2"; shift ;;
        -h|--help) SHOWHELP="yes" ;;
        -n|--server-num) SERVERNUM="$2"; shift ;;
        -l|--listen-tcp) LISTENTCP="" ;;
        -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
        -s|--server-args) XVFBARGS="$2"; shift ;;
        -w|--wait) STARTWAIT="$2"; shift ;;
        --) shift; break ;;
        *) error "internal error; getopt permitted \"$1\" unexpectedly"
           exit 6
           ;;
    esac
    shift
done

if [ "$SHOWHELP" ]; then
    usage
    exit 0
fi

if [ -z "$*" ]; then
    usage "need a command to run" >&2
    exit 2
fi

if ! which xauth >/dev/null; then
    error "xauth command not found"
    exit 3
fi

# If the user did not specify an X authorization file to use, set up a temporary
# directory to house one.
if [ -z "$AUTHFILE" ]; then
    XVFB_RUN_TMPDIR="${TMPDIR:-/tmp}/$PROGNAME.$$"
    if ! mkdir -p -m 700 "$XVFB_RUN_TMPDIR"; then
        error "temporary directory $XVFB_RUN_TMPDIR already exists"
        exit 4
    fi
    AUTHFILE=$(unset TMPDIR && mktemp -p "$XVFB_RUN_TMPDIR" Xauthority.XXXXXXXX)
fi

# Start Xvfb.
MCOOKIE=$(mcookie)
XAUTHORITY=$AUTHFILE xauth add ":$SERVERNUM" "$XAUTHPROTO" "$MCOOKIE" \
  >"$ERRORFILE" 2>&1
XAUTHORITY=$AUTHFILE Xvfb ":$SERVERNUM" $XVFBARGS $LISTENTCP >"$ERRORFILE" \
  2>&1 &
XVFBPID=$!
sleep "$STARTWAIT"

# Start the command and save its exit status.
set +e
DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1
RETVAL=$?
set -e

# Kill Xvfb now that the command has exited.
kill $XVFBPID

# Clean up.
XAUTHORITY=$AUTHFILE xauth remove ":$SERVERNUM" >"$ERRORFILE" 2>&1
if [ -n "$XVFB_RUN_TMPDIR" ]; then
    if ! rm -r "$XVFB_RUN_TMPDIR"; then
        error "problem while cleaning up temporary directory"
        exit 5
    fi
fi

# Return the executed command's exit status.
exit $RETVAL

# vim:set ai et sts=4 sw=4 tw=80:


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xorg-server</Name>
        <Homepage>http://www.x.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        X.Org X Server
        <Description>X server is the main application that allows a graphical interface.</Description>
        <Archive sha1sum="307d3405f709f7e41966c850b37deefe7f83eb9b" type="tarbz2">mirrors://xorg/individual/xserver/xorg-server-1.19.5.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>libbsd-devel</Dependency>
            <Dependency>font-util</Dependency>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>libdmx-devel</Dependency>
            <Dependency>libdrm-devel</Dependency>
            <Dependency>libgcrypt-devel</Dependency>
            <Dependency>libpciaccess-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>libXaw-devel</Dependency>
            <Dependency>libXext-devel</Dependency>
            <Dependency>libXfixes-devel</Dependency>
            <Dependency>libXfont2-devel</Dependency>
            <Dependency>libXi-devel</Dependency>
            <Dependency>libxkbfile-devel</Dependency>
            <Dependency>libXmu-devel</Dependency>
            <Dependency>libXpm-devel</Dependency>
            <Dependency>libXrender-devel</Dependency>
            <Dependency>libXres-devel</Dependency>
            <Dependency>libXt-devel</Dependency>
            <Dependency>libXtst-devel</Dependency>
            <Dependency>libXv-devel</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>pixman-devel</Dependency>
            <Dependency>xorg-app</Dependency>
            <Dependency>nettle-devel</Dependency>
            <Dependency>libepoxy-devel</Dependency>
            <Dependency>xcb-util-devel</Dependency>
            <Dependency>xcb-util-image-devel</Dependency>
            <Dependency>xcb-util-wm-devel</Dependency>
            <Dependency>xcb-util-keysyms-devel</Dependency>
            <Dependency>xcb-util-renderutil-devel</Dependency>
            <Dependency>util-macros</Dependency>
            <Dependency>xtrans</Dependency>
            <Dependency>eudev-devel</Dependency>
            <Dependency>freetype-devel</Dependency>
            <Dependency>libunwind-devel</Dependency>
            <Dependency>libXau-devel</Dependency>
            <Dependency>libICE-devel</Dependency>
            <Dependency>libSM-devel</Dependency>
            <Dependency>wayland-devel</Dependency>
            <Dependency>wayland-protocols-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">nvidia-add-modulepath-support.patch</Patch>
            <Patch level="1">xserver-autobind-hotplug.patch</Patch>
            <Patch level="1">xorg-server-1.12-unloadsubmodule.patch</Patch>
            <Patch level="1">xorg-server-1.18-support-multiple-Files-sections.patch</Patch>
            <Patch level="1">xorg-server-1.19.4-sysmacros.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>xorg-server-common</Name>
        <IsA>data</IsA>
        Common files for X servers
        <Files>
            <Path fileType="data">/etc/X11/fontpath.d</Path>
            <Path fileType="data">/etc/dbus-1</Path>
            <Path fileType="data">/usr/lib/xorg/protocol.txt</Path>
            <Path fileType="data">/var/lib/xkb</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man/man1/Xserver.1</Path>
        </Files>
    </Package>

    <Package>
        <Name>xorg-server</Name>
       <Replaces>
            <Package>xorg-video-modesetting</Package>
            <Package>glamor-egl</Package>
        </Replaces>
        <IsA>app:console</IsA>
        <RuntimeDependencies>
            <Dependency>libXau</Dependency>
            <Dependency>eudev</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>libdrm</Dependency>
            <Dependency>pixman</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>libunwind</Dependency>
            <Dependency>libpciaccess</Dependency>
            <Dependency>libxshmfence</Dependency>
            <Dependency>libepoxy</Dependency>
            <Dependency>nettle</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc/X11/xorg.conf.d</Path>
            <Path fileType="executable">/usr/bin/X</Path>
            <Path fileType="executable">/usr/bin/Xorg</Path>
            <Path fileType="executable">/usr/bin/cvt</Path>
            <Path fileType="executable">/usr/bin/gtf</Path>
            <Path fileType="executable">/usr/libexec</Path>
            <Path fileType="library">/usr/lib/xorg</Path>
            <Path fileType="data">/usr/share/X11/DriversDB</Path>
            <Path fileType="data">/usr/share/X11/pci</Path>
            <Path fileType="data">/usr/share/X11/xorg.conf.d</Path>
            <Path fileType="man">/usr/share/man/man1/Xorg.1</Path>
            <Path fileType="man">/usr/share/man/man1/cvt.1</Path>
            <Path fileType="man">/usr/share/man/man1/gtf.1</Path>
            <Path fileType="man">/usr/share/man/man4/exa.4</Path>
            <Path fileType="man">/usr/share/man/man4/modesetting.4</Path>
            <Path fileType="man">/usr/share/man/man4/fbdevhw.4</Path>
            <Path fileType="man">/usr/share/man/man5/xorg.conf.5</Path>
            <Path fileType="man">/usr/share/man/man5/xorg.conf.d.5</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/usr/libexec/xorg-save-xkb-config.sh">xorg-save-xkb-config.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/X11/DriversDB">DriversDB</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/X11/xorg.conf.d/10-quirks.conf">fedora/10-quirks.conf</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>xorg-server-xdmx</Name>
        <IsA>app:console</IsA>
        Distributed Multihead X Server
        <RuntimeDependencies>
            <Dependency relase="current">xorg-server-common</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libXau</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency>libXi</Dependency>
            <Dependency>libXt</Dependency>
            <Dependency>libXmu</Dependency>
            <Dependency>libdmx</Dependency>
            <Dependency>libXaw</Dependency>
            <Dependency>pixman</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>libXfixes</Dependency>
            <Dependency>libXrender</Dependency>
            <Dependency>libunwind</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/*dmx*</Path>
            <Path fileType="man">/usr/share/man/man1/*dmx*</Path>
        </Files>
    </Package>

    <Package>
        <Name>xorg-server-xwayland</Name>
        <IsA>app:console</IsA>
        Run X clients under wayland
        <RuntimeDependencies>
            <Dependency>libXau</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency>libunwind</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>pixman</Dependency>
            <Dependency>libdrm</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>libepoxy</Dependency>
            <Dependency>libxshmfence</Dependency>
            <Dependency>wayland-client</Dependency>
            <Dependency relase="current">xorg-server-common</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/Xwayland</Path>
        </Files>
    </Package>

    <Package>
        <Name>xorg-server-xephyr</Name>
        <IsA>app:console</IsA>
        Nested X Server
        <RuntimeDependencies>
            <Dependency>libX11</Dependency>
            <Dependency>libXau</Dependency>
            <Dependency>libxcb</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency relase="current">xorg-server-common</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>xcb-util</Dependency>
            <Dependency>libunwind</Dependency>
            <Dependency>pixman</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>libepoxy</Dependency>
            <Dependency>xcb-util-wm</Dependency>
            <Dependency>libxshmfence</Dependency>
            <Dependency>xcb-util-image</Dependency>
            <Dependency>xcb-util-keysyms</Dependency>
            <Dependency>xcb-util-renderutil</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/Xephyr</Path>
            <Path fileType="man">/usr/share/man/man1/Xephyr.1</Path>
        </Files>
    </Package>

    <Package>
        <Name>xorg-server-xvfb</Name>

        <License>GPLv2</License>
        <IsA>app:console</IsA>
        Virtual Framebuffer X Server
        <RuntimeDependencies>
            <Dependency>libXau</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency relase="current">xorg-server-common</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>pixman</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>libunwind</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/[Xx]vfb*</Path>
            <Path fileType="man">/usr/share/man/man1/Xvfb.1</Path>
        </Files>
        <AdditionalFiles>

            <AdditionalFile owner="root" permission="0755" target="/usr/bin/xvfb-run">xvfb-run.sh</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>xorg-server-xnest</Name>
        A nested X server that runs as an X application
        <RuntimeDependencies>
            <Dependency>libX11</Dependency>
            <Dependency>libXau</Dependency>
            <Dependency>libXdmcp</Dependency>
            <Dependency>libXfont2</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libunwind</Dependency>
            <Dependency>pixman</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/Xnest</Path>
            <Path fileType="man">/usr/share/man/man1/Xnest.1</Path>
        </Files>
    </Package>

    <Package>
        <Name>xorg-server-devel</Name>
        <IsA>data</IsA>
        <IsA>library</IsA>
        Headers and libraries for X server driver development
        <RuntimeDependencies>
            <Dependency relase="current">xorg-server</Dependency>
            <Dependency>libpciaccess-devel</Dependency>
            <Dependency>pixman-devel</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>xorg-proto</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include/xorg</Path>
            <Path fileType="library">/usr/lib/libxf86config.a</Path>
            <Path fileType="data">/usr/lib/pkgconfig</Path>
            <Path fileType="data">/usr/share/aclocal</Path>
        </Files>
    </Package>

    <History>
        <Update release="6">
            <Date>2017-12-17</Date>
            <Version>1.19.5</Version>
            <Comment>Version bump</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="5">
            <Date>2017-04-26</Date>
            <Version>1.19.1</Version>
            <Comment>Rebuild for a patch</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2017-03-02</Date>
            <Version>1.19.1</Version>
            <Comment>Version bump.</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-11-04</Date>
            <Version>1.18.4</Version>
            <Comment>Version bump</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
       <Update release="2">
            <Date>2016-05-02</Date>
            <Version>1.18.3</Version>
            <Comment>Version bump</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
        <Update release="1">
            <Date>2016-04-08</Date>
            <Version>1.17.2</Version>
            <Comment>First release</Comment>
            <Name>Ertuğrul Erata</Name>
            <Email>ertugrulerata@gmail.com</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xorg-server</Name>
        X.Org X Sunucu
        Serveur X X.Org
        X.Org X Server
        X.Org X Serwer
        <Description xml:lang="tr">X sunucu, grafiksel arayüz için gerekli ana uygulamadır.</Description>
        <Description xml:lang="pl">X serwer to główna aplikacja, która umożliwia interfejs graficzny.</Description>
    </Source>

    <Package>
        <Name>xorg-server-common</Name>
        X sunucuları için ortak dosyalar
    </Package>

    <Package>
        <Name>xorg-server-xdmx</Name>
        Dağıtık, çok başlı X sunucusu
    </Package>

    <Package>
        <Name>xorg-server-xephyr</Name>
        Başka bir X ekranında çalışabilen X sunucusu
    </Package>

    <Package>
        <Name>xorg-server-xvfb</Name>
        Sanal framebuffer X sunucusu
    </Package>

    <Package>
        <Name>xorg-server-xvnc</Name>
        X pencere sistemi için VNC sunucusu
    </Package>

    <Package>
        <Name>xorg-server-Xwayland</Name>
        X pencere sistemini wayland altında çalıştırın
    </Package>

    <Package>
        <Name>xorg-server-devel</Name>
        X sunucusu için sürücü geliştirmede kullanılan başlık ve kitaplık dosyaları
    </Package>
</PISI>


code:
<PISI>
    <Name>x11.terminal</Name>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--disable-static \
                         --enable-python \
                         --enable-introspection \
                         --libexecdir=/usr/lib/vte \
                         --localstatedir=/var \
                         --without-glX \
                         --disable-gtk-doc \
                         --with-gtk=2.0")

    pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.dodoc("AUTHORS", "ChangeLog", "HACKING", "MAINTAINERS", "COPYING", "NEWS", "README")


code:
--- vte-0.28.0/python/Makefile.am.link	2011-04-10 18:37:45.000000000 +0200
+++ vte-0.28.0/python/Makefile.am	2011-04-10 18:37:56.000000000 +0200
@@ -22,7 +22,7 @@
 # we do this to suport building with -Wl,-z,defs which errors on
 # vtemodule.so as we cannot include $(PYTHON_LIBS) due to bug 410986.
 vtemodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initvte $(PYTHON_LDFLAGS) $(AM_LDFLAGS)
-vtemodule_la_LIBADD = $(top_builddir)/src/libvte.la $(LIBS) $(PYGTK_LIBS) $(VTE_LIBS) $(X_LIBS)
+vtemodule_la_LIBADD = $(top_builddir)/src/libvte.la $(LIBS) $(PYGTK_LIBS) $(VTE_LIBS) $(X_LIBS) $(PYTHON_LIBS)
 nodist_vtemodule_la_SOURCES = vte.c

 vte.c: vte.defs vte.override
--- vte-0.28.0/python/Makefile.in.link	2011-04-10 18:38:01.000000000 +0200
+++ vte-0.28.0/python/Makefile.in	2011-04-10 18:38:12.000000000 +0200
@@ -339,7 +339,7 @@
 # we do this to suport building with -Wl,-z,defs which errors on
 # vtemodule.so as we cannot include $(PYTHON_LIBS) due to bug 410986.
 @BUILD_PYTHON_MODULES_TRUE@vtemodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initvte $(PYTHON_LDFLAGS) $(AM_LDFLAGS)
-@BUILD_PYTHON_MODULES_TRUE@vtemodule_la_LIBADD = $(top_builddir)/src/libvte.la $(LIBS) $(PYGTK_LIBS) $(VTE_LIBS) $(X_LIBS)
+@BUILD_PYTHON_MODULES_TRUE@vtemodule_la_LIBADD = $(top_builddir)/src/libvte.la $(LIBS) $(PYGTK_LIBS) $(VTE_LIBS) $(X_LIBS) $(PYTHON_LIBS)
 @BUILD_PYTHON_MODULES_TRUE@nodist_vtemodule_la_SOURCES = vte.c
 all: all-am


code:
From feeee4b5832b17641e505b7083e0d299fdae318e Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@gnome.org>
Date: Sat, 19 May 2012 17:36:09 +0000
Subject: emulation: Limit integer arguments to 65535

To guard against malicious sequences containing excessively big numbers,
limit all parsed numbers to 16 bit range. Doing this here in the parsing
routine is a catch-all guard; this doesn't preclude enforcing
more stringent limits in the handlers themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=676090
---
diff --git a/src/table.c b/src/table.c
index 140e8c8..85cf631 100644
--- a/src/table.c
+++ b/src/table.c
@@ -550,7 +550,7 @@ _vte_table_extract_numbers(GValueArray **array,
 		if (G_UNLIKELY (*array == NULL)) {
 			*array = g_value_array_new(1);
 		}
-		g_value_set_long(&value, total);
+		g_value_set_long(&value, CLAMP (total, 0, G_MAXUSHORT));
 		g_value_array_append(*array, &value);
 	} while (i++ < arginfo->length);
 	g_value_unset(&value);
diff --git a/src/vteseq.c b/src/vteseq.c
index 457c06a..46def5b 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -557,7 +557,7 @@ vte_sequence_handler_multiple(VteTerminal *terminal,
                               GValueArray *params,
                               VteTerminalSequenceHandler handler)
 {
-        vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXLONG);
+        vte_sequence_handler_multiple_limited(terminal, params, handler, G_MAXUSHORT);
 }

 static void
--
cgit v0.9.0.2


code:
diff -NurpP --minimal vte-0.28.2.orig/src/vte-private.h vte-0.28.2/src/vte-private.h
--- vte-0.28.2.orig/src/vte-private.h	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vte-private.h	2012-04-06 00:23:46.000000000 +0000
@@ -281,6 +281,9 @@ struct _VteTerminalPrivate {
 	gboolean scroll_on_keystroke;
 	long scrollback_lines;

+	/* Scaling options */
+	gboolean scale_background;
+
 	/* Cursor shape */
 	VteTerminalCursorShape cursor_shape;
         float cursor_aspect_ratio;
diff -NurpP --minimal vte-0.28.2.orig/src/vte.c vte-0.28.2/src/vte.c
--- vte-0.28.2.orig/src/vte.c	2011-08-28 21:31:45.000000000 +0000
+++ vte-0.28.2/src/vte.c	2012-04-06 00:23:46.000000000 +0000
@@ -179,7 +179,8 @@ enum {
         PROP_SCROLL_ON_OUTPUT,
         PROP_WINDOW_TITLE,
         PROP_WORD_CHARS,
-        PROP_VISIBLE_BELL
+        PROP_VISIBLE_BELL,
+        PROP_SCALE_BACKGROUND
 };

 /* these static variables are guarded by the GDK mutex */
@@ -11179,6 +11180,10 @@ vte_terminal_paint(GtkWidget *widget, Gd
 							0,
 							terminal->pvt->screen->scroll_delta *
 							terminal->char_height);
+		} else if (terminal->pvt->scale_background) {
+			_vte_draw_set_background_scale(terminal->pvt->draw,
+						       terminal->char_width * terminal->column_count,
+						       terminal->char_height * terminal->row_count);
 		} else {
 			_vte_draw_set_background_scroll(terminal->pvt->draw, 0, 0);
 		}
@@ -11574,6 +11579,9 @@ vte_terminal_get_property (GObject *obje
                 case PROP_SCROLL_BACKGROUND:
                         g_value_set_boolean (value, pvt->scroll_background);
                         break;
+                case PROP_SCALE_BACKGROUND:
+                        g_value_set_boolean (value, pvt->scale_background);
+                        break;
                 case PROP_SCROLLBACK_LINES:
                         g_value_set_uint (value, pvt->scrollback_lines);
                         break;
@@ -11680,6 +11688,9 @@ vte_terminal_set_property (GObject *obje
                 case PROP_PTY_OBJECT:
                         vte_terminal_set_pty_object (terminal, g_value_get_object (value));
                         break;
+                case PROP_SCALE_BACKGROUND:
+                        vte_terminal_set_scale_background (terminal, g_value_get_boolean (value));
+                        break;
                 case PROP_SCROLL_BACKGROUND:
                         vte_terminal_set_scroll_background (terminal, g_value_get_boolean (value));
                         break;
@@ -12697,6 +12708,19 @@ vte_terminal_class_init(VteTerminalClass
                                       G_PARAM_STATIC_STRINGS));

         /**
+         * VteTerminal:scale-background:
+         *
+         * Controls whether or not the terminal will scale the background image
+         * (if one is set)
+         */
+        g_object_class_install_property
+                (gobject_class,
+                 PROP_SCALE_BACKGROUND,
+                 g_param_spec_boolean ("scale-background", NULL, NULL,
+                                       FALSE,
+                                       G_PARAM_READWRITE | STATIC_PARAMS));
+
+        /**
          * VteTerminal:scroll-background:
          *
          * Controls whether or not the terminal will scroll the background image (if
@@ -12991,6 +13015,36 @@ vte_terminal_get_allow_bold(VteTerminal
 }

 /**
+ * vte_terminal_set_scale_background:
+ * @terminal: a #VteTerminal
+ * @scale: whether the terminal should scale the background
+ *
+ * Controls whether or not the terminal will scale the background image (if
+ * one is set) to the widget size.
+ *
+ * Since: 0.11
+ */
+void
+vte_terminal_set_scale_background(VteTerminal *terminal, gboolean scale)
+{
+        VteTerminalPrivate *pvt;
+
+	g_return_if_fail(VTE_IS_TERMINAL(terminal));
+
+        pvt = terminal->pvt;
+
+        scale = scale != FALSE;
+        if (scale == pvt->scale_background)
+                return;
+
+	pvt->scale_background = scale;
+
+        g_object_notify (G_OBJECT (terminal), "scale-background");
+
+        vte_terminal_queue_background_update(terminal);
+}
+
+/**
  * vte_terminal_set_scroll_background:
  * @terminal: a #VteTerminal
  * @scroll: whether the terminal should scroll the background image along with
diff -NurpP --minimal vte-0.28.2.orig/src/vte.c.orig vte-0.28.2/src/vte.c.orig
diff -NurpP --minimal vte-0.28.2.orig/src/vte.h vte-0.28.2/src/vte.h
--- vte-0.28.2.orig/src/vte.h	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vte.h	2012-04-06 00:23:46.000000000 +0000
@@ -306,6 +306,7 @@ void vte_terminal_set_audible_bell(VteTe
 gboolean vte_terminal_get_audible_bell(VteTerminal *terminal);
 void vte_terminal_set_visible_bell(VteTerminal *terminal, gboolean is_visible);
 gboolean vte_terminal_get_visible_bell(VteTerminal *terminal);
+void vte_terminal_set_scale_background(VteTerminal *terminal, gboolean scale);
 void vte_terminal_set_scroll_background(VteTerminal *terminal, gboolean scroll);
 void vte_terminal_set_scroll_on_output(VteTerminal *terminal, gboolean scroll);
 void vte_terminal_set_scroll_on_keystroke(VteTerminal *terminal,
diff -NurpP --minimal vte-0.28.2.orig/src/vte.h.orig vte-0.28.2/src/vte.h.orig
diff -NurpP --minimal vte-0.28.2.orig/src/vteapp.c vte-0.28.2/src/vteapp.c
--- vte-0.28.2.orig/src/vteapp.c	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vteapp.c	2012-04-06 00:23:46.000000000 +0000
@@ -553,7 +553,7 @@ main(int argc, char **argv)
 	const char *background = NULL;
 	gboolean transparent = FALSE, audible = TRUE,
 		 debug = FALSE, dingus = FALSE, dbuffer = TRUE,
-		 console = FALSE, scroll = FALSE, keep = FALSE,
+		 console = FALSE, scroll = FALSE, scale = FALSE, keep = FALSE,
 		 icon_title = FALSE, shell = TRUE, highlight_set = FALSE,
 		 cursor_set = FALSE, reverse = FALSE, use_geometry_hints = TRUE,
 		 antialias = TRUE, use_scrolled_window = FALSE,
@@ -669,6 +669,11 @@ main(int argc, char **argv)
 			"Set cursor shape (block|underline|ibeam)", NULL
 		},
 		{
+			"scale-background", 'z', 0,
+			G_OPTION_ARG_NONE, &scale,
+			"Enable a scaling background", NULL
+		},
+		{
 			"scroll-background", 's', 0,
 			G_OPTION_ARG_NONE, &scroll,
 			"Enable a scrolling background", NULL
@@ -891,6 +896,7 @@ main(int argc, char **argv)
 	vte_terminal_set_audible_bell(terminal, audible);
 	vte_terminal_set_visible_bell(terminal, !audible);
 	vte_terminal_set_cursor_blink_mode(terminal, cursor_blink_mode);
+	vte_terminal_set_scale_background(terminal, scale);
 	vte_terminal_set_scroll_background(terminal, scroll);
 	vte_terminal_set_scroll_on_output(terminal, FALSE);
 	vte_terminal_set_scroll_on_keystroke(terminal, TRUE);
diff -NurpP --minimal vte-0.28.2.orig/src/vteapp.c.orig vte-0.28.2/src/vteapp.c.orig
diff -NurpP --minimal vte-0.28.2.orig/src/vtebg.c vte-0.28.2/src/vtebg.c
--- vte-0.28.2.orig/src/vtebg.c	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vtebg.c	2012-04-06 00:23:46.000000000 +0000
@@ -56,6 +56,8 @@ typedef struct {
 	PangoColor tint_color;
 	double saturation;
 	cairo_surface_t *surface;
+	int width;
+	int height;
 } VteBgCacheItem;

 static void vte_bg_cache_item_free(VteBgCacheItem *item);
@@ -321,6 +323,8 @@ static void item_surface_destroy_func(vo
                          "VteBgCacheItem %p surface destroyed\n", item);

 	item->surface = NULL;
+	item->width = 1;
+	item->height = 1;
 }

 /*
@@ -364,7 +368,9 @@ vte_bg_cache_search(VteBg *bg,
 		    const GdkPixbuf *source_pixbuf,
 		    const char *source_file,
 		    const PangoColor *tint,
-		    double saturation)
+		    double saturation,
+		    int *surface_width,
+		    int *surface_height)
 {
 	GList *i;

@@ -392,6 +398,11 @@ vte_bg_cache_search(VteBg *bg,
 				break;
 			}

+			if (surface_width)
+				*surface_width = item->width;
+			if (surface_height)
+				*surface_height = item->height;
+
 			return cairo_surface_reference(item->surface);
 		}
 	}
@@ -407,6 +418,8 @@ vte_bg_cache_search(VteBg *bg,
  * @tint: a #PangoColor to use as tint color
  * @saturation: the saturation as a value between 0.0 and 1.0
  * @other: a #cairo_surface_t
+ * @surface_width: pointer to store the surface width
+ * @surface_height: pointer to store the surface height
  *
  * Returns: a reference to a #cairo_surface_t, or %NULL on failure
  */
@@ -417,7 +430,9 @@ vte_bg_get_surface(VteBg *bg,
 		   const char *source_file,
 		   const PangoColor *tint,
 		   double saturation,
-		   cairo_surface_t *other)
+		   cairo_surface_t *other,
+		   int *surface_width,
+		   int *surface_height)
 {
         VteBgPrivate *pvt;
 	VteBgCacheItem *item;
@@ -440,7 +455,8 @@ vte_bg_get_surface(VteBg *bg,

 	cached = vte_bg_cache_search(bg, source_type,
 				     source_pixbuf, source_file,
-				     tint, saturation);
+				     tint, saturation,
+				     surface_width, surface_height);
 	if (cached != NULL) {
 		return cached;
 	}
@@ -494,6 +510,13 @@ vte_bg_get_surface(VteBg *bg,
         else
                 goto out;

+	if (surface_width)
+		*surface_width = width;
+	if (surface_height)
+		*surface_height = height;
+
+        item->width = width;
+        item->height = height;
 	item->surface =
 		cairo_surface_create_similar(other, CAIRO_CONTENT_COLOR_ALPHA,
 					     width, height);
diff -NurpP --minimal vte-0.28.2.orig/src/vtebg.c.orig vte-0.28.2/src/vtebg.c.orig
diff -NurpP --minimal vte-0.28.2.orig/src/vtebg.h vte-0.28.2/src/vtebg.h
--- vte-0.28.2.orig/src/vtebg.h	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vtebg.h	2012-04-06 00:23:46.000000000 +0000
@@ -63,7 +63,9 @@ vte_bg_get_surface(VteBg *bg,
 		   const char *source_file,
 		   const PangoColor *tint,
 		   double saturation,
-		   cairo_surface_t *other);
+		   cairo_surface_t *other,
+		   int *surface_width,
+		   int *surface_height);

 G_END_DECLS

diff -NurpP --minimal vte-0.28.2.orig/src/vtedraw.c vte-0.28.2/src/vtedraw.c
--- vte-0.28.2.orig/src/vtedraw.c	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vtedraw.c	2012-04-06 00:23:46.000000000 +0000
@@ -752,6 +752,7 @@ struct _vte_draw {
 	struct font_info *font;
 	struct font_info *font_bold;
 	cairo_pattern_t *bg_pattern;
+	gint bg_width, bg_height;

 	cairo_t *cr;
 };
@@ -839,6 +840,8 @@ _vte_draw_set_background_solid(struct _v
 						      green,
 						      blue,
 						      opacity);
+	draw->bg_width = 1;
+	draw->bg_height = 1;
 }

 void
@@ -850,6 +853,7 @@ _vte_draw_set_background_image (struct _
 			        double saturation)
 {
 	cairo_surface_t *surface;
+	int surface_width, surface_height;

 	/* Need a valid draw->cr for cairo_get_target () */
 	_vte_draw_start (draw);
@@ -857,7 +861,8 @@ _vte_draw_set_background_image (struct _
 	surface = vte_bg_get_surface (vte_bg_get_for_screen (gtk_widget_get_screen (draw->widget)),
 				     type, pixbuf, filename,
 				     color, saturation,
-				     cairo_get_target(draw->cr));
+				     cairo_get_target(draw->cr),
+				     &surface_width, &surface_height);

 	_vte_draw_end (draw);

@@ -868,6 +873,8 @@ _vte_draw_set_background_image (struct _
 		cairo_pattern_destroy (draw->bg_pattern);

 	draw->bg_pattern = cairo_pattern_create_for_surface (surface);
+	draw->bg_width = surface_width;
+	draw->bg_height = surface_height;
 	cairo_surface_destroy (surface);
 	cairo_pattern_set_extend (draw->bg_pattern, CAIRO_EXTEND_REPEAT);
 }
@@ -888,6 +895,24 @@ _vte_draw_set_background_scroll (struct
 	cairo_pattern_set_matrix (draw->bg_pattern, &matrix);
 }

+void
+_vte_draw_set_background_scale (struct _vte_draw *draw,
+				gint sx, gint sy)
+{
+	cairo_matrix_t matrix;
+
+	_vte_debug_print (VTE_DEBUG_DRAW,
+			"draw_set_scale (%d, %d)\n",
+			sx, sy);
+
+	g_return_if_fail (draw->bg_pattern != NULL);
+
+	cairo_matrix_init_scale (&matrix,
+			         (1.0 * draw->bg_width) / sx,
+				 (1.0 * draw->bg_height) / sy);
+	cairo_pattern_set_matrix (draw->bg_pattern, &matrix);
+}
+
 void
 _vte_draw_clip (struct _vte_draw *draw, GdkRegion *region)
 {
diff -NurpP --minimal vte-0.28.2.orig/src/vtedraw.c.orig vte-0.28.2/src/vtedraw.c.orig
diff -NurpP --minimal vte-0.28.2.orig/src/vtedraw.h vte-0.28.2/src/vtedraw.h
--- vte-0.28.2.orig/src/vtedraw.h	2011-08-16 21:52:48.000000000 +0000
+++ vte-0.28.2/src/vtedraw.h	2012-04-06 00:23:46.000000000 +0000
@@ -82,6 +82,8 @@ void _vte_draw_set_background_image(stru
 				    double saturation);
 void _vte_draw_set_background_scroll(struct _vte_draw *draw,
 				     gint x, gint y);
+void _vte_draw_set_background_scale(struct _vte_draw *draw,
+				    gint sx, gint sy);

 void _vte_draw_clip(struct _vte_draw *draw, GdkRegion *region);
 void _vte_draw_clear(struct _vte_draw *draw,


code:
From 180dcc578e13c6096e277fb853e7162db640f207 Mon Sep 17 00:00:00 2001
From: Alexandre Rostovtsev <tetromino@gentoo.org>
Date: Tue, 15 Nov 2011 03:06:40 -0500
Subject: [PATCH] Map both gdk's Meta and Alt to vte's Meta for >=gtk+-3.2.2
 compatibility

Also, since VTE_META_MASK is now a mask with multiple bits set, code that
compares gdk key modifiers to VTE_META_MASK by numerical equality is no
longer guaranteed to work. Therefore, for such comparisons a new function,
vte_keymap_fixup_modifiers, is introduced; it ensures that if any bits
matching matching VTE_META_MASK are set, then all are set.

https://bugzilla.gnome.org/show_bug.cgi?id=663779
---
 src/keymap.c |   15 +++++++++++++--
 src/keymap.h |    2 +-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/keymap.c b/src/keymap.c
index 9a21669..95b4c5b 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -990,6 +990,17 @@ static const struct _vte_keymap_group {
 	{GDK_KEY (F35),		_vte_keymap_GDK_F35},
 };

+/* Restrict modifiers to the specified mask and ensure that VTE_META_MASK,
+ * despite being a compound mask, is treated as indivisible. */
+GdkModifierType
+_vte_keymap_fixup_modifiers(GdkModifierType modifiers,
+		GdkModifierType mask)
+{
+	if (modifiers & VTE_META_MASK)
+		modifiers |= VTE_META_MASK;
+	return modifiers & mask;
+}
+
 /* Map the specified keyval/modifier setup, dependent on the mode, to either
  * a literal string or a capability name. */
 void
@@ -1104,7 +1115,7 @@ _vte_keymap_map(guint keyval,
 	} else {
 		fkey_mode = fkey_default;
 	}
-	modifiers &= (GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);
+	modifiers = _vte_keymap_fixup_modifiers(modifiers, GDK_SHIFT_MASK | GDK_CONTROL_MASK | VTE_META_MASK | VTE_NUMLOCK_MASK);

 	/* Search for the conditions. */
 	for (i = 0; entries[i].normal_length || entries[i].special[0]; i++)
@@ -1375,7 +1386,7 @@ _vte_keymap_key_add_key_modifiers(guint keyval,
 		return;
 	}

-	switch (modifiers & significant_modifiers) {
+	switch (_vte_keymap_fixup_modifiers(modifiers, significant_modifiers)) {
 	case 0:
 		modifier = 0;
 		break;
diff --git a/src/keymap.h b/src/keymap.h
index 243e22e..21d9b8e 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -27,7 +27,7 @@

 G_BEGIN_DECLS

-#define VTE_META_MASK		GDK_META_MASK
+#define VTE_META_MASK		(GDK_META_MASK | GDK_MOD1_MASK)
 #define VTE_NUMLOCK_MASK	GDK_MOD2_MASK

 /* Map the specified keyval/modifier setup, dependent on the mode, to either
--
1.7.8.rc3


code:
diff -ur vte-0.22.5-orig/python/vte.override vte-0.22.5-python-get-text/python/vte.override
--- vte-0.22.5-orig/python/vte.override	2010-01-16 20:54:40.515014436 -0500
+++ vte-0.22.5-python-get-text/python/vte.override	2010-01-16 22:14:40.881828300 -0500
@@ -306,9 +306,9 @@
     }

     cb = PySequence_GetItem(data, 0); /* INCREFs */
-    Py_XDECREF(cb);

     if (!PyCallable_Check(cb)) {
+	    Py_XDECREF(cb);
         PyErr_SetString(PyExc_TypeError, "callback is not a callable object");
         return FALSE;
     }
@@ -320,6 +320,7 @@
     PyTuple_SetItem(args, 3, PySequence_GetItem(data, 2));

     result = PyObject_CallObject(cb, args);
+    Py_XDECREF(cb);
     Py_DECREF(args);

     ret = (result && PyObject_IsTrue(result));
@@ -332,7 +333,7 @@
 build_attributes(GArray *attrs)
 {
     PyObject *py_attrs = PyTuple_New(attrs->len);
-    int count;
+    guint count;
     PyObject *row = PyString_FromString("row");
     PyObject *column = PyString_FromString("column");
     PyObject *fore = PyString_FromString("fore");
@@ -344,6 +345,8 @@
 	VteCharAttributes *cht;
 	PyObject *py_char_attr;

+	cht = &g_array_index(attrs, VteCharAttributes, count);
+
 	py_char_attr = Py_BuildValue("{S:l,S:l,S:N,S:N,S:I,S:I}",
 	                             row, cht->row,
 	                             column, cht->column,
@@ -380,10 +383,9 @@
     GArray *attrs = NULL;
     char *text;
     PyObject *py_attrs;
-    int count;
     long length;

-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:terminal_get_text",
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOO:terminal_get_text",
 				     kwlist, &callback, &do_attr, &data)) {
         return NULL;
     }
@@ -451,10 +453,9 @@
     GArray *attrs = NULL;
     char *text;
     PyObject *py_attrs;
-    int count;
     long length;

-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:terminal_get_text_include_trailing_spaces",
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOO:terminal_get_text_include_trailing_spaces",
 				     kwlist, &callback, &do_attr, &data)) {
         return NULL;
     }
@@ -522,11 +523,10 @@
     GArray *attrs = NULL;
     char *text;
     PyObject *py_attrs;
-    int count;
     long length;

     if (!PyArg_ParseTupleAndKeywords(args, kwargs,
-   				     "llllO|OO:terminal_get_text_range",
+   				     "llll|OOO:terminal_get_text_range",
 				     kwlist,
 				     &start_row, &start_col, &end_row, &end_col,
 				     &callback, &do_attr, &data)) {
@@ -641,7 +641,7 @@
     static char *kwlist[] = { "column", "row", NULL };
     gchar *ret;
     glong column, row;
-    int *tag;
+    int tag;

     if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ll:VteTerminal.match_check", kwlist, &column, &row))
         return NULL;


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>vte</Name>
        <Homepage>http://www.gnome.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>LGPLv2</License>
        Xft powered terminal widget
        <Description>The VTE package contains a termcap file implementation for terminal emulators.</Description>
        <Archive sha1sum="b0af0701ef9d6c7ede9c578366b12a70ac47ab66" type="tarxz">mirrors://gnome/vte/0.28/vte-0.28.2.tar.xz</Archive>
        <BuildDependencies>
            <Dependency>gobject-introspection-devel</Dependency>
            <Dependency>fontconfig-devel</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>pango-devel</Dependency>
            <Dependency>cairo-devel</Dependency>
            <Dependency>gtk-doc</Dependency>
            <Dependency>gdk-pixbuf-devel</Dependency>
            <Dependency>atk-devel</Dependency>
            <Dependency>ncurses-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
            <Dependency>intltool</Dependency>
            <Dependency>harfbuzz-devel</Dependency>
            <Dependency>graphite2-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">vte-0.28.2-limit-arguments.patch</Patch>
            <Patch level="1">vte-alt-meta-confusion.patch</Patch>
            <Patch level="1">vte-python-bugfixes.patch</Patch>
            <Patch level="1">vte-0.28.0-link.patch</Patch>
            <Patch level="1">vte-0.28.2-scale.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>vte</Name>
        <IsA>library</IsA>
        <RuntimeDependencies>
            <Dependency>gobject-introspection</Dependency>
            <Dependency>gtk2</Dependency>
            <Dependency>atk</Dependency>
            <Dependency>cairo</Dependency>
            <Dependency>gdk-pixbuf</Dependency>
            <Dependency>pango</Dependency>
            <Dependency>ncurses</Dependency>
            <Dependency>glib2</Dependency>
            <Dependency>libX11</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="executable">/usr/libexec</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="data">/usr/share/vte</Path>
            <Path fileType="data">/usr/share/pygtk</Path>
            <Path fileType="data">/usr/share/gir-1.0/Vte-0.0.gir</Path>
        </Files>
    </Package>

    <Package>
        <Name>vte-docs</Name>
        <IsA>data:doc</IsA>
        GTK reference documents for vte
        <Files>
            <Path fileType="doc">/usr/share/gtk-doc</Path>
        </Files>
    </Package>

    <Package>
        <Name>vte-devel</Name>
        Development files for vte
        <RuntimeDependencies>
            <Dependency release="current">vte</Dependency>
            <Dependency>gtk2-devel</Dependency>
            <Dependency>pango-devel</Dependency>
            <Dependency>cairo-devel</Dependency>
            <Dependency>glib2-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="library">/usr/lib/pkgconfig</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-05-11</Date>
            <Version>0.28.2</Version>
            <Comment>Rebuild</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>0.28.2</Version>
            <Comment>Rebuild</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-05-16</Date>
            <Version>0.28.2</Version>
            <Comment>First release</Comment>
            <Name>Marcin Bojara</Name>
            <Email>marcin@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>vte</Name>
        Widget terminal utilisant Xft
        <Description xml:lang="tr">Vte paketi, terminal emülatörleri için termcap uygulama dosyası içerir.</Description>
    </Source>
    <Source>
        <Name>vte-docs</Name>
        Vte referans dökümanları
    </Source>

    <Package>
        <Name>vte-devel</Name>
        vte için geliştirme dosyaları
    </Package>
</PISI>


code:
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/copyleft/gpl.txt.

from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure(" \
             --disable-full-tgetent \
             --with-app-defaults=/usr/share/X11/app-defaults \
             --disable-desktop \
             --with-utempter \
             --with-tty-group=tty \
             --enable-256-color \
             --enable-exec-xterm \
             --enable-freetype \
             --enable-luit \
             --enable-wide-chars \
             --enable-warnings \
            ")

def build():
    autotools.make()

def install():
    autotools.rawInstall("DESTDIR=%s" % get.installDIR())

    pisitools.removeDir("/usr/share/pixmaps")

    pisitools.dodoc("README.i18n", "xterm.log.html", "ctlseqs.txt", "16colors.txt")


code:
only in patch2:
unchanged:
Index: XTerm.ad
===================================================================
--- XTerm.ad.orig
+++ XTerm.ad
@@ -210,3 +210,13 @@
 !*allowTcapOps: false
 !*allowTitleOps: false
 !*allowWindowOps: false
+
+! Pardus Defaults:
+*backarrowKeyIsErase:       true
+*ptyInitialErase:           true
+*VT100*eightBitInput:       false
+*VT100*metaSendsEscape:     true
+*VT100*scrollBar:           true
+*VT100*rightScrollBar:      true
+*VT100*utf8Title:           true
+*VT100*modifyFunctionKeys:  0
Index: XTerm-col.ad
===================================================================
--- XTerm-col.ad.orig
+++ XTerm-col.ad
@@ -7,9 +7,9 @@
 *VT100*boldColors: on
 *VT100*dynamicColors: on

-! Uncomment this for "white" text on a dark background.
-!*VT100*foreground: gray90
-!*VT100*background: black
+! Set the default text foreground and background colors.
+*VT100*foreground: gray90
+*VT100*background: black

 ! - OR -
 ! Uncomment this for black text on a "white" background.
@@ -114,20 +114,32 @@
 *Form.background: AntiqueWhite
 *form.background: AntiqueWhite

+*mainMenu*background: AntiqueWhite
+*mainMenu*foreground: gray15
+*vtMenu*background: AntiqueWhite
+*vtMenu*foreground: gray15
+*fontMenu*background: AntiqueWhite
+*fontMenu*foreground: gray15
+*tekMenu*background: AntiqueWhite
+*tekMenu*foreground: gray15
+
 ! The following two sections take advantage of new features in version 7
-! of the Athena widget library.  Comment them out if you have a shallow
-! color depth.
+! of the Athena widget library; see Xaw(7x).
+
+! This section is commented out because Xaw has no way to dynamically size
+! the gradient.  The dimension parameter may need to be adjusted depending
+! on the font used in the menu.
 !*SimpleMenu*backgroundPixmap:   gradient:vertical?dimension=350&start=gray90&end=gray60
 !*SimpleMenu*foreground:         gray15

-!*VT100.scrollbar.thumb:         vlines2
-!*VT100.scrollbar.width:         14
-!*VT100.scrollbar.background:    gray60
-!*VT100.scrollbar.foreground:    rgb:a/5/5
-!*VT100.scrollbar.borderWidth:   0
-!*VT100.scrollbar.displayList:\
-!foreground      gray90;\
-!lines           1,-1,-1,-1,-1,1;\
-!foreground      gray60;\
-!lines           -1,0,0,0,0,-1
+*VT100.scrollbar.thumb:         vlines2
+*VT100.scrollbar.width:         14
+*VT100.scrollbar.background:    gray60
+*VT100.scrollbar.foreground:    rgb:a/5/5
+*VT100.scrollbar.borderWidth:   0
+*VT100.scrollbar.displayList:\
+foreground      gray90;\
+lines           1,-1,-1,-1,-1,1;\
+foreground      gray60;\
+lines           -1,0,0,0,0,-1
 #endif


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>xterm</Name>
        <Homepage>http://invisible-island.net/xterm</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>MIT</License>
        <Icon>terminal</Icon>
        <IsA>app:gui</IsA>
        <Summary>Terminal emulator for the X Window System</Summary>
        <Description>The xterm program is a terminal emulator for the X Window System. It provides DEC VT102 and Tektronix 4014 compatible terminals for programs that can't use the window system directly.</Description>
        <Archive sha1sum="4dffabe5662ee19611860b7d8284f237616d0b82" type="targz">ftp://invisible-island.net/xterm/xterm-327.tgz</Archive>
        <BuildDependencies>
            <Dependency>fontconfig-devel</Dependency>
            <Dependency>libICE-devel</Dependency>
            <Dependency>libXaw-devel</Dependency>
            <Dependency>libXft-devel</Dependency>
            <Dependency>libXmu-devel</Dependency>
            <Dependency>libXt-devel</Dependency>
            <Dependency>utempter-devel</Dependency>
            <Dependency>libXinerama-devel</Dependency>
            <Dependency>xorg-app</Dependency>
            <Dependency>libXpm-devel</Dependency>
            <Dependency>ncurses-devel</Dependency>
            <Dependency>libX11-devel</Dependency>
        </BuildDependencies>
        <Patches>
<!--             <Patch level="1">xterm-226-man-page_paths.patch</Patch> -->
<!--             <Patch level="1">xterm-238-windowfontops.patch</Patch> -->

            <!-- ftp://invisible-island.net/xterm/16colors.txt -->
            <Patch>16colors.txt.diff</Patch>

            <!-- Default resources for Pardus -->
            <Patch>defaults.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>xterm</Name>
        <RuntimeDependencies>
            <Dependency>fontconfig</Dependency>
            <Dependency>libICE</Dependency>
            <Dependency>libXaw</Dependency>
            <Dependency>libXft</Dependency>
            <Dependency>libXmu</Dependency>
            <Dependency>libXt</Dependency>
            <Dependency>libXinerama</Dependency>
            <Dependency>utempter</Dependency>
            <Dependency>xorg-app</Dependency>
            <Dependency>libXpm</Dependency>
            <Dependency>ncurses</Dependency>
            <Dependency>libX11</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="data">/usr/share/X11</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-02-16</Date>
            <Version>327</Version>
            <Comment>Rebuild.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-11-04</Date>
            <Version>327</Version>
            <Comment>Version bump</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-02</Date>
            <Version>324</Version>
            <Comment>Version bump</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-05-13</Date>
            <Version>304</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>xterm</Name>
        <Summary xml:lang="tr">X Pencere Sistemi için uçbirim emülatörü</Summary>
        <Description xml:lang="tr">xterm programı, X Pencere Sistemi için bir uçbirim emülatörüdür. Pencere sistemini doğrudan kullanamayan programlar için DEC VT102 ve Tektronix 4014 uyumlu uçbirimler sağlar.</Description>
    </Source>
</PISI>


code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt

from pisi.actionsapi import kde5
from pisi.actionsapi import pisitools

def setup():
    kde5.configure()

def build():
    kde5.make()

def install():
    kde5.install()

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING*",  "NEWS", "README", "COPYING.DOC")