Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new port] gtk 3.24.34 port #22201

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/gtk3/0001-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index c599843..0cafd79 100644
--- a/meson.build
+++ b/meson.build
@@ -1008,7 +1008,7 @@ subdir('docs/reference')

install_data('m4macros/gtk-3.0.m4', install_dir: join_paths(get_option('datadir'), 'aclocal'))

-if not meson.is_cross_build()
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
+if false
if meson.version().version_compare('>=0.57.0')
gnome.post_install(
glib_compile_schemas: true,
78 changes: 78 additions & 0 deletions ports/gtk3/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
set(warning_length 24)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length)
if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32)
message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\vcpkg' or using the subst command."
)
endif()
Comment on lines +1 to +7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set(warning_length 24)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length)
if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32)
message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\vcpkg' or using the subst command."
)
endif()
vcpkg_buildpath_length_warning(24)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vcpkg_buildpath_length_warning() can not be used here as it recommends to move to C:\src\vcpkg which gives buildpath length >24

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So can you confirm a longest valid path to replace this code?

Copy link

@stevapple stevapple Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried subst and it seems not solving the problem. Moving to the root of a drive may be the only choice.

I would also suggest we make it clear that the path length cannot exceed 24 (if that’s the exact number). This message could fail to inform the user of what kind of paths are acceptable.


vcpkg_from_gitlab(
OUT_SOURCE_PATH SOURCE_PATH
GITLAB_URL https://gitlab.gnome.org
REPO GNOME/gtk
REF 3.24.34
SHA512 20a91e30a89070461af06b33829bc723b348806b4a785d0743af8bd4789b55dade24686e08bf1b2f0335240463aacc040134babb0605b809186b15de9cf261e4
PATCHES
0001-build.patch
)

vcpkg_find_acquire_program(PKGCONFIG)
get_filename_component(PKGCONFIG_DIR "${PKGCONFIG}" DIRECTORY )
vcpkg_add_to_path("${PKGCONFIG_DIR}") # Post install script runs pkg-config so it needs to be on PATH
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/glib/")
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gdk-pixbuf")
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin")

vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dwayland_backend=false
-Ddemos=false
-Dexamples=false
-Dtests=false
-Dgtk_doc=false
-Dman=false
-Dxinerama=no # Enable support for the X11 Xinerama extension
-Dcloudproviders=false # Enable the cloudproviders support
-Dprofiler=false # include tracing support for sysprof
-Dtracker3=false # Enable Tracker3 filechooser search
-Dcolord=no # Build colord support for the CUPS printing backend
-Dintrospection=false
ADDITIONAL_NATIVE_BINARIES
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'
gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'
glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'
ADDITIONAL_CROSS_BINARIES
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'
gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'
glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'
)

vcpkg_install_meson()

vcpkg_copy_pdbs()

vcpkg_fixup_pkgconfig()

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

set(GTK_TOOLS
gtk-builder-tool
gtk-encode-symbolic-svg
gtk-launch
gtk-query-immodules-3.0
gtk-query-settings
gtk-update-icon-cache
)
vcpkg_copy_tools(TOOL_NAMES ${GTK_TOOLS} AUTO_CLEAN)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
50 changes: 50 additions & 0 deletions ports/gtk3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "gtk3",
"version": "3.24.34",
"description": "Portable library for creating graphical user interfaces.",
"homepage": "https://www.gtk.org/",
"license": null,
"dependencies": [
"atk",
{
"name": "cairo",
"default-features": false,
"features": [
"gobject"
]
},
{
"name": "cairo",
"default-features": false,
"features": [
"x11"
],
"platform": "linux"
},
"gdk-pixbuf",
{
"name": "gdk-pixbuf",
"host": true
},
"gettext",
{
"name": "gettext",
"host": true,
"default-features": false,
"features": [
"tools"
mkhon marked this conversation as resolved.
Show resolved Hide resolved
]
},
"glib",
{
"name": "glib",
"host": true
mkhon marked this conversation as resolved.
Show resolved Hide resolved
},
"libepoxy",
"pango",
{
"name": "vcpkg-tool-meson",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2708,6 +2708,10 @@
"baseline": "4.6.2",
"port-version": 1
},
"gtk3": {
"baseline": "3.24.34",
"port-version": 0
},
"gtkmm": {
"baseline": "4.6.0",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/g-/gtk3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "2a245ace5edaf583f10781a2fdee1254e4bc30f2",
"version": "3.24.34",
"port-version": 0
}
]
}