commit:     406d69036668018cd3086eff091b37c36019ffc9
Author:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 13:35:52 2020 +0000
Commit:     Andrew Savchenko <bircoph <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 13:42:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406d6903

net-proxy/privoxy: fix build without native symlinks and custom STRIP

Original GNUMakefile uses $(STRIP) to pass optional -s argument to
install and $(STRIP_PROG) for strip binary. This caused problems
with custom STRIP set by portage. Fixed now by using $(STRIP) and
$(STRIP_ARGS).

Closes: https://bugs.gentoo.org/732572
Package-Manager: Portage-3.0.3, Repoman-3.0.0
Signed-off-by: Andrew Savchenko <bircoph <AT> gentoo.org>

 net-proxy/privoxy/files/privoxy-3.0.28-strip.patch | 47 ++++++++++++++++++++++
 net-proxy/privoxy/privoxy-3.0.28-r1.ebuild         |  1 +
 2 files changed, 48 insertions(+)

diff --git a/net-proxy/privoxy/files/privoxy-3.0.28-strip.patch 
b/net-proxy/privoxy/files/privoxy-3.0.28-strip.patch
new file mode 100644
index 00000000000..2ca24330b46
--- /dev/null
+++ b/net-proxy/privoxy/files/privoxy-3.0.28-strip.patch
@@ -0,0 +1,47 @@
+Privory uses STRIP Makefile variable for passing strip argument,
+this clashes with STRIP set in the environment. So rename STRIP ->
+STRIP_ARGS and then use real STRIP instead of STRIP_PROG with
+fallback on predefined "strip" if STRIP is not set.
+
+--- privoxy-3.0.28-stable/GNUmakefile.in.orig  2020-08-19 15:24:46.930551734 
+0300
++++ privoxy-3.0.28-stable/GNUmakefile.in       2020-08-19 16:12:18.214837417 
+0300
+@@ -117,7 +117,7 @@
+ CP         = cp -f
+ RMDIR      = rmdir
+ MKDIR      = ./mkinstalldirs
+-STRIP_PROG = strip
++STRIP     ?= strip
+ SED        = sed
+ GREP       = grep
+ CAT        = cat
+@@ -391,7 +391,7 @@
+       @$(ECHO) "You have run autoconf && autoheader && ./configure right?"
+       @$(ECHO) ""
+       $(MAKE) $(PROGRAM)
+-      $(STRIP_PROG) $(PROGRAM)
++      $(STRIP) $(PROGRAM)
+       $(LN) -s `pwd` ../privoxy-$(VERSION)-$(CODE_STATUS)
+ # add program
+       (cd .. && $(TAR) --exclude "PACKAGERS" -cvhf $(GEN_DIST_TAR_NAME) 
privoxy-$(VERSION)-$(CODE_STATUS)/$(PROGRAM))
+@@ -822,7 +822,7 @@
+        fi)
+ 
+ install-strip:
+-      $(MAKE) install STRIP=-s
++      $(MAKE) install STRIP_ARG=-s
+ 
+ # FIXME: Test USER and GROUP on Slack to make sure this works as
+ # intended.
+@@ -848,10 +848,10 @@
+               $(DESTDIR)$(CONF_DEST)/templates $(DESTDIR)$(SHARE_DEST) \
+               $(DESTDIR)$(LOG_DEST) $(DESTDIR)$(PID_DEST)
+       @# Install the executable binary, strip if invoked as install-strip
+-      @test -n "$(STRIP)" &&\
++      @test -n "$(STRIP_ARG)" &&\
+       $(ECHO) Installing $(PROGRAM) stripped executable to $(SBIN_DEST) ||\
+       $(ECHO) Installing $(PROGRAM) executable to $(DESTDIR)$(SBIN_DEST)
+-      $(INSTALL) $(INSTALL_P) $(STRIP) $(PROGRAM) $(DESTDIR)$(SBIN_DEST)
++      $(INSTALL) $(INSTALL_P) $(STRIP_ARG) $(PROGRAM) $(DESTDIR)$(SBIN_DEST)
+ 
+       @# Install the DOCS and man page. install-sh only does one file at a 
time.
+       @# FIXME: only handles jpegs.

diff --git a/net-proxy/privoxy/privoxy-3.0.28-r1.ebuild 
b/net-proxy/privoxy/privoxy-3.0.28-r1.ebuild
index 4bf768abcc4..7df385fb2d2 100644
--- a/net-proxy/privoxy/privoxy-3.0.28-r1.ebuild
+++ b/net-proxy/privoxy/privoxy-3.0.28-r1.ebuild
@@ -48,6 +48,7 @@ PATCHES=(
        "${FILESDIR}"/${PN}-3.0.19-gentoo.patch
        "${FILESDIR}"/${P}-chdir.patch
        "${FILESDIR}"/${P}-null-termination.patch
+       "${FILESDIR}"/${P}-strip.patch
 )
 
 pkg_pretend() {

Reply via email to