# -*- 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 compiler_blacklist_versions 1.0 PortGroup boost 1.0 name LyX conflicts LyX1 version 2.4.2 revision 0 set branch [join [lrange [split ${version} .] 0 1] .] categories aqua license GPL-2+ maintainers {khindenburg @kurthindenburg} openmaintainer description WYSIWYM document processor homepage https://www.lyx.org long_description LyX is an advanced open source document processor \ that encourages an approach to writing based on \ the structure of your documents, not their \ appearance. LyX lets you concentrate on writing, \ leaving details of visual layout to the software. depends_build-append port:bison port:gawk port:cctools depends_lib-append port:enchant \ bin:latex:texlive \ port:ImageMagick \ port:hunspell \ port:libmagic \ port:aspell use_xz yes distname lyx-${version} worksrcdir lyx-${version} master_sites http://lyx.cybermirror.org/stable/${branch}.x/ \ http://sunsite.icm.edu.pl/pub/unix/editors/lyx/stable/${branch}.x/ \ ftp://ftp.ntua.gr/pub/X11/LyX/stable/${branch}.x/ \ ftp://ftp.lyx.org/pub/lyx/stable/${branch}.x/ checksums rmd160 686630c5fe6d98bb29625e0818d9ad027bdb3814 \ sha256 0d5a75dec9a169ab23bfa47da53ec65c62432de57014de315023d620ebccfe68 \ size 17871168 configure.args --disable-silent-rules compiler.cxx_standard 2014 compiler.blacklist-append { clang < 800 } patchfiles-append patch-lyx-applescriptproxy-add-stringh.diff patchfiles-append patch-lyx-linkbackserver-older-nsalert.diff post-configure { reinplace \ "s|\$(MKDIR_P) \$(pkgdatadir)|\ \$(MKDIR_P) \$(DESTDIR)\$(pkgdatadir)|" \ ${worksrcpath}/development/MacOSX/Makefile } # 2.4.x has expermintal support for Qt6 - we are ignoring ATM if {${os.platform} eq "darwin" && ${os.major} < 11} { default_variants +qt4 } elseif {![variant_isset qt4]} { default_variants +qt5 } # Make the default match boost's default. if {![variant_isset python38] && ![variant_isset python39] && ![variant_isset python310] && ![variant_isset python311]} { default_variants-append +python312 } # TODO: use loops like other ports do variant python38 conflicts python39 python310 python311 python312 description {Use python38} { depends_build-append port:python38 configure.python ${prefix}/bin/python3.8 } variant python39 conflicts python38 python310 python311 python312 description {Use python39} { depends_build-append port:python39 configure.python ${prefix}/bin/python3.9 } variant python310 conflicts python38 python39 python311 python312 description {Use python310} { depends_build-append port:python310 configure.python ${prefix}/bin/python3.10 } variant python311 conflicts python38 python39 python310 python312 description {Use python311} { depends_build-append port:python311 configure.python ${prefix}/bin/python3.11 } variant python312 conflicts python38 python39 python310 python311 description {Use python312} { depends_build-append port:python312 configure.python ${prefix}/bin/python3.12 } variant qt4 conflicts qt5 description {Use Qt4} { PortGroup qt4 1.0 version 2.3.8 revision 0 checksums rmd160 80b2c53d12b04dd64a6326b4b1ea505dcb352120 \ sha256 7e8f56d148cb459eb00abbe9c6371744e4ff077b842c0024153a3f094b10d4ad \ size 16412700 configure.pre_args --prefix=${applications_dir}/LyX.app configure.args-append \ --without-x \ --without-included-boost \ --enable-optimization=-Os \ --with-version-suffix=-${branch} \ --with-qt-dir=${prefix}/libexec/qt4 \ --disable-qt5 # QRawFont is supposed to work, but does not: # GuiFontMetrics.cpp:127:9: error: 'QRawFont' was not declared in this scope; did you mean 'QFont'? # Anyway, it seems to have issues in Qt4: # https://stackoverflow.com/questions/12597595/qrawfontfromfont-not-working-correctly patchfiles-append patch-GuiFontMetrics.cpp.diff } variant qt5 conflicts qt4 description {Use Qt5} { PortGroup qt5 1.0 qt5.depends_component qtbase \ qtmacextras \ qtsvg configure.cxxflags-append -std=c++11 configure.pre_args --prefix=${applications_dir}/LyX.app configure.args-append \ --without-x \ --without-included-boost \ --enable-optimization=-Os \ --with-version-suffix=-${branch} \ --with-qt-dir=${prefix}/libexec/qt5 \ --with-qt-includes=${prefix}/libexec/qt5/include \ --with-qt-libraries=${prefix}/libexec/qt5/lib \ --enable-qt5 } # error: '-fobjc-exceptions' is required to enable Objective-C exception syntax if {[string match *gcc* ${configure.compiler}]} { # This must be set in pre-configure: pre-configure { configure.objcflags-append \ -fobjc-exceptions } } variant debug description {Build with debugging information} { configure.args-append --enable-debug } post-destroot { file delete -force ${destroot}${applications_dir}/LyX.app/Contents/Library/Spotlight } notes " You may want to install texlive-latex-extra if you get errors about missing tex files. It is a very large package. It is advisible to not delete the previous version so that it can be re-activated if there are issues with the new version. https://guide.macports.org/#using.port.upgrade " livecheck.type regex livecheck.url ${homepage} livecheck.regex "${name} (\\d+\\.\\d+\\.\\d+(\\.\\d+)?) released"