Rescue the build on FreeBSD < 10 with libmissing.

Reported by:	pkg-fallout
This commit is contained in:
Thierry Thomas 2014-10-16 19:44:14 +00:00
parent e6863387ea
commit 95b71a550f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=371018
2 changed files with 20 additions and 2 deletions

View file

@ -22,13 +22,18 @@ USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/${PORTNAME}
.include <bsd.port.options.mk>
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MDOCS}
DISTFILES+= manual.pdf
EXTRACT_ONLY= ${PORTNAME}.${DISTVERSION}${EXTRACT_SUFX}
.endif
.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000034
LIB_DEPENDS+= libmissing.so:${PORTSDIR}/math/libmissing
LDFLAGS+= -lmissing
.endif
pre-configure:
${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/${MAKEFILE}
@ -38,4 +43,4 @@ post-install:
${INSTALL_DATA} ${_DISTDIR}/manual.pdf ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -0,0 +1,13 @@
--- ./proj_ftmerc.c.orig 2008-11-20 18:40:28.000000000 +0100
+++ ./proj_ftmerc.c 2014-10-16 21:31:30.000000000 +0200
@@ -31,6 +31,10 @@
#define PROJ_LIB__
#include <lib_proj.h>
#include <complex.h>
+#include <sys/param.h>
+#if defined(__FreeBSD__) && (__FreeBSD_version < 1000034)
+# include <missing_complex.h>
+#endif
PROJ_HEAD(ftmerc, "French Transverse Mercator") "\n\tCyl, Ell";
/* forward series constants */