ports/79039: [PATCH] sysutils/dmidecode: fix build for FreeBSD 4.x
Tod McQuillin
devin at spamcop.net
Sun Mar 20 05:00:14 UTC 2005
>Number: 79039
>Category: ports
>Synopsis: [PATCH] sysutils/dmidecode: fix build for FreeBSD 4.x
>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: Sun Mar 20 05:00:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Tod McQuillin
>Release: FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD plexi.pun-pun.prv 4.11-STABLE FreeBSD 4.11-STABLE #0: Wed Feb 2 22:25:08 JST
>Description:
1) add USE_GETOPT_LONG so that it will build on 4.x
2) arrange for proper CPPFLAGS and LDFLAGS to be used for above
3) make it respect PREFIX (before it would install in /usr/local
unconditionally)
4) make it respect CC
Added file(s):
- files/patch-Makefile
Port maintainer (anders at FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- dmidecode-2.6.patch begins here ---
Index: Makefile
===================================================================
RCS file: /usr/src/cvs-repo/ports/sysutils/dmidecode/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- Makefile 16 Mar 2005 20:46:20 -0000 1.5
+++ Makefile 20 Mar 2005 04:43:14 -0000
@@ -19,14 +19,13 @@
USE_BZIP2= yes
USE_REINPLACE= yes
+USE_GETOPT_LONG=yes
+MAKE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
DOCS= AUTHORS CHANGELOG README
MAN8= biosdecode.8 dmidecode.8 ownership.8 vpddecode.8
-post-patch:
- ${REINPLACE_CMD} -e "s@^(CC|PREFIX).*@@" ${WRKSRC}/Makefile
-
.if !defined(NOPORTDOCS)
post-install:
${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
Index: files/patch-Makefile
===================================================================
RCS file: files/patch-Makefile
diff -N files/patch-Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-Makefile 20 Mar 2005 04:49:20 -0000
@@ -0,0 +1,27 @@
+--- Makefile- Sun Mar 20 13:48:58 2005
++++ Makefile Sun Mar 20 13:49:09 2005
+@@ -8,9 +8,9 @@
+ # Licensed under the GNU Public License.
+ #
+
+-CC = gcc
++CC ?= gcc
+ CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
+- -Wcast-align -Wwrite-strings -Wmissing-prototypes
++ -Wcast-align -Wwrite-strings -Wmissing-prototypes ${CPPFLAGS}
+ #CFLAGS += -DBIGENDIAN
+ #CFLAGS += -DALIGNMENT_WORKAROUND
+
+@@ -19,10 +19,10 @@
+ #CFLAGS += -g
+
+ # Pass linker flags here
+-LDFLAGS =
++LDFLAGS ?=
+
+ DESTDIR =
+-prefix = /usr/local
++prefix = ${PREFIX}
+ sbindir = $(prefix)/sbin
+ mandir = $(prefix)/man
+ man8dir = $(mandir)/man8
--- dmidecode-2.6.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list