summaryrefslogtreecommitdiff
path: root/sci-libs/djbfft
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/djbfft')
-rw-r--r--sci-libs/djbfft/Manifest8
-rw-r--r--sci-libs/djbfft/djbfft-0.76-r2.ebuild67
-rw-r--r--sci-libs/djbfft/files/djbfft-0.76-gcc3.patch37
-rw-r--r--sci-libs/djbfft/files/djbfft-0.76-headers.patch38
-rw-r--r--sci-libs/djbfft/files/djbfft-0.76-shared.patch133
-rw-r--r--sci-libs/djbfft/metadata.xml21
6 files changed, 304 insertions, 0 deletions
diff --git a/sci-libs/djbfft/Manifest b/sci-libs/djbfft/Manifest
new file mode 100644
index 000000000000..ff144c4f78f4
--- /dev/null
+++ b/sci-libs/djbfft/Manifest
@@ -0,0 +1,8 @@
+AUX djbfft-0.76-gcc3.patch 1176 SHA256 f6b84b582bdb5846f75bdb0def9695884480c062060eaeddd092e7d106256851 SHA512 e7de40d8ecf5447921fd5f9c21a0a44f58c7351457d029d9848514e032e495a13da2f282c6c3d05f00fd85c1af8d0799db64c786b1a0286ab03dc7c2148dd23c WHIRLPOOL 970e5a9d9a69ad3e09740cb4c1e105a28431572cf1f7cdba8a4826069c0f540d39527d99ee5d4ba40b38f20da628bdb1dbcb578d963747fcd81339998163c660
+AUX djbfft-0.76-headers.patch 995 SHA256 783ef6cf4b82af55efc6d038aa0fe2f76c81dcd52393444fa0ca438c9ebee483 SHA512 651ef26ef1ae00a5e10b512cef6cd741e77035dbdc792fdc7d215026ff4c3304ac0f1fd4c0e58debeb1bca2620a1002c67c1115b3590cf8f5b2453eb7a370684 WHIRLPOOL 155738dbb28eba8ec77fbf534b1d0c5c129d358a115340a6eb535fb9d14861d4fb4609d25b3bad6274ed48000f285f69f79664ed79951da561cda480df3d32e3
+AUX djbfft-0.76-shared.patch 3722 SHA256 bbe7f027a29428265e44d4f966808b4d752c523c340d13d8f037233bc45e6ad1 SHA512 58bc4d65553a6642a1b9a25a5b57974325f201dcec5758c7bf4c86da6b0a9fa018f1099af98234e7fbcbe29b398ac22d40c25069b9b987b41f547630f2799c1a WHIRLPOOL f18a357252394a1bb0f6b595d74941912d1d9c50525f645895355d25a5a9f0d5c3ce17655426adc8254e009c1424fa393d57395ecad9a31027f1aebf9ffcfb91
+DIST djbfft-0.76.tar.gz 80092 SHA256 799d929c3631a77ef0e16a2449e4fc11af8540b62359f8733ac2899fca2b394c SHA512 f23e5f80d2737476feea4ed65d7d022c4ca74748a2ff7b3b9338fdea4f72b4009d1c5909325382647feab837bec078231eddc3fc3bd0b5ae3346690e5edef530 WHIRLPOOL 710c694eeb92f4baf37e8ebb2658c2d8757a129354a240a47aff3891bd68f0d955caaa3b20524df259fcb415b6d7d40db8d60dd6d657b36397c1007569396058
+EBUILD djbfft-0.76-r2.ebuild 1818 SHA256 dd8372056b0f290adb1dbbb6f3a7aa9ee2956ee68e865107fdeeb2f254745a62 SHA512 14205a19ad97f089af11e92e7de9b93a35a1be8d31d601d4bafaac61113602a13177bc8a3f2dd0932dcd80e9d6bb4fe93a4bcceecffd6d1de3cf491ef3f0c7df WHIRLPOOL 5031f4d618fce33f887b4a97daa345b9b660101a959ca1ee46f9975b7a6efc76b601dd027fb498a081a14f6ab4c19494b3380f1ff00a5030793fbe4ba5c219cc
+MISC ChangeLog 2528 SHA256 6fde197eb97b11c1b02aac609cb85b4b7eceff396ffa2e96024d6569411df21f SHA512 62ca023635eb13f9d6f6ca1340838586ffb7dbf98eaa0b4e1fbcd5221d776a28efa2127ae43ea189dcbfba690f50edb6ea2a7a73ee939f964dfbc1eaa0b09d98 WHIRLPOOL 08f308c4e038f23161531f4c53e018bdcc054c23b78428f381a1c85858925a19928a2426852a1ced6de23dc15370c17d0877c3e9ab144c168a827930f0b85bb5
+MISC ChangeLog-2015 5117 SHA256 24dcbceab0262219983315504551440c8013d5a2c6024c453a6c7a7a7d95850e SHA512 93d38053213554904f169b7fb4606edf36a62bcae41e72df32b3ff4c693045b2b7da48372d80281290e6bbf3347ab540174bf2ea15c55bb056e1f679663e9f9a WHIRLPOOL 5e19ffe102aec9402d762c8edbd27e5f43a7f65ef09d46414b7db0b5da79866472402954b73dd12b2d073baf037aad45a4485a531f2dc00fe5a3a757b4865604
+MISC metadata.xml 840 SHA256 b0eb06040398cf1e107896bdcf14bf92437e9c44dd6dced565ba7644981871b1 SHA512 988a23596f952d9f9b874cfa7582fafda0ab2df81a03498c068665b968cf49d3fa7eb7977a09a5e2410c0432bc0addc2cf3a97f4089a6b43a7a16a67d2552d6a WHIRLPOOL 365465ffce6d3104c22c8acd9b618225e9b99a255d6fdd0e3fcb5b39fd48284ef41948c1f40b6c6c5ee25b79eb5c808ae138874d38d638df8ee3c58f9a92b6dc
diff --git a/sci-libs/djbfft/djbfft-0.76-r2.ebuild b/sci-libs/djbfft/djbfft-0.76-r2.ebuild
new file mode 100644
index 000000000000..f2e4cc74f116
--- /dev/null
+++ b/sci-libs/djbfft/djbfft-0.76-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
+
+DESCRIPTION="Extremely fast library for floating-point convolution"
+HOMEPAGE="http://cr.yp.to/djbfft.html"
+SRC_URI="http://cr.yp.to/djbfft/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+IUSE=""
+DOCS=( CHANGES README TODO VERSION )
+
+src_prepare() {
+ SOVER="${PV:0:1}.${PV:2:1}.${PV:3:1}" # a.bc -> a.b.c
+ # mask out everything, which is not suggested by the author (RTFM)!
+ ALLOWED_FLAGS="-fstack-protector -march -mcpu -pipe -mpreferred-stack-boundary -ffast-math"
+ strip-flags
+
+ SONAME="libdjbfft.so.${SOVER}"
+
+ epatch \
+ "${FILESDIR}"/${P}-gcc3.patch \
+ "${FILESDIR}"/${P}-shared.patch \
+ "${FILESDIR}"/${P}-headers.patch
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ [[ ${ABI} == x86* ]] && append-cflags -malign-double
+
+ sed -i -e "s:\"lib\":\"$(get_libdir)\":" hier.c || die
+ echo "$(tc-getCC) ${CFLAGS} -fPIC" > "conf-cc"
+ echo "$(tc-getCC) ${LDFLAGS}" > "conf-ld"
+ echo "${ED}usr" > "conf-home"
+ einfo "conf-cc: $(<conf-cc)"
+}
+
+multilib_src_compile() {
+ emake \
+ LIBDJBFFT=${SONAME} \
+ LIBPERMS=0755 \
+ ${SONAME}
+ echo "the compile function was:"
+ cat ./compile
+ echo "the conf-ld function was:"
+ cat ./conf-ld
+}
+
+multilib_src_test() {
+ local t
+ for t in accuracy accuracy2 speed; do
+ emake ${t}
+ einfo "Testing ${t}"
+ LD_LIBRARY_PATH=. ./${t} > ${t}.out || die "test ${t} failed"
+ done
+}
+
+multilib_src_install() {
+ emake LIBDJBFFT=${SONAME} install
+ ./install || die "install failed"
+ dosym ${SONAME} /usr/$(get_libdir)/libdjbfft.so
+ dosym ${SONAME} /usr/$(get_libdir)/libdjbfft.so.${SOVER%%.*}
+}
diff --git a/sci-libs/djbfft/files/djbfft-0.76-gcc3.patch b/sci-libs/djbfft/files/djbfft-0.76-gcc3.patch
new file mode 100644
index 000000000000..6f1a677d6583
--- /dev/null
+++ b/sci-libs/djbfft/files/djbfft-0.76-gcc3.patch
@@ -0,0 +1,37 @@
+--- djbfft-0.76/install.c.orig 2003-04-25 23:31:34.000000000 +0200
++++ djbfft-0.76/install.c 2003-04-25 23:29:05.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <errno.h>
+ #include "substdio.h"
+ #include "strerr.h"
+ #include "error.h"
+--- djbfft-0.76/instcheck.c.orig 2003-04-25 23:31:34.000000000 +0200
++++ djbfft-0.76/instcheck.c 2003-04-25 23:28:11.000000000 +0200
+@@ -1,5 +1,6 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <errno.h>
+ #include "strerr.h"
+ #include "error.h"
+ #include "readwrite.h"
+--- djbfft-0.76/strerr_sys.c.orig 2003-04-25 23:31:34.000000000 +0200
++++ djbfft-0.76/strerr_sys.c 2003-04-25 23:28:32.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <errno.h>
+ #include "error.h"
+ #include "strerr.h"
+
+--- djbfft-0.76/substdi.c.orig 2003-04-25 23:31:34.000000000 +0200
++++ djbfft-0.76/substdi.c 2003-04-25 23:28:41.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <errno.h>
+ #include "substdio.h"
+ #include "byte.h"
+ #include "error.h"
+--- djbfft-0.76/substdo.c.orig 2003-04-25 23:31:34.000000000 +0200
++++ djbfft-0.76/substdo.c 2003-04-25 23:28:47.000000000 +0200
+@@ -1,3 +1,4 @@
++#include <errno.h>
+ #include "substdio.h"
+ #include "str.h"
+ #include "byte.h"
diff --git a/sci-libs/djbfft/files/djbfft-0.76-headers.patch b/sci-libs/djbfft/files/djbfft-0.76-headers.patch
new file mode 100644
index 000000000000..39fb623f10ef
--- /dev/null
+++ b/sci-libs/djbfft/files/djbfft-0.76-headers.patch
@@ -0,0 +1,38 @@
+--- strerr.h.orig 1999-09-30 23:25:58.000000000 +0300
++++ strerr.h 2008-09-13 22:14:09.000000000 +0300
+@@ -1,3 +1,5 @@
++#include <errno.h>
++
+ #ifndef STRERR_H
+ #define STRERR_H
+
+--- substdio.h.orig 1999-09-30 23:25:58.000000000 +0300
++++ substdio.h 2008-09-13 22:13:41.000000000 +0300
+@@ -1,3 +1,5 @@
++#include <errno.h>
++
+ #ifndef SUBSTDIO_H
+ #define SUBSTDIO_H
+
+--- speed.c.orig 1999-09-30 23:25:58.000000000 +0300
++++ speed.c 2008-09-13 19:16:20.352525481 +0300
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "fftr4.h"
+ #include "fftr8.h"
+ #include "fftc4.h"
+--- accuracy2.c.orig 2008-10-10 20:51:06.000000000 +0100
++++ accuracy2.c 2008-10-10 20:51:55.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <math.h>
+ #include "fftc4.h"
+--- accuracy.c.orig 2008-10-10 21:03:30.000000000 +0100
++++ accuracy.c 2008-10-10 21:03:43.000000000 +0100
+@@ -1,3 +1,4 @@
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <math.h>
+ #include "fftc4.h"
diff --git a/sci-libs/djbfft/files/djbfft-0.76-shared.patch b/sci-libs/djbfft/files/djbfft-0.76-shared.patch
new file mode 100644
index 000000000000..53ce9af6b7a2
--- /dev/null
+++ b/sci-libs/djbfft/files/djbfft-0.76-shared.patch
@@ -0,0 +1,133 @@
+--- djbfft-0.76/Makefile.orig 1999-09-30 22:25:58.000000000 +0200
++++ djbfft-0.76/Makefile 2004-01-17 17:21:37.236669242 +0100
+@@ -2,6 +2,9 @@
+
+ SHELL=/bin/sh
+
++LIBPERMS=0644
++LIBDJBFFT=djbfft.a
++
+ default: it
+
+ 4c0.c: \
+@@ -569,8 +572,8 @@
+ ./compile 8v5.c
+
+ accuracy: \
+-load accuracy.o djbfft.a math.lib
+- ./load accuracy djbfft.a `cat math.lib`
++load accuracy.o $(LIBDJBFFT) math.lib
++ ./load accuracy $(LIBDJBFFT) `cat math.lib`
+
+ accuracy.o: \
+ compile accuracy.c fftc4.h complex4.h real4.h fftc8.h complex8.h \
+@@ -578,8 +581,8 @@
+ ./compile accuracy.c
+
+ accuracy2: \
+-load accuracy2.o djbfft.a math.lib
+- ./load accuracy2 djbfft.a `cat math.lib`
++load accuracy2.o $(LIBDJBFFT) math.lib
++ ./load accuracy2 $(LIBDJBFFT) `cat math.lib`
+
+ accuracy2.o: \
+ compile accuracy2.c fftc4.h complex4.h real4.h fftc8.h complex8.h \
+@@ -649,7 +652,7 @@
+ ) > compilebase
+ chmod 755 compilebase
+
+-djbfft.a: \
++$(LIBDJBFFT): \
+ makelib 8sc.o 8u5.o 8u4.o 8u3.o 8u2.o 8u1.o 8u0.o 8mc.o 8c0.o 8c1.o \
+ 8c2.o 8c3.o 8c4.o 8c5.o 8d0.o 8d1.o 8d2.o 8d3.o 8d4.o 8d5.o 8v5.o \
+ 8v4.o 8v3.o 8v2.o 8v1.o 8v0.o 8mr.o 8r0.o 8r1.o 8r2.o 8r3.o 8r4.o \
+@@ -657,7 +660,7 @@
+ 4c1.o 4c2.o 4c3.o 4c4.o 4c5.o 4d0.o 4d1.o 4d2.o 4d3.o 4d4.o 4d5.o \
+ 4v5.o 4v4.o 4v3.o 4v2.o 4v1.o 4v0.o 4mr.o 4r0.o 4r1.o 4r2.o 4r3.o \
+ 4r4.o 4r5.o 4sr.o fftfreq.o
+- ./makelib djbfft.a 8sc.o 8u5.o 8u4.o 8u3.o 8u2.o 8u1.o \
++ ./makelib $(LIBDJBFFT) 8sc.o 8u5.o 8u4.o 8u3.o 8u2.o 8u1.o \
+ 8u0.o 8mc.o 8c0.o 8c1.o 8c2.o 8c3.o 8c4.o 8c5.o 8d0.o 8d1.o \
+ 8d2.o 8d3.o 8d4.o 8d5.o 8v5.o 8v4.o 8v3.o 8v2.o 8v1.o 8v0.o \
+ 8mr.o 8r0.o 8r1.o 8r2.o 8r3.o 8r4.o 8r5.o 8sr.o 4sc.o 4u5.o \
+@@ -692,7 +695,7 @@
+
+ hier.o: \
+ compile hier.c auto_home.h
+- ./compile hier.c
++ ./compile -DLIBDJBFFT=\"$(LIBDJBFFT)\" -DLIBPERMS=$(LIBPERMS) hier.c
+
+ install: \
+ load install.o hier.o auto_home.o strerr.a substdio.a open.a error.a \
+@@ -731,7 +734,9 @@
+ ( cat warn-auto.sh; \
+ echo 'main="$$1"; shift'; \
+ echo 'rm -f "$$main"'; \
+- echo 'ar cr "$$main" $${1+"$$@"}'; \
++ echo 'if [ "$${main##*.}" = "a" ]'; \
++ echo 'then'; \
++ echo ' ar cr "$$main" $${1+"$$@"}'; \
+ case "`cat systype`" in \
+ sunos-5.*) ;; \
+ unix_sv*) ;; \
+@@ -740,8 +745,11 @@
+ dgux-*) ;; \
+ hp-ux-*) ;; \
+ sco*) ;; \
+- *) echo 'ranlib "$$main"' ;; \
+- esac \
++ *) echo ' ranlib "$$main"' ;; \
++ esac; \
++ echo 'else'; \
++ echo ' exec `head -1 conf-ld` -shared -Wl,-soname,libdjbfft.so.0.7.6 -o "$$main" $${1+"$$@"}'; \
++ echo 'fi'; \
+ ) > makelib
+ chmod 755 makelib
+
+@@ -758,15 +766,15 @@
+ ./compile open_trunc.c
+
+ prog: \
+-djbfft.a accuracy accuracy2 speed speed.out
++$(LIBDJBFFT) accuracy accuracy2 speed speed.out
+
+ setup: \
+ it install
+ ./install
+
+ speed: \
+-load speed.o djbfft.a math.lib
+- ./load speed djbfft.a `cat math.lib`
++load speed.o $(LIBDJBFFT) math.lib
++ ./load speed $(LIBDJBFFT) `cat math.lib`
+
+ speed.o: \
+ compile speed.c fftr4.h real4.h fftr8.h real8.h fftc4.h complex4.h \
+@@ -775,7 +783,7 @@
+
+ speed.out: \
+ speed
+- ./speed > speed.out
++ LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" ./speed > speed.out
+
+ str.a: \
+ makelib byte_copy.o byte_cr.o str_len.o
+--- djbfft-0.76/hier.c.orig 1999-09-30 22:25:58.000000000 +0200
++++ djbfft-0.76/hier.c 2004-01-17 16:39:21.312774411 +0100
+@@ -2,12 +2,12 @@
+
+ void hier()
+ {
+- h(auto_home,-1,-1,02755);
++ h(auto_home,-1,-1,0755);
+
+- d(auto_home,"lib",-1,-1,02755);
+- c(auto_home,"lib","djbfft.a",-1,-1,0644);
++ d(auto_home,"lib",-1,-1,0755);
++ c(auto_home,"lib",LIBDJBFFT,-1,-1,LIBPERMS);
+
+- d(auto_home,"include",-1,-1,02755);
++ d(auto_home,"include",-1,-1,0755);
+ c(auto_home,"include","real4.h",-1,-1,0644);
+ c(auto_home,"include","real8.h",-1,-1,0644);
+ c(auto_home,"include","complex4.h",-1,-1,0644);
diff --git a/sci-libs/djbfft/metadata.xml b/sci-libs/djbfft/metadata.xml
new file mode 100644
index 000000000000..bd31424acb95
--- /dev/null
+++ b/sci-libs/djbfft/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ <name>Gentoo Video project</name>
+ </maintainer>
+ <longdescription lang="en">
+ D.J. Bernstein Fast Fourier Transform (djbfft) is an extremely
+ fast library for floating-point convolution. The current version
+ holds most of the speed records for double-precision FFTs on
+ general-purpose computers.
+ djbfft provides power-of-2 complex FFTs, real FFTs at twice the speed,
+ and fast multiplication of complex arrays. Single precision and double
+ precision are equally supported.
+</longdescription>
+</pkgmetadata>