# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup compiler_blacklist_versions 1.0 PortGroup conflicts_build 1.0 PortGroup legacysupport 1.1 # strnlen legacysupport.newest_darwin_requires_legacy 10 name scite version 4.4.5 categories editors maintainers {@barracuda156 gmail.com:vital.had} openmaintainer license MIT description SciTE is a SCIntilla-based text editor long_description Originally built to demonstrate Scintilla, \ it has grown to be a generally useful editor \ with facilities for building and running programs. \ It is best used for jobs with simple configurations. homepage https://www.scintilla.org/SciTE.html master_sites sourceforge:scintilla/SciTE/${version} distname ${name}[strsed ${version} {g/\.//}] extract.suffix .tgz depends_build-append \ path:bin/pkg-config:pkgconfig depends_lib-append port:atk \ path:lib/pkgconfig/cairo.pc:cairo \ port:dbus \ port:desktop-file-utils \ path:lib/pkgconfig/gdk-pixbuf-2.0.pc:gdk-pixbuf2 \ path:lib/pkgconfig/glib-2.0.pc:glib2 \ path:lib/pkgconfig/gtk+-3.0.pc:gtk3 checksums rmd160 fc2bac0f7bc8f6d308ce1fa902f72659f7acb1b0 \ sha256 9d74bde5e4ee18d767b6add5a6b95d7ffcedbcfd017c3df59e16b0785e3521a1 \ size 2777899 patchfiles patch-scite-makefile.diff # gatomic.h: error: argument 2 of '__atomic_load' must not be a pointer to a 'volatile' type patchfiles-append patch-ScintillaGTKAccessible.cxx.diff # SciTEBase.cxx: error: 'system_error' in namespace 'std' does not name a type patchfiles-append patch-SciTEBase.cxx.diff # Setting LDFAGS via build.args breaks linking on aarch64 and powerpc: # _main is not being found. if {${os.platform} eq "darwin" && ${os.major} < 11} { patchfiles-append \ patch-legacy-support.diff post-patch { reinplace "s,@PREFIX@,${prefix}," ${workpath}/scintilla/lexilla/src/makefile } } post-patch { if {${os.platform} eq "darwin" && ${configure.cxx_stdlib} ne "libc++"} { reinplace "s,@CXX_ABI_FLAG@,-D_GLIBCXX_USE_CXX11_ABI=0,g" ${workpath}/scite/gtk/makefile \ ${workpath}/scintilla/gtk/makefile ${workpath}/scintilla/lexilla/src/makefile } else { reinplace "s,@CXX_ABI_FLAG@,,g" ${workpath}/scite/gtk/makefile \ ${workpath}/scintilla/gtk/makefile ${workpath}/scintilla/lexilla/src/makefile } } # Niether Clang builds it: # uninitialized_algorithms.h: error: static assertion failed due to requirement # '__is_cpp17_move_insertable, void>::value': # The specified type does not meet the requirements of Cpp17MoveInsertable compiler.blacklist-append \ {clang} macports-clang-* compiler.fallback macports-gcc-13 compiler.cxx_standard 2017 worksrcdir ${name} patch.dir ${workpath} # tidy's platform.h shadows scintilla's Platform.h on case-insensitive filesystems; see #28230 if {[file exists ${prefix}/include/Platform.h]} { conflicts_build tidy } use_configure no variant universal {} set sysrootflags "" if {${configure.sdkroot} != ""} { set sysrootflags "-isysroot ${configure.sdkroot}" } build.dir ${worksrcpath}/gtk # Yes, we need to set the compiler explicitly here. # Otherwise g++ is picked, and this happens: # cc1plus: error: unrecognized command line option "-std=c++17" # Notice, adding LDFLAGS here breaks linking, at least on aarch64 and powerpc. build.args-append CC="${configure.cc} ${sysrootflags} [get_canonical_archflags cc]" \ CXX="${configure.cxx} ${sysrootflags} [get_canonical_archflags cxx]" \ CPPFLAGS="${configure.cppflags}" \ prefix=${prefix} \ GTK3=1 \ NO_LUA=1 if {[string match *clang* ${configure.compiler}]} { build.args-append \ CLANG=1 } pre-build { ui_debug "Building scintilla" set cmd "make [join ${build.args}] [portbuild::build_getjobsarg]" ui_debug "Assembled command: '${cmd}'" system -W ${workpath}/scintilla/gtk ${cmd} } destroot { # Several ports use scintilla libs. # Avoid dumping these into ${prefix}/lib as unsafe. set scite_root ${prefix}/libexec/${name} xinstall -d 755 ${destroot}${scite_root} copy ${worksrcpath}/bin/SciTE ${destroot}${scite_root}/ ln -sf ${scite_root}/SciTE ${destroot}${prefix}/bin/${name} foreach lib {liblexilla.a liblexilla.dylib libscintilla.dylib scintilla.a} { copy ${workpath}/scintilla/bin/${lib} ${destroot}${scite_root}/ } xinstall -d 755 ${destroot}${prefix}/share/applications copy ${worksrcpath}/gtk/SciTE.desktop ${destroot}${prefix}/share/applications/ xinstall -m 444 ${worksrcpath}/doc/scite.1 ${destroot}${prefix}/share/man/man1 set docdir ${prefix}/share/doc/${name} xinstall -d ${destroot}${docdir} xinstall -m 644 {*}[glob ${worksrcpath}/src/*.properties] ${destroot}${docdir} xinstall -m 644 -W ${workpath}/scite License.txt README ${destroot}${docdir} system "install_name_tool -id ${scite_root}/liblexilla.dylib \ ${destroot}${scite_root}/liblexilla.dylib" system "install_name_tool -id ${scite_root}/libscintilla.dylib \ ${destroot}${scite_root}/libscintilla.dylib" system "install_name_tool -change ../bin/libscintilla.dylib \ ${scite_root}/libscintilla.dylib ${destroot}${scite_root}/SciTE" } post-activate { system "${prefix}/bin/update-desktop-database ${prefix}/share/applications" } livecheck.distname SciTE