From jbeich@tormail.org  Sat Jul 28 07:23:23 2012
Return-Path: <jbeich@tormail.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 47541106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Jul 2012 07:23:23 +0000 (UTC)
	(envelope-from jbeich@tormail.org)
Received: from server2.allsitecontrol.com (server2.allsitecontrol.com [63.143.36.210])
	by mx1.freebsd.org (Postfix) with ESMTP id C72C48FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 28 Jul 2012 07:23:22 +0000 (UTC)
Received: from tor-exit.podgorny.cz ([87.236.199.73]:54235 helo=internal.tormail.org)
	by server2.allsitecontrol.com with esmtpsa (TLSv1:RC4-SHA:128)
	(Exim 4.77)
	(envelope-from <jbeich@tormail.org>)
	id 1SusfT-002kVC-7l
	for FreeBSD-gnats-submit@freebsd.org; Fri, 27 Jul 2012 18:05:56 -0400
Received: from jbeich by internal.tormail.org with local (Exim 4.63)
	(envelope-from <jbeich@tormail.org>)
	id 1Susdt-0001f4-NR
	for FreeBSD-gnats-submit@freebsd.org; Fri, 27 Jul 2012 22:04:19 +0000
Message-Id: <1Susdt-0001f4-NR@internal.tormail.org>
Date: Fri, 27 Jul 2012 12:04:10 -1000
From: Jan Beich <jbeich@tormail.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [patch] mail/enigmail: unbreak after gecko update

>Number:         170228
>Category:       ports
>Synopsis:       [patch] mail/enigmail: unbreak after gecko update
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 28 07:30:09 UTC 2012
>Closed-Date:    Thu Aug 09 08:33:50 UTC 2012
>Last-Modified:  Thu Aug 09 08:33:50 UTC 2012
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
The unused cruft is a bit over my head:
- version 1.1.2
- non-GECKO_EXTDIR
- non-GECKO
>Description:
After the recent gecko update OBJDIR_BUILD ports are now built from
WRKSRC/obj-CONFIGURE_TARGET instead of WRKSRC. It was done to avoid
certain bugs and make build similar to a client.mk one (e.g. PGO).

Besides, CONFIGURE_TARGET on amd64 was changed to x86_64 to match
upstream builds and reduce the amout of ever-increasing trivial patches.
>How-To-Repeat:
$ make
===>  Building for seamonkey-enigmail-1.4.2
cd /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail && ./makemake -r
INFO: found toplevel source directory /work/a/ports/mail/enigmail-seamonkey/work/comm-release
INFO: no MOZ_OBJDIR used
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/build
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc/build
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc/modules
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc/public
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc/src
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ipc/tests
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/lang
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/package
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/public
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/src
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ui/content
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ui
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ui/skin/classic
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail/ui/skin/tb-mac
Processing: /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail
Done

