Skip to content

Commit d091744

Browse files
author
Dennis Camera
committed
isrcsubmit: new port
1 parent 58e733b commit d091744

File tree

3 files changed

+88
-0
lines changed

3 files changed

+88
-0
lines changed

audio/isrcsubmit/Portfile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2+
3+
PortSystem 1.0
4+
PortGroup python 1.0
5+
6+
name isrcsubmit
7+
version 2.1.0
8+
revision 0
9+
10+
categories-prepend audio devel
11+
license GPL-3+
12+
platforms {darwin any}
13+
supported_archs noarch
14+
15+
description Utility to extract ISRCs from audio CDs and submit them to MusicBrainz
16+
long_description isrcsubmit is a Python script to extract ISRCs from audio CDs \
17+
and submit them to MusicBrainz.
18+
19+
homepage http://jonnyjd.github.io/musicbrainz-isrcsubmit/
20+
master_sites http://isrcsubmit.jonnyjd.net/downloads/
21+
22+
maintainers nomaintainer
23+
24+
checksums rmd160 5b7b7e3a8bfd4ff481a5da28fcbb7a8bcd6b8402 \
25+
sha256 fe1078e332b09d259b87fb15959a143916bd31b09a37a54917a35cfb0fe6b3d6 \
26+
size 50430
27+
28+
patchfiles-append setup-no-packages.patch \
29+
get_real_mac_device-bytes.patch
30+
31+
python.versions 39 310 311
32+
python.pep517 no
33+
34+
depends_build-append \
35+
port:py${python.version}-setuptools
36+
37+
depends_lib-append port:py${python.version}-discid \
38+
port:py${python.version}-musicbrainzngs \
39+
port:py${python.version}-keyring
40+
41+
post-destroot {
42+
# fix shebang
43+
system -W ${destroot} \
44+
"sed -i '' -e '1s;^#!.*;#!${python.bin};' .${python.prefix}/bin/isrcsubmit.py"
45+
46+
# remove .py suffix from installed executable
47+
move ${destroot}${prefix}/bin/isrcsubmit.py ${destroot}${prefix}/bin/isrcsubmit
48+
49+
set dest_doc ${destroot}${prefix}/share/doc/${subport}
50+
xinstall -d ${dest_doc}
51+
xinstall -m 0644 -W ${worksrcpath} \
52+
AUTHORS COPYING README.rst \
53+
${dest_doc}
54+
}
55+
56+
test.run yes
57+
58+
livecheck.url https://jonnyjd.github.io/musicbrainz-isrcsubmit/changes
59+
livecheck.type regex
60+
livecheck.regex "Changes in (\[0-9.\]+)"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- isrcsubmit.py.orig 2024-11-18 12:17:20.000000000 +0100
2+
+++ isrcsubmit.py 2024-11-18 12:17:59.000000000 +0100
3+
@@ -439,13 +439,13 @@
4+
"""
5+
proc = Popen(["drutil", "status", "-drive", option_device], stdout=PIPE)
6+
try:
7+
- given = proc.communicate()[0].splitlines()[3].split("Name:")[1].strip()
8+
+ given = proc.communicate()[0].splitlines()[3].split(b"Name:")[1].strip()
9+
except IndexError:
10+
print_error("could not find real device",
11+
"maybe there is no disc in the drive?")
12+
sys.exit(-1)
13+
# libdiscid needs the "raw" version
14+
- return given.replace("/disk", "/rdisk")
15+
+ return given.replace(b"/disk", b"/rdisk").decode()
16+
17+
def cp65001(name):
18+
"""This might be buggy, but better than just a LookupError
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- setup.py.orig
2+
+++ setup.py
3+
@@ -102,6 +102,7 @@
4+
url="https://github.com/JonnyJD/musicbrainz-isrcsubmit",
5+
requires=["discid(>=1.0.0)", "musicbrainzngs(>=0.4)"],
6+
scripts=["isrcsubmit.py"],
7+
+ packages=[],
8+
license="GPLv3+",
9+
classifiers=[
10+
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)