1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Ray Rashif <schiv@archlinux.org>
3 # Contributor: Corrado Primier <bardo@aur.archlinux.org>
4 # Contributor: sickhate <sickhate@tux-linux.net>
9 pkgdesc="Music education and ear training software"
11 url="https://www.gnu.org/software/solfege/"
14 depends=('gtk3' 'python-cairo' 'python-gobject')
15 makedepends=('docbook-xsl' 'ghostscript' 'itstool' 'lilypond' 'swig' 'texinfo' 'txt2man')
16 optdepends=('csound: Generate example sounds'
17 'timidity++: MIDI playback'
18 'mpg123: Mp3 playback'
19 'vorbis-tools: Ogg playback'
20 'lilypond: Generate print-outs and score sheets'
21 'texlive-bin: Generate reports')
22 source=("https://git.savannah.gnu.org/cgit/solfege.git/snapshot/${pkgname}-${pkgver}.tar.gz"
23 'hidden_menubar.patch'
25 'fix_lilypond_eps_file_mismatch.patch'
26 'reproducible-build.patch'
27 'do-not-run-xmllint.patch'
29 sha512sums=('f2ef7bdb3d1eb15842d803d4d093a177096b6960b211cd3607101f2c03c29fcd3f5151d3b02be4a04236305d18658ba6fa3b5a771b04be4a65f646e27b31914b'
30 '1f7340b7ba4224900b94af8060c125f631748938488c87b5c26e20feb2f8b24e927fe5fc8bb9591d6ab87d6b16a11462373b6d3324a9a95c97f1d4352b35de1f'
31 '631f5c5d3155927026cd33e75f65561302ec241af2db535e4db351c639812f74c0145940447d5acf58746af20a786c54c8e8aa294aaca8e13b99ad2da6019c53'
32 'c264f4b98c5fea78cc071058c6b623a68d98545e1e3b3b21bd9bfe2ffdcd1989876e83c08888d9278e48debb6412f79c5bf99d0a8e9280fd552639dbaf885d2b'
33 'f853d37106f079c18fe699ba70ecff6671d3ed5fdc3a45bfd8dd9ccef3737dd209c666ad4ce09278b6beb429cf27d8cb62f771ec5c348130a4073adbfb3bf49e'
34 '3eda0a2c845d6f4e82b79542835a9a20658a522c86b162821b0b0a61187505c811710660ee1fa5395709f14607fbd8e95b542263c155284e47950b5178a1854d' SKIP)
37 cd "${pkgname}-${pkgver}"
40 for filename in "${source[@]}"; do
41 if [[ "$filename" =~ \.patch$ ]]; then
42 patch -p1 -N -i "$srcdir/${filename##*/}"
46 # removing entries that break makeinfo
47 sed -e '38,40d' -i topdocs/AUTHORS.texi
48 sed -e '169d' -i topdocs/README.texi
50 # fix early access of webbrowser module internal, leading to AttributeError:
51 # https://bugs.archlinux.org/task/63703
52 sed -e '28i\ \ \ \ webbrowser.register_standard_browsers()' -i "${pkgname}/mainwin.py"
54 # fix encoding of the Hungarian translation
55 iconv -f ISO-8859-2 -t UTF-8 po/hu.po -o po/hu.po.new
56 sed -i 's/charset=iso-8859-2/charset=utf-8/' po/hu.po.new
57 mv po/hu.po.new po/hu.po
59 # setup version file, so we don't have to use bizarre scripts using git
60 echo "version_info ={'git_sha': None}" > "${pkgname}/_version.py"
61 # replace wrong cflags assumptions
62 sed -E 's|(PYTHON_INCLUDES=).+|\1"$(pkg-config --cflags-only-I python3)"|g' \
69 cd "${pkgname}-${pkgver}"
70 ./configure --prefix=/usr \
77 cd "${pkgname}-${pkgver}"
78 make DESTDIR="$pkgdir" install
79 # strip $pkgdir from embedded paths:
80 python -m compileall -d "/usr/share/${pkgname}/${pkgname}" \
81 "${pkgdir}/usr/share/${pkgname}/${pkgname}"
82 python -O -m compileall -d "/usr/share/${pkgname}/${pkgname}" \
83 "${pkgdir}/usr/share/${pkgname}/${pkgname}"
85 # vim:set ts=2 sw=2 et: