View | Details | Raw Unified | Return to bug 181962 | Differences between
and this patch

Collapse All | Expand All

(-)Mk/bsd.port.mk (-6 / +8 lines)
Lines 350-356 Link Here
350
#				  MAKE_ENV are extended with a DISPLAY variable.
350
#				  MAKE_ENV are extended with a DISPLAY variable.
351
#
351
#
352
# USE_GL		- A list of Mesa or GL related dependencies needed by the port.
352
# USE_GL		- A list of Mesa or GL related dependencies needed by the port.
353
#				  Supported components are: glut, glu, glw, and gl.
353
#				  Supported components are: egl, glesv2, glut, glu, glw, and gl.
354
#				  If set to "yes", this is equivalent to "glu". Note that
354
#				  If set to "yes", this is equivalent to "glu". Note that
355
#				  glew and glut depend on glu, glw and glu depend on gl.
355
#				  glew and glut depend on glu, glw and glu depend on gl.
356
##
356
##
Lines 1882-1894 Link Here
1882
1882
1883
PKG_IGNORE_DEPENDS?=		'this_port_does_not_exist'
1883
PKG_IGNORE_DEPENDS?=		'this_port_does_not_exist'
1884
1884
1885
_GL_gl_LIB_DEPENDS=		GL.1:${PORTSDIR}/graphics/libGL
1885
_GL_glesv2_LIB_DEPENDS=		libGLESv2.so:${PORTSDIR}/grahpics/libglesv2
1886
_GL_egl_LIB_DEPENDS=		libEGL.so:${PORTSDIR}/graphics/libEGL
1887
_GL_gl_LIB_DEPENDS=		libGL.so:${PORTSDIR}/graphics/libGL
1886
_GL_gl_USE_XORG=		glproto dri2proto
1888
_GL_gl_USE_XORG=		glproto dri2proto
1887
_GL_glew_LIB_DEPENDS=		GLEW.1:${PORTSDIR}/graphics/glew
1889
_GL_glew_LIB_DEPENDS=		libGLEW.so:${PORTSDIR}/graphics/glew
1888
_GL_glu_LIB_DEPENDS=		GLU.1:${PORTSDIR}/graphics/libGLU
1890
_GL_glu_LIB_DEPENDS=		libGLU.so:${PORTSDIR}/graphics/libGLU
1889
_GL_glu_USE_XORG=		glproto dri2proto
1891
_GL_glu_USE_XORG=		glproto dri2proto
1890
_GL_glw_LIB_DEPENDS=		GLw.1:${PORTSDIR}/graphics/libGLw
1892
_GL_glw_LIB_DEPENDS=		libGLw.so:${PORTSDIR}/graphics/libGLw
1891
_GL_glut_LIB_DEPENDS=		glut.12:${PORTSDIR}/graphics/freeglut
1893
_GL_glut_LIB_DEPENDS=		libglut.so:${PORTSDIR}/graphics/freeglut
1892
1894
1893
.if defined(USE_GL)
1895
.if defined(USE_GL)
1894
. if ${USE_GL:L} == "yes"
1896
. if ${USE_GL:L} == "yes"
(-)UPDATING (-1 / +28 lines)
Lines 5-10 Link Here
5
You should get into the habit of checking this file for changes each time
5
You should get into the habit of checking this file for changes each time
6
you update your ports collection, before attempting any port upgrades.
6
you update your ports collection, before attempting any port upgrades.
7
7
8
201309xx:
9
  AFFECTS: users of x11/pixman
10
  AUTHOR: zeising@FreeBSD.org
11
12
  The library version of x11/pixman has changed, and portrevision has
13
  been bumped in all dependent ports.  If you have external software that
14
  depends on pixman, this software needs to be recompiled.
15
  To recompile all software dependent on pixman, run:
16
  
17
  # portmaster -r pixman
18
  or
19
  # portupgrade -rf pixman
20
21
201309xx:
22
  AFFECTS: users of graphics/libGL, graphics/dri and other MESA ports
23
  AUTHOR: zeising@FreeBSD.org
24
25
  The graphics/libGL, graphics/dri and related MESA ports have been
26
  updated to 9.1 when compiled with WITH_NEW_XORG= set.  It is necessary
27
  to remove the old versions of both ports before updating.
28
29
  # pkg_delete -f libGl-\* dri-\*
30
  or
31
  # pkg delete -f libGL dri
32
  followed by
33
  # portmaster -a
34
8
20130904:
35
20130904:
9
  AFFECTS: 10-CURRENT users with any port depending on converters/libiconv
36
  AFFECTS: 10-CURRENT users with any port depending on converters/libiconv
10
  AUTHOR: madpilot@FreeBSD.org
37
  AUTHOR: madpilot@FreeBSD.org
Lines 553-559 Link Here
553
  settings in rc.conf prior to restarting postgrey.
580
  settings in rc.conf prior to restarting postgrey.
554
581
555
20130525:
582
20130525:
556
  AFFECTS: users of x11/xorg and all X.Org ports
583
  AFFECTS: users of x11/xorg and all xorg ports
557
  AUTHOR: zeising@FreeBSD.org
584
  AUTHOR: zeising@FreeBSD.org
558
585
559
  X.Org, including libraries and some drivers, was updated.  If you are
586
  X.Org, including libraries and some drivers, was updated.  If you are
(-)astro/viking/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	viking
4
PORTNAME=	viking
5
PORTVERSION=	1.4.2
5
PORTVERSION=	1.4.2
6
PORTREVISION=	1
6
CATEGORIES=	astro
7
CATEGORIES=	astro
7
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}/
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}/
8
9
(-)cad/pdnmesh/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	pdnmesh
4
PORTNAME=	pdnmesh
5
PORTVERSION=	0.2.2
5
PORTVERSION=	0.2.2
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	cad
7
CATEGORIES=	cad
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-source/${PORTVERSION}
8
MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-source/${PORTVERSION}
9
9
(-)cad/repsnapper/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	repsnapper
4
PORTNAME=	repsnapper
5
PORTVERSION=	2.2.0b3
5
PORTVERSION=	2.2.0b3
6
PORTREVISION=	1
6
CATEGORIES=	cad
7
CATEGORIES=	cad
7
MASTER_SITES=	https://codeload.github.com/timschmidt/repsnapper/tar.gz/
8
MASTER_SITES=	https://codeload.github.com/timschmidt/repsnapper/tar.gz/
8
DISTNAME=	${PORTVERSION}
9
DISTNAME=	${PORTVERSION}
(-)deskutils/pinot/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	pinot
4
PORTNAME=	pinot
5
PORTVERSION=	1.06
5
PORTVERSION=	1.06
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	deskutils
7
CATEGORIES=	deskutils
8
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
8
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
9
#MASTER_SITES=	http://colinf.chez.com/pinot/
9
#MASTER_SITES=	http://colinf.chez.com/pinot/
(-)devel/xorg-macros/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	xorg-macros
4
PORTNAME=	xorg-macros
5
PORTVERSION=	1.17
5
PORTVERSION=	1.17.1
6
CATEGORIES=	devel x11
6
CATEGORIES=	devel x11
7
DISTNAME=	util-macros-$(PORTVERSION)
7
DISTNAME=	util-macros-$(PORTVERSION)
8
8
(-)devel/xorg-macros/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/util/util-macros-1.17.tar.bz2) = 7d79edde72fc17dcdc56cfbe2f8ff384d1bffd1d8c58c0fd25970f5b2ccb75ed
1
SHA256 (xorg/util/util-macros-1.17.1.tar.bz2) = 5e52654f2a0b04223cf28a9d7fd62cf288852e639ac13a75172fd47d0d6ac625
2
SIZE (xorg/util/util-macros-1.17.tar.bz2) = 77029
2
SIZE (xorg/util/util-macros-1.17.1.tar.bz2) = 79105
(-)emulators/catapult/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	catapult
4
PORTNAME=	catapult
5
PORTVERSION=	0.9.1
5
PORTVERSION=	0.9.1
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	SF/openmsx/openmsx/${PORTVERSION}
8
MASTER_SITES=	SF/openmsx/openmsx/${PORTVERSION}
9
DISTNAME=	openmsx-${PORTNAME}-${PORTVERSION}
9
DISTNAME=	openmsx-${PORTNAME}-${PORTVERSION}
Lines 32-39 Link Here
32
USE_GNOME=	gdkpixbuf2 glib20 gtk20 libxml2
32
USE_GNOME=	gdkpixbuf2 glib20 gtk20 libxml2
33
USE_WX=		2.6+
33
USE_WX=		2.6+
34
USE_PYTHON_BUILD=yes
34
USE_PYTHON_BUILD=yes
35
USE_GMAKE=	yes
35
USES=		gettext gmake iconv
36
USES=		gettext iconv
37
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
36
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
38
		xext xfixes xi xinerama xrandr xrender xxf86vm
37
		xext xfixes xi xinerama xrandr xrender xxf86vm
39
MAKEFILE=	GNUmakefile
38
MAKEFILE=	GNUmakefile
(-)emulators/qemu-devel/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	qemu
4
PORTNAME=	qemu
5
PORTVERSION=	1.6.0
5
PORTVERSION=	1.6.0
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	http://wiki.qemu.org/download/:release \
8
MASTER_SITES=	http://wiki.qemu.org/download/:release \
9
		LOCAL/nox:snapshot
9
		LOCAL/nox:snapshot
Lines 14-26 Link Here
14
MAINTAINER=	nox@FreeBSD.org
14
MAINTAINER=	nox@FreeBSD.org
15
COMMENT=	QEMU CPU Emulator - development version
15
COMMENT=	QEMU CPU Emulator - development version
16
16
17
LIB_DEPENDS=	pixman-1:${PORTSDIR}/x11/pixman
18
19
HAS_CONFIGURE=	yes
17
HAS_CONFIGURE=	yes
20
USE_BZIP2=	yes
18
USE_BZIP2=	yes
21
USES=		gmake pkgconfig bison
19
USES=		gmake pkgconfig bison
22
USE_PERL5_BUILD=	yes
20
USE_PERL5_BUILD=	yes
23
USE_PYTHON_BUILD=	-2.7
21
USE_PYTHON_BUILD=	-2.7
22
USE_XORG=	pixman
24
USE_GNOME+=	glib20
23
USE_GNOME+=	glib20
25
PATCH_STRIP=	-p1
24
PATCH_STRIP=	-p1
26
MAKE_ENV+=	BSD_MAKE="${MAKE}"
25
MAKE_ENV+=	BSD_MAKE="${MAKE}"
(-)emulators/tme/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	tme
4
PORTNAME=	tme
5
PORTVERSION=	0.8
5
PORTVERSION=	0.8
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	emulators
7
CATEGORIES=	emulators
8
MASTER_SITES=	http://people.csail.mit.edu/fredette/tme/
8
MASTER_SITES=	http://people.csail.mit.edu/fredette/tme/
9
9
Lines 21-29 Link Here
21
		expat:${PORTSDIR}/textproc/expat2 \
21
		expat:${PORTSDIR}/textproc/expat2 \
22
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
22
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
23
23
24
USES=		pkgconfig gettext iconv perl5
24
USES=		pkgconfig gettext gmake iconv perl5
25
USE_GNOME=	gdkpixbuf2 gtk20
25
USE_GNOME=	gdkpixbuf2 gtk20
26
USE_GMAKE=	yes
27
USE_AUTOTOOLS=	libtool libltdl
26
USE_AUTOTOOLS=	libtool libltdl
28
CONFIGURE_ENV=	ac_cv_have_isinff=no
27
CONFIGURE_ENV=	ac_cv_have_isinff=no
29
CONFIGURE_ARGS=	--datadir=${WRKDIR}/tmproot --disable-warnings
28
CONFIGURE_ARGS=	--datadir=${WRKDIR}/tmproot --disable-warnings
(-)games/klavaro/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	klavaro
4
PORTNAME=	klavaro
5
PORTVERSION=	1.9.6
5
PORTVERSION=	1.9.6
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	games
7
CATEGORIES=	games
8
MASTER_SITES=	SF/${PORTNAME}/
8
MASTER_SITES=	SF/${PORTNAME}/
9
9
Lines 22-30 Link Here
22
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
22
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
23
		gtkdatabox:${PORTSDIR}/x11-toolkits/gtkdatabox
23
		gtkdatabox:${PORTSDIR}/x11-toolkits/gtkdatabox
24
24
25
USES=		pkgconfig gettext iconv
25
USES=		pkgconfig gettext gmake iconv
26
USE_BZIP2=	yes
26
USE_BZIP2=	yes
27
USE_GMAKE=	yes
28
USE_XORG=	pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
27
USE_XORG=	pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
29
		xfixes xi xinerama xrandr xrender
28
		xfixes xi xinerama xrandr xrender
30
USE_GNOME=	gtk20
29
USE_GNOME=	gtk20
(-)graphics/Makefile (+2 lines)
Lines 484-489 Link Here
484
    SUBDIR += leptonica
484
    SUBDIR += leptonica
485
    SUBDIR += lfview
485
    SUBDIR += lfview
486
    SUBDIR += lib3ds
486
    SUBDIR += lib3ds
487
    SUBDIR += libEGL
487
    SUBDIR += libGL
488
    SUBDIR += libGL
488
    SUBDIR += libGLU
489
    SUBDIR += libGLU
489
    SUBDIR += libGLw
490
    SUBDIR += libGLw
Lines 505-510 Link Here
505
    SUBDIR += libgeotiff
506
    SUBDIR += libgeotiff
506
    SUBDIR += libgfx
507
    SUBDIR += libgfx
507
    SUBDIR += libggi
508
    SUBDIR += libggi
509
    SUBDIR += libglesv2
508
    SUBDIR += libgltext
510
    SUBDIR += libgltext
509
    SUBDIR += libgnomecanvas
511
    SUBDIR += libgnomecanvas
510
    SUBDIR += libgnomecanvas-reference
512
    SUBDIR += libgnomecanvas-reference
(-)graphics/cairo/Makefile (-1 / +1 lines)
Lines 4-10 Link Here
4
4
5
PORTNAME=	cairo
5
PORTNAME=	cairo
6
PORTVERSION=	1.10.2
6
PORTVERSION=	1.10.2
7
PORTREVISION=	5
7
PORTREVISION=	6
8
PORTEPOCH?=	2
8
PORTEPOCH?=	2
9
CATEGORIES=	graphics
9
CATEGORIES=	graphics
10
MASTER_SITES=	http://cairographics.org/releases/
10
MASTER_SITES=	http://cairographics.org/releases/
(-)graphics/dri/Makefile (-36 / +72 lines)
Lines 9-63 Link Here
9
9
10
COMMENT=	OpenGL hardware acceleration drivers for the DRI
10
COMMENT=	OpenGL hardware acceleration drivers for the DRI
11
11
12
LIB_DEPENDS=	drm:${PORTSDIR}/graphics/libdrm \
12
LIB_DEPENDS=	libdrm.so:${PORTSDIR}/graphics/libdrm \
13
		expat:${PORTSDIR}/textproc/expat2
13
		libexpat.so:${PORTSDIR}/textproc/expat2
14
14
15
USES=		pkgconfig
15
USES=		pkgconfig
16
USE_XORG=	glproto x11 xext xxf86vm xdamage xfixes dri2proto
16
USE_XORG=	glproto x11 xext xxf86vm xdamage xfixes dri2proto
17
17
18
.include <bsd.port.options.mk>
19
20
# gcc from base can't handle some code in mesa 9.1+
21
# We only care for 9.x and 8.x, not for old pre-clang default current.
22
# This is for 0b0000 binary which gcc 4.3+ understands and is in the i965 driver.
23
.if defined(WITH_NEW_XORG)
24
. if ${OSVERSION} >= 901000 && ${OSVERSION} < 902502 \
25
		&& (${ARCH} == i386 || ${ARCH} == amd64)
26
CC=clang
27
CXX=clang++
28
CPP=clang-cpp
29
. elif ${OSVERSION} < 901500
30
USE_GCC=yes
31
. endif
32
.endif
33
34
.if ${ARCH} == ia64
35
#BROKEN=		does not install on ia64
36
.endif
37
18
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
38
ALL_DRI_DRIVERS=I915 I965 R200 RADEON SWRAST
19
39
20
.if ! defined(WITH_NEW_XORG)
40
.if !defined(WITH_NEW_XORG)
21
ALL_DRI_DRIVERS+=I810 MACH64 MGA R128 R300 R600 SAVAGE SIS TDFX UNICHROME
41
ALL_DRI_DRIVERS+=I810 MACH64 MGA R128 R300 R600 SAVAGE SIS TDFX UNICHROME
22
.endif
42
.endif
23
43
24
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
44
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
25
45
26
OPTIONS_DEFINE_i386=	${ALL_DRI_DRIVERS}
46
PLIST_SUB+=	VERSION=${MESADISTVERSION}
27
OPTIONS_DEFINE_amd64=	${OPTIONS_DEFINE_i386}
28
47
29
.if defined(WITH_NEW_XORG)
48
.if ${ARCH} == amd64 || ${ARCH} == i386
30
OPTIONS_DEFINE_powerpc=	RADEON SWRAST
49
DRI_DRIVERS=	${ALL_DRI_DRIVERS}
31
OPTIONS_DEFINE_sparc64=	RADEON SWRAST
32
.else
33
OPTIONS_DEFINE_powerpc=	MACH64 RADEON SWRAST TDFX
34
OPTIONS_DEFINE_sparc64=	MACH64 RADEON SWRAST
35
.endif
50
.endif
36
51
37
OPTIONS_DEFAULT=${OPTIONS_DEFINE}
52
.if defined(WITH_NEW_XORG)
53
. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
54
BUILD_DEPENDS+=	llvm-config33:${PORTSDIR}/devel/llvm33
55
RUN_DEPENDS+=	llvm-config33:${PORTSDIR}/devel/llvm33
56
CONFIGURE_ENV+=	LLVM_CONFIG=${LOCALBASE}/bin/llvm-config33
38
57
39
I810_DESC=	Include DRI support for Intel i810
58
CONFIGURE_ARGS+=--enable-gallium-llvm --disable-gallium-egl
40
I915_DESC=	Include DRI support for Intel i915
41
I965_DESC=	Include DRI support for Intel i965
42
MACH64_DESC=	Include DRI support for AMD/ATI Mach64
43
MGA_DESC=	Include DRI support for Matrox
44
R128_DESC=	Include DRI support for AMD/ATI R128
45
R200_DESC=	Include DRI support for AMD/ATI R200
46
R300_DESC=	Include DRI support for AMD/ATI R300
47
R600_DESC=	Include DRI support for AMD/ATI R600
48
RADEON_DESC=	Include DRI support for AMD/ATI RADEON
49
SAVAGE_DESC=	Include DRI support for S3/Via Savage
50
SIS_DESC=	Include DRI support for SiS 300 and 6326
51
SWRAST_DESC=	Include generic software DRI support
52
TDFX_DESC=	Include DRI support for 3dfx Voodoo
53
UNICHROME_DESC=	Include DRI support for S3/Via Unichrome
54
59
55
.include <bsd.port.options.mk>
60
CONFIGURE_ARGS+=--with-gallium-drivers=r300,r600,radeonsi,svga,swrast
61
PLIST_SUB+=	GALLIUM=""
62
. else
63
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
64
PLIST_SUB+=	GALLIUM="@comment "
65
. endif
66
. if ${ARCH} == powerpc || ${ARCH} == ia64
67
DRI_DRIVERS=	RADEON SWRAST
68
. endif
69
. if ${ARCH} == sparc64
70
DRI_DRIVERS=	SWRAST
71
. endif
72
.else # !defined(WITH_NEW_XORG)
73
. if ${ARCH} == powerpc
74
DRI_DRIVERS=	MACH64 RADEON SWRAST TDFX
75
. elif ${ARCH} == sparc64
76
DRI_DRIVERS=	MACH64 RADEON SWRAST
77
. endif
78
.endif # defined(WITH_NEW_XORG)
56
79
57
DRI_DRIVERS=
58
.for _d in ${ALL_DRI_DRIVERS}
80
.for _d in ${ALL_DRI_DRIVERS}
59
.if ${PORT_OPTIONS:M${_d}}
81
.if ${DRI_DRIVERS:M${_d}}
60
DRI_DRIVERS+=	${_d}
61
PLIST_SUB+=	${_d}_DRIVER=""
82
PLIST_SUB+=	${_d}_DRIVER=""
62
.else
83
.else
63
PLIST_SUB+=	${_d}_DRIVER="@comment "
84
PLIST_SUB+=	${_d}_DRIVER="@comment "
Lines 64-79 Link Here
64
.endif
85
.endif
65
.endfor
86
.endfor
66
87
67
.if ${ARCH} == "ia64"
88
.if !(${ARCH} == amd64 || ${ARCH} == i386)
68
BROKEN=		does not install on ia64
69
.endif
70
71
.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
72
CONFIGURE_ARGS+=--disable-gallium-intel
89
CONFIGURE_ARGS+=--disable-gallium-intel
73
.endif
90
.endif
74
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:L}"
91
CONFIGURE_ARGS+=--with-dri-drivers="${DRI_DRIVERS:L}"
75
92
93
.if defined(WITH_NEW_XORG) && !defined(WITH_GALLIUM) \
94
	&& (${ARCH} == i386 || ${ARCH} == amd64)
95
pre-everything::
96
	@${ECHO_MSG} ""
97
	@${ECHO_MSG} "For r300, r600, radeonsi and swrast gallium based drivers."
98
	@${ECHO_MSG} "Please define WITH_GALLIUM in /etc/make.conf"
99
	@${ECHO_MSG} "Note that gallium support is highly experimental."
100
	@${ECHO_MSG} ""
101
.endif
102
76
do-install:
103
do-install:
104
.if !defined(WITH_NEW_XORG)
77
	cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri
105
	cd ${WRKSRC}/src/mesa; ${GMAKE} install-dri
106
.else
107
	cd ${WRKSRC}/src/mesa/libdricore; ${GMAKE} install
108
	cd ${WRKSRC}/src/mesa/drivers/dri; ${GMAKE} install
109
. if defined(WITH_GALLIUM) && (${ARCH} == i386 || ${ARCH} == amd64)
110
	cd ${WRKSRC}/src/gallium/drivers/radeon; ${GMAKE} install
111
	cd ${WRKSRC}/src/gallium/targets; ${GMAKE} install
112
. endif
113
.endif
78
114
79
.include <bsd.port.mk>
115
.include <bsd.port.mk>
(-)graphics/dri/pkg-plist (+19 lines)
Lines 1-19 Link Here
1
%%NEW%%%%I965_DRIVER%%etc/drirc
1
include/GL/internal/dri_interface.h
2
include/GL/internal/dri_interface.h
2
%%OLD%%%%I810_DRIVER%%lib/dri/i810_dri.so
3
%%OLD%%%%I810_DRIVER%%lib/dri/i810_dri.so
4
%%NEW%%%%I915_DRIVER%%lib/dri/i915_dri.la
3
%%I915_DRIVER%%lib/dri/i915_dri.so
5
%%I915_DRIVER%%lib/dri/i915_dri.so
6
%%NEW%%%%I965_DRIVER%%lib/dri/i965_dri.la
4
%%I965_DRIVER%%lib/dri/i965_dri.so
7
%%I965_DRIVER%%lib/dri/i965_dri.so
5
%%OLD%%%%MACH64_DRIVER%%lib/dri/mach64_dri.so
8
%%OLD%%%%MACH64_DRIVER%%lib/dri/mach64_dri.so
6
%%OLD%%%%MGA_DRIVER%%lib/dri/mga_dri.so
9
%%OLD%%%%MGA_DRIVER%%lib/dri/mga_dri.so
7
%%OLD%%%%R128_DRIVER%%lib/dri/r128_dri.so
10
%%OLD%%%%R128_DRIVER%%lib/dri/r128_dri.so
11
%%NEW%%%%R200_DRIVER%%lib/dri/r200_dri.la
8
%%R200_DRIVER%%lib/dri/r200_dri.so
12
%%R200_DRIVER%%lib/dri/r200_dri.so
9
%%OLD%%%%R300_DRIVER%%lib/dri/r300_dri.so
13
%%OLD%%%%R300_DRIVER%%lib/dri/r300_dri.so
14
%%NEW%%%%GALLIUM%%lib/dri/r300_dri.la
15
%%NEW%%%%GALLIUM%%lib/dri/r300_dri.so
10
%%OLD%%%%R600_DRIVER%%lib/dri/r600_dri.so
16
%%OLD%%%%R600_DRIVER%%lib/dri/r600_dri.so
17
%%NEW%%%%GALLIUM%%lib/dri/r600_dri.la
18
%%NEW%%%%GALLIUM%%lib/dri/r600_dri.so
19
%%NEW%%%%RADEON_DRIVER%%lib/dri/radeon_dri.la
11
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
20
%%RADEON_DRIVER%%lib/dri/radeon_dri.so
21
%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.la
22
%%NEW%%%%GALLIUM%%lib/dri/radeonsi_dri.so
12
%%OLD%%%%SAVAGE_DRIVER%%lib/dri/savage_dri.so
23
%%OLD%%%%SAVAGE_DRIVER%%lib/dri/savage_dri.so
13
%%OLD%%%%SIS_DRIVER%%lib/dri/sis_dri.so
24
%%OLD%%%%SIS_DRIVER%%lib/dri/sis_dri.so
25
%%NEW%%%%SWRAST_DRIVER%%lib/dri/swrast_dri.la
14
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
26
%%SWRAST_DRIVER%%lib/dri/swrast_dri.so
15
%%OLD%%%%TDFX_DRIVER%%lib/dri/tdfx_dri.so
27
%%OLD%%%%TDFX_DRIVER%%lib/dri/tdfx_dri.so
16
%%OLD%%%%UNICHROME_DRIVER%%lib/dri/unichrome_dri.so
28
%%OLD%%%%UNICHROME_DRIVER%%lib/dri/unichrome_dri.so
29
%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.la
30
%%NEW%%%%GALLIUM%%lib/dri/vmwgfx_dri.so
31
%%NEW%%lib/libdricore%%VERSION%%.la
32
%%NEW%%lib/libdricore%%VERSION%%.so
33
%%NEW%%lib/libdricore%%VERSION%%.so.1
34
%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.la
35
%%NEW%%%%GALLIUM%%lib/libllvmradeon%%VERSION%%.so
17
libdata/pkgconfig/dri.pc
36
libdata/pkgconfig/dri.pc
18
@dirrm lib/dri
37
@dirrm lib/dri
19
@dirrmtry include/GL/internal
38
@dirrmtry include/GL/internal
(-)graphics/libEGL/Makefile (+30 lines)
Line 0 Link Here
1
# Created by: kwm@FreeBSD.org
2
# $FreeBSD$
3
4
PORTNAME=	libEGL
5
PORTVERSION=	${MESAVERSION}
6
CATEGORIES=	graphics
7
8
COMMENT=	OpenEGL library
9
10
LIB_DEPENDS+=	libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs
11
12
.if ! defined(WITH_NEW_XORG)
13
IGNORE=		Please enable WITH_NEW_XORG, libEGL needs libdrm higher then 2.4.24
14
.endif
15
16
USE_XORG=	x11 xau xcb xdmcp
17
18
# stuff not needed by libEGL but configure wants it
19
USE_XORG+=	glproto dri2proto xext xdamage xfixes
20
LIB_DEPENDS+=	libexpat.so:${PORTSDIR}/textproc/expat2 \
21
		libdrm.so:${PORTSDIR}/graphics/libdrm
22
23
BUILD_WKRSRC=	${WRKSRC}/src/egl
24
INSTALL_WRKSRC=	${WRKSRC}/src/egl
25
26
WITH_NEW_XORG=	yes
27
28
.include <bsd.port.options.mk>
29
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
30
.include <bsd.port.mk>
(-)graphics/libEGL/pkg-descr (+3 lines)
Line 0 Link Here
1
This package contains the EGL utility library.
2
3
WWW: http://www.freedesktop.org/Software/xorg
(-)graphics/libEGL/pkg-plist (+11 lines)
Line 0 Link Here
1
include/EGL/egl.h
2
include/EGL/eglext.h
3
include/EGL/eglmesaext.h
4
include/EGL/eglplatform.h
5
include/KHR/khrplatform.h
6
lib/libEGL.la
7
lib/libEGL.so
8
lib/libEGL.so.1
9
libdata/pkgconfig/egl.pc
10
@dirrmtry include/KHR
11
@dirrmtry include/EGL
(-)graphics/libGL/Makefile (-7 / +23 lines)
Lines 3-16 Link Here
3
3
4
PORTNAME=	libGL
4
PORTNAME=	libGL
5
PORTVERSION=	${MESAVERSION}
5
PORTVERSION=	${MESAVERSION}
6
PORTREVISION=	4
6
PORTREVISION=	${LIBGLREVISION}
7
CATEGORIES=	graphics
7
CATEGORIES=	graphics
8
8
9
MAINTAINER=	x11@FreeBSD.org
10
COMMENT=	OpenGL library that renders using GLX or DRI
9
COMMENT=	OpenGL library that renders using GLX or DRI
11
10
12
LIB_DEPENDS+=	drm:${PORTSDIR}/graphics/libdrm \
11
LIB_DEPENDS+=	libdrm.so:${PORTSDIR}/graphics/libdrm \
13
		expat:${PORTSDIR}/textproc/expat2
