diff options
-rw-r--r-- | dev-libs/bitshuffle/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/bitshuffle/bitshuffle-0.3.5.ebuild | 37 | ||||
-rw-r--r-- | dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile | 50 | ||||
-rw-r--r-- | dev-libs/bitshuffle/metadata.xml | 11 |
4 files changed, 99 insertions, 0 deletions
diff --git a/dev-libs/bitshuffle/Manifest b/dev-libs/bitshuffle/Manifest new file mode 100644 index 000000000000..4ac005d2b7cd --- /dev/null +++ b/dev-libs/bitshuffle/Manifest @@ -0,0 +1 @@ +DIST bitshuffle-0.3.5.tar.gz 112312 BLAKE2B e9e70608217743a93d2bf5319af0f48feff391bb2893b161a1a4c391ab630c90fc59483041d7594eb8366a9469feb309f3b8054c8ecc630d070a9170735f61f5 SHA512 4ae371ab2e1adedb5c3a2c047e0583d320c87f0687d9dc1c921ed9e38d8b90a447fb305f399cd591adf48a473471fd5827f4da2777dd7f0fb6d5fd145fdeb36f 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..1dca9429232c --- /dev/null +++ b/dev-libs/bitshuffle/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://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> |