git: 9f4fdeb116e5 - main - www/linux-freetube: Add new port

From: Nicola Vitale <nivit_at_FreeBSD.org>
Date: Mon, 26 Aug 2024 14:15:07 UTC
The branch main has been updated by nivit:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9f4fdeb116e560d8899dfb8a04b9d5c873ae87c9

commit 9f4fdeb116e560d8899dfb8a04b9d5c873ae87c9
Author:     Nicola Vitale <nivit@FreeBSD.org>
AuthorDate: 2024-08-26 14:03:05 +0000
Commit:     Nicola Vitale <nivit@FreeBSD.org>
CommitDate: 2024-08-26 14:03:05 +0000

    www/linux-freetube: Add new port
    
    FreeTube is an open source desktop YouTube player built with privacy in mind.
    Use YouTube without advertisements and prevent Google from tracking you with
    their cookies and JavaScript.
    
    Features:
    
        - Watch videos without ads
        - Use YouTube without Google tracking you using cookies and JavaScript
        - Subscribe to channels without an account
        - Connect to an externally setup proxy such as Tor
        - View and search your local subscriptions, history, and saved videos
        - Organize your subscriptions into "Profiles" to create a more focused feed
        - Export & import subscriptions
        - Youtube Trending
        - Youtube Chapters
        - Most popular videos page based on the set Invidious instance
        - Watch videos using an external player
        - ... and much more
    
    https://freetubeapp.io/
---
 www/Makefile                                       |  1 +
 www/linux-freetube/Makefile                        | 50 +++++++++++++
 www/linux-freetube/distinfo                        |  5 ++
 www/linux-freetube/files/linux-freetube.desktop.in | 10 +++
 www/linux-freetube/files/linux-freetube.in         | 11 +++
 www/linux-freetube/pkg-descr                       | 18 +++++
 www/linux-freetube/pkg-message                     | 13 ++++
 www/linux-freetube/pkg-plist                       | 87 ++++++++++++++++++++++
 8 files changed, 195 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 141803a55fcc..555a3fd23c1f 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -320,6 +320,7 @@
     SUBDIR += links1
     SUBDIR += linux-c7-qtwebkit
     SUBDIR += linux-chrome
+    SUBDIR += linux-freetube
     SUBDIR += linux-rl9-libnghttp2
     SUBDIR += linux-vieb
     SUBDIR += linux-widevine-cdm
