[xapian] add new port (#27038)

* port:add xapian port

* add xapian version

* update version

* change cmake file

* update version

* add vcpkg-cmake-config

* update version

* modify cmake

* update version

* vcpkg_cmake_config_fixup path

* update version

* cmake fix

* update version

* add not supports platform

* update version

* Update ports/xapian/vcpkg.json

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* Update ports/xapian/portfile.cmake

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* Update ports/xapian/portfile.cmake

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* Update ports/xapian/portfile.cmake

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* update version

* Update xapian.json

* windows platform should only build release , the debug library is not work

* Update ports/xapian/vcpkg.json

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* Update ports/xapian/vcpkg.json

Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>

* build release version only

* update version

* Add quotes to paths

* Update versions/x-/xapian.json

Co-authored-by: xiaoyifang <xiaoyifang@vvcn>
Co-authored-by: Lily Wang <94091114+LilyWangLL@users.noreply.github.com>
Co-authored-by: xiaoyifang <xiaoyifang@vv.cn>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
This commit is contained in:
xiaoyifang 2022-10-15 07:15:59 +08:00 committed by GitHub
parent ebcbbcf862
commit 694ca7cbe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,38 @@
vcpkg_download_distfile(ARCHIVE
URLS https://oligarchy.co.uk/xapian/1.4.21/xapian-core-1.4.21.tar.xz
FILENAME xapian-core-1.4.21.tar.xz
SHA512 4071791daf47f5ae77f32f358c6020fcfa9aa81c15c8da25489b055eef30383695e449ab1cb73670f2f5db2b2a5f78056da0e8eea89d83aaad91dfe340a6b13a
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE "${ARCHIVE}"
)
if(WIN32)
vcpkg_replace_string("${SOURCE_PATH}/configure.ac" "z zlib zdll" "z zlib zdll zlibd")
# xapian does not support debug lib on Windows
# if use `set(VCPKG_BUILD_TYPE release)` the vcpkg post check can not passed
# it will throw exception "Mismatching number of debug and release binaries. Found 0 for debug but 1 for release."
# that means the `set(VCPKG_BUILD_TYPE release)` can not be used in the WIN32 environment.
if(VCPKG_BUILD_TYPE STREQUAL "release")
set(OPTIONS "CXXFLAGS=-EHsc")
endif()
endif()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
USE_WRAPPERS
OPTIONS ${OPTIONS}
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/xapian)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)

15
ports/xapian/vcpkg.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "xapian",
"version": "1.4.21",
"description": "Xapian is an Open Source Search Engine Library, released under the GPL v2+. It's written in C++, with bindings to allow use from Perl, Python 2, Python 3, PHP 5, PHP 7, Java, Tcl, C#, Ruby, Lua, Erlang, Node.js and R (so far!)",
"homepage": "https://github.com/xapian/xapian",
"license": "GPL-2.0-or-later",
"supports": "!(arm | uwp)",
"dependencies": [
{
"name": "vcpkg-cmake-config",
"host": true
},
"zlib"
]
}

View File

@ -7956,6 +7956,10 @@
"baseline": "1.12",
"port-version": 1
},
"xapian": {
"baseline": "1.4.21",
"port-version": 0
},
"xaudio2redist": {
"baseline": "1.2.9",
"port-version": 0

9
versions/x-/xapian.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "e5f0103eea3c5622af1b593bfca64e9045c55cb5",
"version": "1.4.21",
"port-version": 0
}
]
}