diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/coin-or-buildtools | |
Diffstat (limited to 'vcpkg/ports/coin-or-buildtools')
| -rw-r--r-- | vcpkg/ports/coin-or-buildtools/buildtools.patch | 32 | ||||
| -rw-r--r-- | vcpkg/ports/coin-or-buildtools/buildtools2.patch | 54 | ||||
| -rw-r--r-- | vcpkg/ports/coin-or-buildtools/disable-mkl.diff | 60 | ||||
| -rw-r--r-- | vcpkg/ports/coin-or-buildtools/portfile.cmake | 15 | ||||
| -rw-r--r-- | vcpkg/ports/coin-or-buildtools/vcpkg.json | 8 |
5 files changed, 169 insertions, 0 deletions
diff --git a/vcpkg/ports/coin-or-buildtools/buildtools.patch b/vcpkg/ports/coin-or-buildtools/buildtools.patch new file mode 100644 index 0000000..da8c811 --- /dev/null +++ b/vcpkg/ports/coin-or-buildtools/buildtools.patch @@ -0,0 +1,32 @@ +diff --git a/coin.m4 b/coin.m4 +index 46501b207..a0ff20a6f 100644 +--- a/coin.m4 ++++ b/coin.m4 +@@ -1312,11 +1312,11 @@ AC_DEFUN([AC_COIN_CHK_ZLIB], + if test x$coin_enable_zlib = xyes ; then + AC_CHECK_HEADER([zlib.h],[coin_has_zlib=yes]) + if test x$coin_has_zlib = xyes ; then +- AC_CHECK_LIB([z],[gzopen],[],[coin_has_zlib=no]) ++ AC_SEARCH_LIBS([gzopen],[z zlib zlibd],[],[coin_has_zlib=no]) + fi + if test x$coin_has_zlib = xyes ; then + m4_foreach_w([myvar],[$1], +- [m4_toupper(myvar)_LFLAGS="-lz $m4_toupper(myvar)_LFLAGS" ++ [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS" + ]) + AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_ZLIB,[1],[Define to 1 if zlib is available]) + fi +@@ -1353,11 +1353,11 @@ AC_DEFUN([AC_COIN_CHK_BZLIB], + if test $coin_enable_bzlib = yes ; then + AC_CHECK_HEADER([bzlib.h],[coin_has_bzlib=yes]) + if test $coin_has_bzlib = yes ; then +- AC_CHECK_LIB([bz2],[BZ2_bzReadOpen],[],[coin_has_bzlib=no]) ++ AC_SEARCH_LIBS([BZ2_bzReadOpen],[bz2 bz2d],[],[coin_has_bzlib=no]) + fi + if test $coin_has_bzlib = yes ; then + m4_foreach_w([myvar],[$1], +- [m4_toupper(myvar)_LFLAGS="-lbz2 $m4_toupper(myvar)_LFLAGS" ++ [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS" + ]) + AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_BZLIB,[1],[Define to 1 if bzlib is available]) + fi diff --git a/vcpkg/ports/coin-or-buildtools/buildtools2.patch b/vcpkg/ports/coin-or-buildtools/buildtools2.patch new file mode 100644 index 0000000..2e9c15c --- /dev/null +++ b/vcpkg/ports/coin-or-buildtools/buildtools2.patch @@ -0,0 +1,54 @@ +diff --git a/coin.m4 b/coin.m4 +index a0ff20a6f..46e0519d1 100644 +--- a/coin.m4 ++++ b/coin.m4 +@@ -773,7 +773,6 @@ dnl Create a automake conditional and PKG_CONFIG variable + COIN_PKG_CONFIG_PATH="${PKG_CONFIG_PATH}" + AC_SUBST(COIN_PKG_CONFIG_PATH) + +- COIN_PKG_CONFIG_PATH="${expanded_libdir}/pkgconfig:${COIN_PKG_CONFIG_PATH}" + if test -n "$PKG_CONFIG"; then + AC_MSG_NOTICE([$PKG_CONFIG path is "$COIN_PKG_CONFIG_PATH"]) + fi +@@ -1316,7 +1315,7 @@ AC_DEFUN([AC_COIN_CHK_ZLIB], + fi + if test x$coin_has_zlib = xyes ; then + m4_foreach_w([myvar],[$1], +- [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS" ++ [m4_toupper(myvar)_LFLAGS="$ac_cv_search_gzopen $m4_toupper(myvar)_LFLAGS" + ]) + AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_ZLIB,[1],[Define to 1 if zlib is available]) + fi +@@ -1357,7 +1356,7 @@ AC_DEFUN([AC_COIN_CHK_BZLIB], + fi + if test $coin_has_bzlib = yes ; then + m4_foreach_w([myvar],[$1], +- [m4_toupper(myvar)_LFLAGS="-l$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS" ++ [m4_toupper(myvar)_LFLAGS="$ac_cv_search_BZ2_bzReadOpen $m4_toupper(myvar)_LFLAGS" + ]) + AC_DEFINE(m4_toupper(AC_PACKAGE_NAME)_HAS_BZLIB,[1],[Define to 1 if bzlib is available]) + fi +diff --git a/coin_chk_lapack.m4 b/coin_chk_lapack.m4 +index 6085069af..3314f97e2 100644 +--- a/coin_chk_lapack.m4 ++++ b/coin_chk_lapack.m4 +@@ -186,9 +186,7 @@ dnl links. We check for both to ensure that blas lib also appears on link line + dnl in case someone wants to use Blas functions but tests only for Lapack. + dnl We skip this if int64 + if test "$lapack_keep_looking" = yes ; then +- case " $2 " in +- *\ int64\ * ) ;; +- *) AC_COIN_CHK_MOD_EXISTS([lapack],[lapack blas], ++ AC_COIN_CHK_MOD_EXISTS([lapack],[lapack blas], + [lapack_what="generic module (lapack.pc blas.pc)" + AC_COIN_TRY_LINK([dsyev],[],[lapack], + [coin_has_lapack=yes +@@ -196,8 +194,6 @@ dnl We skip this if int64 + lapack_pcfiles="lapack blas"], + [AC_MSG_WARN([lapack.pc and blas.pc present, but could not find dsyev when trying to link with LAPACK.])],no) + ]) +- ;; +- esac + fi + dnl TODO do we need another check with lapack.pc only? + diff --git a/vcpkg/ports/coin-or-buildtools/disable-mkl.diff b/vcpkg/ports/coin-or-buildtools/disable-mkl.diff new file mode 100644 index 0000000..a958575 --- /dev/null +++ b/vcpkg/ports/coin-or-buildtools/disable-mkl.diff @@ -0,0 +1,60 @@ +diff --git a/coin_chk_lapack.m4 b/coin_chk_lapack.m4 +index 3314f97..0156a0e 100644 +--- a/coin_chk_lapack.m4 ++++ b/coin_chk_lapack.m4 +@@ -113,55 +113,7 @@ dnl can arrange that explicitly. + esac + ;; + +- *-cygwin* | *-mingw* | *-msys*) +-dnl Check for 64-bit sequential MKL in $LIB +- old_IFS="$IFS" +- IFS=";" +- coin_mkl="" +- for d in $LIB ; do +- # turn $d into unix-style short path (no spaces); cannot do -us, +- # so first do -ws, then -u +- d=`cygpath -ws "$d"` +- d=`cygpath -u "$d"` +- if test "$enable_shared" = yes ; then +- if test -e "$d/mkl_core_dll.lib" ; then +- case " $2 " in +- *\ int64\ * ) coin_mkl="$d/mkl_intel_ilp64_dll.lib $d/mkl_sequential_dll.lib $d/mkl_core_dll.lib" ;; +- *) coin_mkl="$d/mkl_intel_lp64_dll.lib $d/mkl_sequential_dll.lib $d/mkl_core_dll.lib" ;; +- esac +- break +- fi +- else +- if test -e "$d/mkl_core.lib" ; then +- case " $2 " in +- *\ int64\ * ) coin_mkl="$d/mkl_intel_ilp64.lib $d/mkl_sequential.lib $d/mkl_core.lib" ;; +- *) coin_mkl="$d/mkl_intel_lp64.lib $d/mkl_sequential.lib $d/mkl_core.lib" ;; +- esac +- break +- fi +- fi +- done +- IFS="$old_IFS" +- if test -n "$coin_mkl" ; then +- AC_COIN_TRY_LINK([dsyev],[$coin_mkl],[], +- [coin_has_lapack=yes +- lapack_lflags="$coin_mkl" +- lapack_what="Intel MKL ($lapack_lflags)" +- ],,no) +- fi +- ;; +- + *-darwin*) +- case " $2 " in +- *\ int64\ * ) coin_mkl="-lmkl_intel_ilp64 -lmkl_sequential -lmkl_core -lm" ;; +- *) coin_mkl="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lm" ;; +- esac +- AC_COIN_TRY_LINK([dsyev], +- [$coin_mkl],[], +- [coin_has_lapack=yes +- lapack_lflags="$coin_mkl" +- lapack_what="Intel MKL ($lapack_lflags)" +- ],,no) + if test "$coin_has_lapack" = no ; then + case " $2 " in + *\ int64\ * ) ;; diff --git a/vcpkg/ports/coin-or-buildtools/portfile.cmake b/vcpkg/ports/coin-or-buildtools/portfile.cmake new file mode 100644 index 0000000..0eb1fa2 --- /dev/null +++ b/vcpkg/ports/coin-or-buildtools/portfile.cmake @@ -0,0 +1,15 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH BUILD_SCRIPTS_PATH + REPO coin-or-tools/BuildTools + REF 1e473af11438bc0a9e8506252e31fc14b902a31e + SHA512 c142163a270848d1e1300a70713ee03ec822cc9d7583ba7aa685c02b7c25e0d4c0f7d958aad320dbf1824cc88fe0a49dc3357e0fe11588dc8c30e7fec8d239f6 + PATCHES buildtools.patch + buildtools2.patch + disable-mkl.diff +) + +file(COPY "${BUILD_SCRIPTS_PATH}/" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/BuildTools") + +file(INSTALL "${BUILD_SCRIPTS_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/coin-or-buildtools/vcpkg.json b/vcpkg/ports/coin-or-buildtools/vcpkg.json new file mode 100644 index 0000000..f8fa9a9 --- /dev/null +++ b/vcpkg/ports/coin-or-buildtools/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "coin-or-buildtools", + "version-date": "2023-02-02", + "port-version": 1, + "description": "Macros and patches for GNU autotools ", + "homepage": "https://coin-or-tools.github.io/BuildTools/", + "license": "EPL-2.0" +} |