From 663a4d62f99deed5e1b21689fcba2e4fbc0c9254 Mon Sep 17 00:00:00 2001 From: linok9757 Date: Sat, 9 Mar 2019 11:49:56 +0300 Subject: [PATCH] yoDownet: new recipe (#3681) --- .../additional-files/yodownet.rdef.in | 23 ++++++ .../patches/yodownet-2014.03.09.patchset | 37 ++++++++++ net-misc/yodownet/yodownet-2014.03.09.recipe | 73 +++++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 net-misc/yodownet/additional-files/yodownet.rdef.in create mode 100644 net-misc/yodownet/patches/yodownet-2014.03.09.patchset create mode 100644 net-misc/yodownet/yodownet-2014.03.09.recipe diff --git a/net-misc/yodownet/additional-files/yodownet.rdef.in b/net-misc/yodownet/additional-files/yodownet.rdef.in new file mode 100644 index 000000000..9b945251f --- /dev/null +++ b/net-misc/yodownet/additional-files/yodownet.rdef.in @@ -0,0 +1,23 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + variety = B_APPV_FINAL, + internal = 0, + short_info = "yoDownet", + long_info = "The previous generation graphical download manager" +}; + +resource app_signature "application/x-vnd.yodownet"; + +resource vector_icon { + $"6E636966040300AAFF030000FF0501040163030A0C322C38283F34442A4C2844" + $"38404C444C3A54314C394C3B390A10322C322939253F2E422850254738434948" + $"49444C404C44384C28442A3F3438280A0531543F48504F55573657040A020201" + $"00124042DD0000000000004038E3C47BB5C0AAAF01158402040A000100024042" + $"DD0000000000004038E3C47BB5C0AAAF0A010101024042DD0000000000004038" + $"E3C47BB5C0AAAF0A030102024042DD0000000000004038E3440A053F8E2E" +}; diff --git a/net-misc/yodownet/patches/yodownet-2014.03.09.patchset b/net-misc/yodownet/patches/yodownet-2014.03.09.patchset new file mode 100644 index 000000000..0744770ab --- /dev/null +++ b/net-misc/yodownet/patches/yodownet-2014.03.09.patchset @@ -0,0 +1,37 @@ +From e2372a492c179f219fcf364ee938801bcc695567 Mon Sep 17 00:00:00 2001 +From: linok9757 +Date: Wed, 6 Mar 2019 17:03:11 +0000 +Subject: Ugly fix for crash on exit #3 + + +diff --git a/main.cpp b/main.cpp +index b2f3858..b1719c5 100644 +--- a/main.cpp ++++ b/main.cpp +@@ -36,6 +36,11 @@ TEST_MAIN + #include "util/paths.h" + #include "ui/mainwindow.h" + ++#include ++#include ++#include ++ ++ + int main(int argc, char *argv[]) + { + QApplication a(argc, argv); +@@ -74,7 +79,10 @@ int main(int argc, char *argv[]) + MainWindow w; + w.show(); + +- return a.exec(); ++ a.exec(); ++ kill(::getpid(), SIGKILL); ++ ++ return 0; + } + + #endif +-- +2.19.1 + diff --git a/net-misc/yodownet/yodownet-2014.03.09.recipe b/net-misc/yodownet/yodownet-2014.03.09.recipe new file mode 100644 index 000000000..d5d014f98 --- /dev/null +++ b/net-misc/yodownet/yodownet-2014.03.09.recipe @@ -0,0 +1,73 @@ +SUMMARY="The previous generation graphical download manager" +DESCRIPTION="yoDownet is an open-source && free graphical download manager +project that tries to be simple and minimal. + +Basic features: +- Increases download speeds (It just does!); +- Concurrent file downoading; +- Safe Pause/Resume On Files; +- Multilingual." +HOMEPAGE="https://sourceforge.net/projects/yodownet/" +COPYRIGHT="2012-2014 Alir3z4" +LICENSE="GNU GPL v3" +REVISION="1" +SOURCE_URI="https://github.com/Alir3z4/yoDownet/archive/$portVersion.tar.gz" +SOURCE_DIR="yoDownet-$portVersion" +CHECKSUM_SHA256="ebe872bdb0a076968bf2d5078966513e035e05c80c140cc1e2cdf980bbf87b2f" +PATCHES="yodownet-$portVersion.patchset" +ADDITIONAL_FILES=" + yodownet.rdef.in" + +ARCHITECTURES="!x86_gcc2 ?x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + yodownet$secondaryArchSuffix=$portVersion + app:yoDownet=$portVersion + " + +REQUIRES=" + haiku$secondaryArchSuffix + lib:libGL$secondaryArchSuffix + lib:libQt5Core$secondaryArchSuffix + lib:libQt5Gui$secondaryArchSuffix + lib:libQt5Network$secondaryArchSuffix + lib:libQt5Widgets$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " + +BUILD_PREREQUIRES=" + cmd:make + cmd:qmake$secondaryArchSuffix >= 5 + cmd:sed + " + +BUILD() +{ + qmake -config release + make +} + +INSTALL() +{ + make install + mkdir -p $appsDir + cp yoDownet $appsDir/yoDownet + + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" + local MINOR="`echo "$portVersion" | cut -d. -f3`" + sed \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + $portDir/additional-files/yodownet.rdef.in > yodownet.rdef + + addResourcesToBinaries yodownet.rdef \ + $appsDir/yoDownet + + addAppDeskbarSymlink $appsDir/yoDownet +}