-
-
Notifications
You must be signed in to change notification settings - Fork 518
Add glibmm (2.66.8, 2.88.0) to xrepo #9928
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
base: dev
Are you sure you want to change the base?
Changes from 1 commit
ecf8a7d
8e11496
66afebe
b172066
4e14018
47bbc07
2fc9b99
b5d48b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package("glibmm") | ||
| set_homepage("https://gtkmm.gnome.org") | ||
| set_description("A C++ API for parts of glib that are useful for C++.") | ||
| set_license("LGPL-2.1-or-later") | ||
| -- The giomm library is also built with glibmm. There isn't an option to separate them, under meson build system. | ||
|
|
||
| add_urls("https://gitlab.gnome.org/GNOME/glibmm.git") | ||
| add_urls("https://download.gnome.org/sources/glibmm/$(version).tar.xz", {version = function (version) | ||
| return format("%d.%d/glibmm-%s", version:major(), version:minor(), version) | ||
| end}) | ||
|
|
||
| add_versions("2.88.0", "a6549da3a6c43de83b8717dae5413c57a60d92f6ecc624615c612d0bb0ad0fe2") | ||
| add_versions("2.66.8", "64f11d3b95a24e2a8d4166ecff518730f79ecc27222ef41faf7c7e0340fc9329") | ||
|
|
||
| add_configs("deprecated_api", {description = "Build deprecated API and include it in the library", default = false, type = "boolean"}) | ||
| add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) | ||
|
|
||
| add_deps("meson", "ninja") | ||
|
|
||
| on_load(function (package) | ||
| -- glibmm doesn't allow static build for MSVC-like compilers. | ||
| if package:is_plat("windows") then | ||
| package:config_set("shared", true) | ||
| end | ||
|
|
||
| if package:version():lt("2.68") then | ||
| package:add("deps", "libsigcplusplus <3.0.0") | ||
| package:add("deps", "glib >=2.61.2") | ||
| else | ||
| package:add("deps", "libsigcplusplus >=3.0.0") | ||
| package:add("deps", "glib >=2.87.3") | ||
| end | ||
|
|
||
| local abi = package:version() and package:version():lt("2.68") and "2.4" or "2.68" | ||
| package:add("includedirs", | ||
| "include/glibmm-" .. abi, | ||
| "lib/glibmm-" .. abi .. "/include", | ||
| "include/giomm-" .. abi, | ||
| "lib/giomm-" .. abi .. "/include") | ||
| end) | ||
|
Comment on lines
+20
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
|
||
| on_install(function (package) | ||
| local configs = {"-Dbuild-documentation=false", "-Dbuild-examples=false"} | ||
| table.insert(configs, "-Dbuild-deprecated-api=" .. (package:config("deprecated_api") and "true" or "false")) | ||
| import("package.tools.meson").install(package, configs) | ||
|
Comment on lines
+48
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is better to explicitly pass |
||
| end) | ||
|
|
||
| on_test(function (package) | ||
| assert(package:has_cxxincludes("glibmm.h", {configs = {languages = "c++17"}})) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test only checks for the presence of the header. It's better to use |
||
| end) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
sharedconfiguration should not bereadonly = trueglobally. This prevents users on non-Windows platforms from choosing between static and shared builds. The restriction for Windows should be handled inon_load(which you are already doing), but the configuration definition itself should remain mutable for other platforms.