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

Collapse All | Expand All

(-)graphics/libGL/Makefile.common (-8 / +9 lines)
Lines 18-35 Link Here
18
MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
18
MESAVERSION=	${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
19
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
19
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
20
20
21
MESABASEVERSION=	13.0.5
21
MESABASEVERSION=	17.0.1
22
# if there is a subversion, don't include the '-' between 7.11-rc2.
22
# if there is a subversion, don't include the '-' between 7.11-rc2.
23
MESASUBVERSION=
23
MESASUBVERSION=
24
24
25
MASTER_SITES=	ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/
25
MASTER_SITES=	https://mesa.freedesktop.org/archive/ \
26
		https://mesa.freedesktop.org/archive/${MESABASEVERSION}/ \
27
		ftp://ftp.freedesktop.org/pub/mesa/ \
28
		ftp://ftp.freedesktop.org/pub/mesa/${MESABASEVERSION}/
26
29
27
DISTFILES=	mesa-${MESADISTVERSION}${EXTRACT_SUFX}
30
DISTFILES=	mesa-${MESADISTVERSION}${EXTRACT_SUFX}
28
31
29
MAINTAINER=	x11@FreeBSD.org
32
MAINTAINER=	x11@FreeBSD.org
30
33
31
BUILD_DEPENDS+=	makedepend:devel/makedepend
32
33
USES+=		compiler:c++11-lib bison gettext-tools gmake libtool \
34
USES+=		compiler:c++11-lib bison gettext-tools gmake libtool \
34
		localbase pathfix pkgconfig python:2,build shebangfix tar:xz
35
		localbase pathfix pkgconfig python:2,build shebangfix tar:xz
35
USE_LDCONFIG=	yes
36
USE_LDCONFIG=	yes
Lines 60-66 INSTALL_TARGET= install-strip Link Here
60
61
61
COMPONENT=		${PORTNAME:tl:C/^lib//:C/mesa-//}
62
COMPONENT=		${PORTNAME:tl:C/^lib//:C/mesa-//}
62
63
63
MESA_LLVM_VER=39
64
MESA_LLVM_VER?=		40
64
65
65
CONFIGURE_ARGS+=	--with-sha1=libcrypto
66
CONFIGURE_ARGS+=	--with-sha1=libcrypto
66
67
Lines 72-78 CONFIGURE_ARGS+= --enable-gbm Link Here
72
# pthread_setspecific which it uses now by default. But since this
73
# pthread_setspecific which it uses now by default. But since this
73
# configure switch is going away ...
74
# configure switch is going away ...
74
# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html
75
# https://lists.freebsd.org/pipermail/freebsd-arch/2016-February/017699.html
75
#CONFIGURE_ARGS+=	--enable-glx-tls
76
CONFIGURE_ARGS+=	--disable-glx-tls
76
77
77
# libEGL, dri and clover need gallium enabled.
78
# libEGL, dri and clover need gallium enabled.
78
# the third option in --with-egl-platforms is wayland.
79
# the third option in --with-egl-platforms is wayland.
Lines 110-118 CONFIGURE_ARGS+= --disable-opencl Link Here
110
CONFIGURE_ARGS+=	--enable-osmesa
111
CONFIGURE_ARGS+=	--enable-osmesa
111
112
112
# gallium
113
# gallium
113
BUILD_DEPENDS+= llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
114
BUILD_DEPENDS+=	llvm${MESA_LLVM_VER}>=3.6:devel/llvm${MESA_LLVM_VER}
114
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != ""
115
.if ${COMPONENT:Mdri} != "" || ${COMPONENT:Mclover} != "" || ${COMPONENT:Megl} != ""
115
RUN_DEPENDS+=   llvm${MESA_LLVM_VER}>=3.9.0_4:devel/llvm${MESA_LLVM_VER}
116
RUN_DEPENDS+=	llvm${MESA_LLVM_VER}>=3.6:devel/llvm${MESA_LLVM_VER}
116
.endif
117
.endif
117
118
118
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
119
CONFIGURE_ENV+= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${MESA_LLVM_VER}
(-)graphics/libGL/Makefile.targets (-3 / +4 lines)
Lines 15-24 post-patch: Link Here
15
.if ${OSVERSION} < 1100000 && ${ARCH} == "i386"
15
.if ${OSVERSION} < 1100000 && ${ARCH} == "i386"
16
	@${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure
16
	@${REINPLACE_CMD} -e 's|-DUSE_GCC_ATOMIC_BUILTINS||' ${WRKSRC}/configure
17
.endif
17
.endif
18
.endif
18
.else # OPSYS == FreeBSD
19
#	Sed on 9.x and dragonfly don't support \< or \>
19
#	DragonFly's sed lacks \< or \> while GNU sed lacks [[:<:]] or [[:>:]]
20
	@${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' -e 's|\\S\*//|[:graph:]* //|' \
20
	@${REINPLACE_CMD} -e 's|\\>//|[[:>:]]//|' \
21
		${WRKSRC}/configure
21
		${WRKSRC}/configure
22
.endif # OPSYS == FreeBSD
22
	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
23
	@${REINPLACE_CMD} -e 's|/etc/|${PREFIX}/etc/|g' \
23
		${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
24
		${WRKSRC}/src/mesa/drivers/dri/common/xmlconfig.c
24
	@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \
25
	@${REINPLACE_CMD} -e 's|#!/use/bin/python|#!${PYTHON_CMD}|g' \
(-)graphics/libGL/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1487852413
1
TIMESTAMP = 1488642485
2
SHA256 (mesa-13.0.5.tar.xz) = bfcea7e2c801525a60895c8aff11aa68457ee9aa35d01a4638e1f310a3f5ef87
2
SHA256 (mesa-17.0.1.tar.xz) = 96fd70ef5f31d276a17e424e7e1bb79447ccbbe822b56844213ef932e7ad1b0c
3
SIZE (mesa-13.0.5.tar.xz) = 9171480
3
SIZE (mesa-17.0.1.tar.xz) = 9447712
(-)graphics/libGL/files/configure.ac (-48 / +53 lines)
Lines 1-35 Link Here
1
--- configure.ac.orig	2016-06-21 14:31:09.000000000 +0200
1
--- configure.ac.orig	2017-03-04 15:46:53 UTC
2
+++ configure.ac	2016-07-08 13:05:53.236433000 +0200
2
+++ configure.ac
3
@@ -871,7 +872,7 @@
3
@@ -943,18 +943,18 @@ llvm_add_target() {
4
     [enable_dri=yes])
4
 # $1 is the llvm-config command with arguments.
5
 strip_unwanted_llvm_flags() {
6
     # Use \> (marks the end of the word)
7
-    echo " `$1`" | sed \
8
-        -e 's/\s\+-m\S*//g' \
9
-        -e 's/\s\+-DNDEBUG\>//g' \
10
-        -e 's/\s\+-D_GNU_SOURCE\>//g' \
11
-        -e 's/\s\+-pedantic\>//g' \
12
-        -e 's/\s\+-W\S*//g' \
13
-        -e 's/\s\+-O\S*//g' \
14
-        -e 's/\s\+-g\S*//g' \
15
+    echo " `$1`" | sed -E \
16
+        -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
17
+        -e 's/[[[:space:]]]+-DNDEBUG\>//g' \
18
+        -e 's/[[[:space:]]]+-D_GNU_SOURCE\>//g' \
19
+        -e 's/[[[:space:]]]+-pedantic\>//g' \
20
+        -e 's/[[[:space:]]]+-W[[^[:space:]]]*//g' \
21
+        -e 's/[[[:space:]]]+-O[[^[:space:]]]*//g' \
22
+        -e 's/[[[:space:]]]+-g[[^[:space:]]]*//g' \
23
         -e 's/-fno-rtti\>/-Fno-rtti/g' \
24
-        -e 's/\s\+-f\S*//g' \
25
+        -e 's/[[[:space:]]]+-f[[^[:space:]]]*//g' \
26
         -e 's/-Fno-rtti\>/-fno-rtti/g' \
27
-        -e 's/^ //'
28
+        -e 's/^[[[:space:]]]//'
29
 }
5
 
30
 
31
 llvm_set_environment_variables() {
32
@@ -1121,7 +1121,7 @@ fi
33
 AC_SUBST(LIBSENSORS_LIBS)
34
 
6
 case "$host_os" in
35
 case "$host_os" in
7
-linux*)
36
-linux*)
8
+linux*|freebsd*)
37
+linux* | freebsd*)
9
     dri3_default=yes
38
     dri3_default=yes
10
     ;;
39
     ;;
11
 *)
40
 *)
12
@@ -1540,6 +1548,19 @@
41
@@ -1631,7 +1631,7 @@ dnl platform checks. Set DEFINES and LIB
13
         ;;
42
 if test "x$enable_dri" = xyes; then
14
     gnu*)
