aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-10-16 19:44:14 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-10-16 19:44:14 +0000
commit95b71a550fafebdc594131b37445306ac513e699 (patch)
tree92bfd409a7c5977c79ea5bb2a8dcf768ab0c3c34 /math
parente6863387ea54848b5a98525e1720fd2c54122892 (diff)
Notes
Diffstat (limited to 'math')
-rw-r--r--math/libproj4/Makefile9
-rw-r--r--math/libproj4/files/patch-proj_ftmerc.c13
2 files changed, 20 insertions, 2 deletions
diff --git a/math/libproj4/Makefile b/math/libproj4/Makefile
index 3120746fe071..c6f8280b2032 100644
--- a/math/libproj4/Makefile
+++ b/math/libproj4/Makefile
@@ -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>
diff --git a/math/libproj4/files/patch-proj_ftmerc.c b/math/libproj4/files/patch-proj_ftmerc.c
new file mode 100644
index 000000000000..10ecb31e7930
--- /dev/null
+++ b/math/libproj4/files/patch-proj_ftmerc.c
@@ -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 */