From nobody Tue Mar 01 11:15:37 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AE50919FB422; Tue, 1 Mar 2022 11:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K7F6K4T2Xz4YrR; Tue, 1 Mar 2022 11:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646133337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjKk14is5YZM+XC6YixDV5C0YBwG9CGa/X1YzP66GrM=; b=fTivKZZ48QMnlePlLQDwHCPj9KSn0LhrEn4kBE68mynrMeaDkMpuJqI8Jz+V6HIdDUJuEU NddJn2h93hWQCVhuDlOqWGJKqnFtUxc+fq44K/J/YKLlPoeShOm3CDchPmoIY+RTf+MZOh Zg5o5odmtZL4X1o+41yQvamJfK7GnHtSusLAjgkikReazq0nIr7HOIJoC6YPy0yrzADbT5 bXJOxJ/AIea5iNaXAEiYE416NVYLD+OrsOdooxGcrRqsxA8JP6+Z5t9FLh3kFzJigBMtFq LMZWLFWCJdty4BH1+hdloGIr72HKjrCfF2ubcW4JjneeKnICwD8ULps81MTxAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A8036658; Tue, 1 Mar 2022 11:15:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 221BFbll071134; Tue, 1 Mar 2022 11:15:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 221BFbs5071133; Tue, 1 Mar 2022 11:15:37 GMT (envelope-from git) Date: Tue, 1 Mar 2022 11:15:37 GMT Message-Id: <202203011115.221BFbs5071133@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: d76542d7123a - main - www/persepolis: new port had been added (+) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d76542d7123a7dbcbf9ca31b143639571b69ce1c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646133337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CjKk14is5YZM+XC6YixDV5C0YBwG9CGa/X1YzP66GrM=; b=hSh2z7p5J1itT1ef13F0m5IiAEZ9rsfTrj4EbRxHzNYoM6mX6k7OhkpJbSnfvDklPmmAHq YvOkP/3M5+y2Y5jqU1j/exzIXEtNpbzKv8q5YmzXDWox6Q7Z2xqJkQqYbAdytiJ/n5Qqc/ VRpLQl3W6nesRVZv75hQ+wcP4dgQTiW1jdUMatkwnSBCnRpzqkspkEnPFRxc03GempszjO BECegAl11nsykQkxT4X+5QAvcUVtbdY/Fs/I45gac/KkNaxrZuPZG1U4B6FGLcHNnQBUTR qrVg58i5wrJWyEBR+hwAUgi5ZdR1d19CKY7eKEsf9jNUrDFqtx7fKVYT7hclfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646133337; a=rsa-sha256; cv=none; b=Fz9rtVd03hAvawqGXQV0WKTJuuqSc0S33KFOp2Z0iEeumKoZAF4tQBCRKKr9am4AAv3ezF g0Hw5MAXAnkCZYqrmPy1YorNJrs0NXqi4Xf4/WOEJSaKWoUFhf5habHumyNFSpJKxPb0Vs MCphhkpWWCzjZsyKWjXyrARFCClK4XLz6ZtGSIQBbconAMj1nELOM/IkiotNBCKtvlRdtt xvp4YLlftqFilmOQJPibJxVupXwRVWMOVBGpQrQuv6lTHeqGmh997eeEaecoLIK2FpI/Zo LrRoylzyr+yPCjd+9okAS1Fpe+DsOVjrcAmzWqH8MbsgM8yQQbifHkfrMHZ9iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=d76542d7123a7dbcbf9ca31b143639571b69ce1c commit d76542d7123a7dbcbf9ca31b143639571b69ce1c Author: Alexey Dokuchaev AuthorDate: 2022-03-01 11:13:46 +0000 Commit: Alexey Dokuchaev CommitDate: 2022-03-01 11:13:46 +0000 www/persepolis: new port had been added (+) Persepolis is a download manager and GUI for Aria2 which is written in Python using Qt and other components. Some functionality had been reimplemented to avoid pulling needless or heavy dependencies. WWW: https://persepolisdm.github.io/ --- www/Makefile | 1 + www/persepolis/Makefile | 28 +++++++++++++++ www/persepolis/distinfo | 3 ++ .../files/patch-persepolis_scripts_bubble.py | 42 ++++++++++++++++++++++ .../files/patch-persepolis_scripts_persepolis.py | 24 +++++++++++++ .../files/patch-persepolis_scripts_play.py | 35 ++++++++++++++++++ www/persepolis/files/patch-setup.py | 40 +++++++++++++++++++++ www/persepolis/pkg-descr | 9 +++++ 8 files changed, 182 insertions(+) diff --git a/www/Makefile b/www/Makefile index d0aed03de59d..c88826e2c74f 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1376,6 +1376,7 @@ SUBDIR += pecl-yaf SUBDIR += pecl-yar SUBDIR += perlbal + SUBDIR += persepolis SUBDIR += pglogd SUBDIR += phalcon SUBDIR += phalcon4 diff --git a/www/persepolis/Makefile b/www/persepolis/Makefile new file mode 100644 index 000000000000..b0ece16d2c01 --- /dev/null +++ b/www/persepolis/Makefile @@ -0,0 +1,28 @@ +# Created by: Alexey Dokuchaev + +PORTNAME= persepolis +PORTVERSION= 3.2.0 +CATEGORIES= www net ftp + +MAINTAINER= danfe@FreeBSD.org +COMMENT= Graphical download manager (GUI for Aria2) + +LICENSE= GPLv3+ + +BUILD_DEPENDS= aria2c:www/aria2 ffmpeg:multimedia/ffmpeg \ + ${PYTHON_PKGNAMEPREFIX}psutil>0:sysutils/py-psutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}requests>0:www/py-requests@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR} \ + ${LOCALBASE}/share/sounds/freedesktop/stereo/complete.oga:audio/freedesktop-sound-theme +RUN_DEPENDS:= ${BUILD_DEPENDS} \ + ${PYTHON_PKGNAMEPREFIX}PyOgg>0:audio/py-pyogg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} + +USES= pyqt:5 python +USE_PYTHON= autoplist distutils noflavors +USE_PYQT= pyqt5 +USE_GITHUB= yes +GH_ACCOUNT= ${PORTNAME}dm + +.include diff --git a/www/persepolis/distinfo b/www/persepolis/distinfo new file mode 100644 index 000000000000..98490ad66451 --- /dev/null +++ b/www/persepolis/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1568666738 +SHA256 (persepolisdm-persepolis-3.2.0_GH0.tar.gz) = d27cf2a4e02b0fbe79b1903ca0ab32a6007493d51a8201443a8febb566750acd +SIZE (persepolisdm-persepolis-3.2.0_GH0.tar.gz) = 665662 diff --git a/www/persepolis/files/patch-persepolis_scripts_bubble.py b/www/persepolis/files/patch-persepolis_scripts_bubble.py new file mode 100644 index 000000000000..3f31210fcfb2 --- /dev/null +++ b/www/persepolis/files/patch-persepolis_scripts_bubble.py @@ -0,0 +1,42 @@ +--- persepolis/scripts/bubble.py.orig 2019-09-16 20:45:38 UTC ++++ persepolis/scripts/bubble.py +@@ -29,6 +29,8 @@ if os_type == 'Darwin': + elif os_type == 'Windows': + from persepolis.scripts.windows_notification import Windows_Notification + ++else: import dbus ++ + # notifySend use notify-send program in user's system for sending notifications + # and use playNotification function in play.py file for playing sound + # notifications +@@ -68,7 +70,7 @@ def notifySend(message1, message2, time, sound, parent + + enable_notification = persepolis_setting.value('settings/notification') + +- time = str(time) ++ time = int(time) + message1 = str(message1) + message2 = str(message2) + +@@ -77,14 +79,13 @@ def notifySend(message1, message2, time, sound, parent + parent.system_tray_icon.showMessage(message1, message2, 0, 10000) + else: + if os_type == 'Linux' or os_type == 'FreeBSD' or os_type == 'OpenBSD': +- subprocess.Popen(['notify-send', '--icon', 'persepolis', +- '--app-name', 'Persepolis Download Manager', +- '--expire-time', time, +- message1, message2], +- stderr=subprocess.PIPE, +- stdout=subprocess.PIPE, +- stdin=subprocess.PIPE, +- shell=False) ++ service = 'org.freedesktop.Notifications' ++ notify_iface = dbus.Interface( ++ dbus.SessionBus().get_object(service, ++ '/%s' % service.replace('.', '/')), service) ++ notify_iface.Notify('Persepolis Download Manager', 0, ++ '/usr/local/share/pixmaps/persepolis.svg', message1, message2, ++ [], {'urgency': 0}, time) + + elif os_type == 'Darwin': + notifyMac("Persepolis Download Manager", message1, message2) diff --git a/www/persepolis/files/patch-persepolis_scripts_persepolis.py b/www/persepolis/files/patch-persepolis_scripts_persepolis.py new file mode 100644 index 000000000000..a699afca58ea --- /dev/null +++ b/www/persepolis/files/patch-persepolis_scripts_persepolis.py @@ -0,0 +1,24 @@ +--- persepolis/scripts/persepolis.py.orig 2019-09-16 20:45:38 UTC ++++ persepolis/scripts/persepolis.py +@@ -42,9 +42,6 @@ if os_type == 'Linux' or os_type == 'FreeBSD' or os_ty + + # initialization + +-# find home address +-home_address = os.path.expanduser("~") +- + # persepolis config_folder + config_folder = determineConfigFolder() + +@@ -58,10 +55,8 @@ global lock_file_validation + + if os_type != 'Windows': + import fcntl +- user_name_split = home_address.split('/') +- user_name = user_name_split[2] + # persepolis lock file +- lock_file = '/tmp/persepolis_exec_' + user_name + '.lock' ++ lock_file = '/tmp/persepolis_exec_' + os.getlogin() + '.lock' + + # create lock file + fp = open(lock_file, 'w') diff --git a/www/persepolis/files/patch-persepolis_scripts_play.py b/www/persepolis/files/patch-persepolis_scripts_play.py new file mode 100644 index 000000000000..ddb2f02a6424 --- /dev/null +++ b/www/persepolis/files/patch-persepolis_scripts_play.py @@ -0,0 +1,35 @@ +--- persepolis/scripts/play.py.orig 2019-09-16 20:45:38 UTC ++++ persepolis/scripts/play.py +@@ -16,6 +16,8 @@ from persepolis.scripts import logger + from PyQt5.QtCore import QSettings + import subprocess + import platform ++from pyogg import VorbisFile ++from ossaudiodev import open as ossOpen, AFMT_S16_NE + + os_type = platform.system() + +@@ -36,18 +38,11 @@ def playNotification(file): + if enable_notification == 'yes': + if os_type == 'Linux' or os_type == 'FreeBSD' or os_type == 'OpenBSD': + +- pipe = subprocess.Popen(['paplay', '--volume=' + str(volume), +- str(file)], +- stderr=subprocess.PIPE, +- stdout=subprocess.PIPE, +- stdin=subprocess.PIPE, +- shell=False) +- +- answer = pipe.wait() +- +- if answer != 0: +- logger.sendToLog( +- "paplay not installed!Install it for playing sound notification", "WARNING") ++ sound = VorbisFile(file) ++ dsp = ossOpen('/dev/dsp', 'w') ++ dsp.setparameters(AFMT_S16_NE, sound.channels, sound.frequency) ++ dsp.write(sound.buffer) ++ dsp.close() + + elif os_type == 'Darwin': + diff --git a/www/persepolis/files/patch-setup.py b/www/persepolis/files/patch-setup.py new file mode 100644 index 000000000000..bd82082de251 --- /dev/null +++ b/www/persepolis/files/patch-setup.py @@ -0,0 +1,40 @@ +--- setup.py.orig 2019-09-16 20:45:38 UTC ++++ setup.py +@@ -67,14 +67,6 @@ except: + print("Warning: python3-psutil is not installed!") + not_installed = not_installed + 'psutil, ' + +-# youtube_dl +-try: +- import youtube_dl +- print('youtube-dl is found') +-except: +- print('Warning: youtube-dl is not installed!') +- not_installed = not_installed + 'youtube-dl, ' +- + # aria2 + answer = os.system('aria2c --version 1>/dev/null') + if answer != 0: +@@ -82,22 +74,6 @@ if answer != 0: + not_installed = not_installed + 'aria2c, ' + else: + print('aria2 is found!') +- +-# libnotify-bin +-answer = os.system('notify-send --version 1>/dev/null') +-if answer != 0: +- print("Error libnotify-bin is not installed!") +- not_installed = not_installed + 'libnotify-bin, ' +-else: +- print('libnotify-bin is found!') +- +-# paplay +-answer = os.system('paplay --version 1>/dev/null') +-if answer != 0: +- print("Warning: paplay not installed!You need pulseaudio for sound notifications!") +- not_installed = not_installed + 'paplay, ' +-else: +- print('paplay is found!') + + # sound-theme-freedesktop + if os_type == 'Linux': diff --git a/www/persepolis/pkg-descr b/www/persepolis/pkg-descr new file mode 100644 index 000000000000..ce64c683460e --- /dev/null +++ b/www/persepolis/pkg-descr @@ -0,0 +1,9 @@ +Persepolis is a download manager and GUI for Aria2 which is written +in Python using Qt and other components. It features: + + - Multi-segment downloading + - Scheduling downloads + - Download queuing + - And many more! + +WWW: https://persepolisdm.github.io/