43
     # Platform specific settings and drivers to build
15
         DEFINES="$DEFINES -DHAVE_ALIAS"
44
     case "$host_os" in
16
+dnl not sure about dri3 support, just enable it for now.
45
-    linux*)
17
+        if test "x$enable_dri3" = xyes; then
46
+    linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
18
+            DEFINES="$DEFINES -DHAVE_DRI3"
47
         if test "x$enable_dri3" = xyes; then
19
+        fi
48
             DEFINES="$DEFINES -DHAVE_DRI3"
20
+
49
         fi
21
+        case "$host_cpu" in
50
@@ -2002,9 +2002,19 @@ if test "x$enable_opencl" = xyes; then
22
+        powerpc* | sparc*)
23
+            # Build only the drivers for cards that exist on PowerPC/sparc
24
+            if test "x$with_dri_drivers" = "xyes"; then
25
+                with_dri_drivers="r200 radeon swrast"
26
+            fi
27
+            ;;
28
+        esac
29
         ;;
30
     cygwin*)
31
         if test "x$with_dri_drivers" = "xyes"; then
32
@@ -1921,9 +1948,19 @@
33
         AC_MSG_ERROR([cannot enable OpenCL without Gallium])
51
         AC_MSG_ERROR([cannot enable OpenCL without Gallium])
