aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/coin-or-osi
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/coin-or-osi')
-rw-r--r--vcpkg/ports/coin-or-osi/glpk.patch13
-rw-r--r--vcpkg/ports/coin-or-osi/portfile.cmake37
-rw-r--r--vcpkg/ports/coin-or-osi/vcpkg.json9
3 files changed, 59 insertions, 0 deletions
diff --git a/vcpkg/ports/coin-or-osi/glpk.patch b/vcpkg/ports/coin-or-osi/glpk.patch
new file mode 100644
index 0000000..5a730e9
--- /dev/null
+++ b/vcpkg/ports/coin-or-osi/glpk.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index e4bd1361e..4c3a2a166 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -78,7 +78,7 @@ AC_COIN_CHK_HERE([OsiLib],[OsiCommonTestLib],[osi])
+ # downloaded and built. The general flow here is as above: Initialise the
+ # library, add external components, finalize the flags, and add any components
+ # being built here.
+-AC_COIN_CHK_PKG(Glpk,[OsiGlpkLib OsiTest],[coinglpk])
++AC_COIN_CHK_PKG(Glpk,[OsiGlpkLib OsiTest],[glpk])
+
+ AC_LANG_PUSH(C++)
+ AC_COIN_CHK_LIBHDR(SoPlex,[OsiSpxLib OsiTest],[-lsoplex],[],[],
diff --git a/vcpkg/ports/coin-or-osi/portfile.cmake b/vcpkg/ports/coin-or-osi/portfile.cmake
new file mode 100644
index 0000000..c338eaf
--- /dev/null
+++ b/vcpkg/ports/coin-or-osi/portfile.cmake
@@ -0,0 +1,37 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO coin-or/Osi
+ REF 2420bb864d039a03e11c579b0c9087adbdaa26db
+ SHA512 27d501cb513a0570ad83247b6a8e7fc69cdbcd2cbec6c11aea0b5982627e76efa7ea6403e6d97419f6c984553434f088a748a7d8d54c1bf73cdbdfd5bef1f2b0
+ PATCHES glpk.patch
+)
+
+file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
+
+set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+ OPTIONS
+ --with-glpk
+ --with-lapack
+ --with-coinutils
+ --without-netlib
+ --without-sample
+ --without-gurobi
+ --without-xpress
+ --without-cplex
+ --without-soplex
+ --enable-relocatable
+ --disable-readline
+)
+
+vcpkg_install_make()
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/coin-or-osi/vcpkg.json b/vcpkg/ports/coin-or-osi/vcpkg.json
new file mode 100644
index 0000000..bed12c0
--- /dev/null
+++ b/vcpkg/ports/coin-or-osi/vcpkg.json
@@ -0,0 +1,9 @@
+{
+ "name": "coin-or-osi",
+ "version-date": "2024-04-16",
+ "description": "Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver.",
+ "license": "EPL-2.0",
+ "dependencies": [
+ "coinutils"
+ ]
+}