pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xf86-video-ati-dfbsd: Replace xf86-video-ati Free/DragonFlyBSD changes



Module Name:	pkgsrc-wip
Committed By:	David Shao <davshao%gmail.com@localhost>
Pushed By:	dshao
Date:		Tue Jan 17 00:53:24 2017 -0800
Changeset:	f2f48687047da4561cf60daa2c6d8a070a864073

Modified Files:
	Makefile
Added Files:
	xf86-video-ati-dfbsd/DESCR
	xf86-video-ati-dfbsd/Makefile
	xf86-video-ati-dfbsd/PLIST
	xf86-video-ati-dfbsd/TODO
	xf86-video-ati-dfbsd/distinfo
	xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c

Log Message:
xf86-video-ati-dfbsd: Replace xf86-video-ati Free/DragonFlyBSD changes

Implements changes discussed in pkg/50067
(x11/xf86-video-ati dports patch-src_radeon__kms.c
 for newer DragonFly and FreeBSD)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f2f48687047da4561cf60daa2c6d8a070a864073

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 xf86-video-ati-dfbsd/DESCR                         |  1 +
 xf86-video-ati-dfbsd/Makefile                      | 54 ++++++++++++++++++++
 xf86-video-ati-dfbsd/PLIST                         |  5 ++
 xf86-video-ati-dfbsd/TODO                          |  5 ++
 xf86-video-ati-dfbsd/distinfo                      |  7 +++
 .../patches/patch-src_radeon__kms.c                | 58 ++++++++++++++++++++++
 7 files changed, 131 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index de34447..3a416c1 100644
--- a/Makefile
+++ b/Makefile
@@ -4355,6 +4355,7 @@ SUBDIR+=	xesam-glib
 SUBDIR+=	xf86-input-mouse-dfbsd
 SUBDIR+=	xf86-input-synaptics
 SUBDIR+=	xf86-input-vboxmouse
+SUBDIR+=	xf86-video-ati-dfbsd
 SUBDIR+=	xf86-video-geode
 SUBDIR+=	xf86-video-intel-git
 SUBDIR+=	xf86-video-intel-old