12
		libexpat.so:${PORTSDIR}/textproc/expat2
14
13
15
USES=		pkgconfig
14
USES=		pkgconfig
16
USE_XORG=	glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
15
USE_XORG=	glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
Lines 17-25 Link Here
17
16
18
SUB_FILES=	pkg-install pkg-deinstall
17
SUB_FILES=	pkg-install pkg-deinstall
19
18
19
.include <bsd.port.options.mk>
20
21
.if defined(WITH_NEW_XORG)
22
LIBGLREVISION=	0
23
.else
24
LIBGLREVISION=	4
25
.endif
26
20
do-install:
27
do-install:
28
.if ! defined(WITH_NEW_XORG)
21
	${RM} -f ${WRKSRC}/include/GL/glu*.h
29
	${RM} -f ${WRKSRC}/include/GL/glu*.h
30
	@${MKDIR} ${PREFIX}/lib/.libGL
22
	cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl
31
	cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl
32
.else
33
	cd ${WRKSRC}/src/mesa; ${GMAKE} install-pkgconfigDATA
34
	cd ${WRKSRC}/src/glx; ${GMAKE} install
35
	${MKDIR} ${PREFIX}/include/GL
36
	cd ${WRKSRC}/include/GL && ${COPYTREE_SHARE} \*.h ${PREFIX}/include/GL/
37
	@${MKDIR} ${PREFIX}/lib/.libGL
38
	${INSTALL_LIB} ${WRKSRC}/src/glx/.libs/libGL.so ${PREFIX}/lib/.libGL/
39
	${INSTALL_LIB} ${WRKSRC}/src/glx/.libs/libGL.so.1 ${PREFIX}/lib/.libGL/
40
.endif
23
41
24
post-install:
42
post-install:
25
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
43
	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
Lines 26-35 Link Here
26
44
27
.include "${.CURDIR}/bsd.mesalib.mk"
45
.include "${.CURDIR}/bsd.mesalib.mk"
28
46
29
.include <bsd.port.pre.mk>
30
31
.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
47
.if !(${ARCH} == "amd64" || ${ARCH} == "i386")
32
CONFIGURE_ARGS+=--disable-gallium-intel
48
CONFIGURE_ARGS+=--disable-gallium-intel
33
.endif
49
.endif
34
50
35
.include <bsd.port.post.mk>
51
.include <bsd.port.mk>
(-)graphics/libGL/bsd.mesalib.mk (-39 / +78 lines)
Lines 1-16 Link Here
1
#-*- mode: Fundamental; tab-width: 4; -*-
1
# bsd.mesalib.mk - shared code between MesaLib ports.
2
# ex:ts=4
3
#
2
#
4
# bsd.mesa.mk - an attempt to refactor MesaLib ports.
5
#
6
# Created by: Florent Thoumie <flz@FreeBSD.org>
7
#
8
# !!! Here be dragons !!! (they seem to be everywhere these days)
3
# !!! Here be dragons !!! (they seem to be everywhere these days)
9
#
4
#
10
# Remember to upgrade the following ports everytime you bump MESAVERSION:
5
# Remember to upgrade the following ports everytime you bump MESAVERSION:
11
#
6
#
7
#    - graphics/libEGL
12
#    - graphics/libGL
8
#    - graphics/libGL
13
#    - graphics/libGLU
9
#    - grahpics/libglesv2
14
#    - graphics/dri
10
#    - graphics/dri
15
#
11
#
16
# $FreeBSD$
12
# $FreeBSD$
Lines 21-27 Link Here
21
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
17
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
22
18
23
.if defined(WITH_NEW_XORG)
19
.if defined(WITH_NEW_XORG)
24
MESABASEVERSION=	8.0.5
20
MESABASEVERSION=	9.1.6
25
# if there is a subversion, include the '-' between 7.11-rc2 for example.
21
# if there is a subversion, include the '-' between 7.11-rc2 for example.
26
MESASUBVERSION=		
22
MESASUBVERSION=		
27
PLIST_SUB+=	OLD="@comment " NEW=""
23
PLIST_SUB+=	OLD="@comment " NEW=""
Lines 35-98 Link Here
35
DISTFILES=	MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}
31
DISTFILES=	MesaLib-${MESADISTVERSION}${EXTRACT_SUFX}
36
MAINTAINER?=	x11@FreeBSD.org
32
MAINTAINER?=	x11@FreeBSD.org
37
33
38
# HACK: added lang/python as build dependency - we need to check, which 
39
# python versions are cleanly supported by Mesa
40
BUILD_DEPENDS+=	makedepend:${PORTSDIR}/devel/makedepend \
34
BUILD_DEPENDS+=	makedepend:${PORTSDIR}/devel/makedepend \
41
		python:${PORTSDIR}/lang/python \
35
		python2:${PORTSDIR}/lang/python2 \
