Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 May 2012 15:23:11 GMT
From:      Mark Linimon <linimon@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/167489: [patch] fix graphics/libdrm build on tier-2
Message-ID:  <201205011523.q41FNBLS083831@freefall.freebsd.org>
Resent-Message-ID: <201205011530.q41FUCma084047@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167489
>Category:       ports
>Synopsis:       [patch] fix graphics/libdrm build on tier-2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 01 15:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Mark Linimon
>Release:        FreeBSD 8.2-STABLE i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 8.2-STABLE FreeBSD 8.2-STABLE #5 r227907: Wed Nov 23 21:55:50 UTC 2011 simon@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386
>Description:
The latest sparc64-9 build gets an error while trying to install some Intel-specific
files.  Apparently these are not built on sparc64 (makes sense).

The patch guesses that powerpc will be affected by the same change.  Not yet tested.

NB: results of plist generation with and without ARCH=sparc64 below.  This patch
does not need to be incorporated; I have just posted this as a sanity-test.  The
patch that needs to be applied is in Fix: .

20c20
< @comment include/libdrm/intel_bufmgr.h
---
> @comment @comment include/libdrm/intel_bufmgr.h
56,58c56,58
< lib/libdrm_intel.la
< lib/libdrm_intel.so
< lib/libdrm_intel.so.1
---
> @comment lib/libdrm_intel.la
> @comment lib/libdrm_intel.so
> @comment lib/libdrm_intel.so.1
69c69
< libdata/pkgconfig/libdrm_intel.pc
---
> @comment libdata/pkgconfig/libdrm_intel.pc
>How-To-Repeat:
See http://pointyhat.freebsd.org/errorlogs/sparc64-errorlogs/e.9.20120427045032/libdrm-2.4.17_1.log
>Fix:
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/graphics/libdrm/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile	22 Apr 2012 15:04:07 -0000	1.24
+++ Makefile	1 May 2012 15:19:13 -0000
@@ -50,9 +50,17 @@
 PLIST_SUB+=	OLD="" NEW="@comment "
 .endif
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64" || ${ARCH} == "i386" || ${ARCH} == "ia64"
+PLIST_SUB+=	X86=""
+.else
+PLIST_SUB+=	X86="@comment "
+.endif
+
 pre-patch:
 	@${REINPLACE_CMD} 's|{libdir}/pkgconfig|{prefix}/libdata/pkgconfig|g; \
 			   12661s/x86_/amd/g' \
 		${WRKSRC}/configure
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/graphics/libdrm/pkg-plist,v
retrieving revision 1.11
diff -u -r1.11 pkg-plist
--- pkg-plist	21 Apr 2012 17:03:17 -0000	1.11
+++ pkg-plist	1 May 2012 15:19:13 -0000
@@ -17,7 +17,7 @@
 %%NEW%%include/libdrm/drm_mode.h
 %%NEW%%include/libdrm/drm_sarea.h
 %%NEW%%include/libdrm/i915_drm.h
-%%NEW%%include/libdrm/intel_bufmgr.h
+%%NEW%%%%X86%%include/libdrm/intel_bufmgr.h
 %%NEW%%include/libdrm/intel_debug.h
 %%NEW%%include/libdrm/mach64_drm.h
 %%NEW%%include/libdrm/mga_drm.h
@@ -53,9 +53,9 @@
 lib/libdrm.la
 lib/libdrm.so
 lib/libdrm.so.2
-lib/libdrm_intel.la
-lib/libdrm_intel.so
-lib/libdrm_intel.so.1
+%%X86%%lib/libdrm_intel.la
+%%X86%%lib/libdrm_intel.so
+%%X86%%lib/libdrm_intel.so.1
 lib/libdrm_nouveau.la
 lib/libdrm_nouveau.so
 lib/libdrm_nouveau.so.1
@@ -66,7 +66,7 @@
 %%NEW%%%%KMS%%lib/libkms.so
 %%NEW%%%%KMS%%lib/libkms.so.1
 libdata/pkgconfig/libdrm.pc
-libdata/pkgconfig/libdrm_intel.pc
+%%X86%%libdata/pkgconfig/libdrm_intel.pc
 libdata/pkgconfig/libdrm_nouveau.pc
 %%NEW%%libdata/pkgconfig/libdrm_radeon.pc
 %%NEW%%%%KMS%%libdata/pkgconfig/libkms.pc
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205011523.q41FNBLS083831>