ports/76869: [MAINTAINER] graphics/ocrad: Unbreak for 4.x
Ulrich Spoerlein
q at uni.de
Sun Jan 30 20:00:36 UTC 2005
>Number: 76869
>Category: ports
>Synopsis: [MAINTAINER] graphics/ocrad: Unbreak for 4.x
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 30 20:00:34 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Ulrich Spoerlein
>Release: FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD roadrunner 5.3-STABLE FreeBSD 5.3-STABLE #9: Thu Dec 16 18:33:14 CET 2004
>Description:
Unbreak the build on pointyhat: Including getopt.h clashes with unistd.h
In file included from main.cc:31:
/usr/local/include/getopt.h:115: error: declaration of C function `int getopt()' conflicts with
/usr/include/unistd.h:112: error: previous declaration `int getopt(int, char* const*, const char*)' here
Define HAVE_DECL_GETOPT to make this work. I wonder how any port can use
getopt.h on 4.x without that define.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- ocrad-0.10.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/ocrad/Makefile,v
retrieving revision 1.5
diff -u -u -r1.5 Makefile
--- Makefile 26 Jan 2005 05:42:46 -0000 1.5
+++ Makefile 30 Jan 2005 19:51:26 -0000
@@ -2,7 +2,7 @@
# Date created: 12.11.2003
# Whom: Ulrich Spoerlein <q at uni.de>
#
-# $FreeBSD: ports/graphics/ocrad/Makefile,v 1.5 2005/01/26 05:42:46 kevlo Exp $
+# $FreeBSD: ports/graphics/ocrad/Makefile,v 1.4 2004/03/01 19:20:34 krion Exp $
#
PORTNAME= ocrad
@@ -16,12 +16,21 @@
USE_BZIP2= yes
HAS_CONFIGURE= yes
+USE_GMAKE= yes
USE_GETOPT_LONG= yes
-USE_GCC= 3.4
CONFIGURE_ARGS= --prefix=${PREFIX}
MAKE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
- CXX=${CXX}
+ CXX="${CXX}"
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500035
+USE_GCC= 3.4
+.endif
+.if ${OSVERSION} < 500041
+MAKE_ENV+= CPPFLAGS="${CPPFLAGS} -DHAVE_DECL_GETOPT"
+.endif
DOCS= AUTHORS ChangeLog NEWS README TODO
INFO= ocrad
@@ -36,4 +45,4 @@
@install-info ${PREFIX}/info/ocrad.info ${PREFIX}/info/dir
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
--- ocrad-0.10.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list