aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2010-06-22 09:55:00 +0800
committerwxs <wxs@FreeBSD.org>2010-06-22 09:55:00 +0800
commitf10b32609b55554221854eb510f44b0d6d71a34d (patch)
treeb8c6c11cabe2e182ad7de53e88230fd737c63f5d
parentb263740cbbcdf31ab4dcbf4118657dbf8ffffcaa (diff)
downloadfreebsd-ports-gnome-f10b32609b55554221854eb510f44b0d6d71a34d.tar.gz
freebsd-ports-gnome-f10b32609b55554221854eb510f44b0d6d71a34d.tar.zst
freebsd-ports-gnome-f10b32609b55554221854eb510f44b0d6d71a34d.zip
This library is a C port of the implementation of Limited-memory
Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method written by Jorge Nocedal. The original FORTRAN source code is available at: http://www.ece.northwestern.edu/~nocedal/lbfgs.html WWW: http://www.chokkan.org/software/liblbfgs/ PR: ports/147670 Submitted by: Hung-Yi Chen <gaod@hychen.org> Feature safe: yes
-rw-r--r--math/Makefile1
-rw-r--r--math/liblbfgs/Makefile42
-rw-r--r--math/liblbfgs/distinfo3
-rw-r--r--math/liblbfgs/files/patch-lib_arithmetic_sse_double.h19
-rw-r--r--math/liblbfgs/pkg-descr6
5 files changed, 71 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 64e8a0dcf4d1..ba99a5edfc11 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -156,6 +156,7 @@
SUBDIR += lensnns
SUBDIR += libRmath
SUBDIR += libjbigi
+ SUBDIR += liblbfgs
SUBDIR += libmath++
SUBDIR += libneural
SUBDIR += liborigin
diff --git a/math/liblbfgs/Makefile b/math/liblbfgs/Makefile
new file mode 100644
index 000000000000..71fda7b42fca
--- /dev/null
+++ b/math/liblbfgs/Makefile
@@ -0,0 +1,42 @@
+# New ports collection makefile for: liblbfgs
+# Date created: 2010-06-08
+# Whom: Hung-Yi Chen <gaod@hychen.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= liblbfgs
+PORTVERSION= 1.9
+CATEGORIES= math
+MASTER_SITES= http://www.chokkan.org/software/dist/
+
+MAINTAINER= gaod@hychen.org
+COMMENT= A library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno
+
+GNU_CONFIGURE= yes
+USE_AUTOTOOLS= autoconf:262:env
+
+OPTIONS= OPTIMIZED "Enable SSE2 optimization routines" Off
+
+.include <bsd.port.pre.mk>
+
+.if (${OSVERSION} < 700000)
+IGNORE= does not install properly on 6.x
+.endif
+
+# Enable/disable compilation optimizations.
+.if defined(WITH_OPTIMIZED)
+CONFIGURE_ARGS+= --enable-sse2
+.endif
+
+PLIST_FILES= lib/liblbfgs-1.9.so.0.0 lib/liblbfgs.a lib//liblbfgs.la \
+ lib/liblbfgs.so.0.0 include/lbfgs.h
+
+PORTDOCS= README INSTALL COPYING AUTHORS ChangeLog NEWS
+
+post-patch:
+.if defined(NOPORTDOCS)
+ @${REINPLACE_CMD} -e 's/install-data-am$$//' ${WRKSRC}/Makefile.in
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/math/liblbfgs/distinfo b/math/liblbfgs/distinfo
new file mode 100644
index 000000000000..74770012b406
--- /dev/null
+++ b/math/liblbfgs/distinfo
@@ -0,0 +1,3 @@
+MD5 (liblbfgs-1.9.tar.gz) = 311eb920dd3ed777c3fae14e4ae7c9a5
+SHA256 (liblbfgs-1.9.tar.gz) = 76e2decbb4d05349f83ed81d30318b3af8597c007f447a0f68ff6f9eb8a8b47c
+SIZE (liblbfgs-1.9.tar.gz) = 318447
diff --git a/math/liblbfgs/files/patch-lib_arithmetic_sse_double.h b/math/liblbfgs/files/patch-lib_arithmetic_sse_double.h
new file mode 100644
index 000000000000..bd4c23db1bc0
--- /dev/null
+++ b/math/liblbfgs/files/patch-lib_arithmetic_sse_double.h
@@ -0,0 +1,19 @@
+--- lib/arithmetic_sse_double.h.orig 2010-06-08 08:17:38.000000000 +0800
++++ lib/arithmetic_sse_double.h 2010-06-08 08:19:41.000000000 +0800
+@@ -26,7 +26,6 @@
+ /* $Id: arithmetic_sse_double.h 65 2010-01-29 12:19:16Z naoaki $ */
+
+ #include <stdlib.h>
+-#include <malloc.h>
+ #include <memory.h>
+
+ #if 1400 <= _MSC_VER
+@@ -37,6 +36,8 @@
+ #include <emmintrin.h>
+ #endif/*HAVE_EMMINTRIN_H*/
+
++#define memalign(A,B) malloc(B)
++
+ inline static void* vecalloc(size_t size)
+ {
+ #ifdef _MSC_VER
diff --git a/math/liblbfgs/pkg-descr b/math/liblbfgs/pkg-descr
new file mode 100644
index 000000000000..3ae8b23e8f44
--- /dev/null
+++ b/math/liblbfgs/pkg-descr
@@ -0,0 +1,6 @@
+This library is a C port of the implementation of Limited-memory
+Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) method written by Jorge Nocedal.
+The original FORTRAN source code is available at:
+http://www.ece.northwestern.edu/~nocedal/lbfgs.html
+
+WWW: http://www.chokkan.org/software/liblbfgs/