Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Aug 2013 06:40:14 GMT
From:      Anton Afanasyev <aasoft@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181198: devel/ncurses-devel does not build because of an inconsistency of patch and the patch files
Message-ID:  <201308100640.r7A6eEBt083256@oldred.freebsd.org>
Resent-Message-ID: <201308100650.r7A6o0d0012012@freefall.freebsd.org>

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

>Number:         181198
>Category:       ports
>Synopsis:       devel/ncurses-devel does not build because of an inconsistency of patch and the patch files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Aug 10 06:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Anton Afanasyev
>Release:        9.2-BETA2 x64
>Organization:
>Environment:
FreeBSD MACHINENAME 9.2-BETA2 FreeBSD 9.2-BETA2 #0 r253720: Sat Jul 27 16:50:40 PDT 2013     root@worldmaker:/usr/obj/usr/src/sys/KERNNAME  amd64
>Description:
File "test/background.c" #includes "color_name.h", which is located in the parent directory of the directory "test" (can be seen by running make build in the port directory, and then browsing the work directory).
It should actually be in the "test" directory, as per the patch file that added it (ncurses-5.9-20110423).
>How-To-Repeat:
This started happening since PR 180821, which was in turn an attempt at fixing the switch to the BSD-licensed patch (as per its description).
I have not tried this on any other releases of FreeBSD.

>Fix:
A quick analysis shows that the BSD-licensed patch also strips path segments of added files, resulting in files being added in wrong directories. For example, the "ncurses-5.9-20110423" patch adds a "./test/color_name.h" file (clearly to the "test" directory). But the new patch places it into the parent of "test", resulting in the build problem described.

It sounds like either a fix for BSD patch is needed, or this port should be patched to have "test/background.c" include "../color_name.h" instead of "color_name.h". I've attached the patch for the latter, but it feels like a crutch to me, hence the suggesion to fix the BSD patch.


Patch attached with submission follows:

--- test/background.c.orig
+++ test/background.c
@@ -31,7 +31,7 @@
 
 #define NEED_COLOR_CODE 1
 #define NEED_COLOR_NAME 1
-#include <color_name.h>
+#include <../color_name.h>
 
 static int default_bg = COLOR_BLACK;
 static int default_fg = COLOR_WHITE;


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



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