diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2016-11-21 03:17:50 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2016-11-21 03:17:50 +0300 |
commit | 288ce8868d276aad8ba76b89e20781e518f9056e (patch) | |
tree | 7a9c859d20a750ff9ac65da40ac77712755f1831 /net-p2p | |
parent | 6f3333d455e4386cbc2f677dacba012cc12ae8ed (diff) |
retroshare: fixed bind address patch, removed O0 from cflags
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/retroshare/files/cflags.patch (renamed from net-p2p/retroshare/files/O2.patch) | 80 | ||||
-rw-r--r-- | net-p2p/retroshare/files/hidden_service.patch | 40 | ||||
-rw-r--r-- | net-p2p/retroshare/retroshare-scm.ebuild | 2 |
3 files changed, 55 insertions, 67 deletions
diff --git a/net-p2p/retroshare/files/O2.patch b/net-p2p/retroshare/files/cflags.patch index aaa1c1d..5bc8ce4 100644 --- a/net-p2p/retroshare/files/O2.patch +++ b/net-p2p/retroshare/files/cflags.patch @@ -1,5 +1,5 @@ diff --git a/libbitdht/src/libbitdht.pro b/libbitdht/src/libbitdht.pro -index 738deea..6b23e1f 100644 +index 738deea..cb7d53d 100644 --- a/libbitdht/src/libbitdht.pro +++ b/libbitdht/src/libbitdht.pro @@ -77,9 +77,9 @@ win32 { @@ -7,15 +7,15 @@ index 738deea..6b23e1f 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro -index db7066c..6ad02b8 100644 +index db7066c..f613a21 100644 --- a/libretroshare/src/libretroshare.pro +++ b/libretroshare/src/libretroshare.pro @@ -269,9 +269,9 @@ win32 { @@ -23,15 +23,15 @@ index db7066c..6ad02b8 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/libretroshare/src/tests/gxs/data_service/nxs_tests.pro b/libretroshare/src/tests/gxs/data_service/nxs_tests.pro -index 8fa292c..a80e096 100644 +index 8fa292c..116463a 100644 --- a/libretroshare/src/tests/gxs/data_service/nxs_tests.pro +++ b/libretroshare/src/tests/gxs/data_service/nxs_tests.pro @@ -101,9 +101,9 @@ win32 { @@ -39,15 +39,15 @@ index 8fa292c..a80e096 100644 # Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2
- QMAKE_CXXFLAGS_RELEASE += -O0
-+ QMAKE_CXXFLAGS_RELEASE += -O2
++ QMAKE_CXXFLAGS_RELEASE +=
QMAKE_CFLAGS_RELEASE -= -O2
- QMAKE_CFLAGS_RELEASE += -O0
-+ QMAKE_CFLAGS_RELEASE += -O2
++ QMAKE_CFLAGS_RELEASE +=
# Switch on optimization for debug version
#QMAKE_CXXFLAGS_DEBUG += -O2
diff --git a/libretroshare/src/tests/gxs/gen_exchange/genexchange_test.pro b/libretroshare/src/tests/gxs/gen_exchange/genexchange_test.pro -index d95c4bc..b83dea9 100644 +index d95c4bc..aad0609 100644 --- a/libretroshare/src/tests/gxs/gen_exchange/genexchange_test.pro +++ b/libretroshare/src/tests/gxs/gen_exchange/genexchange_test.pro @@ -86,9 +86,9 @@ win32 { @@ -55,15 +55,15 @@ index d95c4bc..b83dea9 100644 # Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2
- QMAKE_CXXFLAGS_RELEASE += -O0
-+ QMAKE_CXXFLAGS_RELEASE += -O2
++ QMAKE_CXXFLAGS_RELEASE +=
QMAKE_CFLAGS_RELEASE -= -O2
- QMAKE_CFLAGS_RELEASE += -O0
-+ QMAKE_CFLAGS_RELEASE += -O2
++ QMAKE_CFLAGS_RELEASE +=
# Switch on optimization for debug version
#QMAKE_CXXFLAGS_DEBUG += -O2
diff --git a/libretroshare/src/tests/gxs/nxs_test/nxs_tests.pro b/libretroshare/src/tests/gxs/nxs_test/nxs_tests.pro -index 8fa292c..a80e096 100644 +index 8fa292c..116463a 100644 --- a/libretroshare/src/tests/gxs/nxs_test/nxs_tests.pro +++ b/libretroshare/src/tests/gxs/nxs_test/nxs_tests.pro @@ -101,9 +101,9 @@ win32 { @@ -71,15 +71,15 @@ index 8fa292c..a80e096 100644 # Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2
- QMAKE_CXXFLAGS_RELEASE += -O0
-+ QMAKE_CXXFLAGS_RELEASE += -O2
++ QMAKE_CXXFLAGS_RELEASE +=
QMAKE_CFLAGS_RELEASE -= -O2
- QMAKE_CFLAGS_RELEASE += -O0
-+ QMAKE_CFLAGS_RELEASE += -O2
++ QMAKE_CFLAGS_RELEASE +=
# Switch on optimization for debug version
#QMAKE_CXXFLAGS_DEBUG += -O2
diff --git a/openpgpsdk/src/openpgpsdk.pro b/openpgpsdk/src/openpgpsdk.pro -index d158cdc..c861101 100644 +index d158cdc..09c4c84 100644 --- a/openpgpsdk/src/openpgpsdk.pro +++ b/openpgpsdk/src/openpgpsdk.pro @@ -23,9 +23,9 @@ win32 { @@ -87,15 +87,15 @@ index d158cdc..c861101 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/plugins/Common/retroshare_plugin.pri b/plugins/Common/retroshare_plugin.pri -index cbfec1b..f3ea2d7 100644 +index cbfec1b..6e4a712 100644 --- a/plugins/Common/retroshare_plugin.pri +++ b/plugins/Common/retroshare_plugin.pri @@ -50,9 +50,9 @@ win32 { @@ -103,15 +103,15 @@ index cbfec1b..f3ea2d7 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro -index ea2bc97..074462a 100644 +index ea2bc97..885ae96 100644 --- a/retroshare-gui/src/retroshare-gui.pro +++ b/retroshare-gui/src/retroshare-gui.pro @@ -55,9 +55,9 @@ MOC_DIR = temp/moc @@ -119,10 +119,10 @@ index ea2bc97..074462a 100644 QMAKE_CFLAGS += -g QMAKE_CXXFLAGS -= -O2 - QMAKE_CXXFLAGS += -O0 -+ QMAKE_CXXFLAGS += -O2 ++ QMAKE_CXXFLAGS += QMAKE_CFLAGS -= -O2 - QMAKE_CFLAGS += -O0 -+ QMAKE_CFLAGS += -O2 ++ QMAKE_CFLAGS += } DEPENDPATH *= retroshare-gui @@ -131,15 +131,15 @@ index ea2bc97..074462a 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/retroshare-nogui/src/retroshare-nogui.pro b/retroshare-nogui/src/retroshare-nogui.pro -index 358cb65..4884370 100644 +index 358cb65..5d9ddbe 100644 --- a/retroshare-nogui/src/retroshare-nogui.pro +++ b/retroshare-nogui/src/retroshare-nogui.pro @@ -10,11 +10,11 @@ CONFIG += link_prl @@ -147,17 +147,17 @@ index 358cb65..4884370 100644 debug { QMAKE_CFLAGS -= -O2 - QMAKE_CFLAGS += -O0 -+ QMAKE_CFLAGS += -O2 ++ QMAKE_CFLAGS += QMAKE_CFLAGS += -g QMAKE_CXXFLAGS -= -O2 - QMAKE_CXXFLAGS += -O0 -+ QMAKE_CXXFLAGS += -O2 ++ QMAKE_CXXFLAGS += QMAKE_CXXFLAGS += -g } diff --git a/supportlibs/pegmarkdown/pegmarkdown.pro b/supportlibs/pegmarkdown/pegmarkdown.pro -index cc21cca..90fc636 100644 +index cc21cca..727236c 100644 --- a/supportlibs/pegmarkdown/pegmarkdown.pro +++ b/supportlibs/pegmarkdown/pegmarkdown.pro @@ -40,7 +40,7 @@ win32 { @@ -165,12 +165,12 @@ index cc21cca..90fc636 100644 # Switch off optimization for release version QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += CONFIG += dummy_glib diff --git a/tests/librssimulator/librssimulator.pro b/tests/librssimulator/librssimulator.pro -index 94c942f..b802a90 100644 +index 94c942f..51e9c3f 100644 --- a/tests/librssimulator/librssimulator.pro +++ b/tests/librssimulator/librssimulator.pro @@ -160,9 +160,9 @@ win32 { @@ -178,15 +178,15 @@ index 94c942f..b802a90 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/tests/unittests/libretroshare/gxs/gen_exchange/genexchange_test.pro b/tests/unittests/libretroshare/gxs/gen_exchange/genexchange_test.pro -index d95c4bc..b83dea9 100644 +index d95c4bc..aad0609 100644 --- a/tests/unittests/libretroshare/gxs/gen_exchange/genexchange_test.pro +++ b/tests/unittests/libretroshare/gxs/gen_exchange/genexchange_test.pro @@ -86,9 +86,9 @@ win32 { @@ -194,15 +194,15 @@ index d95c4bc..b83dea9 100644 # Switch off optimization for release version
QMAKE_CXXFLAGS_RELEASE -= -O2
- QMAKE_CXXFLAGS_RELEASE += -O0
-+ QMAKE_CXXFLAGS_RELEASE += -O2
++ QMAKE_CXXFLAGS_RELEASE +=
QMAKE_CFLAGS_RELEASE -= -O2
- QMAKE_CFLAGS_RELEASE += -O0
-+ QMAKE_CFLAGS_RELEASE += -O2
++ QMAKE_CFLAGS_RELEASE +=
# Switch on optimization for debug version
#QMAKE_CXXFLAGS_DEBUG += -O2
diff --git a/tests/unittests/unittests.pro b/tests/unittests/unittests.pro -index 790ab1c..72fcd58 100644 +index 790ab1c..04a74ab 100644 --- a/tests/unittests/unittests.pro +++ b/tests/unittests/unittests.pro @@ -121,9 +121,9 @@ win32 { @@ -210,10 +210,10 @@ index 790ab1c..72fcd58 100644 # Switch off optimization for release version QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -O0 -+ QMAKE_CXXFLAGS_RELEASE += -O2 ++ QMAKE_CXXFLAGS_RELEASE += QMAKE_CFLAGS_RELEASE -= -O2 - QMAKE_CFLAGS_RELEASE += -O0 -+ QMAKE_CFLAGS_RELEASE += -O2 ++ QMAKE_CFLAGS_RELEASE += # Switch on optimization for debug version #QMAKE_CXXFLAGS_DEBUG += -O2 diff --git a/net-p2p/retroshare/files/hidden_service.patch b/net-p2p/retroshare/files/hidden_service.patch index 6043423..03768b7 100644 --- a/net-p2p/retroshare/files/hidden_service.patch +++ b/net-p2p/retroshare/files/hidden_service.patch @@ -21,7 +21,7 @@ index bc5a6f1..63ee8e2 100644 if(sockaddr_storage_isLoopbackNet(mLocalAddr)) diff --git a/libretroshare/src/pqi/p3peermgr.cc b/libretroshare/src/pqi/p3peermgr.cc -index 6503096..7427814 100644 +index f85edb5..680a84f 100644 --- a/libretroshare/src/pqi/p3peermgr.cc +++ b/libretroshare/src/pqi/p3peermgr.cc @@ -73,7 +73,7 @@ static struct RsLog::logInfo p3peermgrzoneInfo = {RsLog::Default, "p3peermgr"}; @@ -43,41 +43,29 @@ index 6503096..7427814 100644 sockaddr_storage_ipv4_setport(loopback, port); diff --git a/libretroshare/src/rsserver/p3peers.cc b/libretroshare/src/rsserver/p3peers.cc -index bd4e11c..41b07d2 100644 +index d4b5fe3..22ef1b7 100644 --- a/libretroshare/src/rsserver/p3peers.cc +++ b/libretroshare/src/rsserver/p3peers.cc -@@ -311,12 +311,12 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d) - d.hiddenNodePort = ps.hiddenPort; - d.hiddenType = ps.hiddenType; +@@ -313,7 +313,7 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d) -- if(sockaddr_storage_isnull(ps.localaddr)) // that happens if the address is not initialised. -+/* if(sockaddr_storage_isnull(ps.localaddr)) // that happens if the address is not initialised. + if(sockaddr_storage_isnull(ps.localaddr)) // that happens if the address is not initialised. { - d.localAddr = "INVALID_IP"; +- d.localAddr = "INVALID_IP"; ++ d.localAddr = "0.0.0.0"; d.localPort = 0 ; } -- else -+ else */ - { - d.localAddr = sockaddr_storage_iptostring(ps.localaddr); - d.localPort = sockaddr_storage_port(ps.localaddr); -@@ -332,12 +332,12 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d) - d.hiddenNodePort = 0; - d.hiddenType = RS_HIDDEN_TYPE_NONE; - -- if (sockaddr_storage_isnull(ps.localaddr)) -+/* if (sockaddr_storage_isnull(ps.localaddr)) + else +@@ -334,7 +334,7 @@ bool p3Peers::getPeerDetails(const RsPeerId& id, RsPeerDetails &d) + + if (sockaddr_storage_isnull(ps.localaddr)) { - d.localAddr = "INVALID_IP"; +- d.localAddr = "INVALID_IP"; ++ d.localAddr = "0.0.0.0"; d.localPort = 0; } -- else -+ else */ - { - d.localAddr = sockaddr_storage_iptostring(ps.localaddr); - d.localPort = sockaddr_storage_port(ps.localaddr); + else diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc -index c34ae7b..e50d535 100644 +index 0f8a707..b6bc725 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -112,7 +112,7 @@ class RsInitConfig diff --git a/net-p2p/retroshare/retroshare-scm.ebuild b/net-p2p/retroshare/retroshare-scm.ebuild index 624e273..7c6003a 100644 --- a/net-p2p/retroshare/retroshare-scm.ebuild +++ b/net-p2p/retroshare/retroshare-scm.ebuild @@ -102,7 +102,7 @@ src_prepare() { retroshare-nogui/src/retroshare-nogui.pro || die 'sed on retroshare-gui/src/retroshare-gui.pro failed' epatch "${FILESDIR}/hidden_service.patch" - epatch "${FILESDIR}/O2.patch" + epatch "${FILESDIR}/cflags.patch" epatch_user } |