diff --git a/multimedia/libcec/Portfile b/multimedia/libcec/Portfile index e67ceecc183..6c3ad30a56c 100644 --- a/multimedia/libcec/Portfile +++ b/multimedia/libcec/Portfile @@ -4,12 +4,12 @@ PortSystem 1.0 PortGroup cmake 1.1 PortGroup github 1.0 -github.setup Pulse-Eight libcec 6.0.2 libcec- -# Change github.tarball_from to 'releases' or 'archive' next update -github.tarball_from tarball -checksums rmd160 cc0ddc71fb0fda221096e99752b96414018dd6dd \ - sha256 c7edf2cae761fe4f8e19067afff3260b87b80f67ad116e435fa8509f296c191c \ - size 355834 +github.setup Pulse-Eight libcec 7.1.1 libcec- +github.tarball_from archive +revision 0 +checksums rmd160 8c20170c3b1ccc81b26e2be418f5c7f91a12f915 \ + sha256 7f7da95a4c1e7160d42ca37a3ac80cf6f389b317e14816949e0fa5e2edf4cc64 \ + size 365046 categories multimedia license {GPL-2+ OpenSSLException} @@ -25,12 +25,19 @@ depends_build-append \ path:bin/pkg-config:pkgconfig \ port:swig-python +set py_ver 3.14 +set py_ver_nodot [string map {. {}} ${py_ver}] +set python_prefix ${frameworks_dir}/Python.framework/Versions/${py_ver} +set python_pkgd ${python_prefix}/lib/python${py_ver}/site-packages + depends_lib port:ncurses \ port:p8-platform \ - port:python38 \ + port:python314 \ port:xorg-libX11 \ port:xorg-libXrandr +configure.args-append -DPYTHON_USE_VERSION=3 + if {[string match *gcc* ${configure.compiler}]} { # USB.h: error: too many '#pragma options align=reset' # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50909 @@ -38,15 +45,25 @@ if {[string match *gcc* ${configure.compiler}]} { } -set docdir ${prefix}/share/doc/${name} - post-destroot { - xinstall -m 0755 -d ${destroot}${docdir} - + # install the Python files to the correct location + xinstall -d ${destroot}${python_pkgd} + move {*}[glob ${destroot}${prefix}/lib/python${py_ver}/site-packages/*] \ + ${destroot}${python_pkgd} + + reinplace "s|/usr/bin/python3|${prefix}/bin/python${py_ver}|g" \ + ${destroot}${prefix}/bin/pyCecClient + + reinplace "s|from cec import cec|import cec|g" \ + ${destroot}${prefix}/bin/pyCecClient + + set docdir ${prefix}/share/doc/${name} + xinstall -d ${destroot}${docdir} + xinstall -m 0644 -W ${worksrcpath} \ AUTHORS \ debian/changelog.in \ - COPYING \ README.md \ + LICENSE.md \ ${destroot}${docdir} }