aboutsummaryrefslogtreecommitdiff
path: root/databases/xapian-core
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-11-21 21:26:58 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2016-11-21 21:26:58 +0000
commit3dae42992f7afdcf9c580a37eef065b869c9bb75 (patch)
treeb102cff286e508ba15bb254f31cd0269f25f2d65 /databases/xapian-core
parenta35c3a7d46948abae6254c293afc58c8da6a2b17 (diff)
downloadports-3dae42992f7afdcf9c580a37eef065b869c9bb75.tar.gz
ports-3dae42992f7afdcf9c580a37eef065b869c9bb75.zip
Unbreak the build on FreeBSD 9 after r426647.
SOCK_CLOEXEC was introduced in FreeBSD 10, so define it to 0 on FreeBSD 9 (the code already handles this case). Xapian 1.4 has a safesyssocket.h that does the same thing. PR: 214699 Approved by: portmgr (antoine)
Notes
Notes: svn path=/head/; revision=426759
Diffstat (limited to 'databases/xapian-core')
-rw-r--r--databases/xapian-core/Makefile9
-rw-r--r--databases/xapian-core/files/extrapatch-backends_flint__lock.cc16
2 files changed, 24 insertions, 1 deletions
diff --git a/databases/xapian-core/Makefile b/databases/xapian-core/Makefile
index a94151f450d3..e6686f90b49d 100644
--- a/databases/xapian-core/Makefile
+++ b/databases/xapian-core/Makefile
@@ -28,9 +28,16 @@ PORTDOCS= *
SSE2_CONFIGURE_ENABLE= sse
+.include <bsd.port.pre.mk>
+
+# FreeBSD 9 does not have SOCK_CLOEXEC.
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000
+EXTRA_PATCHES= ${FILESDIR}/extrapatch-backends_flint__lock.cc
+.endif
+
post-install:
.for file in copydatabase delve quest
${INSTALL_PROGRAM} ${WRKSRC}/examples/.libs/${file} ${STAGEDIR}${PREFIX}/bin/xapian-${file}
.endfor
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/databases/xapian-core/files/extrapatch-backends_flint__lock.cc b/databases/xapian-core/files/extrapatch-backends_flint__lock.cc
new file mode 100644
index 000000000000..5fe3505080e8
--- /dev/null
+++ b/databases/xapian-core/files/extrapatch-backends_flint__lock.cc
@@ -0,0 +1,16 @@
+FreeBSD 9 does not have SOCK_CLOEXEC. Define it to 0, as the code already deals
+with it.
+Xapian 1.4 has a safesyssocket.h that takes care of this.
+--- backends/flint_lock.cc.orig 2016-09-16 01:59:15 UTC
++++ backends/flint_lock.cc
+@@ -59,6 +59,10 @@ using namespace std;
+ # endif
+ #endif
+
++#ifndef SOCK_CLOEXEC
++#define SOCK_CLOEXEC 0
++#endif
++
+ FlintLock::reason
+ FlintLock::lock(bool exclusive, string & explanation) {
+ // Currently we only support exclusive locks.