42
		${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
36
		${PYTHON_SITELIBDIR}/libxml2.py:${PORTSDIR}/textproc/py-libxml2
43
37
44
USES+=	bison
38
USES=		bison gmake pathfix pkgconfig shebangfix
45
USE_PYTHON_BUILD=yes
39
USE_PYTHON_BUILD=-2.7
46
USE_BZIP2=	yes
40
USE_BZIP2=	yes
47
USE_GMAKE=	yes
48
USE_LDCONFIG=	yes
41
USE_LDCONFIG=	yes
49
GNU_CONFIGURE=	yes
42
GNU_CONFIGURE=	yes
50
43
51
CPPFLAGS+=	-I${LOCALBASE}/include
44
CPPFLAGS+=	-I${LOCALBASE}/include
52
LDFLAGS+=	-L${LOCALBASE}/lib
45
LDFLAGS+=	-L${LOCALBASE}/lib
53
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers \
54
		--disable-egl
55
46
47
.if ${OSVERSION} < 1000033
48
BUILD_DEPENDS+=	${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex
49
CONFIGURE_ENV+=ac_cv_prog_LEX=${LOCALBASE}/bin/flex
50
.endif
51
56
.if defined(WITH_NEW_XORG)
52
.if defined(WITH_NEW_XORG)
57
EXTRA_PATCHES+=	${PATCHDIR}/extra-configure \
53
USE_AUTOTOOLS=	autoconf:env automake:env libtool:env
58
		${PATCHDIR}/extra-src-glsl_ir_constant_expression.cpp \
54
# probably be shared lib, and in it own port.
59
		${PATCHDIR}/extra-src__gallium__include__pipe__p_config.h \
55
CONFIGURE_ARGS+=        --enable-shared-glapi=no
60
		${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c \
56
# we need to reapply these patches because we doing wierd stuff with autogen
61
		${PATCHDIR}/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c \
57
REAPPLY_PATCHES= \
62
		${PATCHDIR}/extra-src_glx_XF86dri.c
58
		${PATCHDIR}/patch-configure \
59
		${PATCHDIR}/patch-src_egl_main_Makefile.in \
60
		${PATCHDIR}/patch-src_glx_Makefile.in \
61
		${PATCHDIR}/patch-src_mapi_es2api_Makefile.in \
62
		${PATCHDIR}/patch-src_mapi_shared-glapi_Makefile.in \
63
		${PATCHDIR}/patch-src_mesa_drivers_dri_common_Makefile.in \
64
		${PATCHDIR}/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in \
65
		${PATCHDIR}/patch-src_mesa_libdricore_Makefile.in
66
67
python_OLD_CMD=	"/usr/bin/env[[:space:]]python"
68
python_CMD=	${LOCALBASE}/bin/python2
69
SHEBANG_FILES=	src/gallium/*/*/*.py src/gallium/tools/trace/*.py \
70
		src/gallium/drivers/svga/svgadump/svga_dump.py \
71
		src/glsl/tests/compare_ir src/mapi/glapi/gen/*.py \
72
		src/mapi/mapi/mapi_abi.py
63
.else
73
.else
64
EXTRA_PATCHES+=	${PATCHDIR}/extra-configure-old \
74
CONFIGURE_ARGS+=--disable-glut --disable-glw --disable-glu
65
		${PATCHDIR}/extra-mach64_context.h-old \
66
		${PATCHDIR}/extra-src__mesa__x86-64__glapi_x86-64.S \
67
		${PATCHDIR}/extra-src__mesa__x86-64__xform4.S \
68
		${PATCHDIR}/extra-src__mesa__x86__glapi_x86.S \
69
		${PATCHDIR}/extra-src__mesa__x86__read_rgba_span_x86.S \
70
		${PATCHDIR}/extra-src_glx_x11_XF86dri.c
71
CONFIGURE_ARGS+=--disable-glut --disable-glw
72
.endif
73
75
74
ALL_TARGET=		default
76
ALL_TARGET=		default
77
.endif
75
78
76
MASTERDIR=		${.CURDIR}/../../graphics/libGL
79
MASTERDIR=		${.CURDIR}/../../graphics/libGL
80
.if defined(WITH_NEW_XORG)
77
PATCHDIR=		${MASTERDIR}/files
81
PATCHDIR=		${MASTERDIR}/files
82
.else
83
PATCHDIR=		${MASTERDIR}/files-old
84
.endif
78
DESCR=			${.CURDIR}/pkg-descr
85
DESCR=			${.CURDIR}/pkg-descr
79
PLIST=			${.CURDIR}/pkg-plist
86
PLIST=			${.CURDIR}/pkg-plist
80
WRKSRC=			${WRKDIR}/Mesa-${MESADISTVERSION}
87
WRKSRC=			${WRKDIR}/Mesa-${MESADISTVERSION}
81
88
82
.if !defined(ARCH)
83
ARCH!=			uname -p
84
.endif
85
86
COMPONENT=		${PORTNAME:L:C/^lib//:C/mesa-//}
89
COMPONENT=		${PORTNAME:L:C/^lib//:C/mesa-//}
87
90
88
.if ${COMPONENT:Mglu} == ""
91
.if ${COMPONENT:Mglesv2} == ""
89
CONFIGURE_ARGS+=	--disable-glu
92
CONFIGURE_ARGS+=	--disable-gles2
93
.else
94
CONFIGURE_ARGS+=	--enable-gles2
90
.endif
95
.endif
91
96
97
.if ${COMPONENT:Megl} == ""
98
CONFIGURE_ARGS+=	--disable-egl
99
.else
100
CONFIGURE_ARGS+=	--enable-egl
101
.endif
102
92
.if ${COMPONENT:Mdri} == ""
103
.if ${COMPONENT:Mdri} == ""
93
CONFIGURE_ARGS+=	--with-dri-drivers=no
104
CONFIGURE_ARGS+=--with-dri-drivers=no
105
CONFIGURE_ARGS+=--enable-gallium-llvm=no --without-gallium-drivers
94
.else
106
.else
95
CONFIGURE_ARGS+=	--with-dri-drivers="i915,i965,r200,radeon,swrast"
107
# done in the dri port
96
.endif
108
.endif
97
109
98
.if !defined(WITH_NEW_XORG)
110
.if !defined(WITH_NEW_XORG)
Lines 106-113 Link Here
106
post-patch:
118
post-patch:
107
	@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
119
	@${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
108
		${WRKSRC}/configure
120
		${WRKSRC}/configure
121
	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
122
		${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
123
.if !defined(WITH_NEW_XORG)
109
	@${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
124
	@${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
110
		${WRKSRC}/src/glu/Makefile \
125
		${WRKSRC}/src/glu/Makefile \
111
		${WRKSRC}/src/mesa/Makefile \
126
		${WRKSRC}/src/mesa/Makefile \
112
		${WRKSRC}/src/mesa/drivers/dri/Makefile
127
		${WRKSRC}/src/mesa/drivers/dri/Makefile
128
.else
129
	@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${LOCALBASE}/bin/python2|g' \
130
		${WRKSRC}/src/mesa/drivers/dri/common/xmlpool/gen_xmlpool.py \
131
		${WRKSRC}/src/glsl/builtins/tools/*.py
132
	@${REINPLACE_CMD} -e 's|!/use/bin/python2|!${LOCALBASE}/bin/python2|g' \
133
		${WRKSRC}/src/mesa/main/get_hash_generator.py \
134
		${WRKSRC}/src/mapi/glapi/gen/gl_enums.py \
135
		${WRKSRC}/src/mapi/glapi/gen/gl_table.py \
113
136
137
.endif
138
139
pre-configure:
140
# workaround for stupid rerunning configure in do-build step
141
# xxx
142
.if defined(WITH_NEW_XORG)
143
	cd ${WRKSRC} && env NOCONFIGURE=1 sh autogen.sh
144
. for file in ${REAPPLY_PATCHES}
145
	@cd ${WRKSRC} && ${PATCH} -p0 --quiet  < ${file}
146
. endfor
147
# make sure the pkg-config files are installed in the correct place.
148
# this was reverted by running autogen.sh
149
	@${FIND} ${WRKSRC} -name Makefile.in -type f | ${XARGS} ${REINPLACE_CMD} -e \
150
		's|[(]libdir[)]/pkgconfig|(prefix)/libdata/pkgconfig|g' ;
151
.endif
152
(-)graphics/libGL/distinfo (-2 / +2 lines)
Lines 1-4 Link Here
1
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
1
SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
2
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
2
SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
3
SHA256 (MesaLib-8.0.5.tar.bz2) = 511b8da34f8e69ed24caf422964fb7ae747f3b1d8093f6b8aa2602164a475a5e
3
SHA256 (MesaLib-9.1.6.tar.bz2) = e632dff0acafad0a59dc208d16dedb37f7bd58f94c5d58c4b51912e41d005e3d
4
SIZE (MesaLib-8.0.5.tar.bz2) = 5734571
4
SIZE (MesaLib-9.1.6.tar.bz2) = 6134267
(-)graphics/libGL/files/extra-configure (-40 lines)
Lines 1-40 Link Here
1
--- configure.orig	2012-07-10 17:30:46.000000000 +0200
2
+++ configure	2012-09-01 13:27:22.000000000 +0200
3
@@ -9017,9 +9017,34 @@
4
         DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
5
         DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
6
 
7
-        if test "x$DRI_DIRS" = "xyes"; then
8
-            DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
9
-        fi
10
+        case "$host_cpu" in
11
+        x86_64)
12
+            # i810 is missing because there is no x86-64 system where it
13
+            # could *ever* be used.
14
+            if test "x$DRI_DIRS" = "xyes"; then
15
+                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
16
+            fi
17
+            ;;
18
+        i*86)
19
+            if test "x$DRI_DIRS" = "xyes"; then
20
+                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
21
+            fi
22
+            ;;
23
+        powerpc*)
24
+            # Build only the drivers for cards that exist on PowerPC.
25
+            # At some point MGA will be added, but not yet.
26
+            if test "x$DRI_DIRS" = "xyes"; then
27
+                DRI_DIRS="r200 radeon swrast"
28
+            fi
29
+            ;;
30
+        sparc*)
31
+            # Build only the drivers for cards that exist on SPARC.
32
+            if test "x$DRI_DIRS" = "xyes"; then
33
+                DRI_DIRS="r200 radeon swrast"
34
+            fi
35
+            ;;
36
+        esac
37
+
38
         ;;
39
     gnu*)
40
         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
(-)graphics/libGL/files/extra-configure-old (-43 lines)
Lines 1-43 Link Here
1
--- configure.orig	2009-12-22 03:31:30.000000000 +0100
2
+++ configure	2012-06-27 19:49:26.000000000 +0200
3
@@ -6946,12 +6946,35 @@
4
             CXXFLAGS="$CXXFLAGS -ansi -pedantic"
5
         fi
6
 
7
-        # ffb and gamma are missing because they have not been converted
8
-        # to use the new interface.
9
-        if test "x$DRI_DIRS" = "xyes"; then
10
-            DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
11
+        case "$host_cpu" in
12
+        x86_64)
13
+            # i810 is missing because there is no x86-64 system where it
14
+            # could *ever* be used.
15
+            if test "x$DRI_DIRS" = "xyes"; then
16
+                DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
17
                 unichrome savage sis swrast"
18
-        fi
19
+            fi
20
+            ;;
21
+        i*86)
22
+            if test "x$DRI_DIRS" = "xyes"; then
23
+                DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
24
+                unichrome savage sis swrast"
25
+            fi
26
+            ;;
27
+        powerpc*)
28
+            # Build only the drivers for cards that exist on PowerPC.
29
+            # At some point MGA will be added, but not yet.
30
+            if test "x$DRI_DIRS" = "xyes"; then
31
+                DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast"
32
+            fi
33
+            ;;
34
+        sparc*)
35
+            # Build only the drivers for cards that exist on SPARC.
36
+            if test "x$DRI_DIRS" = "xyes"; then
37
+                DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast"
38
+            fi
39
+            ;;
40
+        esac
41
         ;;
42
     gnu*)
43
         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
(-)graphics/libGL/files/extra-mach64_context.h-old (-20 lines)
Lines 1-20 Link Here
1
--- src/mesa/drivers/dri/mach64/mach64_context.h.orig	2012-06-27 19:59:32.000000000 +0200
2
+++ src/mesa/drivers/dri/mach64/mach64_context.h	2012-06-27 20:08:30.000000000 +0200
3
@@ -294,11 +294,14 @@
4
 #define LE32_OUT( x, y )	do { *(GLuint *)(x) = (y); } while (0)
5
 #define LE32_OUT_FLOAT( x, y )	do { *(GLfloat *)(x) = (y); } while (0)
6
 #else
7
-#ifndef __OpenBSD__
8
-#include <byteswap.h>
9
-#else
10
+#if defined(__OpenBSD__)
11
 #include <machine/endian.h>
12
 #define bswap_32 bswap32
13
+#elif defined(__FreeBSD__)
14
+#include <sys/endian.h>
15
+#define bswap_32 bswap32
16
+#else
17
+#include <byteswap.h>
18
 #endif
19
 
20
 #define LE32_IN( x )		bswap_32( *(GLuint *)(x) )
(-)graphics/libGL/files/extra-src-glsl_ir_constant_expression.cpp (-14 lines)
Lines 1-14 Link Here
1
--- src/glsl/ir_constant_expression.cpp.orig	2011-07-23 15:08:44.000000000 +0200
2
+++ src/glsl/ir_constant_expression.cpp	2011-07-23 15:09:03.000000000 +0200
3
@@ -39,6 +39,11 @@
4
 #include "ir_visitor.h"
5
 #include "glsl_types.h"
6
 
7
+#include <sys/param.h>
8
+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
9
+#define log2(x) (log(x) / log(2))
10
+#endif
11
+
12
 static float
13
 dot(ir_constant *op0, ir_constant *op1)
14
 {
(-)graphics/libGL/files/extra-src__gallium__include__pipe__p_config.h (-25 lines)
Lines 1-25 Link Here
1
--- src/gallium/include/pipe/p_config.h.orig	2011-10-15 02:43:58.000000000 +0200
2
+++ src/gallium/include/pipe/p_config.h	2012-06-28 21:27:06.000000000 +0200
3
@@ -106,6 +106,13 @@
4
 #endif
5
 #endif
6
 
7
+#if defined(__sparc__) || defined(__sparc64__)
8
+#define PIPE_ARCH_SPARC
9
+#if defined(__sparc64__)
10
+#define PIPE_ARCH_SPARC_64
11
+#endif
12
+#endif
13
+
14
 
15
 /*
16
  * Endian detection.
17
@@ -133,7 +140,7 @@
18
 
19
 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
20
 #define PIPE_ARCH_LITTLE_ENDIAN
21
-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
22
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64)
23
 #define PIPE_ARCH_BIG_ENDIAN
24
 #endif
25
 
(-)graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_array.c (-99 lines)
Lines 1-99 Link Here
1
--- src/mesa/drivers/dri/nouveau/nouveau_array.c.orig	2011-01-06 01:19:15.000000000 +0100
2
+++ src/mesa/drivers/dri/nouveau/nouveau_array.c	2012-04-28 18:27:06.000000000 +0200
3
@@ -29,54 +29,71 @@
4
 #include "nouveau_array.h"
5
 #include "nouveau_bufferobj.h"
6
 
7
+#define EXTRACT(in_t, out_t) extract_func_##in_t##_to_##out_t
8
+
9
+#define EXTRACT_FUNC(in_t, out_t, k)			\
10
+static out_t EXTRACT(in_t, out_t)			\
11
+(struct nouveau_array *a, int i, int j) {		\
12
+	in_t x = ((in_t *)(a->buf + i * a->stride))[j];	\
13
+							\
14
+	return (out_t)x / (k);				\
15
+}
16
+
17
+EXTRACT_FUNC(GLchar, unsigned, 1);
18
+EXTRACT_FUNC(GLchar, float, SCHAR_MAX);
19
+EXTRACT_FUNC(GLubyte, unsigned, 1);
20
+EXTRACT_FUNC(GLubyte, float, UCHAR_MAX);
21
+EXTRACT_FUNC(GLshort, unsigned, 1);
22
+EXTRACT_FUNC(GLshort, float, SHRT_MAX);
23
+EXTRACT_FUNC(GLushort, unsigned, 1);
24
+EXTRACT_FUNC(GLushort, float, USHRT_MAX);
25
+EXTRACT_FUNC(GLint, unsigned, 1);
26
+EXTRACT_FUNC(GLint, float, INT_MAX);
27
+EXTRACT_FUNC(GLuint, unsigned, 1);
28
+EXTRACT_FUNC(GLuint, float, UINT_MAX);
29
+EXTRACT_FUNC(GLfloat, unsigned, 1.0 / UINT_MAX);
30
+EXTRACT_FUNC(GLfloat, float, 1);
31
+
32
+#undef EXTRACT_FUNC
33
+
34
 static void
35
 get_array_extract(struct nouveau_array *a, extract_u_t *extract_u,
36
 		  extract_f_t *extract_f)
37
 {
38
-#define EXTRACT(in_t, out_t, k)						\
39
-	({								\
40
-		auto out_t f(struct nouveau_array *, int, int);		\
41
-		out_t f(struct nouveau_array *a, int i, int j) {	\
42
-			in_t x = ((in_t *)(a->buf + i * a->stride))[j];	\
43
-									\
44
-			return (out_t)x / (k);				\
45
-		};							\
46
-		f;							\
47
-	});
48
-
49
 	switch (a->type) {
50
 	case GL_BYTE:
51
-		*extract_u = EXTRACT(char, unsigned, 1);
52
-		*extract_f = EXTRACT(char, float, SCHAR_MAX);
53
+		*extract_u = EXTRACT(GLchar, unsigned);
54
+		*extract_f = EXTRACT(GLchar, float);
55
 		break;
56
 	case GL_UNSIGNED_BYTE:
57
-		*extract_u = EXTRACT(unsigned char, unsigned, 1);
58
-		*extract_f = EXTRACT(unsigned char, float, UCHAR_MAX);
59
+		*extract_u = EXTRACT(GLubyte, unsigned);
60
+		*extract_f = EXTRACT(GLubyte, float);
61
 		break;
62
 	case GL_SHORT:
63
-		*extract_u = EXTRACT(short, unsigned, 1);
64
-		*extract_f = EXTRACT(short, float, SHRT_MAX);
65
+		*extract_u = EXTRACT(GLshort, unsigned);
66
+		*extract_f = EXTRACT(GLshort, float);
67
 		break;
68
 	case GL_UNSIGNED_SHORT:
69
-		*extract_u = EXTRACT(unsigned short, unsigned, 1);
70
-		*extract_f = EXTRACT(unsigned short, float, USHRT_MAX);
71
+		*extract_u = EXTRACT(GLushort, unsigned);
72
+		*extract_f = EXTRACT(GLushort, float);
73
 		break;
74
 	case GL_INT:
75
-		*extract_u = EXTRACT(int, unsigned, 1);
76
-		*extract_f = EXTRACT(int, float, INT_MAX);
77
+		*extract_u = EXTRACT(GLint, unsigned);
78
+		*extract_f = EXTRACT(GLint, float);
79
 		break;
80
 	case GL_UNSIGNED_INT:
81
-		*extract_u = EXTRACT(unsigned int, unsigned, 1);
82
-		*extract_f = EXTRACT(unsigned int, float, UINT_MAX);
83
+		*extract_u = EXTRACT(GLuint, unsigned);
84
+		*extract_f = EXTRACT(GLuint, float);
85
 		break;
86
 	case GL_FLOAT:
87
-		*extract_u = EXTRACT(float, unsigned, 1.0 / UINT_MAX);
88
-		*extract_f = EXTRACT(float, float, 1);
89
+		*extract_u = EXTRACT(GLfloat, unsigned);
90
+		*extract_f = EXTRACT(GLfloat, float);
91
 		break;
92
 	default:
93
 		assert(0);
94
 	}
95
 }
96
+#undef EXTRACT
97
 
98
 void
99
 nouveau_init_array(struct nouveau_array *a, int attr, int stride,
(-)graphics/libGL/files/extra-src__mesa__drivers__dri__nouveau__nouveau_render_t.c (-91 lines)
Lines 1-91 Link Here
1
--- src/mesa/drivers/dri/nouveau/nouveau_render_t.c.orig	2011-01-06 01:19:34.000000000 +0100
2
+++ src/mesa/drivers/dri/nouveau/nouveau_render_t.c	2012-04-28 18:27:06.000000000 +0200
3
@@ -97,52 +97,49 @@
4
 		}							\
5
 	} while (0)
6
 
7
-/*
8
- * Select an appropriate dispatch function for the given index buffer.
9
- */
10
-static dispatch_t
11
-get_array_dispatch(struct nouveau_array *a)
12
+static void
13
+dispatch_l(struct gl_context *ctx, unsigned int start, int delta,
14
+	   unsigned int n)
15
 {
16
-	if (!a->fields) {
17
-		auto void f(struct gl_context *, unsigned int, int, unsigned int);
18
-
19
-		void f(struct gl_context *ctx, unsigned int start, int delta,
20
-		       unsigned int n) {
21
-			struct nouveau_channel *chan = context_chan(ctx);
22
-			RENDER_LOCALS(ctx);
23
+	struct nouveau_channel *chan = context_chan(ctx);
24
+	RENDER_LOCALS(ctx);
25
 
26
-			EMIT_VBO(L, ctx, start, delta, n);
27
-		};
28
-
29
-		return f;
30
-
31
-	} else if (a->type == GL_UNSIGNED_INT) {
32
-		auto void f(struct gl_context *, unsigned int, int, unsigned int);
33
-
34
-		void f(struct gl_context *ctx, unsigned int start, int delta,
35
-		       unsigned int n) {
36
-			struct nouveau_channel *chan = context_chan(ctx);
37
-			RENDER_LOCALS(ctx);
38
+	EMIT_VBO(L, ctx, start, delta, n);
39
+}
40
 
41
-			EMIT_VBO(I32, ctx, start, delta, n);
42
-		};
43
+static void
44
+dispatch_i32(struct gl_context *ctx, unsigned int start, int delta,
45
+	     unsigned int n)
46
+{
47
+	struct nouveau_channel *chan = context_chan(ctx);
48
+	RENDER_LOCALS(ctx);
49
 
50
-		return f;
51
+	EMIT_VBO(I32, ctx, start, delta, n);
52
+}
53
 
54
-	} else {
55
-		auto void f(struct gl_context *, unsigned int, int, unsigned int);
56
+static void
57
+dispatch_i16(struct gl_context *ctx, unsigned int start, int delta,
58
+	     unsigned int n)
59
+{
60
+	struct nouveau_channel *chan = context_chan(ctx);
61
+	RENDER_LOCALS(ctx);
62
 
63
-		void f(struct gl_context *ctx, unsigned int start, int delta,
64
-		       unsigned int n) {
65
-			struct nouveau_channel *chan = context_chan(ctx);
66
-			RENDER_LOCALS(ctx);
67
-
68
-			EMIT_VBO(I32, ctx, start, delta, n & 1);
69
-			EMIT_VBO(I16, ctx, start, delta, n & ~1);
70
-		};
71
+	EMIT_VBO(I32, ctx, start, delta, n & 1);
72
+	EMIT_VBO(I16, ctx, start, delta, n & ~1);
73
+}
74
 
75
-		return f;
76
-	}
77
+/*
78
+ * Select an appropriate dispatch function for the given index buffer.
79
+ */
80
+static dispatch_t
81
+get_array_dispatch(struct nouveau_array *a)
82
+{
83
+	if (!a->fields)
84
+		return dispatch_l;
85
+	else if (a->type == GL_UNSIGNED_INT)
86
+		return dispatch_i32;
87
+	else
88
+		return dispatch_i16;
89
 }
90
 
91
 /*
(-)graphics/libGL/files/extra-src__mesa__x86-64__glapi_x86-64.S (-12 lines)
Lines 1-12 Link Here
1
--- ./src/mesa/x86-64/glapi_x86-64.S.orig	2009-03-13 04:28:49.000000000 +0100
2
+++ ./src/mesa/x86-64/glapi_x86-64.S	2011-01-28 18:12:18.000000000 +0100
3
@@ -73,7 +73,8 @@ _x86_64_get_dispatch:
4
 
5
 	.p2align	4,,15
6
 _x86_64_get_dispatch:
7
-	movq	_gl_DispatchTSD(%rip), %rdi
8
+	movq	_gl_DispatchTSD@GOTPCREL(%rip), %rax
9
+	movl	(%rax), %edi
10
 	jmp	pthread_getspecific@PLT
11
 
12
 #elif defined(THREADS)
(-)graphics/libGL/files/extra-src__mesa__x86-64__xform4.S (-74 lines)
Lines 1-74 Link Here
1
--- src/mesa/x86-64/xform4.S.orig	2009-01-22 18:38:35.000000000 +0100
2
+++ src/mesa/x86-64/xform4.S	2011-05-09 21:26:00.000000000 +0200
3
@@ -53,7 +53,7 @@ _mesa_x86_64_transform_points4_general:
4
  *	rdx = source
5
  */
6
 	movl V4F_COUNT(%rdx), %ecx	/* count */
7
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
8
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
9
 
10
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
11
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
12
@@ -116,7 +116,7 @@ p4_constants:
13
 .byte  0x00, 0x00, 0x00, 0x00
14
 .byte  0x00, 0x00, 0x00, 0x00
15
 .byte  0x00, 0x00, 0x00, 0x00
16
-.float 0f+1.0
17
+.float 1.0
18
 
19
 .text
20
 .align 16
21
@@ -135,7 +135,7 @@ _mesa_x86_64_transform_points4_3d:
22
 	movaps 16(%rax), %xmm10
23
 
24
 	movl V4F_COUNT(%rdx), %ecx	/* count */
25
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
26
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
27
 
28
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
29
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
30
@@ -195,7 +195,7 @@ p4_3d_done:
31
 _mesa_x86_64_transform_points4_identity:
32
 
33
 	movl V4F_COUNT(%rdx), %ecx	/* count */
34
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
35
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
36
 
37
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
38
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
39
@@ -223,7 +223,7 @@ p4_identity_done:
40
 _mesa_3dnow_transform_points4_3d_no_rot:
41
 
42
 	movl V4F_COUNT(%rdx), %ecx	/* count */
43
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
44
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
45
 
46
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
47
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
48
@@ -287,7 +287,7 @@ p4_3d_no_rot_done:
49
 _mesa_3dnow_transform_points4_perspective:
50
 
51
 	movl V4F_COUNT(%rdx), %ecx	/* count */
52
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
53
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
54
 
55
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
56
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
57
@@ -353,7 +353,7 @@ p4_perspective_done:
58
 _mesa_3dnow_transform_points4_2d_no_rot:
59
 
60
 	movl V4F_COUNT(%rdx), %ecx	/* count */
61
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
62
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
63
 
64
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
65
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
66
@@ -408,7 +408,7 @@ p4_2d_no_rot_done:
67
 _mesa_3dnow_transform_points4_2d:
68
 
69
 	movl V4F_COUNT(%rdx), %ecx	/* count */
70
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
71
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
72
 
73
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
74
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
(-)graphics/libGL/files/extra-src__mesa__x86__glapi_x86.S (-11 lines)
Lines 1-11 Link Here
1
--- ./src/mesa/x86/glapi_x86.S.orig	2009-03-13 04:28:49.000000000 +0100
2
+++ ./src/mesa/x86/glapi_x86.S	2011-01-28 18:11:56.000000000 +0100
3
@@ -47,7 +47,7 @@
4
 #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
5
 
6
 #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
7
-#define GLOBL_FN(x) GLOBL x ; .type x, function
8
+#define GLOBL_FN(x) GLOBL x ; .type x, @function
9
 #else
10
 #define GLOBL_FN(x) GLOBL x
11
 #endif
(-)graphics/libGL/files/extra-src__mesa__x86__read_rgba_span_x86.S (-11 lines)
Lines 1-11 Link Here
1
--- ./src/mesa/x86/read_rgba_span_x86.S.orig	2008-08-25 16:46:47.000000000 +0200
2
+++ ./src/mesa/x86/read_rgba_span_x86.S	2011-01-28 18:10:06.000000000 +0100
3
@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX:
4
 	testl	$0x01, %ecx
5
 	je	.L01
6
 
7
-	movzxw	(%eax), %ecx
8
+	movzwl	(%eax), %ecx
9
 	movd	%ecx, %mm4
10
 
11
 	pshufw	$0x00, %mm4, %mm0
(-)graphics/libGL/files/extra-src_glx_XF86dri.c (-38 lines)
Lines 1-38 Link Here
1
--- src/glx/XF86dri.c.orig	2012-10-24 19:03:59.000000000 +0000
2
+++ src/glx/XF86dri.c	2013-05-29 10:07:33.000000000 +0000
3
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
4
 #include <X11/extensions/Xext.h>
5
 #include <X11/extensions/extutil.h>
6
 #include "xf86dristr.h"
7
+#include <limits.h>
8
 
9
 static XExtensionInfo _xf86dri_info_data;
10
 static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
11
@@ -201,7 +202,11 @@ XF86DRIOpenConnection(Display * dpy, int
12
    }
13
 
14
    if (rep.length) {
15
-      if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
16
+      if (rep.busIdStringLength < INT_MAX)
17
+	 *busIdString = Xcalloc(rep.busIdStringLength + 1, 1);
18
+      else
19
+	 *busIdString = NULL;
20
+      if (*busIdString == NULL) {
21
          _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
22
          UnlockDisplay(dpy);
23
          SyncHandle();
24
@@ -300,9 +305,11 @@ XF86DRIGetClientDriverName(Display * dpy
25
    *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
26
 
27
    if (rep.length) {
28
-      if (!
29
-          (*clientDriverName =
30
-           (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
31
+      if (rep.clientDriverNameLength < INT_MAX)
32
+	 *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1);
33
+      else
34
+	 *clientDriverName = NULL;
35
+      if (*clientDriverName == NULL) {
36
          _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
37
          UnlockDisplay(dpy);
38
          SyncHandle();
(-)graphics/libGL/files/extra-src_glx_x11_XF86dri.c (-38 lines)
Lines 1-38 Link Here
1
--- src/glx/x11/XF86dri.c.orig	2009-06-17 18:35:16.000000000 +0000
2
+++ src/glx/x11/XF86dri.c	2013-05-29 10:09:37.000000000 +0000
3
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
4
 #include <X11/extensions/Xext.h>
5
 #include <X11/extensions/extutil.h>
6
 #include "xf86dristr.h"
7
+#include <limits.h>
8
 
9
 
10
 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
11
@@ -212,7 +213,11 @@ XF86DRIOpenConnection(Display * dpy, int
12
    }
13
 
14
    if (rep.length) {
15
-      if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
16
+      if (rep.busIdStringLength < INT_MAX)
17
+	 *busIdString = Xcalloc(rep.busIdStringLength + 1, 1);
18
+      else
19
+	 *busIdString = NULL;
20
+      if (*busIdString == NULL) {
21
          _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
22
          UnlockDisplay(dpy);
23
          SyncHandle();
24
@@ -311,9 +316,11 @@ XF86DRIGetClientDriverName(Display * dpy
25
    *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
26
 
27
    if (rep.length) {
28
-      if (!
29
-          (*clientDriverName =
30
-           (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
31
+      if (rep.clientDriverNameLength < INT_MAX)
32
+	 *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1);
33
+      else
34
+	 *clientDriverName = NULL;
35
+      if (*clientDriverName == NULL) {
36
          _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
37
          UnlockDisplay(dpy);
38
          SyncHandle();
(-)graphics/libGL/files/patch-configure (+49 lines)
Line 0 Link Here
1
--- configure.orig	2013-08-01 23:22:15.000000000 +0200
2
+++ configure	2013-08-19 20:05:02.000000000 +0200
3
@@ -21046,9 +21046,34 @@
4
         DEFINES="$DEFINES -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1"
5
         DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
6
 
7
-        if test "x$DRI_DIRS" = "xyes"; then
8
-            DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
9
-        fi
10
+        case "$host_cpu" in
11
+        x86_64)
12
+            # i810 is missing because there is no x86-64 system where it
13
+            # could *ever* be used.
14
+            if test "x$DRI_DIRS" = "xyes"; then
15
+                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
16
+            fi
17
+            ;;
18
+        i*86)
19
+            if test "x$DRI_DIRS" = "xyes"; then
20
+                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
21
+            fi
22
+            ;;
23
+        powerpc*)
24
+            # Build only the drivers for cards that exist on PowerPC.
25
+            # At some point MGA will be added, but not yet.
26
+            if test "x$DRI_DIRS" = "xyes"; then
27
+                DRI_DIRS="r200 radeon swrast"
28
+            fi
29
+            ;;
30
+        sparc*)
31
+            # Build only the drivers for cards that exist on SPARC.
32
+            if test "x$DRI_DIRS" = "xyes"; then
33
+                DRI_DIRS="r200 radeon swrast"
34
+            fi
35
+            ;;
36
+        esac
37
+
38
         ;;
39
     gnu*)
40
         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
41
@@ -23396,7 +23421,7 @@
42
 radeon_llvm_check() {
43
     LLVM_REQUIRED_VERSION_MAJOR="3"
44
     LLVM_REQUIRED_VERSION_MINOR="2"
45
-    if test "$LLVM_VERSION_INT" -ne "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
46
+    if test "$LLVM_VERSION_INT" -lt "${LLVM_REQUIRED_VERSION_MAJOR}0${LLVM_REQUIRED_VERSION_MINOR}"; then
47
         as_fn_error $? "LLVM $LLVM_REQUIRED_VERSION_MAJOR.$LLVM_REQUIRED_VERSION_MINOR with R600 target enabled is required.
48
                      To use the r600/radeonsi LLVM backend, you need to fetch the LLVM source from:
49
                      git://people.freedesktop.org/~tstellar/llvm master
(-)graphics/libGL/files/patch-src-glsl_ir_constant_expression.cpp (+14 lines)
Line 0 Link Here
1
--- src/glsl/ir_constant_expression.cpp.orig	2011-07-23 15:08:44.000000000 +0200
2
+++ src/glsl/ir_constant_expression.cpp	2011-07-23 15:09:03.000000000 +0200
3
@@ -39,6 +39,11 @@
4
 #include "ir_visitor.h"
5
 #include "glsl_types.h"
6
 
7
+#include <sys/param.h>
8
+#if __FreeBSD_version <= 704100 || (__FreeBSD_version >= 800000 && __FreeBSD_version < 802502) || (__FreeBSD_version >= 900000 && __FreeBSD_version < 900027)
9
+#define log2(x) (log(x) / log(2))
10
+#endif
11
+
12
 static float
13
 dot(ir_constant *op0, ir_constant *op1)
14
 {
(-)graphics/libGL/files/patch-src__gallium__include__pipe__p_config.h (+25 lines)
Line 0 Link Here
1
--- src/gallium/include/pipe/p_config.h.orig	2011-10-15 02:43:58.000000000 +0200
2
+++ src/gallium/include/pipe/p_config.h	2012-06-28 21:27:06.000000000 +0200
3
@@ -106,6 +106,13 @@
4
 #endif
5
 #endif
6
 
7
+#if defined(__sparc__) || defined(__sparc64__)
8
+#define PIPE_ARCH_SPARC
9
+#if defined(__sparc64__)
10
+#define PIPE_ARCH_SPARC_64
11
+#endif
12
+#endif
13
+
14
 
15
 /*
16
  * Endian detection.
17
@@ -133,7 +140,7 @@
18
 
19
 #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
20
 #define PIPE_ARCH_LITTLE_ENDIAN
21
-#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
22
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64) || defined(PIPE_ARCH_SPARC) || defined(PIPE_ARCH_SPARC_64)
23
 #define PIPE_ARCH_BIG_ENDIAN
24
 #endif
25
 
(-)graphics/libGL/files/patch-src_egl_main_Makefile.in (+19 lines)
Line 0 Link Here
1
--- src/egl/main/Makefile.in.orig	2013-08-01 23:22:16.000000000 +0200
2
+++ src/egl/main/Makefile.in	2013-09-01 11:33:47.000000000 +0200
3
@@ -990,8 +990,14 @@
4
 # a while by putting a link to the driver into /lib of the build tree.
5
 all-local: libEGL.la
6
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
7
-	ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1
8
-	ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so
9
+	base=$(basename $<);					\
10
+	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);	\
11
+	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);	\
12
+	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
13
+	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
14
+	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
15
+	fi;							\
16
+	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
17
 
18
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
19
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)graphics/libGL/files/patch-src_gallium_drivers_r300_r300-chipset.c (+26 lines)
Line 0 Link Here
1
diff --git a/src/gallium/drivers/r300/r300_chipset.c b/src/gallium/drivers/r300/r300_chipset.c
2
index 11061ed..daf990e 100644
3
--- src/gallium/drivers/r300/r300_chipset.c
4
+++ src/gallium/drivers/r300/r300_chipset.c
5
@@ -48,6 +48,21 @@ static void r300_apply_hyperz_blacklist(struct r300_capabilities* caps)
6
     };
7
     int i;
8
 
9
+#if defined(__DragonFly__) || \
10
+    defined(__FreeBSD__) ||   \
11
+    defined(__NetBSD__) ||    \
12
+    defined(__OpenBSD__)
13
+    const char *progname, *program_invocation_short_name;
14
+
15
+    progname = getprogname();
16
+    program_invocation_short_name = strrchr(progname, '/');
17
+    if (program_invocation_short_name) {
18
+        program_invocation_short_name++;
19
+    } else {
20
+        program_invocation_short_name = progname;
21
+    }
22
+#endif
23
+
24
     for (i = 0; i < Elements(list); i++) {
25
         if (strcmp(list[i], program_invocation_short_name) == 0) {
26
             caps->zmask_ram = 0;
(-)graphics/libGL/files/patch-src_gallium_drivers_r600_r600-asm.c (+15 lines)
Line 0 Link Here
1
--- src/gallium/drivers/r600/r600_asm.c.orig	2013-03-20 00:28:25.000000000 +0100
2
+++ src/gallium/drivers/r600/r600_asm.c	2013-06-26 23:29:14.000000000 +0200
3
@@ -27,7 +27,12 @@
4
 #include "r600d.h"
5
 
6
 #include <errno.h>
7
+#if defined(__linux__)
8
 #include <byteswap.h>
9
+#elif defined(__FreeBSD__)
10
+#include <sys/endian.h>
11
+#define bswap_32(x)	bswap32((x))
12
+#endif
13
 #include "util/u_memory.h"
14
 #include "pipe/p_shader_tokens.h"
15
 
(-)graphics/libGL/files/patch-src_gallium_drivers_r600_r600-shader.c (+15 lines)
Line 0 Link Here
1
--- src/gallium/drivers/r600/r600_shader.c.orig	2013-05-16 19:38:54.000000000 +0200
2
+++ src/gallium/drivers/r600/r600_shader.c	2013-06-26 23:26:02.000000000 +0200
3
@@ -35,7 +35,12 @@
4
 #include "util/u_memory.h"
5
 #include <stdio.h>
6
 #include <errno.h>
7
+#if defined(__linux__)
8
 #include <byteswap.h>
9
+#elif defined(__FreeBSD__)
10
+#include <sys/endian.h>
11
+#define bswap_32(x)	bswap32((x))
12
+#endif
13
 
14
 /* CAYMAN notes 
15
 Why CAYMAN got loops for lots of instructions is explained here.
(-)graphics/libGL/files/patch-src_gallium_drivers_r600_r600_state_common.c (+15 lines)
Line 0 Link Here
1
--- src/gallium/drivers/r600/r600_state_common.c.orig	2013-03-06 00:25:39.000000000 +0100
2
+++ src/gallium/drivers/r600/r600_state_common.c	2013-06-26 23:26:02.000000000 +0200
3
@@ -33,7 +33,12 @@
4
 #include "util/u_memory.h"
5
 #include "util/u_upload_mgr.h"
6
 #include "tgsi/tgsi_parse.h"
7
+#if defined(__linux__)
8
 #include <byteswap.h>
9
+#elif defined(__FreeBSD__)
10
+#include <sys/endian.h>
11
+#define bswap_32(x)	bswap32((x))
12
+#endif
13
 
14
 #define R600_PRIM_RECTANGLE_LIST PIPE_PRIM_MAX
15
 
(-)graphics/libGL/files/patch-src_gallium_drivers_radeon_radeon-llvm-emit.cpp (+28 lines)
Line 0 Link Here
1
--- src/gallium/drivers/radeon/radeon_llvm_emit.cpp.orig	2013-08-19 21:23:06.000000000 +0200
2
+++ src/gallium/drivers/radeon/radeon_llvm_emit.cpp	2013-08-19 21:30:58.000000000 +0200
3
@@ -25,13 +25,13 @@
4
  */
5
 #include "radeon_llvm_emit.h"
6
 
7
-#include <llvm/LLVMContext.h>
8
-#include <llvm/Module.h>
9
+#include <llvm/IR/LLVMContext.h>
10
+#include <llvm/IR/Module.h>
11
 #include <llvm/PassManager.h>
12
 #include <llvm/ADT/Triple.h>
13
 #include <llvm/Support/FormattedStream.h>
14
 #include <llvm/Support/Host.h>
15
-#include <llvm/Support/IRReader.h>
16
+#include <llvm/IRReader/IRReader.h>
17
 #include <llvm/Support/SourceMgr.h>
18
 #include <llvm/Support/TargetRegistry.h>
19
 #include <llvm/Support/TargetSelect.h>
20
@@ -39,7 +39,7 @@
21
 #include <llvm/Target/TargetMachine.h>
22
 #include <llvm/Transforms/Scalar.h>
23
 #include <llvm-c/Target.h>
24
-#include <llvm/DataLayout.h>
25
+#include <llvm/IR/DataLayout.h>
26
 
27
 #include <iostream>
28
 #include <stdlib.h>
(-)graphics/libGL/files/patch-src_gallium_drivers_radeonsi_r600-buffer.c (+16 lines)
Line 0 Link Here
1
--- src/gallium/drivers/radeonsi/r600_buffer.c.orig	2013-08-01 00:56:45.000000000 +0200
2
+++ src/gallium/drivers/radeonsi/r600_buffer.c	2013-08-19 21:36:02.000000000 +0200
3
@@ -24,7 +24,13 @@
4
  *      Jerome Glisse
5
  *      Corbin Simpson <MostAwesomeDude@gmail.com>
6
  */
7
+
8
+#if defined(__linux__)
9
 #include <byteswap.h>
10
+#elif defined(__FreeBSD__)
11
+#include <sys/endian.h>
12
+#define bswap_32(x)	bswap32((x))
13
+#endif
14
 
15
 #include "pipe/p_screen.h"
16
 #include "util/u_format.h"
(-)graphics/libGL/files/patch-src_gallium_winsys_svga_drm_vmw-screen-ioctl.c (+18 lines)
Line 0 Link Here
1
diff --git a/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c b/src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
2
index 36888dc..62a6e6a 100644
3
--- src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
4
+++ src/gallium/winsys/svga/drm/vmw_screen_ioctl.c
5
@@ -66,6 +66,13 @@ struct vmw_region
6
  */
7
 #define SVGA3D_SURFACE_HINT_SCANOUT (1 << 9)
8
 
9
+#if defined(__DragonFly__) || \
10
+    defined(__FreeBSD__) ||   \
11
+    defined(__NetBSD__) ||    \
12
+    defined(__OpenBSD__)
13
+#define	ERESTART EINTR
14
+#endif
15
+
16
 uint32
17
 vmw_ioctl_context_create(struct vmw_winsys_screen *vws)
18
 {
(-)graphics/libGL/files/patch-src_glx_Makefile.in (+59 lines)
Line 0 Link Here
1
--- src/glx/Makefile.in.orig	2013-07-03 15:13:37.000000000 +0200
2
+++ src/glx/Makefile.in	2013-07-03 15:19:44.000000000 +0200
3
@@ -162,12 +162,12 @@
4
 depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
5
 am__depfiles_maybe = depfiles
6
 am__mv = mv -f
7
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
8
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9
+COMPILE = $(CC) $(DEFS) $(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) \
10
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
11
 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
12
 	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
13
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
14
-	$(AM_CFLAGS) $(CFLAGS)
15
+	$(AM_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
16
+	$(CPPFLAGS) $(CFLAGS)
17
 AM_V_CC = $(am__v_CC_@AM_V@)
18
 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
19
 am__v_CC_0 = @echo "  CC      " $@;
20
@@ -632,17 +632,17 @@
21
 $(am__aclocal_m4_deps):
22
 install-libLTLIBRARIES: $(lib_LTLIBRARIES)
23
 	@$(NORMAL_INSTALL)
24
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
25
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)/.libGL" || list=; \
26
 	list2=; for p in $$list; do \
27
 	  if test -f $$p; then \
28
 	    list2="$$list2 $$p"; \
29
 	  else :; fi; \
30
 	done; \
31
 	test -z "$$list2" || { \
32
-	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
33
-	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
34
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
35
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
36
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)/.libGL'"; \
37
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)/.libGL" || exit 1; \
38
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)/.libGL'"; \
39
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)/.libGL"; \
40
 	}
41
 
42
 uninstall-libLTLIBRARIES:
43
@@ -1068,8 +1068,14 @@
44
 # a while by putting a link to the driver into /lib of the build tree.
45
 all-local: lib@GL_LIB@.la
46
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
47
-	ln -f .libs/lib@GL_LIB@.so.1.2.0 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so.1
48
-	ln -sf lib@GL_LIB@.so.1 $(top_builddir)/$(LIB_DIR)/lib@GL_LIB@.so
49
+	base=$(basename $<);					\
50
+	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);	\
51
+	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);	\
52
+	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
53
+	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
54
+	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
55
+	fi;							\
56
+	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
57
 
58
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
59
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)graphics/libGL/files/patch-src_mapi_es2api_Makefile.in (+20 lines)
Line 0 Link Here
1
--- src/mapi/es2api/Makefile.in.orig	2013-08-01 23:22:21.000000000 +0200
2
+++ src/mapi/es2api/Makefile.in	2013-09-01 11:38:01.000000000 +0200
3
@@ -958,9 +958,14 @@
4
 # a while by putting a link to the driver into /lib of the build tree.
5
 all-local: libGLESv2.la
6
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
7
-	ln -f .libs/libGLESv2.so $(top_builddir)/$(LIB_DIR)/libGLESv2.so
8
-	ln -f .libs/libGLESv2.so.2 $(top_builddir)/$(LIB_DIR)/libGLESv2.so.2
9
-	ln -f .libs/libGLESv2.so.2.0.0 $(top_builddir)/$(LIB_DIR)/libGLESv2.so.2.0.0
10
+	base=$(basename $<);                                    \
11
+	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);     \
12
+	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);       \
13
+	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
14
+	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
15
+	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
16
+	fi;                                                     \
17
+	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
18
 
19
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
20
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)graphics/libGL/files/patch-src_mapi_glapi_gen_gl-gentable.py (+11 lines)
Line 0 Link Here
1
--- src/mapi/glapi/gen/gl_gentable.py.orig	2013-07-17 15:41:13.000000000 +0200
2
+++ src/mapi/glapi/gen/gl_gentable.py	2013-07-17 15:41:55.000000000 +0200
3
@@ -42,7 +42,7 @@
4
 #endif
5
 
6
 #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\
7
-	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__))
8
+	|| (!defined(GLXEXT) && defined(DEBUG) && !defined(_WIN32_WCE) && !defined(__CYGWIN__) && !defined(__OpenBSD__) && !defined(__FreeBSD__))
9
 #define USE_BACKTRACE
10
 #endif
11
 
(-)graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in (+20 lines)
Line 0 Link Here
1
--- src/mapi/shared-glapi/Makefile.in.orig	2013-06-27 00:42:45.000000000 +0200
2
+++ src/mapi/shared-glapi/Makefile.in	2013-06-27 00:43:25.000000000 +0200
3
@@ -889,9 +889,14 @@
4
 
5
 all-local: libglapi.la
6
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR)
7
-	ln -f .libs/libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0.0.0
8
-	ln -sf libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0
9
-	ln -sf libglapi.so.0 $(top_builddir)/$(LIB_DIR)/libglapi.so
10
+	base=$(basename $<);					\
11
+	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);	\
12
+	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);	\
13
+	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
14
+	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
15
+	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
16
+	fi;							\
17
+	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
18
 
19
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
20
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)graphics/libGL/files/patch-src_mesa_Makefile (-15 lines)
Lines 1-15 Link Here
1
--- src/mesa/Makefile.orig	2012-04-22 18:34:50.000000000 +0200
2
+++ src/mesa/Makefile	2012-04-22 18:35:00.000000000 +0200
3
@@ -183,10 +183,10 @@
4
 		$(DESTDIR)$(INSTALL_INC_DIR)/GL
5
 
6
 install-libgl: default gl.pc install-headers
7
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
8
+	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
9
 	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
