Merge lp:~midori/midori/ubuntults-buildfixes into lp:midori

Proposed by Paweł Forysiuk
Status: Merged
Approved by: Cris Dywan
Approved revision: 6469
Merged at revision: 6469
Proposed branch: lp:~midori/midori/ubuntults-buildfixes
Merge into: lp:midori
Diff against target: 54 lines (+14/-8)
3 files modified
extensions/adblock.c (+3/-1)
midori/midori-view.c (+1/-1)
po/CMakeLists.txt (+10/-6)
To merge this branch: bzr merge lp:~midori/midori/ubuntults-buildfixes
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Cody Garver (community) Approve
Review via email: mp+194634@code.launchpad.net

Commit message

Fix building on Ubuntu 12.04

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Works on 14.04 and someone on bug report said it works on 12.04 as well. Still need to check the translation changes.

review: Approve
Revision history for this message
Cris Dywan (kalikiana) wrote :

There's two notable drawbacks to GETTEXT_CREATE_TRANSLATIONS, it doesn't handle LINGUAS which is more of a nicety than required for survival, and it forcibly updates all po files in the source tree which isn't harmful so much as annoying… having said that, it works and given that no dev hacks on such an old system I'd say it's acceptable - if there's more time one could write a GETTEXT_PROCESS_PO_FILES that works with the old cmake but I wouldn't expect it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/adblock.c'
2--- extensions/adblock.c 2013-11-04 20:55:58 +0000
3+++ extensions/adblock.c 2013-11-10 09:56:20 +0000
4@@ -1541,7 +1541,9 @@
5
6 for (i = 0; i <= 15; i++)
7 {
8- fgets (line, 2000, file);
9+ if (!fgets (line, 2000, file))
10+ break;
11+
12 if (strncmp ("! Expires", line, 9) == 0)
13 {
14 gchar** parts = g_strsplit (line, " ", 4);
15
16=== modified file 'midori/midori-view.c'
17--- midori/midori-view.c 2013-11-05 23:09:04 +0000
18+++ midori/midori-view.c 2013-11-10 09:56:20 +0000
19@@ -4942,7 +4942,7 @@
20 #if WEBKIT_CHECK_VERSION (1, 9, 5)
21 doc = webkit_web_frame_get_dom_document (frame);
22 #else
23- doc = webkit_web_view_get_dom_document (view->web_view);
24+ doc = webkit_web_view_get_dom_document (WEBKIT_WEB_VIEW (view->web_view));
25 #endif
26
27 WebKitDOMElement* root = webkit_dom_document_query_selector (doc, ":root", NULL);
28
29=== modified file 'po/CMakeLists.txt'
30--- po/CMakeLists.txt 2013-09-28 23:06:00 +0000
31+++ po/CMakeLists.txt 2013-11-10 09:56:20 +0000
32@@ -9,12 +9,16 @@
33 endif ()
34 message(STATUS "gettext found: ${LANGUAGES}")
35 string(REPLACE " " ";" LANGUAGES ${LANGUAGES})
36- foreach(LANG ${LANGUAGES})
37- GETTEXT_PROCESS_PO_FILES(${LANG} ALL PO_FILES ${LANG}.po)
38- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo"
39- DESTINATION "${CMAKE_INSTALL_FULL_LOCALEDIR}/${LANG}/LC_MESSAGES"
40- RENAME "${GETTEXT_PACKAGE}.mo")
41- endforeach ()
42+ if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.8.8")
43+ GETTEXT_CREATE_TRANSLATIONS("${CMAKE_CURRENT_SOURCE_DIR}/midori.pot" ALL ${POTFILES})
44+ else()
45+ foreach(LANG ${LANGUAGES})
46+ GETTEXT_PROCESS_PO_FILES(${LANG} ALL PO_FILES ${LANG}.po)
47+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo"
48+ DESTINATION "${CMAKE_INSTALL_FULL_LOCALEDIR}/${LANG}/LC_MESSAGES"
49+ RENAME "${GETTEXT_PACKAGE}.mo")
50+ endforeach ()
51+ endif()
52 else ()
53 message(STATUS "gettext not found")
54 endif ()

Subscribers

People subscribed via source and target branches

to all changes: