mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-01 05:45:45 +00:00
libranlip is a C++ library created by G. Beliakin, which generates random
variates with arbitrary Lipschitz-continuous densities via the acceptance / rejection method. The density should have a dimension of no more than about five. The user needs to supply the density function using a simple syntax, and then call the methods of construction and generation provided in libranlip. WWW: http://www.deakin.edu.au/~gleb/ranlip.html PR: ports/143624 Submitted by: bf <bf1783 at gmail.com>
This commit is contained in:
parent
dffdfe2b36
commit
5c51d5a546
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=253982
@ -161,6 +161,7 @@
|
||||
SUBDIR += liborigin
|
||||
SUBDIR += libqalculate
|
||||
SUBDIR += libranlib
|
||||
SUBDIR += libranlip
|
||||
SUBDIR += libtommath
|
||||
SUBDIR += linalg
|
||||
SUBDIR += linpack
|
||||
|
50
math/libranlip/Makefile
Normal file
50
math/libranlip/Makefile
Normal file
@ -0,0 +1,50 @@
|
||||
# New ports collection makefile for: libranlip
|
||||
# Date created: 6 Feb 2010
|
||||
# Whom: bf <bf1783@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= libranlip
|
||||
DISTVERSION= 1.0
|
||||
CATEGORIES= math
|
||||
MASTER_SITES= http://freebsd.unixfreunde.de/sources/ \
|
||||
http://www.deakin.edu.au/~gleb/
|
||||
|
||||
MAINTAINER= bf1783@gmail.com
|
||||
COMMENT= A random variate generator for Lipschitz-continuous densities
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LDCONFIG= yes
|
||||
|
||||
INFO= ranlip
|
||||
PLIST_FILES= include/ranlip.h include/ranlipdist.h include/ranlipproc.h lib/libranlip.so.${PORTVERSION} \
|
||||
lib/libranlip.so.${PORTVERSION:R} lib/libranlip.la lib/libranlip.a
|
||||
PORTDOCS= ranlip.ps
|
||||
PORTEXAMPLES= makefile ranliptest.cpp ranliptestproc.cpp
|
||||
TESTPROGS= static_example static_example2 static_example3 shared_example
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-install:
|
||||
${LN} -s ${PREFIX}/lib/libranlip.so.${PORTVERSION} ${PREFIX}/lib/libranlip.so.${PORTVERSION:R}
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_MAN} ${WRKSRC}/docs/ranlip.ps ${DOCSDIR}
|
||||
.endif
|
||||
.if !defined(NOPORTEXAMPLES)
|
||||
${MKDIR} ${EXAMPLESDIR}
|
||||
.for _file in ${PORTEXAMPLES}
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/${_file} ${EXAMPLESDIR}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
test: build
|
||||
@(cd ${WRKSRC}/examples; ${SETENV} ${MAKE_ENV} ${MAKE} ${_MAKE_JOBS} ${MAKE_ARGS} all)
|
||||
.for _prog in ${TESTPROGS}
|
||||
@(cd ${WRKSRC}/examples && ./${_prog})
|
||||
.endfor
|
||||
|
||||
.if ${OSVERSION} < 700000
|
||||
BROKEN= fails to build
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
math/libranlip/distinfo
Normal file
3
math/libranlip/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (libranlip-1.0.tar.gz) = fc56eb62531549304600941cc65a18e8
|
||||
SHA256 (libranlip-1.0.tar.gz) = 885ad15711a6eddc2af4ded3a7bc4a3ca864e3b4ba2952f3e0c988961a05222a
|
||||
SIZE (libranlip-1.0.tar.gz) = 477069
|
115
math/libranlip/files/patch-examples__makefile
Normal file
115
math/libranlip/files/patch-examples__makefile
Normal file
@ -0,0 +1,115 @@
|
||||
--- examples/makefile.orig 2004-05-19 05:53:57.000000000 -0400
|
||||
+++ examples/makefile 2010-02-06 20:58:35.000000000 -0500
|
||||
@@ -11,7 +11,7 @@
|
||||
# distribution of RANLIP assuming different installations of the library. this
|
||||
# include the following examples for both static and shared linking.
|
||||
#
|
||||
-# shared_example and staic_example:
|
||||
+# shared_example and static_example:
|
||||
#
|
||||
# shows how to compile and link library when install
|
||||
# in the library search path used to load libraries
|
||||
@@ -20,16 +20,13 @@
|
||||
# shows how to compile and link by implicitly telling
|
||||
# the linker where to look for the library
|
||||
#
|
||||
-# static_example3: s
|
||||
+# static_example3:
|
||||
# hows how to compile and link procedural C conde.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
-# compiler
|
||||
-CC = g++
|
||||
-
|
||||
# Some options probably not needed: -g (which enables the debugger options).
|
||||
-FLAGS = -g -O -Wno-deprecated
|
||||
+FLAGS = ${CXXFLAGS}
|
||||
|
||||
# Object file fo the example
|
||||
OBJ = ranliptest.o
|
||||
@@ -38,68 +35,68 @@
|
||||
|
||||
# LIB_PATH used to store the path in which the library files were installed.
|
||||
# The commented out assignment is for when the library is installed into the
|
||||
-# users home directory. NOTE: $(HOME) referes to env varialble HOME.
|
||||
+# user's home directory. NOTE: $(HOME) refers to env variable HOME.
|
||||
|
||||
#LIB_PATH = $(HOME)/ranlip/lib/
|
||||
-LIB_PATH = /usr/local/lib/
|
||||
+LIB_PATH = ../src/.libs
|
||||
|
||||
# INCLUDE_PATH used to store the path in which the *.h files have been
|
||||
-# placed. The commented out assignment is for when the *.h files are placed
|
||||
-# in the users home directory.
|
||||
+# placed. The commented-out assignment is for when the *.h files are placed
|
||||
+# in the user's home directory.
|
||||
|
||||
#INCLUDE_PATH = $(HOME)/ranlip/include/
|
||||
-INCLUDE_PATH = /usr/local/include/
|
||||
+INCLUDE_PATH = ../src
|
||||
|
||||
all: static_example2 static_example3 shared_example static_example
|
||||
|
||||
#################################################################################
|
||||
# linking ranliptest.o . If you have succesfully installed lip library and have
|
||||
-# LIB_PATH to /etc/ld.soconf Or you have added LIB_PATH TO LD_LIBRARY_PATH
|
||||
-# then compiling is as eassy as this.
|
||||
+# LIB_PATH to /etc/ld.so.conf Or you have added LIB_PATH TO LD_LIBRARY_PATH
|
||||
+# then compiling is as easy as this.
|
||||
|
||||
# shared_example target links ranliptest.o to the lip shared library. To make
|
||||
# up shared_example executable.
|
||||
|
||||
shared_example: $(OBJ)
|
||||
- $(CC) -o shared_example $(OBJ) $(FLAGS) -lranlip -lm
|
||||
+ $(CXX) -o shared_example $(OBJ) $(FLAGS) -L${LIB_PATH} -lranlip -lm
|
||||
|
||||
# static_example target links ranliptest.o to the lip static library. To make
|
||||
# up static_example executable.
|
||||
|
||||
static_example: $(OBJ)
|
||||
- $(CC) -o static_example -static $(OBJ) $(FLAGS) -lranlip -lm
|
||||
+ $(CXX) -o static_example -static $(OBJ) $(FLAGS) -L${LIB_PATH} -lranlip -lm
|
||||
|
||||
|
||||
#################################################################################
|
||||
# linking ranliptest.o .
|
||||
|
||||
# static_example target links ranliptest.o to the lip static library. To make
|
||||
-# up static_example executable.
|
||||
+# up static_example2 executable.
|
||||
|
||||
static_example2:$(OBJ2)
|
||||
- $(CC) -o static_example2 $(OBJ2) $(FLAGS) $(LIB_PATH)libranlip.a -lm
|
||||
+ $(CXX) -o static_example2 $(OBJ2) $(FLAGS) $(LIB_PATH)/libranlip.a -lm
|
||||
|
||||
|
||||
#################################################################################
|
||||
# linking ranlipporc.o
|
||||
|
||||
# static_example target links ranliptestproc.o to the lip static library. To make
|
||||
-# up static_example executable.
|
||||
+# up static_example3 executable.
|
||||
|
||||
static_example3:$(OBJ3)
|
||||
- $(CC) -o static_example3 -static $(OBJ3) $(FLAGS) $(LIB_PATH)libranlip.a -lm
|
||||
+ $(CXX) -o static_example3 -static $(OBJ3) $(FLAGS) $(LIB_PATH)/libranlip.a -lm
|
||||
|
||||
|
||||
#################################################################################
|
||||
# compiling examples to objectfiles.
|
||||
|
||||
ranliptest.o: ranliptest.cpp
|
||||
- $(CC) -c ranliptest.cpp $(FLAGS) -I$(INCLUDE_PATH)
|
||||
+ $(CXX) -c ranliptest.cpp $(FLAGS) -I$(INCLUDE_PATH)
|
||||
|
||||
-# compiling proccedual example using C compiler
|
||||
+# compiling procedural example using C compiler
|
||||
#
|
||||
ranliptestproc.o: ranliptestproc.cpp
|
||||
- gcc -c ranliptestproc.cpp $(FLAGS) -I$(INCLUDE_PATH)
|
||||
+ ${CC} -c ranliptestproc.cpp $(FLAGS) -I$(INCLUDE_PATH)
|
||||
|
||||
.PHONY: clean all
|
||||
|
7
math/libranlip/pkg-descr
Normal file
7
math/libranlip/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
libranlip is a C++ library created by G. Beliakin, which generates random
|
||||
variates with arbitrary Lipschitz-continuous densities via the acceptance /
|
||||
rejection method. The density should have a dimension of no more than about
|
||||
five. The user needs to supply the density function using a simple syntax, and
|
||||
then call the methods of construction and generation provided in libranlip.
|
||||
|
||||
WWW: http://www.deakin.edu.au/~gleb/ranlip.html
|
Loading…
Reference in New Issue
Block a user