10
 	$(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
11
-		$(DESTDIR)$(INSTALL_LIB_DIR)
12
+		$(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
13
 	$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
14
 
15
 install-osmesa: default osmesa.pc
(-)graphics/libGL/files/patch-src_mesa_drivers_dri_common_Makefile.in (+17 lines)
Line 0 Link Here
1
--- src/mesa/drivers/dri/common/Makefile.in.orig	2013-04-20 14:50:15.000000000 +0000
2
+++ src/mesa/drivers/dri/common/Makefile.in	2013-04-20 15:02:05.000000000 +0000
3
@@ -123,11 +123,11 @@
4
 am__depfiles_maybe = depfiles
5
 am__mv = mv -f
6
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
7
-	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
8
+	$(AM_CFLAGS) $(CPPFLAGS) $(CFLAGS)
9
 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
10
 	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
11
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
12
-	$(AM_CFLAGS) $(CFLAGS)
13
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(AM_CFLAGS) $(CPPFLAGS) \
14
+	$(CFLAGS)
15
 AM_V_CC = $(am__v_CC_@AM_V@)
16
 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
17
 am__v_CC_0 = @echo "  CC      " $@;
(-)graphics/libGL/files/patch-src_mesa_drivers_dri_common_xmlpool_Makefile.in (+11 lines)
Line 0 Link Here
1
--- src/mesa/drivers/dri/common/xmlpool/Makefile.in.orig	2013-07-02 22:42:09.000000000 +0200
2
+++ src/mesa/drivers/dri/common/xmlpool/Makefile.in	2013-07-02 22:53:30.000000000 +0200
3
@@ -639,7 +639,7 @@
4
 # Update .mo files from the corresponding .po files.
5
 %/LC_MESSAGES/options.mo: %.po
6
 	@mo="$@"; \
7
-	lang=$${mo%%/*}; \
8
+	lang=$*; \
9
 	echo "Updating ($$lang) $@ from $?."; \
10
 	mkdir -p $$lang/LC_MESSAGES; \
11
 	msgfmt -o $@ $?
(-)graphics/libGL/files/patch-src_mesa_libdricore_Makefile.in (+19 lines)
Line 0 Link Here
1
--- src/mesa/libdricore/Makefile.in.orig	2013-06-27 00:21:26.000000000 +0200
2
+++ src/mesa/libdricore/Makefile.in	2013-06-27 00:28:29.000000000 +0200
3
@@ -3950,8 +4000,14 @@
4
 # a while by putting a link to the driver into /lib of the build tree.
5
 @HAVE_DRI_TRUE@all-local: libdricore@VERSION@.la
6
 @HAVE_DRI_TRUE@	$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
7
-@HAVE_DRI_TRUE@	ln -f .libs/libdricore@VERSION@.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so.1;
8
-@HAVE_DRI_TRUE@	ln -sf libdricore@VERSION@.so.1 $(top_builddir)/$(LIB_DIR)/libdricore@VERSION@.so
9
+@HAVE_DRI_TRUE@	base=$(basename $<);					\
10
+@HAVE_DRI_TRUE@	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);	\
11
+@HAVE_DRI_TRUE@	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);	\
12
+@HAVE_DRI_TRUE@	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
13
+@HAVE_DRI_TRUE@	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
14
+@HAVE_DRI_TRUE@	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
15
+@HAVE_DRI_TRUE@	fi;							\
16
+@HAVE_DRI_TRUE@	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
17
 
18
 -include $(DEPENDS)
19
 
(-)graphics/libGL/files/patch-src_mesa_main_compiler.h (+12 lines)
Line 0 Link Here
1
--- src/mesa/main/compiler.h.orig	2013-04-06 04:01:09.000000000 +0200
2
+++ src/mesa/main/compiler.h	2013-06-26 23:26:02.000000000 +0200
3
@@ -171,6 +171,9 @@
4
 #if defined(__linux__)
5
 #include <byteswap.h>
6
 #define CPU_TO_LE32( x )	bswap_32( x )
7
+#elif defined(__FreeBSD__)
8
+#include <sys/endian.h>
9
+#define CPU_TO_LE32( x )	bswap32( x )
10
 #elif defined(__APPLE__)
11
 #include <CoreFoundation/CFByteOrder.h>
12
 #define CPU_TO_LE32( x )	CFSwapInt32HostToLittle( x )
(-)graphics/libGL/files-old/patch-configure (+43 lines)
Line 0 Link Here
1
--- configure.orig	2009-12-22 03:31:30.000000000 +0100
2
+++ configure	2012-06-27 19:49:26.000000000 +0200
3
@@ -6946,12 +6946,35 @@
4
             CXXFLAGS="$CXXFLAGS -ansi -pedantic"
5
         fi
6
 
7
-        # ffb and gamma are missing because they have not been converted
8
-        # to use the new interface.
9
-        if test "x$DRI_DIRS" = "xyes"; then
10
-            DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
11
+        case "$host_cpu" in
12
+        x86_64)
13
+            # i810 is missing because there is no x86-64 system where it
14
+            # could *ever* be used.
15
+            if test "x$DRI_DIRS" = "xyes"; then
16
+                DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
17
                 unichrome savage sis swrast"
18
-        fi
19
+            fi
20
+            ;;
21
+        i*86)
22
+            if test "x$DRI_DIRS" = "xyes"; then
23
+                DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \
24
+                unichrome savage sis swrast"
25
+            fi
26
+            ;;
27
+        powerpc*)
28
+            # Build only the drivers for cards that exist on PowerPC.
29
+            # At some point MGA will be added, but not yet.
30
+            if test "x$DRI_DIRS" = "xyes"; then
31
+                DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast"
32
+            fi
33
+            ;;
34
+        sparc*)
35
+            # Build only the drivers for cards that exist on SPARC.
36
+            if test "x$DRI_DIRS" = "xyes"; then
37
+                DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast"
38
+            fi
39
+            ;;
40
+        esac
41
         ;;
42
     gnu*)
43
         DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
(-)graphics/libGL/files-old/patch-mach64_context.h (+20 lines)
Line 0 Link Here
1
--- src/mesa/drivers/dri/mach64/mach64_context.h.orig	2012-06-27 19:59:32.000000000 +0200
2
+++ src/mesa/drivers/dri/mach64/mach64_context.h	2012-06-27 20:08:30.000000000 +0200
3
@@ -294,11 +294,14 @@
4
 #define LE32_OUT( x, y )	do { *(GLuint *)(x) = (y); } while (0)
5
 #define LE32_OUT_FLOAT( x, y )	do { *(GLfloat *)(x) = (y); } while (0)
6
 #else
7
-#ifndef __OpenBSD__
8
-#include <byteswap.h>
9
-#else
10
+#if defined(__OpenBSD__)
11
 #include <machine/endian.h>
12
 #define bswap_32 bswap32
13
+#elif defined(__FreeBSD__)
14
+#include <sys/endian.h>
15
+#define bswap_32 bswap32
16
+#else
17
+#include <byteswap.h>
18
 #endif
19
 
20
 #define LE32_IN( x )		bswap_32( *(GLuint *)(x) )
(-)graphics/libGL/files-old/patch-src__mesa__x86-64__glapi_x86-64.S (+12 lines)
Line 0 Link Here
1
--- ./src/mesa/x86-64/glapi_x86-64.S.orig	2009-03-13 04:28:49.000000000 +0100
2
+++ ./src/mesa/x86-64/glapi_x86-64.S	2011-01-28 18:12:18.000000000 +0100
3
@@ -73,7 +73,8 @@ _x86_64_get_dispatch:
4
 
5
 	.p2align	4,,15
6
 _x86_64_get_dispatch:
7
-	movq	_gl_DispatchTSD(%rip), %rdi
8
+	movq	_gl_DispatchTSD@GOTPCREL(%rip), %rax
9
+	movl	(%rax), %edi
10
 	jmp	pthread_getspecific@PLT
11
 
12
 #elif defined(THREADS)
(-)graphics/libGL/files-old/patch-src__mesa__x86-64__xform4.S (+74 lines)
Line 0 Link Here
1
--- src/mesa/x86-64/xform4.S.orig	2009-01-22 18:38:35.000000000 +0100
2
+++ src/mesa/x86-64/xform4.S	2011-05-09 21:26:00.000000000 +0200
3
@@ -53,7 +53,7 @@ _mesa_x86_64_transform_points4_general:
4
  *	rdx = source
5
  */
6
 	movl V4F_COUNT(%rdx), %ecx	/* count */
7
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
8
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
9
 
10
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
11
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
12
@@ -116,7 +116,7 @@ p4_constants:
13
 .byte  0x00, 0x00, 0x00, 0x00
14
 .byte  0x00, 0x00, 0x00, 0x00
15
 .byte  0x00, 0x00, 0x00, 0x00
16
-.float 0f+1.0
17
+.float 1.0
18
 
19
 .text
20
 .align 16
21
@@ -135,7 +135,7 @@ _mesa_x86_64_transform_points4_3d:
22
 	movaps 16(%rax), %xmm10
23
 
24
 	movl V4F_COUNT(%rdx), %ecx	/* count */
25
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
26
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
27
 
28
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
29
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
30
@@ -195,7 +195,7 @@ p4_3d_done:
31
 _mesa_x86_64_transform_points4_identity:
32
 
33
 	movl V4F_COUNT(%rdx), %ecx	/* count */
34
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
35
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
36
 
37
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
38
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
39
@@ -223,7 +223,7 @@ p4_identity_done:
40
 _mesa_3dnow_transform_points4_3d_no_rot:
41
 
42
 	movl V4F_COUNT(%rdx), %ecx	/* count */
43
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
44
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
45
 
46
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
47
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
48
@@ -287,7 +287,7 @@ p4_3d_no_rot_done:
49
 _mesa_3dnow_transform_points4_perspective:
50
 
51
 	movl V4F_COUNT(%rdx), %ecx	/* count */
52
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
53
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
54
 
55
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
56
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
57
@@ -353,7 +353,7 @@ p4_perspective_done:
58
 _mesa_3dnow_transform_points4_2d_no_rot:
59
 
60
 	movl V4F_COUNT(%rdx), %ecx	/* count */
61
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
62
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
63
 
64
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
65
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
66
@@ -408,7 +408,7 @@ p4_2d_no_rot_done:
67
 _mesa_3dnow_transform_points4_2d:
68
 
69
 	movl V4F_COUNT(%rdx), %ecx	/* count */
70
-	movzx V4F_STRIDE(%rdx), %eax	/* stride */
71
+	movzbl V4F_STRIDE(%rdx), %eax	/* stride */
72
 
73
 	movl %ecx, V4F_COUNT(%rdi)	/* set dest count */
74
 	movl $4, V4F_SIZE(%rdi)		/* set dest size */
(-)graphics/libGL/files-old/patch-src__mesa__x86__glapi_x86.S (+11 lines)
Line 0 Link Here
1
--- ./src/mesa/x86/glapi_x86.S.orig	2009-03-13 04:28:49.000000000 +0100
2
+++ ./src/mesa/x86/glapi_x86.S	2011-01-28 18:11:56.000000000 +0100
3
@@ -47,7 +47,7 @@
4
 #define GL_OFFSET(x) CODEPTR(REGOFF(4 * x, EAX))
5
 
6
 #if defined(GNU_ASSEMBLER) && !defined(__DJGPP__) && !defined(__MINGW32__)
7
-#define GLOBL_FN(x) GLOBL x ; .type x, function
8
+#define GLOBL_FN(x) GLOBL x ; .type x, @function
9
 #else
10
 #define GLOBL_FN(x) GLOBL x
11
 #endif
(-)graphics/libGL/files-old/patch-src__mesa__x86__read_rgba_span_x86.S (+11 lines)
Line 0 Link Here
1
--- ./src/mesa/x86/read_rgba_span_x86.S.orig	2008-08-25 16:46:47.000000000 +0200
2
+++ ./src/mesa/x86/read_rgba_span_x86.S	2011-01-28 18:10:06.000000000 +0100
3
@@ -648,7 +648,7 @@ _generic_read_RGBA_span_RGB565_MMX:
4
 	testl	$0x01, %ecx
5
 	je	.L01
6
 
7
-	movzxw	(%eax), %ecx
8
+	movzwl	(%eax), %ecx
9
 	movd	%ecx, %mm4
10
 
11
 	pshufw	$0x00, %mm4, %mm0
(-)graphics/libGL/files-old/patch-src_glx_x11_XF86dri.c (+38 lines)
Line 0 Link Here
1
--- src/glx/x11/XF86dri.c.orig	2009-06-17 18:35:16.000000000 +0000
2
+++ src/glx/x11/XF86dri.c	2013-05-29 10:09:37.000000000 +0000
3
@@ -43,6 +43,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
4
 #include <X11/extensions/Xext.h>
5
 #include <X11/extensions/extutil.h>
6
 #include "xf86dristr.h"
7
+#include <limits.h>
8
 
9
 
10
 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
11
@@ -212,7 +213,11 @@ XF86DRIOpenConnection(Display * dpy, int
12
    }
13
 
14
    if (rep.length) {
15
-      if (!(*busIdString = (char *) Xcalloc(rep.busIdStringLength + 1, 1))) {
16
+      if (rep.busIdStringLength < INT_MAX)
17
+	 *busIdString = Xcalloc(rep.busIdStringLength + 1, 1);
18
+      else
19
+	 *busIdString = NULL;
20
+      if (*busIdString == NULL) {
21
          _XEatData(dpy, ((rep.busIdStringLength + 3) & ~3));
22
          UnlockDisplay(dpy);
23
          SyncHandle();
24
@@ -311,9 +316,11 @@ XF86DRIGetClientDriverName(Display * dpy
25
    *ddxDriverPatchVersion = rep.ddxDriverPatchVersion;
26
 
27
    if (rep.length) {
28
-      if (!
29
-          (*clientDriverName =
30
-           (char *) Xcalloc(rep.clientDriverNameLength + 1, 1))) {
31
+      if (rep.clientDriverNameLength < INT_MAX)
32
+	 *clientDriverName = Xcalloc(rep.clientDriverNameLength + 1, 1);
33
+      else
34
+	 *clientDriverName = NULL;
35
+      if (*clientDriverName == NULL) {
36
          _XEatData(dpy, ((rep.clientDriverNameLength + 3) & ~3));
37
          UnlockDisplay(dpy);
38
          SyncHandle();
(-)graphics/libGL/files-old/patch-src_mesa_Makefile (+15 lines)
Line 0 Link Here
1
--- src/mesa/Makefile.orig	2009-12-22 03:31:19.000000000 +0100
2
+++ src/mesa/Makefile	2013-08-19 23:19:42.000000000 +0200
3
@@ -127,10 +127,10 @@
4
 		$(DESTDIR)$(INSTALL_INC_DIR)/GL
5
 
6
 install-libgl: default gl.pc install-headers
7
-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
8
+	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
9
 	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
10
 	$(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
11
-		$(DESTDIR)$(INSTALL_LIB_DIR)
12
+		$(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
13
 	$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
14
 
15
 install-osmesa: default osmesa.pc
(-)graphics/libGL/pkg-plist (-1 / +2 lines)
Lines 11-19 Link Here
11
%%OLD%%include/GL/mglmesa.h
11
%%OLD%%include/GL/mglmesa.h
12
include/GL/osmesa.h
12
include/GL/osmesa.h
13
%%OLD%%include/GL/svgamesa.h
13
%%OLD%%include/GL/svgamesa.h
14
include/GL/vms_x_fix.h
14
%%OLD%%include/GL/vms_x_fix.h
15
include/GL/wglext.h
15
include/GL/wglext.h
16
include/GL/wmesa.h
16
include/GL/wmesa.h
17
%%NEW%%lib/.libGL/libGL.la
17
lib/.libGL/libGL.so
18
lib/.libGL/libGL.so
18
lib/.libGL/libGL.so.1
19
lib/.libGL/libGL.so.1
19
libdata/pkgconfig/gl.pc
20
libdata/pkgconfig/gl.pc
(-)graphics/libGLw/Makefile (-1 / +2 lines)
Lines 12-20 Link Here
12
COMMENT=	OpenGL widgets library
12
COMMENT=	OpenGL widgets library
13
13
14
USE_BZIP2=	yes
14
USE_BZIP2=	yes
15
USES=		pathfix pkgconfig motif
15
USES=		pathfix pkgconfig
16
USE_LDCONFIG=	yes
16
USE_LDCONFIG=	yes
17
USE_GL=		gl
17
USE_GL=		gl
18
USE_MOTIF=	yes
18
USE_XORG=	x11 xt xext
19
USE_XORG=	x11 xt xext
19
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
20
CONFIGURE_ARGS=	--disable-static --enable-motif
21
CONFIGURE_ARGS=	--disable-static --enable-motif
(-)graphics/libdrm/Makefile (-17 / +14 lines)
Lines 10-17 Link Here
10
MAINTAINER=	x11@FreeBSD.org
10
MAINTAINER=	x11@FreeBSD.org
11
COMMENT=	Userspace interface to kernel Direct Rendering Module services
11
COMMENT=	Userspace interface to kernel Direct Rendering Module services
12
12
13
LIB_DEPENDS=	pciaccess:${PORTSDIR}/devel/libpciaccess \
13
LIB_DEPENDS=	libpciaccess.so:${PORTSDIR}/devel/libpciaccess \
14
		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs
14
		libpthread-stubs.so:${PORTSDIR}/devel/libpthread-stubs
15
15
16
USES=		pkgconfig
16
USES=		pkgconfig
17
USE_BZIP2=	yes
17
USE_BZIP2=	yes
Lines 18-32 Link Here
18
GNU_CONFIGURE=	yes
18
GNU_CONFIGURE=	yes
19
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
20
20
21
OPTIONS_DEFINE=	MANPAGES
21
22
22
.if defined(WITH_NEW_XORG)
23
24
USES+=		gmake
25
26
OPTIONS_DEFINE=	KMS MANPAGES
27
OPTIONS_DEFAULT=KMS
28
KMS_DESC=	Enable KMS support
29
30
.if defined(PACKAGE_BUILDING)
23
.if defined(PACKAGE_BUILDING)
31
OPTIONS_DEFAULT+=	MANPAGES
24
OPTIONS_DEFAULT+=	MANPAGES
32
.endif
25
.endif
Lines 33-44 Link Here
33
26
34
.include <bsd.port.options.mk>
27
.include <bsd.port.options.mk>
35
28
36
.if ${PORT_OPTIONS:MKMS}
29
.if defined(WITH_NEW_XORG)
30
31
USES+=		gmake
32
33
# KMS support in the kernel is only build on these archs, disable others
34
.if ${ARCH} == "amd64" || ${ARCH} == "i386"
37
CONFIGURE_ARGS+=--enable-libkms
35
CONFIGURE_ARGS+=--enable-libkms
38
EXTRA_PATCHES+=	${FILESDIR}/extra-xf86drmMode.c
36
EXTRA_PATCHES+=	${FILESDIR}/extra-xf86drmMode.c
39
PLIST_SUB+=	KMS=""
37
PLIST_SUB+=	KMS="" NOUVEAU=""
40
.else
38
.else
41
PLIST_SUB+=	KMS="@comment "
39
CONFIGURE_ARGS+=--disable-libkms
40
PLIST_SUB+=	KMS="@comment " NOUVEAU="@comment "
42
.endif
41
.endif
43
42
44
.if ${PORT_OPTIONS:MMANPAGES}
43
.if ${PORT_OPTIONS:MMANPAGES}
Lines 69-79 Link Here
69
CONFIGURE_ARGS=	--enable-nouveau-experimental-api
68
CONFIGURE_ARGS=	--enable-nouveau-experimental-api
70
LIBDRM_VERSION=	2.4.17
69
LIBDRM_VERSION=	2.4.17
71
LIBDRM_REVISION=1
70
LIBDRM_REVISION=1
72
PLIST_SUB+=	OLD="" NEW="@comment "
71
PLIST_SUB+=	OLD="" NEW="@comment " NOUVEAU=""
73
.endif
72
.endif
74
73
75
.include <bsd.port.pre.mk>
76
77
.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64" || ${ARCH} == "powerpc"
74
.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64" || ${ARCH} == "powerpc"
78
PLIST_SUB+=	INTEL_DRIVER=""
75
PLIST_SUB+=	INTEL_DRIVER=""
79
PLIST_SUB+=	RADEON_DRIVERS=""
76
PLIST_SUB+=	RADEON_DRIVERS=""
Lines 87-90 Link Here
87
			   s,i?86|x86_64),i?86|amd64|x86_64),g' \
84
			   s,i?86|x86_64),i?86|amd64|x86_64),g' \
88
		${WRKSRC}/configure
85
		${WRKSRC}/configure
89
86
90
.include <bsd.port.post.mk>
87
.include <bsd.port.mk>
(-)graphics/libdrm/pkg-plist (-6 / +7 lines)
Lines 22-29 Link Here
22
%%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_debug.h
22
%%NEW%%%%INTEL_DRIVER%%include/libdrm/intel_debug.h
23
%%NEW%%include/libdrm/mach64_drm.h
23
%%NEW%%include/libdrm/mach64_drm.h
24
%%NEW%%include/libdrm/mga_drm.h
24
%%NEW%%include/libdrm/mga_drm.h
25
%%NEW%%include/libdrm/nouveau.h
25
%%NEW%%%%NOUVEAU%%include/libdrm/nouveau.h
26
%%NEW%%include/libdrm/nouveau_drm.h
26
%%NEW%%include/libdrm/nouveau_drm.h
27
%%NEW%%include/libdrm/qxl_drm.h
27
%%NEW%%include/libdrm/r128_drm.h
28
%%NEW%%include/libdrm/r128_drm.h
28
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/r600_pci_ids.h
29
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/r600_pci_ids.h
29
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/radeon_bo.h
30
%%NEW%%%%RADEON_DRIVERS%%include/libdrm/radeon_bo.h
Lines 54-63 Link Here
54
%%INTEL_DRIVER%%lib/libdrm_intel.la
55
%%INTEL_DRIVER%%lib/libdrm_intel.la
55
%%INTEL_DRIVER%%lib/libdrm_intel.so
56
%%INTEL_DRIVER%%lib/libdrm_intel.so
56
%%INTEL_DRIVER%%lib/libdrm_intel.so.1
57
%%INTEL_DRIVER%%lib/libdrm_intel.so.1
57
lib/libdrm_nouveau.la
58
%%NOUVEAU%%lib/libdrm_nouveau.la
58
lib/libdrm_nouveau.so
59
%%NOUVEAU%%lib/libdrm_nouveau.so
59
%%OLD%%lib/libdrm_nouveau.so.1
60
%%OLD%%%%NOUVEAU%%lib/libdrm_nouveau.so.1
60
%%NEW%%lib/libdrm_nouveau.so.2
61
%%NEW%%%%NOUVEAU%%lib/libdrm_nouveau.so.2
61
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.la
62
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.la
62
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so
63
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so
63
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1
64
%%NEW%%%%RADEON_DRIVERS%%lib/libdrm_radeon.so.1
Lines 66-72 Link Here
66
%%NEW%%%%KMS%%lib/libkms.so.1
67
%%NEW%%%%KMS%%lib/libkms.so.1
67
libdata/pkgconfig/libdrm.pc
68
libdata/pkgconfig/libdrm.pc
68
%%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc
69
%%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc
69
libdata/pkgconfig/libdrm_nouveau.pc
70
%%NOUVEAU%%libdata/pkgconfig/libdrm_nouveau.pc
70
%%NEW%%%%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc
71
%%NEW%%%%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc
71
%%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc
72
%%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc
72
%%OLD%%@dirrm include/nouveau
73
%%OLD%%@dirrm include/nouveau
(-)graphics/libglesv2/Makefile (+29 lines)
Line 0 Link Here
1
# Created by: kwm@FreeBSD.org
2
# $FreeBSD$
3
4
PORTNAME=	libglesv2
5
PORTVERSION=	${MESAVERSION}
6
CATEGORIES=	graphics
7
8
COMMENT=	OpenGL ES v2 library
9
10
LIB_DEPENDS+=	libdrm.so:${PORTSDIR}/graphics/libdrm \
11
		libexpat.so:${PORTSDIR}/textproc/expat2
12
13
.if ! defined(WITH_NEW_XORG)
14
IGNORE=		Please enable WITH_NEW_XORG, libglesv2 needs libdrm higher then 2.4.24
15
.endif
16
17
# stuff not needed by libEGL but configure wants it
18
USE_XORG+=	glproto dri2proto xext xdamage xfixes
19
20
21
BUILD_WKRSRC=	${WRKSRC}/src/mapi/es2api
22
INSTALL_WRKSRC=	${WRKSRC}/src/mapi/es2api
23
24
# this library doesn't exist in Mesa 7.6 so use newer
25
WITH_NEW_XORG=yes
26
27
.include <bsd.port.options.mk>
28
.include "${.CURDIR}/../../graphics/libGL/bsd.mesalib.mk"
29
.include <bsd.port.mk>
(-)graphics/libglesv2/pkg-descr (+3 lines)
Line 0 Link Here
1
This package contains the GL ES v2 utility library.
2
3
WWW: http://www.freedesktop.org/Software/xorg
(-)graphics/libglesv2/pkg-plist (+12 lines)
Line 0 Link Here
1
include/GLES2/gl2.h
2
include/GLES2/gl2ext.h
3
include/GLES2/gl2platform.h
4
include/GLES3/gl3.h
5
include/GLES3/gl3ext.h
6
include/GLES3/gl3platform.h
7
lib/libGLESv2.la
8
lib/libGLESv2.so
9
lib/libGLESv2.so.2
10
libdata/pkgconfig/glesv2.pc
11
@dirrmtry include/GLES3
12
@dirrmtry include/GLES2
(-)graphics/libreatlas/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	libreatlas
4
PORTNAME=	libreatlas
5
PORTVERSION=	1.0.0a
5
PORTVERSION=	1.0.0a
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	graphics geography
7
CATEGORIES=	graphics geography
8
MASTER_SITES=	http://www.gaia-gis.it/gaia-sins/
8
MASTER_SITES=	http://www.gaia-gis.it/gaia-sins/
9
9
Lines 30-37 Link Here
30
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
30
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
31
31
32
GNU_CONFIGURE=	yes
32
GNU_CONFIGURE=	yes
33
USES=		pkgconfig gettext iconv
33
USES=		pkgconfig gettext gmake iconv
34
USE_GMAKE=	yes
35
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
34
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
36
		xfixes xi xinerama xrandr xrender xxf86vm
35
		xfixes xi xinerama xrandr xrender xxf86vm
37
USE_GNOME=	atk gdkpixbuf2 glib20 gtk20 pango
36
USE_GNOME=	atk gdkpixbuf2 glib20 gtk20 pango
(-)multimedia/freetuxtv/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	freetuxtv
4
PORTNAME=	freetuxtv
5
PORTVERSION=	0.6.5
5
PORTVERSION=	0.6.5
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	multimedia
7
CATEGORIES=	multimedia
8
MASTER_SITES=	GOOGLE_CODE
8
MASTER_SITES=	GOOGLE_CODE
9
9
Lines 26-38 Link Here
26
		expat:${PORTSDIR}/textproc/expat2 \
26
		expat:${PORTSDIR}/textproc/expat2 \
27
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
27
		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
28
28
29
USES=		iconv pathfix pkgconfig
29
USES=		gmake iconv pathfix pkgconfig
30
USE_GNOME=	glib20 gtk20
30
USE_GNOME=	glib20 gtk20
31
USE_XORG=	pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext xfixes \
31
USE_XORG=	pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext xfixes \
32
		xi xinerama xrandr xrender
32
		xi xinerama xrandr xrender
33
GNU_CONFIGURE=	yes
33
GNU_CONFIGURE=	yes
34
CONFIGURE_ARGS+=--with-gtk=2.0
34
CONFIGURE_ARGS+=--with-gtk=2.0
35
USE_GMAKE=	yes
36
CFLAGS=		-Wno-return-type
35
CFLAGS=		-Wno-return-type
37
INSTALLS_ICONS=	yes
36
INSTALLS_ICONS=	yes
38
37
(-)net/cvsup/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	cvsup
4
PORTNAME=	cvsup
5
PORTVERSION=	16.1h
5
PORTVERSION=	16.1h
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	net devel
7
CATEGORIES=	net devel
8
MASTER_SITES=	${MASTER_SITE_FREEBSD_ORG}
8
MASTER_SITES=	${MASTER_SITE_FREEBSD_ORG}
9
MASTER_SITE_SUBDIR=development/CVSup/snapshots
9
MASTER_SITE_SUBDIR=development/CVSup/snapshots
(-)net/tigervnc/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	tigervnc
4
PORTNAME=	tigervnc
5
PORTVERSION=	1.2.0
5
PORTVERSION=	1.2.0
6
PORTREVISION=	3
6
PORTREVISION=	4
7
CATEGORIES=	net x11-servers
7
CATEGORIES=	net x11-servers
8
MASTER_SITES=	SF:tigervnc
8
MASTER_SITES=	SF:tigervnc
9
MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
9
MASTER_SITE_SUBDIR=	${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
Lines 28-35 Link Here
28
28
29
MAKE_JOBS_UNSAFE=	yes
29
MAKE_JOBS_UNSAFE=	yes
30
30
31
USES=		cmake pkgconfig
31
USES=		cmake gmake pkgconfig
32
USE_GMAKE=	yes
33
USE_GL=		gl
32
USE_GL=		gl
34
USE_AUTOTOOLS+=	autoconf:env automake:env libtool:env
33
USE_AUTOTOOLS+=	autoconf:env automake:env libtool:env
35
USE_PYTHON=	yes
34
USE_PYTHON=	yes
(-)print/photoprint/Makefile (-2 / +2 lines)
Lines 2-7 Link Here
2
2
3
PORTNAME=	photoprint
3
PORTNAME=	photoprint
4
DISTVERSION=	0.4.2-pre2
4
DISTVERSION=	0.4.2-pre2
5
PORTREVISION=	1
5
CATEGORIES=	print graphics
6
CATEGORIES=	print graphics
6
MASTER_SITES=	http://www.blackfiveimaging.co.uk/photoprint/
7
MASTER_SITES=	http://www.blackfiveimaging.co.uk/photoprint/
7
8
Lines 17-23 Link Here
17
		lcms:${PORTSDIR}/graphics/lcms \
18
		lcms:${PORTSDIR}/graphics/lcms \
18
		netpbm:${PORTSDIR}/graphics/netpbm \
19
		netpbm:${PORTSDIR}/graphics/netpbm \
19
		pcre:${PORTSDIR}/devel/pcre \
20
		pcre:${PORTSDIR}/devel/pcre \
20
		pixman:${PORTSDIR}/x11/pixman \
21
		png15:${PORTSDIR}/graphics/png \
21
		png15:${PORTSDIR}/graphics/png \
22
		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
22
		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
23
		tiff:${PORTSDIR}/graphics/tiff
23
		tiff:${PORTSDIR}/graphics/tiff
Lines 25-31 Link Here
25
GNU_CONFIGURE=	yes
25
GNU_CONFIGURE=	yes
26
USES=		desktop-file-utils gettext pkgconfig
26
USES=		desktop-file-utils gettext pkgconfig
27
USE_GNOME=	pango
27
USE_GNOME=	pango
28
USE_XORG=	x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
28
USE_XORG=	pixman x11 xau xcb xcomposite xcursor xdamage xdmcp xext \
29
		xfixes xi xinerama xrandr xrender
29
		xfixes xi xinerama xrandr xrender
30
INSTALLS_ICONS=	yes
30
INSTALLS_ICONS=	yes
31
31
(-)sysutils/gtk-imonc/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gtk-imonc
4
PORTNAME=	gtk-imonc
5
PORTVERSION=	0.6.4.1
5
PORTVERSION=	0.6.4.1
6
PORTREVISION=	12
6
PORTREVISION=	13
7
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
8
MASTER_SITES=	http://stefan-strigler.de/download/
8
MASTER_SITES=	http://stefan-strigler.de/download/
9
9
(-)sysutils/nitrogen/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	nitrogen
4
PORTNAME=	nitrogen
5
PORTVERSION=	1.5.2
5
PORTVERSION=	1.5.2
6
PORTREVISION=	2
6
PORTREVISION=	3
7
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
8
MASTER_SITES=	http://projects.l3ib.org/nitrogen/files/
8
MASTER_SITES=	http://projects.l3ib.org/nitrogen/files/
9
9
(-)x11/libSM/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libSM
4
PORTNAME=	libSM
5
PORTVERSION=	1.2.1
5
PORTVERSION=	1.2.2
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	x11
7
CATEGORIES=	x11
8
8
(-)x11/libSM/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libSM-1.2.1.tar.bz2) = 93c11d569c64f40723b93b44af1efb474a0cfe92573b0c8c330343cabb897f1d
1
SHA256 (xorg/lib/libSM-1.2.2.tar.bz2) = 0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
2
SIZE (xorg/lib/libSM-1.2.1.tar.bz2) = 334696
2
SIZE (xorg/lib/libSM-1.2.2.tar.bz2) = 348908
(-)x11/libX11/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libX11
4
PORTNAME=	libX11
5
PORTVERSION=	1.6.1
5
PORTVERSION=	1.6.2
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	x11
7
CATEGORIES=	x11
8
8
(-)x11/libX11/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libX11-1.6.1.tar.bz2) = 10a54fc16b58b4f5a5eed4d080c357a82fd2f42d09af625c1f5df50650701892
1
SHA256 (xorg/lib/libX11-1.6.2.tar.bz2) = 2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
2
SIZE (xorg/lib/libX11-1.6.1.tar.bz2) = 2356196
2
SIZE (xorg/lib/libX11-1.6.2.tar.bz2) = 2339981
(-)x11/libX11/pkg-plist (+8 lines)
Lines 103-108 Link Here
103
lib/X11/locale/ja_JP.UTF-8/Compose
103
lib/X11/locale/ja_JP.UTF-8/Compose
104
lib/X11/locale/ja_JP.UTF-8/XI18N_OBJS
104
lib/X11/locale/ja_JP.UTF-8/XI18N_OBJS
105
lib/X11/locale/ja_JP.UTF-8/XLC_LOCALE
105
lib/X11/locale/ja_JP.UTF-8/XLC_LOCALE
106
lib/X11/locale/km_KH.UTF-8/Compose
107
lib/X11/locale/km_KH.UTF-8/XI18N_OBJS
108
lib/X11/locale/km_KH.UTF-8/XLC_LOCALE
106
lib/X11/locale/ko/Compose
109
lib/X11/locale/ko/Compose
107
lib/X11/locale/ko/XI18N_OBJS
110
lib/X11/locale/ko/XI18N_OBJS
108
lib/X11/locale/ko/XLC_LOCALE
111
lib/X11/locale/ko/XLC_LOCALE
Lines 141-146 Link Here
141
lib/X11/locale/ru_RU.UTF-8/Compose
144
lib/X11/locale/ru_RU.UTF-8/Compose
142
lib/X11/locale/ru_RU.UTF-8/XI18N_OBJS
145
lib/X11/locale/ru_RU.UTF-8/XI18N_OBJS
143
lib/X11/locale/ru_RU.UTF-8/XLC_LOCALE
146
lib/X11/locale/ru_RU.UTF-8/XLC_LOCALE
147
lib/X11/locale/sr_CS.UTF-8/Compose
148
lib/X11/locale/sr_CS.UTF-8/XI18N_OBJS
149
lib/X11/locale/sr_CS.UTF-8/XLC_LOCALE
144
lib/X11/locale/tatar-cyr/Compose
150
lib/X11/locale/tatar-cyr/Compose
145
lib/X11/locale/tatar-cyr/XI18N_OBJS
151
lib/X11/locale/tatar-cyr/XI18N_OBJS
146
lib/X11/locale/tatar-cyr/XLC_LOCALE
152
lib/X11/locale/tatar-cyr/XLC_LOCALE
Lines 215-220 Link Here
215
@dirrm lib/X11/locale/th_TH.UTF-8
221
@dirrm lib/X11/locale/th_TH.UTF-8
216
@dirrm lib/X11/locale/th_TH
222
@dirrm lib/X11/locale/th_TH
217
@dirrm lib/X11/locale/tatar-cyr
223
@dirrm lib/X11/locale/tatar-cyr
224
@dirrm lib/X11/locale/sr_CS.UTF-8
218
@dirrm lib/X11/locale/ru_RU.UTF-8
225
@dirrm lib/X11/locale/ru_RU.UTF-8
219
@dirrm lib/X11/locale/pt_BR.UTF-8
226
@dirrm lib/X11/locale/pt_BR.UTF-8
220
@dirrm lib/X11/locale/nokhchi-1
227
@dirrm lib/X11/locale/nokhchi-1
Lines 227-232 Link Here
227
@dirrm lib/X11/locale/koi8-c
234
@dirrm lib/X11/locale/koi8-c
228
@dirrm lib/X11/locale/ko_KR.UTF-8
235
@dirrm lib/X11/locale/ko_KR.UTF-8
229
@dirrm lib/X11/locale/ko
236
@dirrm lib/X11/locale/ko
237
@dirrm lib/X11/locale/km_KH.UTF-8
230
@dirrm lib/X11/locale/ja_JP.UTF-8
238
@dirrm lib/X11/locale/ja_JP.UTF-8
231
@dirrm lib/X11/locale/ja.SJIS
239
@dirrm lib/X11/locale/ja.SJIS
232
@dirrm lib/X11/locale/ja.JIS
240
@dirrm lib/X11/locale/ja.JIS
(-)x11/libXpm/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libXpm
4
PORTNAME=	libXpm
5
PORTVERSION=	3.5.10
5
PORTVERSION=	3.5.11
6
CATEGORIES=	x11
6
CATEGORIES=	x11
7
7
8
MAINTAINER=	x11@FreeBSD.org
8
MAINTAINER=	x11@FreeBSD.org
(-)x11/libXpm/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libXpm-3.5.10.tar.bz2) = a6db7e234750e7d60330017972e31d8e1f29f0a8c1391e4ac82f6102d919a735
1
SHA256 (xorg/lib/libXpm-3.5.11.tar.bz2) = c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c
2
SIZE (xorg/lib/libXpm-3.5.10.tar.bz2) = 431310
2
SIZE (xorg/lib/libXpm-3.5.11.tar.bz2) = 443496
(-)x11/libXrandr/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libXrandr
4
PORTNAME=	libXrandr
5
PORTVERSION=	1.4.1
5
PORTVERSION=	1.4.2
6
CATEGORIES=	x11
6
CATEGORIES=	x11
7
7
8
MAINTAINER=	x11@FreeBSD.org
8
MAINTAINER=	x11@FreeBSD.org
(-)x11/libXrandr/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libXrandr-1.4.1.tar.bz2) = d914a0490fd0a2ea6c3194505b5b28c56e2a277d8f4648b0275ee0ee370fb905
1
SHA256 (xorg/lib/libXrandr-1.4.2.tar.bz2) = caa7b31ac769be51a532343c65376f1d4df3f307afaed58e34fb5e82e8b825ad
2
SIZE (xorg/lib/libXrandr-1.4.1.tar.bz2) = 312857
2
SIZE (xorg/lib/libXrandr-1.4.2.tar.bz2) = 315165
(-)x11/libXv/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libXv
4
PORTNAME=	libXv
5
PORTVERSION=	1.0.9
5
PORTVERSION=	1.0.10
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	x11
7
CATEGORIES=	x11
8
8
(-)x11/libXv/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libXv-1.0.9.tar.bz2) = a874dbf864d0271bbe795af67ef5b3f20096c92fc11eacbf0d2af00e32bc5b4b
1
SHA256 (xorg/lib/libXv-1.0.10.tar.bz2) = 55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525
2
SIZE (xorg/lib/libXv-1.0.9.tar.bz2) = 309744
2
SIZE (xorg/lib/libXv-1.0.10.tar.bz2) = 300633
(-)x11/libxcb/Makefile (-2 / +1 lines)
Lines 20-28 Link Here
20
CONFIGURE_ARGS+=	--disable-build-docs --without-doxygen --enable-xinput
20
CONFIGURE_ARGS+=	--disable-build-docs --without-doxygen --enable-xinput
21
21
22
USE_BZIP2=	yes
22
USE_BZIP2=	yes
23
USES=		pathfix pkgconfig
23
USES=		gmake pathfix pkgconfig
24
USE_GNOME=	libxslt:build
24
USE_GNOME=	libxslt:build
25
USE_GMAKE=	yes
26
USE_LDCONFIG=	yes
25
USE_LDCONFIG=	yes
27
USE_XORG=	xau xdmcp
26
USE_XORG=	xau xdmcp
28
USE_PYTHON_BUILD=	2.5+
27
USE_PYTHON_BUILD=	2.5+
(-)x11/pixman/Makefile (-3 / +2 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	pixman
3
PORTNAME=	pixman
4
PORTVERSION=	0.30.0
4
PORTVERSION=	0.30.2
5
CATEGORIES=	x11
5
CATEGORIES=	x11
6
6
7
MAINTAINER=	x11@FreeBSD.org
7
MAINTAINER=	x11@FreeBSD.org
Lines 8-17 Link Here
8
COMMENT=	Low-level pixel manipulation library
8
COMMENT=	Low-level pixel manipulation library
9
9
10
USES=		perl5
10
USES=		perl5
11
USE_PERL5=	build
11
XORG_CAT=	lib
12
XORG_CAT=	lib
12
USE_AUTOTOOLS=	libtool
13
USE_AUTOTOOLS=	libtool
13
USE_PERL5=	build
14
USE_GNOME=	ltverhack:9
15
CONFIGURE_ARGS=	--disable-gtk
14
CONFIGURE_ARGS=	--disable-gtk
16
15
17
OPTIONS_DEFINE=	SIMD
16
OPTIONS_DEFINE=	SIMD
(-)x11/pixman/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/pixman-0.30.0.tar.bz2) = 77e756dc7fafdf17f39a4f23bdc8be59f9f6a65c08704f5cac1d8aa87cfaf517
1
SHA256 (xorg/lib/pixman-0.30.2.tar.bz2) = 4fbb51788fe7cbd8abb5f80aed95ec878704e57a06328f7bebe0306e3822c96c
2
SIZE (xorg/lib/pixman-0.30.0.tar.bz2) = 681343
2
SIZE (xorg/lib/pixman-0.30.2.tar.bz2) = 666281
(-)x11/xkeyboard-config/Makefile (-2 / +1 lines)
Lines 14-22 Link Here
14
XORG_CAT=	data
14
XORG_CAT=	data
15
15
16
USE_BZIP2=	yes
16
USE_BZIP2=	yes
17
USE_GMAKE=	yes
18
USE_GNOME=	intlhack libxslt:build
17
USE_GNOME=	intlhack libxslt:build
19
USES=		pathfix perl5
18
USES=		gmake pathfix perl5
20
USE_PERL5=	build
19
USE_PERL5=	build
21
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
22
MAKE_JOBS_UNSAFE=yes
21
MAKE_JOBS_UNSAFE=yes
(-)x11/xorg-cf-files/Makefile (+1 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	xorg-cf-files
4
PORTNAME=	xorg-cf-files
5
PORTVERSION=	1.0.5
5
PORTVERSION=	1.0.5
6
PORTREVISION=	1
6
CATEGORIES=	x11
7
CATEGORIES=	x11
7
8
8
MAINTAINER=	x11@FreeBSD.org
9
MAINTAINER=	x11@FreeBSD.org
(-)x11/xtrans/Makefile (-2 lines)
Lines 8-15 Link Here
8
MAINTAINER=	x11@FreeBSD.org
8
MAINTAINER=	x11@FreeBSD.org
9
COMMENT=	Abstract network code for X
9
COMMENT=	Abstract network code for X
10
10
11
CONFLICTS=	libXtrans
12
13
LICENSE=	MIT
11
LICENSE=	MIT
14
12
15
XORG_CAT=	lib
13
XORG_CAT=	lib
(-)x11-drivers/xf86-input-mouse/files/patch-src-bsd_mouse.c (-16 / +810 lines)
Lines 1-13 Link Here
1
--- src/bsd_mouse.c.orig	2012-07-27 08:10:56.000000000 +0200
1
--- src/bsd_mouse.c.orig	2012-10-08 03:40:07.000000000 +0200
2
+++ src/bsd_mouse.c	2012-07-30 00:49:09.000000000 +0200
2
+++ src/bsd_mouse.c	2013-07-03 01:00:50.897361950 +0200
3
@@ -71,15 +71,20 @@
3
@@ -26,6 +26,24 @@
4
 static const char *FindDevice(InputInfoPtr, const char *, int);
4
  * authorization from the copyright holder(s) and author(s).
5
  */
5
 
6
 
6
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
7
+
8
+/*
9
+ * XXX - Should this be autoconf'd instead?
10
+ */
11
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
12
+
13
+#if !defined(USBMOUSE_SUPPORT)
14
+#define USBMOUSE_SUPPORT
15
+#endif
16
+#if !defined(HAS_LIB_USB_HID)
17
+#define HAS_LIB_USB_HID
18
+#endif
7
+#if !defined(XPS2_SUPPORT)
19
+#if !defined(XPS2_SUPPORT)
8
+#define XPS2_SUPPORT
20
+#define XPS2_SUPPORT
9
+#endif
21
+#endif
10
 /* These are for FreeBSD and DragonFly */
22
+
23
+#endif /* defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) */
24
+
25
 #include <xorg-server.h>
26
 
27
 #include <X11/X.h>
28
@@ -33,9 +51,23 @@
29
 #include "xf86Priv.h"
30
 #include "xf86_OSlib.h"
31
 #include "xf86Xinput.h"
32
+#include <exevents.h>
33
 #include "mouse.h"
34
 #include "xisb.h"
35
 #include "mipointer.h"
36
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
37
+#define HAVE_PROPERTIES 1
38
+#endif
39
+#ifdef HAVE_PROPERTIES
40
+#include <X11/Xatom.h>
41
+#include <xserver-properties.h>
42
+/* 1.6 has properties, but no labels */
43
+#ifdef AXIS_LABEL_PROP
44
+#define HAVE_LABELS
45
+#else
46
+#undef HAVE_LABELS
47
+#endif
48
+#endif
49
 #ifdef WSCONS_SUPPORT
50
 #include <dev/wscons/wsconsio.h>
51
 #endif
52
@@ -47,9 +79,6 @@
53
 #endif
54
 
55
 #include <dev/usb/usb.h>
56
-#ifdef USB_GET_REPORT_ID
57
-#define USB_NEW_HID
58
-#endif
59
 
60
 #define HUP_GENERIC_DESKTOP     0x0001
61
 #define HUP_BUTTON              0x0009
62
@@ -75,11 +104,13 @@
11
 #define DEFAULT_MOUSE_DEV               "/dev/mouse"
63
 #define DEFAULT_MOUSE_DEV               "/dev/mouse"
12
 #define DEFAULT_SYSMOUSE_DEV            "/dev/sysmouse"
64
 #define DEFAULT_SYSMOUSE_DEV            "/dev/sysmouse"
13
 #define DEFAULT_PS2_DEV                 "/dev/psm0"
65
 #define DEFAULT_PS2_DEV                 "/dev/psm0"
Lines 21-27 Link Here
21
         NULL
73
         NULL
22
 };
74
 };
23
 #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
75
 #elif (defined(__OpenBSD__) || defined(__NetBSD__)) && defined(WSCONS_SUPPORT)
24
@@ -100,7 +105,11 @@
76
@@ -100,7 +131,11 @@
25
 #if defined(__NetBSD__)
77
 #if defined(__NetBSD__)
26
     return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
78
     return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
27
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
79
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
Lines 34-40 Link Here
34
 #else
86
 #else
35
     return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC;
87
     return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO | MSE_MISC;
36
 #endif
88
 #endif
37
@@ -180,9 +189,30 @@
89
@@ -180,9 +215,30 @@
38
         { MOUSE_PROTO_SYSMOUSE,         "SysMouse" }
90
         { MOUSE_PROTO_SYSMOUSE,         "SysMouse" }
39
 };
91
 };
40
 
92
 
Lines 41-47 Link Here
41
+#ifdef XPS2_SUPPORT
93
+#ifdef XPS2_SUPPORT
42
+static struct {
94
+static struct {
43
+        int dmodel;
95
+        int dmodel;
44
+        char *name;
96
+        const char *name;
45
+} ps2proto[] = {
97
+} ps2proto[] = {
46
+        { MOUSE_MODEL_NETSCROLL,        "NetScrollPS/2" },
98
+        { MOUSE_MODEL_NETSCROLL,        "NetScrollPS/2" },
47
+        { MOUSE_MODEL_NET,              "NetMousePS/2" },
99
+        { MOUSE_MODEL_NET,              "NetMousePS/2" },
Lines 59-71 Link Here
59
 SetupAuto(InputInfoPtr pInfo, int *protoPara)
111
 SetupAuto(InputInfoPtr pInfo, int *protoPara)
60
 {
112
 {
61
+#ifdef XPS2_SUPPORT
113
+#ifdef XPS2_SUPPORT
62
+    char *dev;
114
+    const char *dev;
63
+#endif
115
+#endif
64
+    const char *proto;
116
+    const char *proto;
65
     int i;
117
     int i;
66
     mousehw_t hw;
118
     mousehw_t hw;
67
     mousemode_t mode;
119
     mousemode_t mode;
68
@@ -190,7 +220,13 @@
120
@@ -190,7 +246,13 @@
69
     if (pInfo->fd == -1)
121
     if (pInfo->fd == -1)
70
         return NULL;
122
         return NULL;
71
 
123
 
Lines 79-85 Link Here
79
     i = 1;
131
     i = 1;
80
     ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
132
     ioctl(pInfo->fd, MOUSE_SETLEVEL, &i);
81
 
133
 
82
@@ -209,9 +245,18 @@
134
@@ -209,9 +271,18 @@
83
                     protoPara[0] = mode.syncmask[0];
135
                     protoPara[0] = mode.syncmask[0];
84
                     protoPara[1] = mode.syncmask[1];
136
                     protoPara[1] = mode.syncmask[1];
85
                 }
137
                 }
Lines 100-106 Link Here
100
             }
152
             }
101
         }
