# -*- 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 name gnetcat set my_name netcat version 0.7.1 revision 2 homepage http://netcat.sourceforge.net/ description A rewrite of the well-known networking tool, but more portable, with new features and fully GNU compliant. long_description \ Netcat is a featured networking utility which reads and writes data \ across network connections, using the TCP/IP protocol. It is designed to \ be a reliable "back-end" tool that can be used directly or easily driven \ by other programs and scripts. At the same time, it is a feature-rich \ network debugging and exploration tool, since it can create almost any \ kind of connection you would need and has several interesting built-in \ capabilities. categories net license GPL-2+ maintainers {alum.wpi.edu:arno+macports @fracai} master_sites sourceforge:project/${my_name}/${my_name}/${version}/ distname ${my_name}-${version} checksums rmd160 9eabed2b4b5585a55062b4a82c8c6aee1b01e3b7 \ sha256 30719c9a4ffbcf15676b8f528233ccc54ee6cba96cb4590975f5fd60c68a066f \ size 398872 depends_lib \ port:gettext \ port:libiconv \ port:util-linux configure.args \ --program-prefix=g \ --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man use_parallel_build yes set docdir ${prefix}/share/doc/${my_name}-${version} test.run yes test.target check post-configure { # prefix the shortname reinplace "s|netcat_nc = \$(DESTDIR)\$(bindir)/nc|netcat_nc = \$(DESTDIR)\$(bindir)/gnc|" ${worksrcpath}/src/Makefile reinplace "s|ln -s netcat \$(netcat_nc);|ln -s gnetcat \$(netcat_nc);|" ${worksrcpath}/src/Makefile } post-destroot { # prefix the info files foreach {f} [glob -tails -directory ${destroot}${prefix}/share/info *.info] { move ${destroot}${prefix}/share/info/${f} ${destroot}${prefix}/share/info/g${f} } # prefix the locale files foreach {d} [glob -tails -directory ${destroot}${prefix}/share/locale */] { foreach {f} [glob -tails -directory ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES *.mo] { move ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/${f} ${destroot}${prefix}/share/locale/${d}/LC_MESSAGES/g${f} } } xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin foreach binary [glob -tails -directory ${destroot}${prefix}/bin g*] { ln -s ${prefix}/bin/${binary} ${destroot}${prefix}/libexec/gnubin/[string range $binary 1 end] } xinstall -m 755 -d ${destroot}${prefix}/libexec/gnubin/man/man1 foreach manpage [glob -tails -directory ${destroot}${prefix}/share/man/man1 g*] { ln -s ${prefix}/share/man/man1/${manpage}.gz ${destroot}${prefix}/libexec/gnubin/man/man1/[string range $manpage 1 end].gz } # create and copy the port docs xinstall -d ${destroot}${docdir} xinstall -m 0644 -W ${worksrcpath} ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \ ${destroot}${docdir} } platform darwin arm { depends_build-append port:automake post-patch { # Use newer config.guess and config.sub to support Apple Silicon. set automake_dirs [glob -directory ${prefix}/share automake-*] set automake_dir [lindex [lsort -command vercmp $automake_dirs] end] copy -force ${automake_dir}/config.guess ${automake_dir}/config.sub \ ${worksrcpath} } }