Solved lang/gawk

update fails with:
Code:
===>  Patching for gawk-4.1.2
===>  Applying FreeBSD patches for gawk-4.1.2
1 out of 1 hunks failed--saving rejects to Makefile.in.rej
=> Patch patch-Makefile failed to apply cleanly.
*** Error code 1

Makefile.rej
Code:
less gawk-4.1.2/Makefile.in.rej
@@ -1151,7 +1151,7 @@
install-exec-hook:
  (cd $(DESTDIR)$(bindir); \
  $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \
-  if [ ! -f awk ]; \
+  if ! /usr/bin/which -s awk; \
  then  $(LN_S) gawk$(EXEEXT) awk; \
  fi; exit 0)

It's a little bit strange, cause it couldn't have anything to do with the recent change of

https://svnweb.freebsd.org/ports/head/lang/gawk/Makefile?r1=385057&r2=385056&pathrev=385057.

I have sent a mail to the maintainer.
 
One thing I have found

Makefile.in.orig
Code:
if [ ! -f awk$(EXEEXT) ]; \
patch-Makefile
Code:
-  if [ ! -f awk ]; \

but there must be another error, it still not works I think it's the linenumber
Code:
@@ -1151,7 +1151,7
in the patch - less -N shows me line 1176 or 1178 in Makefile.in.orig.

But if I corrected by hand:
Code:
===>  Applying FreeBSD patches for gawk-4.1.2
1 out of 1 hunks failed--saving rejects to extension/Makefile.in.rej
=> Patch patch-extension_Makefile.in failed to apply cleanly.
*** Error code 1
 
Worked if I renamed files/patch-extensions_Makefile.in to files/_patch-extensions_Makefile.in. Seems this patch is not needed anymore.
 
This is actually a pretty easy one to make the final patch yourself.

See here:
https://www.freebsd.org/doc/en/books/porters-handbook/port-upgrading.html#svn-diff

Based on the Handbook, this should make the patch for that PR.
svnlite co https://svn0.us-east.freebsd.org/ports/head/lang/gawk
cd gawk
svnlite del files/patch-extension_Makefile.in
svnlite diff > ../`make -VPKGNAME`.diff


I am assuming you are on FreeBSD 10+. If not, then devel/subversion would be required and you would use svn over svnlite.
 
Thanks junovitch, but I am catching with diff. I could get any output if I make diff Makefile.in Makefile.in.orig . I know I had extract the distfile, and change some things. Then diff would give the correct result. But I want do it. I have found a solution and waiting for the correcting patch or something else. What I don't understand is that I can't click my PR.
(Something OT - I hate formatting).
 
I noticed that as well. It appears that Bugzilla in general is down right now as even the homepage is unavailable. Try back later.
 
The easiest thing is to use Subversion for the patches with the handbook steps. It's far easier than manually doing diff on files. It doesn't matter much where you run the commands, you can start from /root and do the checkout from there then cd /root/gawk, do the commands I mentioned above, test it with a make install, and submit the resulting success for the maintainer to review and apply.
 
Since the maintainer didn't close the PR you can do so yourself. Save them some time as closing things as being fixed outside the PR.
 
Back
Top