153
         }
102
     }
154
     }
103
@@ -234,41 +279,41 @@
155
@@ -234,41 +305,41 @@
104
         (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
156
         (protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
105
         /*
157
         /*
106
          * As the FreeBSD sysmouse driver defaults to protocol level 0
158
          * As the FreeBSD sysmouse driver defaults to protocol level 0
Lines 159-165 Link Here
159
     }
211
     }
160
     return FALSE;
212
     return FALSE;
161
 }
213
 }
162
@@ -276,17 +321,17 @@
214
@@ -276,17 +347,17 @@
163
 static const char *
215
 static const char *
164
 FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
216
 FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
165
 {
217
 {
Lines 181-187 Link Here
181
 #endif
233
 #endif
182
         } else {
234
         } else {
183
             /*
235
             /*
184
@@ -295,28 +340,32 @@
236
@@ -295,28 +366,32 @@
185
              * the test for whether /dev/sysmouse is usable can be made.
237
              * the test for whether /dev/sysmouse is usable can be made.
186
              */
238
              */
187
             if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
239
             if (!strcmp(*pdev, DEFAULT_MOUSE_DEV)) {
Lines 227-233 Link Here
227
                 break;
279
                 break;
228
             }
280
             }
229
         }
281
         }
230
@@ -764,7 +813,9 @@
282
@@ -468,30 +543,78 @@
283
 
284
 #if defined(USBMOUSE_SUPPORT)
285
 
286
+#define MAXRIDS		64
287
+#define MAXACOLS	8
288
+#define MAXLCOLS	16
289
 typedef struct _UsbMseRec {
290
     int packetSize;
291
-    int iid;
292
-    hid_item_t loc_x;           /* x locator item */
293
-    hid_item_t loc_y;           /* y locator item */
294
-    hid_item_t loc_z;           /* z (wheel) locator item */
295
-    hid_item_t loc_w;           /* z (wheel) locator item */
296
-    hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
297
-   unsigned char *buffer;
298
+    int iid, nrids, nacols, opened;
299
+    struct {
300
+	int32_t rid;
301
+	int size;
302
+    } rids[MAXRIDS];
303
+    struct UsbMseAcol {
304
+	InputInfoPtr pInfo;
305
+	int nlcols, nbuttons, hasZ, hasW;
306
+	int xmin, xmax, ymin, ymax, pmin, pmax, px, py;
307
+	int cxmin, cxmax, cymin, cymax, cpmin, cpmax;
308
+	struct UsbMseLcol {
309
+	    hid_item_t loc_x;		/* x locator item */
310
+	    hid_item_t loc_y;		/* y locator item */
311
+	    hid_item_t loc_z;		/* z (wheel) locator item */
312
+	    hid_item_t loc_w;		/* w (hwheel) locator item */
313
+	    hid_item_t loc_p;		/* Tip Pressure */
314
+	    hid_item_t loc_valid;		/* Touch Valid */
315
+	    hid_item_t loc_in_range;	/* In Range */
316
+	    hid_item_t loc_btn[MSE_MAXBUTTONS]; /* buttons locator items */
317
+	} lcols[MAXLCOLS];
318
+	hid_item_t loc_cc;		/* contact count */
319
+    } acols[MAXACOLS];
320
+    unsigned char *buffer;
321
 } UsbMseRec, *UsbMsePtr;
322
 
323
+static int *
324
+usbGetReportSizePtr(UsbMsePtr pUsbMse, int32_t rid)
325
+{
326
+    int i;
327
+
328
+    for (i = 0; i < pUsbMse->nrids; i++) {
329
+	if (pUsbMse->rids[i].rid == rid)
330
+	    return (&pUsbMse->rids[i].size);
331
+    }
332
+    for (i = 0; i < MAXRIDS; i++) {
333
+	if (pUsbMse->rids[i].size == 0) {
334
+	    pUsbMse->rids[i].rid = rid;
335
+	    pUsbMse->nrids = max(pUsbMse->nrids, i + 1);
336
+	    return (&pUsbMse->rids[i].size);
337
+	}
338
+    }
339
+    return (NULL);
340
+}
341
+
342
 static int
343
 usbMouseProc(DeviceIntPtr pPointer, int what)
344
 {
345
     InputInfoPtr pInfo;
346
     MouseDevPtr pMse;
347
     UsbMsePtr pUsbMse;
348
+    struct UsbMseAcol *acol;
349
     unsigned char map[MSE_MAXBUTTONS + 1];
350
-    int nbuttons;
351
+    int nacol, nbuttons;
352
+#ifdef HAVE_LABELS
353
+    Atom btn_labels[MSE_MAXBUTTONS] = {0};
354
+    Atom axes_labels[3] = { 0, 0, 0 };
355
+#endif
356
 
357
     pInfo = pPointer->public.devicePrivate;
358
     pMse = pInfo->private;
359
     pMse->device = pPointer;
360
     pUsbMse = pMse->mousePriv;
361
+    for (nacol = 0; nacol < (pUsbMse->nacols - 1); nacol++) {
362
+	if (pUsbMse->acols[nacol].pInfo == pInfo)
363
+	    break;
364
+    }
365
+    acol = &pUsbMse->acols[nacol];
366
 
367
     switch (what) {
368
     case DEVICE_INIT:
369
@@ -500,38 +623,96 @@
370
         for (nbuttons = 0; nbuttons < MSE_MAXBUTTONS; ++nbuttons)
371
             map[nbuttons + 1] = nbuttons + 1;
372
 
373
-        InitPointerDeviceStruct((DevicePtr)pPointer,
374
-                                map,
375
-                                min(pMse->buttons, MSE_MAXBUTTONS),
376
-                                miPointerGetMotionEvents,
377
-                                pMse->Ctrl,
378
-                                miPointerGetMotionBufferSize());
379
+#ifdef HAVE_LABELS
380
+	btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT);
381
+	btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE);
382
+	btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT);
383
+	axes_labels[0] = XIGetKnownProperty((acol->xmin != acol->xmax)
384
+	    ? AXIS_LABEL_PROP_ABS_X : AXIS_LABEL_PROP_REL_X);
385
+	axes_labels[1] = XIGetKnownProperty((acol->xmin != acol->xmax)
386
+	    ? AXIS_LABEL_PROP_ABS_Y : AXIS_LABEL_PROP_REL_Y);
387
+	axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE);
388
+#endif
389
+
390
+	InitButtonClassDeviceStruct(pPointer, min(pMse->buttons, MSE_MAXBUTTONS),
391
+#ifdef HAVE_LABELS
392
+	    btn_labels,
393
+#endif
394
+	    map);
395
+	InitValuatorClassDeviceStruct(pPointer, (acol->pmin != acol->pmax) ? 3 : 2,
396
+#ifdef HAVE_LABELS
397
+	    axes_labels,
398
+#endif
399
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
400
+	    miPointerGetMotionEvents,
401
+#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
402
+	    GetMotionHistory,
403
+#endif
404
+	    GetMotionHistorySize(),
405
+	    (acol->xmin != acol->xmax || acol->ymin != acol->ymax) ?
406
+	     Absolute : Relative);
407
+	InitPtrFeedbackClassDeviceStruct(pPointer, pMse->Ctrl);
408
 
409
         /* X valuator */
410
-        xf86InitValuatorAxisStruct(pPointer, 0, 0, -1, 1, 0, 1);
411
+	xf86InitValuatorAxisStruct(pPointer, 0,
412
+#ifdef HAVE_LABELS
413
+	    axes_labels[0],
414
+#endif
415
+	    (acol->xmin != acol->xmax) ? acol->xmin : -1,
416
+	    (acol->xmin != acol->xmax) ? acol->xmax : -1,
417
+	    1, 0, 1
418
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
419
+	    , (acol->xmin != acol->xmax) ? Absolute : Relative
420
+#endif
421
+	    );
422
         xf86InitValuatorDefaults(pPointer, 0);
423
         /* Y valuator */
424
-        xf86InitValuatorAxisStruct(pPointer, 1, 0, -1, 1, 0, 1);
425
+	xf86InitValuatorAxisStruct(pPointer, 1,
426
+#ifdef HAVE_LABELS
427
+	    axes_labels[1],
428
+#endif
429
+	    (acol->ymin != acol->ymax) ? acol->ymin : -1,
430
+	    (acol->ymin != acol->ymax) ? acol->ymax : -1,
431
+	    1, 0, 1
432
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
433
+	    , (acol->ymin != acol->ymax) ? Absolute : Relative
434
+#endif
435
+	    );
436
         xf86InitValuatorDefaults(pPointer, 1);
437
+	/* Pressure valuator */
438
+	if (acol->pmin != acol->pmax) {
439
+	    xf86InitValuatorAxisStruct(pPointer, 2,
440
+#ifdef HAVE_LABELS
441
+		axes_labels[2],
442
+#endif
443
+		acol->pmin, acol->pmax, 1, 0, 1
444
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
445
+		, Absolute
446
+#endif
447
+		);
448
+	    xf86InitValuatorDefaults(pPointer, 2);
449
+	}
450
         xf86MotionHistoryAllocate(pInfo);
451
         break;
452
 
453
     case DEVICE_ON:
454
-        pInfo->fd = xf86OpenSerial(pInfo->options);
455
-        if (pInfo->fd == -1)
456
-            xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
457
-        else {
458
-            pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize);
459
-            if (!pMse->buffer) {
460
-                free(pMse);
461
-                xf86CloseSerial(pInfo->fd);
462
-                pInfo->fd = -1;
463
-            } else {
464
-                xf86FlushInput(pInfo->fd);
465
-                if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput,
466
-                                              pInfo))
467
-                    AddEnabledDevice(pInfo->fd);
468
-            }
469
+	if (pUsbMse->opened++ == 0) {
470
+		pInfo->fd = xf86OpenSerial(pInfo->options);
471
+		if (pInfo->fd == -1)
472
+		    xf86Msg(X_WARNING, "%s: cannot open input device\n", pInfo->name);
473
+		else {
474
+		    pMse->buffer = XisbNew(pInfo->fd, pUsbMse->packetSize);
475
+		    if (!pMse->buffer) {
476
+			free(pMse);
477
+			xf86CloseSerial(pInfo->fd);
478
+			pInfo->fd = -1;
479
+		    } else {
480
+			xf86FlushInput(pInfo->fd);
481
+			if (!xf86InstallSIGIOHandler (pInfo->fd, usbSigioReadInput, 
482
+						      pInfo))
483
+			    AddEnabledDevice(pInfo->fd);
484
+		    }
485
+		}
486
         }
