# -*- 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 github 1.0 PortGroup legacysupport 1.1 # Need getline(), strndup() legacysupport.newest_darwin_requires_legacy 10 github.setup rrthomas libpaper 2.2.5 v revision 0 checksums rmd160 aea2ed0756077fe113edb5c413da778d2bf3b11f \ sha256 7be50974ce0df0c74e7587f10b04272cd53fd675cb6a1273ae1cc5c9cc9cab09 \ size 1215652 github.tarball_from releases categories print # libpaper is LGPLv2.1+, paperspecs is public domain license LGPL-2.1+ public-domain maintainers nomaintainer description A library providing routines for paper size management long_description \ The paper library and accompanying files are intended \ to provide a simple way for applications to take \ actions based on a system- or user-specified paper size. subport libpaper-utils { revision 0 # We introduce a subport for files with different licenses. # Including them in the 'libpaper' port would prevent the # distribution of MacPorts binary archives for some prominent # tools like Ghostscript or ImagicMagick. description The executables of the libpaper package long_description Provide the new 'paper' and deprecated 'paperconf' \ utility programs that come with the libpaper \ library. Both are used to print paper size \ information. # `paper` is GPL-3+, `paperconf` is GPL-2 license GPL-3+ GPL-2 } configure.args --enable-relocatable \ --disable-silent-rules # https://trac.macports.org/ticket/69112 platform darwin 8 { configure.args-replace \ --enable-relocatable --disable-relocatable } if {${subport} eq ${name}} { test.run yes test.target check post-destroot { # Using --enable-relocatable is unfortunately needed for the # tests to work, but we don't actually want to use rpath in the # installed library. system "install_name_tool -id \ ${prefix}/lib/libpaper.2.dylib \ ${destroot}${prefix}/lib/libpaper.2.dylib" # remove `paper` and `paperconf` delete "${destroot}${prefix}/bin" delete "${destroot}${prefix}/share/man/man1" } } else { depends_lib-append port:libpaper post-destroot { # https://trac.macports.org/ticket/69112 foreach bin {paper paperconf} { system "install_name_tool -change @rpath/libpaper.2.dylib \ ${prefix}/lib/libpaper.2.dylib \ ${destroot}${prefix}/bin/$bin" } # remove library-related files (which are already present) delete "${destroot}${prefix}/etc" delete "${destroot}${prefix}/include" delete "${destroot}${prefix}/lib" delete "${destroot}${prefix}/share/doc/libpaper" delete "${destroot}${prefix}/share/man/man5" } }