From 173c62837c28971e2c0c3bbc038ec16fe4930b38 Mon Sep 17 00:00:00 2001 From: Jeroen Roovers Date: Sun, 9 Sep 2018 11:39:58 +0200 Subject: [PATCH] dev-libs/xxhash: Compile xxhash.c just once, really Package-Manager: Portage-2.3.49, Repoman-2.3.10 --- .../xxhash-0.6.5-compile-xxhash.o-once.patch | 28 +++++++++++++++++++ ...-0.6.5-do-not-compile-xxhash.o-twice.patch | 11 -------- dev-libs/xxhash/xxhash-0.6.5.ebuild | 2 +- 3 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 dev-libs/xxhash/files/xxhash-0.6.5-compile-xxhash.o-once.patch delete mode 100644 dev-libs/xxhash/files/xxhash-0.6.5-do-not-compile-xxhash.o-twice.patch diff --git a/dev-libs/xxhash/files/xxhash-0.6.5-compile-xxhash.o-once.patch b/dev-libs/xxhash/files/xxhash-0.6.5-compile-xxhash.o-once.patch new file mode 100644 index 000000000000..2eb7f8c22a8b --- /dev/null +++ b/dev-libs/xxhash/files/xxhash-0.6.5-compile-xxhash.o-once.patch @@ -0,0 +1,28 @@ +--- a/Makefile ++++ b/Makefile +@@ -82,7 +82,7 @@ + all: lib xxhsum xxhsum_inlinedXXH + + xxhsum32: CFLAGS += -m32 +-xxhsum xxhsum32: xxhash.c xxhsum.c ++xxhsum xxhsum32: xxhash.o xxhsum.c + $(CC) $(FLAGS) $^ -o $@$(EXT) + + .PHONY: xxhsum_and_links +@@ -105,12 +105,12 @@ + ifeq (,$(filter Windows%,$(OS))) + $(LIBXXH): LDFLAGS += -fPIC + endif +-$(LIBXXH): xxhash.c ++$(LIBXXH): xxhash.o + @echo compiling dynamic library $(LIBVER) +- @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ ++ $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + @echo creating versioned links +- @ln -sf $@ libxxhash.$(SHARED_EXT_MAJOR) +- @ln -sf $@ libxxhash.$(SHARED_EXT) ++ ln -sf $@ libxxhash.$(SHARED_EXT_MAJOR) ++ ln -sf $@ libxxhash.$(SHARED_EXT) + + libxxhash : $(LIBXXH) + diff --git a/dev-libs/xxhash/files/xxhash-0.6.5-do-not-compile-xxhash.o-twice.patch b/dev-libs/xxhash/files/xxhash-0.6.5-do-not-compile-xxhash.o-twice.patch deleted file mode 100644 index dcbc8c32dec9..000000000000 --- a/dev-libs/xxhash/files/xxhash-0.6.5-do-not-compile-xxhash.o-twice.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -82,7 +82,7 @@ - all: lib xxhsum xxhsum_inlinedXXH - - xxhsum32: CFLAGS += -m32 --xxhsum xxhsum32: xxhash.c xxhsum.c -+xxhsum xxhsum32: xxhash.o xxhsum.c - $(CC) $(FLAGS) $^ -o $@$(EXT) - - .PHONY: xxhsum_and_links diff --git a/dev-libs/xxhash/xxhash-0.6.5.ebuild b/dev-libs/xxhash/xxhash-0.6.5.ebuild index f8633569a91b..503fce793804 100644 --- a/dev-libs/xxhash/xxhash-0.6.5.ebuild +++ b/dev-libs/xxhash/xxhash-0.6.5.ebuild @@ -17,7 +17,7 @@ DEPEND="" S="${WORKDIR}/xxHash-${PV}" PATCHES=( - "${FILESDIR}"/${PN}-0.6.5-do-not-compile-xxhash.o-twice.patch + "${FILESDIR}"/${PN}-0.6.5-compile-xxhash.o-once.patch ) src_configure() { -- 2.26.2