aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-09-18 02:34:55 +0800
committerCurtis J Bezault <curtbezault@gmail.com>2019-09-17 11:34:55 -0700
commitc5e1adb2435c01dcc2e821e39f98c97d8527acf4 (patch)
treef7f63e8d4e7af880c072458608d3143b5fe2dad7
parent54506fb05f39b1cefcc20a2117944c7a8492a0c6 (diff)
downloadvcpkg-c5e1adb2435c01dcc2e821e39f98c97d8527acf4.tar.gz
vcpkg-c5e1adb2435c01dcc2e821e39f98c97d8527acf4.zip
[atk]Support UNIX. (#7991)
* [atk]Support UNIX. * Update fix-encoding.patch
-rw-r--r--ports/atk/CMakeLists.txt16
-rw-r--r--ports/atk/CONTROL2
-rw-r--r--ports/atk/fix-encoding.patch12
-rw-r--r--ports/atk/fix-linux-config.patch22
-rw-r--r--ports/atk/portfile.cmake11
5 files changed, 50 insertions, 13 deletions
diff --git a/ports/atk/CMakeLists.txt b/ports/atk/CMakeLists.txt
index 41937fff9..e26d8649e 100644
--- a/ports/atk/CMakeLists.txt
+++ b/ports/atk/CMakeLists.txt
@@ -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
diff --git a/ports/atk/CONTROL b/ports/atk/CONTROL
index 66890b039..fe09017e7 100644
--- a/ports/atk/CONTROL
+++ b/ports/atk/CONTROL
@@ -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
diff --git a/ports/atk/fix-encoding.patch b/ports/atk/fix-encoding.patch
index 8bfb38bd0..c92171a48 100644
--- a/ports/atk/fix-encoding.patch
+++ b/ports/atk/fix-encoding.patch
@@ -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
diff --git a/ports/atk/fix-linux-config.patch b/ports/atk/fix-linux-config.patch
new file mode 100644
index 000000000..ec6a37a8b
--- /dev/null
+++ b/ports/atk/fix-linux-config.patch
@@ -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
diff --git a/ports/atk/portfile.cmake b/ports/atk/portfile.cmake
index c3edfdf74..60ace410d 100644
--- a/ports/atk/portfile.cmake
+++ b/ports/atk/portfile.cmake
@@ -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)