mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 10:49:00 +08:00
Merge branch 'master' of https://github.com/Microsoft/vcpkg
This commit is contained in:
commit
53d87f2bac
3
ports/libmariadb/CONTROL
Normal file
3
ports/libmariadb/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: libmariadb
|
||||
Version: 2.3.1
|
||||
Description: The MariaDB Connector/C is used to connect applications developed in C/C++ to MariaDB and MySQL databases.
|
74
ports/libmariadb/portfile.cmake
Normal file
74
ports/libmariadb/portfile.cmake
Normal file
@ -0,0 +1,74 @@
|
||||
include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mariadb-connector-c-2.3.1)
|
||||
|
||||
if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql.h")
|
||||
message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/MariaDB/mariadb-connector-c/archive/v2.3.1.tar.gz"
|
||||
FILENAME "mariadb-connector-c-2.3.1.tar.gz"
|
||||
SHA512 d82f8348201d41dce6820c952a0503a5154c4e9c06feb471fe451a6fb968e5cff04423a64183cbb8e159a1b4e7265c12b5b7aef912f633395d9f1b0436fbfd2d
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# remove debug header
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# fix libmariadb lib & dll directory.
|
||||
file(MAKE_DIRECTORY
|
||||
${CURRENT_PACKAGES_DIR}/bin
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.dll
|
||||
${CURRENT_PACKAGES_DIR}/bin/libmariadb.dll)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.dll
|
||||
${CURRENT_PACKAGES_DIR}/debug/bin/libmariadb.dll)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/lib/mariadb/libmariadb.lib
|
||||
${CURRENT_PACKAGES_DIR}/lib/libmariadb.lib)
|
||||
file(RENAME
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/libmariadb.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/libmariadb.lib)
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/lib/mariadb/mariadbclient.lib
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mariadb/mariadbclient.lib)
|
||||
|
||||
# remove plugin folder
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/lib/plugin
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/plugin
|
||||
${CURRENT_PACKAGES_DIR}/lib/mariadb
|
||||
${CURRENT_PACKAGES_DIR}/debug/lib/mariadb)
|
||||
|
||||
# copy & remove header files
|
||||
file(GLOB HEADER_FILES ${CURRENT_PACKAGES_DIR}/include/mariadb/*)
|
||||
file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/mariadb)
|
||||
file(REMOVE
|
||||
${CURRENT_PACKAGES_DIR}/include/config-win.h
|
||||
${CURRENT_PACKAGES_DIR}/include/dbug.h
|
||||
${CURRENT_PACKAGES_DIR}/include/errmsg.h
|
||||
${CURRENT_PACKAGES_DIR}/include/getopt.h
|
||||
${CURRENT_PACKAGES_DIR}/include/hash.h
|
||||
${CURRENT_PACKAGES_DIR}/include/ma_common.h
|
||||
${CURRENT_PACKAGES_DIR}/include/ma_dyncol.h
|
||||
${CURRENT_PACKAGES_DIR}/include/sha1.h
|
||||
${CURRENT_PACKAGES_DIR}/include/thr_alarm.h
|
||||
${CURRENT_PACKAGES_DIR}/include/violite.h
|
||||
${CURRENT_PACKAGES_DIR}/include/mysql_version.h.in
|
||||
${CURRENT_PACKAGES_DIR}/include/my_config.h.in
|
||||
${CURRENT_PACKAGES_DIR}/include/CMakeLists.txt
|
||||
${CURRENT_PACKAGES_DIR}/include/Makefile.am)
|
||||
|
||||
# copy license file
|
||||
file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmariadb/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libmariadb/copyright)
|
@ -2,6 +2,10 @@ include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/mysql-server-mysql-5.7.16)
|
||||
|
||||
if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql.h")
|
||||
message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.")
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/mysql/mysql-server/archive/mysql-5.7.16.tar.gz"
|
||||
FILENAME "mysql-server-mysql-5.7.16.tar.gz"
|
||||
|
27
ports/libxml2/0001-Fix-makefile-imports.patch
Normal file
27
ports/libxml2/0001-Fix-makefile-imports.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff --git "a/win32/Makefile.msvc" "b/win32/Makefile.msvc"
|
||||
index d16c1a2..09d2291 100644
|
||||
--- "a/win32/Makefile.msvc"
|
||||
+++ "b/win32/Makefile.msvc"
|
||||
@@ -72,7 +72,7 @@ LIBS =
|
||||
LIBS = $(LIBS) wsock32.lib ws2_32.lib
|
||||
!endif
|
||||
!if "$(WITH_ICONV)" == "1"
|
||||
-LIBS = $(LIBS) iconv.lib
|
||||
+LIBS = $(LIBS) libiconv.lib libcharset.lib
|
||||
!endif
|
||||
!if "$(WITH_ICU)" == "1"
|
||||
LIBS = $(LIBS) icu.lib
|
||||
@@ -80,7 +80,11 @@ LIBS = $(LIBS) icu.lib
|
||||
!if "$(WITH_ZLIB)" == "1"
|
||||
# could be named differently zdll or zlib
|
||||
# LIBS = $(LIBS) zdll.lib
|
||||
-LIBS = $(LIBS) zlib.lib
|
||||
+!if "$(DEBUG)" == "1"
|
||||
+LIBS = $(LIBS) zlibd.lib
|
||||
+!else
|
||||
+LIBS = $(LIBS) zlib.lib
|
||||
+!endif
|
||||
!endif
|
||||
!if "$(WITH_LZMA)" == "1"
|
||||
LIBS = $(LIBS) liblzma.lib
|
||||
|
4
ports/libxml2/CONTROL
Normal file
4
ports/libxml2/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: libxml2
|
||||
Version: 2.9.4
|
||||
Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform)
|
||||
Build-Depends: zlib, libiconv
|
145
ports/libxml2/portfile.cmake
Normal file
145
ports/libxml2/portfile.cmake
Normal file
@ -0,0 +1,145 @@
|
||||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
|
||||
include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libxml2-2.9.4)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "ftp://xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz"
|
||||
FILENAME "libxml2-2.9.4.tar.gz"
|
||||
SHA512 f5174ab1a3a0ec0037a47f47aa47def36674e02bfb42b57f609563f84c6247c585dbbb133c056953a5adb968d328f18cbc102eb0d00d48eb7c95478389e5daf9
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
find_program(NMAKE nmake)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}/
|
||||
PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-Fix-makefile-imports.patch
|
||||
)
|
||||
|
||||
set(SCRIPTS_DIR ${SOURCE_PATH}/win32)
|
||||
|
||||
set(CONFIGURE_COMMAND_TEMPLATE cscript configure.js
|
||||
zlib=yes
|
||||
cruntime=@CRUNTIME@
|
||||
debug=@DEBUGMODE@
|
||||
prefix=@INSTALL_DIR@
|
||||
include=@INCLUDE_DIR@
|
||||
lib=@LIB_DIR@
|
||||
bindir=@INSTALL_BIN_DIR@
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
# Release
|
||||
#
|
||||
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")
|
||||
|
||||
set(CRUNTIME /MD)
|
||||
set(DEBUGMODE no)
|
||||
set(LIB_DIR ${CURRENT_INSTALLED_DIR}/lib)
|
||||
set(INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include)
|
||||
set(INSTALL_DIR ${CURRENT_PACKAGES_DIR})
|
||||
set(INSTALL_BIN_DIR "$(PREFIX)/tools")
|
||||
file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR)
|
||||
file(TO_NATIVE_PATH "${INCLUDE_DIR}" INCLUDE_DIR)
|
||||
file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR)
|
||||
file(TO_NATIVE_PATH "${INSTALL_BIN_DIR}" INSTALL_BIN_DIR)
|
||||
string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND)
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CONFIGURE_COMMAND}
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME config-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /f Makefile.msvc rebuild
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME build-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /f Makefile.msvc install
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME install-${TARGET_TRIPLET}-rel
|
||||
)
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-rel done")
|
||||
|
||||
|
||||
#
|
||||
# Debug
|
||||
#
|
||||
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg")
|
||||
|
||||
set(CRUNTIME /MDd)
|
||||
set(DEBUGMODE yes)
|
||||
set(LIB_DIR ${CURRENT_INSTALLED_DIR}/debug/lib)
|
||||
set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}/debug)
|
||||
file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR)
|
||||
file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR)
|
||||
string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${CONFIGURE_COMMAND}
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME config-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /f Makefile.msvc rebuild
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME build-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Building ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${NMAKE} /f Makefile.msvc install
|
||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
||||
LOGNAME install-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
message(STATUS "Installing ${TARGET_TRIPLET}-dbg done")
|
||||
|
||||
#
|
||||
# Cleanup
|
||||
#
|
||||
|
||||
# Remove tools and debug include directories
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Move includes to the expected directory
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/include/libxml2/libxml ${CURRENT_PACKAGES_DIR}/include/libxml)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libxml2)
|
||||
|
||||
# The makefile builds both static and dynamic libraries, so remove the ones we don't want
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxml2_a.lib ${CURRENT_PACKAGES_DIR}/lib/libxml2_a_dll.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2_a.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2_a_dll.lib)
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxml2.lib ${CURRENT_PACKAGES_DIR}/lib/libxml2_a_dll.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2_a_dll.lib)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
# Rename the libs to match the dynamic lib names
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libxml2_a.lib ${CURRENT_PACKAGES_DIR}/lib/libxml2.lib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2_a.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libxml2.lib)
|
||||
endif()
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxml2)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libxml2/COPYING ${CURRENT_PACKAGES_DIR}/share/libxml2/copyright)
|
3
ports/physfs/CONTROL
Normal file
3
ports/physfs/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: physfs
|
||||
Version: 2.0.3
|
||||
Description: a library to provide abstract access to various archives
|
30
ports/physfs/portfile.cmake
Normal file
30
ports/physfs/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
||||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
|
||||
include(${CMAKE_TRIPLET_FILE})
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/physfs-2.0.3)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://icculus.org/physfs/downloads/physfs-2.0.3.tar.bz2"
|
||||
FILENAME "physfs-2.0.3.tar.bz2"
|
||||
SHA512 47eff0c81b8dc3bb526766b0a8ad2437d2951867880116d6e6e8f2ec1490e263541fb741867fed6517cc3fa8a9c5651b36e3e02a499f19cfdc5c7261c9707e80
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/test_physfs.exe)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/test_physfs.exe)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/physfs)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/physfs/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/physfs/copyright)
|
Loading…
Reference in New Issue
Block a user