code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>virt-manager</Name>
        <Homepage>http://virt-manager.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2+</License>
        <Icon>virt-manager-icon</Icon>
        <IsA>app:gui</IsA>
        <Summary>Graphical tool for administering virtual machines for KVM, Xen, and QEmu</Summary>
        <Description>Virtual Machine Manager provides a graphical tool for administering virtual machines for KVM, Xen, and QEmu. Start, stop, add or remove virtual devices, connect to a graphical or serial console, and see resource usage statistics for existing VMs on local or remote machines. Uses libvirt as the backend management API.</Description>
        <Archive sha1sum="6d67dbb9750c88f30d116eb7bb8ebdc8e5e513d6" type="targz">https://releases.pagure.org/virt-manager/virt-manager-1.4.0.tar.gz</Archive>
        <BuildDependencies>
            <Dependency>intltool</Dependency>
            <Dependency>gtk2-devel</Dependency>
        </BuildDependencies>
        <Patches>
<!-- 	    <Patch level="1">fix-python-name.patch</Patch> -->
        </Patches>
    </Source>

    <Package>
        <Name>virt-manager</Name>
        <RuntimeDependencies>
            <Dependency>gtk2</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/libexec</Path>
            <Path fileType="config">/etc/gconf/schemas</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
            <Path fileType="data">/usr/share</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile target="po/tr.po">tr.po</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-01-29</Date>
            <Version>1.4.0</Version>
            <Comment>Version bump.</Comment>
            <Name>Stefan Gronewold</Name>
            <Email>groni@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>1.3.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
    	    <Date>2015-12-31</Date>
    	    <Version>1.3.1</Version>
            <Comment>First release</Comment>
    	    <Name>Ayhan Yalçınsoy</Name>
    	    <Email>ayhanyalcinsoy@pisilinux.org</Email>
    	</Update>
    </History>
</PISI>

repo_name: ayhanyalcinsoy/main


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>virt-manager</Name>
        <Summary xml:lang="tr">Grafik arayüzlü sanal makine yönetim aracı</Summary>
        <Description xml:lang="tr">Virt-Manager ile kvm, qemu, xen gibi sanallaştırma sistemleriyle yaratılmış yerel veya uzak sanal makinelerin başlatılması, durdurulması, sanal cihazlar eklenip kaldırılması, grafik veya seri konsollarına bağlanılması gibi işlemler yapılabilir. Çalışmak için libvirt kütüphanesine ve servisine ihtiyaç duyar.</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 autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def build():
    autotools.make()

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

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "README")


code:
--- virt-wrapper-0.1.1.orig/virt-wrapper.py	2009-12-22 10:37:12.000000000 +0200
+++ virt-wrapper-0.1.1/virt-wrapper.py	2014-11-23 12:44:24.702025021 +0200
@@ -11,7 +11,7 @@
 __trans = gettext.translation('virt-wrapper', fallback=True)
 _ = __trans.ugettext

-VIRT_GROUP = "virt"
+VIRT_GROUP = "vboxusers"

 class VBox:
     def __init__(self):


code:
--- virt-wrapper.py~	2013-02-01 21:29:54.545523923 +0100
+++ virt-wrapper.py	2013-02-01 21:30:39.649522275 +0100
@@ -130,7 +130,7 @@
         if mod.replace("-", "_") in loaded:
             link = comar.Link()
             try:
-                link.Boot.Modules["module_init_tools"].unload(mod)
+                link.Boot.Modules["kmod"].unload(mod)
             except dbus.exceptions.DBusException:
                 return False
     else:
@@ -168,7 +168,7 @@
     failure = False
     for mod in mods:
         try:
-            link.Boot.Modules["module_init_tools"].load(mod, "")
+            link.Boot.Modules["kmod"].load(mod, "")
         except dbus.exceptions.DBusException:
             failure = True


code:
Index: virt-wrapper-0.1.1/virt-wrapper.py
===================================================================
--- virt-wrapper-0.1.1.orig/virt-wrapper.py
+++ virt-wrapper-0.1.1/virt-wrapper.py
@@ -168,7 +168,7 @@ def checkModules(vapp):
     failure = False
     for mod in mods:
         try:
-            link.Boot.Modules["module_init_tools"].load(mod)
+            link.Boot.Modules["module_init_tools"].load(mod, "")
         except dbus.exceptions.DBusException:
             failure = True


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>virt-wrapper</Name>
        <Homepage>http://www.pisilinux.org</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv3</License>
        <IsA>app:console</IsA>
        <Summary>Wrapper for virtualization software</Summary>
        <Description>virt-wrapper is a wrapper for virtualization applications. It warns users if they are not a member of virt group and loads the kernel modules automatically.</Description>
        <Archive sha1sum="658ed1a96ccae29ff2378829dd27f94d8d9929e1" type="targz">http://source.pisilinux.org/1.0/virt-wrapper-0.1.1.tar.gz</Archive>
        <Patches>
            <Patch level="1">pass-options-arg.patch</Patch>
            <Patch level="0">kmod.patch</Patch>
            <Patch level="1">change_group.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>virt-wrapper</Name>
        <Files>
            <Path fileType="executable">/usr/libexec</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-03-20</Date>
            <Version>0.1.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>0.1.1</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2014-11-23</Date>
            <Version>0.1.1</Version>
            <Comment>First release</Comment>
            <Name>Osman Erkan</Name>
            <Email>osman.erkan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>virt-wrapper</Name>
        <Summary xml:lang="tr">Sanallaştırma yazılımları için önbetik</Summary>
        <Description xml:lang="tr">virt-wrapper, sanallaştırma uygulamaları için bir betik içerir. Bu betik, kullanıcıyı eğer virt grubunda değilse uyarır ve çekirdek modüllerini de otomatik olarak yükler.</Description>
    </Source>
</PISI>


code:
# -*- 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 get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pythonmodules
from pisi.actionsapi import kerneltools

VBoxLibDir = "/usr/lib/virtualbox"
VBoxDataDir = "/usr/share/virtualbox"
KDIR = kerneltools.getKernelVersion()

def setup():
    pisitools.dosed("LocalConfig.kmk", "__VBOXLIBDIR__", VBoxLibDir)
    pisitools.dosed("LocalConfig.kmk", "__VBOXDATADIR__", VBoxDataDir)

    shelltools.echo("vbox.cfg", "INSTALL_DIR=%s" % VBoxLibDir)

    # TODO: Enable web service when we have soapcpp2
    autotools.rawConfigure("\
                             --with-makeself=/bin/echo \
                             --disable-docs \
                             --enable-vde \
                             --enable-vnc \
                             --enable-webservice \
                             --with-linux=/usr/src/linux-headers-%s \
                             --with-gcc=%s \
                             --with-g++=%s \
                           " % (KDIR, get.CC(), get.CXX()))

def build():
    shelltools.system("source %s/env.sh && kmk" % get.curDIR())

def install():
    shelltools.system("awk '$1 ~ /Version:/ { print gensub(/([0-9]+)\.([0-9]+).*/, \"\\\\1\\\\2\", \"g\", $2) }' /usr/lib/pkgconfig/xorg-server.pc > XorgVersion")
    with open("XorgVersion", "r") as f:
        XorgVersion = f.readline().strip()
    pisitools.insinto("/etc/vbox", "vbox.cfg")
    shelltools.chmod("src/VBox/Additions/x11/Installer/98vboxadd-xclient", 0755)
    pisitools.insinto("/usr/bin", "src/VBox/Additions/x11/Installer/98vboxadd-xclient", "VBoxClient-all")
    #pisitools.insinto("/lib/udev/rules.d", "src/VBox/Additions/linux/installer/70-xorg-vboxmouse.rules")
    pisitools.insinto("/usr/share/X11/pci", "src/VBox/Additions/x11/Installer/vboxvideo.ids")
    #pisitools.insinto("/usr/share/X11/xorg.conf.d", "src/VBox/Additions/x11/Installer/50-vboxmouse.conf")

    arch = "amd64" if get.ARCH() == "x86_64" else "x86"
    shelltools.cd("out/linux.%s/release/bin" % arch)

    # libraries installation. The files below are unnecessary files.
    # TODO: change loop and make it more discrete (i.e copying each single file)
    exclude = ("additions", "icons", "nls", "scm", "sdk", "src", "SUP", "vboxkeyboard",
               "VBox.sh", "VBoxSysInfo.sh", "VBoxCreateUSBNode.sh", "VBoxTunctl", "testcase", "tst", "xpidl")

    for _file in shelltools.ls("."):
        if _file.startswith(exclude):
            continue

        print "Installing %s ..." % _file
        pisitools.insinto(VBoxLibDir, _file)

    pisitools.dobin("VBox*.sh", VBoxDataDir)
    pisitools.insinto(VBoxDataDir, "nls")

    # TODO: Add vboxwebsrv when ready
    # Binaries and Wrapper with Launchers
    apps = ("VBoxHeadless", "VBoxManage", "VBoxSDL", "VBoxVRDP", "VirtualBox", "VBoxBalloonCtrl")
    for link in apps:
        pisitools.dosym("../share/virtualbox/VBox.sh", "/usr/bin/%s" % link)

    pisitools.dobin("VBoxTunctl")

    # Desktop file, mimetype file for xml and icon
    pisitools.domove("%s/*.desktop" % VBoxLibDir, "/usr/share/applications")
    pisitools.domove("%s/*.png" % VBoxLibDir, "/usr/share/pixmaps")
    pisitools.domove("%s/*.xml" % VBoxLibDir, "/usr/share/mime/packages")

    # Mimetypes icons
    for size in ["16", "20", "24", "32", "48", "64", "72", "96", "128", "256"]:
        pisitools.insinto("/usr/share/icons/hicolor/%sx%s/mimetypes" % (size, size),
                          "icons/%sx%s/*.png" % (size, size))

    # Guest additions
    pisitools.dobin("additions/VBoxClient")
    pisitools.dobin("additions/VBoxControl")

    pisitools.dosbin("additions/VBoxService")
    pisitools.dosbin("additions/mount.vboxsf", "/sbin")

    pisitools.insinto("/lib/security", "additions/pam_vbox.so")

    pisitools.dolib("additions/VBoxOGL*")
    pisitools.dosym("../../../VBoxOGL.so", "/usr/lib/xorg/modules/dri/vboxvideo_dri.so")

    #pisitools.insinto("/usr/lib/xorg/modules/drivers", "additions/vboxvideo_drv_system.so", "vboxvideo.so")
    #pisitools.insinto("/usr/lib/xorg/modules/input",   "additions/vboxmouse_drv_%s.so" % XorgVersion, "vboxmouse_drv.so")

    # Python bindings
    pisitools.insinto("%s/sdk/bindings/xpcom" % VBoxLibDir, "sdk/bindings/xpcom/python")

    shelltools.cd("sdk/installer")
    shelltools.copy("vboxapisetup.py", "setup.py")
    shelltools.export("VBOX_INSTALL_PATH", VBoxLibDir)
    pythonmodules.install()

    shelltools.cd("../..")
    mvb_name = "module-virtualbox-%s" % get.srcVERSION()
    mvbg_name = "module-virtualbox-guest-%s" % get.srcVERSION()

    shelltools.copy("src", "%s/%s" % (get.workDIR(), mvb_name))
    shelltools.copy("additions/src", "%s/%s" % (get.workDIR(), mvbg_name))
    shelltools.cd(get.workDIR())
    shelltools.system("tar c %s | xz -9 > %s.tar.xz" % ((mvb_name, )*2))
    shelltools.unlinkDir(mvb_name)
    shelltools.system("tar c %s | xz -9 > %s.tar.xz" % ((mvbg_name, )*2))
    shelltools.unlinkDir(mvbg_name)


code:
#/usr/bin/python
# -*- coding: utf-8 -*-

import os

files = ("VBoxHeadless", "VBoxNetAdpCtl", "VBoxNetDHCP", "VBoxSDL", "VirtualBox")
vboxgroup = "vboxusers"

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    for _file in files:
        f = "/usr/lib/virtualbox/%s" % _file
        os.system("/bin/chown :%s %s" % (vboxgroup, f))
        os.chmod(f, 04755)


code:
from comar.service import *
import os

serviceType = "script"
serviceDefault = "on"
serviceDesc = _({"en": "VirtualBox",
                 "tr": "VirtualBox"})
serviceConf = "virtualbox"
PIDFILE = "/run/virtualbox.pid"

