Bug 196735 - [emulators/snes9x-gtk] Won't build. PortAudio error.
Summary: [emulators/snes9x-gtk] Won't build. PortAudio error.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Thomas Zander
URL:
Keywords: patch, patch-ready
Depends on:
Blocks:
 
Reported: 2015-01-14 21:25 UTC by Jordan Irwin
Modified: 2015-04-03 09:00 UTC (History)
4 users (show)

See Also:
root: maintainer-feedback+


Attachments
Build output for emulators/snes9x-gtk (13.14 KB, text/x-log)
2015-01-14 21:25 UTC, Jordan Irwin
no flags Details
config.log for emulators/snes9x-gtk (104.98 KB, text/x-log)
2015-01-14 21:33 UTC, Jordan Irwin
no flags Details
Patch for Makefile that adds option to enable/disable PortAudio support (823 bytes, patch)
2015-01-14 22:03 UTC, Jordan Irwin
no flags Details | Diff
Patch to clean up options and fix license (2.83 KB, patch)
2015-03-11 07:05 UTC, Allison Reid
root: maintainer-approval+
Details | Diff
Add snes9x to LEGAL (554 bytes, patch)
2015-03-11 07:06 UTC, Allison Reid
root: maintainer-approval+
Details | Diff
Snes9x default options log (87.37 KB, text/plain)
2015-03-11 07:07 UTC, Allison Reid
no flags Details
Snes9x all options log (112.20 KB, text/plain)
2015-03-11 07:07 UTC, Allison Reid
no flags Details
Patch to clean up options and fix license (3.52 KB, patch)
2015-03-28 23:18 UTC, Allison Reid
root: maintainer-approval+
Details | Diff
Poudriere testport with USES= desktop-file-utils (99.88 KB, text/plain)
2015-03-28 23:20 UTC, Allison Reid
no flags Details
Updated patch to clean up options and fix license (3.59 KB, patch)
2015-03-29 04:39 UTC, Thomas Zander
riggs: maintainer-approval? (root)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan Irwin 2015-01-14 21:25:11 UTC
Created attachment 151642 [details]
Build output for emulators/snes9x-gtk

I can't get snes9x-gtk to build. This is the second FreeBSD where I've had this problem and had to download the package.

The first error that comes up is "src/gtk_sound_driver_portaudio.cpp:8:28: error: unknown type name 'PaStreamCallbackTimeInfo'" I'll attach the full build log.

audio/portaudio and audio/portaudio2 are both installed on my system.

My system:
$ uname -a
FreeBSD AntumD_FreeBSD 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-14 21:25:11 UTC
Maintainer CC'd
Comment 2 Jordan Irwin 2015-01-14 21:33:01 UTC
Created attachment 151643 [details]
config.log for emulators/snes9x-gtk

Here is the build log.
Comment 3 Jordan Irwin 2015-01-14 21:33:46 UTC
Sorry, I meant to say "CONFIGURE log" in that last post.
Comment 4 Jordan Irwin 2015-01-14 22:03:26 UTC
Created attachment 151646 [details]
Patch for Makefile that adds option to enable/disable PortAudio support

I patched the Makefile and added an option to disable/enable PortAudio. When PortAudio is disabled the Port builds.
Comment 5 John Marino freebsd_committer freebsd_triage 2015-03-05 14:24:56 UTC
This PR is long timed out.
However, the maintainer listed in the port:
root@cooltrainer.org

I'm adding Nicole directly, maybe she doesn't know about the PR yet.
Comment 6 Allison Reid 2015-03-06 04:27:02 UTC
Yeah, sorry, I never got an email about this PR. Thanks for the manual CC, John :)

The patch to just disable Portaudio at build time looks fine but I'll take a look at the port this weekend and see if it can't be fixed for real.
Comment 7 Allison Reid 2015-03-11 07:05:35 UTC
Created attachment 154179 [details]
Patch to clean up options and fix license

A more thorough patch to actually fix PortAudio instead of just disabling it. We should also install the license. The license terms forbid distribution for profit which means this should have been NO_CDROM. Fix it.
Comment 8 Allison Reid 2015-03-11 07:06:34 UTC
Created attachment 154180 [details]
Add snes9x to LEGAL

