Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2013 15:06:20 +0900 (JST)
From:      Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        turutani@scphys.kyoto-u.ac.jp
Subject:   ports/178292: building print/c2ps fails with CFLAGS in /etc/make.conf
Message-ID:  <201305020606.r4266KrF085570@h120.65.226.10.32118.vlan.kuins.net>
Resent-Message-ID: <201305020630.r426U0VV035165@freefall.freebsd.org>

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

>Number:         178292
>Category:       ports
>Synopsis:       building print/c2ps fails with CFLAGS in /etc/make.conf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 02 06:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tsurutani Naoki
>Release:        FreeBSD 8.4-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD h120.65.226.10.32118.vlan.kuins.net 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #26 r249149: Fri Apr 5 22:13:25 JST 2013 turutani@h120.65.226.10.32118.vlan.kuins.net:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386


	
>Description:
	building print/c2ps fails with CFLAGS in /etc/make.conf.
	
>How-To-Repeat:
	% egrep "^CFLAGS" /etc/make.conf
	CFLAGS= -O -pipe
	% cd /usr/ports/print/c2ps
	% make
	...
	===>  Configuring for c2ps-4.0_3
	===>  Building for c2ps-4.0_3
	cc -DDEFAULT=\"Courier\" -DCOMMENT=\"Helvetica-Oblique\" -DSTRINGS=\"Courier-Oblique\" -DPREPROC=\"Courier-BoldOblique\" -DKEYWORD=\"Courier-Bold\" -DTYPE=\"Courier-Bold\" -DLNUMBER=\"Times-Roman\" -DFUNCTION=\"Bookman-LightItalic\" -DDIM=0.75 -O -pipe -o c2ps c2ps.c -L/usr/local/lib -lm -lpaper
	c2ps.c:1825:19: error: paper.h: No such file or directory
	*** Error code 1
	
	Stop in /usr/local/work/usr/ports/print/c2ps/work/c2ps-4.0.
	*** Error code 1
	
	Stop in /usr/ports/print/c2ps.
	*** Error code 1
	
	Stop in /usr/ports/print/c2ps.
	%
	
>Fix:
	CFLAGS set in /etc/make.conf is ignored while building c2ps.
	Here is a patch:

--- Makefile.orig	2013-04-28 02:52:39.000000000 +0900
+++ Makefile	2013-05-02 14:54:58.000000000 +0900
@@ -13,7 +13,6 @@
 
 LIB_DEPENDS=	paper:${PORTSDIR}/print/libpaper
 
-CFLAGS+=	-I${LOCALBASE}/include
 MAN1=		c2ps.1
 PLIST_FILES=	bin/c2ps
 
--- files/patch-Makefile.orig	2013-04-28 01:00:26.000000000 +0900
+++ files/patch-Makefile	2013-05-02 14:42:47.000000000 +0900
@@ -1,23 +1,24 @@
 --- Makefile.orig	1997-05-16 00:50:56.000000000 +0900
 +++ Makefile	2013-04-27 18:57:47.000000000 +0900
-@@ -2,12 +2,12 @@
+@@ -2,12 +2,13 @@
  # Last modified: Sat Apr 19 1997
  
  RM	= 	rm -f
 -CC	=	gcc
 -CCFLAGS =       -O
 +CC?	=	gcc
-+CCFLAGS?=       -O
++CFLAGS?=       -O
  
 -PREFIX	=	/usr/local
-+PREFIX?=	/usr/local
++PREFIX =	${LOCALBASE}
  BIN	=	$(PREFIX)/bin
 -MAN	=	$(PREFIX)/man/man1
 +MAN	=	${MAN1PREFIX}/man/man1
++CFLAGS+=	-I${PREFIX}/include
  
  # you may predefine some of the default settings
  DEFAULT_FONT	= \"Courier\"
-@@ -31,23 +31,20 @@
+@@ -31,23 +32,20 @@
   -DSTRINGS=$(STRINGS_FONT) -DPREPROC=$(PREPROC_FONT)\
   -DKEYWORD=$(KEYWORD_FONT) -DTYPE=$(TYPE_FONT)\
   -DLNUMBER=$(LNUMBER_FONT) -DFUNCTION=$(FUNCTION_FONT)\
	


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



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