commit df571c07016b1060299f9d6aff9cd2db4e6de2c7 Author: Tim Biermann <tbier@posteo.de> Date: Sat Jan 28 14:41:04 2023 +0100 coin-or-mp: pulled patches from libreoffice diff --git a/coin-or-mp/.signature b/coin-or-mp/.signature index 104e97cc7..9f2afa134 100644 --- a/coin-or-mp/.signature +++ b/coin-or-mp/.signature @@ -1,5 +1,8 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF3702twmUKVkfDG/Kw0cCG9YrvkzTFfkeHsRMyJH/dk/j5VZkUc2jkF4rHh4+WbaHgwqoAd3Qb1ILzn52405YhQ4= -SHA256 (Pkgfile) = d4d6494d8fde3ab7d48ec9926a73c2af87cace8a7c6622551667bc777355adfd +RWSagIOpLGJF3+Gpl9iPVogUpcc3gav/WSCp8LZj0dwKcB5oOccjzPZSC57SomBrp2IK82BIPOOBN5O/jYNvWXRp3Pm+mNxWpgU= +SHA256 (Pkgfile) = 781b5a66ab68d7060e357534d60ced83194127fffd297db8f7b7750ca263f465 SHA256 (.footprint) = e02597100d1f451c7b32752cd15a4527c688df69b753265c086c2f55348832bb SHA256 (CoinMP-1.8.4.tgz) = 3459fb0ccbdd39342744684338984ac4cc153fb0434f4cae8cf74bd67490a38d +SHA256 (werror-undef.patch.0) = 0d390fdd164d24b0e8e8ad8784a78ad0f7d5352cbf9946099ac92eda3a92c3a6 +SHA256 (ubsan.patch.0) = 79dbcc2e2d8f750b1b587bbf4167444bebf408a1ba0ca3ecd711097d75140cbe +SHA256 (libtool.patch) = 20e4294f3d1f8006bd3fa502e3219b65be67f928e93e8853bf56d1911baa46f7 diff --git a/coin-or-mp/Pkgfile b/coin-or-mp/Pkgfile index 8c49e47c4..9bb511335 100644 --- a/coin-or-mp/Pkgfile +++ b/coin-or-mp/Pkgfile @@ -5,11 +5,19 @@ name=coin-or-mp version=1.8.4 -release=4 -source=(https://www.coin-or.org/download/source/CoinMP/CoinMP-$version.tgz) +release=5 +source=(https://www.coin-or.org/download/source/CoinMP/CoinMP-$version.tgz + werror-undef.patch.0 + ubsan.patch.0 + libtool.patch) build() { cd CoinMP-$version + + patch -Np0 -i $SRC/werror-undef.patch.0 + patch -Np0 -i $SRC/ubsan.patch.0 + patch -Np1 -i $SRC/libtool.patch + COIN_SKIP_PROJECTS="Sample" \ ./configure --prefix=/usr \ --with-osi-lib="$(pkg-config --libs osi)" \ @@ -24,8 +32,10 @@ build() { --with-coinutils-incdir="/usr/include/coin/" make make DESTDIR=$PKG install-exec + mkdir -p $PKG/usr/{include/coin,lib/pkgconfig} install -c -m 644 CoinMP/src/CoinMP.h $PKG/usr/include/coin/CoinMP.h install -c -m 644 CoinMP/coinmp.pc $PKG/usr/lib/pkgconfig/coinmp.pc + rm -fr $PKG/usr/share } diff --git a/coin-or-mp/libtool.patch b/coin-or-mp/libtool.patch new file mode 100644 index 000000000..5763367c5 --- /dev/null +++ b/coin-or-mp/libtool.patch @@ -0,0 +1,27 @@ +--- CoinMP/ltmain.sh ++++ CoinMP/ltmain.sh +@@ -1254,6 +1254,12 @@ + prev= + continue + ;; ++ mllvm) ++ # Clang does not use LLVM to link, so we can simply discard any ++ # '-mllvm $arg' options when doing the link step. ++ prev= ++ continue ++ ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg +@@ -1607,6 +1613,11 @@ + continue + ;; + ++ -mllvm) ++ prev=mllvm ++ continue ++ ;; ++ + -module) + module=yes + continue diff --git a/coin-or-mp/ubsan.patch.0 b/coin-or-mp/ubsan.patch.0 new file mode 100644 index 000000000..157332986 --- /dev/null +++ b/coin-or-mp/ubsan.patch.0 @@ -0,0 +1,11 @@ +--- Clp/src/ClpParameters.hpp ++++ Clp/src/ClpParameters.hpp +@@ -81,7 +81,7 @@ + template <class T> inline void + ClpDisjointCopyN( const T * array, const int size, T * newArray) + { +- memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T)); ++ if (size != 0) memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T)); + } + /// And set + template <class T> inline void diff --git a/coin-or-mp/werror-undef.patch.0 b/coin-or-mp/werror-undef.patch.0 new file mode 100644 index 000000000..a9b80f280 --- /dev/null +++ b/coin-or-mp/werror-undef.patch.0 @@ -0,0 +1,11 @@ +--- CoinUtils/src/config_coinutils_default.h 2014-06-06 14:28:06.872113540 +0100 ++++ CoinUtils/src/config_coinutils_default.h 2014-06-06 14:28:29.400294129 +0100 +@@ -26,7 +26,7 @@ + all of this inside the guard for MSC_VER >= 1200. If you're reading this + and have been developing in MSVS long enough to know, fix it. -- lh, 100915 -- + */ +-#if _MSC_VER >= 1200 ++#if defined _MSC_VER && _MSC_VER >= 1200 + # include <BaseTsd.h> + # define COIN_INT64_T INT64 + # define COIN_UINT64_T UINT64