diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-02-02 01:39:05 +0000 |
commit | fcc5224904648a8e6eb528d7603154160a20022f (patch) | |
tree | 3bfce096b38a9cea8eed13fc70c1526c456e9abd /dev-libs/bitshuffle/files | |
parent | 2fd57282f0262ca084e05b0f2c63fbada395d02b (diff) |
gentoo resync : 02.02.2022
Diffstat (limited to 'dev-libs/bitshuffle/files')
-rw-r--r-- | dev-libs/bitshuffle/files/bitshuffle-0.3.5-Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
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) |