Skip to content

Commit

Permalink
gramps: update to 5.2.3; drop py38
Browse files Browse the repository at this point in the history
  • Loading branch information
mascguy committed Dec 9, 2024
1 parent e95606d commit cdb20c5
Showing 1 changed file with 22 additions and 35 deletions.
57 changes: 22 additions & 35 deletions genealogy/gramps/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ PortGroup github 1.0
PortGroup python 1.0
PortGroup app 1.1

github.setup gramps-project gramps 5.1.6 v
revision 2
github.setup gramps-project gramps 5.2.3 v
revision 0
github.tarball_from archive

supported_archs noarch
Expand All @@ -22,9 +22,9 @@ long_description Gramps is a genealogy program to store, edit, \
correlation to potentially fill relationship gaps.
homepage https://www.gramps-project.org/

checksums rmd160 ad761f8b36d3c335bed67d91d6798af26b49ad45 \
sha256 bff0b5694e77e0f7075fb76481c4523d37646cc042c8dd9897ff2e0cd401fa3b \
size 17429153
checksums rmd160 b2e689b574b5e02c16be9d2bde783dc6ce05cd40 \
sha256 bd1b7dc3f26ffd480f607a79e3a76688024a28b0f0b412ac1e4d77402ddc87d6 \
size 21081011

depends_build-append \
port:intltool
Expand All @@ -45,8 +45,7 @@ depends_lib-append \
depends_run-append \
port:adwaita-icon-theme

patchfiles-append \
patch-gramps-gen-utils-resourcepath.py.diff
#patchfiles-append patch-gramps-gen-utils-resourcepath.py.diff

proc py_setup {py_ver} {
python.default_version \
Expand All @@ -65,22 +64,27 @@ proc py_setup {py_ver} {
test.run yes
}

variant python38 conflicts python39 python310 description {Use Python 3.8} {
py_setup 38
}

variant python39 conflicts python38 python310 description {Use Python 3.9} {
variant python39 conflicts python310 python311 python312 description {Use Python 3.9} {
py_setup 39
}

variant python310 conflicts python38 python39 description {Use Python 3.10} {
variant python310 conflicts python39 python311 python312 description {Use Python 3.10} {
py_setup 310
}

if {![variant_isset python38] && \
![variant_isset python39] && \
![variant_isset python310]} {
default_variants +python310
variant python311 conflicts python39 python310 python312 description {Use Python 3.11} {
py_setup 311
}

variant python312 conflicts python39 python310 python311 description {Use Python 3.12} {
py_setup 312
}

if {![variant_isset python39] && \
![variant_isset python310] && \
![variant_isset python311] && \
![variant_isset python312]} {
default_variants +python312
}

# Dummy variants, to ensure user's choice cascades to dependencies
Expand All @@ -97,29 +101,12 @@ if {![variant_isset quartz] && ![variant_isset x11]} {
error "Either +x11 or +quartz is required"
}

post-destroot {
set dir_share ${prefix}/share
set file_resource_path \
${destroot}${python.pkgd}/gramps/gen/utils/resource-path

if {[file exists ${file_resource_path}]} {
ui_info "resource-path: file exists, deleting: ${file_resource_path}"
file delete -force ${file_resource_path}
}

ui_info "resource-path: creating: ${file_resource_path}"
system "/bin/echo -n \"${dir_share}\" > ${file_resource_path}"

delete ${destroot}${prefix}/share
move ${destroot}${python.prefix}/share ${destroot}${prefix}
}

post-activate {
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
system "${prefix}/bin/update-mime-database ${prefix}/share/mime"
}

app.icon ${worksrcpath}/images/hicolor/scalable/apps/gramps.svg
app.icon ${worksrcpath}/images/hicolor/scalable/apps/org.gramps_project.Gramps.svg
app.retina yes

notes {
Expand Down

0 comments on commit cdb20c5

Please sign in to comment.