dev-libs/xxhash: Compile xxhash.c just once, really
authorJeroen Roovers <jer@gentoo.org>
Sun, 9 Sep 2018 09:39:58 +0000 (11:39 +0200)
committerJeroen Roovers <jer@gentoo.org>
Sun, 9 Sep 2018 09:44:34 +0000 (11:44 +0200)
Package-Manager: Portage-2.3.49, Repoman-2.3.10

dev-libs/xxhash/files/xxhash-0.6.5-compile-xxhash.o-once.patch [new file with mode: 0644]
dev-libs/xxhash/files/xxhash-0.6.5-do-not-compile-xxhash.o-twice.patch [deleted file]
dev-libs/xxhash/xxhash-0.6.5.ebuild

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 (file)
index 0000000..2eb7f8c
--- /dev/null
@@ -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 (file)
index dcbc8c3..0000000
+++ /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
index f8633569a91b8d0756e2ad5ba3e7af9554c4ccb9..503fce79380444ac01c0bd64cf660dfcd6bf4357 100644 (file)
@@ -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() {