public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: app-arch/libdeflate/files/, app-arch/libdeflate/
@ 2019-01-22 13:32 Martin Mokrejs
  0 siblings, 0 replies; only message in thread
From: Martin Mokrejs @ 2019-01-22 13:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8fc8b0f3f4e3c4aac5ecbf81c5a9d1d1e9769d1b
Author:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
AuthorDate: Tue Jan 22 13:31:48 2019 +0000
Commit:     Martin Mokrejs <mmokrejs <AT> fold <DOT> natur <DOT> cuni <DOT> cz>
CommitDate: Tue Jan 22 13:31:48 2019 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=8fc8b0f3

app-arch/libdeflate: make a patch to fix EPREFIX installations

Package-Manager: Portage-2.3.56, Repoman-2.3.12
Signed-off-by: Martin Mokrejs <mmokrejs <AT> fold.natur.cuni.cz>

 .../files/libdeflate-1.2-respect_EPREFIX.patch     | 54 ++++++++++++++++++++++
 app-arch/libdeflate/libdeflate-1.2.ebuild          |  9 ++--
 2 files changed, 57 insertions(+), 6 deletions(-)

diff --git a/app-arch/libdeflate/files/libdeflate-1.2-respect_EPREFIX.patch b/app-arch/libdeflate/files/libdeflate-1.2-respect_EPREFIX.patch
new file mode 100644
index 000000000..a583d7d2e
--- /dev/null
+++ b/app-arch/libdeflate/files/libdeflate-1.2-respect_EPREFIX.patch
@@ -0,0 +1,54 @@
+--- libdeflate-1.2/Makefile	2019-01-15 06:37:48.000000000 +0100
++++ libdeflate-1.2/Makefile	2019-01-22 14:06:13.427054892 +0100
+@@ -21,7 +21,7 @@
+ 	      1>&2 2>/dev/null; then echo $(1); fi)
+ 
+ override CFLAGS :=							\
+-	$(CFLAGS) -O2 -fomit-frame-pointer -std=c99 -I. -Icommon	\
++	-O2 $(CFLAGS) -fomit-frame-pointer -std=c99 -I. -Icommon	\
+ 	-Wall -Wundef							\
+ 	$(call cc-option,-Wpedantic)					\
+ 	$(call cc-option,-Wdeclaration-after-statement)			\
+@@ -34,6 +34,9 @@
+ ##############################################################################
+ 
+ PREFIX ?= /usr
++BINDIR ?= $(PREFIX)/bin
++INCDIR ?= $(PREFIX)/include
++LIBDIR ?= $(PREFIX)/lib
+ 
+ SOVERSION          := 0
+ STATIC_LIB_SUFFIX  := .a
+@@ -240,20 +243,20 @@
+ all:$(DEFAULT_TARGETS)
+ 
+ install:all
+-	install -Dm644 -t $(DESTDIR)$(PREFIX)/lib $(STATIC_LIB)
+-	install -Dm755 -t $(DESTDIR)$(PREFIX)/lib $(SHARED_LIB)
+-	ln -sf $(SHARED_LIB) $(DESTDIR)$(PREFIX)/lib/libdeflate.so
+-	install -Dm644 -t $(DESTDIR)$(PREFIX)/include libdeflate.h
+-	install -Dm755 gzip $(DESTDIR)$(PREFIX)/bin/libdeflate-gzip
+-	ln -f $(DESTDIR)$(PREFIX)/bin/libdeflate-gzip $(DESTDIR)$(PREFIX)/bin/libdeflate-gunzip
++	install -Dm644 -t $(DESTDIR)$(LIBDIR) $(STATIC_LIB)
++	install -Dm755 -t $(DESTDIR)$(LIBDIR) $(SHARED_LIB)
++	ln -sf $(SHARED_LIB) $(DESTDIR)$(LIBDIR)/libdeflate.so
++	install -Dm644 -t $(DESTDIR)$(INCDIR) libdeflate.h
++	install -Dm755 gzip $(DESTDIR)$(BINDIR)/libdeflate-gzip
++	ln -f $(DESTDIR)$(BINDIR)/libdeflate-gzip $(DESTDIR)$(BINDIR)/libdeflate-gunzip
+ 
+ uninstall:
+-	rm -f $(DESTDIR)$(PREFIX)/lib/$(STATIC_LIB) \
+-		$(DESTDIR)$(PREFIX)/lib/$(SHARED_LIB) \
+-		$(DESTDIR)$(PREFIX)/lib/libdeflate.so \
+-		$(DESTDIR)$(PREFIX)/include/libdeflate.h \
+-		$(DESTDIR)$(PREFIX)/bin/libdeflate-gzip \
+-		$(DESTDIR)$(PREFIX)/bin/libdeflate-gunzip
++	rm -f $(DESTDIR)$(LIBDIR)/$(STATIC_LIB) \
++		$(DESTDIR)$(LIBDIR)/$(SHARED_LIB) \
++		$(DESTDIR)$(LIBDIR)/libdeflate.so \
++		$(DESTDIR)$(INCDIR)/libdeflate.h \
++		$(DESTDIR)$(BINDIR)/libdeflate-gzip \
++		$(DESTDIR)$(BINDIR)/libdeflate-gunzip
+ 
+ test_programs:$(TEST_PROGRAMS)
+ 

diff --git a/app-arch/libdeflate/libdeflate-1.2.ebuild b/app-arch/libdeflate/libdeflate-1.2.ebuild
index a4baea15e..5548ea150 100644
--- a/app-arch/libdeflate/libdeflate-1.2.ebuild
+++ b/app-arch/libdeflate/libdeflate-1.2.ebuild
@@ -18,15 +18,12 @@ DEPEND=""
 RDEPEND="${DEPEND}"
 BDEPEND=""
 
-src_prepare(){
-	sed -e 's/ -O2 / /' -i Makefile || die
-	sed -e "s#${DESTDIR}${PREFIX}/lib#${ED}/usr/$(get_libdir)#" -i Makefile || die
-	default
-}
+PATCHES=( "${FILESDIR}"/libdeflate-1.2-respect_EPREFIX.patch )
 
 src_install() {
-	default
 	if ! use static-libs; then
 		find "${ED}" -name '*.a' -delete || die
 	fi
+	emake install DESTDIR="${ED}" LIBDIR=/usr/"$(get_libdir)"
+	dodoc NEWS README.md
 }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-01-22 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-22 13:32 [gentoo-commits] proj/sci:master commit in: app-arch/libdeflate/files/, app-arch/libdeflate/ Martin Mokrejs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox