ports/165799: utmpx fix for japanese/emacs-emcws

NAKAJI Hiroyuki nakaji at jp.freebsd.org
Wed Mar 7 01:30:13 UTC 2012


>Number:         165799
>Category:       ports
>Synopsis:       utmpx fix for japanese/emacs-emcws
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 07 01:30:12 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     NAKAJI Hiroyuki
>Release:        FreeBSD 9.0-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD jimmy.4407.kankyo-u.ac.jp 9.0-PRERELEASE FreeBSD 9.0-PRERELEASE #83: Fri Feb 24 07:20:46 JST 2012 root at jimmy.4407.kankyo-u.ac.jp:/usr/obj/usr/src/sys/JIMMY amd64


>Description:
If OSVERSION >= 900007, it is broken because of utmpx change. WATANABE
Kazuhiro reported that the same fix in editors/emacs21 can solve this
BROKEN state.

>How-To-Repeat:
cd /usr/ports/japanese/emacs-emcws
make

>Fix:

Apply following patch, "patch -p1 -d /usr/ports/japanese/emacs-emcws"

diff -urN -x work /usr/ports/japanese/emacs-emcws/Makefile ./Makefile
--- /usr/ports/japanese/emacs-emcws/Makefile	2011-09-25 08:19:01.000000000 +0900
+++ ./Makefile	2012-03-07 10:14:29.000000000 +0900
@@ -7,7 +7,7 @@
 
 PORTNAME=	emcws
 PORTVERSION=	${EMACS_VER}
-PORTREVISION=	15
+PORTREVISION=	16
 CATEGORIES=	japanese editors ipv6
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	emacs
@@ -146,18 +146,8 @@
 SCRIPTS_ENV=	SED=${SED} MV=${MV} \
 		DOC_FILE=${DOC_FILE}
 
-.if exists(${PREFIX}/bin/emacs-${EMACS_VER})
-EMACS_BASE=${PREFIX}
-.else
-EMACS_BASE=${LOCALBASE}
-.endif
-
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 900007
-BROKEN=		does not build
-.endif
-
 .if ${ARCH} == "ia64"
 BROKEN=		Segfault during build on ia64
 CFLAGS:=	${CFLAGS:C/-O.?/-O0/g}
@@ -175,7 +165,7 @@
 	${FIND} ${WRKSRC} \( -name \*.orig -o -name \*~ \) -exec ${RM} -f \{} \;
 	${RM} -rf ${WRKSRC}/info/*
 	@(cd ${WRKSRC}/src/../lisp; \
-	${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} compile-files EMACS=${EMACS_BASE}/bin/emacs-${EMACS_VER})
+	${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} compile-files EMACS=${EMACS_CMD})
 	@(cd ${WRKSRC}/src; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} emacs)
 	@(cd ${WRKSRC}/src/../lisp; \
 	${WRKSRC}/src/emacs -batch -q -f batch-byte-compile \
diff -urN -x work /usr/ports/japanese/emacs-emcws/files/patch-src:filelock.c ./files/patch-src:filelock.c
--- /usr/ports/japanese/emacs-emcws/files/patch-src:filelock.c	1970-01-01 09:00:00.000000000 +0900
+++ ./files/patch-src:filelock.c	2010-11-04 11:16:08.000000000 +0900
@@ -0,0 +1,28 @@
+--- src/filelock.c.orig	2010-11-04 11:03:51.000000000 +0900
++++ src/filelock.c	2010-11-04 11:15:59.000000000 +0900
+@@ -65,7 +65,13 @@
+ 
+ #ifdef CLASH_DETECTION
+ 
++#if __FreeBSD_version >= 900007
++#include <utmpx.h>
++#undef BOOT_TIME
++#define ut_time ut_tv.tv_sec
++#else
+ #include <utmp.h>
++#endif
+ 
+ /* A file whose last-modified time is just after the most recent boot.
+    Define this to be NULL to disable checking for this file.  */
+@@ -256,7 +262,11 @@
+      char *filename;
+      int newest;
+ {
++#if __FreeBSD_version >= 900007
++  struct utmpx ut, *utp;
++#else
+   struct utmp ut, *utp;
++#endif
+   int desc;
+ 
+   if (filename)



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list