aboutsummaryrefslogtreecommitdiff
path: root/audio/py-speechrecognition
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2017-10-15 11:04:59 +0000
committerKevin Lo <kevlo@FreeBSD.org>2017-10-15 11:04:59 +0000
commit8d0abfe3986633fa6a52b5e35d95e1ea60c2dc04 (patch)
treebd23efbc3db2d6526d64a3c3234b5bceecb74ab6 /audio/py-speechrecognition
parentcebb6366fa7023888f4cabb3efb3bb0e757171f6 (diff)
downloadports-8d0abfe3986633fa6a52b5e35d95e1ea60c2dc04.tar.gz
ports-8d0abfe3986633fa6a52b5e35d95e1ea60c2dc04.zip
Notes
Diffstat (limited to 'audio/py-speechrecognition')
-rw-r--r--audio/py-speechrecognition/Makefile10
-rw-r--r--audio/py-speechrecognition/distinfo6
-rw-r--r--audio/py-speechrecognition/files/patch-setup.py37
3 files changed, 48 insertions, 5 deletions
diff --git a/audio/py-speechrecognition/Makefile b/audio/py-speechrecognition/Makefile
index ba3fdf4d3691..67bc2fd1d028 100644
--- a/audio/py-speechrecognition/Makefile
+++ b/audio/py-speechrecognition/Makefile
@@ -1,9 +1,8 @@
# $FreeBSD$
PORTNAME= SpeechRecognition
-PORTVERSION= 3.5.0
+PORTVERSION= 3.7.1
CATEGORIES= audio python
-MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= kevlo@FreeBSD.org
@@ -12,6 +11,10 @@ COMMENT= Python Library for performing speech recognition
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+USE_GITHUB= yes
+GH_ACCOUNT= Uberi
+GH_PROJECT= speech_recognition
+
RUN_DEPENDS= flac:audio/flac \
${PYTHON_PKGNAMEPREFIX}pyaudio>0:audio/py-pyaudio
@@ -19,6 +22,9 @@ NO_ARCH= yes
USES= python
USE_PYTHON= distutils autoplist
+post-extract:
+ @cd ${WRKSRC}/speech_recognition && ${RM} flac-*
+
.include <bsd.port.pre.mk>
.if ${PYTHON_REL} < 3000
diff --git a/audio/py-speechrecognition/distinfo b/audio/py-speechrecognition/distinfo
index 4d2eba06a378..45f000c817d6 100644
--- a/audio/py-speechrecognition/distinfo
+++ b/audio/py-speechrecognition/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1480340475
-SHA256 (SpeechRecognition-3.5.0.tar.gz) = deadec60cc95fd1aeb973a19379c14780200e069ff87f5d835bc0557667f1a9f
-SIZE (SpeechRecognition-3.5.0.tar.gz) = 31523266
+TIMESTAMP = 1507992258
+SHA256 (Uberi-speech_recognition-3.7.1_GH0.tar.gz) = 2caafe07a1557a77f9e0bb38e1a05f6cd48a52486b91d51c720fcead9202e33f
+SIZE (Uberi-speech_recognition-3.7.1_GH0.tar.gz) = 125418691
diff --git a/audio/py-speechrecognition/files/patch-setup.py b/audio/py-speechrecognition/files/patch-setup.py
new file mode 100644
index 000000000000..3e6a634ebe19
--- /dev/null
+++ b/audio/py-speechrecognition/files/patch-setup.py
@@ -0,0 +1,37 @@
+--- setup.py.orig 2017-10-14 15:52:28 UTC
++++ setup.py
+@@ -14,34 +14,11 @@ if sys.version_info < (2, 6):
+ print("THIS MODULE REQUIRES PYTHON 2.6, 2.7, OR 3.3+. YOU ARE CURRENTLY USING PYTHON {0}".format(sys.version))
+ sys.exit(1)
+
+-
+-FILES_TO_MARK_EXECUTABLE = ["flac-linux-x86", "flac-linux-x86_64", "flac-mac", "flac-win32.exe"]
+-
+-
+-class InstallWithExtraSteps(install):
+- def run(self):
+- install.run(self) # do the original install steps
+-
+- # mark the FLAC executables as executable by all users (this fixes occasional issues when file permissions get messed up)
+- for output_path in self.get_outputs():
+- if os.path.basename(output_path) in FILES_TO_MARK_EXECUTABLE:
+- log.info("setting executable permissions on {}".format(output_path))
+- stat_info = os.stat(output_path)
+- os.chmod(
+- output_path,
+- stat_info.st_mode |
+- stat.S_IRUSR | stat.S_IXUSR | # owner can read/execute
+- stat.S_IRGRP | stat.S_IXGRP | # group can read/execute
+- stat.S_IROTH | stat.S_IXOTH # everyone else can read/execute
+- )
+-
+-
+ setup(
+ name="SpeechRecognition",
+ version=speech_recognition.__version__,
+ packages=["speech_recognition"],
+ include_package_data=True,
+- cmdclass={"install": InstallWithExtraSteps},
+
+ # PyPI metadata
+ author=speech_recognition.__author__,