34
     fi
52
     fi
35
 
53
 
Lines 49-73 Link Here
49
 
67
 
50
     if test "x$have_libclc" = xno; then
68
     if test "x$have_libclc" = xno; then
51
         AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
69
         AC_MSG_ERROR([pkg-config cannot find libclc.pc which is required to build clover.
52
@@ -2102,9 +2139,9 @@
70
@@ -2047,8 +2057,6 @@ if test "x$enable_opencl" = xyes; then
53
 strip_unwanted_llvm_flags() {
71
         CLANG_LIBDIR=${LLVM_LIBDIR}
54
     # Use \> (marks the end of the word)
72
     fi
55
     echo `$1` | sed \
73
     CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
56
-	-e 's/-march=\S*//g' \
74
-    AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
57
-	-e 's/-mtune=\S*//g' \
75
-        [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
58
-	-e 's/-mcpu=\S*//g' \
76
 fi
59
+	-e 's/-march=[[:graph:]]* //g' \
77
 AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes)
60
+	-e 's/-mtune=[[:graph:]]* //g' \
78
 AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
61
+	-e 's/-mcpu=[[:graph:]]* //g' \
62
 	-e 's/-DNDEBUG\>//g' \
63
 	-e 's/-D_GNU_SOURCE\>//g' \
64
 	-e 's/-pedantic\>//g' \
65
@@ -2196,8 +2233,6 @@
66
                 CLANG_LIBDIR=${LLVM_LIBDIR}
67
             fi
68
             CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
69
-            AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
70
-                [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
71
         fi
72
     else
73
         MESA_LLVM=0
(-)graphics/libGL/files/patch-configure (-31 / +52 lines)
Lines 1-34 Link Here
1
--- configure.orig	2017-01-05 15:52:21 UTC
1
Don't forget to keep files/configure.ac in sync
2
3
--- configure.orig	2017-03-04 15:47:01 UTC
2
+++ configure
4
+++ configure
3
@@ -21955,7 +21955,7 @@ fi
5
@@ -22307,18 +22307,18 @@ llvm_add_target() {
6
 # $1 is the llvm-config command with arguments.
7
 strip_unwanted_llvm_flags() {
8
     # Use \> (marks the end of the word)
9
-    echo " `$1`" | sed \
10
-        -e 's/\s\+-m\S*//g' \
11
-        -e 's/\s\+-DNDEBUG\>//g' \
12
-        -e 's/\s\+-D_GNU_SOURCE\>//g' \
13
-        -e 's/\s\+-pedantic\>//g' \
14
-        -e 's/\s\+-W\S*//g' \
15
-        -e 's/\s\+-O\S*//g' \
16
-        -e 's/\s\+-g\S*//g' \
17
+    echo " `$1`" | sed -E \
18
+        -e 's/[[:space:]]+-m[^[:space:]]*//g' \
19
+        -e 's/[[:space:]]+-DNDEBUG\>//g' \
20
+        -e 's/[[:space:]]+-D_GNU_SOURCE\>//g' \
21
+        -e 's/[[:space:]]+-pedantic\>//g' \
22
+        -e 's/[[:space:]]+-W[^[:space:]]*//g' \
23
+        -e 's/[[:space:]]+-O[^[:space:]]*//g' \
24
+        -e 's/[[:space:]]+-g[^[:space:]]*//g' \
25
         -e 's/-fno-rtti\>/-Fno-rtti/g' \
26
-        -e 's/\s\+-f\S*//g' \
27
+        -e 's/[[:space:]]+-f[^[:space:]]*//g' \
28
         -e 's/-Fno-rtti\>/-fno-rtti/g' \
29
-        -e 's/^ //'
30
+        -e 's/^[[:space:]]//'
31
 }
4
 
32
 
33
 llvm_set_environment_variables() {
34
@@ -22516,7 +22516,7 @@ fi
5
 
35
 
36
 
6
 case "$host_os" in
37
 case "$host_os" in
7
-linux*)
38
-linux*)
8
+linux*|freebsd*)
39
+linux* | freebsd*)
9
     dri3_default=yes
40
     dri3_default=yes
10
     ;;
41
     ;;
11
 *)
42
 *)
