From A.J.Caines@halplant.com  Sat Jun  5 18:45:21 2004
Return-Path: <A.J.Caines@halplant.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id E5FFD16A4CE; Sat,  5 Jun 2004 18:45:20 -0700 (PDT)
Received: from lakermmtao01.cox.net (lakermmtao01.cox.net [68.230.240.38])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id 2DEF743D45; Sat,  5 Jun 2004 18:45:20 -0700 (PDT)
	(envelope-from A.J.Caines@halplant.com)
Received: from mail.halplant.com ([68.100.60.90]) by lakermmtao01.cox.net
          (InterMail vM.6.01.03.02 201-2131-111-104-20040324) with ESMTP
          id <20040606014518.ZOJL16976.lakermmtao01.cox.net@mail.halplant.com>;
          Sat, 5 Jun 2004 21:45:18 -0400
Received: by mail.halplant.com (Postfix, from userid 1001)
	id 4DB8154F5; Sat,  5 Jun 2004 21:45:18 -0400 (EDT)
Message-Id: <20040606014518.4DB8154F5@mail.halplant.com>
Date: Sat,  5 Jun 2004 21:45:18 -0400 (EDT)
From: Andrew J.Caines <A.J.Caines@halplant.com>
Reply-To: Andrew J.Caines <A.J.Caines@halplant.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Andrew J.Caines <A.J.Caines@halplant.com>, deischen@freebsd.org,
	ports@freebsd.org
Subject: Non-Maintainer update: editors/nedit - Add BUILD_BROKEN_NEDIT to build with Open Motif 2.2.2 (default)
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         67617
>Category:       ports
>Synopsis:       Non-Maintainer update: editors/nedit - Add BUILD_BROKEN_NEDIT to build with Open Motif 2.2.2 (default)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 05 18:50:19 PDT 2004
>Closed-Date:    Sat Jun 05 22:24:25 PDT 2004
>Last-Modified:  Wed Jun 09 22:22:46 GMT 2004
>Originator:     Andrew J. Caines
>Release:        FreeBSD 4.10-STABLE i386
>Organization:
H.A.L. Plant
>Environment:
System: FreeBSD hal9000.halplant.com 4.10-STABLE FreeBSD 4.10-STABLE #0: Fri Jun 4 08:39:15 EDT 2004 toor@hal9000.halplant.com:/data/obj/data/src/sys/HAL9000 i386


	
>Description:
	Port build fails with default Motif (open-motif-2.2.2_2) because NEdit authors don't want to build against Open Motif 2.2.2:

