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
This commit is contained in:
Niclas Zeising 2020-10-25 10:43:01 +00:00
parent 9a53d3ac84
commit 4e34b24ada
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=553251
8 changed files with 95 additions and 0 deletions

View File

@ -90,6 +90,7 @@
SUBDIR += gstreamer1-plugins-x
SUBDIR += gstreamer1-plugins-ximagesrc
SUBDIR += gsynaptics
SUBDIR += gtk-app-menu
SUBDIR += gtk-theme-switch2
SUBDIR += gtkchtheme
SUBDIR += gtkterm2

25
x11/gtk-app-menu/Makefile Normal file
View File

@ -0,0 +1,25 @@
# $FreeBSD$
PORTNAME= appmenu-gtk-module
DISTVERSION= 0.7.3.2
CATEGORIES= x11
MAINTAINER= trueos@norwegianrockcat.com
COMMENT= GTK module for putting application menubar in a global menubar
LICENSE= LGPL3
LICENSE_FILE= ${WRKSRC}/subprojects/appmenu-gtk-module/LICENSE
USES= cmake gnome pkgconfig
CMAKE_SOURCE_PATH= ${WRKSRC}/subprojects/appmenu-gtk-module
USE_GNOME= gtk30 glib20 gtk20 gdkpixbuf2
GLIB_SCHEMAS= org.appmenu.gtk-module.gschema.xml
USE_GITLAB= yes
GL_ACCOUNT= vala-panel-project
GL_PROJECT= vala-panel-appmenu
GL_COMMIT= c2cb48f07d95079e566eed78b28880e00f31c637
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1600631254
SHA256 (vala-panel-project-vala-panel-appmenu-c2cb48f07d95079e566eed78b28880e00f31c637_GL0.tar.gz) = ca56fe93ccaacde658af56666867c5ccd6ad4831b61491afa4a5335c261c6560
SIZE (vala-panel-project-vala-panel-appmenu-c2cb48f07d95079e566eed78b28880e00f31c637_GL0.tar.gz) = 165788

View File

@ -0,0 +1,17 @@
--- subprojects/appmenu-gtk-module/cmake/GLibProgramHandlers.cmake.orig 2019-07-29 14:45:42 UTC
+++ subprojects/appmenu-gtk-module/cmake/GLibProgramHandlers.cmake
@@ -27,10 +27,10 @@ macro(add_schema SCHEMA_NAME)
message (STATUS "GSettings schemas will be installed into ${GSETTINGS_PREFIX}/${GSETTINGS_DIR}")
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_PREFIX}/${GSETTINGS_DIR} COMPONENT ${ARGV1} OPTIONAL)
- if (GSETTINGS_COMPILE)
- install (CODE "message (STATUS \"Compiling GSettings schemas\")")
- install (CODE "execute_process (COMMAND ${GLIB2_COMPILE_SCHEMAS_EXECUTABLE} ${GSETTINGS_PREFIX}/${GSETTINGS_DIR})")
- endif ()
+ # if (GSETTINGS_COMPILE)
+ # install (CODE "message (STATUS \"Compiling GSettings schemas\")")
+ # install (CODE "execute_process (COMMAND ${GLIB2_COMPILE_SCHEMAS_EXECUTABLE} ${GSETTINGS_PREFIX}/${GSETTINGS_DIR})")
+ # endif ()
endmacro()
macro(add_glib_marshal outsources outincludes name prefix)

View File

@ -0,0 +1,22 @@
--- subprojects/appmenu-gtk-module/src/CMakeLists.txt.orig 2019-03-02 16:02:35 UTC
+++ subprojects/appmenu-gtk-module/src/CMakeLists.txt
@@ -13,6 +13,10 @@ set(MODULE_SOURCES
platform.h
consts.h)
+find_package(X11 REQUIRED)
+if (X11_FOUND)
+ include_directories(${X11_INCLUDE_DIR})
+endif(X11_FOUND)
get_filename_component(GTK3_LIBDIR ${GTK3_GTK_LIBRARY} DIRECTORY)
set(GTK3_MODULEDIR ${GTK3_LIBDIR}/gtk-3.0/modules)
add_library(appmenu-gtk3-module MODULE ${MODULE_SOURCES})
@@ -27,7 +31,7 @@ if(GTK2_FOUND)
get_filename_component(GTK2_LIBDIR ${GTK2_GTK_LIBRARY} DIRECTORY)
set(GTK2_MODULEDIR ${GTK2_LIBDIR}/gtk-2.0/modules)
add_library(appmenu-gtk2-module MODULE ${MODULE_SOURCES})
- target_include_directories(appmenu-gtk2-module PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
+ target_include_directories(appmenu-gtk2-module PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../lib )
target_link_libraries(appmenu-gtk2-module PRIVATE appmenu-gtk2-parser GLIB2::GIO_UNIX GTK2::GTK)
set_target_properties(appmenu-gtk2-module PROPERTIES
OUTPUT_NAME appmenu-gtk-module

View File

@ -0,0 +1,11 @@
--- subprojects/appmenu-gtk-module/src/datastructs-private.h.orig 2019-03-02 16:23:40 UTC
+++ subprojects/appmenu-gtk-module/src/datastructs-private.h
@@ -31,7 +31,7 @@
struct _WindowData
{
uint window_id;
- ulong wayland_window_id;
+ gulong wayland_window_id;
GMenu *menu_model;
guint menu_model_export_id;
GSList *menus;

View File

@ -0,0 +1,5 @@
The appmenu-gtk-module is a GTK Module that strips menus from all GTK
programs, converts to them MenuModel and send to them AppMenu
(sometimes called a global menu bar) of a desktop environment like
Plasma or Gnome. This module was originally used in Ubuntu's Unity
Desktop Environment, but it lives on as part of the Vala project.

View File

@ -0,0 +1,11 @@
libdata/pkgconfig/appmenu-gtk3-parser.pc
libdata/pkgconfig/appmenu-gtk2-parser.pc
lib/libappmenu-gtk2-parser.so.0
lib/gtk-2.0/modules/libappmenu-gtk-module.so
lib/libappmenu-gtk2-parser.so
lib/libappmenu-gtk3-parser.so
lib/libappmenu-gtk3-parser.so.0
lib/gtk-3.0/modules/libappmenu-gtk-module.so
include/appmenu-gtk-parser/appmenu-gtk-menu-shell.h
include/appmenu-gtk-parser/appmenu-gtk-parser.h
include/appmenu-gtk-parser/appmenu-gtk-action-group.h