cd /work/a/ports/mail/enigmail-seamonkey/work/comm-release/mailnews/extensions/enigmail && /usr/bin/env TMPDIR="/tmp" TMPDIR="/tmp" SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local  LOCALBASE=/usr/local  MOTIFLIB="-L/usr/local/lib -lXm -lXp" LIBDIR="/usr/lib"  CC="cc" CFLAGS="-O2 -pipe -fno-strict-aliasing"  CPP="cpp" CPPFLAGS=""  LDFLAGS=""  CXX="c++" CXXFLAGS="-O2 -pipe -fno-strict-aliasing"  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install  -s -o root -g wheel -m 555"  BSD_INSTALL_LIB="install  -s -o root -g wheel -m 444"  BSD_INSTALL_SCRIPT="install  -o root -g wheel -m 555"  BSD_INSTALL_DATA="install  -o root -g wheel -m 444"  BSD_INSTALL_MAN="install  -o root -g wheel -m 444" gmake
Makefile:45: ../../../config/autoconf.mk: No such file or directory
/work/a/ports/mail/enigmail-seamonkey/work/comm-release/config/config.mk:57: ../../../config/autoconf.mk: No such file or directory
gmake: *** No rule to make target `../../../config/autoconf.mk'.  Stop.
*** Error code 2

>Fix:
Use MOZSRC like an objdir. It's closest in meaning, i.e.

  mozilla/dist/bin

is guaranteed exist unlike

  comm-release/mozilla/dist
  comm-release/mailnews/extensions

While here I've sped build with make jobs.

--- moz_objdir.diff begins here ---
Index: mail/enigmail/Makefile
===================================================================
--- mail/enigmail/Makefile	(revision 301624)
+++ mail/enigmail/Makefile	(working copy)
@@ -45,9 +45,12 @@ GECKO_DEPENDS+=	unzip:${PORTSDIR}/archivers/unzip
 .endif
 
 .if defined(GECKO_EXTDIR)
-GECKO_WRKSRC=	${WRKDIR}/../../../${GECKO_PORTDIR}/work/${GECKO_EXTDIR}
+. if !defined(BUILDING_INDEX)
+GECKO_BUILD_WRKSRC!=${MAKE} -V BUILD_WRKSRC -C${PORTSDIR}/${GECKO_PORTDIR}
+GECKO_WRKSRC!=	${MAKE} -V WRKSRC -C${PORTSDIR}/${GECKO_PORTDIR}
+. endif
 WRKSRC=		${WRKDIR}/${GECKO_EXTDIR}
-MOZSRC=		${WRKSRC}/mozilla
+MOZSRC=		${GECKO_BUILD_WRKSRC:S,${GECKO_WRKSRC},${WRKSRC},}/mozilla
 .else
 GECKO_WRKSRC=	${WRKDIR}/../../../${GECKO_PORTDIR}/work/mozilla
 WRKSRC=		${WRKDIR}/mozilla
@@ -58,7 +61,7 @@ USE_GMAKE=	yes
 
 .include <bsd.port.pre.mk>
 
-XPI_FILE=	${MOZSRC}/dist/bin/${DISTNAME}-freebsd-${ARCH}.xpi
+XPI_FILE=	${MOZSRC}/dist/bin/${DISTNAME}-freebsd-${ARCH:S/amd64/x86_64/}.xpi
 XPI_LIBDIR=	${PREFIX}/lib/xpi
 XPI_ORIG_ID=	{847b3a00-7ab1-11d4-8f02-006008948af5}
 XPI_ID=		${GECKO}@mozilla-enigmail.org
@@ -79,6 +82,6 @@ do-extract:
 
 pre-patch:
 	@${REINPLACE_CMD} -e "s|${GECKO_PORTDIR}|${GECKO_PORTDIR:S/www/mail/:S/\//\/enigmail-/}|g" \
-		`${FIND} ${WRKSRC} -name autoconf.mk`
+		`${FIND} ${MOZSRC}/.. -name autoconf.mk`
 
 post-patch:
@@ -95,9 +100,11 @@ do-build:
 	${SETENV} ${MAKE_ENV} ${GMAKE} -C ${MOZSRC}/xpcom/string
 	${SETENV} ${MAKE_ENV} ${GMAKE} -C ${MOZSRC}/xpcom
 .endif
-	cd ${WRKSRC}/mailnews/extensions/enigmail && ./makemake -r
-	cd ${WRKSRC}/mailnews/extensions/enigmail && ${SETENV} ${MAKE_ENV} ${GMAKE}
-	cd ${WRKSRC}/mailnews/extensions/enigmail && ${SETENV} ${MAKE_ENV} ${GMAKE} xpi
+	cd ${WRKSRC}/mailnews/extensions/enigmail && \
+		./makemake -r -o ${MOZSRC}/..
+	cd ${MOZSRC}/../mailnews/extensions/enigmail && \
+		${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS}; \
+		${SETENV} ${MAKE_ENV} ${GMAKE} ${_MAKE_JOBS} xpi
 
 do-install:
 	@${MKDIR} ${XPI_LIBDIR}/${XPI_ID} ${XPI_LIBDIR}/symlinks/${GECKO}
--- moz_objdir.diff ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sat Jul 28 07:30:22 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170228 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Thu Aug 9 08:33:32 UTC 2012 
State-Changed-Why:  
Already fixed in a different way, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170228 
>Unformatted:
