Bug 178292 - building print/c2ps fails with CFLAGS in /etc/make.conf
Summary: building print/c2ps fails with CFLAGS in /etc/make.conf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 07:30 UTC by TsurutaniNaoki
Modified: 2013-05-02 08:20 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (1.11 KB, patch)
2013-05-02 07:30 UTC, TsurutaniNaoki
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TsurutaniNaoki 2013-05-02 07:30:00 UTC
	building print/c2ps fails with CFLAGS in /etc/make.conf.

Fix: CFLAGS set in /etc/make.conf is ignored while building c2ps.
	Here is a patch:
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.
	%
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-02 07:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hrs

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Hiroki Sato freebsd_committer freebsd_triage 2013-05-02 08:12:21 UTC
State Changed
From-To: open->closed

Should be fixed now.  Thank you for your report!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-05-02 08:12:25 UTC
Author: hrs
Date: Thu May  2 07:12:12 2013
New Revision: 317079
URL: http://svnweb.freebsd.org/changeset/ports/317079

Log:
  Fix a build breakage when CFLAGS is defined in make.conf.
  
  PR:	ports/178292

Modified:
  head/print/c2ps/Makefile
  head/print/c2ps/files/patch-Makefile

Modified: head/print/c2ps/Makefile
==============================================================================
--- head/print/c2ps/Makefile	Thu May  2 07:09:17 2013	(r317078)
+++ head/print/c2ps/Makefile	Thu May  2 07:12:12 2013	(r317079)
@@ -13,7 +13,7 @@ COMMENT=	A PostScript pretty-printer for
 
 LIB_DEPENDS=	paper:${PORTSDIR}/print/libpaper
 
-CFLAGS+=	-I${LOCALBASE}/include
+MAKE_ENV=	CCFLAGS="${CFLAGS} -I${LOCALBASE}/include"
 MAN1=		c2ps.1
 PLIST_FILES=	bin/c2ps
 

Modified: head/print/c2ps/files/patch-Makefile
==============================================================================
--- head/print/c2ps/files/patch-Makefile	Thu May  2 07:09:17 2013	(r317078)
+++ head/print/c2ps/files/patch-Makefile	Thu May  2 07:12:12 2013	(r317079)
@@ -1,5 +1,5 @@
 --- Makefile.orig	1997-05-16 00:50:56.000000000 +0900
-+++ Makefile	2013-04-27 18:57:47.000000000 +0900
++++ Makefile	2013-05-02 15:48:59.000000000 +0900
 @@ -2,12 +2,12 @@
  # Last modified: Sat Apr 19 1997
  
@@ -39,7 +39,7 @@
  
  compile:	c2ps.c
 -	$(CC) $(PREP_OPTIONS) $(CCFLAGS) -o c2ps c2ps.c
-+	$(CC) $(PREP_OPTIONS) $(CFLAGS) -o c2ps c2ps.c -L${LOCALBASE}/lib -lm -lpaper
++	$(CC) $(PREP_OPTIONS) $(CCFLAGS) -o c2ps c2ps.c -L${LOCALBASE}/lib -lm -lpaper
  
  clean:
  	$(RM) c2ps *.o core *~
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"