aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2016-01-29 21:52:24 +0800
committerlwhsu <lwhsu@FreeBSD.org>2016-01-29 21:52:24 +0800
commit3250dc6618150a14c476a890c0b350f863a35715 (patch)
tree9d842801a5ca62e3d3372d10af714e69d9a3aefa /math
parent38118e140da3901644f0f070b0edd962f031b701 (diff)
downloadfreebsd-ports-gnome-3250dc6618150a14c476a890c0b350f863a35715.tar.gz
freebsd-ports-gnome-3250dc6618150a14c476a890c0b350f863a35715.tar.zst
freebsd-ports-gnome-3250dc6618150a14c476a890c0b350f863a35715.zip
Add openlibm, high quality system independent, portable, open source libm
PR: 206676 Submitted by: Iblis Lin <e196819@hotmail.com>
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/openlibm/Makefile36
-rw-r--r--math/openlibm/distinfo2
-rw-r--r--math/openlibm/files/patch-Make.inc41
-rw-r--r--math/openlibm/files/patch-Makefile42
-rw-r--r--math/openlibm/pkg-descr9
-rw-r--r--math/openlibm/pkg-message5
-rw-r--r--math/openlibm/pkg-plist9
8 files changed, 145 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 044e85715694..1828e756dd6e 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -399,6 +399,7 @@
SUBDIR += open-axiom
SUBDIR += openblas
SUBDIR += openfst
+ SUBDIR += openlibm
SUBDIR += orpie
SUBDIR += p5-AI-DecisionTree
SUBDIR += p5-AI-Genetic
diff --git a/math/openlibm/Makefile b/math/openlibm/Makefile
new file mode 100644
index 000000000000..83700a3eab38
--- /dev/null
+++ b/math/openlibm/Makefile
@@ -0,0 +1,36 @@
+# Created by: Iblis Lin <iblis@hs.ntnu.edu.tw>
+# $FreeBSD$
+
+PORTNAME= openlibm
+PORTVERSION= 0.4.1
+DISTVERSIONPREFIX= v
+CATEGORIES= math
+MASTER_SITES= GH
+
+MAINTAINER= iblis@hs.ntnu.edu.tw
+COMMENT= High quality system independent, portable, open source libm
+
+LICENSE= MIT ISCL BSD2CLAUSE
+LICENSE_COMB= multi
+LICENSE_FILE= ${WRKSRC}/LICENSE.md
+
+USE_GITHUB= yes
+GH_ACCOUNT= JuliaLang
+GH_PROJECT= openlibm
+
+USES= gmake
+USE_LDCONFIG= yes
+
+.include <bsd.port.pre.mk>
+
+MAKE_ENV+= prefix=${PREFIX}
+
+.if ${ARCH} == "amd64" || ${ARCH} == "i386"
+PLIST_SUB+= EXTRA_HEADER=""
+.else
+PLIST_SUB+= EXTRA_HEADER="@comment "
+.endif
+
+TEST_TARGET= check
+
+.include <bsd.port.post.mk>
diff --git a/math/openlibm/distinfo b/math/openlibm/distinfo
new file mode 100644
index 000000000000..bb3873a1ba78
--- /dev/null
+++ b/math/openlibm/distinfo
@@ -0,0 +1,2 @@
+SHA256 (JuliaLang-openlibm-v0.4.1_GH0.tar.gz) = d6269849348027b0a02ef5f7707968185017b4bb9607acd2fd7348ba28c69833
+SIZE (JuliaLang-openlibm-v0.4.1_GH0.tar.gz) = 277924
diff --git a/math/openlibm/files/patch-Make.inc b/math/openlibm/files/patch-Make.inc
new file mode 100644
index 000000000000..e3c5ad37d1fc
--- /dev/null
+++ b/math/openlibm/files/patch-Make.inc
@@ -0,0 +1,41 @@
+--- Make.inc.orig 2014-12-01 13:10:35 UTC
++++ Make.inc
+@@ -7,11 +7,17 @@ VERSION = 0.4
+ SOMAJOR = 1
+ SOMINOR = 0
+ DESTDIR =
+-prefix = /usr/local
++prefix ?= /usr/local
+ bindir = $(prefix)/bin
+ libdir = $(prefix)/lib
+ includedir = $(prefix)/include
+
++pkgconfigdir = $(libdir)/pkgconfig
++
++ifeq ($(OS), FreeBSD)
++pkgconfigdir = $(prefix)/libdata/pkgconfig
++endif
++
+ USEGCC = 1
+ USECLANG = 0
+
+@@ -20,6 +26,11 @@ USEGCC = 0
+ USECLANG = 1
+ endif
+
++ifeq ($(OS), FreeBSD)
++USEGCC = 0
++USECLANG = 1
++endif
++
+ AR = ar
+
+ ifeq ($(USECLANG),1)
+@@ -90,6 +101,7 @@ ifeq ($(OS), FreeBSD)
+ SHLIB_EXT = so
+ SONAME_FLAG = -soname
+ CFLAGS_add+=-fPIC
++libdatadir = $(prefix)/libdata
+ endif
+
+ ifeq ($(OS), Darwin)
diff --git a/math/openlibm/files/patch-Makefile b/math/openlibm/files/patch-Makefile
new file mode 100644
index 000000000000..ff3b98ac8bea
--- /dev/null
+++ b/math/openlibm/files/patch-Makefile
@@ -0,0 +1,42 @@
+--- Makefile.orig 2014-12-01 13:10:35 UTC
++++ Makefile
+@@ -37,6 +37,16 @@ else
+ @-ln -sf libopenlibm.$(SHLIB_EXT).$(SOMAJOR).$(SOMINOR) libopenlibm.$(SHLIB_EXT)
+ endif
+
++check test: test/test-double test/test-float
++ test/test-double
++ test/test-float
++
++test/test-double: libopenlibm.$(SHLIB_EXT)
++ $(MAKE) -C test test-double
++
++test/test-float: libopenlibm.$(SHLIB_EXT)
++ $(MAKE) -C test test-float
++
+ clean:
+ @for dir in $(SUBDIRS) .; do \
+ rm -fr $$dir/*.o $$dir/*.a $$dir/*.$(SHLIB_EXT)*; \
+@@ -53,15 +63,15 @@ openlibm.pc: openlibm.pc.in Make.inc Mak
+
+ install: all openlibm.pc
+ mkdir -p $(DESTDIR)$(shlibdir)
+- mkdir -p $(DESTDIR)$(libdir)/pkgconfig
++ mkdir -p $(DESTDIR)$(pkgconfigdir)
+ mkdir -p $(DESTDIR)$(includedir)/openlibm
+- cp -a libopenlibm.$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/
+- cp -a libopenlibm.a $(DESTDIR)$(libdir)/
+- cp -a src/openlibm.h $(DESTDIR)$(includedir)/
+- cp -a openlibm.pc $(DESTDIR)$(libdir)/pkgconfig/
++ ${BSD_INSTALL_LIB} libopenlibm.$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/
++ ${BSD_INSTALL_DATA} libopenlibm.a $(DESTDIR)$(libdir)/
++ ${BSD_INSTALL_DATA} src/openlibm.h $(DESTDIR)$(includedir)/
++ ${BSD_INSTALL_DATA} openlibm.pc $(DESTDIR)$(pkgconfigdir)/
+ ifneq ($(wildcard $(ARCH)/bsd_asm.h),)
+- cp -a $(ARCH)/bsd_asm.h $(DESTDIR)$(includedir)/openlibm/
++ ${BSD_INSTALL_DATA} $(ARCH)/bsd_asm.h $(DESTDIR)$(includedir)/openlibm/
+ endif
+ ifneq ($(wildcard $(ARCH)/bsd_cdefs.h),)
+- cp -a $(ARCH)/bsd_cdefs.h $(DESTDIR)$(includedir)/openlibm/
++ ${BSD_INSTALL_DATA} $(ARCH)/bsd_cdefs.h $(DESTDIR)$(includedir)/openlibm/
+ endif
diff --git a/math/openlibm/pkg-descr b/math/openlibm/pkg-descr
new file mode 100644
index 000000000000..476b961b530a
--- /dev/null
+++ b/math/openlibm/pkg-descr
@@ -0,0 +1,9 @@
+OpenLibm is an effort to have a high quality, portable, standalone C
+mathematical library (libm). It can be used standalone in applications and
+programming language implementations.
+
+The project was born out of a need to have a good libm for the Julia
+programming langage that worked consistently across compilers and operating
+systems, and in 32-bit and 64-bit environments.
+
+WWW: http://julialang.org/openlibm/
diff --git a/math/openlibm/pkg-message b/math/openlibm/pkg-message
new file mode 100644
index 000000000000..4d53b552754b
--- /dev/null
+++ b/math/openlibm/pkg-message
@@ -0,0 +1,5 @@
+*********************************************************************
+* At this point it is prudent to remind you that OpenLibm is still *
+* experimental. There are some test failures. For more information, *
+* please checkout https://github.com/julialang/openlibm/issues/10 . *
+*********************************************************************
diff --git a/math/openlibm/pkg-plist b/math/openlibm/pkg-plist
new file mode 100644
index 000000000000..9f17e36d683e
--- /dev/null
+++ b/math/openlibm/pkg-plist
@@ -0,0 +1,9 @@
+@comment $FreeBSD$
+include/openlibm.h
+%%EXTRA_HEADER%%include/openlibm/bsd_asm.h
+%%EXTRA_HEADER%%include/openlibm/bsd_cdefs.h
+lib/libopenlibm.a
+lib/libopenlibm.so
+lib/libopenlibm.so.1
+lib/libopenlibm.so.1.0
+libdata/pkgconfig/openlibm.pc