----8<----
===>  Building for nedit-5.4
(cd util;  make -f Makefile.freebsd verify_config &&  make -f Makefile.freebsd libNUtil.a)
ccache gcc -O2 -pipe -march=pentium -O -I/usr/X11R6/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM -o check_lin_tif check_lin_tif.c
./check_lin_tif
Open Motif or OSF Motif detected.
@(#)Motif Version 2.2.2
ERROR:  Bad Open Motif Version:
        @(#)Motif Version 2.2.2

This version of Open Motif is known to be broken and is
thus unsupported by the NEdit developers.  It will probably
cause NEdit to crash frequently.  Check these pages for a more
detailed description of the problems with this version:
        http://www.motifdeveloper.com/tips/tip22.html
        http://www.motifdeveloper.com/tips/Motif22Review.pdf

NEdit is known to work with LessTif versions:
        0.92.32
        0.93.0
        0.93.12
        0.93.18
and is known to be very stable with Open Motif version 2.1.30,
which is freely available from several sources, including:
        http://www.opengroup.org/openmotif/
        http://www.metrolink.com/products/motif/open_motif2-1-30.html
        http://www.ist.co.uk/DOWNLOADS/motif_download.html

Also, unless you need a customized NEdit you should STRONGLY
consider downloading a pre-built binary from http://www.nedit.org,
since these are the most stable versions.

If you really want to build a known-bad version of NEdit you
can override this sanity check by adding -DBUILD_BROKEN_NEDIT
to the CFLAGS variable in your platform's Makefile (e.g.
makefiles/Makefile.linux)
*** Error code 1

Stop in /data/ports/editors/nedit/work/nedit-5.4/util.
*** Error code 1

Stop in /data/ports/editors/nedit/work/nedit-5.4.
*** Error code 1

Stop in /data/ports/editors/nedit.
----8<----
>How-To-Repeat:
	Try to build port
>Fix:

	Add -DBUILD_BROKEN_NEDIT to the nedit FreeBSD Makefile:

----8<----
diff -ruN nedit.orig/files/patch-ac nedit/files/patch-ac
--- nedit.orig/files/patch-ac	Sat Jun  5 21:19:54 2004
+++ nedit/files/patch-ac	Sat Jun  5 21:11:27 2004
@@ -1,5 +1,5 @@
---- makefiles/Makefile.freebsd.orig	Sun Sep 28 15:03:10 2003
-+++ makefiles/Makefile.freebsd	Sat Feb  7 15:00:18 2004
+--- makefiles/Makefile.freebsd.orig	Sun Sep 28 11:03:10 2003
++++ makefiles/Makefile.freebsd	Sat Jun  5 21:10:26 2004
 @@ -1,6 +1,6 @@
  # $Id: Makefile.freebsd,v 1.5.2.1 2003/09/28 15:03:10 edg Exp $
 -CC=cc
@@ -15,7 +15,7 @@
  #
 -CFLAGS=-O -I${PREFIX}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM
 -LIBS= ${MOTIFLIB} -L${PREFIX}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11
-+CFLAGS+=-O -I${X11BASE}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM
++CFLAGS+=-O -I${X11BASE}/include -DUSE_DIRENT -DUSE_LPR_PRINT_CMD -DUSE_XMIM -DBUILD_BROKEN_NEDIT
 +LIBS+= ${MOTIFLIB} -L${X11BASE}/lib -lm -lXpm -lXext -lXt -lSM -lICE -lX11
  
  include Makefile.common


----8<----

Note that I've modified patch-ac which already changes the nedit FreeBSD Makefile.

There has been some discussion about the validity of the NEdit authors' position on stability, however I suggest this patch independently of this argument for the simple reason that the port fails to install by default. See the freebsd-ports archive for details.

Adding to audit trail from misfiled PR 67683 (but after this PR
was already closed):

 I just e-mailed the port maintainer the other day with exactly the same
 suggestion, but was met with some resistance.  He stated that the port *does*
 build, if you use CFLAGS+= instead of CFLAGS= in /etc/make.conf.  This is true
 enough, yet the standard make.conf under /usr/share/examples/etc uses CFLAGS=,
 not CFLAGS+=, so I really think people are more likely to have CFLAGS= in their
 own /etc/make.conf, which, of course, breaks the build of nedit.
 
 I suggested that, just to be on the safe side, he go ahead and add
 -DBUILD_BROKEN_NEDIT in the suggested location, i.e., by patching
 ${WORKDIR}/makefiles/Makefile.freebsd, *not* in the port's Makefile, which is
 insufficient in most cases.
 
 This really should be done, I think.
 
 -- 
 Conrad Sabatier <conrads@cox.net> - "In Unix veritas"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: deischen 
State-Changed-When: Sat Jun 5 22:18:21 PDT 2004 
State-Changed-Why:  
CFLAGS+=-DBUILD_BROKEN_NEDIT is set in the Makefile for nedit, but using 
CFLAGS=foo instead of CFLAGS+=foo in /etc/make.conf overrides the CFLAGS 
set by nedit/Makefile. 

I think using CFLAGS+= in a port makefile shouldn't get overridden by 
CFLAGS in /etc/make.conf.  Regardless, the nedit maintainers want users 
to know that they are building against broken Motifs and would rather 
the port not build by default in those cases. 

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