Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaso committed Mar 8, 2025
1 parent 9161fac commit c9b4fe1
Showing 1 changed file with 39 additions and 6 deletions.
45 changes: 39 additions & 6 deletions python/py-gobject3/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

PortSystem 1.0
PortGroup python 1.0
PortGroup meson 1.0

name py-gobject3
set my_name pygobject
version 3.46.0
version 3.50.0
revision 0

categories-append gnome
Expand All @@ -19,9 +20,9 @@ long_description PyGObject is a Python dynamic module that enables developers
homepage https://pygobject.readthedocs.io/
use_xz yes

checksums rmd160 ab889fe19d883dbe9ce693cfe6d4af048a353014 \
sha256 426008b2dad548c9af1c7b03b59df0440fde5c33f38fb5406b103a43d653cafc \
size 561552
checksums rmd160 8a797437434ed98e0d957815ec77f85cffcb7ca9 \
sha256 8d836e75b5a881d457ee1622cae4a32bcdba28a0ba562193adb3bbb472472212 \
size 929848

python.versions 36 37 38 39 310 311 312 313
python.pep517 no
Expand Down Expand Up @@ -52,8 +53,7 @@ if {${name} ne ${subport}} {

compiler.c_standard 2011

build.target build_ext
build.args-append --inplace
configure.args-append --buildtype=plain

# uses g-ir-scanner, which uses $CC from env
if {${universal_possible} && [variant_isset universal]} {
Expand All @@ -68,6 +68,39 @@ if {${name} ne ${subport}} {
destroot.env-append "CC=${configure.cc} ${configure.cc_archflags}"
}

if {${python.version} >= 38} {
set python_ver_dot [string index ${python.version} 0].[string range ${python.version} 1 end]

configure.python ${prefix}/bin/python${python_ver_dot}

meson.native.binaries-append \
python3=${configure.python}

python.pep517_backend \
meson
set python_prefix ${frameworks_dir}/Python.framework/Versions/${python_ver_dot}

# Use meson build system directly
use_configure yes
configure.cmd ${prefix}/bin/meson
configure.pre_args setup
configure.args --prefix=${python_prefix} --buildtype=plain
configure.post_args build

# Make sure we're in the source directory for build
build.dir ${worksrcpath}
build.cmd ${prefix}/bin/meson
build.target compile
build.args -C build

# And for install
destroot.dir ${worksrcpath}
destroot.cmd ${prefix}/bin/meson
destroot.target install
destroot.args -C build
destroot.destdir DESTDIR=${destroot}
}

livecheck.type none
} else {
livecheck.type gnome
Expand Down

0 comments on commit c9b4fe1

Please sign in to comment.