This also needs to be in LEGAL if we are NO_CDROM.
Comment 9 Allison Reid 2015-03-11 07:07:20 UTC
Created attachment 154181 [details]
Snes9x default options log

Poudriere testport with defaults
Comment 10 Allison Reid 2015-03-11 07:07:52 UTC
Created attachment 154182 [details]
Snes9x all options log

Poudriere testlog with all the extras
Comment 11 Allison Reid 2015-03-11 07:08:57 UTC
I personally tested PortAudio and it works fine now :)

[nicole@emi#nicole] snes9x-gtk             
Sound buffer size: 8192 (2048 samples)
PortAudio sound driver initializing...
    --> (OSS : /dev/dsp, latency 64ms)...OK
borders don't fit within the image
Map_LoROMMap
Sound buffer size: 8192 (2048 samples)
ALSA sound driver initializing...
    --> (Device: default)...OK
    --> (16-bit, Stereo, 32000hz, 64 ms)...OK
Sound buffer size: 8192 (2048 samples)
PulseAudio sound driver initializing...
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
    --> (32000hz, 16-bit Stereo, 64ms)...OK
Sound buffer size: 8192 (2048 samples)
OSS sound driver initializing...
    --> (Device: /dev/dsp)...OK
    --> (Format: 16-bit)...OK
    --> (Stereo)...OK
    --> (Frequency: 32000)...OK
    --> (Buffer size: 8192 bytes, 64ms latency)...OK
Comment 12 John Marino freebsd_committer freebsd_triage 2015-03-20 13:11:09 UTC
I'm promoting this maintainer-submitted, poudriere-tested patch set.
Comment 13 Thomas Zander freebsd_committer freebsd_triage 2015-03-21 10:59:14 UTC
Isn't this line in post install
-@update-desktop-database
supposed to look like this
@-update-desktop-database ?

which raises the follow up question: Is it actually needed?
Comment 14 Allison Reid 2015-03-21 20:03:24 UTC
That came straight out of the FreeBSD GNOME docs a few years ago when I originally wrote this port. You can still see it in the "Desktop Database" section of https://www.freebsd.org/gnome/docs/porting.html

I couldn't find mention of it in the porter's handbook but looking around turned up USES= desktop-file-utils which appears to be the modern way of doing the same thing. It's needed because the .desktop entry installed by this port contains new MIME type associations for ROM images supported by the emulator. https://svnweb.freebsd.org/ports/head/Mk/Uses/desktop-file-utils.mk
Comment 15 Thomas Zander freebsd_committer freebsd_triage 2015-03-22 09:03:20 UTC
Could you test whether you notice any regression when using USES=... and omitting the post-install? If there are none, we could omit the latter.
Comment 16 Allison Reid 2015-03-28 23:18:54 UTC
Created attachment 154939 [details]
Patch to clean up options and fix license

Now with USES= desktop-file-utils
Comment 17 Allison Reid 2015-03-28 23:20:02 UTC
Created attachment 154940 [details]
Poudriere testport with USES= desktop-file-utils

No regression, lgtm
Comment 18 Thomas Zander freebsd_committer freebsd_triage 2015-03-29 04:39:00 UTC
Created attachment 154946 [details]
Updated patch to clean up options and fix license

Two changes compared to the last version of the patch
- We need c++11 when alsa option is selected, otherwise it does not build on 9.3
- Since only three items are left for PLIST, I moved those into the Makefile

Let me know whether you approve of those changes.
Comment 19 Allison Reid 2015-03-29 17:34:45 UTC
Comment on attachment 154946 [details]
Updated patch to clean up options and fix license

lgtm :)
Comment 20 commit-hook freebsd_committer freebsd_triage 2015-03-29 19:19:25 UTC
A commit references this bug:

Author: riggs
Date: Sun Mar 29 19:18:34 UTC 2015
New revision: 382621
URL: https://svnweb.freebsd.org/changeset/ports/382621

Log:
  Fix build errors with PortAudio and/or ALSA

  PR:		196735
  Submitted by:	antumdeluge@gmail.com (pr), root@cooltrainer.org (patch)
  Reviewed by:	riggs
  Approved by:	root@cooltrainer.org (maintainer)

Changes:
  head/LEGAL
  head/emulators/snes9x-gtk/Makefile
  head/emulators/snes9x-gtk/pkg-plist