Bug 218525 - multimedia/libcec: fails to build when udev is present
Summary: multimedia/libcec: fails to build when udev is present
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Carlos J. Puga Medina
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2017-04-10 09:32 UTC by holin
Modified: 2017-05-05 18:47 UTC (History)
3 users (show)

See Also:
mikael: maintainer-feedback+


Attachments
patch (1.48 KB, patch)
2017-04-10 19:18 UTC, Carlos J. Puga Medina
no flags Details | Diff
patch (1.20 KB, patch)
2017-04-12 17:52 UTC, Carlos J. Puga Medina
no flags Details | Diff
patch (1.25 KB, patch)
2017-04-29 12:35 UTC, Carlos J. Puga Medina
mikael: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description holin 2017-04-10 09:32:12 UTC
There are sysctlbyname calls in

libcec-libcec-4.0.2/src/libcec/adapter/Pulse-Eight/USBCECAdapterDetection.cpp

which depend on the respective headers (sys/types.h, sys/sysctl.h), which in turn are not #include'd when the port is built with udev present. 

An easy, non-portable, fix is to just include the #if __FreeBSD__ #includes in the UDEV conditional, too.
Comment 1 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-04-10 19:18:41 UTC
Created attachment 181665 [details]
patch
Comment 2 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-04-10 19:22:21 UTC
(In reply to holindho from comment #0)

Simply including sys/sysctl.h will be enough to build with UDEV.
Comment 3 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-04-12 17:52:27 UTC
Created attachment 181734 [details]
patch

Bump PORTREVISION is not required.
Comment 4 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-04-29 12:35:16 UTC
Created attachment 182175 [details]
patch
Comment 5 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-05-05 17:23:12 UTC
Mikael, 

Do you approve this change?

Please, set (+) to approve the attachment.
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2017-05-05 18:30:25 UTC
Already done 2017-05-04 09:28:53 CEST, Flags: maintainer-feedback?(mikael.urankar@gmail.com) → maintainer-feedback+

I approve the change ;)
Comment 7 Mikael Urankar freebsd_committer freebsd_triage 2017-05-05 18:32:08 UTC
ha sorry I don't know what I'm doing, too much buttons to click on bugzilla.

the patch is approved now :)
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-05-05 18:46:11 UTC
A commit references this bug:

Author: cpm
Date: Fri May  5 18:46:01 UTC 2017
New revision: 440201
URL: https://svnweb.freebsd.org/changeset/ports/440201

Log:
  - Add patch to fix libcec build when udev is present

  PR:		218525
  Submitted by:	cpm
  Reported by:	holindho@saunalahti.fi
  Approved by:	Mikael Urankar <mikael.urankar@gmail.com> (maintainer)

Changes:
  head/multimedia/libcec/files/patch-src_libcec_adapter_Pulse-Eight_USBCECAdapterDetection.cpp
Comment 9 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-05-05 18:47:09 UTC
Committed!

Thanks