aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/coin-or-clp
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/coin-or-clp
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/coin-or-clp')
-rw-r--r--vcpkg/ports/coin-or-clp/dep.patch31
-rw-r--r--vcpkg/ports/coin-or-clp/portfile.cmake39
-rw-r--r--vcpkg/ports/coin-or-clp/vcpkg.json10
3 files changed, 80 insertions, 0 deletions
diff --git a/vcpkg/ports/coin-or-clp/dep.patch b/vcpkg/ports/coin-or-clp/dep.patch
new file mode 100644
index 0000000..23e4da4
--- /dev/null
+++ b/vcpkg/ports/coin-or-clp/dep.patch
@@ -0,0 +1,31 @@
+diff --git a/configure.ac b/configure.ac
+index a3f2fb9c4..e6f53f26c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,6 +16,8 @@ All Rights Reserved.
+ This file is part of the open source package Clp which is distributed
+ under the Eclipse Public License.])
+
++AC_CONFIG_MACRO_DIR([m4])
++
+ # List one file in the package so that the configure script can test
+ # whether the package is actually there.
+ AC_CONFIG_SRCDIR(src/ClpSimplex.cpp)
+@@ -63,7 +63,7 @@ AC_COIN_CHK_PKG(Osi,[OsiClpLib OsiClpUnitTest])
+ AC_COIN_CHK_PKG(OsiTests,[OsiClpUnitTest],[osi-unittests])
+ AC_COIN_CHK_PKG(Sample,,[coindatasample],[],dataonly)
+ AC_COIN_CHK_PKG(Netlib,,[coindatanetlib],[],dataonly)
+-AC_COIN_CHK_PKG(Glpk,[ClpLib],[coinglpk])
++AC_COIN_CHK_PKG(Glpk,[ClpLib],[glpk])
+
+ #############################################################################
+ # Aboca #
+@@ -96,7 +96,7 @@ AC_COIN_CHK_LIBHDR(CHOLMOD,[ClpLib],[-lcholmod],[-I/usr/include/suitesparse],[],
+ # bothered to build it, we should use it. If it's not present, try for a
+ # system installation. If we find it, define CLP_HAS_MUMPS for export to code
+ # using clp.
+-AC_COIN_CHK_PKG(MUMPS,[ClpLib],[coinmumps])
++AC_COIN_CHK_PKG(MUMPS,[ClpLib],[mumps])
+ if test $coin_has_mumps = no ; then
+ AC_COIN_CHK_LIBHDR(MUMPS,[ClpLib],[-ldmumps],[-I/usr/include/MUMPS],[],
+ [dmumps_c((DMUMPS_STRUC_C*)0)],
diff --git a/vcpkg/ports/coin-or-clp/portfile.cmake b/vcpkg/ports/coin-or-clp/portfile.cmake
new file mode 100644
index 0000000..bb994c5
--- /dev/null
+++ b/vcpkg/ports/coin-or-clp/portfile.cmake
@@ -0,0 +1,39 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO coin-or/Clp
+ REF 5315ef2e93f5f532a600e16ab604ac439a416e59
+ SHA512 78dc8f562e7c1bff3e86c81eda4eda9780a4075921bcdd2338191f37820699baee94eec86b6f63b1b27e5bca7346a2611d669a7cdf3e47e1c032b072ca10bdab
+ PATCHES dep.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-coinutils
+ --with-glpk
+ --with-osi
+ --without-ositests
+ --without-sample
+ --without-netlib
+ --without-amd
+ --without-cholmod
+ --without-mumps
+ --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")
+
+vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/coin-or/ClpModel.hpp" "\"glpk.h\"" "\"../glpk.h\"")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/coin-or-clp/vcpkg.json b/vcpkg/ports/coin-or-clp/vcpkg.json
new file mode 100644
index 0000000..82f8c45
--- /dev/null
+++ b/vcpkg/ports/coin-or-clp/vcpkg.json
@@ -0,0 +1,10 @@
+{
+ "name": "coin-or-clp",
+ "version-date": "2023-02-01",
+ "description": "Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available.",
+ "license": "EPL-2.0",
+ "dependencies": [
+ "coin-or-osi",
+ "coinutils"
+ ]
+}