pkgsrc/print/ghostscript/options.mk
dsainty 1f40f3a084 Mechanically replace references to graphics/jpeg with the suitable
alternative from mk/jpeg.buildlink3.mk

This allows selection of an alternative jpeg library (namely the x86 MMX,
SSE, SSE2 accelerated libjpeg-turbo) via JPEG_DEFAULT=libjpeg-turbo, and
follows the current standard model for alternatives (fam, motif, fuse etc).

The mechanical edits were applied via the following script:

#!/bin/sh
for d in */*; do
  [ -d "$d" ] || continue
  for i in "$d/"Makefile* "$d/"*.mk; do
    case "$i" in *.orig|*"*"*) continue;; esac
    out="$d/x"
    sed -e 's;graphics/jpeg/buildlink3\.mk;mk/jpeg.buildlink3.mk;g' \
        -e 's;BUILDLINK_PREFIX\.jpeg;JPEGBASE;g' \
        < "$i" > "$out"
    if cmp -s "$i" "$out"; then
      rm -f "$out"
    else
      echo "Edited $i"
      mv -f "$i" "$i.orig" && mv "$out" "$i"
    fi
  done
done
2010-12-23 11:44:24 +00:00

48 lines
1.3 KiB
Makefile

# $NetBSD: options.mk,v 1.11 2010/12/23 11:44:54 dsainty Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.ghostscript
PKG_SUPPORTED_OPTIONS= x11 cups debug fontconfig
PKG_SUGGESTED_OPTIONS= x11 fontconfig
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mx11)
CONFIGURE_ARGS+= --with-x
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.else
CONFIGURE_ARGS+= --without-x
.endif
PLIST_VARS+= cups
.if !empty(PKG_OPTIONS:Mcups)
CONFIGURE_ARGS+= --enable-cups
PLIST.cups= yes
INSTALL_TARGET+= install-cups
CUPS_CONFDIR?= ${PKG_SYSCONFBASEDIR}/cups
CUPS_EGDIR= ${PREFIX}/share/examples/cups
CONF_FILES+= ${CUPS_EGDIR}/pstoraster.convs ${CUPS_CONFDIR}/pstoraster.convs
SUBST_CLASSES+= cupsetc
SUBST_STAGE.cupsetc= post-extract
SUBST_MESSAGE.cupsetc= Fixing CUPS etc directory path to install as example
SUBST_FILES.cupsetc= cups/cups.mak
SUBST_SED.cupsetc= -e 's|$$(CUPSSERVERROOT)|${CUPS_EGDIR}|g'
.include "../../print/cups/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-cups
.endif
.if !empty(PKG_OPTIONS:Mdebug)
CONFIGURE_ARGS+= --enable-debug
.endif
.if !empty(PKG_OPTIONS:Mfontconfig)
.include "../../fonts/fontconfig/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-fontconfig
.endif