mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 05:29:00 +08:00
[glpk] Add new port (#28364)
* Create portfile.cmake * Add manifest and patches for glpk-5.0 * Shrink portfile.cmake Removed some comments * Update ci.baseline.txt to list glpk:x86-windows * Addressing some reviewer comments and suggestions * Addressing comments from microsoft/vcpkg#28364 * Trying out x86-windows again * Updating the version database * x-add-version glpk * Addressing reviews * Update version database: x-add-version glpk * More compact code thanks to PR reviews * format-manifest ports/glpk/vcpkg.json * Update version database: x-add-version glpk * No default features * Update version database: x-add-version glpk
This commit is contained in:
parent
ecce05107c
commit
2ac8af6d70
23
ports/glpk/configure.ac.patch
Normal file
23
ports/glpk/configure.ac.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- configure.ac.original 2022-12-15 13:46:24.222223600 -0500
|
||||
+++ configure.ac 2022-12-28 09:30:59.301984700 -0500
|
||||
@@ -114,6 +114,12 @@
|
||||
LIBODBC="libodbc.dylib"
|
||||
LIBMYSQL="libmysqlclient.dylib"
|
||||
;;
|
||||
+ cygwin* | mingw*)
|
||||
+ LIBIODBC="odbc32.dll"
|
||||
+ LIBODBC="odbc32.dll"
|
||||
+ LIBMYSQL="libmysql.dll"
|
||||
+ AC_DEFINE([__WOE__], [1], [N/A])
|
||||
+ ;;
|
||||
*)
|
||||
LIBIODBC="libiodbc.so"
|
||||
LIBODBC="libodbc.so"
|
||||
@@ -145,7 +151,6 @@
|
||||
AC_MSG_ERROR([--enable-mysql requires --enable-dl])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
- CPPFLAGS="-I/usr/include/mysql $CPPFLAGS"
|
||||
AC_DEFINE_UNQUOTED([MYSQL_DLNAME], ["$LIBMYSQL"], [N/A])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
60
ports/glpk/portfile.cmake
Normal file
60
ports/glpk/portfile.cmake
Normal file
@ -0,0 +1,60 @@
|
||||
vcpkg_minimum_required(VERSION 2022-10-12)
|
||||
set(DISTFILE_SHA512_HASH 4e92195fa058c707146f2690f3a38b46c33add948c852f67659ca005a6aa980bbf97be96528b0f8391690facb880ac2126cd60198c6c175e7f3f06cca7e29f9d)
|
||||
|
||||
vcpkg_download_distfile(
|
||||
DISTFILE
|
||||
FILENAME "glpk.tar.gz"
|
||||
URLS "https://ftpmirror.gnu.org/gnu/glpk/glpk-${VERSION}.tar.gz" "https://ftp.gnu.org/gnu/glpk/glpk-${VERSION}.tar.gz"
|
||||
SHA512 ${DISTFILE_SHA512_HASH}
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${DISTFILE}"
|
||||
PATCHES
|
||||
configure.ac.patch
|
||||
)
|
||||
|
||||
vcpkg_list(SET CONFIGURE_OPTIONS)
|
||||
if("dl" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --enable-dl=dlfcn "LIBS=-ldl \$LIBS")
|
||||
else()
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-dl)
|
||||
endif()
|
||||
|
||||
if("gmp" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --with-gmp)
|
||||
else()
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --without-gmp)
|
||||
endif()
|
||||
|
||||
if("mysql" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS
|
||||
--enable-mysql
|
||||
"CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include/mysql \$CPPFLAGS"
|
||||
)
|
||||
else()
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-mysql)
|
||||
endif()
|
||||
|
||||
if("odbc" IN_LIST FEATURES)
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --enable-odbc)
|
||||
else()
|
||||
vcpkg_list(APPEND CONFIGURE_OPTIONS --disable-odbc)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
NO_ADDITIONAL_PATHS
|
||||
DETERMINE_BUILD_TRIPLET
|
||||
OPTIONS
|
||||
${CONFIGURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_copy_tools(TOOL_NAMES glpsol AUTO_CLEAN)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
56
ports/glpk/vcpkg.json
Normal file
56
ports/glpk/vcpkg.json
Normal file
@ -0,0 +1,56 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
|
||||
"name": "glpk",
|
||||
"version": "5.0",
|
||||
"maintainers": "Fabio A. Correa Duran",
|
||||
"description": [
|
||||
"The GNU Linear Programming Kit (GLPK) solves large-scale linear programming (LP), mixed integer programming (MIP), and related problems.",
|
||||
"GLPK includes the following main components:",
|
||||
"Primal and dual simplex methods",
|
||||
"Primal-dual interior-point method",
|
||||
"Branch-and-cut method",
|
||||
"Translator for GNU MathProg",
|
||||
"Application program interface (API)",
|
||||
"Stand-alone LP/MIP solver "
|
||||
],
|
||||
"homepage": "https://www.gnu.org/software/glpk/",
|
||||
"documentation": "https://www.gnu.org/software/glpk/#documentation",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"features": {
|
||||
"dl": {
|
||||
"description": "Enable shared library support",
|
||||
"dependencies": [
|
||||
"dlfcn-win32"
|
||||
]
|
||||
},
|
||||
"gmp": {
|
||||
"description": "Use the GNU Multiple Precision Arithmetic Library",
|
||||
"dependencies": [
|
||||
"gmp"
|
||||
]
|
||||
},
|
||||
"mysql": {
|
||||
"description": "Sharing between MathProg objects and MySQL databases (libmysql)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "glpk",
|
||||
"features": [
|
||||
"dl"
|
||||
]
|
||||
},
|
||||
"libmysql"
|
||||
]
|
||||
},
|
||||
"odbc": {
|
||||
"description": "Sharing between MathProg objects and databases through ODBC (libiodbc)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "glpk",
|
||||
"features": [
|
||||
"dl"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -2700,6 +2700,10 @@
|
||||
"baseline": "20201203",
|
||||
"port-version": 0
|
||||
},
|
||||
"glpk": {
|
||||
"baseline": "5.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"glslang": {
|
||||
"baseline": "11.13.0",
|
||||
"port-version": 0
|
||||
|
9
versions/g-/glpk.json
Normal file
9
versions/g-/glpk.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "e1346a1f1cdf3d0b7aa46517ae0f8f0006ac6903",
|
||||
"version": "5.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user