aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers/xf86-video-scfb
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-12-19 23:03:54 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2014-12-19 23:03:54 +0000
commit91293a35052d0d42238eef4625ecab486df2c162 (patch)
treee484d37e2856dd43389bc284d3dd6136848e4c6c /x11-drivers/xf86-video-scfb
parent56208c9b577f4dee4750b2202e4bbddf253cb7e9 (diff)
downloadports-91293a35052d0d42238eef4625ecab486df2c162.tar.gz
ports-91293a35052d0d42238eef4625ecab486df2c162.zip
x11-servers/xorg-server: Update to 1.14
The X.Org server has been updated to 1.14. The changes it brings are described in a post on the Graphics team blog: http://blogs.freebsdish.org/graphics/2014/11/19/xserver-1-14-update-ready/ The most noticable change is the DEVD input device autodetection backend which is enabled by default, replacing the HAL backend. The keyboard layout configuration must be migrated from HAL's .fdi files to X.Org files. The procedure is explained in the post mentionned above. Several ports were removed with this update, mainly because they are not compatible with the X.Org server anymore: o nvidia-driver-71 o nvidia-driver-96 o xf86-input-egalax o xf86-video-newport o xf86-video-tga PR: 155696, 181660, 183478 (partially fixed), 188640, 191331 Differential Revision: https://reviews.freebsd.org/D1337 Submitted by: ak (most of the work on the DEVD backend), dumbbell, kwm, zeising Tested by: Many people on freebsd-x11@ and IRC Reviewed by: kwm, portmgr (antoine) Approved by: kwm, portmgr (antoine)
Notes
Notes: svn path=/head/; revision=374982
Diffstat (limited to 'x11-drivers/xf86-video-scfb')
-rw-r--r--x11-drivers/xf86-video-scfb/Makefile12
-rw-r--r--x11-drivers/xf86-video-scfb/distinfo4
-rw-r--r--x11-drivers/xf86-video-scfb/files/patch-src_compat-api.h102
-rw-r--r--x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c222
-rw-r--r--x11-drivers/xf86-video-scfb/pkg-plist5
5 files changed, 336 insertions, 9 deletions
diff --git a/x11-drivers/xf86-video-scfb/Makefile b/x11-drivers/xf86-video-scfb/Makefile
index 9515dda98983..dc2788c13bed 100644
--- a/x11-drivers/xf86-video-scfb/Makefile
+++ b/x11-drivers/xf86-video-scfb/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xf86-video-scfb
PORTVERSION= 0.0.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-drivers
MAINTAINER= ray@FreeBSD.org
@@ -15,8 +15,14 @@ GH_PROJECT= ${PORTNAME}
GH_TAGNAME= bdeb3bf
GH_COMMIT= bdeb3bf
-GNU_CONFIGURE= yes
USES= libtool pkgconfig
-USE_XORG= xorg-server xproto inputproto randrproto renderproto videoproto
+GNU_CONFIGURE= yes
+DIST_SUBDIR= xorg/driver
+USE_XORG= xorg-server xproto randrproto xi renderproto xextproto \
+ inputproto kbproto fontsproto videoproto dri2proto \
+ xf86driproto glproto xineramaproto resourceproto \
+ scrnsaverproto
+CONFIGURE_ENV= DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4'
+INSTALL_TARGET= install-strip
.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-video-scfb/distinfo b/x11-drivers/xf86-video-scfb/distinfo
index e15d59fff864..fa8257f7283c 100644
--- a/x11-drivers/xf86-video-scfb/distinfo
+++ b/x11-drivers/xf86-video-scfb/distinfo
@@ -1,2 +1,2 @@
-SHA256 (xf86-video-scfb-0.0.4.tar.gz) = baccb6f2fd0b79198705497c6550e8f2130d2ae359b1288beec9eae50df16616
-SIZE (xf86-video-scfb-0.0.4.tar.gz) = 345302
+SHA256 (xorg/driver/xf86-video-scfb-0.0.4.tar.gz) = baccb6f2fd0b79198705497c6550e8f2130d2ae359b1288beec9eae50df16616
+SIZE (xorg/driver/xf86-video-scfb-0.0.4.tar.gz) = 345302
diff --git a/x11-drivers/xf86-video-scfb/files/patch-src_compat-api.h b/x11-drivers/xf86-video-scfb/files/patch-src_compat-api.h
new file mode 100644
index 000000000000..a4e9815d7200
--- /dev/null
+++ b/x11-drivers/xf86-video-scfb/files/patch-src_compat-api.h
@@ -0,0 +1,102 @@
+--- src/compat-api.h.orig 2014-11-23 09:47:32 UTC
++++ src/compat-api.h
+@@ -0,0 +1,99 @@
++/*
++ * Copyright 2012 Red Hat, Inc.
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a
++ * copy of this software and associated documentation files (the "Software"),
++ * to deal in the Software without restriction, including without limitation
++ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
++ * and/or sell copies of the Software, and to permit persons to whom the
++ * Software is furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice (including the next
++ * paragraph) shall be included in all copies or substantial portions of the
++ * Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ * DEALINGS IN THE SOFTWARE.
++ *
++ * Author: Dave Airlie <airlied@redhat.com>
++ */
++
++/* this file provides API compat between server post 1.13 and pre it,
++ it should be reused inside as many drivers as possible */
++#ifndef COMPAT_API_H
++#define COMPAT_API_H
++
++#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
++#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
++#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
++#endif
++
++#ifndef XF86_HAS_SCRN_CONV
++#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
++#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
++#endif
++
++#ifndef XF86_SCRN_INTERFACE
++
++#define SCRN_ARG_TYPE int
++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
++
++#define SCREEN_ARG_TYPE int
++#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
++
++#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
++
++#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
++#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
++
++#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
++#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
++
++#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
++#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0
++
++#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
++#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0
++
++#define FREE_SCREEN_ARGS_DECL int arg, int flags
++
++#define VT_FUNC_ARGS_DECL int arg, int flags
++#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
++
++#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
++#else
++#define SCRN_ARG_TYPE ScrnInfoPtr
++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
++
++#define SCREEN_ARG_TYPE ScreenPtr
++#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
++
++#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
++
++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
++#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
++
++#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
++#define CLOSE_SCREEN_ARGS pScreen
++
++#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
++#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y
++
++#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
++#define SWITCH_MODE_ARGS(arg, m) arg, m
++
++#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
++
++#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
++#define VT_FUNC_ARGS(flags) pScrn
++
++#define XF86_ENABLEDISABLEFB_ARG(x) (x)
++
++#endif
++
++#endif
diff --git a/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c b/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c
new file mode 100644
index 000000000000..eee6e58dc527
--- /dev/null
+++ b/x11-drivers/xf86-video-scfb/files/patch-src_scfb__driver.c
@@ -0,0 +1,222 @@
+--- src/scfb_driver.c.orig 2014-07-19 22:22:29 UTC
++++ src/scfb_driver.c
+@@ -55,7 +55,6 @@
+ #include "xf86Priv.h"
+
+ #include "mipointer.h"
+-#include "mibstore.h"
+ #include "micmap.h"
+ #include "colormapst.h"
+ #include "xf86cmap.h"
+@@ -80,6 +79,8 @@
+ #include "xf86xv.h"
+ #endif
+
++#include "compat-api.h"
++
+ #undef DEBUG
+ #define DEBUG 1
+
+@@ -101,15 +102,15 @@ static const OptionInfoRec * ScfbAvailab
+ static void ScfbIdentify(int);
+ static Bool ScfbProbe(DriverPtr, int);
+ static Bool ScfbPreInit(ScrnInfoPtr, int);
+-static Bool ScfbScreenInit(int, ScreenPtr, int, char **);
+-static Bool ScfbCloseScreen(int, ScreenPtr);
++static Bool ScfbScreenInit(SCREEN_INIT_ARGS_DECL);
++static Bool ScfbCloseScreen(CLOSE_SCREEN_ARGS_DECL);
+ static void *ScfbWindowLinear(ScreenPtr, CARD32, CARD32, int, CARD32 *,
+ void *);
+-static void ScfbPointerMoved(int, int, int);
+-static Bool ScfbEnterVT(int, int);
+-static void ScfbLeaveVT(int, int);
+-static Bool ScfbSwitchMode(int, DisplayModePtr, int);
+-static int ScfbValidMode(int, DisplayModePtr, Bool, int);
++static void ScfbPointerMoved(SCRN_ARG_TYPE, int, int);
++static Bool ScfbEnterVT(VT_FUNC_ARGS_DECL);
++static void ScfbLeaveVT(VT_FUNC_ARGS_DECL);
++static Bool ScfbSwitchMode(SWITCH_MODE_ARGS_DECL);
++static int ScfbValidMode(SCRN_ARG_TYPE, DisplayModePtr, Bool, int);
+ static void ScfbLoadPalette(ScrnInfoPtr, int, int *, LOCO *, VisualPtr);
+ static Bool ScfbSaveScreen(ScreenPtr, int);
+ static void ScfbSave(ScrnInfoPtr);
+@@ -231,7 +232,7 @@ typedef struct {
+ void * shadow;
+ CloseScreenProcPtr CloseScreen;
+ CreateScreenResourcesProcPtr CreateScreenResources;
+- void (*PointerMoved)(int, int, int);
++ void (*PointerMoved)(SCRN_ARG_TYPE, int, int);
+ EntityInfoPtr pEnt;
+
+ #ifdef XFreeXDGA
+@@ -302,7 +303,7 @@ scfb_mmap(size_t len, off_t off, int fd)
+ mapaddr = NULL;
+ }
+ #if DEBUG
+- ErrorF("mmap returns: addr %p len 0x%x, fd %d, off %x\n", mapaddr, mapsize, fd, off);
++ ErrorF("mmap returns: addr %p len 0x%x, fd %d, off %lx\n", mapaddr, mapsize, fd, off);
+ #endif
+ return mapaddr;
+ }
+@@ -633,9 +634,9 @@ ScfbShadowInit(ScreenPtr pScreen)
+ }
+
+ static Bool
+-ScfbScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
++ScfbScreenInit(SCREEN_INIT_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ ScfbPtr fPtr = SCFBPTR(pScrn);
+ VisualPtr visual;
+ int ret, flags, ncolors;
+@@ -792,7 +793,7 @@ ScfbScreenInit(int scrnIndex, ScreenPtr
+ "RENDER extension initialisation failed.");
+ }
+ if (fPtr->shadowFB && !ScfbShadowInit(pScreen)) {
+- xf86DrvMsg(scrnIndex, X_ERROR,
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "shadow framebuffer initialization failed\n");
+ return FALSE;
+ }
+@@ -801,20 +802,19 @@ ScfbScreenInit(int scrnIndex, ScreenPtr
+ if (!fPtr->rotate)
+ ScfbDGAInit(pScrn, pScreen);
+ else
+- xf86DrvMsg(scrnIndex, X_INFO, "Rotated display, "
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Rotated display, "
+ "disabling DGA\n");
+ #endif
+ if (fPtr->rotate) {
+- xf86DrvMsg(scrnIndex, X_INFO, "Enabling Driver Rotation, "
++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Enabling Driver Rotation, "
+ "disabling RandR\n");
+ xf86DisableRandR();
+ if (pScrn->bitsPerPixel == 24)
+- xf86DrvMsg(scrnIndex, X_WARNING,
++ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Rotation might be broken in 24 bpp\n");
+ }
+
+ xf86SetBlackWhitePixels(pScreen);
+- miInitializeBackingStore(pScreen);
+ xf86SetBackingStore(pScreen);
+
+ /* Software cursor. */
+@@ -858,9 +858,9 @@ ScfbScreenInit(int scrnIndex, ScreenPtr
+ }
+
+ static Bool
+-ScfbCloseScreen(int scrnIndex, ScreenPtr pScreen)
++ScfbCloseScreen(CLOSE_SCREEN_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ PixmapPtr pPixmap;
+ ScfbPtr fPtr = SCFBPTR(pScrn);
+
+@@ -892,7 +892,7 @@ ScfbCloseScreen(int scrnIndex, ScreenPtr
+ /* Unwrap CloseScreen. */
+ pScreen->CloseScreen = fPtr->CloseScreen;
+ TRACE_EXIT("ScfbCloseScreen");
+- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
+ }
+
+ static void *
+@@ -907,9 +907,9 @@ ScfbWindowLinear(ScreenPtr pScreen, CARD
+ }
+
+ static void
+-ScfbPointerMoved(int index, int x, int y)
++ScfbPointerMoved(SCRN_ARG_TYPE arg, int x, int y)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[index];
++ SCRN_INFO_PTR(arg);
+ ScfbPtr fPtr = SCFBPTR(pScrn);
+ int newX, newY;
+
+@@ -941,13 +941,13 @@ ScfbPointerMoved(int index, int x, int y
+ }
+
+ /* Pass adjusted pointer coordinates to wrapped PointerMoved function. */
+- (*fPtr->PointerMoved)(index, newX, newY);
++ (*fPtr->PointerMoved)(arg, newX, newY);
+ }
+
+ static Bool
+-ScfbEnterVT(int scrnIndex, int flags)
++ScfbEnterVT(VT_FUNC_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+
+ TRACE_ENTER("EnterVT");
+ pScrn->vtSema = TRUE;
+@@ -956,20 +956,20 @@ ScfbEnterVT(int scrnIndex, int flags)
+ }
+
+ static void
+-ScfbLeaveVT(int scrnIndex, int flags)
++ScfbLeaveVT(VT_FUNC_ARGS_DECL)
+ {
+ #if DEBUG
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ #endif
+
+ TRACE_ENTER("LeaveVT");
+ }
+
+ static Bool
+-ScfbSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
++ScfbSwitchMode(SWITCH_MODE_ARGS_DECL)
+ {
+ #if DEBUG
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ #endif
+
+ TRACE_ENTER("SwitchMode");
+@@ -978,10 +978,10 @@ ScfbSwitchMode(int scrnIndex, DisplayMod
+ }
+
+ static int
+-ScfbValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
++ScfbValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
+ {
+ #if DEBUG
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ #endif
+
+ TRACE_ENTER("ValidMode");
+@@ -1067,7 +1067,6 @@ static Bool
+ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAModePtr pDGAMode)
+ {
+ DisplayModePtr pMode;
+- int scrnIdx = pScrn->pScreen->myNum;
+ int frameX0, frameY0;
+
+ if (pDGAMode) {
+@@ -1081,9 +1080,9 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod
+ frameY0 = pScrn->frameY0;
+ }
+
+- if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0))
++ if (!(*pScrn->SwitchMode)(SWITCH_MODE_ARGS(pScrn, pMode)))
+ return FALSE;
+- (*pScrn->AdjustFrame)(scrnIdx, frameX0, frameY0, 0);
++ (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, frameX0, frameY0));
+
+ return TRUE;
+ }
+@@ -1091,7 +1090,7 @@ ScfbDGASetMode(ScrnInfoPtr pScrn, DGAMod
+ static void
+ ScfbDGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
+ {
+- (*pScrn->AdjustFrame)(pScrn->pScreen->myNum, x, y, flags);
++ (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y));
+ }
+
+ static int
diff --git a/x11-drivers/xf86-video-scfb/pkg-plist b/x11-drivers/xf86-video-scfb/pkg-plist
index 5e68defdeaae..c68e96be7192 100644
--- a/x11-drivers/xf86-video-scfb/pkg-plist
+++ b/x11-drivers/xf86-video-scfb/pkg-plist
@@ -1,5 +1,2 @@
lib/xorg/modules/drivers/scfb_drv.so
-man/man4/scfb.4.gz
-@dirrmtry lib/xorg/modules/drivers
-@dirrmtry lib/xorg/modules
-@dirrmtry lib/xorg
+man/man4/scfb.4x.gz