diff --git a/www/linux-freetube/Makefile b/www/linux-freetube/Makefile
new file mode 100644
index 000000000000..cb6abf36f6ee
--- /dev/null
+++ b/www/linux-freetube/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	freetube
+DISTVERSIONPREFIX=	v
+DISTVERSION=	0.21.3-beta
+CATEGORIES=	www
+MASTER_SITES=	https://github.com/FreeTubeApp/FreeTube/releases/download/${DISTVERSIONFULL}/ \
+		LOCAL/nivit/${PKGNAMEPREFIX}${PORTNAME}/:icons
+PKGNAMEPREFIX=	linux-
+DISTFILES=	freetube-${PORTVERSION:R}-linux-portable-x64.zip \
+		${PKGNAMEPREFIX}${PORTNAME}-icons-0.1.3.zip:icons
+
+MAINTAINER=	nivit@FreeBSD.org
+COMMENT=	The Private YouTube Client (Linux version)
+WWW=		https://freetubeapp.io/
+
+LICENSE=	AGPLv3 BSD3CLAUSE LGPL21 MIT MPL11
+LICENSE_COMB=	multi
+
+ONLY_FOR_ARCHS=	amd64
+
+RUN_DEPENDS=	pulseaudio:audio/pulseaudio
+
+USES=		linux:rl9 zip
+USE_LINUX=	alsa-plugins-oss alsa-plugins-pulseaudio alsalib at-spi2-atk \
+		atk cups-libs dbuslibs devtools gtk3 libdrm libsigsegv nss opus
+
+DATADIR=	${PREFIX}/share/${PKGBASE}
+
+BUNDLE_LIBS=	yes
+NO_BUILD=	yes
+
+SUB_FILES=	${PKGBASE} ${PKGBASE}.desktop
+SUB_LIST=	LINUXBASE=${LINUXBASE}
+
+NO_WRKSUBDIR=	yes
+
+STRIP_CMD=	${LINUXBASE}/usr/bin/strip
+
+do-install:
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	(cd ${WRKSRC} && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} \
+			"-not ( -regex \./LICENSE.* -or -regex \./icons.* )")
+	(cd ${WRKSRC}/icons && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${LOCALBASE}/share/icons)
+	${INSTALL_DATA} ${WRKDIR}/${PKGBASE}.desktop ${STAGEDIR}${DESKTOPDIR}/
+	${INSTALL_SCRIPT} ${WRKDIR}/${PKGBASE} ${STAGEDIR}${LOCALBASE}/bin/${PKGBASE}
+	(cd ${STAGEDIR}${DATADIR} && \
+		${STRIP_CMD} chrome-sandbox libvulkan.so.1)
+
+.include <bsd.port.mk>
diff --git a/www/linux-freetube/distinfo b/www/linux-freetube/distinfo
new file mode 100644
index 000000000000..629a9249e682
--- /dev/null
+++ b/www/linux-freetube/distinfo
@@ -0,0 +1,5 @@
+TIMESTAMP = 1724254243
+SHA256 (freetube-0.21.3-linux-portable-x64.zip) = 6cfe7d10837e30aab4234c2b21ecc37d5e46791a126de43bd90d2479cabe9987
+SIZE (freetube-0.21.3-linux-portable-x64.zip) = 103243587
+SHA256 (linux-freetube-icons-0.1.3.zip) = d76906cce52ac5cc730113a6d8598009467480d70a11e7ad81cbe9655bbd941e
+SIZE (linux-freetube-icons-0.1.3.zip) = 10580
diff --git a/www/linux-freetube/files/linux-freetube.desktop.in b/www/linux-freetube/files/linux-freetube.desktop.in
new file mode 100644
index 000000000000..567f03ecb563
--- /dev/null
+++ b/www/linux-freetube/files/linux-freetube.desktop.in
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Type=Application
+Version=1.0
+Name=Freetube (Linux)
+Comment=The Private YouTube Client
+Icon=freetube
+Exec=%%PREFIX%%/bin/linux-freetube
+Categories=Network;WebBrowser;
+StartupNotify=true
+
diff --git a/www/linux-freetube/files/linux-freetube.in b/www/linux-freetube/files/linux-freetube.in
new file mode 100755
index 000000000000..9f0edae26e6e
--- /dev/null
+++ b/www/linux-freetube/files/linux-freetube.in
@@ -0,0 +1,11 @@
+#!%%LINUXBASE%%/bin/bash
+
+export ELECTRON_IS_DEV=0
+export LIBGL_DRI3_DISABLE=1
+export NODE_ENV=production
+
+if [ "$DBUS_SESSION_BUS_ADDRESS" = "" ]; then
+    export DBUS_SESSION_BUS_ADDRESS="autolaunch:"
+fi
+
+exec -a "$0" "%%DATADIR%%/freetube" --no-sandbox "$@"
diff --git a/www/linux-freetube/pkg-descr b/www/linux-freetube/pkg-descr
new file mode 100644
index 000000000000..18e45e598bf8
--- /dev/null
+++ b/www/linux-freetube/pkg-descr
@@ -0,0 +1,18 @@
+FreeTube is an open source desktop YouTube player built with privacy in mind.
+Use YouTube without advertisements and prevent Google from tracking you with
+their cookies and JavaScript.
+
+Features:
+
+    - Watch videos without ads
+    - Use YouTube without Google tracking you using cookies and JavaScript
+    - Subscribe to channels without an account
+    - Connect to an externally setup proxy such as Tor
+    - View and search your local subscriptions, history, and saved videos
+    - Organize your subscriptions into "Profiles" to create a more focused feed
+    - Export & import subscriptions
+    - Youtube Trending
+    - Youtube Chapters
+    - Most popular videos page based on the set Invidious instance
+    - Watch videos using an external player
+    - ... and much more
diff --git a/www/linux-freetube/pkg-message b/www/linux-freetube/pkg-message
new file mode 100644
index 000000000000..406545156565
--- /dev/null
+++ b/www/linux-freetube/pkg-message
@@ -0,0 +1,13 @@
+[
+{ type: install
+  message: <<EOM
+
+If the user's directory is located in /usr/home and doesn't exists the link
+/home, then create one with the command:
+
+  ln -s /usr/home /home
+
+FreeTube uses pulseaudio(1), so you have to start the relative server.
+EOM
+}
+]
diff --git a/www/linux-freetube/pkg-plist b/www/linux-freetube/pkg-plist
new file mode 100644
index 000000000000..38531b68f98c
--- /dev/null
+++ b/www/linux-freetube/pkg-plist
@@ -0,0 +1,87 @@
+bin/linux-freetube
+share/applications/linux-freetube.desktop
+share/icons/hicolor/128x128/apps/freetube.png
+share/icons/hicolor/16x16/apps/freetube.png
+share/icons/hicolor/256x256/apps/freetube.png
+share/icons/hicolor/32x32/apps/freetube.png
+share/icons/hicolor/48x48/apps/freetube.png
+share/icons/hicolor/64x64/apps/freetube.png
+share/icons/hicolor/scalable/apps/freetube-black.svg
+share/icons/hicolor/scalable/apps/freetube-white.svg
+share/icons/hicolor/scalable/apps/freetube.svg
+%%DATADIR%%/chrome_100_percent.pak
+%%DATADIR%%/chrome_200_percent.pak
+%%DATADIR%%/icudtl.dat
+%%DATADIR%%/libEGL.so
+%%DATADIR%%/libGLESv2.so
+%%DATADIR%%/libffmpeg.so
+%%DATADIR%%/libvk_swiftshader.so
+%%DATADIR%%/libvulkan.so.1
+%%DATADIR%%/locales/af.pak
+%%DATADIR%%/locales/am.pak
+%%DATADIR%%/locales/ar.pak
+%%DATADIR%%/locales/bg.pak
+%%DATADIR%%/locales/bn.pak
+%%DATADIR%%/locales/ca.pak
+%%DATADIR%%/locales/cs.pak
+%%DATADIR%%/locales/da.pak
+%%DATADIR%%/locales/de.pak
+%%DATADIR%%/locales/el.pak
+%%DATADIR%%/locales/en-GB.pak
+%%DATADIR%%/locales/en-US.pak
+%%DATADIR%%/locales/es-419.pak
+%%DATADIR%%/locales/es.pak
+%%DATADIR%%/locales/et.pak
+%%DATADIR%%/locales/fa.pak
+%%DATADIR%%/locales/fi.pak
+%%DATADIR%%/locales/fil.pak
+%%DATADIR%%/locales/fr.pak
+%%DATADIR%%/locales/gu.pak
+%%DATADIR%%/locales/he.pak
+%%DATADIR%%/locales/hi.pak
+%%DATADIR%%/locales/hr.pak
+%%DATADIR%%/locales/hu.pak
+%%DATADIR%%/locales/id.pak
+%%DATADIR%%/locales/it.pak
+%%DATADIR%%/locales/ja.pak
+%%DATADIR%%/locales/kn.pak
+%%DATADIR%%/locales/ko.pak
+%%DATADIR%%/locales/lt.pak
+%%DATADIR%%/locales/lv.pak
+%%DATADIR%%/locales/ml.pak
+%%DATADIR%%/locales/mr.pak
+%%DATADIR%%/locales/ms.pak
+%%DATADIR%%/locales/nb.pak
+%%DATADIR%%/locales/nl.pak
+%%DATADIR%%/locales/pl.pak
+%%DATADIR%%/locales/pt-BR.pak
+%%DATADIR%%/locales/pt-PT.pak
+%%DATADIR%%/locales/ro.pak
+%%DATADIR%%/locales/ru.pak
+%%DATADIR%%/locales/sk.pak
+%%DATADIR%%/locales/sl.pak
+%%DATADIR%%/locales/sr.pak
+%%DATADIR%%/locales/sv.pak
+%%DATADIR%%/locales/sw.pak
+%%DATADIR%%/locales/ta.pak
+%%DATADIR%%/locales/te.pak
+%%DATADIR%%/locales/th.pak
+%%DATADIR%%/locales/tr.pak
+%%DATADIR%%/locales/uk.pak
+%%DATADIR%%/locales/ur.pak
+%%DATADIR%%/locales/vi.pak
+%%DATADIR%%/locales/zh-CN.pak
+%%DATADIR%%/locales/zh-TW.pak
+%%DATADIR%%/resources.pak
+%%DATADIR%%/resources/app-update.yml
+%%DATADIR%%/resources/app.asar
+%%DATADIR%%/snapshot_blob.bin
+%%DATADIR%%/v8_context_snapshot.bin
+%%DATADIR%%/vk_swiftshader_icd.json
+@mode 4555
+%%DATADIR%%/chrome-sandbox
+@mode
+@mode 555
+%%DATADIR%%/freetube
+%%DATADIR%%/chrome_crashpad_handler
+@mode