@synchronized
def start():
        os.system("/sbin/modprobe vboxguest")
        os.system("/sbin/modprobe vboxvideo")
        os.system("/sbin/modprobe vboxsf")
        os.system("/sbin/modprobe vboxdrv")

@synchronized
def reload():
    if os.path.exists(PIDFILE):
        os.kill(int(open(PIDFILE, "r").read().strip()), 1)

@synchronized
def stop():
    stopService(pidfile=PIDFILE, donotify=True)
    if os.path.isfile(PIDFILE): os.unlink(PIDFILE)

def status():
    return isServiceRunning(pidfile=PIDFILE)


code:
diff --git a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
index 92b4ffc..1a1c467 100644
--- a/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
+++ b/src/VBox/Additions/common/crOpenGL/fakedri_drv.c
@@ -56,24 +56,8 @@ typedef enum {

 //#define DEBUG_DRI_CALLS

-/// @todo this could be different...
-#ifdef RT_ARCH_AMD64
-# ifdef RT_OS_FREEBSD
-#  define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-#  define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-#  define DRI_DEFAULT_DRIVER_DIR "/usr/lib64/dri:/usr/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/xorg/modules/dri"
-#  define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#else
-# ifdef RT_OS_FREEBSD
-#  define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
-#  define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
-# else
-#  define DRI_DEFAULT_DRIVER_DIR "/usr/lib/dri:/usr/lib/i386-linux-gnu/dri:/usr/lib/xorg/modules/dri"
+#  define DRI_DEFAULT_DRIVER_DIR "/usr/lib/xorg/modules/dri"
 #  define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
-# endif
-#endif

 #ifdef DEBUG_DRI_CALLS
  #define SWDRI_SHOWNAME(pext, func) \


code:
diff -Nuar a/src/VBox/Additions/common/crOpenGL/Makefile.kmk b/src/VBox/Additions/common/crOpenGL/Makefile.kmk
--- a/src/VBox/Additions/common/crOpenGL/Makefile.kmk	2017-10-18 10:06:45.000000000 +0300
+++ b/src/VBox/Additions/common/crOpenGL/Makefile.kmk	2017-11-20 12:49:55.626419756 +0300
@@ -69,17 +69,12 @@
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  ifndef VBOX_USE_SYSTEM_GL_HEADERS
   VBoxOGL_INCS     += \
-	$(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
-	$(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
-	$(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
-	$(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
-	$(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
-	$(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
-	$(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
-	$(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
-	$(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
-	$(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
-	$(VBOX_GL_INCS)
+	/usr/include/x11 \
+	/usr/include/xorg \
+	/usr/include/pixman-1 \
+	$(VBOX_GL_INCS) \
+	/usr/include/drm \
+	/usr/include/libdrm
  endif
  VBoxOGL_DEFS     += VBOX_NO_NATIVEGL
 endif
@@ -219,10 +214,10 @@
   VBoxOGL_LIBS += Xcomposite Xdamage Xfixes Xext
  else
   VBoxOGL_LIBS += \
- 	$(PATH_STAGE_LIB)/libXcomposite.so \
- 	$(PATH_STAGE_LIB)/libXdamage.so \
- 	$(PATH_STAGE_LIB)/libXfixes.so \
- 	$(PATH_STAGE_LIB)/libXext.so
+ 	Xcomposite \
+ 	Xdamage \
+ 	Xfixes \
+ 	Xext
  endif
  ifdef VBoxOGL_FAKEDRI
   ifeq ($(KBUILD_TARGET), freebsd)


code:
Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk	2015-04-02 15:44:24.955670965 +0200
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk	2015-04-02 15:44:24.955670965 +0200
@@ -67,18 +67,12 @@
 VBoxOGL_INCS           = .
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_INCS     += \
-	$(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
-	$(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
-	$(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
-	$(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
-	$(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
-	$(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
-	$(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
-	$(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
-	$(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
-	$(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+	/usr/include/x11 \
+	/usr/include/xorg \
+	/usr/include/pixman-1 \
 	$(VBOX_MESA_INCS) \
-	$(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+	/usr/include/drm \
+	/usr/include/libdrm
  VBoxOGL_DEFS     += VBOX_NO_NATIVEGL
 endif

@@ -213,10 +207,10 @@

 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_LIBS += \
- 	$(PATH_STAGE_LIB)/libXcomposite.so \
- 	$(PATH_STAGE_LIB)/libXdamage.so \
- 	$(PATH_STAGE_LIB)/libXfixes.so \
- 	$(PATH_STAGE_LIB)/libXext.so
+ 	Xcomposite \
+ 	Xdamage \
+ 	Xfixes \
+ 	Xext
  ifdef VBoxOGL_FAKEDRI
   ifeq ($(KBUILD_TARGET), freebsd)
     VBoxOGL_LIBS += \


code:
--- a/src/VBox/Additions/common/VBoxGuestLib/Makefile.km	2013-09-04 21:03:47.334749420 +0200
+++ b/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk	2013-10-21 00:06:36.418245968 +0200
@@ -40,8 +40,8 @@
 	VBoxGuestR3LibShared
 ifndef VBOX_ONLY_TESTSUITE
  if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
-  LIBRARIES += \
-  	VBoxGuestR3LibXFree86
+#  LIBRARIES += \
+#        VBoxGuestR3LibXFree86
  endif
 endif
 LIBRARIES.win.amd64 += VBoxGuestR3Lib-x86 VBoxGuestR3LibShared-x86

--- a/src/VBox/Additions/x11/Makefile.kmk	2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -17,6 +17,10 @@
 SUB_DEPTH = ../../../..
 include $(KBUILD_PATH)/subheader.kmk

+ifn1of ($(XSERVER_VERSION), 13 14 15 16 17 18 19 110 111)
+ XSERVER_VERSION := 17
+endif
+
 # Include sub-makefiles.
 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
  include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk

--- a/src/VBox/Additions/x11/vboxmouse/Makefile.kmk	2013-03-19 18:55:28.818284256 +0000
+++ b/src/VBox/Additions/x11/vboxmouse/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -29,7 +29,6 @@
 # vboxmouse_drv
 #
 if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxmouse_drv
  vboxmouse_drv_TEMPLATE = VBOXGUESTR3XF86MOD
  vboxmouse_drv_DEFS.linux = linux
  vboxmouse_drv_DEFS.x86 += __i386__
@@ -69,7 +68,6 @@
 #
 # vboxmouse_drv_70
 #
-DLLS += vboxmouse_drv_70
 vboxmouse_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_70_DEFS = \
 	XFree86Server IN_MODULE XFree86Module XFree86LOADER XINPUT XORG_7X IN_XF86_MODULE DONT_DEFINE_WRAPPERS NO_ANSIC
@@ -85,7 +83,6 @@
 #
 # vboxmouse_drv_71
 #
-DLLS += vboxmouse_drv_71
 vboxmouse_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_71_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_71_INCS := \
@@ -100,7 +97,6 @@
 #
 # vboxmouse_drv_13
 #
-DLLS += vboxmouse_drv_13
 vboxmouse_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_13_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_13_INCS := \
@@ -114,7 +110,6 @@
 #
 # vboxmouse_drv_14
 #
-DLLS += vboxmouse_drv_14
 vboxmouse_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_14_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_14_INCS := \
@@ -128,7 +123,6 @@
 #
 # vboxmouse_drv_15
 #
-DLLS += vboxmouse_drv_15
 vboxmouse_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_15_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_15_INCS := \
@@ -142,7 +136,6 @@
 #
 # vboxmouse_drv_16
 #
-DLLS += vboxmouse_drv_16
 vboxmouse_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxmouse_drv_16_DEFS := $(vboxmouse_drv_70_DEFS) NO_ANSIC
 vboxmouse_drv_16_INCS := \

--- a/src/VBox/Additions/x11/vboxvideo/Makefile.kmk	2013-03-19 18:55:28.974949837 +0000
+++ b/src/VBox/Additions/x11/vboxvideo/Makefile.kmk	2013-03-19 18:56:00.468064457 +0000
@@ -53,7 +53,6 @@
 # vboxvideo_drv
 #
 if1of ($(KBUILD_TARGET), linux)
- SYSMODS += vboxvideo_drv
 endif   # target linux
 vboxvideo_drv_TEMPLATE = VBOXGUESTR3XF86MOD
 vboxvideo_drv_DEFS.linux = linux
@@ -128,7 +127,6 @@
 #         base keywords instead of using .solaris or .linux.
 #         Also it is *important* to use := and not = when deriving a property.
 #
-DLLS += vboxvideo_drv_70
 vboxvideo_drv_70_TEMPLATE = VBOXGUESTR3XORGMOD
 if1of ($(KBUILD_TARGET), linux)
  vboxvideo_drv_70_CFLAGS += \
@@ -149,7 +147,6 @@
 #
 # vboxvideo_drv_71
 #
-DLLS += vboxvideo_drv_71
 vboxvideo_drv_71_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_71_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_71_DEFS := $(vboxvideo_70_DEFS) XORG_VERSION_CURRENT=700100000
@@ -164,7 +161,6 @@
 #
 # vboxvideo_drv_13
 #
-DLLS += vboxvideo_drv_13
 vboxvideo_drv_13_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_13_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_13_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100300000
@@ -178,7 +174,6 @@
 #
 # vboxvideo_drv_14
 #
-DLLS += vboxvideo_drv_14
 vboxvideo_drv_14_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_14_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_14_DEFS := $(vboxvideo_13_DEFS) XORG_VERSION_CURRENT=100400000
@@ -192,7 +187,6 @@
 #
 # vboxvideo_drv_15
 #
-DLLS += vboxvideo_drv_15
 vboxvideo_drv_15_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_15_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_15_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100503000
@@ -213,7 +207,6 @@
 #
 # vboxvideo_drv_16
 #
-DLLS += vboxvideo_drv_16
 vboxvideo_drv_16_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_16_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_16_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100600000
@@ -227,7 +220,6 @@
 #
 # vboxvideo_drv_17
 #
-DLLS += vboxvideo_drv_17
 vboxvideo_drv_17_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_17_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_17_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100699000
@@ -241,7 +233,6 @@
 #
 # vboxvideo_drv_18
 #
-DLLS += vboxvideo_drv_18
 vboxvideo_drv_18_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_18_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_18_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100800000
@@ -255,7 +246,6 @@
 #
 # vboxvideo_drv_19
 #
-DLLS += vboxvideo_drv_19
 vboxvideo_drv_19_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_19_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_19_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=100900000
@@ -269,7 +259,6 @@
 #
 # vboxvideo_drv_110
 #
-DLLS += vboxvideo_drv_110
 vboxvideo_drv_110_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_110_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_110_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101000000
@@ -283,7 +272,6 @@
 #
 # vboxvideo_drv_111
 #
-DLLS += vboxvideo_drv_111
 vboxvideo_drv_111_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_111_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_111_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101100000
@@ -297,7 +285,6 @@
 #
 # vboxvideo_drv_112
 #
-DLLS += vboxvideo_drv_112
 vboxvideo_drv_112_TEMPLATE = VBOXGUESTR3XORGMOD
 vboxvideo_drv_112_CFLAGS := $(vboxvideo_drv_70_CFLAGS)
 vboxvideo_drv_112_DEFS := $(vboxvideo_15_DEFS) XORG_VERSION_CURRENT=101200000
@@ -341,6 +328,23 @@
 endif

+vboxvideo_drv_$(XSERVER_VERSION)_NAME := vboxvideo_drv
+vboxvideo_drv_$(XSERVER_VERSION)_INCS := \
+	/usr/include/xorg \
+	/usr/include/x11 \
+	/usr/include/pixman-1 \
+	/usr/include/X11/dri \
+	/usr/include/drm \
+	/usr/include/libdrm
+vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(PATH_ROOT)/src/VBox/Runtime/include
+DLLS += vboxvideo_drv_$(XSERVER_VERSION)
+
+# required for lenny backports
+ifeq ($(XSERVER_VERSION),14)
+	vboxvideo_drv_$(XSERVER_VERSION)_INCS += $(VBOX_PATH_X11_XORG_1_4)/xorg
+endif
+
+
 # Check the undefined symbols in the X.Org modules against lists of allowed
 # symbols.  Not very elegant, but it will catch problems early.


code:
--- a/src/VBox/Main/webservice/Makefile.kmk	2013-11-21 19:00:46.812761628 +0100
+++ b/src/VBox/Main/webservice/Makefile.kmk	2014-01-04 04:37:05.803599026 +0100
@@ -683,7 +683,7 @@
 : $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT))
 	$(RM) -f $@
-	$(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
+	$(REDIRECT) -C $(VBOXWEB_OUT_DIR) -- $(VBOX_SOAPCPP2) $(VBOXWEB_SOAPCPP2_SKIP_FILES) -z1 -L -2 -w -I$(VBOX_PATH_GSOAP_IMPORT) $(GSOAPH_RELEVANT)
 	$(APPEND) $@ done

 # copy the generated headers and stuff. This has to be a separate rule if we


code:
# 2015 © Sébastien Luttringer
--- a/src/VBox/RDP/client-1.8.3/Makefile.kmk 2013-02-19 23:12:20.207464901 +0100
+++ b/src/VBox/RDP/client-1.8.3/Makefile.kmk 2014-01-04 04:17:26.700618600 +0100
@@ -41,7 +41,7 @@
 	EGD_SOCKET=\"/var/run/egd-pool\" WITH_RDPSND=1 HAVE_DIRENT_H=1 \
 	HAVE_ICONV=1 HAVE_SYS_STATVFS_H=1 \
 	HAVE_SYS_PARAM_H=1 HAVE_SYS_MOUNT_H=1 HAVE_STRUCT_STATVFS_F_NAMEMAX=1 \
-	KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/opt/VirtualBox\")\"/rdesktop-vrdp-keymaps\" \
+	KEYMAP_PATH=$(if $(findstring RTPATH_APP_PRIVATE,$(CDEFS)),RTPATH_APP_PRIVATE,\"/usr/share/virtualbox\")\"/rdesktop-vrdp-keymaps\" \
 	RDESKTOP=1
 ifdef WITH_BIRD_VD_HACKS
  rdesktop-vrdp_DEFS += WITH_BIRD_VD_HACKS


code:
--- a/src/VBox/Additions/x11/vboxvideo/vboxvideo.h	2015-03-04 00:38:45.381480285 +0100
+++ b/src/VBox/Additions/x11/vboxvideo/vboxvideo.h	2015-03-04 00:40:57.536942966 +0100
@@ -130,15 +130,7 @@
 #define VBOX_MAX_DRAWABLES    256          /* At random. */

 #define VBOXPTR(p) ((VBOXPtr)((p)->driverPrivate))
-
-/** Helper to work round different ways of getting the root window in different
- * server versions. */
-#if defined(XORG_VERSION_CURRENT) && XORG_VERSION_CURRENT < 70000000 \
-    && XORG_VERSION_CURRENT >= 10900000
-# define ROOT_WINDOW(pScrn) screenInfo.screens[(pScrn)->scrnIndex]->root
-#else
-# define ROOT_WINDOW(pScrn) WindowTable[(pScrn)->scrnIndex]
-#endif
+#define ROOT_WINDOW(pScrn) screenInfo.screens[(pScrn)->scrnIndex]->root

 /** Structure containing all virtual monitor-specific information. */
 struct VBoxScreen


code:
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
KERNEL=="vboxdrvu", NAME="vboxdrvu", OWNER="root", GROUP="root", MODE="0666"
KERNEL=="vboxnetctl", NAME="vboxnetctl", OWNER="root", GROUP="root", MODE="0600"

SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"


code:
ACTION=="add", KERNEL=="vboxguest", SUBSYSTEM=="misc", OWNER="root", MODE="0600"
ACTION=="add", KERNEL=="vboxuser", SUBSYSTEM=="misc", OWNER="root", MODE="0666"


code:
# do not build test cases
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITH_VALIDATIONKIT :=

# no legacy X.org - use KMS
VBOX_USE_SYSTEM_XORG_HEADERS = 1
VBOX_NO_LEGACY_XORG_X11 = 1

# PisiLinux path
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
VBOX_PATH_PACKAGE_DOCS := $(VBOX_PATH_APP_DOCS)
VBOX_BLD_PYTHON = python
VBOX_JAVA_HOME = /usr/lib/jvm/java-7-openjdk

# do not fail on warning
VBOX_GCC_WERR =
VBOX_GCC_WARN =

# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z

# use system xorg
VBOX_USE_SYSTEM_XORG_HEADERS = 1

# no update request. update are handled via pisi
VBOX_WITH_UPDATE_REQUEST := 0


code:
VBOX_WITH_ADDITION_DRIVERS =
VBOX_WITH_INSTALLER = 1
VBOX_WITH_LINUX_ADDITIONS = 1
VBOX_WITH_X11_ADDITIONS = 1
VBOX_WITH_TESTCASES =
VBOX_WITH_TESTSUITE =
VBOX_WITH_ORIGIN :=
VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
VBOX_PATH_PACKAGE_DOCS := $(VBOX_PATH_APP_DOCS)
VBOX_WITH_REGISTRATION_REQUEST =
VBOX_WITH_UPDATE_REQUEST =
VBOX_BLD_PYTHON = python
VBOX_JAVA_HOME = /usr/lib/jvm/java-7-openjdk
VBOX_GCC_WERR =
VBOX_GCC_WARN =
# fix gsoap missing zlib include and produce errors with --as-needed
VBOX_GSOAP_CXX_LIBS := gsoapssl++ z


code:
Index: trunk/configure
===================================================================
--- trunk/configure
+++ trunk/configure
@@ -1921,9 +1921,32 @@
   else
     if test_execute; then
-      cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
-    fi
-  fi
-}
-
+      cat > $ODIR.tmp_src.c << EOF
+#include <linux/version.h>
+int printf(const char *format, ...);
+int main(void)
+{
+  return LINUX_VERSION_CODE > KERNEL_VERSION(4,8,0) ? 1 : 0;
+}
+EOF
+      echo "compiling the following source file:" >> $LOG
+      cat $ODIR.tmp_src.c >> $LOG
+      echo "using the following command line:" >> $LOG
+      echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include " \
+          "-I$LINUX/include/generated/uapi" >> $LOG
+      $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \
+          -I$LINUX/include/generated/uapi >> $LOG 2>&1
+      if [ $? -eq 0 ]; then
+        $ODIR.tmp_out
+        if [ $? -ne 0 ]; then
+          cnf_append "VBOX_WITH_VBOXDRV" ""
+          cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
+          echo "Detected Linux >= 4.8 -- disabling compiling of Linux kernel modules."
+        else
+          cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
+        fi
+      fi
+    fi
+  fi
+}

 #


code:
Index: VirtualBox-2.2.0_OSE/src/VBox/Installer/freebsd/VirtualBox.desktop
===================================================================
--- VirtualBox-2.2.0_OSE.orig/src/VBox/Installer/freebsd/virtualbox.desktop
+++ VirtualBox-2.2.0_OSE/src/VBox/Installer/freebsd/virtualbox.desktop
@@ -3,6 +3,7 @@ Encoding=UTF-8
 Version=1.0
 Name=Oracle VM VirtualBox
 GenericName=Virtual Machine
+GenericName[tr]=Sanal Makine
 Type=Application
 Exec=VirtualBox
 TryExec=VirtualBox
@@ -14,3 +15,4 @@ Comment[de]=Windows und andere Betriebss
 Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza
 Comment[sv]=Kör flera virtuella system på en enda värddator
 Comment[ko]=가상 머신
+Comment[tr]=Tek bir sunucu bilgisayarda birden fazla sanal sistem çalıştırın


code:
Description: upstream: 64269 64270
Index: virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ virtualbox/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -71,7 +71,7 @@
 	/usr/include/x11 \
 	/usr/include/xorg \
 	/usr/include/pixman-1 \
-	$(VBOX_MESA_INCS) \
+	$(VBOX_GL_INCS) \
 	/usr/include/drm \
 	/usr/include/libdrm
  VBoxOGL_DEFS     += VBOX_NO_NATIVEGL
@@ -439,7 +439,7 @@
 	array
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLarrayspu_INCS += \
-        $(VBOX_MESA_INCS)
+        $(VBOX_GL_INCS)
 endif
 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
  VBoxOGLarrayspu_INSTTYPE.win = none
@@ -487,7 +487,7 @@
 	passthrough
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLpassthroughspu_INCS += \
-        $(VBOX_MESA_INCS)
+        $(VBOX_GL_INCS)
 endif
 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
  VBoxOGLpassthroughspu_INSTTYPE.win = none
@@ -536,7 +536,7 @@
 	pack
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLpackspu_INCS += \
-        $(VBOX_MESA_INCS)
+        $(VBOX_GL_INCS)
 endif
 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
  VBoxOGLpackspu_INSTTYPE.win = none
@@ -642,7 +642,7 @@
 	feedback
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLfeedbackspu_INCS += \
-        $(VBOX_MESA_INCS)
+        $(VBOX_GL_INCS)
 endif
 if defined(VBOX_SIGNING_MODE) && defined(VBOX_WITH_WDDM)
  VBoxOGLfeedbackspu_INSTTYPE.win = none
Index: virtualbox/src/VBox/Additions/x11/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/Makefile.kmk
+++ virtualbox/src/VBox/Additions/x11/Makefile.kmk
@@ -20,12 +20,18 @@
 # Include sub-makefiles.
 if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
  include $(PATH_SUB_CURRENT)/VBoxClient/Makefile.kmk
- include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk
- ifneq ($(KBUILD_TARGET), solaris)
-  include $(PATH_SUB_CURRENT)/vboxmouse/Makefile.kmk
- endif
- ifndef VBOX_USE_SYSTEM_XORG_HEADERS
-  include $(PATH_SUB_CURRENT)/x11stubs/Makefile.kmk
+ ifndef VBOX_NO_LEGACY_XORG_X11
+  include $(PATH_SUB_CURRENT)/vboxvideo/Makefile.kmk
+  ifneq ($(KBUILD_TARGET), solaris)
+   include $(PATH_SUB_CURRENT)/vboxmouse/Makefile.kmk
+  endif
+  # This should logically only be controlled by VBOX_NO_LEGACY_XORG_X11,
+  # as it is not used for drivers at all, but rather to build X11 clients
+  # on systems missing needed libraries.
+  ## @todo fix at some later point when it will not break people's workflows.
+  ifndef VBOX_USE_SYSTEM_XORG_HEADERS
+   include $(PATH_SUB_CURRENT)/x11stubs/Makefile.kmk
+  endif
  endif
 endif

Index: virtualbox/src/VBox/GuestHost/OpenGL/Makefile.kmk
===================================================================
--- virtualbox.orig/src/VBox/GuestHost/OpenGL/Makefile.kmk
+++ virtualbox/src/VBox/GuestHost/OpenGL/Makefile.kmk
@@ -54,7 +54,7 @@
 VBoxOGLcrutil_INTERMEDIATES = $(VBOX_PATH_CROGL_GENFILES)/cr_opcodes.h
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLcrutil_INCS += \
-	$(VBOX_MESA_INCS)
+	$(VBOX_GL_INCS)
 endif
 VBoxOGLcrutil_SOURCES       = \
 	util/bbox.c \
@@ -199,7 +199,7 @@
 	packer
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLcrpacker_INCS += \
-	$(VBOX_MESA_INCS)
+	$(VBOX_GL_INCS)
 endif
 VBoxOGLcrpacker_INTERMEDIATES = \
 	$(VBOX_PATH_CROGL_GENFILES)/cr_packfunctions.h \
@@ -350,7 +350,7 @@
 	$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLspuload_INCS += \
-	$(VBOX_MESA_INCS)
+	$(VBOX_GL_INCS)
 endif
 VBoxOGLspuload_SOURCES = \
 	spu_loader/spuinit.c \
@@ -423,7 +423,7 @@
 	state_tracker
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLcrstate_INCS += \
-	$(VBOX_MESA_INCS)
+	$(VBOX_GL_INCS)
 endif
 VBoxOGLcrstate_INTERMEDIATES = \
 	$(VBOX_PATH_CROGL_GENFILES)/state/cr_statefuncs.h \
@@ -624,7 +624,7 @@
 	$(VBOX_PATH_CROGL_GENFILES)/spu_dispatch_table.h
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGLerrorspu_INCS += \
-	$(VBOX_MESA_INCS)
+	$(VBOX_GL_INCS)
 endif
 VBoxOGLerrorspu_SOURCES = \
 	$(VBOX_PATH_CROGL_GENFILES)/errorspu.c \
Index: virtualbox/src/VBox/Additions/x11/vboxvideo/helpers.c
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/vboxvideo/helpers.c
+++ virtualbox/src/VBox/Additions/x11/vboxvideo/helpers.c
@@ -82,7 +82,7 @@

     property_name = MakeAtom(pszName, strlen(pszName), TRUE);
     VBVXASSERT(property_name != BAD_RESOURCE, ("Failed to set atom \"%s\"\n", pszName));
-    ChangeWindowProperty(ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent);
+    dixChangeWindowProperty(serverClient, ROOT_WINDOW(pScrn), property_name, XA_INTEGER, 32, PropModeReplace, cData, paData, fSendEvent);
 }

 void vbvxReprobeCursor(ScrnInfoPtr pScrn)
Index: virtualbox/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
===================================================================
--- virtualbox.orig/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
+++ virtualbox/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
@@ -1229,7 +1229,7 @@
     updateGraphicsCapability(pScrn, TRUE);

     /* Register block and wake-up handlers for getting new screen size hints. */
-    RegisterBlockAndWakeupHandlers(vboxBlockHandler, (WakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);
+    RegisterBlockAndWakeupHandlers(vboxBlockHandler, (ServerWakeupHandlerProcPtr)NoopDDA, (pointer)pScrn);

     /* software cursor */
     miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
--- virtualbox-5.1.10-dfsg.orig/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
+++ virtualbox-5.1.10-dfsg/src/VBox/Additions/x11/vboxvideo/Makefile.kmk
@@ -376,7 +376,7 @@ vboxvideo_drv_118_SOURCES := $(vboxvideo

 ifdef VBOX_USE_SYSTEM_XORG_HEADERS
  # Build using local X.Org headers.  We assume X.Org Server 1.7 or later.
- DLLS    := $(filter-out vboxvideo_drv_%,$(DLLS)) vboxvideo_drv_system
+ DLLS    := $(filter-out vboxvideo_drv_%,$(DLLS))
  SYSMODS := $(filter-out vboxvideo_drv%,$(SYSMODS))
  vboxvideo_drv_system_TEMPLATE = VBOXGUESTR3XORGMOD
  vboxvideo_drv_system_CFLAGS := \


code:
# Start VirtualBox Clients on guest machines
test -c /dev/vboxguest && /usr/bin/VBoxClient-all


code:
#!/bin/bash

# vboxreload: shortcut to reload virtualbox host modules
#
# Copyright © 2016 Sébastien Luttringer
#
# 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; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

(( UID > 0 )) && { echo 'You must be root' >&2; exit 1; }

modules=(vboxnetadp vboxnetflt vboxpci vboxdrv)

echo -n 'Unloading modules: '
for _m in "${modules[@]}"; do
  lsmod|grep -q "$_m" && rmmod "$_m" && echo -n "$_m "
done
echo

echo -n 'Loading modules: '
for _m in "${modules[@]}"; do
  modprobe "$_m" && echo -n "$_m "
done
echo

# vim:set ts=2 sw=2 ai et:


code:
--- VirtualBox-4.0.0_OSE/configure
+++ VirtualBox-4.0.0_OSE/configure
@@ -2527,7 +2527,6 @@
   check_compiler_h
   [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit
   # tools/common/makeself*
-  [ $OSE -ge 1 ] && check_makeself
 fi

 [ -n "$SETUP_WINE" ] && setup_wine


code:
Index: VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk
===================================================================
--- VirtualBox-5.1.2.orig/src/VBox/Additions/common/crOpenGL/Makefile.kmk
+++ VirtualBox-5.1.2/src/VBox/Additions/common/crOpenGL/Makefile.kmk
@@ -68,18 +68,12 @@ VBoxOGL_TEMPLATE       = VBOXCROGLR3GUES
 VBoxOGL_INCS           = .
 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_INCS     += \
-	$(VBOX_PATH_X11_ROOT)/libXdamage-1.1 \
-	$(VBOX_PATH_X11_ROOT)/libXcomposite-0.4.0 \
-	$(VBOX_PATH_X11_ROOT)/libXext-1.3.1 \
-	$(VBOX_PATH_X11_ROOT)/libXfixes-4.0.3 \
-	$(VBOX_PATH_X11_ROOT)/damageproto-1.1.0 \
-	$(VBOX_PATH_X11_ROOT)/compositeproto-0.4 \
-	$(VBOX_PATH_X11_ROOT)/fixesproto-4.0 \
-	$(VBOX_PATH_X11_ROOT)/libx11-1.1.5-other \
-	$(VBOX_PATH_X11_ROOT)/xextproto-7.1.1 \
-	$(VBOX_PATH_X11_ROOT)/xproto-7.0.18 \
+	/usr/include/x11 \
+	/usr/include/xorg \
+	/usr/include/pixman-1 \
 	$(VBOX_MESA_INCS) \
-	$(PATH_ROOT)/src/VBox/Additions/x11/x11include/libdrm-2.4.13
+	/usr/include/drm \
+	/usr/include/libdrm
  VBoxOGL_DEFS     += VBOX_NO_NATIVEGL
 endif

@@ -214,10 +208,10 @@ VBoxOGL_LIBS.win += \

 if1of ($(KBUILD_TARGET), linux solaris freebsd)
  VBoxOGL_LIBS += \
- 	$(PATH_STAGE_LIB)/libXcomposite.so \
- 	$(PATH_STAGE_LIB)/libXdamage.so \
- 	$(PATH_STAGE_LIB)/libXfixes.so \
- 	$(PATH_STAGE_LIB)/libXext.so
+ 	Xcomposite \
+ 	Xdamage \
+ 	Xfixes \
+ 	Xext
  ifdef VBoxOGL_FAKEDRI
   ifeq ($(KBUILD_TARGET), freebsd)
     VBoxOGL_LIBS += \
Index: VirtualBox-5.1.2/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
===================================================================
--- VirtualBox-5.1.2.orig/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
+++ VirtualBox-5.1.2/src/VBox/Additions/common/VBoxGuestLib/Makefile.kmk
@@ -40,8 +40,6 @@ LIBRARIES += \
 	VBoxGuestR3LibShared
 ifndef VBOX_ONLY_VALIDATIONKIT
  if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd)
-  LIBRARIES += \
-  	VBoxGuestR3LibXFree86
  endif
  if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
   LIBRARIES += \


code:
--- VirtualBox-5.1.0_BETA2.orig/src/VBox/Installer/linux/VBox.sh	2016-06-06 21:48:53.000000000 +0300
+++ VirtualBox-5.1.0_BETA2/src/VBox/Installer/linux/VBox.sh	2016-06-17 21:24:47.111130079 +0300
@@ -56,16 +56,21 @@

 if [ "$1" = "shutdown" ]; then
     SHUTDOWN="true"
-elif ! lsmod|grep -q vboxdrv; then
-    cat << EOF
+elif [ -x /usr/libexec/virt-wrapper ]; then
+    /usr/libexec/virt-wrapper virtualbox || exit 1
+
+    if ! lsmod|grep -q vboxdrv; then
+        cat << EOF
 WARNING: The vboxdrv kernel module is not loaded. Either there is no module
          available for the current kernel (`uname -r`) or it failed to
          load. Please recompile the kernel module and install it by

            sudo /sbin/vboxconfig
+         load.

          You will not be able to start VMs until this problem is fixed.
 EOF
+    fi
 elif [ ! -c /dev/vboxdrv ]; then
     cat << EOF
 WARNING: The character device /dev/vboxdrv does not exist. Try


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>virtualbox</Name>
        <Homepage>http://www.virtualbox.org/</Homepage>
        <Packager>
            <Name>Serdar Soytetir</Name>
            <Email>kaptan@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:gui</IsA>
        A powerful virtualization program
        <Description>VirtualBox is a family of powerful x86 virtualization products for enterprise as well as home use. This is the Open Source Edition which lacks USB support and some other things.</Description>
        <Archive sha1sum="d523d30d36cc4a4456eb7ab50f33a58a3f87c022" type="tarbz2">http://download.virtualbox.org/virtualbox/5.2.2/VirtualBox-5.2.2.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>dev86</Dependency>
            <Dependency>cdrkit</Dependency>
            <Dependency>acpica</Dependency>
            <Dependency>mesa-devel</Dependency>
            <Dependency>curl-devel</Dependency>
            <Dependency>python-devel</Dependency>
            <Dependency>pam-devel</Dependency>
            <Dependency>device-mapper-devel</Dependency>
            <Dependency>libcap-devel</Dependency>
            <Dependency>gsoap-devel</Dependency>
            <Dependency>libXt-devel</Dependency>
            <Dependency>libXmu-devel</Dependency>
            <Dependency>libIDL-devel</Dependency>
            <Dependency>libsdl-devel</Dependency>
            <Dependency>libvpx-devel</Dependency>
            <Dependency>libXext-devel</Dependency>
            <Dependency>libxslt-devel</Dependency>
            <Dependency>mesa-glu-devel</Dependency>
            <Dependency>alsa-lib-devel</Dependency>
            <Dependency>libXfixes-devel</Dependency>
            <Dependency>libXrandr-devel</Dependency>
            <Dependency>libXdamage-devel</Dependency>
            <Dependency>libXcursor-devel</Dependency>
            <Dependency>libXinerama-devel</Dependency>
            <Dependency>xorg-server-devel</Dependency>
            <Dependency>libvncserver-devel</Dependency>
            <Dependency>libXcomposite-devel</Dependency>
            <Dependency>pulseaudio-libs-devel</Dependency>
            <Dependency>kernel-module-headers</Dependency>
            <Dependency>qt5-x11extras-devel</Dependency>
            <Dependency>jdk7-openjdk</Dependency>
            <Dependency>jre7-openjdk</Dependency>
            <Dependency>libxcb-devel</Dependency>
            <Dependency>qt5-base-devel</Dependency>
            <Dependency>qt5-linguist</Dependency>
            <Dependency>docbook-xml</Dependency>
        </BuildDependencies>
        <AdditionalFiles>
            <AdditionalFile target="LocalConfig.kmk">LocalConfig.kmk</AdditionalFile>
        </AdditionalFiles>
        <Patches>
            <Patch level="1">wrapper.patch</Patch>
            <Patch level="1">002-dri-driver-path.patch</Patch>
            <Patch level="1">003-ogl-include-new.patch</Patch>
            <Patch level="1">008-root-window.patch</Patch>

            <Patch level="1">python.patch</Patch>

        </Patches>
    </Source>

    <Package>
        <Name>virtualbox</Name>
        <RuntimeDependencies>
            <Dependency>qt5-base</Dependency>
            <Dependency>libxcb</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>libXt</Dependency>
            <Dependency>gsoap</Dependency>
            <Dependency>libvpx</Dependency>
            <Dependency>libXmu</Dependency>
            <Dependency>libsdl</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXcursor</Dependency>
            <Dependency>libXinerama</Dependency>
            <Dependency>virt-wrapper</Dependency>
            <Dependency>libvncserver</Dependency>
            <Dependency>curl</Dependency>
            <Dependency>zlib</Dependency>
            <Dependency>libX11</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>libpng</Dependency>
            <Dependency>python</Dependency>
            <Dependency>libxml2</Dependency>
            <Dependency>openssl</Dependency>
            <Dependency>device-mapper</Dependency>
            <Dependency>qt5-x11extras</Dependency>
            <Dependency version="current">module-virtualbox</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/etc/vbox</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="library">/usr/lib/virtualbox</Path>
            <Path fileType="library">/usr/lib/python*</Path>
            <Path fileType="data">/usr/share/virtualbox</Path>
            <Path fileType="data">/usr/share/applications</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
            <Path fileType="data">/usr/share/icons/hicolor</Path>
            <Path fileType="data">/usr/share/mime/packages</Path>
        </Files>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
            <COMAR script="service.py">System.Service</COMAR>
        </Provides>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/usr/bin/vboxreload">vboxreload</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/lib/udev/rules.d/60-vboxdrv.rules">60-vboxdrv.rules</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/lib/udev/rules.d/60-vboxguest.rules">60-vboxguest.rules</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>virtualbox-guest-utils</Name>
        <PartOf>x11.driver</PartOf>
        VirtualBox guest utilities and drivers
        <RuntimeDependencies>
            <Dependency>pam</Dependency>
            <Dependency>libXt</Dependency>
            <Dependency>libXmu</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXfixes</Dependency>
            <Dependency>libXrandr</Dependency>
            <Dependency>libXdamage</Dependency>
            <Dependency>xorg-server</Dependency>
            <Dependency>libXcomposite</Dependency>
            <Dependency version="current">module-virtualbox-guest</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/etc/X11/Xsession.d</Path>
            <Path fileType="data">/lib/udev/rules.d</Path>
            <Path fileType="library">/lib/security</Path>
            <Path fileType="executable">/sbin</Path>
            <Path fileType="executable">/usr/bin/VBoxClient*</Path>
            <Path fileType="executable">/usr/bin/VBoxControl</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/usr/kde/*/share/autostart</Path>
            <Path fileType="data">/usr/share/X11</Path>
            <Path fileType="library">/usr/lib/xorg/modules</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/X11/Xsession.d/98-vboxclient.sh">vboxclient.sh</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <History>
        <Update release="12">
            <Date>2017-11-25</Date>
            <Version>5.2.2</Version>
            <Comment>Version bump.</Comment>
            <Name>Mustafa Cinasal</Name>
            <Email>muscnsl@gmail.com</Email>
        </Update>
        <Update release="11">
            <Date>2017-03-11</Date>
            <Version>5.1.14</Version>
            <Comment>Rebuild.</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="10">
            <Date>2017-03-04</Date>
            <Version>5.1.14</Version>
            <Comment>Version Bump</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="9">
            <Date>2017-01-15</Date>
            <Version>5.1.12</Version>
            <Comment>Version Bump</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
        <Update release="8">
            <Date>2016-12-13</Date>
            <Version>5.1.10</Version>
            <Comment>Version Bump</Comment>
            <Name>Ergün Salman</Name>
            <Email>poyraz76@pisilinux.org</Email>
        </Update>
        <Update release="7">
            <Date>2016-09-23</Date>
            <Version>5.1.6</Version>
            <Comment>Version Bump</Comment>
            <Name>Ergün Salman</Name>
            <Email>poyraz76@pisilinux.org</Email>
        </Update>
        <Update release="6">
            <Date>2016-08-17</Date>
            <Version>5.1.4</Version>
            <Comment>Version Bump</Comment>
            <Name>Ergün Salman</Name>
            <Email>poyraz76@pisilinux.org</Email>
        </Update>
        <Update release="5">
            <Date>2016-07-22</Date>
            <Version>5.1.2</Version>
            <Comment>Version Bump</Comment>
            <Name>Ergün Salman</Name>
            <Email>poyraz76@pisilinux.org</Email>
        </Update>
        <Update release="4">
            <Date>2016-07-17</Date>
            <Version>5.1.0</Version>
            <Comment>Version Bump</Comment>
            <Name>Ergün Salman</Name>
            <Email>poyraz76@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-17</Date>
            <Version>5.1.0b</Version>
            <Comment>Version Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-12</Date>
            <Version>5.0.12</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
       <Update release="1">
            <Date>2015-08-09</Date>
            <Version>5.0.12</Version>
            <Comment>First release</Comment>
            <Name>ali algul</Name>
            <Email>alialgul@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>virtualbox</Name>
        Güçlü bir sanallaştırma programı
        <Description xml:lang="tr">VirtualBox, ev kullanımı yanında kurumsal kullanım alanı da bulan güçlü bir xf86 sanallaştırma ürünleri ailesidir. Bu sürüm, USB ve birkaç özellik için desteği bulunmayan açık kodlu uyarlamasıdır.</Description>
    </Source>

    <Package>
        <Name>virtualbox-guest-utils</Name>
        VirtualBox misafir işletim sistemleri için yardımcı araçlar ve sürücüler
    </Package>
</PISI>


code:
'''
Created on 24-12-2012

@author: marcin
'''
import os
import re

rootpath = "."
specfile = "pspec.xml"
newcomment = "First release"
newrelease = "1"
relative_backup_path = "../backup"

def read_file(path):
    with open(path) as f:
        return f.read().strip()

def reset_history(spec):
    release = re.compile("(.*?release\s*=\s*)[\"\']\d+[\"\'](.*?)")
    newspec = ''
    history = False
    update1 = False
    skipline = False
    for line in spec.split("\n"):
        if "</History>" in line: history = False
        if "<History>" in line: history = True
        if history:
            if "</Update>" in line:
                if not update1: newspec = "\n".join((newspec, line))
                update1 = True
            if update1: continue
            else:
                if "<Update" in line: line = re.sub(release, r'\1"%s"\2' % newrelease, line)
                elif "<Comment" in line:
                    if not "</Comment" in line:
                        skipline = True
                if "</Comment" in line:
                    skipline = False
                    line = " " * 12 + "<Comment>%s</Comment>" % newcomment
                if not skipline: newspec = "\n".join((newspec, line))
        else: newspec = "\n".join((newspec, line))
    return newspec

if __name__ == '__main__':
    backup_path = os.path.normpath(os.path.join(rootpath, relative_backup_path))
    if not os.path.isdir(backup_path):
        os.makedirs(backup_path)
    else:
        suffix = 0
        parent_backup = os.path.dirname(backup_path)
        base_name = os.path.basename(relative_backup_path)
        for d in os.listdir(parent_backup):
            if d.startswith(base_name):
                ext = d.replace(base_name, '')
                if os.path.isdir("%s/%s" % (parent_backup, d)) and ext.isdigit():
                    if int(ext) > suffix:
                        suffix = int(ext)
        suffix +=1
        suffix = "0%d" % suffix if suffix < 10 else str(suffix)
        os.rename(backup_path, backup_path + suffix)
        os.makedirs(backup_path)

    for root, dirs, files in os.walk(rootpath):
        if specfile in files:
            f = "%s/%s" % (root, specfile)
            print(f)
            spec = read_file(f)
            bf = "%s/%s" % (os.path.normpath(root.replace(rootpath, relative_backup_path)), specfile)
            os.makedirs(os.path.dirname(bf))
            open(bf, "w").write(spec)
            open(bf, "a").write("\n")
            open(f, "w").write(reset_history(spec))
            open(f, "a").write("\n")


code:
<PISI>
    <Name>kernel</Name>
</PISI>


code:
<PISI>
    <Name>kernel.drivers</Name>
</PISI>


code:
# -*- 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 kerneltools
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

WorkDir = "./"
KDIR = kerneltools.getKernelVersion()
NoStrip = ["/lib/modules"]

BuildDir = "common/lib/modules/fglrx/build_mod"

if get.buildTYPE() == 'emul32':
    Target = "x86"
    Libdir = "/usr/lib32"
else:
    Target = get.ARCH().replace("i686", "x86")
    Libdir = "/usr/lib"

XDir = "xpic" + ("_64a" if Target == "x86_64" else "")

def setup():
    shelltools.makedirs("%s/common" % get.workDIR())
    shelltools.move("lib", "%s/common/" % get.workDIR())
    shelltools.move("usr", "%s/common/" % get.workDIR())
    shelltools.move("etc", "%s/common/" % get.workDIR())
    #shelltools.export("SETUP_NOCHECK", "1")
    #shelltools.system("sh amd-driver-installer-*-x86.x86_64.run --extract .")

    if get.buildTYPE() == "emul32":
        return

    # Needed during kernel module compiling
    shelltools.sym("../../../../../arch/%s/lib/modules/fglrx/build_mod/libfglrx_ip.a" % Target, "%s/libfglrx_ip.a" % BuildDir)

    pisitools.dosed("%s/make.sh" % BuildDir, r"^linuxincludes=.*", "linuxincludes=/lib/modules/%s/build/include" % KDIR)
    pisitools.dosed("%s/make.sh" % BuildDir, r"^uname_r=.*", "uname_r=%s" % KDIR)
    pisitools.dosed("common/etc/ati/authatieventsd.sh", "/var/lib/xdm/authdir/authfiles", "/var/run/xauth")

    shelltools.system("patch -p1 < desktop-files.patch")

    #shelltools.system("patch -p1 < fglrx_gpl_symbol.patch")
    #shelltools.system("patch -p1 < kolasa_4.0-cr4-strn.patch")
    #shelltools.system("patch -p1 < lano1106_fglrx_intel_iommu.patch")
    #shelltools.system("patch -p1 < lano1106_kcl_agp_13_4.patch")
    shelltools.system("patch -p1 < makefile_compat.patch")
    #shelltools.system("patch -p1 < 4.4-manjaro-xstate.patch")

def build():
    shelltools.export("SHELL", "/bin/sh")
    if get.buildTYPE() == "emul32":
        return

    shelltools.cd(BuildDir)
    shelltools.system("sh ./make.sh")

def install():
    # Controlcenter binaries
    if not get.buildTYPE() == 'emul32':
        pisitools.dobin("arch/%s/usr/X11R6/bin/*" % Target)
        pisitools.dobin("common/usr/X11R6/bin/*")
        pisitools.dosbin("arch/%s/usr/sbin/*" % Target)
        pisitools.dobin("arch/%s/usr/bin/*" % Target)
        pisitools.dosbin("common/usr/sbin/*")

   # Controlcenter libraries
    # The other files under /usr/share are common files like icon,man,doc ,etc ..
    DIRS = {
            "common/usr/share/doc/fglrx/examples/etc/acpi/events": "/etc/acpi",
            "common/etc/*": "/etc",
            "arch/%s/etc/OpenCL/*" % Target:     "/etc/OpenCL",
            "arch/%s/usr/X11R6/lib*/*" % Target: Libdir,
            "arch/%s/usr/lib*/*" % Target: Libdir,
            "common/usr/share/*": "/usr/share"
            }

    # Emul32 package don't need files that belongs to /usr/share
    if get.buildTYPE() == "emul32":
        del DIRS["common/usr/share/*"]
        del DIRS["common/etc/*"]
        del DIRS["common/usr/share/doc/fglrx/examples/etc/acpi/events"]

    for source, target in DIRS.items():
        pisitools.insinto(target, source)

   # pisitools.insinto("usr/share/ati/lib64", "arch/%s/usr/share/ati/lib*/*" % Target)

    # X.org drivers
    pisitools.domove("%s/modules" % Libdir, "%s/fglrx" % Libdir)
    pisitools.insinto("%s/fglrx/modules" % Libdir, "%s/usr/X11R6/lib*/modules/*" % XDir)
    pisitools.insinto("%s/xorg/modules" % Libdir, "%s/usr/X11R6/lib*/modules/*" % XDir)

    # libGl library name changed to fglrx-libGl since 1.15
    pisitools.domove("%s/fglrx/fglrx-libGL.so.1.2" % Libdir, "%s/fglrx" % Libdir, "libGL.so.1.2.0")

    pisitools.domove("%s/fglrx/modules/dri" % Libdir, "%s/xorg/modules/" % Libdir)

    pisitools.domove("%s/fglrx/modules/extensions/fglrx/fglrx-libglx.so" % Libdir,
                     "%s/fglrx/modules/extensions" % Libdir, "libglx.so")

    # Necessary symlinks
    pisitools.dosym("%s/xorg/modules/dri/fglrx_dri.so" % Libdir, "%s/dri/fglrx_dri.so" % Libdir)

    pisitools.dosym("libatiuki.so.1.0", "%s/libatiuki.so.1" % Libdir)
    pisitools.dosym("libatiuki.so.1", "%s/libatiuki.so" % Libdir)

    pisitools.dosym("libfglrx_dm.so.1.0", "%s/libfglrx_dm.so.1" % Libdir)
    pisitools.dosym("libfglrx_dm.so.1", "%s/libfglrx_dm.so" % Libdir)

    pisitools.dosym("libAMDXvBA.so.1.0", "%s/libAMDXvBA.so.1" % Libdir)
    pisitools.dosym("libAMDXvBA.so.1", "%s/libAMDXvBA.so" % Libdir)

    pisitools.dosym("libXvBAW.so.1.0", "%s/libXvBAW.so.1" % Libdir)
    pisitools.dosym("libXvBAW.so.1", "%s/libXvBAW.so" % Libdir)

    # remove static libs
    pisitools.remove("%s/*.a" % Libdir)
    if shelltools.isFile("%s%s/fglrx/modules/esut.a" % (get.installDIR(), Libdir)):
        pisitools.remove("%s/fglrx/modules/esut.a" % Libdir)

    # compatibility links
    pisitools.dosym("xorg/modules", "%s/modules" % Libdir)

    # OK, That's the end of emul32 build, it's time to exit.
    if get.buildTYPE() == "emul32":
        return

    # Another compatibility link
    pisitools.dosym("/usr", "/usr/X11R6")

    pisitools.dosym("../security/console.apps/amdcccle-su", "/etc/pam.d/amdcccle-su")

    # copy compiled kernel module
    pisitools.insinto("/lib/modules/%s/extra/fglrx" % KDIR, "common/lib/modules/fglrx/fglrx.%s.ko" % KDIR, "fglrx.ko")
    pisitools.insinto("/lib/modules/%s/kernel/drivers/char/drm" % KDIR, "common/lib/modules/fglrx/fglrx.%s.ko" % KDIR, "fglrx.ko")

    # control script for ACPI lid state and AC adapter state
    pisitools.insinto("/etc/acpi", "common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh")

    # not needed as xdg-utils package provides xdg-su
    pisitools.remove("/usr/bin/amdxdg-su")

    pisitools.domove("/usr/share/icons/ccc_large.xpm", "/usr/share/pixmaps", "amdcccle.xpm")
    pisitools.removeDir("/usr/share/icons")

    #LICENSE information
    pisitools.dodoc("LICENSE.TXT")

    # Fix file permissions
    exec_file_suffixes = (".sh", ".so", ".so.1.2.0")
    exec_dir_suffixes = ("/bin", "/sbin", "/lib")

    import os
    for root, dirs, files in os.walk(get.installDIR()):
        for name in files:
            filePath = os.path.join(root, name)
            if os.path.islink(filePath):
                continue
            if root.endswith(exec_dir_suffixes) \
                or name.endswith(exec_file_suffixes):
                shelltools.chmod(filePath, 0755)
            else:
                shelltools.chmod(filePath, 0644)


code:
#!/usr/bin/python

import os

libdir = "/usr/lib32/fglrx"

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    os.system("/usr/sbin/alternatives \
                --install   /usr/lib32/libGL.so.1.2.0 libGL-32bit %(libdir)s/libGL.so.1.2.0     50 \
                --slave     /usr/lib32/xorg/modules/volatile  xorg-modules-volatile-32bit   %(libdir)s/modules"
              % {"libdir": libdir})

def preRemove():
    # FIXME This is not needed when upgrading package; but pisi does not
    #       provide a way to learn operation type.
    #os.system("/usr/sbin/alternatives --remove libGL-32bit %s/libGL.so.1.2" % libdir)
    pass


code:
#!/usr/bin/python

import os

libdir = "/usr/lib/fglrx"

def postInstall(fromVersion, fromRelease, toVersion, toRelease):
    os.system("/usr/sbin/alternatives \
                --install   /usr/lib/libGL.so.1.2.0           libGL                   %(libdir)s/libGL.so.1.2.0     50 \
                --slave     /usr/lib/xorg/modules/volatile  xorg-modules-volatile   %(libdir)s/modules"
              % {"libdir": libdir})

def preRemove():
    # FIXME This is not needed when upgrading package; but pisi does not
    #       provide a way to learn operation type.
    #os.system("/usr/sbin/alternatives --remove libGL %s/libGL.so.1.2" % libdir)
    pass


code:
# -*- coding: utf-8 -*-
serviceType = "local"
serviceDesc = _({"en": "ATI Events Daemon",
                 "tr": "ATI Olay Servisi"})
serviceConf = "atieventsd"

from comar.service import *

@synchronized
def start():
    startService(command="/usr/sbin/atieventsd",
                 args=config.get("ATIEVENTSDOPTS", ""),
                 donotify=True)

@synchronized
def stop():
    stopService(command="/usr/sbin/atieventsd",
                donotify=True)

def status():
    return isServiceRunning(command="/usr/sbin/atieventsd")


code:
--- 15.12/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-12-18 19:47:41.000000000 +0100
+++ b/firegl_public.c	2015-12-19 20:48:13.223261632 +0100
@@ -6450,12 +6450,15 @@
    struct fpu *fpu = &tsk->thread.fpu;

    if(static_cpu_has(X86_FEATURE_XSAVE)) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-      fpu_xsave(fpu);
-      if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
+	  copy_xregs_to_kernel(&fpu->state.xsave);
+      if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
 	  copy_xregs_to_kernel(&fpu->state.xsave);
       if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
+#else
+      fpu_xsave(fpu);
+      if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
 #endif
          return 1;
    } else if (static_cpu_has(X86_FEATURE_FXSR)) {


code:
Index: work/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
===================================================================
--- work.orig/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
+++ work/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh
@@ -4,10 +4,12 @@
 # Control script for ACPI lid state and AC adapter state
 #

+test -d /sys/module/fglrx || exit 0
+
 getXuser() {
-        user=`finger| grep -m1 ":$displaynum " | awk '{print $1}'`
+        user=`who | grep -m1 ":$displaynum " | awk '{print $1}'`
         if [ x"$user" = x"" ]; then
-                user=`finger| grep -m1 ":$displaynum" | awk '{print $1}'`
+                user=`who | grep -m1 ":$displaynum" | awk '{print $1}'`
         fi
         if [ x"$user" != x"" ]; then
                 userhome=`getent passwd $user | cut -d: -f6`


code:
[Unit]
Description=ATI Events Daemon

[Service]
ExecStart=/usr/sbin/atieventsd --nodaemon

[Install]
WantedBy=multi-user.target


code:
# Advanced Micro Devices, Inc.
# radeon conflicts with AMD Linux Graphics Driver
blacklist radeon


code:
--- 14.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-02-23 19:26:52.215995002 +0100
+++ 14.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-02-23 19:27:59.320999596 +0100
@@ -1761,7 +1761,11 @@
 #else

 #ifdef current_euid
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
+    return __kuid_val(current_euid());
+#else
     return current_euid();
+#endif
 #else
     return current->euid;
 #endif


code:
Index: work/common/usr/share/applications/amdcccle.desktop
===================================================================
--- work.orig/common/usr/share/applications/amdcccle.desktop
+++ work/common/usr/share/applications/amdcccle.desktop
@@ -1,9 +1,10 @@
 [Desktop Entry]
 Encoding=UTF-8
 Type=Application
-Exec=amdcccle
-Icon=ccc_large
+Exec=amdcccle
+Icon=amdcccle
 Categories=GNOME;KDE;GTK;Qt;HardwareSettings;Settings;
+TryExec=/sys/module/fglrx

 Name=AMD Catalyst Control Center
@@ -44,7 +45,7 @@ Name[sv]=AMD Catalyst Control Center
 Comment[sv]=Möjliggör konfiguration av inställningar för AMD-grafikmaskinvara.
 Name[th]=AMD Catalyst Control Center
 Comment[th]=ยอมให้ตั้งค่าฮาร์ดแวร์กราฟิก AMD
-Name[tr]=AMD Catalyst Control Center
+Name[tr]=AMD Catalyst Denetim Merkezi
 Comment[tr]=AMD grafik donanım ayarlarının yapılandırılmasına olanak sağlar.
 Name[zh_CN]=AMD Catalyst Control Center
 Comment[zh_CN]=允许配置 AMD 图形硬件设置。
Index: work/common/usr/share/applications/amdccclesu.desktop
===================================================================
--- work.orig/common/usr/share/applications/amdccclesu.desktop
+++ work/common/usr/share/applications/amdccclesu.desktop
@@ -1,9 +1,10 @@
 [Desktop Entry]
 Encoding=UTF-8
 Type=Application
-Exec=amdxdg-su -c amdcccle
+Exec=xdg-su -c amdcccle
 Categories=GNOME;KDE;GTK;Qt;HardwareSettings;Settings;
-Icon=ccc_large
+Icon=amdcccle
+TryExec=/sys/module/fglrx

 Name=AMD Catalyst Control Center (Administrative)
 Comment=Allows the configuration of the AMD graphics hardware settings that requires administrative access.
@@ -43,7 +44,7 @@ Name[sv]=AMD Catalyst Control Center (Ad
 Comment[sv]=Möjliggör konfiguration av inställningar för AMD-grafikmaskinvara som kräver administrativ åtkomst.
 Name[th]=AMD Catalyst Control Center (สิทธิ์ผู้ดูแลระบบ)
 Comment[th]=ยอมให้ตั้งค่าฮาร์ดแวร์กราฟิก AMD ที่ต้องใช้สิทธิ์ของผู้ดูแลระบบ
-Name[tr]=AMD Catalyst Control Center (Yönetici)
+Name[tr]=AMD Catalyst Denetim Merkezi (Yönetici)
 Comment[tr]=Yönetici erişimi gerektiren AMD grafik donanım ayarlarının yapılandırılmasına olanak sağlar.
 Name[zh_CN]=AMD Catalyst Control Center（管理）
 Comment[zh_CN]=允许配置需要管理权限才能访问的 AMD 图形硬件设置。


code:
Already defined in mesa

Signed-off-by: Thomas Backlund <tmb@mageia.org>

diff -Nurp fglrx-13.250.18.orig/common/usr/include/GL/glATI.h fglrx-13.250.18/common/usr/include/GL/glATI.h
--- fglrx-13.250.18.orig/common/usr/include/GL/glATI.h	2013-12-06 13:46:50.339162515 +0200
+++ fglrx-13.250.18/common/usr/include/GL/glATI.h	2013-12-06 13:51:18.621140440 +0200
@@ -5367,7 +5367,9 @@ typedef GLvoid (APIENTRY * PFNGLTEXRENDE
 #define GL_SAMPLE_MASK_VALUE                               0x8E52
 #define GL_MAX_SAMPLE_MASK_WORDS                           0x8E59
 #define GL_TEXTURE_2D_MULTISAMPLE                          0x9100
+#ifndef GL_PROXY_TEXTURE_2D_MULTISAMPLE
 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE                    0X9101
+#endif
 #define GL_TEXTURE_2D_MULTISAMPLE_ARRAY                    0x9102
 #define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY              0x9103
 #define GL_MAX_COLOR_TEXTURE_SAMPLES                       0x910E
@@ -5385,11 +5387,13 @@ typedef GLvoid (APIENTRY * PFNGLTEXRENDE
 #define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY       0x910D

 typedef GLvoid (APIENTRY * PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield value);
+#if 0
 typedef GLvoid (APIENTRY * PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat,
                                                             GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+
 typedef GLvoid (APIENTRY * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat,
                                                             GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
-
+#endif
 // GL_EXT_timer_query
 #define GL_TIME_ELAPSED_EXT               0x88BF

@@ -6006,6 +6010,7 @@ typedef GLvoid (APIENTRY * PFNGLDEBUGMES
 typedef GLvoid (APIENTRY * PFNGLDEBUGMESSAGECALLBACKARB)(GLvoid* callback, GLvoid* userParam);
 typedef GLuint (APIENTRY * PFNGLGETDEBUGMESSAGELOGARB)(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog);

+#if 0
 typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,
                                         GLenum type,
                                         GLuint id,
@@ -6014,6 +6019,7 @@ typedef void (APIENTRY *GLDEBUGPROCARB)(
                                         const GLchar* message,
                                         GLvoid* userParam);
 // end ARB_debug_output
+#endif

 /* ARB_debug_group (KHR_debug) */


code:
diff -Nurp fglrx.orig/lib/modules/fglrx/build_mod/firegl_public.c fglrx/lib/modules/fglrx/build_mod/firegl_public.c
--- fglrx.orig/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-09 17:10:17.000000000 +0300
+++ fglrx/lib/modules/fglrx/build_mod/firegl_public.c	2014-09-23 23:18:51.342432159 +0300
@@ -1093,6 +1093,9 @@ static int fglrx_pci_suspend(struct pci_
     // directly here to allow suspend/resume without X server start.
         firegl_pci_save_state((KCL_PCI_DevHandle)pdev, privdev);
         pci_disable_device(pdev);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
+        pci_ignore_hotplug(pdev);
+#endif
         PMSG_EVENT(pdev->dev.power.power_state) = state;
     }
     else
diff -Nurp fglrx.orig/lib/modules/fglrx/build_mod/kcl_acpi.c fglrx/lib/modules/fglrx/build_mod/kcl_acpi.c
--- fglrx.orig/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-09 17:10:17.000000000 +0300
+++ fglrx/lib/modules/fglrx/build_mod/kcl_acpi.c	2014-09-23 23:45:27.016475868 +0300
@@ -840,10 +840,12 @@ static acpi_status KCL_ACPI_Slot_No_Hotp
    if(tdev != NULL)
    {
       device = (acpi_device_adr(tdev) >> 16) & 0xffff;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)
       if(PCI_SLOT(pdev->devfn) == device)
       {
          tdev->flags.no_hotplug = true;
       }
+#endif
    }
 #endif
    return 0;
diff -Nurp fglrx.orig/lib/modules/fglrx/build_mod/kcl_pci.c fglrx/lib/modules/fglrx/build_mod/kcl_pci.c
--- fglrx.orig/lib/modules/fglrx/build_mod/kcl_pci.c	2014-09-09 17:10:17.000000000 +0300
+++ fglrx/lib/modules/fglrx/build_mod/kcl_pci.c	2014-09-23 23:23:32.085208398 +0300
@@ -306,6 +306,9 @@ void ATI_API_CALL KCL_PCI_DisableDevice(
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
     pci_disable_device((struct pci_dev*)dev);
 #endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
+    pci_ignore_hotplug((struct pci_dev*)dev);
+#endif
 }

 #if defined(__x86_64__)


code:
--- 13.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2013-01-15 22:33:27.000000000 +0100
+++ 13.1/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-08-18 20:05:44.327520475 +0200
@@ -250,7 +250,7 @@
 #endif

 #ifdef MODULE_LICENSE
-MODULE_LICENSE("Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY");
+MODULE_LICENSE("GPL\0Proprietary. (C) 2002 - ATI Technologies, Starnberg, GERMANY");
 #endif
 #ifdef MODULE_DEVICE_TABLE
 MODULE_DEVICE_TABLE(pci, fglrx_pci_table);


code:
diff -uNr 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c
--- 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c	2014-11-28 21:02:10.000000000 +0100
+++ 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-03-08 13:30:42.565275902 +0100
@@ -4468,8 +4468,13 @@

     if (cpu_has_pge)
     {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
         cr4 = read_cr4();
         write_cr4(cr4 & ~X86_CR4_PGE);
+#else
+        cr4 = __read_cr4();
+        __write_cr4(cr4 & ~X86_CR4_PGE);
+#endif
     }
      __flush_tlb();

@@ -4482,7 +4487,11 @@
     write_cr0(cr0 & 0xbfffffff);
     if (cpu_has_pge)
     {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
         write_cr4(cr4);
+#else
+        __write_cr4(cr4);
+#endif
     }
     local_irq_restore(flags);

@@ -4509,8 +4518,13 @@

     if (cpu_has_pge)
     {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
         cr4 = read_cr4();
         write_cr4(cr4 & ~X86_CR4_PGE);
+#else
+        cr4 = __read_cr4();
+        __write_cr4(cr4 & ~X86_CR4_PGE);
+#endif
     }
      __flush_tlb();

@@ -4522,7 +4536,11 @@
     write_cr0(cr0 & 0xbfffffff);
     if (cpu_has_pge)
     {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
         write_cr4(cr4);
+#else
+        __write_cr4(cr4);
+#endif
     }
     local_irq_restore(flags);

diff -uNr 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c
--- 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c	2014-11-28 21:02:10.000000000 +0100
+++ 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c	2015-03-08 13:25:11.568396701 +0100
@@ -169,7 +169,11 @@
                                   const char* s2,
                                   KCL_TYPE_SizeSigned count)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
     return strnicmp(s1, s2, count);
+#else
+    return strncasecmp(s1, s2, count);
+#endif
 }

 /** \brief Locate character in string


code:
--- 13.4/common/lib/modules/fglrx/build_mod/firegl_public.c	2013-04-16 23:29:55.000000000 +0200
+++ 13.4/common/lib/modules/fglrx/build_mod/firegl_public.c	2013-05-21 17:05:34.726681102 +0200
@@ -93,7 +93,7 @@
    and they use different config options. These options can only be enabled
    on x86_64 with newer 2.6 kernels (2.6.23 for intel, 2.6.26 for amd).
 */
-#if defined(CONFIG_AMD_IOMMU) || defined(CONFIG_DMAR)
+#if defined(CONFIG_AMD_IOMMU) || defined(CONFIG_INTEL_IOMMU)
     #define FIREGL_DMA_REMAPPING
 #endif


code:
--- 13.4/common/lib/modules/fglrx/build_mod/kcl_agp.c	2013-05-24 16:45:52.236740084 -0400
+++ 13.4/common/lib/modules/fglrx/build_mod/kcl_agp.c	2013-05-24 16:49:29.283579408 -0400
@@ -56,6 +56,43 @@ unsigned int KCL_AGP_IsInUse(void)
     return kcl_agp_is_in_use;
 }

+/** \brief Find AGP caps registers in PCI config space
+ ** \param dev PCI device handle
+ ** \return Positive register index on success, negative errno on error
+ */
+int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
+{
+    u8 capndx;
+    u32 cap_id;
+
+    if (!dev)
+    {
+        return -ENODEV;
+    }
+
+    pci_read_config_byte((struct pci_dev*)dev, 0x34, &capndx);
+
+    if (capndx == 0x00)
+    {
+        return -ENODATA;
+    }
+
+    do
+    { // search capability list for AGP caps
+        pci_read_config_dword((struct pci_dev*)dev, capndx, &cap_id);
+
+        if ((cap_id & 0xff) == 0x02)
+        {
+            return capndx;
+        }
+
+        capndx = (cap_id >> 8) & 0xff;
+    }
+    while (capndx != 0x00);
+
+    return -ENODATA;
+}
+
 #if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE)

 typedef struct {
@@ -272,43 +309,6 @@ int ATI_API_CALL KCL_AGP_Enable(unsigned
     }
 }

-/** \brief Find AGP caps registers in PCI config space
- ** \param dev PCI device handle
- ** \return Positive register index on success, negative errno on error
- */
-int ATI_API_CALL KCL_AGP_FindCapsRegisters(KCL_PCI_DevHandle dev)
-{
-    u8 capndx;
-    u32 cap_id;
-
-    if (!dev)
-    {
-        return -ENODEV;
-    }
-
-    pci_read_config_byte((struct pci_dev*)dev, 0x34, &capndx);
-
-    if (capndx == 0x00)
-    {
-        return -ENODATA;
-    }
-
-    do
-    { // search capability list for AGP caps
-        pci_read_config_dword((struct pci_dev*)dev, capndx, &cap_id);
-
-        if ((cap_id & 0xff) == 0x02)
-        {
-            return capndx;
-        }
-
-        capndx = (cap_id >> 8) & 0xff;
-    }
-    while (capndx != 0x00);
-
-    return -ENODATA;
-}
-
 /** \brief Get AGP caps
  ** \param dev PCI device handle
  ** \param caps pointer to caps vector


code:
diff -Nur common/lib/modules/fglrx/build_mod/drmP.h common-r1/lib/modules/fglrx/build_mod/drmP.h
--- common/lib/modules/fglrx/build_mod/drmP.h	2013-05-15 09:26:23.555752577 +0300
+++ common-r1/lib/modules/fglrx/build_mod/drmP.h	2013-05-16 10:39:17.496212055 +0300
@@ -901,10 +901,6 @@
 int                   DRM(stub_unregister)(int minor);

 				/* Proc support (drm_proc.h) */
-extern struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev,
-					     int minor,
-					     struct proc_dir_entry *root,
-					     struct proc_dir_entry **dev_root);
 extern int            DRM(proc_cleanup)(int minor,
 					struct proc_dir_entry *root,
 					struct proc_dir_entry *dev_root);
diff -Nur common/lib/modules/fglrx/build_mod/drm_proc.h common-r1/lib/modules/fglrx/build_mod/drm_proc.h
--- common/lib/modules/fglrx/build_mod/drm_proc.h	2013-05-15 09:26:23.555752577 +0300
+++ common-r1/lib/modules/fglrx/build_mod/drm_proc.h	2013-05-19 02:16:16.584406160 +0300
@@ -75,61 +75,6 @@
 #define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))

 /**
- * Initialize the DRI proc filesystem for a device.
- *
- * \param dev DRM device.
- * \param minor device minor number.
- * \param root DRI proc dir entry.
- * \param dev_root resulting DRI device proc dir entry.
- * \return root entry pointer on success, or NULL on failure.
- *
- * Create the DRI proc root entry "/proc/ati", the device proc root entry
- * "/proc/ati/%minor%/", and each entry in proc_list as
- * "/proc/ati/%minor%/%name%".
- */
-struct proc_dir_entry *DRM(proc_init)(drm_device_t *dev, int minor,
-				      struct proc_dir_entry *root,
-				      struct proc_dir_entry **dev_root)
-{
-	struct proc_dir_entry *ent;
-	int		      i, j;
-	char                  name[64];
-
-	if (!minor) root = create_proc_entry("dri", S_IFDIR, NULL);
-	if (!root) {
-		DRM_ERROR("Cannot create /proc/ati\n");
-		return NULL;
-	}
-
-	sprintf(name, "%d", minor);
-	*dev_root = create_proc_entry(name, S_IFDIR, root);
-	if (!*dev_root) {
-		DRM_ERROR("Cannot create /proc/ati/%s\n", name);
-		return NULL;
-	}
-
-	for (i = 0; i < DRM_PROC_ENTRIES; i++) {
-		ent = create_proc_entry(DRM(proc_list)[i].name,
-					S_IFREG|S_IRUGO, *dev_root);
-		if (!ent) {
-			DRM_ERROR("Cannot create /proc/ati/%s/%s\n",
-				  name, DRM(proc_list)[i].name);
-			for (j = 0; j < i; j++)
-				remove_proc_entry(DRM(proc_list)[i].name,
-						  *dev_root);
-			remove_proc_entry(name, root);
-			if (!minor) remove_proc_entry("dri", NULL);
-			return NULL;
-		}
-		ent->read_proc = DRM(proc_list)[i].f;
-		ent->data      = dev;
-	}
-
-	return root;
-}
-
-
-/**
  * Cleanup the proc filesystem resources.
  *
  * \param minor device minor number.
diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c
--- common/lib/modules/fglrx/build_mod/firegl_public.c	2013-05-15 09:26:23.545752925 +0300
+++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c	2013-05-19 03:07:10.236552522 +0300
@@ -583,6 +583,202 @@
     { "NULL",           NULL,                       NULL} // Terminate List!!!
 };

+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+typedef int (read_proc_t)(char *page, char **start, off_t off, int count, int *eof, void *data);
+typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data);
+#else
+#define PDE_DATA(inode) (PDE((inode))->data)
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
+typedef struct {
+	read_proc_t *read_func;
+	write_proc_t *write_func;
+	void *data;
+} gentoo_proc_wrapper_t;
+
+#define GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC 939750305
+
+static ssize_t gentoo_proc_wrapper_read (struct file *myfile, char __user *buffer, size_t count, loff_t *offset) {
+	int is_eof=0, retval;
+	char *start, *usebuffer=NULL;
+	gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
+	if (PAGE_SIZE<*offset) {
+		printk(KERN_ERR "Trying to read beyond 4k on proc\n");
+		return -EIO;
+	}
+	//printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func);
+
+	usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL);
+	if (!usebuffer)
+		return -ENOMEM;
+	((u32*)usebuffer)[1024]=GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC;
+
+	retval=wrapper_data->read_func(usebuffer, &start, *offset, count, &is_eof, wrapper_data->data);
+
+	BUG_ON(GENTOO_PROC_WRAPPER_OVERFLOW_MAGIC != ((u32*)usebuffer)[1024]);
+
+	if (0 > retval)
+	{
+		printk(KERN_ERR "Proc read failed with %d", retval);
+		goto out;
+	}
+
+	if (copy_to_user(buffer, start, retval)) {
+		printk(KERN_NOTICE "copy to user failed in amd drivers proc code\n");
+		retval=-EFAULT;
+		goto out;
+	}
+	*offset+=retval;
+
+out:
+	if (usebuffer)
+		kfree(usebuffer);
+	return retval;
+}
+static ssize_t gentoo_proc_wrapper_write (struct file *myfile, const char __user *buffer, size_t count, loff_t *offset) {
+	gentoo_proc_wrapper_t* wrapper_data=(gentoo_proc_wrapper_t*)(myfile->private_data);
+	int retval=0;
+	void *usebuffer=NULL;
+
+	BUG_ON(*offset);
+	if (!wrapper_data->write_func)
+		return -EPERM;
+
+	usebuffer=kmalloc(count, GFP_KERNEL);
+	if (!usebuffer)
+		return -ENOMEM;
+	if (copy_from_user(usebuffer, buffer, count)) {
+		printk(KERN_NOTICE "copy from user failed in amd drivers proc code\n");
+		retval=-EFAULT;
+		goto out;
+	}
+
+	retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data);
+	*offset+=retval;
+out:
+	if (usebuffer)
+		kfree(usebuffer);
+	return retval;
+}
+static int gentoo_proc_wrapper_open(struct inode *myinode, struct file *myfile) {
+	myfile->private_data=PDE_DATA(myinode);
+	return generic_file_open(myinode, myfile);
+}
+struct file_operations gentoo_proc_fops = {
+	.read=gentoo_proc_wrapper_read,
+	.write=gentoo_proc_wrapper_write,
+	.open=gentoo_proc_wrapper_open,
+};
+
+static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) {
+	gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL);
+	if (!retval)
+		return retval;
+	retval->read_func=reader;
+	retval->write_func=writer;
+	retval->data=mydata;
+	return retval;
+}
+
+static struct proc_dir_entry *firegl_proc_init( device_t *dev,
+                                                int minor,
+                                                struct proc_dir_entry *root,
+                                                struct proc_dir_entry **dev_root,
+                                                kcl_proc_list_t *proc_list ) // proc_list must be terminated!
+{
+    struct proc_dir_entry *ent;
+    char    name[64];
+    kcl_proc_list_t *list = proc_list;
+	void *tempdata;
+    KCL_DEBUG1(FN_FIREGL_PROC, "minor %d, proc_list 0x%08lx\n", minor, (unsigned long)proc_list);
+    if (!minor)
+    {
+        root = proc_mkdir("ati", NULL);
+    }
+
+    if (!root)
+    {
+        KCL_DEBUG_ERROR("Cannot create /proc/ati\n");
+        return NULL;
+    }
+
+    if (minor == 0)
+    {
+        // Global major debice number entry
+		tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_major_proc_read, NULL, NULL);
+		if (!tempdata)
+			return NULL;
+        ent = proc_create_data("major", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
+        if (!ent)
+        {
+            remove_proc_entry("ati", NULL);
+            KCL_DEBUG_ERROR("Cannot create /proc/ati/major\n");
+            return NULL;
+        }
+    }
+
+    sprintf(name, "%d", minor);
+    *dev_root = proc_mkdir(name, root);
+    if (!*dev_root) {
+        remove_proc_entry("major", root);
+        remove_proc_entry("ati", NULL);
+        KCL_DEBUG_ERROR("Cannot create /proc/ati/%s\n", name);
+        return NULL;
+    }
+
+    while (list->f || list->fops)
+    {
+		struct file_operations *my_fops = &gentoo_proc_fops;
+        if (list->fops)
+        {
+            my_fops = (struct file_operations*)list->fops;
+			tempdata=(dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev);
+        }
+		else {
+			BUG_ON(!list->f);
+			tempdata=gentoo_proc_wrapper_data((read_proc_t*)list->f, NULL, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev) );
+			if (!tempdata)
+				return NULL;
+		}
+		//printk(KERN_NOTICE "name %s, dev %p, func %p, data %p\n", list->name, (dev->pubdev.signature == FGL_DEVICE_SIGNATURE)? firegl_find_device(minor) : (dev), list->f, tempdata);
+        ent = proc_create_data(list->name, S_IFREG|S_IRUGO, *dev_root, my_fops, tempdata);
+
+        if (!ent)
+        {
+            KCL_DEBUG_ERROR("Cannot create /proc/ati/%s/%s\n", name, list->name);
+            while (proc_list != list)
+            {
+                remove_proc_entry(proc_list->name, *dev_root);
+                proc_list++;
+            }
+            remove_proc_entry(name, root);
+            if (!minor)
+            {
+                remove_proc_entry("major", root);
+                remove_proc_entry("ati", NULL);
+            }
+            return NULL;
+        }
+
+        list++;
+    }
+
+    if (minor == 0)
+    {
+        // Global debug entry, only create it once
+		tempdata=gentoo_proc_wrapper_data((read_proc_t*)firegl_debug_proc_read_wrap, (write_proc_t*)firegl_debug_proc_write_wrap, dev);
+		if (!tempdata)
+			return NULL;
+        ent=proc_create_data("debug", S_IFREG|S_IRUGO, root, &gentoo_proc_fops, tempdata);
+		if (!ent)
+			return NULL;
+    }
+
+    return root;
+}
+#else
 static struct proc_dir_entry *firegl_proc_init( device_t *dev,
                                                 int minor,
                                                 struct proc_dir_entry *root,
@@ -677,6 +873,7 @@

     return root;
 }
+#endif

 static int firegl_proc_cleanup( int minor,
                                 struct proc_dir_entry *root,


code:
--- 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile	2010-09-22 09:15:33.000000000 +0200
+++ 10.10/common/lib/modules/fglrx/build_mod/2.6.x/Makefile	2010-10-01 17:57:21.057820899 +0200
@@ -66,6 +66,7 @@
                 -DFGL_GART_RESERVED_SLOT \
                 -DFGL_LINUX253P1_VMA_API \
                 -DPAGE_ATTR_FIX=$(PAGE_ATTR_FIX) \
+                -DCOMPAT_ALLOC_USER_SPACE=$(COMPAT_ALLOC_USER_SPACE) \

 ifeq ($(KERNELRELEASE),)
 # on first call from remote location we get into this path


code:
--- a/firegl_public.c
+++ b/firegl_public.c
@@ -4820,8 +4824,8 @@ static unsigned long kasSetExecutionLeve
 {
     unsigned long orig_level;

-    orig_level = __get_cpu_var(kasExecutionLevel);
-    __get_cpu_var(kasExecutionLevel) = level;
+    orig_level = __this_cpu_read(kasExecutionLevel);
+    __this_cpu_write(kasExecutionLevel, level);

     return orig_level;
 }
@@ -4833,7 +4837,7 @@ static unsigned long kasSetExecutionLeve
  */
 static unsigned long kas_GetExecutionLevel(void)
 {
-    return __get_cpu_var(kasExecutionLevel);
+    return __this_cpu_read(kasExecutionLevel);
 }

 /** \brief Type definition for kas_spin_lock() parameter */


code:
# Fail if radeon loaded
install fglrx if /bin/grep -qw "^radeon" /proc/modules; then /bin/false; else /sbin/modprobe -i fglrx $CMDLINE_OPTS; fi


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>module-fglrx</Name>
        <Homepage>http://ati.amd.com/support/driver.html</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>ATI</License>
        ATI display drivers.
        <Description>Fglrx is a driver written by AMD(ATI) for ATI graphics cards.Radeons HD 2 3 4 X series are not supported</Description>
        <Archive sha1sum="cafe3419525a8ecc517c4192888f84df1abaa41b" type="targz">http://archive.ubuntu.com/ubuntu/pool/restricted/f/fglrx-installer/fglrx-installer_15.201.orig.tar.gz</Archive>
        <AdditionalFiles>
            <AdditionalFile target="desktop-files.patch">desktop-files.patch</AdditionalFile>
            <AdditionalFile target="makefile_compat.patch">makefile_compat.patch</AdditionalFile>
            <AdditionalFile target="fglrx_gpl_symbol.patch">fglrx_gpl_symbol.patch</AdditionalFile>
            <AdditionalFile target="kolasa_4.0-cr4-strn.patch">kolasa_4.0-cr4-strn.patch</AdditionalFile>
            <AdditionalFile target="lano1106_fglrx_intel_iommu.patch">lano1106_fglrx_intel_iommu.patch</AdditionalFile>
            <AdditionalFile target="lano1106_kcl_agp_13_4.patch">lano1106_kcl_agp_13_4.patch</AdditionalFile>
            <AdditionalFile target="LICENSE.TXT">LICENSE.TXT</AdditionalFile>
            <AdditionalFile target="4.4-manjaro-xstate.patch">4.4-manjaro-xstate.patch</AdditionalFile>
        </AdditionalFiles>
        <BuildDependencies>
            <Dependency version="4.4.4">kernel-module-headers</Dependency>
            <Dependency vesion="4.4.4">kernel</Dependency>
        </BuildDependencies>
    </Source>

    <Package>
        <Name>module-fglrx</Name>
        <Conflicts>
            <Package>module-fglrx-legacy</Package>
        </Conflicts>
        <IsA>driver</IsA>
        Kernel module for ATI display drivers
        <RuntimeDependencies>
            <Dependency version="4.4.4">kernel</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library" permanent="true">/lib/modules</Path>
            <Path fileType="config">/etc/conf.d</Path>
            <Path fileType="config">/etc/modprobe.d</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/modprobe.d/blacklist-fglrx.conf">blacklist-fglrx.conf</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/modprobe.d/fglrx.conf">modprobe.conf</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/conf.d/atieventsd">atieventsd</AdditionalFile>
        </AdditionalFiles>
        <BuildFlags>
            <Flag>noDelta</Flag>
        </BuildFlags>
    </Package>

    <Package>
        <Name>xorg-video-fglrx</Name>
        <Conflicts>
            <Package>xorg-video-fglrx-legacy</Package>
        </Conflicts>
        <IsA>driver</IsA>
        <PartOf>x11.driver</PartOf>
        <RuntimeDependencies>
            <AnyDependency>
                <Dependency version="current">module-fglrx</Dependency>
            </AnyDependency>
            <Dependency>qt</Dependency>
            <Dependency>mesa</Dependency>
            <Dependency>libSM</Dependency>
            <Dependency>libICE</Dependency>
            <Dependency>uClibc</Dependency>
            <Dependency>libXext</Dependency>
            <Dependency>libXrandr</Dependency>
            <Dependency>libXfixes</Dependency>
            <Dependency>libXcursor</Dependency>
            <Dependency>libXrender</Dependency>
            <Dependency>fontconfig</Dependency>
            <Dependency>libXxf86vm</Dependency>
            <Dependency>libXinerama</Dependency>
            <Dependency>xorg-server</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/usr/share</Path>
            <Path fileType="config">/etc</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="data">/usr/X11R6</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
        </Files>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
            <COMAR script="service.py" name="atieventsd">System.Service</COMAR>
        </Provides>
        <BuildFlags>
            <Flag>noDelta</Flag>
        </BuildFlags>
    </Package>

    <Package>
        <Name>xorg-video-fglrx-32bit</Name>
        <Conflicts>
            <Package>xorg-video-fglrx-legacy-32bit</Package>
        </Conflicts>
        <PartOf>emul32</PartOf>
        <BuildType>emul32</BuildType>
        32-bit shared libraries for xorg-video-fglrx
        <BuildDependencies>
            <Dependency>xvba-video-32bit</Dependency>
            <Dependency>fontconfig-32bit</Dependency>
            <Dependency>freetype-32bit</Dependency>
            <Dependency>libXcursor-32bit</Dependency>
            <Dependency>libXext-32bit</Dependency>
            <Dependency>libXfixes-32bit</Dependency>
            <Dependency>libXinerama-32bit</Dependency>
            <Dependency>libXrandr-32bit</Dependency>
            <Dependency>libXrender-32bit</Dependency>
            <Dependency>libXxf86vm-32bit</Dependency>
            <Dependency>libX11-32bit</Dependency>

        </BuildDependencies>
        <RuntimeDependencies>
            <Dependency release="current">xorg-video-fglrx</Dependency>
            <Dependency>libXext-32bit</Dependency>
            <Dependency>libX11-32bit</Dependency>
            <Dependency>mesa-32bit</Dependency>

            <Dependency>libgcc</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="library">/usr/lib32</Path>
        </Files>
        <Provides>
            <COMAR script="package-emul32.py">System.Package</COMAR>
        </Provides>
        <BuildFlags>
            <Flag>noDelta</Flag>
        </BuildFlags>
    </Package>

    <History>
        <Update release="1">
            <Date>2016-03-06</Date>
            <Version>15.201</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>module-fglrx</Name>
        ATI ekran kartı sürücüleri
        <Description xml:lang="tr">AMD(ATI) tarafından ATI ekran kartları için yazılmış sürücüler.Radeon HD 2 3 4 X serisi ekran kartlarını desteklememektedir.</Description>
        Pilote d'affichage ATI
        Controlador display ATI
    </Source>

    <Package>
        <Name>module-fglrx</Name>
        ATI ekran sürücüleri için çekirdek modülü
    </Package>

    <Package>
        <Name>xorg-video-fglrx</Name>
        ATI ekran kartı sürücüleri için paylaşımlı kitaplıklar ve araçlar
    </Package>

    <Package>
        <Name>xorg-video-fglrx-32bit</Name>
        xorg-video-fglrx için 32-bit paylaşımlı kitaplıklar
    </Package>
</PISI>