biology/molden: update to 5.8.2
Also add do-install-{option}-on targets and shadow ${MKDIR} commands. PR: 233060 Submitted by: yuri
This commit is contained in:
parent
a3d9e80118
commit
7feb3fa279
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=484858
3 changed files with 45 additions and 10 deletions
|
@ -2,8 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= molden
|
||||
PORTVERSION= 5.7
|
||||
PORTREVISION= 16
|
||||
DISTVERSION= 5.8.2
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= biology
|
||||
MASTER_SITES= ftp://ftp.cmbi.umcn.nl/pub/molgraph/molden/
|
||||
|
@ -19,7 +18,7 @@ LICENSE_PERMS= auto-accept
|
|||
|
||||
RESTRICTED= free for academic, non profit usage; do not re-distribute source and executable.
|
||||
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION}
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}${PORTVERSION:R}
|
||||
|
||||
USES= fortran gl gmake
|
||||
USE_XORG= x11
|
||||
|
@ -62,11 +61,15 @@ do-install:
|
|||
.for i in ambfor surf
|
||||
(cd ${WRKSRC}/${i} && ${INSTALL_PROGRAM} ${i} ${STAGEDIR}/${PREFIX}/bin)
|
||||
.endfor
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/test
|
||||
(cd ${WRKSRC}/test && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}/test)
|
||||
|
||||
do-install-DATA-on:
|
||||
@${MKDIR} ${STAGEDIR}${DATADIR}/test
|
||||
(cd ${WRKSRC}/test && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/test)
|
||||
${MKDIR} ${STAGEDIR}${DATADIR}/utils
|
||||
(cd ${WRKSRC}/utils && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}/utils)
|
||||
(cd ${WRKSRC}/utils && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/utils)
|
||||
|
||||
do-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
(cd ${WRKSRC}/doc && ${INSTALL_DATA} * ${STAGEDIR}${DOCSDIR})
|
||||
(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR})
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1526851227
|
||||
SHA256 (molden5.7.tar.gz) = 10e3c02b63e6aa277922488f48be1bbd231e5bb111fb86fa162293a6fbc9718a
|
||||
SIZE (molden5.7.tar.gz) = 5346379
|
||||
TIMESTAMP = 1541594934
|
||||
SHA256 (molden5.8.2.tar.gz) = 65a24db9e80b4fb6038cc1e57c7d6e2457414812c9389bc651af7cb33f01dbe9
|
||||
SIZE (molden5.8.2.tar.gz) = 5770998
|
||||
|
|
32
biology/molden/files/patch-xwin.c
Normal file
32
biology/molden/files/patch-xwin.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
--- xwin.c.orig 2018-11-07 12:54:20 UTC
|
||||
+++ xwin.c
|
||||
@@ -4218,8 +4218,12 @@ void makeRasterFont(Display *dpy);
|
||||
#include <math.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
+#if defined(__APPLE__)
|
||||
#include <copyfile.h>
|
||||
+#elif defined(__FreeBSD__)
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/uio.h>
|
||||
#else
|
||||
#include <sys/sendfile.h>
|
||||
#endif
|
||||
@@ -4238,9 +4242,14 @@ int OSCopyFile(const char* source, const
|
||||
}
|
||||
|
||||
//Here we use kernel-space copying for performance reasons
|
||||
-#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
+#if defined(__APPLE__)
|
||||
//fcopyfile works on FreeBSD and OS X 10.5+
|
||||
int result = fcopyfile(input, output, 0, COPYFILE_ALL);
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ off_t bytesCopied = 0;
|
||||
+ struct stat fileinfo = {0};
|
||||
+ fstat(input, &fileinfo);
|
||||
+ int result = sendfile(output, input, 0/*ofset*/, fileinfo.st_size, 0/*hdtr*/, &bytesCopied, 0/*flags*/);
|
||||
#else
|
||||
//sendfile will work with non-socket output (i.e. regular file) on Linux 2.6.33+
|
||||
off_t bytesCopied = 0;
|
Loading…
Reference in a new issue