Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ports/shared-mime-info/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)

vcpkg_from_gitlab(
OUT_SOURCE_PATH SOURCE_PATH
GITLAB_URL "https://gitlab.freedesktop.org"
REPO "xdg/shared-mime-info"
REF "${VERSION}"
SHA512 "17b443c2c09a432d09e4c83db956f8c0c3a768cfa9ffb8c87cd2d7c9002b95d010094e2bc64dd35946205a0f8b2d87c4f8f0a1faec86443e2edd502aa8f7cc8f"
)

set(VCPKG_BUILD_TYPE release) # only data

vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/libxml2")

# msgfmt can't deal with drive letters on Windows, so we need to use a relative data dir
file(RELATIVE_PATH GETTEXTDATADIRREL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" "${SOURCE_PATH}/data")
set(ENV{GETTEXTDATADIR} "${GETTEXTDATADIRREL}")
Comment on lines +15 to +17
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if these lines are appropriate here, as I've never seen drive handling in portfile.cmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a test run here with debug info:
https://github.com/daschuer/vcpkg/actions/runs/13799528617
in package-x64-windows-dbg-out.log in logs-x64-windows.zip:

C:/mixxx-vcpkg/vcpkg_installed/x64-windows/tools/gettext/bin/msgfmt.EXE: warning: Looking in ../src/2.4-b756cadafd.clean/data/its
C:/mixxx-vcpkg/vcpkg_installed/x64-windows/tools/gettext/bin/msgfmt.EXE: warning: Looking in C/its
C:/mixxx-vcpkg/vcpkg_installed/x64-windows/tools/gettext/bin/msgfmt.EXE: warning: Looking in /mixxx-vcpkg/buildtrees/shared-mime-info/src/2.4-b756cadafd.clean/data/./its
C:/mixxx-vcpkg/vcpkg_installed/x64-windows/tools/gettext/bin/msgfmt.EXE: warning: Looking in ../src/2.4-b756cadafd.clean/data-0.22.5/its

You see that msgfmt splits the pass at ":" and tries to look into "C/its". The first entry is the relative path from GETTEXTDATADIR set in this port.


vcpkg_configure_meson(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-Dupdate-mimedb=false
-Dbuild-tools=false
-Dbuild-translations=false
-Dbuild-tests=false
)

vcpkg_install_meson()

vcpkg_fixup_pkgconfig()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

27 changes: 27 additions & 0 deletions ports/shared-mime-info/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "shared-mime-info",
"version": "2.4",
"description": "Shared MIME information from Freedesktop.org",
"homepage": "https://gitlab.freedesktop.org/xdg/shared-mime-info",
"license": "GPL-2.0-or-later",
"dependencies": [
{
"name": "gettext",
"host": true,
"features": [
"tools"
]
},
{
"name": "libxml2",
"host": true,
"features": [
"tools"
]
},
{
"name": "vcpkg-tool-meson",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8492,6 +8492,10 @@
"baseline": "1.6.1",
"port-version": 0
},
"shared-mime-info": {
"baseline": "2.4",
"port-version": 0
},
"shiftmedia-libgcrypt": {
"baseline": "1.10.3-1",
"port-version": 1
Expand Down
9 changes: 9 additions & 0 deletions versions/s-/shared-mime-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "9f518e591954f8a86b8c9a246b428dc566b0b42e",
"version": "2.4",
"port-version": 0
}
]
}