487
         pMse->lastButtons = 0;
488
         pMse->lastMappedButtons = 0;
489
@@ -553,6 +734,7 @@
490
             xf86CloseSerial(pInfo->fd);
491
             pInfo->fd = -1;
492
         }
493
+        pUsbMse->opened--;
494
         pPointer->public.on = FALSE;
495
         usleep(300000);
496
         break;
497
@@ -568,45 +750,154 @@
498
 {
499
     MouseDevPtr pMse;
500
     UsbMsePtr pUsbMse;
501
-    int buttons = pMse->lastButtons;
502
-    int dx = 0, dy = 0, dz = 0, dw = 0;
503
-    int n, c;
504
+    int buttons, cc;
505
+    int dx, dy, dz, dw, dp, upd, v, nx, ny, np, in_range;
506
+    int n, c, rid, *sizep, nacol, nlcol;
507
     unsigned char *pBuf;
508
+    struct UsbMseAcol *acol;
509
+    struct UsbMseLcol *lcol;
510
 
511
     pMse = pInfo->private;
512
     pUsbMse = pMse->mousePriv;
513
 
514
     XisbBlockDuration(pMse->buffer, -1);
515
+next:
516
     pBuf = pUsbMse->buffer;
517
     n = 0;
518
-    while ((c = XisbRead(pMse->buffer)) >= 0 && n < pUsbMse->packetSize) {
519
+    if (pUsbMse->iid) {
520
+	rid = XisbRead(pMse->buffer);
521
+	if (rid < 0)
522
+	    return;
523
+	pBuf[n++] = (unsigned char)rid;
524
+    } else
525
+	rid = 0;
526
+    sizep = usbGetReportSizePtr(pUsbMse, rid);
527
+    if (sizep == NULL || *sizep == 0) {
528
+	xf86Msg(X_WARNING, "%s: unknown report ID %d\n", pInfo->name, rid);
529
+	goto next;
530
+    }
531
+    while (n < *sizep && (c = XisbRead(pMse->buffer)) >= 0) {
532
         pBuf[n++] = (unsigned char)c;
533
     }
534
     if (n == 0)
535
         return;
536
-    if (n != pUsbMse->packetSize) {
537
+//    xf86MsgVerb(X_INFO, 3, "pkt: %d %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
538
+//	n, pBuf[0], pBuf[1], pBuf[2], pBuf[3], pBuf[4], pBuf[5], pBuf[6], pBuf[7], pBuf[8], pBuf[9]);
539
+    if (n != *sizep) {
540
         LogMessageVerbSigSafe(X_WARNING, -1,
541
                               "%s: incomplete packet, size %d\n",
542
                               pInfo->name, n);
543
     }
544
-    /* discard packets with an id that don't match the mouse */
545
-    /* XXX this is probably not the right thing */
546
-    if (pUsbMse->iid != 0) {
547
-        if (*pBuf++ != pUsbMse->iid)
548
-            return;
549
-    }
550
-    dx = hid_get_data(pBuf, &pUsbMse->loc_x);
551
-    dy = hid_get_data(pBuf, &pUsbMse->loc_y);
552
-    dz = hid_get_data(pBuf, &pUsbMse->loc_z);
553
-    dw = hid_get_data(pBuf, &pUsbMse->loc_w);
554
-
555
-    buttons = 0;
556
-    for (n = 0; n < pMse->buttons; n++) {
557
-        if (hid_get_data(pBuf, &pUsbMse->loc_btn[n]))
558
-            buttons |= (1 << UMS_BUT(n));
559
+    for (nacol = 0; nacol < pUsbMse->nacols; nacol++) {
560
+	acol = &pUsbMse->acols[nacol];
561
+	if (acol->pInfo == NULL)
562
+	    continue;
563
+	nx = ny = np = upd = 0;
564
+	buttons = cc = 0;
565
+	dx = dy = dz = dw = dp = 0;
566
+	for (nlcol = 0; nlcol < pUsbMse->acols[nacol].nlcols; nlcol++) {
567
+	    lcol = &acol->lcols[nlcol];
568
+
569
+	    if (lcol->loc_valid.usage != 0 && rid == lcol->loc_valid.report_ID &&
570
+		    hid_get_data(pBuf, &lcol->loc_valid) == 0)
571
+		continue;
572
+	    if (lcol->loc_in_range.usage != 0 && rid == lcol->loc_in_range.report_ID)
573
+		in_range = hid_get_data(pBuf, &lcol->loc_in_range);
574
+	    else
575
+		in_range = 1;
576
+	    if (in_range && lcol->loc_x.usage != 0 && rid == lcol->loc_x.report_ID && nx == 0) {
577
+		v = hid_get_data(pBuf, &lcol->loc_x);
578
+		if (acol->xmin != acol->xmax) {
579
+		    v = xf86ScaleAxis(v, acol->xmax, acol->xmin,
580
+			lcol->loc_x.logical_maximum, lcol->loc_x.logical_minimum);
581
+		    if (acol->cxmin != acol->cxmax)
582
+		        v = xf86ScaleAxis(v, acol->xmax, acol->xmin,
583
+			    acol->cxmax, acol->cxmin);
584
+		}
585
+		dx += v;
586
+		nx++;
587
+	    }
588
+	    if (in_range && lcol->loc_y.usage != 0 && rid == lcol->loc_y.report_ID && ny == 0) {
589
+		v = hid_get_data(pBuf, &lcol->loc_y);
590
+		if (acol->xmin != acol->xmax) {
591
+		    v = xf86ScaleAxis(v, acol->ymax, acol->ymin,
592
+			lcol->loc_y.logical_maximum, lcol->loc_y.logical_minimum);
593
+		    if (acol->cymin != acol->cymax)
594
+		        v = xf86ScaleAxis(v, acol->ymax, acol->ymin,
595
+			    acol->cymax, acol->cymin);
596
+		}
597
+		dy += v;
598
+		ny++;
599
+	    }
600
+	    if (lcol->loc_z.usage != 0 && rid == lcol->loc_z.report_ID) {
601
+		dz -= hid_get_data(pBuf, &lcol->loc_z);
602
+		upd = 1;
603
+	    }
604
+	    if (lcol->loc_w.usage != 0 && rid == lcol->loc_w.report_ID) {
605
+		dw += hid_get_data(pBuf, &lcol->loc_w);
606
+		upd = 1;
607
+	    }
608
+	    if (lcol->loc_p.usage != 0 && rid == lcol->loc_p.report_ID && np == 0) {
609
+		v = hid_get_data(pBuf, &lcol->loc_p);
610
+		    v = xf86ScaleAxis(v, acol->pmax, acol->pmin,
611
+			lcol->loc_p.logical_maximum, lcol->loc_p.logical_minimum);
612
+		    if (acol->cpmin != acol->cpmax)
613
+		        v = xf86ScaleAxis(v, acol->pmax, acol->pmin,
614
+			    acol->cpmax, acol->cpmin);
615
+		dp += v;
616
+		np++;
617
+	    }
618
+
619
+	    for (n = 0; n < acol->nbuttons; n++) {
620
+		if (lcol->loc_btn[n].usage != 0 && rid == lcol->loc_btn[n].report_ID) {
621
+		    if (hid_get_data(pBuf, &lcol->loc_btn[n]))
622
+			buttons |= (1 << UMS_BUT(n));
623
+		    upd = 1;
624
+		}
625
+	    }
626
+	}
627
+	if (acol->loc_cc.usage != 0 && rid == acol->loc_cc.report_ID)
628
+	    cc = hid_get_data(pBuf, &acol->loc_cc);
629
+	else
630
+	    cc = (nx || ny) ? 1 : 0;
631
+	if (cc > 1)
632
+	    buttons = (1 << UMS_BUT(1));
633
+	if (nx != 0 && acol->xmin != acol->xmax)
634
+	    dx /= nx;
635
+	if (ny != 0 && acol->ymin != acol->ymax)
636
+	    dy /= ny;
637
+	if (np != 0 && acol->pmin != acol->pmax)
638
+	    dp /= np;
639
+//	if (upd || nx || ny || np)
640
+//	    xf86MsgVerb(X_INFO, 3, "%d cc %d dx %d dy %d dz %d dw %d press %d buttons %02x\n",
641
+//		nacol, cc, dx, dy, dz, dw, dp, buttons);
642
+	if (nx != 0 || ny != 0) {
643
+	    if (acol->pmin != acol->pmax) {
644
+		xf86PostMotionEvent(acol->pInfo->dev,
645
+			    /* is_absolute: */    TRUE,
646
+			    /* first_valuator: */ 0,
647
+			    /* num_valuators: */  3,
648
+			    dx, dy, dp);
649
+	    } else if (acol->xmin != acol->xmax || acol->ymin != acol->ymax) {
650
+		xf86PostMotionEvent(acol->pInfo->dev,
651
+			    /* is_absolute: */    TRUE,
652
+			    /* first_valuator: */ 0,
653
+			    /* num_valuators: */  2,
654
+			    dx, dy);
655
+	    }
656
+	}
657
+	if (upd || (nx != 0) || (ny != 0)) {
658
+	    ((MouseDevPtr)acol->pInfo->private)->PostEvent(acol->pInfo, buttons,
659
+		((acol->xmin != acol->xmax) ? dx - acol->px : dx),
660
+		((acol->ymin != acol->ymax) ? dy - acol->py : dy),
661
+		dz, dw);
662
+	}
663
+	if (nx > 0)
664
+	    acol->px = dx;
665
+	if (ny > 0)
666
+	    acol->py = dy;
667
     }
668
-    pMse->PostEvent(pInfo, buttons, dx, dy, dz, dw);
669
-    return;
670
+    goto next;
671
 }
672
 
673
 static void
674
@@ -615,14 +906,17 @@
675
     usbReadInput ((InputInfoPtr) closure);
676
 }
677
 
678
-/* This function is called when the protocol is "usb". */
679
 static Bool
680
-usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
681
+usbInitFirst(InputInfoPtr pInfo)
682
 {
683
     MouseDevPtr pMse = pInfo->private;
684
     UsbMsePtr pUsbMse;
685
     report_desc_t reportDesc;
686
-    int i;
687
+    hid_data_t d;
688
+    hid_item_t h;
689
+    struct UsbMseAcol *acol;
690
+    struct UsbMseLcol *lcol;
691
+    int mdepth, rsize, *rsizep, acolused, lcolused, used;
692
 
693
     pUsbMse = malloc(sizeof(UsbMseRec));
694
     if (pUsbMse == NULL) {
695
@@ -631,12 +925,7 @@
696
         return FALSE;
697
     }
698
 
699
-    pMse->protocol = protocol;
700
-    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
701
-
702
-    /* Collect the options, and process the common options. */
703
-    COLLECT_INPUT_OPTIONS(pInfo, NULL);
704
-    xf86ProcessCommonOptions(pInfo, pInfo->options);
705
+    bzero(pUsbMse, sizeof(UsbMseRec));
706
 
707
     /* Check if the device can be opened. */
708
     pInfo->fd = xf86OpenSerial(pInfo->options);
709
@@ -652,19 +941,134 @@
710
     }
711
     /* Get USB informations */
712
     reportDesc = hid_get_report_desc(pInfo->fd);
713
-    /* Get packet size & iid */
714
-#ifdef USB_NEW_HID
715
-    if (ioctl(pInfo->fd, USB_GET_REPORT_ID, &pUsbMse->iid) == -1) {
716
-            xf86Msg(X_ERROR, "Error ioctl USB_GET_REPORT_ID on %s : %s\n",
717
-                    pInfo->name, strerror(errno));
718
-            return FALSE;
719
-    }
720
-    pUsbMse->packetSize = hid_report_size(reportDesc, hid_input,
721
-                                              pUsbMse->iid);
722
-#else
723
-    pUsbMse->packetSize = hid_report_size(reportDesc, hid_input,
724
-                                              &pUsbMse->iid);
725
-#endif
726
+    mdepth = 0;
727
+    pUsbMse->nacols = 0;
728
+    acol = &pUsbMse->acols[pUsbMse->nacols];
729
+    lcol = &acol->lcols[acol->nlcols];
730
+    acolused = 0;
731
+    lcolused = 0;
732
+    d = hid_start_parse(reportDesc, (1 << hid_input) |
733
+	(1 << hid_collection) | (1 << hid_endcollection), -1);
734
+    while (hid_get_item(d, &h)) {
735
+	switch (h.kind) {
736
+	case hid_collection:
737
+	    if (mdepth != 0)
738
+		mdepth++;
739
+	    else if (h.collection == 1 &&
740
+		    (h.usage == 0x00010001 || h.usage == 0x00010002 ||
741
+		     (h.usage >= 0x000d0001 && h.usage <= 0x000d000d))) {
742
+		mdepth++;
743
+		if (acolused) {
744
+		    if (lcolused) {
745
+			acol->nlcols++;
746
+			lcolused = 0;
747
+		    }
748
+		    pUsbMse->nacols++;
749
+		    acolused = 0;
750
+		    acol = &pUsbMse->acols[pUsbMse->nacols];
751
+		    lcol = &acol->lcols[acol->nlcols];
752
+		}
753
+	    }
754
+	    if (lcolused && (h.collection == 0 ||
755
+		    h.collection == 2 || h.collection == 3)) {
756
+		acol->nlcols++;
757
+		lcolused = 0;
758
+		lcol = &acol->lcols[acol->nlcols];
759
+	    }
760
+	    break;
761
+	case hid_endcollection:
762
+	    if (mdepth != 0)
763
+		mdepth--;
764
+	    break;
765
+	case hid_input:
766
+	    if (h.report_ID != 0)
767
+		pUsbMse->iid = 1;
768
+	    rsize = pUsbMse->iid +
769
+		(h.pos + (h.report_size * h.report_count) + 7) / 8;
770
+	    if ((rsizep = usbGetReportSizePtr(pUsbMse, h.report_ID)) != NULL)
771
+		*rsizep = max(*rsizep, rsize);
772
+	    pUsbMse->packetSize = max(pUsbMse->packetSize, rsize);
773
+	    if (mdepth == 0)
774
+		break;
775
+	    used = 1;
776
+	    if (h.usage == 0x00010030) { /* X */
777
+		lcol->loc_x = h;
778
+		if ((h.flags & 0x04) == 0) {
779
+		    if (acol->xmin == acol->xmax) {
780
+			acol->xmin = h.logical_minimum;
781
+			acol->xmax = h.logical_maximum;
782
+		    } else {
783
+			acol->xmin = min(acol->xmin, h.logical_minimum);
784
+			acol->xmax = max(acol->xmax, h.logical_maximum);
785
+		    }
786
+		}
787
+	    } else if (h.usage == 0x00010031) { /* Y */
788
+		lcol->loc_y = h;
789
+		if ((h.flags & 0x04) == 0) {
790
+		    if (acol->ymin == acol->ymax) {
791
+			acol->ymin = h.logical_minimum;
792
+			acol->ymax = h.logical_maximum;
793
+		    } else {
794
+			acol->ymin = min(acol->ymin, h.logical_minimum);
795
+			acol->ymax = max(acol->ymax, h.logical_maximum);
796
+		    }
797
+		}
798
+	    } else if (h.usage == 0x00010038) { /* Z */
799
+		lcol->loc_z = h;
800
+		acol->hasZ = 1;
801
+	    } else if (h.usage == 0x000c0238) { /* W */
802
+		lcol->loc_w = h;
803
+		acol->hasW = 1;
804
+	    } else if (h.usage == 0x000d0030) { /* Press */
805
+		lcol->loc_p = h;
806
+		if ((h.flags & 0x04) == 0) {
807
+		    if (acol->pmin == acol->pmax) {
808
+			acol->pmin = h.logical_minimum;
809
+			acol->pmax = h.logical_maximum;
810
+		    } else {
811
+			acol->pmin = min(acol->pmin, h.logical_minimum);
812
+			acol->pmax = max(acol->pmax, h.logical_maximum);
813
+		    }
814
+		}
815
+	    } else if (h.usage == 0x000d0032) /* In Range */
816
+		lcol->loc_in_range = h;
817
+	    else if (h.usage == 0x000d0047) /* Valid */
818
+		lcol->loc_valid = h;
819
+	    else if (h.usage > 0x00090000 &&
820
+		h.usage <= 0x00090000 + MSE_MAXBUTTONS) { /* Buttons */
821
+		    lcol->loc_btn[(h.usage & 0xffff) - 1] = h;
822
+		    acol->nbuttons = max(acol->nbuttons, h.usage & 0xffff);
823
+	    } else if (h.usage == 0x000d0042) { /* Tip Switch */
824
+		lcol->loc_btn[0] = h;
825
+		acol->nbuttons = max(acol->nbuttons, 1);
826
+	    } else if (h.usage == 0x000d0044) { /* Barrel Switch */
827
+		lcol->loc_btn[1] = h;
828
+		acol->nbuttons = max(acol->nbuttons, 2);
829
+	    } else if (h.usage == 0x000d0045) { /* Eraser */
830
+		lcol->loc_btn[3] = h;
831
+		acol->nbuttons = max(acol->nbuttons, 4);
832
+	    } else if (h.usage == 0x000d0046) { /* Tablet Pick */
833
+		lcol->loc_btn[2] = h;
834
+		acol->nbuttons = max(acol->nbuttons, 3);
835
+	    } else if (h.usage == 0x000d0054) /* Contact Count */
836
+		acol->loc_cc = h;
837
+	    else
838
+		used = 0;
839
+	    lcolused += used;
840
+	    acolused += used;
841
+	    break;
842
+	default:
843
+	    break;
844
+	}
845
+    }
846
+    if (lcolused)
847
+	acol->nlcols++;
848
+    if (acolused)
849
+	pUsbMse->nacols++;
850
+    hid_end_parse(d);
851
+    xf86Msg(X_DEFAULT, "%s: Found %d usable logical collections\n",
852
+	pInfo->name, pUsbMse->nacols);
853
+
854
     /* Allocate buffer */
855
     if (pUsbMse->packetSize <= 8) {
856
         pUsbMse->buffer = pMse->protoBuf;
857
@@ -674,56 +1078,129 @@
858
     if (pUsbMse->buffer == NULL) {
859
         xf86Msg(X_ERROR, "%s: cannot allocate buffer\n", pInfo->name);
860
         free(pUsbMse);
861
-        free(pMse);
862
         xf86CloseSerial(pInfo->fd);
863
         return FALSE;
864
     }
865
-#ifdef USB_NEW_HID
866
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
867
-                   hid_input, &pUsbMse->loc_x, pUsbMse->iid) < 0) {
868
-        xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
869
-    }
870
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
871
-                   hid_input, &pUsbMse->loc_y, pUsbMse->iid) < 0) {
872
-        xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
873
-    }
874
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
875
-                   hid_input, &pUsbMse->loc_z, pUsbMse->iid) < 0) {
876
-    }
877
-#else
878
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
879
-                   hid_input, &pUsbMse->loc_x) < 0) {
880
-        xf86Msg(X_WARNING, "%s: no x locator\n", pInfo->name);
881
-    }
882
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y),
883
-                   hid_input, &pUsbMse->loc_y) < 0) {
884
-        xf86Msg(X_WARNING, "%s: no y locator\n", pInfo->name);
885
-    }
886
-    if (hid_locate(reportDesc, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_WHEEL),
887
-                   hid_input, &pUsbMse->loc_z) < 0) {
888
-    }
889
-#endif
890
-    /* Probe for number of buttons */
891
-    for (i = 1; i <= MSE_MAXBUTTONS; i++) {
892
-        if (!hid_locate(reportDesc, HID_USAGE2(HUP_BUTTON, i),
893
-                        hid_input, &pUsbMse->loc_btn[i-1]
894
-#ifdef USB_NEW_HID
895
-                        , pUsbMse->iid
896
-#endif
897
-                        ))
898
-            break;
899
-    }
900
-    pMse->buttons = i-1;
901
 
902
     xf86CloseSerial(pInfo->fd);
903
     pInfo->fd = -1;
904
 
905
     /* Private structure */
906
     pMse->mousePriv = pUsbMse;
907
+    return TRUE;
908
+}
909
+
910
+/* This function is called when the protocol is "usb". */
911
+static Bool
912
+usbPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
913
+{
914
+    InputInfoPtr pMatch;
915
+    MouseDevPtr pMse = pInfo->private;
916
+    UsbMsePtr pUsbMse;
917
+    struct UsbMseAcol *acol;
918
+    char *str;
919
+    int i, colopt;
920
+
921
+    pMse->protocol = protocol;
922
+    xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, protocol);
923
+
924
+    /* Collect the options, and process the common options. */
925
+    COLLECT_INPUT_OPTIONS(pInfo, NULL);
926
+    xf86ProcessCommonOptions(pInfo, pInfo->options);
927
+
928
+    /* Check if this HID device is already opened. */
929
+    for (pMatch = xf86FirstLocalDevice(); pMatch != NULL; pMatch = pMatch->next) {
930
+	if ((pInfo != pMatch) && strstr(pMatch->drv->driverName, "mouse")) {
931
+	    char *dev1, *dev2;
932
+
933
+	    dev1 = xf86SetStrOption(pInfo->options, "Device", NULL);
934
+	    dev2 = xf86SetStrOption(pMatch->options, "Device", NULL);
935
+	    if (strcmp(dev1, dev2) == 0) {
936
+		free(dev1);
937
+		free(dev2);
938
+		break;
939
+	    }
940
+	    free(dev1);
941
+	    free(dev2);
942
+	}
943
+    }
944
+    if (pMatch == NULL) {
945
+	xf86Msg(X_DEFAULT, "%s: Opening new HID device\n", pInfo->name);
946
+	if (!usbInitFirst(pInfo)) {
947
+	    free(pMse);
948
+	    return FALSE;
949
+	}
950
+    } else {
951
+	pMse->mousePriv = ((MouseDevPtr)pMatch->private)->mousePriv;
952
+	xf86Msg(X_DEFAULT, "%s: Attaching to already opened HID device\n",
953
+	    pInfo->name);
954
+    }
955
+    pUsbMse = pMse->mousePriv;
956
+
957
+    /* Attach to collection, respecting "Collection" option. */
958
+    colopt = xf86SetIntOption(pInfo->options, "Collection", 0);
959
+    for (i = 0; i < pUsbMse->nacols; i++) {
960
+	if (pUsbMse->acols[i].pInfo == NULL &&
961
+		(colopt == 0 || i == colopt - 1)) {
962
+	    pUsbMse->acols[i].pInfo = pInfo;
963
+	    break;
964
+	}
965
+    }
966
+    xf86Msg(colopt == 0 ? X_DEFAULT : X_CONFIG,
967
+	"%s: Collection: %d\n", pInfo->name,
968
+	i == pUsbMse->nacols ? colopt : i + 1);
969
+    if (i == pUsbMse->nacols) {
970
+	xf86Msg(X_ERROR,
971
+	    "%s: Application collection not found or already handled\n",
972
+	    pInfo->name);
973
+	free(pMse);
974
+	return FALSE;
975
+    }
976
+
977
+    acol = &pUsbMse->acols[i];
978
+    pMse->buttons = acol->nbuttons;
979
+    if (pMse->buttons == 2)
980
+	pMse->buttons = 3;
981
+    if (acol->xmin != acol->xmax || acol->ymin != acol->ymax)
982
+	pMse->disableXY = TRUE;
983
+    pMse->hasZ = acol->hasZ;
984
+    pMse->hasW = acol->hasW;
985
 
986
     /* Process common mouse options (like Emulate3Buttons, etc). */
987
     pMse->CommonOptions(pInfo);
988
 
989
+    /* Process "Calibration" option. */
990
+    str = xf86CheckStrOption(pInfo->options, "Calibration", NULL);
991
+    if (str != NULL && (acol->xmin != acol->xmax || acol->ymin != acol->ymax)) {
992
+	int j, xmin, xmax, ymin, ymax, pmin, pmax;
993
+
994
+	j = sscanf(str, "%d %d %d %d %d %d", &xmin, &xmax, &ymin, &ymax, &pmin, &pmax);
995
+	if (j == 4) {
996
+	    xf86Msg(X_CONFIG, "%s: Calibration: %d %d %d %d\n",
997
+		pInfo->name, xmin, xmax, ymin, ymax);
998
+	    acol->cxmin = xmin;
999
+	    acol->cxmax = xmax;
1000
+	    acol->cymin = ymin;
1001
+	    acol->cymax = ymax;
1002
+	} else if (j == 6) {
1003
+	    xf86Msg(X_CONFIG, "%s: Calibration: %d %d %d %d %d %d\n",
1004
+		pInfo->name, xmin, xmax, ymin, ymax, pmin, pmax);
1005
+	    acol->cxmin = xmin;
1006
+	    acol->cxmax = xmax;
1007
+	    acol->cymin = ymin;
1008
+	    acol->cymax = ymax;
1009
+	    acol->cpmin = pmin;
1010
+	    acol->cpmax = pmax;
1011
+	} else
1012
+	    xf86Msg(X_WARNING, "%s: Calibration: Invalid arguments\n",
1013
+		pInfo->name);
1014
+	free(str);
1015
+    } else if (acol->xmin != acol->xmax || acol->ymin != acol->ymax) {
1016
+	xf86Msg(X_DEFAULT, "%s: Calibration: %d %d %d %d %d %d\n",
1017
+	    pInfo->name, acol->xmin, acol->xmax, acol->ymin, acol->ymax,
1018
+	    acol->pmin, acol->pmax);
1019
+    }
1020
+
1021
     /* Setup the local procs. */
1022
     pInfo->device_control = usbMouseProc;
1023
     pInfo->read_input = usbReadInput;
1024
@@ -766,7 +1243,9 @@
231
     p->CheckProtocol = CheckProtocol;
1025
     p->CheckProtocol = CheckProtocol;
232
 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
1026
 #if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
233
     p->SetupAuto = SetupAuto;
1027
     p->SetupAuto = SetupAuto;
(-)x11-drivers/xf86-input-mouse/files/patch-src_mouse.c (-6 / +19 lines)
Lines 1-5 Link Here
1
--- src/mouse.c.orig	2012-07-27 08:10:56.000000000 +0200
1
--- src/mouse.c.orig	2012-10-08 03:40:07.000000000 +0200
2
+++ src/mouse.c	2012-07-30 00:31:48.000000000 +0200
2
+++ src/mouse.c	2013-07-03 01:04:45.398343993 +0200
3
@@ -280,13 +280,39 @@
3
@@ -280,13 +280,39 @@
4
 
4
 
5
     pMse = pInfo->private;
5
     pMse = pInfo->private;
Lines 135-141 Link Here
135
 
135
 
136
     protocol = MousePickProtocol(pInfo, device, protocol, &protocolID);
136
     protocol = MousePickProtocol(pInfo, device, protocol, &protocolID);
137
 
137
 
138
@@ -2137,7 +2148,7 @@
138
@@ -2136,7 +2147,7 @@
139
 
139
 
140
     if (pMse->emulateWheel) {
140
     if (pMse->emulateWheel) {
141
         /* Emulate wheel button handling */
141
         /* Emulate wheel button handling */
Lines 144-150 Link Here
144
             wheelButtonMask = 0;
144
             wheelButtonMask = 0;
145
         else
145
         else
146
             wheelButtonMask = 1 << (pMse->wheelButton - 1);
146
             wheelButtonMask = 1 << (pMse->wheelButton - 1);
147
@@ -2221,6 +2232,9 @@
147
@@ -2220,6 +2231,9 @@
148
                         }
148
                         }
149
                     }
149
                     }
150
                 }
150
                 }
Lines 154-160 Link Here
154
             }
154
             }
155
 
155
 
156
             /* Absorb the mouse movement while the wheel button is pressed. */
156
             /* Absorb the mouse movement while the wheel button is pressed. */
157
@@ -2238,7 +2252,7 @@
157
@@ -2237,7 +2251,7 @@
158
     if (pMse->emulate3ButtonsSoft && pMse->emulate3Pending && (dx || dy))
158
     if (pMse->emulate3ButtonsSoft && pMse->emulate3Pending && (dx || dy))
159
         buttonTimer(pInfo);
159
         buttonTimer(pInfo);
160
 
160
 
Lines 163-170 Link Here
163
         xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
163
         xf86PostMotionEvent(pInfo->dev, 0, 0, 2, dx, dy);
164
 
164
 
