-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* libzim: add package update libzim versions libzim:meson ignore xapian * Update ports/libzim/vcpkg.json Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com> * Update ports/libzim/portfile.cmake Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com> * support both static and dynamic library * modify according to review Update ports/libzim/portfile.cmake Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com> add version * only enable release library * make xapian does not support on windows * disable android platform --------- Co-authored-by: Mengna Li <95600143+Adela0814@users.noreply.github.com>
- Loading branch information
1 parent
8e591a9
commit e7250fe
Showing
5 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff --git a/meson.build b/meson.build | ||
index 6862f75..d887f9a 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -37,8 +37,6 @@ static_linkage = static_linkage or get_option('default_library')=='static' | ||
lzma_dep = dependency('liblzma', static:static_linkage) | ||
if static_linkage | ||
add_project_arguments('-DLZMA_API_STATIC', language: 'cpp') | ||
-else | ||
- private_conf.set('LIBZIM_EXPORT_DLL', true) | ||
endif | ||
|
||
zstd_dep = dependency('libzstd', static:static_linkage) | ||
@@ -59,6 +57,9 @@ pkg_requires = ['liblzma', 'libzstd'] | ||
if build_machine.system() == 'windows' | ||
extra_link_args = ['-lRpcrt4', '-lWs2_32', '-lwinmm', '-licuuc', '-licuin'] | ||
extra_cpp_args = ['-DSORTPP_PASS'] | ||
+ if not static_linkage | ||
+ extra_cpp_args += ['-DLIBZIM_EXPORT_DLL'] | ||
+ endif | ||
else | ||
extra_link_args = [] | ||
extra_cpp_args = [] | ||
-- | ||
2.37.3.windows.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO openzim/libzim | ||
REF ${VERSION} | ||
SHA512 4554a9237f5167f6f94aad76ef0e847e949c47c6ee2a89bbd6e587da3b3a3e2d0a8b2d03f7a0fbde0e0dc96fb61bf8c115b3ef3cbd7eff5e880f152bee9b29f0 | ||
HEAD_REF main | ||
PATCHES | ||
0001-build-share-library.patch | ||
) | ||
|
||
set(EXTRA_OPTIONS "") | ||
|
||
if(NOT "xapian" IN_LIST FEATURES) | ||
list(APPEND EXTRA_OPTIONS "-Dwith_xapian=false") | ||
endif() | ||
|
||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) | ||
list(APPEND EXTRA_OPTIONS "-Dstatic-linkage=false") | ||
else() | ||
list(APPEND EXTRA_OPTIONS "-Dstatic-linkage=true") | ||
endif() | ||
|
||
vcpkg_configure_meson( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS | ||
-Dexamples=false | ||
${EXTRA_OPTIONS} | ||
) | ||
|
||
vcpkg_install_meson(ADD_BIN_TO_PATH) | ||
|
||
vcpkg_copy_pdbs() | ||
|
||
vcpkg_fixup_pkgconfig() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "libzim", | ||
"version": "8.2.0", | ||
"description": "The Libzim is the reference implementation for the ZIM file format. It's a software library to read and write ZIM files on many systems and architectures. More information about the ZIM format and the openZIM project at https://openzim.org/.", | ||
"homepage": "https://github.com/openzim/libzim", | ||
"license": "GPL-2.0-or-later", | ||
"supports": "!android", | ||
"dependencies": [ | ||
"icu", | ||
"liblzma", | ||
{ | ||
"name": "vcpkg-tool-meson", | ||
"host": true | ||
}, | ||
"zstd" | ||
], | ||
"features": { | ||
"xapian": { | ||
"description": "Enable xapian support", | ||
"supports": "!(windows & !mingw)", | ||
"dependencies": [ | ||
"xapian" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"git-tree": "93b2790850e120148daf03563e24e6ed3ee9e02e", | ||
"version": "8.2.0", | ||
"port-version": 0 | ||
} | ||
] | ||
} |