aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/coinutils
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/coinutils
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/coinutils')
-rw-r--r--vcpkg/ports/coinutils/coinutils.patch13
-rw-r--r--vcpkg/ports/coinutils/coinutils2.patch15
-rw-r--r--vcpkg/ports/coinutils/portfile.cmake47
-rw-r--r--vcpkg/ports/coinutils/vcpkg.json25
4 files changed, 100 insertions, 0 deletions
diff --git a/vcpkg/ports/coinutils/coinutils.patch b/vcpkg/ports/coinutils/coinutils.patch
new file mode 100644
index 0000000..d12763b
--- /dev/null
+++ b/vcpkg/ports/coinutils/coinutils.patch
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index f35c22949..8787a1c0b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -10,6 +10,8 @@
+
+ AC_INIT([CoinUtils],[devel],[https://github.com/coin-or/CoinUtils/issues/new],[coin-or-coinutils],[https://github.com/coin-or/CoinUtils])
+
++AC_CONFIG_MACRO_DIR([m4])
++
+ AC_COPYRIGHT([
+ Copyright 2006 International Business Machines and others.
+ All Rights Reserved.
diff --git a/vcpkg/ports/coinutils/coinutils2.patch b/vcpkg/ports/coinutils/coinutils2.patch
new file mode 100644
index 0000000..55b367b
--- /dev/null
+++ b/vcpkg/ports/coinutils/coinutils2.patch
@@ -0,0 +1,15 @@
+diff --git a/configure.ac b/configure.ac
+index 8787a1c0b..504019b78 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -96,8 +96,8 @@ AC_COINUTILS_MEMPOOL(4096,no)
+ # Collect information required to use component libraries.
+
+ AC_COIN_CHK_LAPACK(CoinUtilsLib)
+-AC_COIN_CHK_PKG(Glpk,[CoinUtilsLib CoinUtilsTest],[coinglpk])
+-AC_COIN_CHK_PKG(ASL,[CoinUtilsLib],[coinasl])
++AC_COIN_CHK_PKG(Glpk,[CoinUtilsLib CoinUtilsTest],[glpk])
++AC_COIN_CHK_PKG(ASL,[CoinUtilsLib],[asl])
+ AC_COIN_CHK_PKG(Sample,[],[coindatasample],[],dataonly)
+ AC_COIN_CHK_PKG(Netlib,[],[coindatanetlib],[],dataonly)
+
diff --git a/vcpkg/ports/coinutils/portfile.cmake b/vcpkg/ports/coinutils/portfile.cmake
new file mode 100644
index 0000000..78a7aef
--- /dev/null
+++ b/vcpkg/ports/coinutils/portfile.cmake
@@ -0,0 +1,47 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO coin-or/CoinUtils
+ REF 014be1f1724c074401d9d9c27bcce35baa9dca45 # I don't trust the release tags. They seem to point to a different fork with an outdates file structure?
+ SHA512 c5b706ca070b9f0997f9cdf532eb97c4d6ef6c6219d5d247c486048daf94a31151711ad96a32a0f0e701024d7759f07abc867591249d6c19b2b1c153257b794a
+ PATCHES coinutils.patch coinutils2.patch
+)
+
+file(COPY "${CURRENT_INSTALLED_DIR}/share/coin-or-buildtools/" DESTINATION "${SOURCE_PATH}")
+
+set(ENV{ACLOCAL} "aclocal -I \"${SOURCE_PATH}/BuildTools\"")
+
+#--enable-msvc
+set(options "")
+if("glpk" IN_LIST FEATURES)
+ list(APPEND options "--with-glpk")
+else()
+ list(APPEND options "--without-glpk")
+endif()
+
+vcpkg_configure_make(
+ SOURCE_PATH "${SOURCE_PATH}"
+ AUTOCONFIG
+ OPTIONS
+ ${options}
+ --with-lapack
+ --without-netlib
+ --without-sample
+ --without-asl
+ #--enable-coinutils-threads # only with -lrt
+ #--enable-coinutils-bigindex # only for x64
+ --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/CoinMpsIO.hpp" "\"glpk.h\"" "\"../glpk.h\"")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/coinutils" RENAME copyright)
+
+file(COPY "${SOURCE_PATH}/m4" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
diff --git a/vcpkg/ports/coinutils/vcpkg.json b/vcpkg/ports/coinutils/vcpkg.json
new file mode 100644
index 0000000..f4e7e6b
--- /dev/null
+++ b/vcpkg/ports/coinutils/vcpkg.json
@@ -0,0 +1,25 @@
+{
+ "name": "coinutils",
+ "version-date": "2024-04-08",
+ "description": "CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project",
+ "homepage": "https://www.coin-or.org/",
+ "license": "EPL-2.0",
+ "supports": "!uwp",
+ "dependencies": [
+ "bzip2",
+ "coin-or-buildtools",
+ "lapack",
+ "zlib"
+ ],
+ "features": {
+ "glpk": {
+ "description": "Build with Glpk",
+ "dependencies": [
+ {
+ "name": "glpk",
+ "default-features": false
+ }
+ ]
+ }
+ }
+}