---
name: portconf
version: 1.5
origin: ports-mgmt/portconf
comment: A universal tool to set specific port knobs
arch: freebsd:9:x86:64
www: UNKNOWN
maintainer: ale@FreeBSD.org
prefix: /usr/local
licenselogic: single
flatsize: 1913
desc: |
  Portconf is a simple framework to set ports options in an
  universal way. Knobs set to specific ports are honoured
  by portmaster, portupgrade, portmanager and 'make install'.
categories: [ports-mgmt]
files:
  /usr/local/libexec/portconf: 2bffec38049b382539830d3947b829f6709147aac259f845c6d8a5ba045e5344
scripts:
  install: |
    #!/bin/sh

    MAKE_CONF=/etc/make.conf
    PORTS_DIR=`/bin/realpath /usr/ports`

    if [ "$2" = "POST-INSTALL" ]; then
    echo -n "Spamming ${MAKE_CONF}..."
    cat >> ${MAKE_CONF} << EOF
    # Begin portconf settings
    # Do not touch these lines
    .if !empty(.CURDIR:M${PORTS_DIR}*) && exists(${PKG_PREFIX}/libexec/portconf)
    _PORTCONF!=${PKG_PREFIX}/libexec/portconf
    .for i in \${_PORTCONF:S/|/ /g}
    \${i:S/%25/ /g}
    .endfor
    .endif
    # End portconf settings
    EOF
    echo " Done."
    fi
  deinstall: "#!/bin/sh\n\nMAKE_CONF=/etc/make.conf\n\nif [ \"$2\" = \"POST-DEINSTALL\"
    ]; then\necho -n \"Cleaning up ${MAKE_CONF}...\"\nif [ -f ${MAKE_CONF} ]; then\n
    \   sed -e \"/# Begin portconf settings/,/# End portconf settings/d\" \\\n\t-i
    \"\" ${MAKE_CONF}\n    if [ ! -s ${MAKE_CONF} ]; then\n\trm ${MAKE_CONF}\n    fi\nfi\necho
    \" Done.\"\nfi\n"
message: |
  *********************************************************

  To set port-specific make variables, create the
  /usr/local/etc/ports.conf configuration file
  with the following syntax:

  ---------------------------------------------------------
  # this is a comment
  *: NOPORTDOCS
  editors/openoffice-3: WITH_CCACHE|LOCALIZED_LANG=it
  print/ghostscript-* print/lpr-wrapper: A4
  sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
  www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
  x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc"
  ---------------------------------------------------------

  Global port directory patterns and blanks around the
  pipe "|" symbol are allowed.
  Values shouldn't be quoted even if they contain spaces.
  Lines beginning with a '#' are comments.

  *********************************************************
