Created attachment 205063 [details] GSequencer about dialog Hi yuri, Please provide logo and license to Advanced Gtk+ Sequencer at build time, by substitute CPPFLAGS environment variable before `./configure`. Add the C macros to configure script by setting it in CPPFLAGS. For an example look at AM_CPPFLAGS in Makefile.am. Optionally you can provide environment variables to the binary. `AGS_LICENSE_FILENAME=/usr/local/share/licenses/gsequencer-2.1.76/GPLv3 AGS_LOGO_FILENAME=/usr/local/share/gsequencer/images/ags.png gsequencer` by, Joël
(In reply to Joël Krähemann from comment #0) Hi Joël, Thanks for reporting this. I will update the port with the changes you requested. Yuri
(In reply to Joël Krähemann from comment #0) > For an example look at AM_CPPFLAGS in Makefile.am. I don't see anything related to logo or license in AM_CPPFLAGS lines in Makefile.am. Could you please provide an example what build-time environment variables should be provided to configure assuming the paths for logo and license are known? ------- I also noticed that there are memory leaks in ags/gsequencer_main.c. For example, in > str = malloc(PATH_MAX * sizeof(gchar)); > sprintf(str, > "AGS_LICENSE_FILENAME=%s/GPL-3", > data_dir); > putenv(str); str needs to be freed every time it is malloc-ed. Also, technically this code should be: > str = malloc((strlen("AGS_LICENSE_FILENAME=") + PATH_MAX + strlen("/GPL-3") + 1) * sizeof(gchar)); > sprintf(str, > "AGS_LICENSE_FILENAME=%s/GPL-3", > data_dir); > putenv(str); The original code would crash if strlen(data_dir)==PATH_MAX. Yuri
Hi Ineiev, Sorry the C macro has got the very same name as the environment variable. So in your Makefile.am do: AM_CPPFLAGS += -DAGS_LICENSE_FILENAME=\"/usr/local/share/licenses/gsequencer-2.1.76/GPLv3\" -DAGS_LOGO_FILENAME=\"/usr/local/share/gsequencer/images/ags.png\" See in ags_menu_action_about_callback() here: https://github.com/gsequencer/gsequencer/blob/2.1.x/ags/X/ags_menu_action_callbacks.c#L1267 The memory-leak is not within executable code. Sorry, I don't use it anymore.
Sorry I mean Yuri :/
Hi Yuri, Here more about preprocessor options: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html
Created attachment 205067 [details] Preprocessor patch for license and logo in Makefile.am
Hi Yuri, Just provided a patch :) cheers, Joël
(In reply to Joël Krähemann from comment #7) Ideally, the location of /usr/local/share/gsequencer/images/ags.png is known to the executable. It is in ${DATADIR}, other files are alongside it: ${DATADIR}/icons/jumper.png, etc. Only the license file should be supplied as a define.
*** Bug 238566 has been marked as a duplicate of this bug. ***
Committed a similar patch. Thank you for reporting the problem.
A commit references this bug: Author: yuri Date: Sat Jun 15 03:01:10 UTC 2019 New revision: 504223 URL: https://svnweb.freebsd.org/changeset/ports/504223 Log: audio/gsequencer: Add defines for the app to find license and logo screen png; Strip the binary PR: 238567 Reported by: Jo?l Kr?hemann <jkraehemann@gmail.com> (upstream) Changes: head/audio/gsequencer/Makefile
Hi Yuri, The license location is wrong. It should be: -DAGS_LICENSE_FILENAME=\"/usr/local/share/licenses/gsequencer-2.1.76_1/GPLv3\"
A commit references this bug: Author: yuri Date: Sat Jun 15 17:27:37 UTC 2019 New revision: 504249 URL: https://svnweb.freebsd.org/changeset/ports/504249 Log: audio/gsequencer: Fix the license file name supplied to the build PR: 238567 Reported by: Jo?l Kr?hemann <jkraehemann@gmail.com> Changes: head/audio/gsequencer/Makefile