ports/158074: [patch] print/psutils-letter fix build for CC=clang

Klaus Aehlig aehlig at linta.de
Mon Jun 20 18:50:08 UTC 2011


>Number:         158074
>Category:       ports
>Synopsis:       [patch] print/psutils-letter fix build for CC=clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 20 18:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Klaus Aehlig
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
>Environment:
System: FreeBSD kta1c10.sesnet.soton.ac.uk 8.2-STABLE FreeBSD 8.2-STABLE #2: Sat May 28 19:30:07 BST 2011 root at kta1c10.sesnet.soton.ac.uk:/usr/obj/usr/src/sys/KTA1C10 amd64

>Description:
	the build of print/psutils-letter fails in the CC=clang exp run, see
	http://pointyhat.FreeBSD.org/errorlogs/amd64-errorlogs/e.9-exp.20110616185105/psutils-letter-1.17_2.log

	The reason is that CC was not honored; additionally, the program contains a couple
	of 'void main' routines (which clang correctly complains about).

>How-To-Repeat:
	
>Fix:

	Apply the following patch

--- psutil-letter.patch begins here ---
diff -ruN psutils-letter.orig/Makefile psutils-letter/Makefile
--- psutils-letter.orig/Makefile	2011-06-20 18:56:51.000000000 +0100
+++ psutils-letter/Makefile	2011-06-20 19:26:53.000000000 +0100
@@ -18,7 +18,7 @@
 
 USE_PERL5=	yes
 WRKSRC=		${WRKDIR}/psutils
-MAKE_FLAGS?=	PAPER=${PAPERSIZE} -f
+MAKE_FLAGS?=	PAPER=${PAPERSIZE} CC="${CC}" -f
 MAN1=		psbook.1 psselect.1 pstops.1 epsffit.1 psnup.1 psresize.1 \
 		getafm.1 fixdlsrps.1 fixfmps.1 fixmacps.1 fixpsditps.1 \
 		fixpspps.1 fixtpps.1 fixwfwps.1 fixwpps.1 fixwwps.1 \
diff -ruN psutils-letter.orig/files/patch-epsffit.c psutils-letter/files/patch-epsffit.c
--- psutils-letter.orig/files/patch-epsffit.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-epsffit.c	2011-06-20 19:32:22.000000000 +0100
@@ -0,0 +1,11 @@
+--- epsffit.c.orig	2011-06-20 19:31:37.000000000 +0100
++++ epsffit.c	2011-06-20 19:31:48.000000000 +0100
+@@ -39,7 +39,7 @@
+    exit(1);
+ }
+ 
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+    int bbfound = 0;              /* %%BoundingBox: found */
+    int urx, ury, llx, lly;
diff -ruN psutils-letter.orig/files/patch-psbook.c psutils-letter/files/patch-psbook.c
--- psutils-letter.orig/files/patch-psbook.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-psbook.c	2011-06-20 19:28:47.000000000 +0100
@@ -0,0 +1,11 @@
+--- psbook.c.orig	2011-06-20 19:27:55.000000000 +0100
++++ psbook.c	2011-06-20 19:28:08.000000000 +0100
+@@ -32,7 +32,7 @@
+ }
+ 
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    int signature = 0;
+    int currentpg, maxpage;
diff -ruN psutils-letter.orig/files/patch-psnup.c psutils-letter/files/patch-psnup.c
--- psutils-letter.orig/files/patch-psnup.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-psnup.c	2011-06-20 19:33:06.000000000 +0100
@@ -0,0 +1,11 @@
+--- psnup.c.orig	2011-06-20 19:32:37.000000000 +0100
++++ psnup.c	2011-06-20 19:32:47.000000000 +0100
+@@ -66,7 +66,7 @@
+    return (0);
+ }
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    int horiz, vert, rotate, column, flip, leftright, topbottom;
+    int nup = 1;
diff -ruN psutils-letter.orig/files/patch-psreseize.c psutils-letter/files/patch-psreseize.c
--- psutils-letter.orig/files/patch-psreseize.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-psreseize.c	2011-06-20 19:33:57.000000000 +0100
@@ -0,0 +1,11 @@
+--- psresize.c.orig	2011-06-20 19:33:21.000000000 +0100
++++ psresize.c	2011-06-20 19:33:37.000000000 +0100
+@@ -46,7 +46,7 @@
+ #define MIN(x,y) ((x) > (y) ? (y) : (x))
+ #define MAX(x,y) ((x) > (y) ? (x) : (y))
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    double scale, rscale;			/* page scale */
+    double waste, rwaste;			/* amount wasted */
diff -ruN psutils-letter.orig/files/patch-psselct.c psutils-letter/files/patch-psselct.c
--- psutils-letter.orig/files/patch-psselct.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-psselct.c	2011-06-20 19:29:50.000000000 +0100
@@ -0,0 +1,11 @@
+--- psselect.c.orig	2011-06-20 19:29:14.000000000 +0100
++++ psselect.c	2011-06-20 19:29:30.000000000 +0100
+@@ -91,7 +91,7 @@
+ }
+ 
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    int currentpg, maxpage = 0;
+    int even = 0, odd = 0, reverse = 0;
diff -ruN psutils-letter.orig/files/patch-pstops.c psutils-letter/files/patch-pstops.c
--- psutils-letter.orig/files/patch-pstops.c	1970-01-01 01:00:00.000000000 +0100
+++ psutils-letter/files/patch-pstops.c	2011-06-20 19:30:53.000000000 +0100
@@ -0,0 +1,11 @@
+--- pstops.c.orig	2011-06-20 19:30:07.000000000 +0100
++++ pstops.c	2011-06-20 19:30:21.000000000 +0100
+@@ -112,7 +112,7 @@
+    return (head);
+ }
+ 
+-void main(int argc, char *argv[])
++int main(int argc, char *argv[])
+ {
+    PageSpec *specs = NULL;
+    int nobinding = 0;
--- psutil-letter.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list