Bug 236155

Summary: [NEW PORT] devel/appmenu-gtk-module: GTK module for putting application menubar in a global menubar
Product: Ports & Packages Reporter: Trenton Schulz <trueos>
Component: Individual Port(s)Assignee: Niclas Zeising <zeising>
Status: Closed FIXED    
Severity: Affects Only Me CC: gnome, zeising
Priority: --- Keywords: feature, needs-qa
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
shar file for devel/appmenu-gtk-module
none
Updated sharfile
none
Updated sharfile
none
Corrected shar file
none
Corrected shar file and updated to 0.7.3.2
none
Updated shar file that removes spurious glib-compile-schema command while staging none

Description Trenton Schulz 2019-03-02 16:36:26 UTC
Created attachment 202506 [details]
shar file for devel/appmenu-gtk-module

A port for the appmenu_gtk_module.

I didn't see this in the ports tree and I like being able to use the global menu bar. So, here is a port that works after some very small changes.
Comment 1 Trenton Schulz 2019-09-17 10:41:30 UTC
Created attachment 207564 [details]
Updated sharfile

Update shar file for updated ports system and version of software.
Comment 2 Trenton Schulz 2019-11-03 16:47:53 UTC
Created attachment 208823 [details]
Updated sharfile

Updated sharfile
Comment 3 Trenton Schulz 2020-01-24 18:34:31 UTC
Add gnome as a CC as I've used this port for several months and enjoy having global menu bar in KDE working for both Qt and GTK applications like evolution.
Comment 4 Niclas Zeising freebsd_committer freebsd_triage 2020-09-19 15:21:44 UTC
Grab
Comment 5 Niclas Zeising freebsd_committer freebsd_triage 2020-09-20 14:52:08 UTC
Hi!
I'm getting the following error when trying to build the port:

-- Configuring done
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/wrkdirs/usr/ports/x11/gtk-app-menu/work/vala-panel-appmenu-c2cb48f07d95079e566eed78b28880e00f31c637-c2cb48f07d95079e566eed78b28880e00f31c637/subprojects/appmenu-gtk-module/lib/GTK3_INCLUDE_GDK
   used as include directory in directory /wrkdirs/usr/ports/x11/gtk-app-menu/work/vala-panel-appmenu-c2cb48f07d95079e566eed78b28880e00f31c637-c2cb48f07d95079e566eed78b28880e00f31c637/subprojects/appmenu-gtk-module/lib

CMake Error in src/CMakeLists.txt:
  Imported target "GTK3::GTK" includes non-existent path

    "GTK3_INCLUDE_GDK-NOTFOUND"

  in its INTERFACE_INCLUDE_DIRECTORIES.  Possible reasons include:

  * The path was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and references files it does not
  provide.



-- Generating done

It looks to me that there are dependencies missing from the port.
Comment 6 Trenton Schulz 2020-09-20 16:54:10 UTC
Hmm... OK. I'll take a look and see what I missed.
Comment 7 Trenton Schulz 2020-09-20 19:39:18 UTC
Created attachment 218116 [details]
Corrected shar file

