# -*- 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 PortSystem 1.0 PortGroup cmake 1.1 PortGroup conflicts_build 1.0 PortGroup github 1.0 PortGroup qt6 1.0 github.setup Sigil-Ebook Sigil 2.1.0 revision 0 name sigil platforms darwin categories editors maintainers {i0ntempest @i0ntempest} openmaintainer license GPL-3+ description Sigil, the ePub editor long_description Sigil is a multi-platform WYSIWYG ebook editor. It is \ designed to edit books in ePub format checksums rmd160 4694bb8426c4e9f87a2f294aea6f66a55298f768 \ sha256 fdc20649146efa398f98afdb9320a249d4638ae9d9b715606569c01a5bf1314d \ size 26922834 qt6.depends_build qttools qt6.depends_lib qt5compat \ qtwebengine depends_build-append port:pkgconfig depends_lib-append port:hunspell \ port:minizip \ port:pcre \ port:zlib patchfiles pcre.patch conflicts_build libzip compiler.cxx_standard 2011 configure.args -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \ -DSYSTEM_LIBS_REQUIRED=ON \ -DUSE_SYSTEM_LIBS=ON \ -DUSE_QT6=1 \ -DCMAKE_OSX_DEPLOYMENT_TARGET=${macosx_deployment_target} post-patch { system -W ${worksrcpath}/src/Resource_Files/mac "/usr/libexec/PlistBuddy -c \"Set :LSMinimumSystemVersion ${macosx_deployment_target}\" MacOSXBundleInfo.plist" } pre-configure { if {![variant_isset python312] && ![variant_isset python311] && ![variant_isset python310] && ![variant_isset python39] && ![variant_isset python38]} { ui_error "${name} requires Python, please use a Python variant." return -code error } } destroot { copy ${destroot.dir}/bin/Sigil.app ${destroot}${applications_dir} } proc python-depends {python_branch} { global frameworks_dir env post-patch { reinplace "s|Python3 3\\.8 COMPONENTS Interpreter Development|Python3 ${::python_branch} COMPONENTS Interpreter Development|g" ${worksrcpath}/CMakeLists.txt reinplace "s|PythonInterp 3\\.8|PythonInterp ${::python_branch}|g" ${worksrcpath}/CMakeLists.txt reinplace "s|PythonLibs 3\\.8|PythonLibs ${::python_branch}|g" ${worksrcpath}/CMakeLists.txt } set python_version [string map {. ""} ${python_branch}] depends_lib-append port:python${python_version} \ port:py${python_version}-chardet \ port:py${python_version}-cssselect \ port:py${python_version}-cssutils \ port:py${python_version}-html5lib \ port:py${python_version}-lxml \ port:py${python_version}-Pillow \ port:py${python_version}-regex \ port:py${python_version}-six configure.env-append \ PATH=${frameworks_dir}/Python.framework/Versions/${python_branch}/bin:$env(PATH) } variant python312 conflicts python38 python39 python310 python311 description {Build with Python 3.12} { set ::python_branch 3.12 python-depends ${::python_branch} } variant python311 conflicts python38 python39 python310 python312 description {Build with Python 3.11} { set ::python_branch 3.11 python-depends ${::python_branch} } variant python310 conflicts python38 python39 python311 python312 description {Build with Python 3.10} { set ::python_branch 3.10 python-depends ${::python_branch} } variant python39 conflicts python38 python310 python311 python312 description {Build with Python 3.9} { set ::python_branch 3.9 python-depends ${::python_branch} } variant python38 conflicts python39 python310 python311 python312 description {Build with Python 3.8} { set ::python_branch 3.8 python-depends ${::python_branch} } if {![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} { default_variants +python312 }