From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSJ6g-0003Ls-Lf for guix-patches@gnu.org; Fri, 22 Dec 2017 03:55:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSJ6c-0007xL-No for guix-patches@gnu.org; Fri, 22 Dec 2017 03:55:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:38132) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSJ6c-0007ws-Ii for guix-patches@gnu.org; Fri, 22 Dec 2017 03:55:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eSJ6c-0001BM-BQ for guix-patches@gnu.org; Fri, 22 Dec 2017 03:55:02 -0500 Subject: [bug#29760] [PATCH] surfraw: hardcode perl during build time Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <1513547487.163724.1208065704.02B619BB@webmail.messagingengine.com> Date: Fri, 22 Dec 2017 09:54:08 +0100 In-Reply-To: <1513547487.163724.1208065704.02B619BB@webmail.messagingengine.com> (Mark Meyer's message of "Sun, 17 Dec 2017 22:51:27 +0100") Message-ID: <87mv2bb0sv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Mark Meyer Cc: 29760@debbugs.gnu.org Hi Mark, Mark Meyer skribis: > From dcc195481cb84f295a364c2c7cb023f33899745e Mon Sep 17 00:00:00 2001 > From: Mark Meyer > Date: Sun, 17 Dec 2017 22:47:15 +0100 > Subject: [PATCH] gnu: surfraw: Find path to perl. > > * gnu/packages/patches/surfraw-find-perl.patch: New file. > * gnu/packages/web.scm (surfraw)[native-inputs]: Add autoconf, automake. > [package]: Add surfraw-find-perl.patch. > [arguments]: Add 'autoreconf phase. > --- > gnu/packages/patches/surfraw-find-perl.patch | 35 ++++++++++++++++++++++= ++++++ > gnu/packages/web.scm | 9 ++++++- > 2 files changed, 43 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/surfraw-find-perl.patch > > diff --git a/gnu/packages/patches/surfraw-find-perl.patch b/gnu/packages/= patches/surfraw-find-perl.patch > new file mode 100644 > index 000000000..b995ab025 > --- /dev/null > +++ b/gnu/packages/patches/surfraw-find-perl.patch > @@ -0,0 +1,35 @@ > +diff -Naur surfraw-2.2.9-orig/configure.in surfraw-2.2.9/configure.in > +--- surfraw-2.2.9-orig/configure.in 2013-12-10 18:07:06.000000000 +0100 > ++++ surfraw-2.2.9/configure.in 2017-12-17 22:19:14.648432687 +0100 > +@@ -53,6 +53,8 @@ > + dnl Checks for programs. > + AC_PROG_INSTALL > + AC_PROG_AWK > ++AC_PATH_PROG([PERL], [perl], [perl]) > ++AC_SUBST(PERL) > +=20 > + AC_CONFIG_FILES([Makefile surfraw.lsm surfraw.spec elvi/Makefile test/M= akefile examples/Makefile]) > + AC_OUTPUT > +diff -Naur surfraw-2.2.9-orig/Makefile.am surfraw-2.2.9/Makefile.am > +--- surfraw-2.2.9-orig/Makefile.am 2013-12-10 18:07:06.000000000 +0100 > ++++ surfraw-2.2.9/Makefile.am 2017-12-17 22:13:48.205031190 +0100 > +@@ -35,6 +35,7 @@ > + sed -e 's,@VERSION\@,${VERSION},g; '\ > + -e 's,@ELVIDIR\@,${ELVIDIR},g; '\ > + -e 's,@AWK\@,${AWK},g; '\ > ++ -e 's,@PERL\@,${PERL},g; '\ > + -e 's,@sysconfdir\@,${sysconfdir},g ' $? > $@.tmp > + chmod +x $@.tmp > + mv $@.tmp $@ > +diff -Naur surfraw-2.2.9-orig/surfraw.IN surfraw-2.2.9/surfraw.IN > +--- surfraw-2.2.9-orig/surfraw.IN 2013-12-10 18:07:06.000000000 +0100 > ++++ surfraw-2.2.9/surfraw.IN 2017-12-17 22:14:01.613171144 +0100 > +@@ -160,7 +160,7 @@ > +=20 > + quote_ifs () { > + if [ -z "$1" ]; then return; fi > +- perl -e '$ifs=3D$ENV{IFS} || " "; $arg=3Dshift;if($arg =3D~/[$ifs]= /) { $arg=3D"\"$arg\""; } print "$arg\n"; ' -- "$1" > ++ @PERL@ -e '$ifs=3D$ENV{IFS} || " "; $arg=3Dshift;if($arg =3D~/[$if= s]/) { $arg=3D"\"$arg\""; } print "$arg\n"; ' -- "$1" > + } > +=20 > + bookmark_file_search () { I think this is the right patch for upstream. However, for Guix proper, we might be better off simply patching the relevant file with =E2=80=98substitute*=E2=80=99 in a post-install phase fo= r instance. That way we would avoid the extra dependency on Autoconf/Automake. How does that sound? If that=E2=80=99s too cumbersome we can apply this patch. Thanks, Ludo=E2=80=99.