# -*- 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.3.1 revision 0 name sigil conflicts sigil-qt4 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 3d35e3b1b176373a0eb4c520620dd5be8c6aaafa \ sha256 4702d00b20290357673275df3d179cd17956167f86d65e95ef09937185b26e8c \ size 17478839 qt6.depends_build qttools qt6.depends_lib qt5compat \ qtwebengine depends_build-append path:bin/pkg-config:pkgconfig depends_lib-append port:hunspell \ port:minizip \ port:pcre2 \ port:zlib 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} patchfiles-append pcre.patch \ patch-49112b204f48155a83a2e2936570f2a50e91c9b8.patch 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]} { ui_error "${name} requires Python, please use a Python variant." return -code error } } destroot { copy ${destroot.dir}/bin/Sigil.app ${destroot}${applications_dir} } # Needed after Qt 6.7 update, for 2.3.0 and 2.3.1 cmake.module_path-append \ ${qt6.dir}/lib/cmake/Qt6QmlTools 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 python39 python310 python311 description {Build with Python 3.12} { set ::python_branch 3.12 python-depends ${::python_branch} } variant python311 conflicts python39 python310 python312 description {Build with Python 3.11} { set ::python_branch 3.11 python-depends ${::python_branch} } variant python310 conflicts python39 python311 python312 description {Build with Python 3.10} { set ::python_branch 3.10 python-depends ${::python_branch} } variant python39 conflicts python310 python311 python312 description {Build with Python 3.9} { set ::python_branch 3.9 python-depends ${::python_branch} } if {![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} { default_variants +python312 }