View | Details | Raw Unified | Return to bug 245996
Collapse All | Expand All

(-)polish/Makefile (+1 lines)
Lines 13-18 Link Here
13
    SUBDIR += libreoffice
13
    SUBDIR += libreoffice
14
    SUBDIR += libtlen
14
    SUBDIR += libtlen
15
    SUBDIR += mythes
15
    SUBDIR += mythes
16
    SUBDIR += napi
16
    SUBDIR += qnapi
17
    SUBDIR += qnapi
17
    SUBDIR += tleenx2
18
    SUBDIR += tleenx2
18
    SUBDIR += trf
19
    SUBDIR += trf
(-)polish/napi/Makefile (+53 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	napi
4
PORTVERSION=	2.0.1
5
CATEGORIES=	polish multimedia
6
7
MAINTAINER=	dominik.lisiak@bemsoft.pl
8
COMMENT=	Command line subtitles downloader for napiprojekt.pl
9
10
LICENSE=	GPLv3
11
12
RUN_DEPENDS=	bash:shells/bash base64:converters/base64 wget:ftp/wget 7z:archivers/p7zip mediainfo:multimedia/mediainfo
13
14
NO_ARCH=	yes
15
USES=		cmake shebangfix
16
17
USE_GITLAB=	yes
18
GL_ACCOUNT=	hesperos
19
GL_PROJECT=	${PORTNAME}
20
GL_COMMIT=	ac404649571e470bf9494f788bd8a74843956851
21
22
STRIP=
23
SHEBANG_GLOB=	*.sh *.sh.in
24
25
OPTIONS_DEFINE=	SUBRIP UTF8 RMORIG COVER NFO
26
27
SUBRIP_DESC=	Convert subtitles to SubRip (.srt) by default (-f subrip)
28
UTF8_DESC=	Convert subtitles to UTF-8 by default (-C UTF-8)
29
RMORIG_DESC=	Always remove intermediate files (-d)
30
COVER_DESC=	Always try to download cover (-c)
31
NFO_DESC=	Always try to download .nfo file (-n)
32
33
NAPI_CONF=	libs/libnapi_sysconf.sh
34
35
post-patch-SUBRIP-on:
36
	@${REINPLACE_CMD} -e 's|\(napiprojekt\.subtitles\.format\)=default|\1=subrip|' ${WRKSRC}/${NAPI_CONF}
37
38
post-patch-UTF8-on:
39
	@${REINPLACE_CMD} -e 's|\(napiprojekt\.subtitles\.encoding\)=default|\1=UTF-8|' ${WRKSRC}/${NAPI_CONF}
40
41
post-patch-RMORIG-on:
42
	@${REINPLACE_CMD} -e 's|\(napiprojekt\.subtitles\.orig\.delete\)=0|\1=1|' ${WRKSRC}/${NAPI_CONF}
43
44
post-patch-COVER-on:
45
	@${REINPLACE_CMD} -e 's|\(napiprojekt\.cover\.download\)=0|\1=1|' ${WRKSRC}/${NAPI_CONF}
46
47
post-patch-NFO-on:
48
	@${REINPLACE_CMD} -e 's|\(napiprojekt\.nfo\.download\)=0|\1=1|' ${WRKSRC}/${NAPI_CONF}
49
50
post-install:
51
	@${RM} -r ${STAGEDIR}${LOCALBASE}/lib/napi/*.in
52
53
.include <bsd.port.mk>
(-)polish/napi/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1587702417
2
SHA256 (hesperos-napi-ac404649571e470bf9494f788bd8a74843956851_GL0.tar.gz) = 06458c870437b248dfa27430b354433a8487bca61fca7f68bed7e1d5f9f61ad7
3
SIZE (hesperos-napi-ac404649571e470bf9494f788bd8a74843956851_GL0.tar.gz) = 106608
(-)polish/napi/files/patch-libs_libnapi__fs.sh (+29 lines)
Line 0 Link Here
1
--- libs/libnapi_fs.sh.orig	2020-04-24 07:22:41 UTC
2
+++ libs/libnapi_fs.sh
3
@@ -54,7 +54,7 @@ _fs_configureStat_GV() {
4
     # verify stat tool
5
     ___g_fsWrappers[$___g_fsStat]="stat -c%s "
6
 
7
-    if wrappers_isSystemDarwin; then
8
+    if wrappers_isSystemDarwin || wrappers_isSystemFreeBSD; then
9
         # stat may be installed through macports, check if
10
         # there's a need to reconfigure it to BSD flavour
11
         ${___g_fsWrappers[$___g_fsStat]} "$0" >/dev/null 2>&1 ||
12
@@ -72,6 +72,8 @@ _fs_configureBase64_GV() {
13
     # verify base64
14
     wrappers_isSystemDarwin &&
15
         ___g_fsWrappers[$___g_fsBase64]="base64 -D"
16
+    wrappers_isSystemFreeBSD &&
17
+        ___g_fsWrappers[$___g_fsBase64]="base64 -d"
18
 }
19
 
20
 #
21
@@ -83,6 +85,8 @@ _fs_configureMd5_GV() {
22
     # verify md5 tool
23
     ___g_fsWrappers[$___g_fsMd5]="md5sum"
24
     wrappers_isSystemDarwin &&
25
+        ___g_fsWrappers[$___g_fsMd5]="md5"
26
+    wrappers_isSystemFreeBSD &&
27
         ___g_fsWrappers[$___g_fsMd5]="md5"
28
 }
29
 
(-)polish/napi/files/patch-libs_libnapi__subs.sh (+16 lines)
Line 0 Link Here
1
--- libs/libnapi_subs.sh.orig	2020-04-26 01:52:36 UTC
2
+++ libs/libnapi_subs.sh
3
@@ -189,11 +189,11 @@ subs_convertFormat() {
4
     subotage_processFile \
5
         "${videoFileDir}/${sourceSubsFileName}" \
6
         "none" \
7
-        "0" \
8
+        "${fps}" \
9
         "" \
10
         "${videoFileDir}/${destSubsFileName}" \
11
         "${format}" \
12
-        "${fps}" \
13
+        "0" \
14
         ""
15
     convStatus=$?
16
 
(-)polish/napi/files/patch-libs_libnapi__wrappers.sh (+24 lines)
Line 0 Link Here
1
--- libs/libnapi_wrappers.sh.orig	2020-04-24 07:38:48 UTC
2
+++ libs/libnapi_wrappers.sh
3
@@ -129,13 +129,20 @@ wrappers_isSystemDarwin() {
4
 }
5
 
6
 #
7
+# @brief returns true if system is FreeBSD
8
+#
9
+wrappers_isSystemFreeBSD() {
10
+    [ "$(wrappers_getSystem_SO)" = "freebsd" ]
11
+}
12
+
13
+#
14
 # @brief determines number of available cpu's in the system
15
 #
16
 # @param system type (linux|darwin)
17
 #
18
 wrappers_getCores_SO() {
19
     local os="${1:-linux}"
20
-    if wrappers_isSystemDarwin; then
21
+    if wrappers_isSystemDarwin || wrappers_isSystemFreeBSD; then
22
         sysctl hw.ncpu | cut -d ' ' -f 2
23
 	else
24
         grep -i processor /proc/cpuinfo | wc -l
(-)polish/napi/pkg-descr (+10 lines)
Line 0 Link Here
1
"napi.sh" is a napiprojekt.pl client written in Bash. The purpose of the project
2
was to create simple tool for systems with very limited resources (NAS QNAP
3
drives, Synology, OpenWRT routers, Popcorn streamers, etc). It was inspired by
4
"pynapi.py" script.
5
6
"napi.sh" is distributed together with automatic subtitle format converter
7
"subotage.sh" created specially for "napi.sh". "subotage.sh" is written in Bash
8
and uses awk for text processing.
9
10
WWW: https://gitlab.com/hesperos/napi
(-)polish/napi/pkg-plist (+23 lines)
Line 0 Link Here
1
bin/napi.sh
2
bin/subotage.sh
3
lib/napi/actions/libnapi_download.sh
4
lib/napi/actions/libnapi_scan.sh
5
lib/napi/actions/libnapi_search.sh
6
lib/napi/actions/libnapi_subtitles.sh
7
lib/napi/libnapi_argv.sh
8
lib/napi/libnapi_assoc.sh
9
lib/napi/libnapi_constants.sh
10
lib/napi/libnapi_fs.sh
11
lib/napi/libnapi_hooks.sh
12
lib/napi/libnapi_http.sh
13
lib/napi/libnapi_language.sh
14
lib/napi/libnapi_logging.sh
15
lib/napi/libnapi_napiprojekt.sh
16
lib/napi/libnapi_retvals.sh
17
lib/napi/libnapi_subotage.sh
18
lib/napi/libnapi_subs.sh
19
lib/napi/libnapi_sysconf.sh
20
lib/napi/libnapi_tools.sh
21
lib/napi/libnapi_version.sh
22
lib/napi/libnapi_wrappers.sh
23
lib/napi/libnapi_xml.sh

Return to bug 245996