summaryrefslogtreecommitdiff
path: root/dev-libs/bitshuffle
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/bitshuffle')
-rw-r--r--dev-libs/bitshuffle/Manifest4
-rw-r--r--dev-libs/bitshuffle/bitshuffle-0.3.5.ebuild37
-rw-r--r--dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile50
-rw-r--r--dev-libs/bitshuffle/metadata.xml11
4 files changed, 102 insertions, 0 deletions
diff --git a/dev-libs/bitshuffle/Manifest b/dev-libs/bitshuffle/Manifest
new file mode 100644
index 000000000000..1226ae59e242
--- /dev/null
+++ b/dev-libs/bitshuffle/Manifest
@@ -0,0 +1,4 @@
+AUX bitshuffle-0.3.5-Makefile 1770 BLAKE2B 38debe6516431e20f133b95873ce94f5df9dfe9424fa501d8bf9e20c864957e8c1c3b69bfffe1587c9ec1a58beb4408bfe568e3b055ece87954084cdde753a73 SHA512 1eba096b1cffe0fee28236df877636421066e00d44b021e1f9d42e8a1012f314f2fd4dbcc4e4339bc669242e8c5ed661d36619c1cc2bbd6344d60abd98cbe693
+DIST bitshuffle-0.3.5.tar.gz 112312 BLAKE2B e9e70608217743a93d2bf5319af0f48feff391bb2893b161a1a4c391ab630c90fc59483041d7594eb8366a9469feb309f3b8054c8ecc630d070a9170735f61f5 SHA512 4ae371ab2e1adedb5c3a2c047e0583d320c87f0687d9dc1c921ed9e38d8b90a447fb305f399cd591adf48a473471fd5827f4da2777dd7f0fb6d5fd145fdeb36f
+EBUILD bitshuffle-0.3.5.ebuild 733 BLAKE2B bb241995cfbbe34a2e4ea9369816a114c88a7b1309bb42801591881adf6cb5b45b94bd78039ed25743cfbf84fa97a4c6b27b52ec83b00e654071170d6308e0ee SHA512 1407482cd625127a8cde3621e199559e3810bc395d7c3560a95f3d589b61a3a9c154f80412c0dcae0cc73bd327446b4d0fb7390914d343042634a7e91370a5a5
+MISC metadata.xml 323 BLAKE2B 395bf88139bea1ee92d2142ff9644b73d9f188c33377e2998a8899dbaf13eee43272ca9e06ad4ae7814c4e31db47255725f99a9a08231d4a6d3e93cd408030a2 SHA512 1e6d7f797d98eb00d3887e204e5be66af1cadd51051c5fe34ed32bf890b487f77874ff6484fad03fe5f72ee718f16e44218b65bd7eb84121605aaa73fe222d00
diff --git a/dev-libs/bitshuffle/bitshuffle-0.3.5.ebuild b/dev-libs/bitshuffle/bitshuffle-0.3.5.ebuild
new file mode 100644
index 000000000000..3a4dd5a7574d
--- /dev/null
+++ b/dev-libs/bitshuffle/bitshuffle-0.3.5.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2021-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Bitshuffle C library"
+HOMEPAGE="https://github.com/kiyo-masui/bitshuffle"
+SRC_URI="https://github.com/kiyo-masui/bitshuffle/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+
+DEPEND="
+ app-arch/lz4
+"
+
+src_prepare() {
+ cp "${FILESDIR}/${P}-Makefile" "Makefile" || die "Failed to copy Makefile"
+ default
+}
+
+src_configure() {
+ tc-export CC
+ export PACKAGE_VERSION="${PV}"
+}
+
+src_install() {
+ local prefix="${EPREFIX}/usr"
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${prefix}" \
+ LIBDIR="${prefix}/$(get_libdir)" \
+ install
+}
diff --git a/dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile b/dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile
new file mode 100644
index 000000000000..f38d0cc5f149
--- /dev/null
+++ b/dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile
@@ -0,0 +1,50 @@
+# Gentoo custom Makefile for Bitshuffle C library
+# Adapted from GNU Guix:
+# https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python-compression.scm?h=v1.3.0#n346
+# Distributed under the terms of the GNU General Public License v3
+
+# To avoid bundled dependency, the copy of lz4 included
+# in Bitshuffle's source tree is not used
+
+PACKAGE_VERSION ?= 0.3.5
+
+# Upstream has never specified an soname, so we need to conduct downstream
+# soname versioning. The format of soname is "lib${PN}.so.$(ver_cut 1)".
+# No incompatible ABI changes have been observed yet since version 0.2.4,
+# but just in case the upstream recklessly handles ABI compatibility,
+# please try to test ABI compatibility when updating to a new release,
+# using tools like 'abidiff' in dev-util/libabigail or alike.
+SONAME_VERSION := $(shell echo $(PACKAGE_VERSION) | cut -d. -f1)
+SONAME_BASE = libbitshuffle.so
+SONAME := $(SONAME_BASE).$(SONAME_VERSION)
+SOFILE := $(SONAME_BASE).$(PACKAGE_VERSION)
+
+CFLAGS := -O3 -ffast-math -std=c99 -fPIC $(CFLAGS)
+
+OBJS = \
+ src/bitshuffle.o \
+ src/bitshuffle_core.o \
+ src/iochain.o
+
+$(SOFILE): $(OBJS)
+ $(CC) $(CFLAGS) -o $@ -shared $(LDFLAGS) -Wl,-soname,$(SONAME) $^
+
+%.o: %.c
+ $(CC) $(CFLAGS) -Isrc -c $< -o $@
+
+INSTALL = install
+LN_S = ln -s
+
+PREFIX = /usr/local
+LIBDIR = $(PREFIX)/lib
+INCLUDEDIR = $(PREFIX)/include
+
+install: $(SOFILE)
+ $(INSTALL) -dm755 $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -dm755 $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m755 $(SOFILE) $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -m644 src/bitshuffle.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m644 src/bitshuffle_core.h $(DESTDIR)$(INCLUDEDIR)
+ $(INSTALL) -m644 src/iochain.h $(DESTDIR)$(INCLUDEDIR)
+ $(LN_S) $(SOFILE) $(DESTDIR)$(LIBDIR)/$(SONAME_BASE)
+ $(LN_S) $(SOFILE) $(DESTDIR)$(LIBDIR)/$(SONAME)
diff --git a/dev-libs/bitshuffle/metadata.xml b/dev-libs/bitshuffle/metadata.xml
new file mode 100644
index 000000000000..2884af49b9f0
--- /dev/null
+++ b/dev-libs/bitshuffle/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">kiyo-masui/bitshuffle</remote-id>
+ </upstream>
+</pkgmetadata>