Opened 9 years ago
Closed 9 years ago
#50476 closed submission (fixed)
Portfile for GNOME Internet Radio Locator (GIRL) version 8.0.1
Reported by: | ole@… | Owned by: | dbevans (David B. Evans) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | maintainer | Cc: | raimue (Rainer Müller) |
Port: | girl |
Description
I am the main developer of the GNOME Internet Radio Locator (GIRL) program, and would like to see the attached Portfile included on the macports.org repository.
The GNOME Internet Radio Locator program allows the user to easily find and record live radio program on 77 radio broadcasters on the Internet.
GIRL is developed on the GNOME platform and it requires at least one audio player such as Totem to be installed for playback and streamripper for recording.
GIRL 8.0.1 compiles and play/record audio on Mac OS X with gtk2, glib2, libgnome, libgnomeui, libxml2, gnome-vfs, streamripper and totem from macports.org installed.
Attachments (3)
Change History (17)
comment:1 Changed 9 years ago by mf2k (Frank Schima)
Cc: | ole@… removed |
---|---|
Keywords: | internet radio locator removed |
Milestone: | MacPorts Future |
Version: | 2.3.4 |
comment:2 Changed 9 years ago by raimue (Rainer Müller)
Cc: | raimue@… added |
---|---|
Keywords: | maintainer added |
I would recommend the following approach to define master_sites
to reduce the required changes for a new version and additional make use of a wide range of GNOME mirrors. This is a common scheme also used in other ports:
name girl version 8.0.1 set branch [join [lrange [split $version .] 0 1] .] ... master_sites gnome:sources/${name}/${branch}/
I did not run any tests of functionality yet due to a large amount of missing dependencies on my system.
comment:3 Changed 9 years ago by dbevans (David B. Evans)
Owner: | changed from macports-tickets@… to devans@… |
---|---|
Status: | new → assigned |
In addition to the comments above, I'd suggest using the standard gnome livecheck invocation at the end of the port.
livecheck.type gnome
and add openmaintainer to the maintainer line to facilitate updates at least until you have commit access yourself.
Changed 9 years ago by ole@…
Updated portfile according to recommendations
comment:4 Changed 9 years ago by dbevans (David B. Evans)
Thanks. I'll do some testing and get back to you with issues, if any.
Changed 9 years ago by dbevans (David B. Evans)
Attachment: | patch-girl.diff added |
---|
Patch with suggested changes to port girl
comment:5 Changed 9 years ago by dbevans (David B. Evans)
I've managed to build the port and have done some preliminary testing. See the attached patch for the additional changes that I think are necessary.
build dependencies: I've added dependencies under depends_build that are necessary to configure & build the program but are not necessary at run time.
lib dependencies: I've added desktop-file-utils which provides the utility update-desktop-database
required in the post-activate processing section. In addition, for port glib2 I've used a path-style dependency declaration rather than just the port. This allows either port glib2 or port glib2-devel (current unstable version of glib2) to satisfy the dependency with glib2 as the default. This is standard throughout MacPorts.
intltool: MacPorts uses a specially patched version of intltool.m4 which generally requires any port that uses it to be reconfigured. In addition, the current version of intltool is 0.51 which introduces changes that necessitate rerunning intltoolize as well. This is most easily done by using the port's own autogen.sh to regenerate the configuration files. Since your tarball does not include the autogen.sh file, I've copied it from your git repo into the port's files
directory and added code to reinstall it during the post-patch phase. This is after extraction of the tarball and before configuration begins. The configuration cmd is then set to ./autogen.sh
to
start the reconfiguration.
post-activate processing: the post activate phase occurs after the contents of the port are unpacked into the target install location. As you can see, during this phase we regenerate the hicolor icon cache to include your icons and regenerate the desktop database to include the information from your girl.desktop
file.
livecheck: comes at the end by convention.
After applying this patch to your submitted Portfile, the port builds and installs as expected. I'm then able to run the girl
program, select a station and have it play in totem. Not every station produces a playable stream but perhaps this is normal. No North America stations appear to have any active streams but most European and Australian ones work fine. I tried recording a stream but the program froze after I hit the Record button so I wasn't able to stop the recording or play it back. Perhaps you can advise what to do here -- I'm not really familiar with the program. I also notice that the port installs help files that can be displayed using yelp but there is no Help menu to invoke yelp to display it.
Let me know if you have any questions or other changes that you would like to see. If the modified Portfile looks good to you, I'll be happy to commit it.
comment:6 Changed 9 years ago by ole@…
Thanks for building the port and doing the testing.
I have also noticed that some of the included radio station streams sometimes are unavailable at the time of testing, probably because they reach the limit of simultanous listeners.
The program depends on streamripper
for recording and launches it by calling g_spawn_async_with_pipes()
. Currently in GIRL 8.0.1 this hangs the GUI (see the function girl_helper_run()
in https://github.com/GNOME/girl/blob/master/src/girl-station.c#L312), however the streamripper
process is terminated as soon as the girl
process itself is terminated as the function girl_helper_run()
runs the g_child_watch_add()
function to catch termination of the streamripper
process.
If the configure option --with-record
is removed from the Portfile
, the Record button is not visible in the GUI and the bug can't be reproduced.
comment:7 Changed 9 years ago by dbevans (David B. Evans)
Given the problem with recording, I suggest either disabling it entirely until it can be fixed or disable it and add a variant to enable it for testing.
Have updated my proposed Portfile patch to demonstrate the second option by adding a variant +record. In addition, have added a +debug variant that enables building with debug symbols (for gdb) and your debug messages.
Have done that, running girl +debug resulted in a segfault after a few initial messages.
Here is the output of a run under gdb:
$ gdb girl (gdb) run Reading symbols for shared libraries . done ** Message: girl->selected_listener_uri: ** Message: girl->selected_listener_name: ** Message: girl->selected_listener_location: ** Message: girl->selected_listener_band: ** Message: girl->selected_listener_description: ** Message: girl->selected_station_uri: ** Message: girl->selected_station_name: ** Message: girl->selected_station_location: ** Message: girl->selected_station_band: ** Message: girl->selected_station_description: ** Message: girl->selected_streams_uri: ** Message: girl->selected_streams_mime: ** Message: girl->selected_streams_codec: ** Message: girl->selected_streams_bitrate: ** Message: girl->selected_streams_samplerate: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x000000000183be30 0x00007fff83e6ef92 in strlen () (gdb) bt #0 0x00007fff83e6ef92 in strlen () #1 0x00007fff83eb3d5a in __vfprintf () #2 0x00007fff83edc807 in __v2printf () #3 0x00007fff83eb258e in _vasprintf () #4 0x0000000100fac92b in g_vasprintf () #5 0x0000000100f8b640 in g_strdup_vprintf () #6 0x0000000100f78178 in g_logv () #7 0x0000000100f78122 in g_log () #8 0x000000010000ec2f in create_girl_app () at girl-gui.c:1064 #9 0x0000000100013299 in main (argc=1, argv=0x7fff5fbffa80) at girl.c:79 (gdb) list girl-gui.c:1064 1059 girl->selected_streams_codec); 1060 GIRL_DEBUG_MSG("girl->selected_streams_bitrate: %s\n", 1061 girl->selected_streams_bitrate); 1062 GIRL_DEBUG_MSG("girl->selected_streams_samplerate: %s\n", 1063 girl->selected_streams_samplerate); 1064 GIRL_DEBUG_MSG("girl->selected_channels: %s\n", 1065 girl->selected_streams_channels); 1066 1067 gnome_config_pop_prefix(); 1068 #endif (gdb) print girl->selected_streams_channels $1 = 25411120
Problem is that girl->selected_streams_channels is not a string but an enum (which appears not to be initialized at this first pass). Changing %s to %0x in the associated format string fixes the issue. Have included a patch to fix this as part of the updated Portfile patch.
Changed 9 years ago by dbevans (David B. Evans)
Attachment: | patch-girl.2.diff added |
---|
Proposed patch updated to include +debug +record variants
comment:8 Changed 9 years ago by dbevans (David B. Evans)
Concerning updated patch, I have removed the --mandir configuration item as it is the default.
comment:9 Changed 9 years ago by dbevans (David B. Evans)
The issue concerning streams that don't play seems to be an issue with totem. Running girl +debug shows that girl passes the right URL to totem -- it just doesn't play.
A good example is the default station, WNYC. URL is http://www.wnyc.org/stream/wnyc-fm939/mp3.pls. Running totem with this URL doesn't do anything (other than opening a blank player). URL plays fine with iTunes.
A counter example is Cam FM, URL http://stream.camfm.co.uk/camfm. This plays in totem, using girl or manually.
Will look into what's going on with totem.
comment:10 follow-up: 11 Changed 9 years ago by ole@…
Thanks for your work on the port.
The configure script tries to find the totem binary, but GIRL_HELPER_PLAYER gets defined from configure.ac and can be reconfigured with another player. I haven't found a way to pass the URL to itunes, but I guess it would be possible to define itunes as GIRL_HELPER_PLAYER instead of totem, allthough I'd prefer to launch totem since it is a free software package with source code available.
comment:11 Changed 9 years ago by dbevans (David B. Evans)
Replying to ole@…:
Thanks for your work on the port.
The configure script tries to find the totem binary, but GIRL_HELPER_PLAYER gets defined from configure.ac and can be reconfigured with another player. I haven't found a way to pass the URL to itunes, but I guess it would be possible to define itunes as GIRL_HELPER_PLAYER instead of totem, allthough I'd prefer to launch totem since it is a free software package with source code available.
I agree. I mentioned iTunes to show that the problem wasn't with girl or the station but with totem. Since I maintain the totem port I'm interested in getting it to work with these stations as well.
I think the port could be committed with the changes I've suggested. Do you agree?
comment:12 Changed 9 years ago by ole@…
Sure, feel free to commit the port.
I have applied the patch for changing %s to %0x in the associated format string fix upstream.
https://git.gnome.org/browse/girl/commit/?id=ac9daabecfba3fe159844a32c3463c54580c8f8e
comment:13 Changed 9 years ago by dbevans (David B. Evans)
Committed in r145360 as patched.
I'll open a ticket against the record issue so we can track it. In testing, I was able to confirm that streamripper is launched and rips the stream to a local file as intended. The GUI, however, blocks at this point so it is behaving synchronously rather than asynchronously as intended, Maybe you can track down what the issue is. I'll look into the totem playlist issue.
If you have any further updates to the port, whether bug fixes or new releases, please attach them to an update ticket with a copy to me. I'll be glad to help you commit the changes.
Thanks for submitting your port.
comment:14 Changed 9 years ago by dbevans (David B. Evans)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The Milestone field is for use by Macports team members only, please do not set it. As reporter, you do not need to Cc yourself.