165
     if (change) {
165
     if (change) {
166
@@ -2448,11 +2462,11 @@
166
@@ -2349,12 +2363,10 @@
167
                int dx, int dy, int dz, int dw)
168
 {
169
     MouseDevPtr pMse;
170
-    mousePrivPtr mousepriv;
171
     int zbutton = 0, wbutton = 0, zbuttoncount = 0, wbuttoncount = 0;
172
     int i, b, buttons = 0;
167
 
173
 
174
     pMse = pInfo->private;
175
-    mousepriv = (mousePrivPtr)pMse->mousePriv;
176
 
177
     if (pMse->protocolID == PROT_MMHIT)
178
         b = reverseBits(hitachMap, truebuttons);
179
@@ -2447,11 +2459,11 @@
180
 
168
     /* Accumulate the scaled dx, dy in the private variables
181
     /* Accumulate the scaled dx, dy in the private variables
169
        fracdx,fracdy and return the integer number part */
182
        fracdx,fracdy and return the integer number part */
170
-    if (mousepriv) {
183
-    if (mousepriv) {
(-)x11-drivers/xf86-input-synaptics/Makefile (-25 / +1 lines)
Lines 10-31 Link Here
10
10
11
CONFLICTS=	synaptics-[0-9]*
11
CONFLICTS=	synaptics-[0-9]*
12
12
13
OPTIONS_DEFINE=	HAL
14
OPTIONS_DEFAULT=HAL
15
16
.include <bsd.port.options.mk>
17
18
USES=		pathfix
13
USES=		pathfix
19
USE_XORG=	x11
14
USE_XORG=	x11 xtst
20
XORG_CAT=	driver
15
XORG_CAT=	driver
21
16
22
.if ${PORT_OPTIONS:MHAL}
23
PLIST_SUB+=	HAL=""
24
LIB_DEPENDS+=	hal.1:${PORTSDIR}/sysutils/hal
25
.else
26
PLIST_SUB+=	HAL="@comment "
27
.endif
28
29
MAN1=		syndaemon.1 \
17
MAN1=		syndaemon.1 \
30
		synclient.1
18
		synclient.1
31
MAN4=		synaptics.4x
19
MAN4=		synaptics.4x
Lines 41-56 Link Here
41
EXTRA_PATCHES+=	${PATCHDIR}/extra-Makefile.in
29
EXTRA_PATCHES+=	${PATCHDIR}/extra-Makefile.in
42
.endif
30
.endif
43
31
44
post-install:
45
.if ${PORT_OPTIONS:MHAL}
46
	${MKDIR} ${PREFIX}/share/hal/fdi/policy/10osvendor
47
	${INSTALL_DATA} ${WRKSRC}/conf/11-x11-synaptics.fdi \
48
		${PREFIX}/share/hal/fdi/policy/10osvendor/
49
.if !defined(WITH_NEW_XORG)
50
	${MKDIR} ${PREFIX}/share/hal/fdi/policy/20thirdparty
51
	${INSTALL_DATA} ${WRKSRC}/conf/11-x11-synaptics.fdi \
52
		${PREFIX}/share/hal/fdi/policy/20thirdparty/
53
.endif
54
.endif
55
56
.include <bsd.port.mk>
32
.include <bsd.port.mk>
(-)x11-drivers/xf86-input-synaptics/pkg-plist (-6 lines)
Lines 6-18 Link Here
6
lib/xorg/modules/input/synaptics_drv.so
6
lib/xorg/modules/input/synaptics_drv.so
7
libdata/pkgconfig/xorg-synaptics.pc
7
libdata/pkgconfig/xorg-synaptics.pc
8
%%NEW%%share/X11/xorg.conf.d/50-synaptics.conf
8
%%NEW%%share/X11/xorg.conf.d/50-synaptics.conf
9
%%HAL%%share/hal/fdi/policy/10osvendor/11-x11-synaptics.fdi
10
%%HAL%%%%OLD%%share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi
11
@dirrmtry lib/xorg/modules/input
9
@dirrmtry lib/xorg/modules/input
12
@dirrmtry lib/xorg/modules
10
@dirrmtry lib/xorg/modules
13
@dirrmtry lib/xorg
11
@dirrmtry lib/xorg
14
@dirrmtry include/xorg
12
@dirrmtry include/xorg
15
%%HAL%%@dirrmtry share/hal/fdi/policy/10osvendor
16
%%HAL%%@dirrmtry share/hal/fdi/policy
17
%%HAL%%@dirrmtry share/hal/fdi
18
%%HAL%%@dirrmtry share/hal
(-)x11-drivers/xf86-video-ati/Makefile (-2 / +13 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	xf86-video-ati
3
PORTNAME=	xf86-video-ati
4
PORTVERSION=	6.14.6
4
PORTVERSION=	${ATI_VERSION}
5
CATEGORIES=	x11-drivers
5
CATEGORIES=	x11-drivers
6
6
7
MAINTAINER=	x11@FreeBSD.org
7
MAINTAINER=	x11@FreeBSD.org
Lines 12-17 Link Here
12
USE_XORG=	xf86driproto xineramaproto xf86miscproto glproto
12
USE_XORG=	xf86driproto xineramaproto xf86miscproto glproto
13
MAN4=		ati.4x radeon.4x
13
MAN4=		ati.4x radeon.4x
14
14
15
.include <bsd.port.pre.mk>
16
17
.if ${OSVERSION} < 1000051
18
ATI_VERSION=	6.14.6
15
CONFIGURE_ARGS+=--disable-kms
19
CONFIGURE_ARGS+=--disable-kms
20
PLIST_SUB+=	OLD=""
21
.else
22
ATI_VERSION=	7.2.0
23
CONFIGURE_ARGS+=--disable-udev
24
EXTRA_PATCHES+=	${FILESDIR}/extra-src__radeon_kms.c
25
PLIST_SUB+=	OLD="@comment "
26
.endif
16
27
17
.include <bsd.port.mk>
28
.include <bsd.port.post.mk>
(-)x11-drivers/xf86-video-ati/distinfo (+2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = aa5286b3e4f0187d7df14785c06dd800255d9405205dbf061da5d77df86bec36
1
SHA256 (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = aa5286b3e4f0187d7df14785c06dd800255d9405205dbf061da5d77df86bec36
2
SIZE (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = 1139495
2
SIZE (xorg/driver/xf86-video-ati-6.14.6.tar.bz2) = 1139495
3
SHA256 (xorg/driver/xf86-video-ati-7.2.0.tar.bz2) = f30f5efdc8d7d18d06eda7ef2f91a8b7290f1cfbf6ff26362cd47ab8969daec4
4
SIZE (xorg/driver/xf86-video-ati-7.2.0.tar.bz2) = 824613
(-)x11-drivers/xf86-video-ati/files/extra-src__radeon_kms.c (+20 lines)
Line 0 Link Here
1
--- src/radeon_kms.c.orig	2013-08-07 10:44:09.000000000 +0200
2
+++ src/radeon_kms.c	2013-08-31 01:20:44.370468797 +0200
3
@@ -270,7 +270,7 @@
4
 radeon_dirty_update(ScreenPtr screen)
5
 {
6
 	RegionPtr region;
7
-	PixmapDirtyUpdatePtr ent;
8
+	PixmapDirtyUpdatePtr ent = NULL;
9
 
10
 	if (xorg_list_is_empty(&screen->pixmap_dirty_list))
11
 		return;
12
@@ -606,7 +606,7 @@
13
 		      dev->domain, dev->bus, dev->dev, dev->func);
14
 #endif
15
 
16
-    info->dri2.drm_fd = drmOpen("radeon", busid);
17
+    info->dri2.drm_fd = drmOpen("radeonkms", busid);
18
     if (info->dri2.drm_fd == -1) {
19
 
20
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
(-)x11-drivers/xf86-video-ati/files/patch-src__radeon_dri2.c (+11 lines)
Line 0 Link Here
1
--- src/radeon_dri2.c.orig	2013-02-22 19:31:34.000000000 +0000
2
+++ src/radeon_dri2.c	2013-02-22 19:31:47.000000000 +0000
3
@@ -578,7 +578,7 @@
4
 radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata)
5
 {
6
     DRI2ClientEventsPtr pClientEventsPriv;
7
-    DRI2FrameEventPtr ref;
8
+    DRI2FrameEventPtr ref = NULL;
9
     NewClientInfoRec *clientinfo = calldata;
10
     ClientPtr pClient = clientinfo->client;
11
     pClientEventsPriv = GetDRI2ClientEvents(pClient);
(-)x11-drivers/xf86-video-ati/pkg-plist (-7 / +7 lines)
Lines 2-14 Link Here
2
lib/xorg/modules/drivers/ati_drv.so
2
lib/xorg/modules/drivers/ati_drv.so
3
lib/xorg/modules/drivers/radeon_drv.la
3
lib/xorg/modules/drivers/radeon_drv.la
4
lib/xorg/modules/drivers/radeon_drv.so
4
lib/xorg/modules/drivers/radeon_drv.so
5
lib/xorg/modules/multimedia/theatre200_drv.la
5
%%OLD%%lib/xorg/modules/multimedia/theatre200_drv.la
6
lib/xorg/modules/multimedia/theatre200_drv.so
6
%%OLD%%lib/xorg/modules/multimedia/theatre200_drv.so
7
lib/xorg/modules/multimedia/theatre_detect_drv.la
7
%%OLD%%lib/xorg/modules/multimedia/theatre_detect_drv.la
8
lib/xorg/modules/multimedia/theatre_detect_drv.so
8
%%OLD%%lib/xorg/modules/multimedia/theatre_detect_drv.so
9
lib/xorg/modules/multimedia/theatre_drv.la
9
%%OLD%%lib/xorg/modules/multimedia/theatre_drv.la
10
lib/xorg/modules/multimedia/theatre_drv.so
10
%%OLD%%lib/xorg/modules/multimedia/theatre_drv.so
11
@dirrmtry lib/xorg/modules/drivers
11
@dirrmtry lib/xorg/modules/drivers
12
@dirrmtry lib/xorg/modules/multimedia
12
%%OLD%%@dirrmtry lib/xorg/modules/multimedia
13
@dirrmtry lib/xorg/modules
13
@dirrmtry lib/xorg/modules
14
@dirrmtry lib/xorg
14
@dirrmtry lib/xorg
(-)x11-drivers/xf86-video-intel/Makefile (-5 / +5 lines)
Lines 28-47 Link Here
28
.include <bsd.port.options.mk>
28
.include <bsd.port.options.mk>
29
29
30
.if defined(WITH_NEW_XORG)
30
.if defined(WITH_NEW_XORG)
31
INTEL_VERSION=	2.21.9
31
INTEL_VERSION=	2.21.15
32
INTEL_REVISION=	0
32
INTEL_REVISION=	0
33
CONFIGURE_ENV+=	xorg_cv_cc_flag__Wno_maybe_uninitialized=no
33
CONFIGURE_ARGS+=	--enable-sna
34
CONFIGURE_ARGS+=	--enable-sna
34
MAKE_JOBS_UNSAFE=yes
35
MAKE_JOBS_UNSAFE=yes
35
PLIST_SUB+=	OLD="@comment "
36
PLIST_SUB+=	OLD="@comment "
36
EXTRA_PATCHES+=	${PATCHDIR}/extra-clang \
37
EXTRA_PATCHES+=	${PATCHDIR}/extra-src__sna__sna_threads.c \
37
		${PATCHDIR}/extra-src_sna_compiler.h \
38
		${PATCHDIR}/extra-src_sna_kgem.c \
38
		${PATCHDIR}/extra-src_sna_kgem.c \
39
		${PATCHDIR}/extra-src__sna__sna_threads.c \
39
		${PATCHDIR}/extra-clang \
40
		${PATCHDIR}/extra-i915kms
40
		${PATCHDIR}/extra-i915kms
41
LIB_DEPENDS+=	xcb-util:${PORTSDIR}/x11/xcb-util
41
LIB_DEPENDS+=	xcb-util:${PORTSDIR}/x11/xcb-util
42
.else
42
.else
43
INTEL_VERSION=	2.7.1
43
INTEL_VERSION=	2.7.1
44
INTEL_REVISION=	4
44
INTEL_REVISION=	5
45
PLIST_SUB+=	OLD=""
45
PLIST_SUB+=	OLD=""
46
46
47
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_ch7017_ch7017.c \
47
EXTRA_PATCHES+=	${PATCHDIR}/extra-src_ch7017_ch7017.c \
(-)x11-drivers/xf86-video-intel/distinfo (-2 / +2 lines)
Lines 1-4 Link Here
1
SHA256 (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 255c0d54249cc0132f743254a43c21fac695fab2139c8ed96a07cf3c628e5f42
1
SHA256 (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 255c0d54249cc0132f743254a43c21fac695fab2139c8ed96a07cf3c628e5f42
2
SIZE (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 780625
2
SIZE (xorg/driver/xf86-video-intel-2.7.1.tar.bz2) = 780625
3
SHA256 (xorg/driver/xf86-video-intel-2.21.9.tar.bz2) = 1359cbc9e494a284faa52d1db83e7388cb8ab590b660e29e78e6e7f5ee7ff189
3
SHA256 (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 7d5a140f82a72fd1cbc8a664d66c3d4eca47ee240ca4927b8a98d7af6f65d6fc
4
SIZE (xorg/driver/xf86-video-intel-2.21.9.tar.bz2) = 1735037
4
SIZE (xorg/driver/xf86-video-intel-2.21.15.tar.bz2) = 1977431
(-)x11-drivers/xf86-video-intel/files/extra-clang (-25 / +35 lines)
Lines 1-27 Link Here
1
--- src/intel_display.c.orig	2012-12-11 20:33:06.000000000 +0100
1
--- src/sna/sna_cpu.c.orig	2013-08-14 12:04:40.231041285 +0200
2
+++ src/intel_display.c	2012-12-11 20:33:45.000000000 +0100
2
+++ src/sna/sna_cpu.c	2013-08-14 12:05:51.237030719 +0200
3
@@ -1691,7 +1691,7 @@
3
@@ -41,6 +41,7 @@
4
 static drmModeEncoderPtr
5
 intel_get_kencoder(struct intel_mode *mode, int num)
6
 {
4
 {
7
-	struct intel_output *iterator;
5
 	unsigned max = __get_cpuid_max(BASIC_CPUID, NULL);
8
+	struct intel_output *iterator = NULL;
6
 	unsigned int eax, ebx, ecx, edx;
9
 	int id = mode->mode_res->encoders[num];
7
+	eax = ebx = ecx = edx = 0;
8
 	unsigned features = 0;
9
 	unsigned extra = 0;
10
 
10
 
11
 	list_for_each_entry(iterator, &mode->outputs, link)
11
--- src/sna/sna_damage.c.orig	2013-08-14 12:06:26.381036854 +0200
12
--- src/intel_batchbuffer.c.orig	2012-12-11 20:34:55.000000000 +0100
12
+++ src/sna/sna_damage.c	2013-08-14 12:07:23.684023065 +0200
13
+++ src/intel_batchbuffer.c	2012-12-11 20:35:19.000000000 +0100
14
@@ -119,7 +119,7 @@
15
 static void intel_batch_do_flush(ScrnInfoPtr scrn)
16
 {
17
 	intel_screen_private *intel = intel_get_screen_private(scrn);
18
-	struct intel_pixmap *priv;
19
+	struct intel_pixmap *priv = NULL;
20
 
21
 	list_for_each_entry(priv, &intel->batch_pixmaps, batch)
22
 		priv->dirty = 0;
23
--- src/sna/sna_damage.c.orig	2012-12-11 20:41:38.000000000 +0100
24
+++ src/sna/sna_damage.c	2012-12-11 20:42:23.000000000 +0100
25
@@ -410,7 +410,7 @@
13
@@ -410,7 +410,7 @@
26
 	int n, nboxes;
14
 	int n, nboxes;
27
 	BoxPtr boxes, free_boxes = NULL;
15
 	BoxPtr boxes, free_boxes = NULL;
Lines 31-37 Link Here
31
 
19
 
32
 	assert(damage->mode != DAMAGE_ALL);
20
 	assert(damage->mode != DAMAGE_ALL);
33
 	assert(damage->dirty);
21
 	assert(damage->dirty);
34
@@ -1671,7 +1671,7 @@
22
@@ -1709,7 +1709,7 @@
35
 {
23
 {
36
 	int n, nboxes;
24
 	int n, nboxes;
37
 	BoxPtr boxes;
25
 	BoxPtr boxes;
Lines 40-47 Link Here
40
 
28
 
41
 	RegionCopy(r, &damage->region);
29
 	RegionCopy(r, &damage->region);
42
 	if (!damage->dirty)
30
 	if (!damage->dirty)
43
--- uxa/uxa-accel.c.orig	2012-12-11 20:50:56.000000000 +0100
31
--- src/uxa/intel_batchbuffer.c.orig	2013-08-14 12:08:14.323028320 +0200
44
+++ uxa/uxa-accel.c	2012-12-11 20:51:14.000000000 +0100
32
+++ src/uxa/intel_batchbuffer.c	2013-08-14 12:08:37.202016923 +0200
33
@@ -141,7 +141,7 @@
34
 static void intel_batch_do_flush(ScrnInfoPtr scrn)
35
 {
36
 	intel_screen_private *intel = intel_get_screen_private(scrn);
37
-	struct intel_pixmap *priv;
38
+	struct intel_pixmap *priv = NULL;
39
 
40
 	list_for_each_entry(priv, &intel->batch_pixmaps, batch)
41
 		priv->dirty = 0;
42
--- src/uxa/intel_display.c.orig	2013-08-14 12:09:25.802015629 +0200
43
+++ src/uxa/intel_display.c	2013-08-14 12:09:51.034009844 +0200
44
@@ -1753,7 +1753,7 @@
45
 static drmModeEncoderPtr
46
 intel_get_kencoder(struct intel_mode *mode, int num)
47
 {
48
-	struct intel_output *iterator;
49
+	struct intel_output *iterator = NULL;
50
 	int id = mode->mode_res->encoders[num];
51
 
52
 	list_for_each_entry(iterator, &mode->outputs, link)
53
--- src/uxa/uxa-accel.c.orig	2013-08-14 12:02:11.898048975 +0200
54
+++ src/uxa/uxa-accel.c	2013-08-14 12:03:39.336042139 +0200
45
@@ -944,7 +944,7 @@
55
@@ -944,7 +944,7 @@
46
 
56
 
47
 	if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
57
 	if (uxa_screen->info->flags & UXA_USE_GLAMOR) {
(-)x11-drivers/xf86-video-intel/files/extra-i915kms (-12 / +12 lines)
Lines 1-13 Link Here
1
--- src/intel_module.c.orig	2012-09-27 23:31:20.000000000 +0300
1
--- src/intel_device.c.orig	2013-06-30 16:03:51.000000000 +0200
2
+++ src/intel_module.c	2012-11-02 17:32:00.819723398 +0200
2
+++ src/intel_device.c	2013-07-02 14:08:34.903060688 +0200
3
@@ -393,8 +393,8 @@
3
@@ -94,8 +94,8 @@
4
 		 dev->domain, dev->bus, dev->dev, dev->func);
4
 			 pci->domain, pci->bus, pci->dev, pci->func);
5
 
5
 
6
 	ret = drmCheckModesettingSupported(id);
6
 		ret = drmCheckModesettingSupported(id);
7
-	if (ret) {
7
-		if (ret) {
8
-		if (xf86LoadKernelModule("i915"))
8
-			if (xf86LoadKernelModule("i915"))
9
+	if (ret || 1) {
9
+		if (ret || 1) {
10
+		if (xf86LoadKernelModule("i915kms"))
10
+			if (xf86LoadKernelModule("i915kms"))
11
 			ret = drmCheckModesettingSupported(id);
11
 				ret = drmCheckModesettingSupported(id);
12
 		if (ret)
12
 			if (ret)
13
 			return FALSE;
13
 				return -1;
(-)x11-drivers/xf86-video-intel/files/extra-src_sna_compiler.h (-18 lines)
Lines 1-18 Link Here
1
--- src/sna/compiler.h.orig	2013-03-12 12:48:29.745101779 +0100
2
+++ src/sna/compiler.h	2013-03-12 12:48:52.857102997 +0100
3
@@ -37,7 +37,6 @@
4
 #define must_check __attribute__((warn_unused_result))
5
 #define constant __attribute__((const))
6
 #define pure __attribute__((pure))
7
-#define __packed__ __attribute__((__packed__))
8
 #define flatten __attribute__((flatten))
9
 #else
10
 #define likely(expr) (expr)
11
@@ -48,7 +47,6 @@
12
 #define must_check
13
 #define constant
14
 #define pure
15
-#define __packed__
16
 #define flatten
17
 #endif
18
 
(-)x11-drivers/xf86-video-intel/files/extra-src_sna_kgem.c (-24 / +20 lines)
Lines 1-18 Link Here
1
--- src/sna/kgem.c.orig	2013-03-11 11:19:02.000000000 +0100
1
--- src/sna/kgem.c.orig	2013-08-04 11:10:59.000000000 +0200
2
+++ src/sna/kgem.c	2013-03-12 12:56:49.452065668 +0100
2
+++ src/sna/kgem.c	2013-08-14 11:59:14.787060294 +0200
3
@@ -658,7 +658,11 @@
3
@@ -25,6 +25,7 @@
4
 	if (file) {
4
  *
5
 		size_t len = 0;
5
  */
6
 		char *line = NULL;
6
 
7
+#ifdef __GLIBC__
7
+#define _WITH_GETLINE
8
 		while (getline(&line, &len, file) != -1) {
8
 #ifdef HAVE_CONFIG_H
9
+#else
9
 #include "config.h"
10
+		while ((line = fgetln(file, &len)) != (char *) NULL) {
10
 #endif
11
+#endif
11
@@ -1890,7 +1891,8 @@
12
 			int mb;
13
 			if (sscanf(line, "cache size : %d KB", &mb) == 1) {
14
 				/* Paranoid check against gargantuan caches */
15
@@ -1666,7 +1670,8 @@
16
 static struct kgem_bo *
12
 static struct kgem_bo *
17
 search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
13
 search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
18
 {
14
 {
Lines 22-28 Link Here
22
 
18
 
23
 	DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags));
19
 	DBG(("%s: num_pages=%d, flags=%x\n", __FUNCTION__, num_pages, flags));
24
 
20
 
25
@@ -1868,7 +1873,8 @@
21
@@ -2104,7 +2106,8 @@
26
 
22
 
27
 static bool kgem_retire__flushing(struct kgem *kgem)
23
 static bool kgem_retire__flushing(struct kgem *kgem)
28
 {
24
 {
Lines 32-38 Link Here
32
 	bool retired = false;
28
 	bool retired = false;
33
 
29
 
34
 	list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
30
 	list_for_each_entry_safe(bo, next, &kgem->flushing, request) {
35
@@ -2073,7 +2079,8 @@
31
@@ -2309,7 +2312,8 @@
36
 static void kgem_commit(struct kgem *kgem)
32
 static void kgem_commit(struct kgem *kgem)
37
 {
33
 {
38
 	struct kgem_request *rq = kgem->next_request;
34
 	struct kgem_request *rq = kgem->next_request;
Lines 42-48 Link Here
42
 
38
 
43
 	list_for_each_entry_safe(bo, next, &rq->buffers, request) {
39
 	list_for_each_entry_safe(bo, next, &rq->buffers, request) {
44
 		assert(next->request.prev == &bo->request);
40
 		assert(next->request.prev == &bo->request);
45
@@ -2154,7 +2161,8 @@
41
@@ -2390,7 +2394,8 @@
46
 
42
 
47
 static void kgem_finish_buffers(struct kgem *kgem)
43
 static void kgem_finish_buffers(struct kgem *kgem)
48
 {
44
 {
Lines 51-58 Link Here
51
+	struct kgem_buffer *next;
47
+	struct kgem_buffer *next;
52
 
48
 
53
 	list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
49
 	list_for_each_entry_safe(bo, next, &kgem->batch_buffers, base.list) {
54
 		DBG(("%s: buffer handle=%d, used=%d, exec?=%d, write=%d, mmapped=%d\n",
50
 		DBG(("%s: buffer handle=%d, used=%d, exec?=%d, write=%d, mmapped=%s\n",
55
@@ -2963,7 +2971,8 @@
51
@@ -3252,7 +3257,8 @@
56
 static struct kgem_bo *
52
 static struct kgem_bo *
57
 search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
53
 search_linear_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags)
58
 {
54
 {
Lines 62-68 Link Here
62
 	bool use_active = (flags & CREATE_INACTIVE) == 0;
58
 	bool use_active = (flags & CREATE_INACTIVE) == 0;
63
 	struct list *cache;
59
 	struct list *cache;
64
 
60
 
65
@@ -3521,7 +3530,7 @@
61
@@ -3855,7 +3861,7 @@
66
 			       uint32_t flags)
62
 			       uint32_t flags)
67
 {
63
 {
68
 	struct list *cache;
64
 	struct list *cache;
Lines 71-77 Link Here
71
 	uint32_t pitch, tiled_height, size;
67
 	uint32_t pitch, tiled_height, size;
72
 	uint32_t handle;
68
 	uint32_t handle;
73
 	int i, bucket, retry;
69
 	int i, bucket, retry;
74
@@ -4834,7 +4843,7 @@
70
@@ -5302,7 +5308,7 @@
75
 void kgem_clear_dirty(struct kgem *kgem)
71
 void kgem_clear_dirty(struct kgem *kgem)
76
 {
72
 {
77
 	struct list * const buffers = &kgem->next_request->buffers;
73
 	struct list * const buffers = &kgem->next_request->buffers;
Lines 79-86 Link Here
79
+	struct kgem_bo *bo = NULL;
75
+	struct kgem_bo *bo = NULL;
80
 
76
 
81
 	list_for_each_entry(bo, buffers, request) {
77
 	list_for_each_entry(bo, buffers, request) {
82
 		if (!bo->dirty)
78
 		if (!bo->gpu_dirty)
83
@@ -5072,7 +5081,7 @@
79
@@ -5578,7 +5584,7 @@
84
 				   uint32_t size, uint32_t flags,
80
 				   uint32_t size, uint32_t flags,
85
 				   void **ret)
81
 				   void **ret)
86
 {
82
 {
(-)x11-drivers/xorg-drivers/Makefile (-1 / +1 lines)
Lines 10-16 Link Here
10
MAINTAINER=	x11@FreeBSD.org
10
MAINTAINER=	x11@FreeBSD.org
11
COMMENT=	X.org drivers meta-port
11
COMMENT=	X.org drivers meta-port
12
12
13
.MAKE.FreeBSD_UL=    yes
13
.MAKE.FreeBSD_UL=	yes
14
14
15
VIDEODIR=	${PREFIX}/lib/xorg/modules/drivers
15
VIDEODIR=	${PREFIX}/lib/xorg/modules/drivers
16
INPUTDIR=	${PREFIX}/lib/xorg/modules/input
16
INPUTDIR=	${PREFIX}/lib/xorg/modules/input
(-)x11-fonts/xfs/Makefile (-1 / +1 lines)
Lines 9-15 Link Here
9
COMMENT=	X.Org font server
9
COMMENT=	X.Org font server
10
10
11
XORG_CAT=	app
11
XORG_CAT=	app
12
USE_GMAKE=	yes
12
USES=		gmake
13
USE_XORG=	libfs xfont xtrans
13
USE_XORG=	libfs xfont xtrans
14
USE_RC_SUBR=	xfs
14
USE_RC_SUBR=	xfs
15
CONFIGURE_ARGS=	--without-xmlto --without-fop
15
CONFIGURE_ARGS=	--without-xmlto --without-fop
(-)x11-servers/xephyr/Makefile (-1 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	xephyr
3
PORTNAME=	xephyr
4
PORTREVISION=	0
5
4
6
COMMENT=	X server from X.Org based on kdrive
5
COMMENT=	X server from X.Org based on kdrive
7
6
(-)x11-servers/xorg-dmx/Makefile (-1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	xorg-dmx
4
PORTNAME=	xorg-dmx
5
PORTREVISION=	0
6
5
7
COMMENT=	Distributed Multihead X from X.Org
6
COMMENT=	Distributed Multihead X from X.Org
8
7
(-)x11-servers/xorg-nestserver/Makefile (+2 lines)
Lines 23-28 Link Here
23
PLIST_FILES=	bin/Xnest
23
PLIST_FILES=	bin/Xnest
24
MAN1=		Xnest.1
24
MAN1=		Xnest.1
25
25
26
.include <bsd.port.options.mk>
27
26
do-install:
28
do-install:
27
	${INSTALL_PROGRAM} ${WRKSRC}/hw/xnest/Xnest ${PREFIX}/bin/
29
	${INSTALL_PROGRAM} ${WRKSRC}/hw/xnest/Xnest ${PREFIX}/bin/
28
.if defined(WITH_NEW_XORG)
30
.if defined(WITH_NEW_XORG)
(-)x11-servers/xorg-server/Makefile (-14 / +34 lines)
Lines 20-33 Link Here
20
XORG_CAT=	xserver
20
XORG_CAT=	xserver
21
SLAVE_PORT?=	no
21
SLAVE_PORT?=	no
22
22
23
OPTIONS_DEFINE=	AIGLX SUID
24
OPTIONS_RADIO=	CONF
25
OPTIONS_RADIO_CONF= HAL DEVD
26
AIGLX_DESC=	Compile with Accelerated Indirect GLX support
27
SUID_DESC=	Install the Xorg server with setuid bit set
28
HAL_DESC=	Compile with HAL config support
29
DEVD_DESC=	Use devd for autoconfiguration of input devices
30
OPTIONS_DEFAULT=AIGLX SUID DEVD
31
32
OPTIONS_EXCLUDE_sparc64=	HAL
33
34
.include <bsd.port.options.mk>
35
23
.if defined(WITH_NEW_XORG)
36
.if defined(WITH_NEW_XORG)
24
XORG_VERSION=	1.12.4
37
XORG_VERSION=	1.12.4
25
XORG_REVISION=	1
38
XORG_REVISION=	2
26
PLIST_SUB+=	OLD="@comment " NEW=""
39
PLIST_SUB+=	OLD="@comment " NEW=""
27
EXTRA_PATCHES+=	${FILESDIR}/extra-clang
40
EXTRA_PATCHES+=	${FILESDIR}/extra-clang \
41
		${FILESDIR}/extra-configure
28
.else
42
.else
29
XORG_VERSION=	1.7.7
43
XORG_VERSION=	1.7.7
30
XORG_REVISION=	8
44
XORG_REVISION=	9
31
PLIST_SUB+=	OLD="" NEW="@comment "
45
PLIST_SUB+=	OLD="" NEW="@comment "
32
EXTRA_PATCHES+=	${FILESDIR}/extra-Xext-xace.c \
46
EXTRA_PATCHES+=	${FILESDIR}/extra-Xext-xace.c \
33
		${FILESDIR}/extra-Xserver-hw-xfree86-os-support-bsd-sparc64_video.c \
47
		${FILESDIR}/extra-Xserver-hw-xfree86-os-support-bsd-sparc64_video.c \
Lines 39-48 Link Here
39
		${FILESDIR}/extra-Xserver-hw-xfree86-common-xf86Config.c
53
		${FILESDIR}/extra-Xserver-hw-xfree86-common-xf86Config.c
40
.endif
54
.endif
41
55
42
USES=		perl5
43
USE_PERL5=	build
44
USE_BZIP2=	yes
56
USE_BZIP2=	yes
45
USE_GMAKE=	yes
57
USES=		gmake
46
USE_GL=		gl
58
USE_GL=		gl
47
USE_XORG?=	xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \
59
USE_XORG?=	xf86driproto glproto xdmcp x11 xkbfile xxf86misc xxf86vm xaw7 \
48
		xmu xt xpm xext randrproto renderproto fixesproto damageproto \
60
		xmu xt xpm xext randrproto renderproto fixesproto damageproto \
Lines 54-59 Link Here
54
66
55
MAKE_JOBS_UNSAFE=	yes
67
MAKE_JOBS_UNSAFE=	yes
56
USE_OPENSSL=	yes
68
USE_OPENSSL=	yes
69
USE_PERL5_BUILD=yes
57
CONFIGURE_ARGS?=--disable-dmx --disable-xvfb --disable-xnest \
70
CONFIGURE_ARGS?=--disable-dmx --disable-xvfb --disable-xnest \
58
		--without-xmlto --disable-docs --disable-devel-docs \
71
		--without-xmlto --disable-docs --disable-devel-docs \
59
		--localstatedir=/var --without-dtrace --disable-xephyr \
72
		--localstatedir=/var --without-dtrace --disable-xephyr \
Lines 78-91 Link Here
78
PLIST=		${.CURDIR}/pkg-plist
91
PLIST=		${.CURDIR}/pkg-plist
79
.endif
92
.endif
80
93
81
OPTIONS_DEFINE=	AIGLX SUID HAL
82
AIGLX_DESC=	Compile with Accelerated Indirect GLX support
83
SUID_DESC=	Install the Xorg server with setuid bit set
84
HAL_DESC=	Compile with HAL config support
85
OPTIONS_DEFAULT=	AIGLX SUID HAL
86
87
OPTIONS_EXCLUDE_sparc64=	HAL
88
89
.include <bsd.port.pre.mk>
94
.include <bsd.port.pre.mk>
90
95
91
.if defined(WITH_OPENSSL_BASE)
96
.if defined(WITH_OPENSSL_BASE)
Lines 102-107 Link Here
102
CONFIGURE_ARGS+=	--enable-config-hal=no
107
CONFIGURE_ARGS+=	--enable-config-hal=no
103
.endif
108
.endif
104
109
110
.if ${PORT_OPTIONS:MDEVD}
111
EXTRA_PATCHES+=		extra-config_devd.c
112
.endif
113
105
.if ${PORT_OPTIONS:MAIGLX}
114
.if ${PORT_OPTIONS:MAIGLX}
106
CONFIGURE_ARGS+=	--enable-aiglx=yes
115
CONFIGURE_ARGS+=	--enable-aiglx=yes
107
.else
116
.else
Lines 171-176 Link Here
171
	@${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
180
	@${REINPLACE_CMD} -e 's|@GLX_TRUE@GLXMODS =|@GLX_BOGUS@GLXMODS =|g' \
172
		-e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
181
		-e 's|^LTLIBRARIES = |LTLIBRARIES = libglx.la |g' \
173
		${WRKSRC}/hw/xfree86/dixmods/Makefile.in
182
		${WRKSRC}/hw/xfree86/dixmods/Makefile.in
183
.if ${PORT_OPTIONS:MDEVD}
184
	@${ECHO_CMD} -e "\nint config_devd_init(void);\nvoid config_devd_fini(void);" \
185
		>> ${WRKSRC}/config/config-backends.h
186
.endif
187
 
188
post-configure:
189
.if ${PORT_OPTIONS:MDEVD}
190
	@${REINPLACE_CMD} -e 's|config\.c|config.c devd.c|g' \
191
		-e 's|config\.lo|config.lo devd.lo|g' \
192
		${WRKSRC}/config/Makefile
193
.endif
174
194
175
.if ${SLAVE_PORT} == "no"
195
.if ${SLAVE_PORT} == "no"
176
pre-su-install:
196
pre-su-install:
(-)x11-servers/xorg-server/files/extra-config_devd.c (+481 lines)
Line 0 Link Here
1
--- /dev/null	2013-08-03 00:44:23.000000000 +0200
2
+++ config/devd.c	2013-08-03 00:45:15.162836806 +0200
3
@@ -0,0 +1,478 @@
4
+/*
5
+ * Copyright © 2012 Baptiste Daroussin
6
+ *
7
+ * Permission is hereby granted, free of charge, to any person obtaining a
8
+ * copy of this software and associated documentation files (the "Software"),
9
+ * to deal in the Software without restriction, including without limitation
10
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
11
+ * and/or sell copies of the Software, and to permit persons to whom the
12
+ * Software is furnished to do so, subject to the following conditions:
13
+ *
14
+ * The above copyright notice and this permission notice (including the next
15
+ * paragraph) shall be included in all copies or substantial portions of the
16
+ * Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
21
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24
+ * DEALINGS IN THE SOFTWARE.
25
+ *
26
+ * Author: Baptiste Daroussin <bapt@FreeBSD.org>
27
+ */
28
+
29
+#ifdef HAVE_DIX_CONFIG_H
30
+#include <dix-config.h>
31
+#endif
32
+
33
+#include <sys/types.h>
34
+#include <sys/socket.h>
35
+#include <sys/sysctl.h>
36
+#include <sys/un.h>
37
+
38
+#include <ctype.h>
39
+#include <stdlib.h>
40
+#include <stdio.h>
41
+#include <stdarg.h>
42
+#include <stdbool.h>
43
+#include <unistd.h>
44
+
45
+#include "input.h"
46
+#include "inputstr.h"
47
+#include "hotplug.h"
48
+#include "config-backends.h"
49
+#include "os.h"
50
+
51
+#define DEVD_SOCK_PATH "/var/run/devd.pipe"
52
+
53
+#define DEVD_EVENT_ADD		'+'
54
+#define DEVD_EVENT_REMOVE	'-'
55
+
56
+static int sock_devd = -1;
57
+
58
+#if XORG_VERSION_CURRENT < 10800000
59
+enum {
60
+	ATTR_KEYBOARD,
61
+	ATTR_POINTER,
62
+	ATTR_JOYSTICK,
63
+	ATTR_TOUCHPAD,
64
+	ATTR_TOUCHSCREEN,
65
+};
66
+#endif
67
+
68
+struct hw_type {
69
+	const char *driver;
70
+	int flag;
71
+	const char *xdriver;
72
+};
73
+
74
+static struct hw_type hw_types[] = {
75
+	{ "ukbd", ATTR_KEYBOARD, "kdb" },
76
+	{ "atkbd", ATTR_KEYBOARD, "kdb" },
77
+	{ "ums", ATTR_POINTER, "mouse" },
78
+	{ "psm", ATTR_POINTER, "mouse" },
79
+	{ "uhid", ATTR_POINTER, "mouse" },
80
+	{ "joy", ATTR_JOYSTICK, NULL },
81
+	{ "atp", ATTR_TOUCHPAD, NULL },
82
+	{ "uep", ATTR_TOUCHSCREEN, NULL },
83
+	{ NULL, -1, NULL },
84
+};
85
+
86
+#if XORG_VERSION_CURRENT < 10800000
87
+static void
88
+add_option(InputOption **options, const char *key, const char *value)
89
+{
90
+    if (!value || *value == '\0')
91
+        return;
92
+
93
+    for (; *options; options = &(*options)->next)
94
+        ;
95
+    *options = calloc(sizeof(**options), 1);
96
+    if (!*options) /* Yeesh. */
97
+        return;
98
+    (*options)->key = xstrdup(key);
99
+    (*options)->value = xstrdup(value);
100
+    (*options)->next = NULL;
101
+}
102
+
103
+static void
104
+remove_device(DeviceIntPtr dev)
105
+{
106
+    /* this only gets called for devices that have already been added */
107
+    LogMessage(X_INFO, "config/devd: removing device %s\n", dev->name);
108
+
109
+    /* Call PIE here so we don't try to dereference a device that's
110
+     * already been removed. */
111
+    OsBlockSignals();
112
+    ProcessInputEvents();
113
+    DeleteInputDeviceRequest(dev);
114
+    OsReleaseSignals();
115
+}
116
+
117
+static bool
118
+device_is_duplicate(char *config_info)
119
+{
120
+    DeviceIntPtr dev;
121
+
122
+    for (dev = inputInfo.devices; dev; dev = dev->next)
123
+        if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
124
+            return true;
125
+
126
+    for (dev = inputInfo.off_devices; dev; dev = dev->next)
127
+        if (dev->config_info && (strcmp(dev->config_info, config_info) == 0))
128
+            return true;
129
+
130
+    return false;
131
+}
132
+
133
+#endif
134
+
135
+static bool
136
+sysctl_exists(const char *format, ...)
137
+{
138
+	va_list args;
139
+	char *name = NULL;
140
+	size_t len;
141
+	int ret;
142
+
143
+	if (format == NULL)
144
+		return false;
145
+
146
+	va_start(args, format);
147
+	vasprintf(&name, format, args);
148
+	va_end(args);
149
+
150
+	ret = sysctlbyname(name, NULL, &len, NULL, 0);
151
+
152
+	if (ret == -1)
153
+		len = 0;
154
+
155
+	free(name);
156
+	return (len > 0);
157
+}
158
+
159
+static char *
160
+sysctl_get_str(const char *format, ...)
161
+{
162
+	va_list args;
163
+	char *name = NULL;
164
+	char *dest = NULL;
165
+	size_t len;
166
+
167
+	if (format == NULL)
168
+		return NULL;
169
+
170
+	va_start(args, format);
171
+	vasprintf(&name, format, args);
172
+	va_end(args);
173
+
174
+	if (sysctlbyname(name, NULL, &len, NULL, 0) == 0) {
175
+		dest = malloc(len + 1);
176
+		if (sysctlbyname(name, dest, &len, NULL, 0) == 0)
177
+			dest[len] = '\0';
178
+		else {
179
+			free(dest);
180
+			dest = NULL;
181
+		}
182
+	}
183
+
184
+	free(name);
185
+	return dest;
186
+}
187
+
188
+static void
189
+device_added(char *line)
190
+{
191
+    char *walk;
192
+    char *path;
193
+    char *vendor;
194
+    char *product = NULL;
195
+    char *config_info = NULL;
196
+    InputOption *options = NULL;
197
+#if XORG_VERSION_CURRENT > 10800000
198
+    InputAttributes attrs = {};
199
+#else
200
+    InputOption *tmpo;
201
+#endif
202
+    DeviceIntPtr dev = NULL;
203
+    int i, rc;
204
+
205
+    walk = strchr(line, ' ');
206
+    if (walk != NULL)
207
+        walk[0] = '\0';
208
+
209
+    for (i = 0; hw_types[i].driver != NULL; i++) {
210
+        if (strncmp(line, hw_types[i].driver,
211
+                    strlen(hw_types[i].driver)) == 0 &&
212
+            isnumber(*(line + strlen(hw_types[i].driver)))) {
213
+#if XORG_VERSION_CURRENT > 10800000
214
+            attrs.flags |= hw_types[i].flag;
215
+#endif
216
+            break;
217
+        }
218
+    }
219
+    if (hw_types[i].driver == NULL) {
220
+        LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n", line);
221
+        return;
222
+    }
223
+
224
+#if XORG_VERSION_CURRENT < 10800000
225
+    if (hw_types[i].xdriver == NULL) {
226
+        LogMessageVerb(X_INFO, 10, "config/devd: ignoring device %s\n", line);
227
+        return;
228
+    }
229
+#endif
230
+    if (asprintf(&path, "/dev/%s", line) == -1)
231
+        return;
232
+
233
+#if XORG_VERSION_CURRENT < 10800000
234
+    options = calloc(sizeof(*options), 1);
235
+    if (!options)
236
+        return;
237
+
238
+    add_option(&options, "_source", "server/devd");
239
+#else
240
+    options =  input_option_new(NULL, "_source", "server/devd");
241
+    if (!options)
242
+        return;
243
+#endif
244
+
245
+    vendor = sysctl_get_str("dev.%s.%s.%%desc", hw_types[i].driver, line + strlen(hw_types[i].driver));
246
+    if (vendor == NULL) {
247
+#if XORG_VERSION_CURRENT > 10800000
248
+        attrs.vendor = strdup("(unnamed)");
249
+#endif
250
+    } else {
251
+        if ((product = strchr(vendor, ' ')) != NULL) {
252
+            product[0] = '\0';
253
+            product++;
254
+        }
255
+#if XORG_VERSION_CURRENT > 10800000
256
+        attrs.vendor = strdup(vendor);
257
+#endif
258
+        if (product != NULL && (walk = strchr(product, ',')) != NULL)
259
+            walk[0] = '\0';
260
+#if XORG_VERSION_CURRENT > 10800000
261
+        attrs.product = strdup(product != NULL ? product : "(unnamed)");
262
+	options = input_option_new(options, "name", product != NULL ? product : "(unnamed)");
263
+#else
264
+        add_option(&options, "name", product != NULL ? product : "(unnamed)");
265
+#endif
266
+    }
267
+#if XORG_VERSION_CURRENT > 10800000
268
+    attrs.usb_id = NULL;
269
+    options = input_option_new(options, "path", path);
270
+    options = input_option_new(options, "device", path);
271
+#else
272
+    add_option(&options, "path", path);
273
+    add_option(&options, "device", path);
274
+#endif
275
+
276
+#if XORG_VERSION_CURRENT < 10800000
277
+    add_option(&options, "driver", hw_types[i].xdriver);
278
+#endif
279
+
280
+    if (asprintf(&config_info, "devd:%s", line) == -1) {
281
+        config_info = NULL;
282
+        goto unwind;
283
+    }
284
+
285
+    if (device_is_duplicate(config_info)) {
286
+        LogMessage(X_WARNING, "config/devd: device %s already added. "
287
+                              "Ignoring.\n", product != NULL ? product : "(unnamed)");
288
+        goto unwind;
289
+    }
290
+
291
+#if XORG_VERSION_CURRENT < 10800000
292
+    add_option(&options, "config_info", config_info);
293
+#else
294
+    options = input_option_new(options, "config_info", config_info);
295
+#endif
296
+    LogMessage(X_INFO, "config/devd: Adding input device %s (%s)\n",
297
+               product != NULL ? product : "(unnamed)", path);
298
+
299
+#if XORG_VERSION_CURRENT > 10800000
300
+    rc = NewInputDeviceRequest(options, &attrs, &dev);
301
+#else
302
+    rc = NewInputDeviceRequest(options, &dev);
303
+#endif
304
+
305
+    if (rc != Success)
306
+        goto unwind;
307
+
308
+ unwind:
309
+    free(config_info);
310
+#if XORG_VERSION_CURRENT < 10800000
311
+    while ((tmpo = options)) {
312
+        options = tmpo->next;
313
+        free(tmpo->key);        /* NULL if dev != NULL */
314
+        free(tmpo->value);      /* NULL if dev != NULL */
315
+        free(tmpo);
316
+    }
317
+#else
318
+    input_option_free_list(&options);
319
+#endif
320
+
321
+#if XORG_VERSION_CURRENT > 10800000
322
+    free(attrs.usb_id);
323
+    free(attrs.product);
324
+    free(attrs.device);
325
+    free(attrs.vendor);
326
+#endif
327
+
328
+    return;
329
+}
330
+
331
+static void
332
+device_removed(char *line)
333
+{
334
+    char *walk;
335
+    char *value;
336
+#if XORG_VERSION_CURRENT < 10800000
337
+    DeviceIntPtr dev, next;
338
+#endif
339
+
340
+    walk = strchr(line, ' ');
341
+    if (walk != NULL)
342
+        walk[0] = '\0';
343
+
344
+    if (asprintf(&value, "devd:%s", line) == -1)
345
+        return;
346
+
347
+#if XORG_VERSION_CURRENT > 10800000
348
+    remove_devices("dev", value);
349
+#else
350
+    for (dev = inputInfo.devices; dev; dev = next) {
351
+        next = dev->next;
352
+        if (dev->config_info && strcmp(dev->config_info, value) == 0)
353
+            remove_device(dev);
354
+    }
355
+    for (dev = inputInfo.off_devices; dev; dev = next) {
356
+	next = dev->next;
357
+        if (dev->config_info && strcmp(dev->config_info, value) == 0)
358
+            remove_device(dev);
359
+    }
360
+#endif
361
+
362
+    free(value);
363
+}
364
+
365
+static ssize_t
366
+socket_getline(int fd, char **out)
367
+{
368
+	char *buf;
369
+	ssize_t ret, cap, sz = 0;
370
+	char c;
371
+
372
+	cap = 1024;
373
+	buf = malloc(cap * sizeof(char));
374
+	if (!buf)
375
+		return -1;
376
+
377
+	for (;;) {
378
+		ret = read(sock_devd, &c, 1);
379
+		if (ret < 1) {
380
+			free(buf);
381
+			return -1;
382
+		}
383
+
384
+		if (c == '\n')
385
+			break;
386
+
387
+		if (sz + 1 >= cap) {
388
+			cap *= 2;
389
+			buf = realloc(buf, cap *sizeof(char));
390
+		}
391
+		buf[sz] = c;
392
+		sz++;
393
+	}
394
+
395
+	buf[sz] = '\0';
396
+	if (sz > 0)
397
+		*out = buf;
398
+	else
399
+		free(buf);
400
+
401
+	return sz; /* number of bytes in the line, not counting the line break*/
402
+}
403
+
404
+static void
405
+wakeup_handler(pointer data, int err, pointer read_mask)
406
+{
407
+    char *line = NULL;
408
+
409
+    if (err < 0)
410
+        return;
411
+
412
+    if (FD_ISSET(sock_devd, (fd_set *)read_mask)) {
413
+        if (socket_getline(sock_devd, &line) < 0)
414
+            return;
415
+
416
+        switch(*line) {
417
+		case DEVD_EVENT_ADD:
418
+			device_added(line++);
419
+			break;
420
+		case DEVD_EVENT_REMOVE:
421
+			device_removed(line++);
422
+			break;
423
+		default:
424
+			break;
425
+	}
426
+	free(line);
427
+    }
428
+}
429
+
430
+static void
431
+block_handler(pointer data, struct timeval **tv, pointer read_mask)
432
+{
433
+}
434
+
435
+int
436
+config_devd_init(void)
437
+{
438
+    struct sockaddr_un devd;
439
+    char devicename[1024];
440
+    int i, j;
441
+
442
+    /* first scan the sysctl to determine the hardware if needed */
443
+
444
+    for (i = 0; hw_types[i].driver != NULL; i++) {
445
+        for (j = 0; sysctl_exists("dev.%s.%i.%%desc", hw_types[i].driver, j); j++) {
446
+            snprintf(devicename, 1024, "%s%i", hw_types[i].driver, j);
447
+            device_added(devicename);
448
+        }
449
+
450
+    }
451
+    sock_devd = socket(AF_UNIX, SOCK_STREAM, 0);
452
+    if (sock_devd < 0) {
453
+        ErrorF("config/devd: Fail opening stream socket");
454
+        return 0;
455
+    }
456
+
457
+    devd.sun_family = AF_UNIX;
458
+    strlcpy(devd.sun_path, DEVD_SOCK_PATH, sizeof(devd.sun_path));
459
+
460
+    if (connect(sock_devd, (struct sockaddr *) &devd, sizeof(struct sockaddr_un)) < 0) {
461
+        close(sock_devd);
462
+        ErrorF("config/devd: Fail to connect to devd");
463
+        return 0;
464
+    }
465
+
466
+    RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
467
+    AddGeneralSocket(sock_devd);
468
+
469
+    return 1;
470
+}
471
+
472
+void
473
+config_devd_fini(void)
474
+{
475
+    if (sock_devd < 0)
476
+        return;
477
+
478
+    RemoveGeneralSocket(sock_devd);
479
+    RemoveBlockAndWakeupHandlers(block_handler, wakeup_handler, NULL);
480
+    close(sock_devd);
481
+}
(-)x11-servers/xorg-server/files/extra-configure (+11 lines)
Line 0 Link Here
1
--- configure.orig	2013-09-07 22:11:27.210621324 +0200
2
+++ configure	2013-09-07 22:11:52.912624338 +0200
3
@@ -22839,7 +22839,7 @@
4
 }
5
 _ACEOF
6
 if ac_fn_c_try_compile "$LINENO"; then :
7
-  ac_cv_tls=$kw
8
+  ac_cv_tls=$kw; break ;
9
 fi
10
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11
         done
(-)x11-themes/gtk-murrine-engine/Makefile (-4 / +3 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	murrine
4
PORTNAME=	murrine
5
PORTVERSION=	0.98.2
5
PORTVERSION=	0.98.2
6
PORTREVISION=	1
6
CATEGORIES=	x11-themes
7
CATEGORIES=	x11-themes
7
MASTER_SITES=	GNOME
8
MASTER_SITES=	GNOME
8
PKGNAMEPREFIX=	gtk-
9
PKGNAMEPREFIX=	gtk-
Lines 11-24 Link Here
11
MAINTAINER=	pneumann@gmail.com
12
MAINTAINER=	pneumann@gmail.com
12
COMMENT=	Murrine GTK+ 2.x cairo based engine
13
COMMENT=	Murrine GTK+ 2.x cairo based engine
13
14
14
LIB_DEPENDS=	pixman-1:${PORTSDIR}/x11/pixman
15
16
USE_XZ=	yes
15
USE_XZ=	yes
17
USE_GMAKE=	yes
16
USE_XORG=	pixman
18
USE_GNOME=	gtk20 intltool intlhack
17
USE_GNOME=	gtk20 intltool intlhack
19
USE_LDCONFIG=	yes
18
USE_LDCONFIG=	yes
20
GNU_CONFIGURE=	yes
19
GNU_CONFIGURE=	yes
21
USES=	pkgconfig
20
USES=		gmake pkgconfig
22
21
23
OPTIONS_DEFINE=	ANIMATION
22
OPTIONS_DEFINE=	ANIMATION
24
ANIMATION_DESC=	Animation support
23
ANIMATION_DESC=	Animation support
(-)x11-toolkits/gtkglext/Makefile (-3 / +2 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	gtkglext
4
PORTNAME=	gtkglext
5
PORTVERSION=	1.2.0
5
PORTVERSION=	1.2.0
6
PORTREVISION=	11
6
PORTREVISION=	12
7
CATEGORIES=	x11-toolkits
7
CATEGORIES=	x11-toolkits
8
MASTER_SITES=	SF
8
MASTER_SITES=	SF
9
DIST_SUBDIR=	gnome2
9
DIST_SUBDIR=	gnome2
Lines 25-36 Link Here
25
OPTIONS_DEFINE=	DOCS
25
OPTIONS_DEFINE=	DOCS
26
26
27
USE_BZIP2=	yes
27
USE_BZIP2=	yes
28
USE_GMAKE=	yes
29
USE_AUTOTOOLS=	libtool
28
USE_AUTOTOOLS=	libtool
30
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
29
USE_XORG=	ice pixman sm x11 xau xcb xcomposite xcursor xdamage xdmcp \
31
		xext xfixes xi xinerama xmu xrandr xrender xt xxf86vm
30
		xext xfixes xi xinerama xmu xrandr xrender xt xxf86vm
32
USE_GL=		glu
31
USE_GL=		glu
33
USES=		gettext iconv pathfix pkgconfig
32
USES=		gettext gmake iconv pathfix pkgconfig
34
USE_GNOME=	gdkpixbuf2 gtk20 pangox-compat
33
USE_GNOME=	gdkpixbuf2 gtk20 pangox-compat
35
USE_LDCONFIG=	yes
34
USE_LDCONFIG=	yes
36
35
(-)x11-toolkits/libXaw/Makefile (-2 / +2 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libXaw
4
PORTNAME=	libXaw
5
PORTVERSION=	1.0.11
5
PORTVERSION=	1.0.12
6
PORTEPOCH=	2
6
PORTEPOCH=	2
7
CATEGORIES=	x11-toolkits
7
CATEGORIES=	x11-toolkits
8
8
Lines 11-17 Link Here
11
11
12
XORG_CAT=	lib
12
XORG_CAT=	lib
13
USE_XORG=	printproto:both x11 xau xext xextproto xmu xp xpm xproto:both xt
13
USE_XORG=	printproto:both x11 xau xext xextproto xmu xp xpm xproto:both xt
14
USE_GMAKE=	yes
14
USES=		gmake
15
CONFIGURE_ARGS+=--without-xmlto
15
CONFIGURE_ARGS+=--without-xmlto
16
16
17
MAN3=		Xaw.3
17
MAN3=		Xaw.3
(-)x11-toolkits/libXaw/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libXaw-1.0.11.tar.bz2) = 87a874acbb71d1ee59b8047312fc91d89dcb373e2970f121184cdae29a3d9492
1
SHA256 (xorg/lib/libXaw-1.0.12.tar.bz2) = 96fc314874fce9979556321d1d6ee00b5baf32fb333b7278853b4983bc3cdbf6
2
SIZE (xorg/lib/libXaw-1.0.11.tar.bz2) = 649633
2
SIZE (xorg/lib/libXaw-1.0.12.tar.bz2) = 677147
(-)x11-toolkits/libXmu/Makefile (-1 / +1 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libXmu
4
PORTNAME=	libXmu
5
PORTVERSION=	1.1.1
5
PORTVERSION=	1.1.2
6
PORTEPOCH=	1
6
PORTEPOCH=	1
7
CATEGORIES=	x11-toolkits
7
CATEGORIES=	x11-toolkits
8
8
(-)x11-toolkits/libXmu/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (xorg/lib/libXmu-1.1.1.tar.bz2) = 709081c550cc3a866d7c760a3f97384a1fe16e27fc38fe8169b8db9f33aa7edd
1
SHA256 (xorg/lib/libXmu-1.1.2.tar.bz2) = 756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b
2
SIZE (xorg/lib/libXmu-1.1.1.tar.bz2) = 383473
2
SIZE (xorg/lib/libXmu-1.1.2.tar.bz2) = 396230
(-)x11-wm/awesome/Makefile (-1 / +1 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	awesome
4
PORTNAME=	awesome
5
PORTVERSION=	3.5.1
5
PORTVERSION=	3.5.1
6
PORTREVISION=	2
6
PORTREVISION=	3
7
PORTEPOCH=	1
7
PORTEPOCH=	1
8
CATEGORIES=	x11-wm
8
CATEGORIES=	x11-wm
9
MASTER_SITES=	http://awesome.naquadah.org/download/
9
MASTER_SITES=	http://awesome.naquadah.org/download/

Return to bug 181962