aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neumann <30894796+Neumann-A@users.noreply.github.com>2021-04-07 22:11:12 +0200
committerGitHub <noreply@github.com>2021-04-07 13:11:12 -0700
commit3320069be1b70775071f31b347dde8c6b7757870 (patch)
tree7c036ae35fcce0ca678c7d7be991c3e1b2db70f1
parentbede80d4996a6f85bb86e8eab95bc89bf8a32d87 (diff)
downloadvcpkg-3320069be1b70775071f31b347dde8c6b7757870.tar.gz
vcpkg-3320069be1b70775071f31b347dde8c6b7757870.zip
[gettext] Add feature tools (#17010)
* [gettext] add feature tools * version stuff * adjust code in portfile a bit * version stuff * more reordering * version stuff
-rw-r--r--ports/gettext/CONTROL5
-rw-r--r--ports/gettext/portfile.cmake22
-rw-r--r--ports/gettext/rel_path.patch31
-rw-r--r--ports/gettext/vcpkg.json15
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/g-/gettext.json5
6 files changed, 66 insertions, 14 deletions
diff --git a/ports/gettext/CONTROL b/ports/gettext/CONTROL
deleted file mode 100644
index d5fd705c3..000000000
--- a/ports/gettext/CONTROL
+++ /dev/null
@@ -1,5 +0,0 @@
-Source: gettext
-Version: 0.21
-Homepage: https://www.gnu.org/software/gettext/
-Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl.
-Build-Depends: libiconv
diff --git a/ports/gettext/portfile.cmake b/ports/gettext/portfile.cmake
index 449029e7c..02ed8a760 100644
--- a/ports/gettext/portfile.cmake
+++ b/ports/gettext/portfile.cmake
@@ -27,6 +27,7 @@ vcpkg_extract_source_archive_ex(
PATCHES
0002-Fix-uwp-build.patch
0003-Fix-win-unicode-paths.patch
+ rel_path.patch
${PATCHES}
)
vcpkg_find_acquire_program(BISON)
@@ -41,9 +42,19 @@ if(VCPKG_TARGET_IS_WINDOWS)
# Left here for future reference.
gl_cv_func_printf_directive_n=no #segfaults otherwise with popup window
ac_cv_func_memset=yes #not detected in release builds
+ ac_cv_header_pthread_h=no
)
endif()
-vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should probably be renamed to gettext-runtime instead of only gettext. Removing the subdir here builds all of gettext
+set(ADDITIONAL_CONFIGURE_OPTIONS)
+set(ADDITIONAL_INSTALL_OPTIONS)
+if("tools" IN_LIST FEATURES)
+ set(BUILD_SOURCE_PATH ${SOURCE_PATH})
+ set(ADDITIONAL_CONFIGURE_OPTIONS ADDITIONAL_MSYS_PACKAGES gzip)
+else()
+ set(BUILD_SOURCE_PATH ${SOURCE_PATH}/gettext-runtime) # Could be its own port
+ set(ADDITIONAL_INSTALL_OPTIONS SUBPATH "/intl")
+endif()
+vcpkg_configure_make(SOURCE_PATH ${BUILD_SOURCE_PATH}
DETERMINE_BUILD_TRIPLET
USE_WRAPPERS
ADD_BIN_TO_PATH # So configure can check for working iconv
@@ -51,14 +62,9 @@ vcpkg_configure_make(SOURCE_PATH ${SOURCE_PATH}/gettext-runtime # Port should pr
--enable-c++
--disable-java
${OPTIONS}
+ ${ADDITIONAL_CONFIGURE_OPTIONS}
)
-
-if(VCPKG_TARGET_IS_UWP)
- vcpkg_install_make(SUBPATH "/intl") # Could make a port intl or libintl or have features in Gettext
-else()
- vcpkg_install_make(SUBPATH "/intl")
-endif()
-
+vcpkg_install_make(${ADDITIONAL_INSTALL_OPTIONS})
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext)
diff --git a/ports/gettext/rel_path.patch b/ports/gettext/rel_path.patch
new file mode 100644
index 000000000..c0301cc75
--- /dev/null
+++ b/ports/gettext/rel_path.patch
@@ -0,0 +1,31 @@
+diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in
+index 3a24eee5d..56b36d5ff 100644
+--- a/gettext-tools/misc/autopoint.in
++++ b/gettext-tools/misc/autopoint.in
+@@ -27,8 +27,9 @@ archive_version=@ARCHIVE_VERSION@
+
+ # Set variables
+ # - gettext_datadir directory where the data files are stored.
+-prefix="@prefix@"
+-datarootdir="@datarootdir@"
++
++prefix="$(dirname "$0")/../../../"
++datarootdir="${prefix}/share/gettext"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
+
+diff --git a/gettext-tools/misc/gettextize.in b/gettext-tools/misc/gettextize.in
+index c78c308bf..175ad57e7 100644
+--- a/gettext-tools/misc/gettextize.in
++++ b/gettext-tools/misc/gettextize.in
+@@ -27,8 +27,8 @@ archive_version=@ARCHIVE_VERSION@
+
+ # Set variables
+ # - gettext_datadir directory where the data files are stored.
+-prefix="@prefix@"
+-datarootdir="@datarootdir@"
++prefix="$(dirname "$0")/../../../"
++datarootdir="${prefix}/share/gettext"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
+
diff --git a/ports/gettext/vcpkg.json b/ports/gettext/vcpkg.json
new file mode 100644
index 000000000..861051099
--- /dev/null
+++ b/ports/gettext/vcpkg.json
@@ -0,0 +1,15 @@
+{
+ "name": "gettext",
+ "version": "0.21",
+ "port-version": 1,
+ "description": "The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl.",
+ "homepage": "https://www.gnu.org/software/gettext/",
+ "dependencies": [
+ "libiconv"
+ ],
+ "features": {
+ "tools": {
+ "description": "Build gettext tools"
+ }
+ }
+}
diff --git a/versions/baseline.json b/versions/baseline.json
index e2afff481..eae3befe0 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2194,7 +2194,7 @@
},
"gettext": {
"baseline": "0.21",
- "port-version": 0
+ "port-version": 1
},
"gettimeofday": {
"baseline": "2017-10-14-3",
diff --git a/versions/g-/gettext.json b/versions/g-/gettext.json
index eac400cd4..2507216ab 100644
--- a/versions/g-/gettext.json
+++ b/versions/g-/gettext.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "9bb7007478939f7d50c5cd0ca6154c3593c18232",
+ "version": "0.21",
+ "port-version": 1
+ },
+ {
"git-tree": "1b286fee6011adfb00e7cf79ec7c8673262b7cfd",
"version-string": "0.21",
"port-version": 0