Bug 234549

Summary: devel/libappindicator: Fails to build if lang/vala is installed
Product: Ports & Packages Reporter: John Hein <jcfyecrayz>
Component: Individual Port(s)Assignee: Steve Wills <swills>
Status: Closed FIXED    
Severity: Affects Some People CC: gnome, swills
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: maintainer-feedback? (swills)
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
[patch] add VAPI option (default off) to fix build failure
none
[patch] add VAPI option (default off) to fix build failure [v2] jcfyecrayz: maintainer-approval? (swills)

Description John Hein 2019-01-01 22:11:27 UTC
Created attachment 200685 [details]
[patch] add VAPI option (default off) to fix build failure

'make -C lang/vala build' fails if lang/vala is installed:


==================
 .
 .
gmake[5]: Entering directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0/bindings/vala/examples'
/usr/local/bin/valac --pkg appindicator3-0.1 --vapidir=../../../bindings/vala --save-temps -C indicator-example.vala -o indicator-example.c
warning: --output and -o have no effect when -C or --ccode is set
warning: --save-temps has no effect when -C or --ccode is set
indicator-example.vala:40.3-40.30: warning: AppIndicator.Indicator.set_attention_icon is deprecated
Compilation succeeded - 3 warning(s)
/usr/bin/sed -i "s|#include\s*<\s*libappindicator/app-indicator.h\s*>||g" indicator-example.c
sed: 1: "indicator-example.c": command i expects \ followed by text
gmake[5]: *** [Makefile:632: indicator-example.c] Error 1
gmake[5]: Leaving directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0/bindings/vala/examples'
gmake[4]: *** [Makefile:418: all-recursive] Error 1
gmake[4]: Leaving directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0/bindings/vala'
gmake[3]: *** [Makefile:353: all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0/bindings'
gmake[2]: *** [Makefile:409: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0'
gmake[1]: *** [Makefile:339: all] Error 2
gmake[1]: Leaving directory '/usr/ports/devel/libappindicator/work/libappindicator-12.10.0'
+ [ -n 'Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer.' ]
+ echo '===> Compilation failed unexpectedly.'
===> Compilation failed unexpectedly.
+ echo 'Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer.'
+ /usr/bin/fmt 75 79
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
+ false
*** Error code 1

Stop.
make: stopped in /usr/ports/devel/libappindicator
======================

'configure' detects vala and enables the VAPI stuff.  This build will fail because a makefile rule invokes sed -i without an extension.  This is allowed with gnu sed, but not bsd sed.

The attached patch addresses this by allowing the VAPI option (default off) to explicitly disable the VAPI stuff rather than allowing configure to detect it and use it.  If enabled, it patches the Makefile.in with the offending sed command.
Comment 1 John Hein 2019-01-01 22:18:45 UTC
Created attachment 200686 [details]
[patch] add VAPI option (default off) to fix build failure [v2]

Also add LICENSE stuff to appease portlint.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-01-05 02:46:00 UTC
A commit references this bug:

Author: swills
Date: Sat Jan  5 02:45:37 UTC 2019
New revision: 489298
URL: https://svnweb.freebsd.org/changeset/ports/489298

Log:
  devel/libappindicator: Fix build if lang/vala is installed

  PR:		234549
  Submitted by:	John Hein <jcfyecrayz@liamekaens.com>

Changes:
  head/devel/libappindicator/Makefile
  head/devel/libappindicator/files/extra-patch-bindings-vala-examples-Makefile.in
  head/devel/libappindicator/pkg-plist
Comment 3 Steve Wills freebsd_committer freebsd_triage 2019-01-05 02:46:52 UTC
Committed, thanks!