diff options
Diffstat (limited to 'vcpkg/ports/xapian')
| -rw-r--r-- | vcpkg/ports/xapian/configure.diff | 23 | ||||
| -rw-r--r-- | vcpkg/ports/xapian/msvc-no-debug.diff | 13 | ||||
| -rw-r--r-- | vcpkg/ports/xapian/portfile.cmake | 44 | ||||
| -rw-r--r-- | vcpkg/ports/xapian/vcpkg.json | 16 |
4 files changed, 96 insertions, 0 deletions
diff --git a/vcpkg/ports/xapian/configure.diff b/vcpkg/ports/xapian/configure.diff new file mode 100644 index 0000000..9c2ce04 --- /dev/null +++ b/vcpkg/ports/xapian/configure.diff @@ -0,0 +1,23 @@ +diff --git a/configure.ac b/configure.ac +index ca5b7b2..b059402 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -870,6 +870,7 @@ case $enable_backend_chert$enable_backend_glass in + dnl + dnl Similarly for uuid support. + ++ if false; then + dnl Check for zlib.h. + AC_CHECK_HEADERS([zlib.h], [], [ + AC_MSG_ERROR([zlib.h not found - required for chert and glass (you may need to install the zlib1g-dev or zlib-devel package)]) +@@ -879,6 +880,10 @@ case $enable_backend_chert$enable_backend_glass in + AC_SEARCH_LIBS([zlibVersion], [z zlib zdll], [], [ + AC_MSG_ERROR([zlibVersion() not found in -lz, -lzlib, or -lzdll - required for chert and glass (you may need to install the zlib1g-dev or zlib-devel package)]) + ]) ++ fi ++ PKG_CHECK_MODULES([ZLIB], [zlib], [],[AC_MSG_ERROR([zlib library not found])]) ++ CFLAGS="$LIBS $ZLIB_CFLAGS" ++ LIBS="$ZLIB_LIBS $LIBS" + + dnl Find a way to generate UUIDs. + diff --git a/vcpkg/ports/xapian/msvc-no-debug.diff b/vcpkg/ports/xapian/msvc-no-debug.diff new file mode 100644 index 0000000..1d41a32 --- /dev/null +++ b/vcpkg/ports/xapian/msvc-no-debug.diff @@ -0,0 +1,13 @@ +diff --git a/include/xapian/version_h.cc b/include/xapian/version_h.cc +index b36ae4d..c61e31a 100644 +--- a/include/xapian/version_h.cc ++++ b/include/xapian/version_h.cc +@@ -75,7 +75,7 @@ const char * dummy[] = { + "#endif", + "#endif", + "", +-#elif defined _MSC_VER ++#elif 0 + // When building the library with MSVC, generate preprocessor code to check + // that the same setting of _DEBUG is used for building applications as was + // used for building the library. diff --git a/vcpkg/ports/xapian/portfile.cmake b/vcpkg/ports/xapian/portfile.cmake new file mode 100644 index 0000000..2d432e8 --- /dev/null +++ b/vcpkg/ports/xapian/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_download_distfile(ARCHIVE
+ URLS "https://oligarchy.co.uk/xapian/${VERSION}/xapian-core-${VERSION}.tar.xz"
+ FILENAME "xapian-core-${VERSION}.tar.xz"
+ SHA512 60d66adbacbd59622d25e392060984bd1dc6c870f9031765f54cb335fb29f72f6d006d27af82a50c8da2cfbebd08dac4503a8afa8ad51bc4e6fa9cb367a59d29
+)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE "${ARCHIVE}"
+ PATCHES
+ configure.diff
+ msvc-no-debug.diff
+)
+
+set(OPTIONS "")
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
+ list(APPEND OPTIONS
+ ac_cv_have_decl___popcnt=no
+ ac_cv_have_decl___popcnt64=no
+ )
+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)
+
+if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/xapian-config" "\"${CURRENT_INSTALLED_DIR}\"" "`dirname $0`/../../..")
+ if(NOT VCPKG_BUILD_TYPE)
+ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/xapian-config" "\"${CURRENT_INSTALLED_DIR}/debug\"" "`dirname $0`/../../../../debug")
+ endif()
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
diff --git a/vcpkg/ports/xapian/vcpkg.json b/vcpkg/ports/xapian/vcpkg.json new file mode 100644 index 0000000..33bf4ff --- /dev/null +++ b/vcpkg/ports/xapian/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "xapian", + "version": "1.4.22", + "port-version": 2, + "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://xapian.org/", + "license": "GPL-2.0-or-later", + "supports": "(!arm | arm64) & !uwp & !xbox", + "dependencies": [ + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} |