From a25f2be2c8a4aa624fd3f983b8ec8c9a6750825e Mon Sep 17 00:00:00 2001 From: zhaofeng-shu33 <616545598@qq.com> Date: Wed, 29 May 2019 19:30:15 +0800 Subject: [PATCH 1/3] add liblemon preflow patch, see https://lemon.cs.elte.hu/trac/lemon/ticket/608 --- ports/liblemon/CONTROL | 2 +- ports/liblemon/portfile.cmake | 1 + ports/liblemon/preflow_git.patch | 58 ++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 ports/liblemon/preflow_git.patch diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL index c21960b72abf2f..12ba5fc43bd0b2 100644 --- a/ports/liblemon/CONTROL +++ b/ports/liblemon/CONTROL @@ -1,3 +1,3 @@ Source: liblemon -Version: 1.3.1-4 +Version: 1.3.1-5 Description: Library for Efficient Modeling and Optimization in Networks diff --git a/ports/liblemon/portfile.cmake b/ports/liblemon/portfile.cmake index b41322a8759492..a285a80bb87362 100644 --- a/ports/liblemon/portfile.cmake +++ b/ports/liblemon/portfile.cmake @@ -17,6 +17,7 @@ vcpkg_extract_source_archive_ex( PATCHES "cmake.patch" "fixup-targets.patch" + "preflow_git.patch" ) vcpkg_configure_cmake( diff --git a/ports/liblemon/preflow_git.patch b/ports/liblemon/preflow_git.patch new file mode 100644 index 00000000000000..7fa60bd37e0333 --- /dev/null +++ b/ports/liblemon/preflow_git.patch @@ -0,0 +1,58 @@ +diff --git a/lemon/preflow.h b/lemon/preflow.h +index 28ccd67..d210e87 100644 +--- a/lemon/preflow.h ++++ b/lemon/preflow.h +@@ -476,7 +476,7 @@ namespace lemon { + /// Initializes the internal data structures and sets the initial + /// flow to the given \c flowMap. The \c flowMap should contain a + /// flow or at least a preflow, i.e. at each node excluding the +- /// source node the incoming flow should greater or equal to the ++ /// source node the incoming flow should be greater or equal to the + /// outgoing flow. + /// \return \c false if the given \c flowMap is not a preflow. + template +@@ -495,7 +495,7 @@ namespace lemon { + for (OutArcIt e(_graph, n); e != INVALID; ++e) { + excess -= (*_flow)[e]; + } +- if (excess < 0 && n != _source) return false; ++ if (_tolerance.negative(excess) && n != _source) return false; + (*_excess)[n] = excess; + } + +@@ -639,7 +639,7 @@ namespace lemon { + + (*_excess)[n] = excess; + +- if (excess != 0) { ++ if (_tolerance.nonZero(excess)) { + if (new_level + 1 < _level->maxLevel()) { + _level->liftHighestActive(new_level + 1); + } else { +@@ -720,7 +720,7 @@ namespace lemon { + + (*_excess)[n] = excess; + +- if (excess != 0) { ++ if (_tolerance.nonZero(excess)) { + if (new_level + 1 < _level->maxLevel()) { + _level->liftActiveOn(level, new_level + 1); + } else { +@@ -791,7 +791,7 @@ namespace lemon { + for (NodeIt n(_graph); n != INVALID; ++n) { + if (!reached[n]) { + _level->dirtyTopButOne(n); +- } else if ((*_excess)[n] > 0 && _target != n) { ++ } else if (_tolerance.positive((*_excess)[n]) && _target != n) { + _level->activate(n); + } + } +@@ -852,7 +852,7 @@ namespace lemon { + + (*_excess)[n] = excess; + +- if (excess != 0) { ++ if (_tolerance.nonZero(excess)) { + if (new_level + 1 < _level->maxLevel()) { + _level->liftHighestActive(new_level + 1); + } else { From a3510ba14d16a2a5e106ad745d518ab4834a5d30 Mon Sep 17 00:00:00 2001 From: Daniel <51385773+dan-shaw@users.noreply.github.com> Date: Tue, 11 Jun 2019 09:50:25 -0700 Subject: [PATCH 2/3] [liblemon] track HEAD of version 1.3 --- ports/liblemon/CONTROL | 2 +- ports/liblemon/portfile.cmake | 7 ++-- ports/liblemon/preflow_git.patch | 58 -------------------------------- 3 files changed, 4 insertions(+), 63 deletions(-) delete mode 100644 ports/liblemon/preflow_git.patch diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL index 87234c68ae753d..c4f533d71dd80c 100644 --- a/ports/liblemon/CONTROL +++ b/ports/liblemon/CONTROL @@ -1,3 +1,3 @@ Source: liblemon -Version: 1.3.1-5 +Version: 1.3.1-6 Description: Library for Efficient Modeling and Optimization in Networks diff --git a/ports/liblemon/portfile.cmake b/ports/liblemon/portfile.cmake index 93588639ecf8f3..960b09987e4c67 100644 --- a/ports/liblemon/portfile.cmake +++ b/ports/liblemon/portfile.cmake @@ -2,12 +2,12 @@ include(vcpkg_common_functions) vcpkg_check_linkage(ONLY_STATIC_LIBRARY) -set(VERSION 1.3.1) +set(VERSION ed2c21cbd6ef) vcpkg_download_distfile(ARCHIVE - URLS "http://lemon.cs.elte.hu/pub/sources/lemon-${VERSION}.zip" + URLS "http://lemon.cs.elte.hu/hg/lemon/archive/${VERSION}.zip" FILENAME "lemon-${VERSION}.zip" - SHA512 86d15914b8c3cd206a20c37dbe3b8ca4b553060567a07603db7b6f8dd7dcf9cb043cca31660ff1b7fb77e359b59fac5ca0aab57fd415fda5ecca0f42eade6567 + SHA512 029640e4f791a18068cb2e2b4e794d09822d9d56fb957eb3e2cceae3a30065c0041a31c465637cfcadf7b2473564070b34adc88513439cdf9046831854e2aa70 ) vcpkg_extract_source_archive_ex( @@ -17,7 +17,6 @@ vcpkg_extract_source_archive_ex( PATCHES "cmake.patch" "fixup-targets.patch" - "preflow_git.patch" ) vcpkg_configure_cmake( diff --git a/ports/liblemon/preflow_git.patch b/ports/liblemon/preflow_git.patch deleted file mode 100644 index 7fa60bd37e0333..00000000000000 --- a/ports/liblemon/preflow_git.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/lemon/preflow.h b/lemon/preflow.h -index 28ccd67..d210e87 100644 ---- a/lemon/preflow.h -+++ b/lemon/preflow.h -@@ -476,7 +476,7 @@ namespace lemon { - /// Initializes the internal data structures and sets the initial - /// flow to the given \c flowMap. The \c flowMap should contain a - /// flow or at least a preflow, i.e. at each node excluding the -- /// source node the incoming flow should greater or equal to the -+ /// source node the incoming flow should be greater or equal to the - /// outgoing flow. - /// \return \c false if the given \c flowMap is not a preflow. - template -@@ -495,7 +495,7 @@ namespace lemon { - for (OutArcIt e(_graph, n); e != INVALID; ++e) { - excess -= (*_flow)[e]; - } -- if (excess < 0 && n != _source) return false; -+ if (_tolerance.negative(excess) && n != _source) return false; - (*_excess)[n] = excess; - } - -@@ -639,7 +639,7 @@ namespace lemon { - - (*_excess)[n] = excess; - -- if (excess != 0) { -+ if (_tolerance.nonZero(excess)) { - if (new_level + 1 < _level->maxLevel()) { - _level->liftHighestActive(new_level + 1); - } else { -@@ -720,7 +720,7 @@ namespace lemon { - - (*_excess)[n] = excess; - -- if (excess != 0) { -+ if (_tolerance.nonZero(excess)) { - if (new_level + 1 < _level->maxLevel()) { - _level->liftActiveOn(level, new_level + 1); - } else { -@@ -791,7 +791,7 @@ namespace lemon { - for (NodeIt n(_graph); n != INVALID; ++n) { - if (!reached[n]) { - _level->dirtyTopButOne(n); -- } else if ((*_excess)[n] > 0 && _target != n) { -+ } else if (_tolerance.positive((*_excess)[n]) && _target != n) { - _level->activate(n); - } - } -@@ -852,7 +852,7 @@ namespace lemon { - - (*_excess)[n] = excess; - -- if (excess != 0) { -+ if (_tolerance.nonZero(excess)) { - if (new_level + 1 < _level->maxLevel()) { - _level->liftHighestActive(new_level + 1); - } else { From 02d5f07bdd03761bbf1993955d1441b2de9bd0ca Mon Sep 17 00:00:00 2001 From: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Date: Thu, 13 Jun 2019 09:50:12 -0700 Subject: [PATCH 3/3] [liblemon] update version --- ports/liblemon/CONTROL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/liblemon/CONTROL b/ports/liblemon/CONTROL index c4f533d71dd80c..1ec6050e0d746b 100644 --- a/ports/liblemon/CONTROL +++ b/ports/liblemon/CONTROL @@ -1,3 +1,3 @@ Source: liblemon -Version: 1.3.1-6 +Version: 2019-06-13 Description: Library for Efficient Modeling and Optimization in Networks