12
@@ -23968,6 +23968,18 @@ if test "x$enable_dri" = xyes; then
43
@@ -24055,7 +24055,7 @@ fi
13
         ;;
44
 if test "x$enable_dri" = xyes; then
14
     *freebsd* | dragonfly* | *netbsd* | openbsd*)
45
     # Platform specific settings and drivers to build
15
         DEFINES="$DEFINES -DHAVE_ALIAS"
46
     case "$host_os" in
16
+        if test "x$enable_dri3" = xyes; then
47
-    linux*)
17
+            DEFINES="$DEFINES -DHAVE_DRI3"
48
+    linux* | *freebsd* | dragonfly* | *netbsd* | openbsd*)
18
+        fi
49
         if test "x$enable_dri3" = xyes; then
19
+
50
             DEFINES="$DEFINES -DHAVE_DRI3"
20
+        case "$host_cpu" in
51
         fi
21
+        powerpc* | sparc*)
52
@@ -25807,9 +25807,19 @@ if test "x$enable_opencl" = xyes; then
22
+            # Build only the drivers for cards that exist on PowerPC/sparc
23
+            if test "x$with_dri_drivers" = "xyes"; then
24
+                with_dri_drivers="r200 radeon swrast"
25
+            fi
26
+            ;;
27
+        esac
28
         ;;
29
     gnu*)
30
         DEFINES="$DEFINES -DHAVE_ALIAS"
31
@@ -25849,9 +25861,19 @@ if test "x$enable_opencl" = xyes; then
32
         as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
53
         as_fn_error $? "cannot enable OpenCL without Gallium" "$LINENO" 5
33
     fi
54
     fi
34
 
55
 
Lines 48-60 Link Here
48
 
69
 
49
     if test "x$have_libclc" = xno; then
70
     if test "x$have_libclc" = xno; then
50
         as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover.
71
         as_fn_error $? "pkg-config cannot find libclc.pc which is required to build clover.
51
@@ -26670,9 +26692,6 @@ fi
72
@@ -25851,9 +25861,6 @@ if test "x$enable_opencl" = xyes; then
52
                 CLANG_LIBDIR=${LLVM_LIBDIR}
73
         CLANG_LIBDIR=${LLVM_LIBDIR}
53
             fi
74
     fi
54
             CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
75
     CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
55
-            if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
76
-    if test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"; then :
56
-  as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5
77
-  as_fn_error $? "Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries." "$LINENO" 5
57
-fi
78
-fi
58
         fi
79
 fi
59
     else
80
  if test "x$enable_opencl" = xyes; then
60
         MESA_LLVM=0
81
   HAVE_CLOVER_TRUE=

Return to bug 217016