diff options
Diffstat (limited to 'app-text/coolreader')
-rw-r--r-- | app-text/coolreader/Manifest | 5 | ||||
-rw-r--r-- | app-text/coolreader/coolreader-3.2.59-r1.ebuild (renamed from app-text/coolreader/coolreader-3.2.59.ebuild) | 10 | ||||
-rw-r--r-- | app-text/coolreader/files/coolreader-wxwidgets.patch | 109 | ||||
-rw-r--r-- | app-text/coolreader/metadata.xml | 2 |
4 files changed, 120 insertions, 6 deletions
diff --git a/app-text/coolreader/Manifest b/app-text/coolreader/Manifest index eb4a26e878ee..0a390640c038 100644 --- a/app-text/coolreader/Manifest +++ b/app-text/coolreader/Manifest @@ -1,7 +1,8 @@ +AUX coolreader-wxwidgets.patch 3660 BLAKE2B f7f736e0b9aedffe80f8327e0e0090439bdb529dd4d3e69e9b60c77e815e53d3d9ced76442c174f180362a9a198133e12bd486c4fea139ee07066f2d424b20d9 SHA512 f33f90b9a7254dc20c42218e6fd6781ebbdef988b1c758748197b71a9fdb62e02cc3ce8bb465b9c462d5dc61e5cdcebc523110e1172d3208853bb0291d8017f7 DIST coolreader-3.2.57.tar.gz 13281238 BLAKE2B 8a6739f38d72b13af7b79160dee8cfc08bd9e54d3698fd44c7f6ad8bd575b1f389c2c349c1e2ef71a55fb0068e9d64b5baa4a0a8b945cdb873e833178d81cbbe SHA512 d5bf46f7dbf19177a54742d5c300002c8b7a504052bd003d2e1a7380ac3460dbe648d7f923d26e6390e9296ce6b090c947204725ab2a30c78f26893868a61161 DIST coolreader-3.2.58.tar.gz 13454079 BLAKE2B e3b85ffbb3e4023a8c0567879a4a67d21141c1025b58f7d2c5017cab773e989e797229529440167a8c83db810f599566a77aaaab06b34081472f0e4b20293ec9 SHA512 d1d3e60bf5b73c20617937850912d7c452863bd5c91f0154be320ad256f774f368039896ad5e8acfc3cafa7361e8c11ca526accf0a14dabb79f059255989bac6 DIST coolreader-3.2.59.tar.gz 13596218 BLAKE2B a59d11aff93166de77add5d230539068172a81968414b9c38b6ca25f08bd7830b81c0b800055a4eefbd6bb1be94298bf74d240f981c928bd4514073d943bb33d SHA512 72fc05814ca4f6da5310f7b47fd7939bc1567e5dd7e7e75bc29e2b1436dc4901498622a770e89323581c3f0b3b9ec305050ca5917eceba4df4a07cff3e1748d6 EBUILD coolreader-3.2.57.ebuild 1838 BLAKE2B 4102bd201652798763151becd33544ead1797676999f2365fb73edd4164bc732dc1402ecfa7e682c51d4d51247485cbb0f929d00862bfdc59a8db8c47a65afbe SHA512 be37d6dcd3a81c8fddd4ed6cc23d210b1d718dff8a1a572c9046789eb50d961766755e1c064603bc59a9827c20bc876bcfe4cf34603058cc85c251e0f02769e7 EBUILD coolreader-3.2.58.ebuild 1840 BLAKE2B 81e9fa93ea854a110e2e69fa34a91a520f86ac55e0f8da883c0ec6e390a50a5932c2fc9f0fea5d474e73a9eb4cfd6a92e03afc9307bef78ec9171ebb3eefd545 SHA512 cf24327f8e9cc384b26c4352b13cabfedf38dcb870a6f2915a39a1e639514c8cdcba8150f5e1ce3daa885208fab2491292fd2e393523e9e5bdd795841df0534b -EBUILD coolreader-3.2.59.ebuild 1840 BLAKE2B 81e9fa93ea854a110e2e69fa34a91a520f86ac55e0f8da883c0ec6e390a50a5932c2fc9f0fea5d474e73a9eb4cfd6a92e03afc9307bef78ec9171ebb3eefd545 SHA512 cf24327f8e9cc384b26c4352b13cabfedf38dcb870a6f2915a39a1e639514c8cdcba8150f5e1ce3daa885208fab2491292fd2e393523e9e5bdd795841df0534b -MISC metadata.xml 624 BLAKE2B fa86114594d823c9b73b590ebfa0ffe74955550f1d66b5f1197672484d4095be484f5f8f754acef06e34f9d69d658609653109bf8499235439bb1f3ad95b7be5 SHA512 33e57dbe75c3e2efaf1d793dad06b534fac861b3ffd25e4d441af91b8d6a8cae96b8d5c19bbf0845aa78ff404eee167998e09f948009b4ce1902a2f38625f9a8 +EBUILD coolreader-3.2.59-r1.ebuild 1930 BLAKE2B a79387e9aebb5cd755f3aa66ece91f9c80d81ad2683d445c0f688baac861018fc5519da0d8141549411a1dbf352c673849a69acaa7a8cfe822fe2f338d0b1c32 SHA512 07e3264cf3fef156b5ada758e0ec9027901caf229f7553a57d599a73edf820232cd18b4a5c02a5464681f23f7867bdd18c802e68fc53a2a85f130d1915814f16 +MISC metadata.xml 625 BLAKE2B 19c586a05d2469157d23709430c5929215eaab28ab25e124526c685fd0dd87c2ddbafa06968927cfbc74f29317c290296b000eb42443bb87f20e6d50615298d6 SHA512 755074e5507e33fb110368c6ce25055a449534c7458127500ac233955abcf167394eb265b5ad5b680c2cf06c57c479909870935e63ceabd91b4db583ecb95d8d diff --git a/app-text/coolreader/coolreader-3.2.59.ebuild b/app-text/coolreader/coolreader-3.2.59-r1.ebuild index 32e43b6cdee3..e8422f1bb4a3 100644 --- a/app-text/coolreader/coolreader-3.2.59.ebuild +++ b/app-text/coolreader/coolreader-3.2.59-r1.ebuild @@ -19,6 +19,7 @@ KEYWORDS="~amd64 ~x86" IUSE="wxwidgets" CDEPEND="sys-libs/zlib + app-arch/zstd media-libs/libpng:0 virtual/jpeg:0 media-libs/freetype @@ -26,6 +27,7 @@ CDEPEND="sys-libs/zlib media-libs/fontconfig media-libs/harfbuzz dev-libs/libunibreak + dev-libs/libutf8proc wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER} ) !wxwidgets? ( dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtwidgets:5 )" BDEPEND="${CDEPEND} @@ -33,9 +35,11 @@ BDEPEND="${CDEPEND} RDEPEND="${CDEPEND} wxwidgets? ( || ( media-fonts/liberation-fonts media-fonts/corefonts ) )" +PATCHES=( "${FILESDIR}"/${PN}-wxwidgets.patch ) + src_prepare() { cmake_src_prepare - xdg_src_prepare + xdg_environment_reset # locales plocale_find_changes "${S}"/cr3qt/src/i18n 'cr3_' '.ts' @@ -49,9 +53,9 @@ src_configure() { CMAKE_BUILD_TYPE="Release" if use wxwidgets; then setup-wxwidgets - local mycmakeargs=(-D GUI=WX) + local mycmakeargs=(-DGUI=WX) else - local mycmakeargs=(-D GUI=QT5) + local mycmakeargs=(-DGUI=QT5) fi cmake_src_configure } diff --git a/app-text/coolreader/files/coolreader-wxwidgets.patch b/app-text/coolreader/files/coolreader-wxwidgets.patch new file mode 100644 index 000000000000..aac02864b0e4 --- /dev/null +++ b/app-text/coolreader/files/coolreader-wxwidgets.patch @@ -0,0 +1,109 @@ +From 2040a15d2a23ee4d16af8f2294e1593fa267e8d9 Mon Sep 17 00:00:00 2001 +From: Aleksey Chernov <valexlin@gmail.com> +Date: Thu, 9 Sep 2021 10:41:38 +0400 +Subject: [PATCH] Fixed wxWidgets build failure: compilation error due to API + change. Introduced in c47cab44799475a48230312b8e97cd7a71edddb0. + +--- + cr3wx/src/view.cpp | 82 ++++++++++++++++++++++++++++++++++------------ + 1 file changed, 61 insertions(+), 21 deletions(-) + +diff --git a/cr3wx/src/view.cpp b/cr3wx/src/view.cpp +index df2a264f7f..2ee30f9421 100644 +--- a/cr3wx/src/view.cpp ++++ b/cr3wx/src/view.cpp +@@ -307,33 +307,73 @@ void cr3view::OnTimer(wxTimerEvent& event) + } + } + +-void cr3view::Paint() ++static bool getBatteryState(int& state, int& chargingConn, int& level) + { +- //printf("cr3view::Paint() \n"); +- int battery_state = -1; + #ifdef _WIN32 ++ // update battery state + SYSTEM_POWER_STATUS bstatus; + BOOL pow = GetSystemPowerStatus(&bstatus); +- if (bstatus.BatteryFlag & 128) +- pow = FALSE; +- if (bstatus.ACLineStatus!=0 || bstatus.BatteryLifePercent==255) +- pow = FALSE; +- if ( pow ) +- battery_state = bstatus.BatteryLifePercent; ++ if (pow) { ++ state = CR_BATTERY_STATE_DISCHARGING; ++ if (bstatus.BatteryFlag & 128) ++ state = CR_BATTERY_STATE_NO_BATTERY; // no system battery ++ else if (bstatus.BatteryFlag & 8) ++ state = CR_BATTERY_STATE_CHARGING; // charging ++ chargingConn = CR_BATTERY_CHARGER_NO; ++ if (bstatus.ACLineStatus==1) ++ chargingConn = CR_BATTERY_CHARGER_AC; // AC power charging connected ++ if (bstatus.BatteryLifePercent>=0 && bstatus.BatteryLifePercent<=100) ++ level = bstatus.BatteryLifePercent; ++ return true; ++ } ++ return false; + #else +- if ( ::wxGetPowerType() == wxPOWER_BATTERY ) { +- int n = ::wxGetBatteryState(); +- if ( n == wxBATTERY_NORMAL_STATE ) +- battery_state = 100; +- else if ( n == wxBATTERY_LOW_STATE ) +- battery_state = 50; +- else if ( n == wxBATTERY_CRITICAL_STATE ) +- battery_state = 0; +- else if ( n == wxBATTERY_SHUTDOWN_STATE ) +- battery_state = 0; +- }; ++ wxPowerType wxpwrtype = wxGetPowerType(); ++ switch (wxpwrtype) { ++ case wxPOWER_SOCKET: ++ state = CR_BATTERY_STATE_CHARGING; ++ chargingConn = CR_BATTERY_CHARGER_AC; ++ break; ++ case wxPOWER_BATTERY: ++ state = CR_BATTERY_STATE_DISCHARGING; ++ chargingConn = CR_BATTERY_CHARGER_NO; ++ break; ++ default: ++ state = CR_BATTERY_STATE_NO_BATTERY; ++ chargingConn = CR_BATTERY_CHARGER_NO; ++ break; ++ } ++ wxBatteryState wxbatstate = wxGetBatteryState(); ++ switch (wxbatstate) { ++ case wxBATTERY_NORMAL_STATE: ++ level = 100; ++ break; ++ case wxBATTERY_LOW_STATE: ++ level = 50; ++ break; ++ case wxBATTERY_CRITICAL_STATE: ++ level = 5; ++ break; ++ case wxBATTERY_SHUTDOWN_STATE: ++ level = 0; ++ break; ++ default: ++ level = 0; ++ break; ++ } ++ return true; + #endif +- getDocView()->setBatteryState( battery_state ); ++} ++ ++void cr3view::Paint() ++{ ++ //printf("cr3view::Paint() \n"); ++ int battery_state; ++ int charging_conn; ++ int charge_level; ++ if (getBatteryState(battery_state, charging_conn, charge_level)) { ++ getDocView()->setBatteryState( battery_state, charging_conn, charge_level ); ++ } + //_docview->Draw(); + UpdateScrollBar(); + Refresh( FALSE ); diff --git a/app-text/coolreader/metadata.xml b/app-text/coolreader/metadata.xml index 0bc14087cc2d..d51eccb7c80f 100644 --- a/app-text/coolreader/metadata.xml +++ b/app-text/coolreader/metadata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <maintainer type="person"> <email>grozin@gentoo.org</email> |