Corrected shar file with x11 category and uses pkgconfig
Comment 8 Trenton Schulz 2020-09-20 19:41:44 UTC
(In reply to Niclas Zeising from comment #5)

Hi Niclas,

The package was using pkgconfig and I didn't know about that. I've uploaded a corrected shar file with a corrected Makefile.

Could you please try again?
Comment 9 Trenton Schulz 2020-09-20 19:55:49 UTC
Created attachment 218117 [details]
Corrected shar file and updated to 0.7.3.2

Also updated to 0.7.3.2
Comment 10 Niclas Zeising freebsd_committer freebsd_triage 2020-10-03 09:40:19 UTC
Hi!
The installation and packaging is now working, however, during staging I see the following error:

===>   Generating temporary packing list
[0/1] cd /wrkdirs/usr/ports/x11/gtk-app-menu/work/.build && /usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /wrkdirs/usr/ports/x11/gtk-app-menu/work/stage/usr/local/share/glib-2.0/schemas/org.appmenu.gtk-module.gschema.xml
-- Compiling GSettings schemas
Failed to create file “/usr/local/share/glib-2.0/schemas/gschemas.compiled.RU32R0”: Permission denied
-- Installing: /wrkdirs/usr/ports/x11/gtk-app-menu/work/stage/usr/local/lib/pkgconfig/appmenu-gtk3-parser.pc

Something tries to touch /usr/local/share/glib-2.0/schemas/gschemas.compiled.RU32R0.  I'm not sure exactly what this is.  It is getting permission denied, since poudriere by default runs builds as the nobody user, however, if someone is running the build from the ports tree as root, this might cause issues.
Comment 11 Trenton Schulz 2020-10-06 07:03:41 UTC
(In reply to Niclas Zeising from comment #10)

Thanks for trying this again. I'll take a look. Unfortunately, my main build computer is packed away so it may take a couple of days.

The schema stuff was done based on the information in the porters handbook:

https://www.freebsd.org/doc/en/books/porters-handbook/using-gnome.html

I wonder if the file has just moved...
Comment 12 Niclas Zeising freebsd_committer freebsd_triage 2020-10-07 07:03:34 UTC
(In reply to Trenton Schulz from comment #11)

I'm not entirely sure how the schema stuff is handled either, but based on what's in the handbook, it seems you've done it the right way.

I'll try to reach out to someone with more gnome knowledge and see if I can figure out something.
Comment 13 Trenton Schulz 2020-10-11 18:26:36 UTC
(In reply to Niclas Zeising from comment #12)

I took a look and it seems it's the cmakefile that wants to try and compile the current schemas (.build/data/cmake_install.cmake)

if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT)
  execute_process (COMMAND /usr/local/bin/glib-compile-schemas /usr/local/share/glib-2.0/schemas/)
endif()

This is where the error shows up.

My cmake skills are rudimentary, but I'm wondering if this is incorrect as far as staging goes (or at least could be skipped for the port, I'll have to investigate more).
Comment 14 Trenton Schulz 2020-10-11 18:49:13 UTC
Created attachment 218669 [details]
Updated shar file that removes spurious glib-compile-schema command while staging

OK. I found it, it seems that it's a handrolled macro in the distro. Since ports are only staging, it doesn't make sense to compile the schema anyway. So, I commented out that part.

I think all the error messages are gone now. Could you try one last time?

I see that the next version uses meson, but since this version is so close, I would rather get this in and *then* spend time getting the meson version working.
Comment 15 commit-hook freebsd_committer freebsd_triage 2020-10-25 10:44:03 UTC
A commit references this bug:

Author: zeising
Date: Sun Oct 25 10:43:03 UTC 2020
New revision: 553251
URL: https://svnweb.freebsd.org/changeset/ports/553251

Log:
  Add new port: x11/gtk-app-menu

  gtk-app-menu is a port for the appmenu_gtk_module.
  This makes it possible to have a global menu bar for both GTK and KDE
  applications.

  PR:		236155
  Submitted by:	Trenton Schulz

Changes:
  head/x11/Makefile
  head/x11/gtk-app-menu/
  head/x11/gtk-app-menu/Makefile
  head/x11/gtk-app-menu/distinfo
  head/x11/gtk-app-menu/files/
  head/x11/gtk-app-menu/files/patch-subprojects_appmenu-gtk-module_cmake_GLibProgramHandlers.cmake
  head/x11/gtk-app-menu/files/patch-subprojects_appmenu-gtk-module_src_CMakeLists.txt
  head/x11/gtk-app-menu/files/patch-subprojects_appmenu-gtk-module_src_datastructs-private.h
  head/x11/gtk-app-menu/pkg-descr
  head/x11/gtk-app-menu/pkg-plist
Comment 16 Niclas Zeising freebsd_committer freebsd_triage 2020-10-25 10:57:22 UTC
Committed.

Sorry for sitting on it so long, and thank you for your submission!