ports/158100: [PATCH] fix sysutils/afio to compile using clang
Niclas Zeising
niclas.zeising at gmail.com
Tue Jun 21 10:00:20 UTC 2011
>Number: 158100
>Category: ports
>Synopsis: [PATCH] fix sysutils/afio to compile using 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: Tue Jun 21 10:00:19 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Niclas Zeising
>Release: FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD vincent.daemonic.se 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Wed Apr 20 17:22:47 CEST 2011 root at vincent.daemonic.se:/usr/obj/usr/src/sys/VINCENT amd64
>Description:
sysutils/afio doesn't build with clang, it hardcodes ${CC} as cc.
>How-To-Repeat:
>Fix:
Attached patch fixes so that ${CC} isn't hardcoded any more.
--- sysutils.afio.clangfix.diff begins here ---
Index: files/patch-aa
===================================================================
RCS file: /home/ncvs/ports/sysutils/afio/files/patch-aa,v
retrieving revision 1.4
diff -u -d -r1.4 patch-aa
--- files/patch-aa 22 Jan 2006 11:14:57 -0000 1.4
+++ files/patch-aa 21 Jun 2011 09:56:09 -0000
@@ -1,9 +1,7 @@
-*** Makefile.orig Sun Dec 21 05:23:51 2003
---- Makefile Sat Jan 21 17:34:53 2006
+*** Makefile.orig Sun Dec 21 11:23:51 2003
+--- Makefile Tue Jun 21 11:49:29 2011
***************
-*** 26,56 ****
- #b = -UUNIXPC
- ## Define HAVEMEMCMP if you have memcmp otherwise assumes bcmp
+*** 28,34 ****
c = -DHAVEMEMCMP
## Define DEFFMTCMD to being how to format the media you use the most
## This is the DEFault FoRMat CoManD.
@@ -11,31 +9,7 @@
## Define LONGZFILE if you want .Z to be tagged on the end of a 14 char
## file name (or longer for BSD) in the archive when the file is compressed
#e = -DLONGZFILE
-
- ## Define HAVE_LCHOWN is the system has an lchown call (like chown but does
- ## not follow symlinks)
- e2 = -DHAVE_LCHOWN
-
- ## Define PRG_COMPRESS to get something other than `gzip'.
- # you need to edit compfile.c (-G option) if you change this line.
-! f = -DPRG_COMPRESS='"gzip"'
-
- ## Define HAVEFNMATCH if you want to use the gnu fnmatch() routine for
- # -y -Y -w -W matching.
- # If it is not defined, a primitive replacement match routine is used that
- # only supports patterns of the form "cccc" and "cccc*". Make sure that
- # you change the manual page in this case.
-
- g = -DHAVEFNMATCH
-
- # fnmatch() is in the gnu C library, so it is directly available on
- # Linux. If your system (e.g. SCO) does not have the gnu C library,
- # unpack the archive gnu.fnmatch.tar.gz and uncomment the following
- # two lines:
-
---- 26,61 ----
- #b = -UUNIXPC
- ## Define HAVEMEMCMP if you have memcmp otherwise assumes bcmp
+--- 28,34 ----
c = -DHAVEMEMCMP
## Define DEFFMTCMD to being how to format the media you use the most
## This is the DEFault FoRMat CoManD.
@@ -43,10 +17,16 @@
## Define LONGZFILE if you want .Z to be tagged on the end of a 14 char
## file name (or longer for BSD) in the archive when the file is compressed
#e = -DLONGZFILE
+***************
+*** 39,45 ****
- ## Define HAVE_LCHOWN is the system has an lchown call (like chown but does
- ## not follow symlinks)
- e2 = -DHAVE_LCHOWN
+ ## Define PRG_COMPRESS to get something other than `gzip'.
+ # you need to edit compfile.c (-G option) if you change this line.
+! f = -DPRG_COMPRESS='"gzip"'
+
+ ## Define HAVEFNMATCH if you want to use the gnu fnmatch() routine for
+ # -y -Y -w -W matching.
+--- 39,45 ----
## Define PRG_COMPRESS to get something other than `gzip'.
# you need to edit compfile.c (-G option) if you change this line.
@@ -54,9 +34,9 @@
## Define HAVEFNMATCH if you want to use the gnu fnmatch() routine for
# -y -Y -w -W matching.
- # If it is not defined, a primitive replacement match routine is used that
- # only supports patterns of the form "cccc" and "cccc*". Make sure that
- # you change the manual page in this case.
+***************
+*** 49,54 ****
+--- 49,59 ----
g = -DHAVEFNMATCH
@@ -68,12 +48,8 @@
# fnmatch() is in the gnu C library, so it is directly available on
# Linux. If your system (e.g. SCO) does not have the gnu C library,
# unpack the archive gnu.fnmatch.tar.gz and uncomment the following
- # two lines:
-
***************
-*** 69,83 ****
-
- # even more warnings flags..
+*** 71,81 ****
MW=
#MW=-Wtraditional -Wcast-qual -Wcast-align -Wconversion -pedantic -Wlong-long -Wimplicit -Wuninitialized -W -Wshadow -Wsign-compare -Wstrict-prototypes -Wmissing-declarations
@@ -85,11 +61,7 @@
LDFLAGS =
afio : afio.o compfile.o exten.o match.o $M
- ${CC} ${LDFLAGS} afio.o compfile.o exten.o match.o $M -o afio
-
---- 74,91 ----
-
- # even more warnings flags..
+--- 76,88 ----
MW=
#MW=-Wtraditional -Wcast-qual -Wcast-align -Wconversion -pedantic -Wlong-long -Wimplicit -Wuninitialized -W -Wshadow -Wsign-compare -Wstrict-prototypes -Wmissing-declarations
@@ -97,19 +69,14 @@
! CFLAGS1 = -fomit-frame-pointer -fno-strength-reduce
! #CC=gcc
-! CC=cc
! #CFLAGS = ${CFLAGS1} $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e ${e2} $f $g $I
! CFLAGS += ${CFLAGS1} $1 $2 $3 $4 $5 $6 $7 $8 $9 $a $b $c $d $e $f $g $h $I
LDFLAGS =
afio : afio.o compfile.o exten.o match.o $M
- ${CC} ${LDFLAGS} afio.o compfile.o exten.o match.o $M -o afio
-
***************
-*** 86,97 ****
- rm -f regtest/cmpstat regtest/makesparse
- rm -f regtest/statsize regtest/statsize64
+*** 88,95 ****
cd regtest; /bin/sh regtest.clean
install: afio
@@ -118,11 +85,7 @@
# generate default list of -E extensions from manpage
# note: on sun, I had to change awk command below to nawk or gawk
- # to get it to work.
- exten_default.h : afio.1
---- 94,106 ----
- rm -f regtest/cmpstat regtest/makesparse
- rm -f regtest/statsize regtest/statsize64
+--- 95,103 ----
cd regtest; /bin/sh regtest.clean
install: afio
@@ -132,5 +95,3 @@
# generate default list of -E extensions from manpage
# note: on sun, I had to change awk command below to nawk or gawk
- # to get it to work.
- exten_default.h : afio.1
--- sysutils.afio.clangfix.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list