Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2011 12:43:51 +0400
From:      Pan Tsu <inyaoo@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/158529: [patch] x11-servers/xorg-server: conditionalize --without-dtrace
Message-ID:  <86wrg3aeuw.fsf@gmail.com>
Resent-Message-ID: <201106300850.p5U8o1BU059090@freefall.freebsd.org>

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

>Number:         158529
>Category:       ports
>Synopsis:       [patch] x11-servers/xorg-server: conditionalize --without-dtrace
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    x11
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 30 08:50:01 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Pan Tsu
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
tested on Xserver 1.7.7 and Xserver-1.10.2
>Description:
Use vendor default for FreeBSD versions with userland tracing support.
No point for slave ports unless they start to use common patches, e.g.

  PATCHDIR = ${.CURDIR}/../xorg-server/files
>How-To-Repeat:
# kldload dtraceall
# Xorg &
# dtrace -P Xserver\* &
# xterm
dtrace: description 'Xserver*' matched 3 probes
CPU     ID                    FUNCTION:NAME
  1  26626 EstablishNewConnections:client-connect
  1  26625            AuthAudit:client-auth
^C
>Fix:
--- a.diff begins here ---
Index: x11-servers/xorg-server/Makefile
===================================================================
RCS file: /a/.cvsup/ports/x11-servers/xorg-server/Makefile,v
retrieving revision 1.80
diff -u -p -r1.80 Makefile
--- x11-servers/xorg-server/Makefile	27 Feb 2011 23:16:09 -0000	1.80
+++ x11-servers/xorg-server/Makefile	30 Jun 2011 08:04:53 -0000
@@ -36,7 +36,7 @@ MAKE_JOBS_UNSAFE=	yes
 USE_OPENSSL=	yes
 USE_PERL5_BUILD=yes
 CONFIGURE_ARGS=	--disable-dmx --disable-xvfb --disable-xnest \
-		--localstatedir=/var --without-dtrace --disable-xephyr \
+		--localstatedir=/var --disable-xephyr \
 		--enable-record=yes
 
 MAN1=		Xorg.1 \
@@ -124,6 +124,12 @@ PLIST_SUB+=	AMD64_I386_SPARC64=""
 PLIST_SUB+=	AMD64_I386_SPARC64="@comment "
 .endif
 
+.if (${OSVERSION} < 800000) \
+	|| (${OSVERSION} >= 800000 && ${OSVERSION} < 802500)
+	|| (${OSVERSION} >= 900000 && ${OSVERSION} < 900021)
+CONFIGURE_ARGS+=--without-dtrace
+.endif
+
 .if !defined(WITHOUT_SUID) && (!defined(NO_SUID_XSERVER) || ${NO_SUID_XSERVER} == NO)
 pre-everything::
 	@${ECHO_MSG} "By default, the X Server installs as a set-user-id root binary. When run by"
Index: x11-servers/xorg-server/files/patch-dix-Xserver.d
===================================================================
RCS file: x11-servers/xorg-server/files/patch-dix-Xserver.d
diff -N x11-servers/xorg-server/files/patch-dix-Xserver.d
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ x11-servers/xorg-server/files/patch-dix-Xserver.d	25 Jun 2011 04:08:20 -0000
@@ -0,0 +1,11 @@
+--- dix/Xserver.d~
++++ dix/Xserver.d
+@@ -27,6 +27,8 @@
+ #define string char *
+ #define pid_t uint32_t
+ #define zoneid_t uint32_t
++#elif defined(__FreeBSD__)
++#define zoneid_t id_t
+ #else
+ #include <sys/types.h>
+ #endif
Index: x11-servers/xorg-server/files/patch-hw-xfree86-Makefile.in
===================================================================
RCS file: x11-servers/xorg-server/files/patch-hw-xfree86-Makefile.in
diff -N x11-servers/xorg-server/files/patch-hw-xfree86-Makefile.in
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ x11-servers/xorg-server/files/patch-hw-xfree86-Makefile.in	25 Jun 2011 04:08:20 -0000
@@ -0,0 +1,11 @@
+--- hw/xfree86/Makefile.in~
++++ hw/xfree86/Makefile.in
+@@ -44,7 +44,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(sr
+ bin_PROGRAMS = Xorg$(EXEEXT)
+ 
+ # Re-add dtrace object code that gets lost when building static libraries
+-@SPECIAL_DTRACE_OBJECTS_TRUE@am__append_1 = $(XSERVER_LIBS)
++@SPECIAL_DTRACE_OBJECTS_TRUE@am__append_1 = -lelf $(XSERVER_LIBS)
+ 
+ # Needs to be built before any files are compiled when using Sun compilers
+ # so in*/out* inline definitions are properly processed.
--- a.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



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