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