mirror of
https://codeberg.org/gwh/slackbuilds.git
synced 2024-11-16 19:51:19 +01:00
temporary fix for boost 1.58 plus various improvments
This commit is contained in:
parent
5de838d33c
commit
fc4824a6f4
2 changed files with 123 additions and 15 deletions
107
ap/ledger/boost-1.58.diff
Normal file
107
ap/ledger/boost-1.58.diff
Normal file
|
@ -0,0 +1,107 @@
|
|||
diff --git a/src/account.h b/src/account.h
|
||||
index 76e839e..0b55ce9 100644
|
||||
--- a/src/account.h
|
||||
+++ b/src/account.h
|
||||
@@ -261,11 +261,7 @@ public:
|
||||
mutable optional<xdata_t> xdata_;
|
||||
|
||||
bool has_xdata() const {
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- return xdata_ != NULL;
|
||||
-#else
|
||||
- return xdata_;
|
||||
-#endif
|
||||
+ return !!(xdata_);
|
||||
}
|
||||
void clear_xdata();
|
||||
xdata_t& xdata() {
|
||||
diff --git a/src/filters.cc b/src/filters.cc
|
||||
index 2f97a0e..b6530c0 100644
|
||||
--- a/src/filters.cc
|
||||
+++ b/src/filters.cc
|
||||
@@ -707,7 +707,7 @@ namespace {
|
||||
insert_prices_in_map(price_map_t& _all_prices)
|
||||
: all_prices(_all_prices) {}
|
||||
|
||||
- void operator()(datetime_t& date, const amount_t& price) {
|
||||
+ void operator()(const datetime_t& date, const amount_t& price) {
|
||||
all_prices.insert(price_map_t::value_type(date, price));
|
||||
}
|
||||
};
|
||||
diff --git a/src/item.h b/src/item.h
|
||||
index 458cb37..aa55e41 100644
|
||||
--- a/src/item.h
|
||||
+++ b/src/item.h
|
||||
@@ -191,11 +191,7 @@ public:
|
||||
static bool use_aux_date;
|
||||
|
||||
virtual bool has_date() const {
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- return _date != NULL;
|
||||
-#else
|
||||
- return _date;
|
||||
-#endif
|
||||
+ return !!(_date);
|
||||
}
|
||||
|
||||
virtual date_t date() const {
|
||||
diff --git a/src/iterators.cc b/src/iterators.cc
|
||||
index 21bec5d..0225e21 100644
|
||||
--- a/src/iterators.cc
|
||||
+++ b/src/iterators.cc
|
||||
@@ -96,7 +96,7 @@ namespace {
|
||||
TRACE_DTOR(create_price_xact);
|
||||
}
|
||||
|
||||
- void operator()(datetime_t& date, const amount_t& price) {
|
||||
+ void operator()(const datetime_t& date, const amount_t& price) {
|
||||
xact_t * xact;
|
||||
string symbol = price.commodity().symbol();
|
||||
|
||||
diff --git a/src/parser.h b/src/parser.h
|
||||
index e46fc71..25c4a7e 100644
|
||||
--- a/src/parser.h
|
||||
+++ b/src/parser.h
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
|
||||
ptr_op_t parse(std::istream& in,
|
||||
const parse_flags_t& flags = PARSE_DEFAULT,
|
||||
- const optional<string>& original_string = NULL);
|
||||
+ const optional<string>& original_string = boost::none);
|
||||
};
|
||||
|
||||
} // namespace ledger
|
||||
diff --git a/src/post.h b/src/post.h
|
||||
index 1e5fc56..7796293 100644
|
||||
--- a/src/post.h
|
||||
+++ b/src/post.h
|
||||
@@ -205,11 +205,7 @@ public:
|
||||
mutable optional<xdata_t> xdata_;
|
||||
|
||||
bool has_xdata() const {
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- return xdata_ != NULL;
|
||||
-#else
|
||||
- return xdata_;
|
||||
-#endif
|
||||
+ return !!(xdata_);
|
||||
}
|
||||
void clear_xdata() {
|
||||
xdata_ = none;
|
||||
diff --git a/src/times.h b/src/times.h
|
||||
index c1bfb1c..0cb05ff 100644
|
||||
--- a/src/times.h
|
||||
+++ b/src/times.h
|
||||
@@ -568,11 +568,7 @@ public:
|
||||
void stabilize(const optional<date_t>& date = none);
|
||||
|
||||
bool is_valid() const {
|
||||
-#if BOOST_VERSION >= 105600
|
||||
- return start != NULL;
|
||||
-#else
|
||||
- return start;
|
||||
-#endif
|
||||
+ return !!(start);
|
||||
}
|
||||
|
||||
/** Find the current or next period containing date. Returns false if
|
|
@ -6,7 +6,7 @@
|
|||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
BRANCH=${BRANCH:="ALPHA"}
|
||||
BRANCH=${BRANCH:="RELEASE"}
|
||||
VERSION=${VERSION:=2.6.3}
|
||||
ARCH=${ARCH:-$(uname -m)}
|
||||
BUILD=${BUILD:-2}
|
||||
|
@ -53,18 +53,17 @@ find . \
|
|||
|
||||
case $BRANCH in
|
||||
"RELEASE")
|
||||
git checkout v$VERSION
|
||||
;;
|
||||
git checkout -b stable v$VERSION
|
||||
;;
|
||||
"CURRENT")
|
||||
git checkout maint
|
||||
;;
|
||||
git checkout -b master origin/master
|
||||
;;
|
||||
"BETA")
|
||||
git checkout -b master origin/master
|
||||
;;
|
||||
git checkout -b $VERSION release/$VERSION
|
||||
;;
|
||||
"ALPHA")
|
||||
# git checkout -b next origin/next
|
||||
git checkout next
|
||||
;;
|
||||
git checkout -b next origin/next
|
||||
;;
|
||||
*)
|
||||
esac
|
||||
[ $BRANCH != "RELEASE" ] && VERSION=${BRANCH}_$(date +%Y.%m.%d_%H.%M)
|
||||
|
@ -72,6 +71,8 @@ esac
|
|||
# we might be held behind a firewall
|
||||
#sed -i 's|git:|http:|g' $(grep -l "git:" .* -r)
|
||||
|
||||
patch -p1 -i $CWD/boost-1.58.diff
|
||||
|
||||
./acprep pull
|
||||
|
||||
./acprep --prefix=/usr --python opt config -- -DUSE_PYTHON=ON -DUSE_DOXYGEN=ON -DBUILD_EMACSLISP=ON
|
||||
|
@ -111,16 +112,16 @@ cat <<EOF > $PKG/install/slack-desc
|
|||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
ledger: ledger (a command-line accounting program)
|
||||
ledger:
|
||||
ledger:
|
||||
ledger: Ledger is an accounting program which is invoked from the command-line
|
||||
ledger: using a textual ledger file. See the documentation ( use "info ledger"
|
||||
ledger: or read ledger.pdf from the website) for full documentation on how to
|
||||
ledger: create a ledger file and using Ledger to generate reports.
|
||||
ledger:
|
||||
ledger:
|
||||
ledger: Homepage: http://wiki.github.com/jwiegley/ledger
|
||||
ledger:
|
||||
ledger:
|
||||
ledger:
|
||||
ledger:
|
||||
ledger:
|
||||
ledger:
|
||||
EOF
|
||||
|
||||
cd $TMP/package-$PRGNAM
|
||||
|
|
Loading…
Reference in a new issue