-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[librsvg][gdk-pixbuf] Add librsvg support to gdk-pixbuf by adding librsvg as a dependency to gdk-pixbuf. #38499
base: master
Are you sure you want to change the base?
[librsvg][gdk-pixbuf] Add librsvg support to gdk-pixbuf by adding librsvg as a dependency to gdk-pixbuf. #38499
Conversation
bc55e89
to
c4ddf02
Compare
endif | ||
|
||
+svg_opt = get_option('svg') | ||
+if not svg_opt.disabled() |
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.
A few days ago I learned that features don't need to be tested for being disabled like this...
+if not svg_opt.disabled() | ||
+ # We currently don't have a fallback subproject, but this handles error | ||
+ # reporting if svg_opt is enabled. | ||
+ svg_dep = dependency('librsvg-2.0', required: svg_opt) |
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.
... because they make depencies "not-found" when used like this.
https://mesonbuild.com/Reference-manual_functions.html#dependency_required
https://mesonbuild.com/Build-options.html#features
{ | ||
"name": "svg", | ||
"platform": "static" | ||
}, |
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.
Do we really want add it as a default feature?
librsvg
in vcpkg is outdated and can't update ATM.
ports/librsvg/CMakeLists.txt
Outdated
if (ENABLE_GDK_PIXBUF_LOADER) | ||
if (BUILD_SHARED_LIBS) | ||
set(gdk_pixbuf_pc_requires_private gdk-pixbuf-2.0) | ||
pkg_check_modules(GDK_PIXBUF ${gdk_pixbuf_pc_requires_private} IMPORTED_TARGET REQUIRED) | ||
pkg_get_variable(GDK_PIXBUF_MODULEDIR ${gdk_pixbuf_pc_requires_private} gdk_pixbuf_moduledir) | ||
endif() |
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.
I wonder if this patch could be trimmed, by leaving original indent and different grouping of if(BUILD_SHARED_LIBS)
.
|
||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/librsvg.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" @ONLY) | ||
file(READ "${CMAKE_CURRENT_BINARY_DIR}/librsvg.pc" librsvg_pc) | ||
list(JOIN librsvg_pc_requires_private " " requires_private) | ||
string(REPLACE "Requires.private:" "Requires.private: ${requires_private}" librsvg_pc "${librsvg_pc}") | ||
if (ENABLE_GDK_PIXBUF_LOADER AND NOT BUILD_SHARED_LIBS) | ||
string(REPLACE "-lm" "-lpixbufloader-svg -lm" librsvg_pc "${librsvg_pc}") |
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.
Candidates for Libs.private
?
145ad5e
to
6e2813b
Compare
…rsvg as a dependency to gdk-pixbuf. This changes the behavior of librsvg to be able to be built without gdk-pixbuf support (to avoid circular dependency) when built statically, and gdk-pixbuf to be built with librsvg support. librsvg is optional when building gdk-pixbuf dynamically, and enabled by default when building statically. This fixes microsoft#38012. Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
6e2813b
to
03e6723
Compare
Please resolve the conflict. |
@MonicaLiu0311, yeah, thank you. I plan to rework this anyway to make it smaller and cleaner. |
@AenBleidd Is there any new progress? |
Not yet: was busy with other tasks. Plan to come back to this issue during next two weeks. |
This changes the behavior of librsvg to be able to be built without gdk-pixbuf support (to avoid circular dependency) when built statically, and gdk-pixbuf to be built with librsvg support. librsvg is optional when building gdk-pixbuf dynamically, and enabled by default when building statically.
This fixes #38012.
./vcpkg x-add-version --all
and committing the result.