summaryrefslogtreecommitdiff
path: root/net/ORBit
diff options
context:
space:
mode:
authorschwarz <schwarz@pkgsrc.org>2006-05-01 00:19:45 +0000
committerschwarz <schwarz@pkgsrc.org>2006-05-01 00:19:45 +0000
commitcae053f8fb945c1bba2db7d31737631c2360fbbd (patch)
tree2168a633af9a8ffd97854d3187804a215f46726c /net/ORBit
parent4a59ee2b78424927a176cc1f3d93abf6fade1d79 (diff)
downloadpkgsrc-cae053f8fb945c1bba2db7d31737631c2360fbbd.tar.gz
added a hack that makes sure that configure does not define socklen_t if
it has already been typedef'd in pthread.h. This addresses the issue reported in pkg/27009 (closing that PR).
Diffstat (limited to 'net/ORBit')
-rw-r--r--net/ORBit/hacks.mk24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/ORBit/hacks.mk b/net/ORBit/hacks.mk
new file mode 100644
index 00000000000..b54ef4ea558
--- /dev/null
+++ b/net/ORBit/hacks.mk
@@ -0,0 +1,24 @@
+# $NetBSD: hacks.mk,v 1.1 2006/05/01 00:19:45 schwarz Exp $
+
+.if !defined(ORBIT_HACKS_MK)
+ORBIT_HACKS_MK= # defined
+
+### [Sun Apr 30 22:45:25 CDT 2006 : schwarz]
+### Make sure ORBit does not define socklen_t if it has already been
+### typedef'd in devel/pth's pthread.h.
+### This works around the problem reported in pkg/27009.
+###
+.if exists(${LOCALBASE}/include/pthread.h)
+_SOCKLEN_T_TYPEDEFD!= ${GREP} -c '^typedef\ .*\ socklen_t;' ${LOCALBASE}/include/pthread.h || ${TRUE}
+.if ${_SOCKLEN_T_TYPEDEFD} == "1"
+PKG_HACKS+= socklen_t-already-typedefd-in-pthread.h
+SUBST_CLASSES+= socklen_t
+SUBST_FILES.socklen_t= configure
+SUBST_STAGE.socklen_t= post-patch
+SUBST_SED.socklen_t= -e 's/^\#define\ socklen_t\ size_t//'
+# remark: \ before # needed to prevent make from interpreting
+# remainder of line as a comment
+.endif
+.endif
+
+.endif