diff --git a/xf86-video-ati-dfbsd/DESCR b/xf86-video-ati-dfbsd/DESCR
new file mode 100644
index 0000000..8300629
--- /dev/null
+++ b/xf86-video-ati-dfbsd/DESCR
@@ -0,0 +1 @@
+This is the video driver for ATI Radeon cards for the modular Xorg server.
diff --git a/xf86-video-ati-dfbsd/Makefile b/xf86-video-ati-dfbsd/Makefile
new file mode 100644
index 0000000..4952133
--- /dev/null
+++ b/xf86-video-ati-dfbsd/Makefile
@@ -0,0 +1,54 @@
+# $NetBSD: Makefile,v 1.40 2016/11/17 20:57:54 wiz Exp $
+
+DISTNAME=	xf86-video-ati-7.8.0
+CATEGORIES=	x11
+MASTER_SITES=	${MASTER_SITE_XORG:=driver/}
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	joerg%NetBSD.org@localhost
+HOMEPAGE=	http://xorg.freedesktop.org/
+COMMENT=	Modular Xorg ATI Radeon video driver
+
+CONFLICTS+=	xf86-video-ati6-[0-9]*
+
+USE_LIBTOOL=	YES
+GNU_CONFIGURE=	YES
+USE_TOOLS+=	gmake pkg-config
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.xf86-video-ati
+PKG_SUPPORTED_OPTIONS=  debug	
+
+.include "../../mk/bsd.options.mk"
+
+CONFIGURE_ARGS+=	--enable-glamor
+
+# Debug flags recommended for server and drivers by:
+# https://www.x.org/wiki/Development/Documentation/ServerDebugging/
+.if !empty(PKG_OPTIONS:Mdebug)
+CFLAGS+=		-O0 -g3
+.endif
+
+CONFIGURE_ENV.SunOS+=	DRIVER_MAN_SUFFIX=4
+
+.include "../../devel/xorg-util-macros/buildlink3.mk"
+
+BUILDLINK_API_DEPENDS.modular-xorg-server+=	modular-xorg-server>=1.18.1
+.include "../../x11/modular-xorg-server/buildlink3.mk"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../x11/fontsproto/buildlink3.mk"
+.include "../../x11/glproto/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libdrm+=	libdrm>=2.4.58
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../x11/randrproto/buildlink3.mk"
+.include "../../x11/renderproto/buildlink3.mk"
+.include "../../x11/videoproto/buildlink3.mk"
+.include "../../x11/xf86driproto/buildlink3.mk"
+.include "../../x11/xf86miscproto/buildlink3.mk"
+.include "../../x11/xextproto/buildlink3.mk"
+.include "../../x11/xineramaproto/buildlink3.mk"
+.include "../../x11/xproto/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/xf86-video-ati-dfbsd/PLIST b/xf86-video-ati-dfbsd/PLIST
new file mode 100644
index 0000000..f6c83b8
--- /dev/null
+++ b/xf86-video-ati-dfbsd/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.4 2013/05/16 06:02:58 richard Exp $
+lib/xorg/modules/drivers/ati_drv.la
+lib/xorg/modules/drivers/radeon_drv.la
+man/man4/ati.4
+man/man4/radeon.4
diff --git a/xf86-video-ati-dfbsd/TODO b/xf86-video-ati-dfbsd/TODO
new file mode 100644
index 0000000..8643bde
--- /dev/null
+++ b/xf86-video-ati-dfbsd/TODO
@@ -0,0 +1,5 @@
+Copy port to x11/xf86-video-ati, do not install from wip.
+
+Implements changes discussed in pkg/50067
+(x11/xf86-video-ati dports patch-src_radeon__kms.c
+ for newer DragonFly and FreeBSD)
diff --git a/xf86-video-ati-dfbsd/distinfo b/xf86-video-ati-dfbsd/distinfo
new file mode 100644
index 0000000..c43abc9
--- /dev/null
+++ b/xf86-video-ati-dfbsd/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.28 2016/11/17 20:57:54 wiz Exp $
+
+SHA1 (xf86-video-ati-7.8.0.tar.bz2) = 30c4470d1252eade1d5c5998e42b66b0ac80a638
+RMD160 (xf86-video-ati-7.8.0.tar.bz2) = f5c6d63a33690fa7e035175a541cb33fef0c4fac
+SHA512 (xf86-video-ati-7.8.0.tar.bz2) = e09b7aca819656359d32b11f4314f2ad77b7a28d481b2cf17ea62f2e2385f9b40f568d5c76360c800c60c00671f0262277cdefde4c0744f2ed9b3b2fa90a37a9
+Size (xf86-video-ati-7.8.0.tar.bz2) = 845702 bytes
+SHA1 (patch-src_radeon__kms.c) = 67ed90dcb007c00b19b770cc500ba1469c8c54a9
diff --git a/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c b/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c
new file mode 100644
index 0000000..a36f4b3
--- /dev/null
+++ b/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c
@@ -0,0 +1,58 @@
+$NetBSD$
+
+From FreeBSD ports / DragonFly dports
+
+--- src/radeon_kms.c.orig	2016-11-17 02:23:37.000000000 +0000
++++ src/radeon_kms.c
+@@ -30,6 +30,12 @@
+ 
+ #include <errno.h>
+ #include <sys/ioctl.h>
++
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++#include <sys/param.h>
++#include <sys/linker.h>
++#endif
++
+ /* Driver data structures */
+ #include "radeon.h"
+ #include "radeon_drm_queue.h"
+@@ -811,7 +817,7 @@ radeon_dirty_update(ScrnInfoPtr scrn)
+ {
+ 	RADEONInfoPtr info = RADEONPTR(scrn);
+ 	ScreenPtr screen = scrn->pScreen;
+-	PixmapDirtyUpdatePtr ent;
++	PixmapDirtyUpdatePtr ent = NULL;
+ 	RegionPtr region;
+ 
+ 	xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
+@@ -1391,7 +1397,11 @@ static int radeon_get_drm_master_fd(Scrn
+ #endif
+     struct pci_device *dev = info->PciInfo;
+     char *busid;
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++    int fd, err;
++#else
+     int fd;
++#endif
+ 
+ #ifdef XF86_PDEV_SERVER_FD
+     if (pRADEONEnt->platform_dev) {
+@@ -1405,6 +1415,17 @@ static int radeon_get_drm_master_fd(Scrn
+     XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
+                 dev->domain, dev->bus, dev->dev, dev->func);
+ 
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++    err = kldload("radeonkms");
++    if (err == -1 && errno != EEXIST) {
++        xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++               "[drm] Failed to load kernel module for %s: %s\n",
++               busid, strerror(errno));
++        free(busid);
++        return -1;
++    }
++#endif
++
+     fd = drmOpen(NULL, busid);
+     if (fd == -1)
+ 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,


Home | Main Index | Thread Index | Old Index