[atk]Support UNIX. (#7991)

* [atk]Support UNIX.

* Update fix-encoding.patch
This commit is contained in:
JackBoosY 2019-09-18 02:34:55 +08:00 committed by Curtis J Bezault
parent 54506fb05f
commit c5e1adb243
5 changed files with 50 additions and 13 deletions

View File

@ -28,7 +28,11 @@ execute_process(
OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.c
)
configure_file(config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY)
if (WIN32)
configure_file(config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY)
else()
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY)
endif()
add_definitions(-DHAVE_CONFIG_H)
include_directories(. ./atk ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/atk)
@ -38,8 +42,14 @@ find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION})
find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION})
set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY})
find_path(LIBINTL_INCLUDE_DIR libintl.h)
find_library(LIBINTL_LIBRARY NAMES libintl intl)
if (WIN32 OR APPLE)
find_path(LIBINTL_INCLUDE_DIR libintl.h)
find_library(LIBINTL_LIBRARY NAMES libintl intl)
else()
find_package(Intl REQUIRED)
set(LIBINTL_INCLUDE_DIR ${Intl_INCLUDE_DIRS})
set(LIBINTL_LIBRARY ${Intl_LIBRARIES})
endif()
set(ATK_SOURCES
atk/atkaction.c

View File

@ -1,5 +1,5 @@
Source: atk
Version: 2.24.0-3
Version: 2.24.0-4
Homepage: https://developer.gnome.org/atk/
Description: GNOME Accessibility Toolkit
Build-Depends: glib, gettext

View File

@ -1,13 +1,13 @@
diff --git a/atkversion.h b/atkversion.h
index 2634b0a..c57db2c 100644
--- a/atkversion.h
+++ b/atkversion.h
diff --git a/atk/atkversion.h b/atk/atkversion.h
index 2634b0a..7bea2f3 100644
--- a/atk/atkversion.h
+++ b/atk/atkversion.h
@@ -3,7 +3,7 @@
* Copyright (C) 2012 Igalia, S.L.
* Copyright (C) 2014 Chun-wei Fan
*
- * Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
+ * Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
- * Author: Alejandro Pi?eiro Iglesias <apinheiro@igalia.com>
+ * Author: Alejandro Pineiro Iglesias <apinheiro@igalia.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public

View File

@ -0,0 +1,22 @@
diff --git a/config.h.in b/config.h.in
index b94d23f..a26dac8 100644
--- a/config.h.in
+++ b/config.h.in
@@ -5,7 +5,7 @@
#undef ENABLE_NLS
/* Define the gettext package to be used */
-#undef GETTEXT_PACKAGE
+#cmakedefine GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
@@ -86,7 +86,7 @@
#undef STDC_HEADERS
/* Version number of package */
-#undef VERSION
+#cmakedefine VERSION @VERSION@
/* defines how to decorate public symbols while building */
#undef _ATK_EXTERN

View File

@ -9,10 +9,13 @@ vcpkg_download_distfile(ARCHIVE
FILENAME "atk-${ATK_VERSION}.tar.xz"
SHA512 3ae0a4d5f28d5619d465135c685161f690732053bcb70a47669c951fbf389b5d2ccc5c7c73d4ee8c5a3b2df14e2f5b082e812a215f10a79b27b412d077f5e962)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}/atk
vcpkg_extract_source_archive_ex(
ARCHIVE ${ARCHIVE}
OUT_SOURCE_PATH SOURCE_PATH
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-encoding.patch)
fix-encoding.patch
fix-linux-config.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
@ -21,6 +24,8 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DCMAKE_PROGRAM_PATH=${CURRENT_INSTALLED_DIR}/tools/glib
-DGETTEXT_PACKAGE=atk10
-DVERSION=10
OPTIONS_DEBUG
-DATK_SKIP_HEADERS=ON)