GTK+ requires libintl on FreeBSD because there is no gettext implementation in FreeBSD libc. In order to link to libintl, which is not located in the default search path of the linker, we need to add the required path via the linker command line. However, LDFLAGS is ignored when running g-ir-scanner starting from r167873, so we have to manually pick required flags from CMAKE_SHARED_LINKER_FLAGS and put them in correct order to prevent g-ir-scanner from linking to the installed version of libraries.
Created attachment 241784 [details] [GTK] LDFLAGS is ignored when running g-ir-scanner
This patch is required to build WebKitGTK+ 2.6.x and 2.7.x on FreeBSD.
Created attachment 242219 [details] [GTK] LDFLAGS is ignored when running g-ir-scanner
Comment on attachment 242219 [details] [GTK] LDFLAGS is ignored when running g-ir-scanner View in context: https://bugs.webkit.org/attachment.cgi?id=242219&action=review > Source/WebKit2/PlatformGTK.cmake:757 > +# Add required -L flags from ${CMAKE_SHARED_LINKER_FLAGS} for g-ir-scanner > +separate_arguments(INTROSPECTION_ADDITIONAL_LINKER_FLAGS > + UNIX_COMMAND ${CMAKE_SHARED_LINKER_FLAGS}) > +foreach (linker_flag ${INTROSPECTION_ADDITIONAL_LINKER_FLAGS}) > + string(REGEX MATCH "-L[^ ]*" linker_flag_matched "${linker_flag}") > + string(COMPARE EQUAL "${linker_flag_matched}" "" linker_flag_not_allowed) > + if (linker_flag_not_allowed) > + list(REMOVE_ITEM INTROSPECTION_ADDITIONAL_LINKER_FLAGS "${linker_flag}") > + endif () > +endforeach (linker_flag) > + Isn't it easier to do this instead? string(REGEX MATCHALL "-L[^ ]*" INTROSPECTION_ADDITIONAL_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
Created attachment 242891 [details] [GTK] LDFLAGS is ignored when running g-ir-scanner
(In reply to comment #5) > Created attachment 242891 [details] > [GTK] LDFLAGS is ignored when running g-ir-scanner I think that looks much better, thanks!
Comment on attachment 242891 [details] [GTK] LDFLAGS is ignored when running g-ir-scanner Clearing flags on attachment: 242891 Committed r177016: <http://trac.webkit.org/changeset/177016>
All reviewed patches have been landed. Closing bug.