srcpkgs/[A-Z]*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.-][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/SoapyUHDDevice.cpp 2020-11-28 06:35:26.325250052 +0700
|
|
|
|
+++ b/SoapyUHDDevice.cpp 2020-11-28 06:35:57.557546069 +0700
|
2020-11-27 23:48:55 +01:00
|
|
|
@@ -20,6 +20,7 @@
|
|
|
|
#include <uhd/property_tree.hpp>
|
|
|
|
#include <cctype>
|
|
|
|
#include <iostream>
|
|
|
|
+#include <boost/foreach.hpp>
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* Stream wrapper
|
srcpkgs/[A-Z]*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
for p in ${template%/template}/patches/*; do
sed -i '
\,^[+-][+-][+-] /dev/null,b
/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
s,^[*][*][*] ,&a/,
/^--- /{
s,\(^--- \)\(./\)*,\1a/,
s,[.-][Oo][Rr][Ii][Gg]\([ /]\),\1,
s/[.-][Oo][Rr][Ii][Gg]$//
s/[.]patched[.]\([^.]\)/.\1/
h
}
/^+++ -/{
g
s/^--- a/+++ b/
b
}
s,\(^+++ \)\(./\)*,\1b/,
' "$p"
done
sed -i '/^patch_args=/d' $template
done
```
2021-06-19 05:03:21 +02:00
|
|
|
--- a/UHDSoapyDevice.cpp 2020-11-28 06:37:27.567376170 +0700
|
|
|
|
+++ b/UHDSoapyDevice.cpp 2020-11-28 06:43:28.476925258 +0700
|
2020-11-27 23:48:55 +01:00
|
|
|
@@ -179,8 +179,8 @@
|
|
|
|
std::map<int, std::map<size_t, double>> _sampleRates;
|
|
|
|
|
|
|
|
//stash streamers to implement old-style issue stream cmd and async message
|
|
|
|
- std::map<size_t, boost::weak_ptr<uhd::rx_streamer> > _rx_streamers;
|
|
|
|
- std::map<size_t, boost::weak_ptr<uhd::tx_streamer> > _tx_streamers;
|
|
|
|
+ std::map<size_t, std::weak_ptr<uhd::rx_streamer> > _rx_streamers;
|
|
|
|
+ std::map<size_t, std::weak_ptr<uhd::tx_streamer> > _tx_streamers;
|
|
|
|
};
|
|
|
|
|
|
|
|
/***********************************************************************
|