[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / print / hplip

Annotation of pkgsrc/print/hplip/Makefile, Revision 1.89

1.89    ! rillig      1: # $NetBSD: Makefile,v 1.88 2020/03/10 22:10:52 wiz Exp $
1.1       schnoebe    2:
1.85      khorben     3: DISTNAME=      hplip-3.19.12
1.89    ! rillig      4: PKGREVISION=   4
1.47      adam        5: CATEGORIES=    print
                      6: MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=hplip/}
                      7:
1.78      wiz         8: MAINTAINER=    pkgsrc-users@NetBSD.org
1.47      adam        9: HOMEPAGE=      http://hplipopensource.com/
                     10: COMMENT=       HP Linux Imaging and Printing
                     11: LICENSE=       gnu-gpl-v2 AND mit AND modified-bsd
1.1       schnoebe   12:
                     13: CONFLICTS+=            hpijs-[0-9]*
                     14:
1.50      khorben    15: DEPENDS+=              wget-[0-9]*:../../net/wget
                     16:
1.84      rillig     17: FILES_SUBST+=          CUPS_USER=${CUPS_USER}
                     18: FILES_SUBST+=          CUPS_GROUP=${CUPS_GROUP}
1.1       schnoebe   19:
1.84      rillig     20: PKG_GROUPS_VARS+=      CUPS_GROUP
                     21: PKG_USERS_VARS+=       CUPS_USER
1.1       schnoebe   22:
1.84      rillig     23: BUILD_DEFS+=           CUPS_USER CUPS_GROUP VARBASE
1.1       schnoebe   24:
                     25: USE_LIBTOOL=           yes
1.24      asau       26: USE_LANGUAGES=         c c++
1.1       schnoebe   27: USE_TOOLS+=            aclocal autoconf automake gmake pkg-config
                     28: USE_TOOLS+=            perl:run
1.47      adam       29: GNU_CONFIGURE=         yes
                     30: CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR}
                     31: CONFIGURE_ARGS+=       --localstatedir=${VARBASE}
                     32: CONFIGURE_ARGS+=       --with-cupsbackenddir=${PREFIX}/libexec/cups/backend
                     33: CONFIGURE_ARGS+=       --with-cupsfilterdir=${PREFIX}/libexec/cups/filter
                     34: CONFIGURE_ARGS+=       --with-hpppddir=${PREFIX}/share/hplip/ppd/HP
1.1       schnoebe   35: CONFIGURE_ARGS+=       --enable-network-build
                     36: CONFIGURE_ARGS+=       --disable-pp-build
                     37: CONFIGURE_ARGS+=       --enable-hpcups-install
                     38: CONFIGURE_ARGS+=       --enable-cups-drv-install
                     39: CONFIGURE_ARGS+=       --enable-cups-ppd-install
1.57      schnoebe   40: # deprecated options
                     41: CONFIGURE_ARGS+=       --enable-hpijs-install
1.1       schnoebe   42: CONFIGURE_ARGS+=       --enable-foomatic-drv-install
                     43: CONFIGURE_ARGS+=       --enable-foomatic-ppd-install
                     44: CONFIGURE_ARGS+=       --enable-foomatic-rip-hplip-install
                     45:
                     46: EGDIR=                 ${PREFIX}/share/examples/${PKGBASE}
                     47: EGFILES=               hp/hplip.conf
                     48:
                     49: INSTALL_MAKE_FLAGS+=   ${MAKE_FLAGS}
                     50: INSTALL_MAKE_FLAGS+=   sysconfdir=${EGDIR}
                     51: INSTALL_MAKE_FLAGS+=   localstatedir=${EGDIR}
                     52: INSTALL_MAKE_FLAGS+=   systraydir=${EGDIR}/xdg/autostart
                     53: INSTALL_MAKE_FLAGS+=   mimedir=${EGDIR}/cups
                     54:
                     55: OWN_DIRS+=             ${PKG_SYSCONFDIR}/hp
                     56: OWN_DIRS+=             ${VARBASE}/lib/hp
                     57: OWN_DIRS+=             ${PREFIX}/share/examples/hplip/log/hp
                     58: OWN_DIRS_PERMS+=       ${PREFIX}/share/examples/hplip/log/hp ${CUPS_USER} ${CUPS_GROUP} 0774
                     59:
                     60: PLIST_SRC=             PLIST.base
                     61:
                     62: .include "options.mk"
                     63:
                     64: .for file in ${EGFILES}
                     65: CONF_FILES+=           ${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
                     66: .endfor
                     67: CONF_FILES+=
                     68:
                     69: REPLACE_PYTHON=                *.py */*.py */*/*.py
                     70: REPLACE_PYTHON+=       fax/filters/pstotiff
1.14      schnoebe   71: REPLACE_PYTHON+=       prnt/filters/hpps
1.51      schnoebe   72: REPLACE_PERL=          prnt/hpijs/foomatic-rip-hplip
1.1       schnoebe   73:
                     74: PY_PATCHPLIST=         yes
                     75:
                     76: SUBST_CLASSES+=                        fix-python
                     77: SUBST_STAGE.fix-python=                post-configure
                     78: SUBST_MESSAGE.fix-python=      Fixing python invocations in Python files.
1.89    ! rillig     79: SUBST_FILES.fix-python=                check.py setup.py
1.1       schnoebe   80: SUBST_FILES.fix-python+=       base/utils.py base/pkit.py
                     81: SUBST_FILES.fix-python+=       installer/core_install.py
                     82: SUBST_FILES.fix-python+=       ui/nodevicesform.py ui/devmgr4.py
                     83: SUBST_FILES.fix-python+=       ui4/nodevicesdialog.py ui4/devmgr5.py
1.84      rillig     84: SUBST_SED.fix-python=          -e 's,\(['\''"]\)python ,\1${PYTHONBIN} ,g'
1.1       schnoebe   85:
                     86: SUBST_CLASSES+=                        fix-paths-0
                     87: SUBST_STAGE.fix-paths-0=       pre-configure
                     88: SUBST_MESSAGE.fix-paths-0=     Fixing /var/run in hplip.conf.in.
                     89: SUBST_FILES.fix-paths-0=       hplip.conf.in
1.84      rillig     90: SUBST_SED.fix-paths-0=         -e 's,run=/var/run,run=${VARBASE}/run,g'
1.1       schnoebe   91:
                     92: SUBST_CLASSES+=                        fix-paths-1
                     93: SUBST_STAGE.fix-paths-1=       post-configure
1.46      khorben    94: SUBST_MESSAGE.fix-paths-1=     Fixing paths in Python installer files.
                     95: SUBST_FILES.fix-paths-1=       installer/core_install.py
                     96: SUBST_FILES.fix-paths-1+=      installer/dcheck.py
1.84      rillig     97: SUBST_SED.fix-paths-1=         -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
                     98: SUBST_SED.fix-paths-1+=                -e 's,"/etc/PolicyKit,"${PKG_SYSCONFDIR}/PolicyKit,g'
                     99: SUBST_SED.fix-paths-1+=                -e 's,"/etc/polkit-1,"${PKG_SYSCONFDIR}/polkit-1,g'
                    100: SUBST_SED.fix-paths-1+=                -e 's,"file:///etc/hp,"file://${PKG_SYSCONFDIR}/hp,g'
                    101: SUBST_SED.fix-paths-1+=                -e 's,"/usr/lib/cups/driver,"${PREFIX}/libexec/cups/driver,g'
1.1       schnoebe  102:
                    103: SUBST_CLASSES+=                        fix-paths-2
                    104: SUBST_STAGE.fix-paths-2=       post-configure
1.46      khorben   105: SUBST_MESSAGE.fix-paths-2=     Fixing /etc and /var paths in Python and C++ files.
                    106: SUBST_FILES.fix-paths-2=       check.py base/codes.py base/g.py base/utils.py
1.89    ! rillig    107: SUBST_FILES.fix-paths-2+=      base/queues.py installer/core_install.py
1.46      khorben   108: SUBST_FILES.fix-paths-2+=      fax/backend/hpfax.py prnt/cups.py
                    109: SUBST_FILES.fix-paths-2+=      ui/devmgr4.py ui4/devmgr5.py
                    110: SUBST_FILES.fix-paths-2+=      prnt/filters/hpps
                    111: SUBST_FILES.fix-paths-2+=      prnt/hpijs/globals.cpp prnt/hpijs/hpcupsfax.cpp
                    112: SUBST_FILES.fix-paths-2+=      prnt/hpijs/hpijs.cpp
1.89    ! rillig    113: SUBST_FILES.fix-paths-2+=      prnt/hpps/hppsfilter.c  # /etc/cups/cupsd.conf
        !           114: SUBST_FILES.fix-paths-2+=      common/utils.c # /etc/cups/cupsd.conf
1.84      rillig    115: SUBST_SED.fix-paths-2=         -e 's,\([ '\''"=]\)/etc/hp,\1${PKG_SYSCONFDIR}/hp,g'
                    116: SUBST_SED.fix-paths-2+=                -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g'
                    117: SUBST_SED.fix-paths-2+=                -e 's,\([ '\''"=]\)/etc/sane.d,\1${PKG_SYSCONFDIR}/sane.d,g'
                    118: SUBST_SED.fix-paths-2+=                -e 's,\([ '\''"=]\)/var/lib/hp,\1${VARBASE}/lib/hp,g'
                    119: SUBST_SED.fix-paths-2+=                -e 's,\([ '\''"=]\)/var/log/cups,\1${VARBASE}/log/cups,g'
                    120: SUBST_SED.fix-paths-2+=                -e 's,\([ '\''"=]\)/var/spool/cups,\1${VARBASE}/spool/cups,g'
1.1       schnoebe  121:
                    122: SUBST_CLASSES+=                        fix-paths-3
                    123: SUBST_STAGE.fix-paths-3=       post-configure
                    124: SUBST_MESSAGE.fix-paths-3=     Fixing additional paths in base/pkit.py.
                    125: SUBST_FILES.fix-paths-3=       base/pkit.py
1.84      rillig    126: SUBST_SED.fix-paths-3=         -e 's,\([ '\''"=]\)/usr,\1${PREFIX},g'
1.1       schnoebe  127:
                    128: SUBST_CLASSES+=                        fix-paths-4
                    129: SUBST_STAGE.fix-paths-4=       post-configure
                    130: SUBST_MESSAGE.fix-paths-4=     Fixing default PPD search path in base/g.py and prnt/cups.py.
                    131: SUBST_FILES.fix-paths-4=       base/g.py prnt/cups.py
1.84      rillig    132: SUBST_SED.fix-paths-4=         -e '\,ppd_search_path =, { s,/usr/\([a-z]*\);,/usr/\1;${PREFIX}/\1;,g ; }'
                    133: SUBST_SED.fix-paths-4+=                -e 's,\([ '\''"=]\)/usr/share/ppd,\1${PREFIX}/share/ppd,g'
1.1       schnoebe  134:
                    135: SUBST_CLASSES+=                        fix-paths-5
                    136: SUBST_STAGE.fix-paths-5=       post-configure
                    137: SUBST_MESSAGE.fix-paths-5=     Fixing paths in prnt/hpijs/foomatic-rip-hplip.
                    138: SUBST_FILES.fix-paths-5=       prnt/hpijs/foomatic-rip-hplip
1.84      rillig    139: SUBST_SED.fix-paths-5=         -e 's,\([ '\''"=]\)/etc/cups,\1${PKG_SYSCONFDIR}/cups,g'
                    140: SUBST_SED.fix-paths-5+=                -e 's,\([ '\''"=]\)/etc/foomatic,\1${PKG_SYSCONFDIR}/foomatic,g'
                    141: SUBST_SED.fix-paths-5+=                -e 's,\([ '\''"=]\)/var/spool,\1${VARBASE}/spool,g'
                    142: SUBST_SED.fix-paths-5+=                -e 's,prefix = "/usr",prefix = "${PREFIX}",g'
                    143: SUBST_SED.fix-paths-5+=                -e 's,\(path = "/usr/bin:\),\1${PREFIX}/bin:,g'
                    144: SUBST_SED.fix-paths-5+=                -e 's,\(path = "/usr/lib/cups/filter:\),\1${PREFIX}/libexec/cups/filter:,g'
                    145: SUBST_SED.fix-paths-5+=                -e '\,} elsif (-r "/usr/share/ppr, { N ; p ; s,"/usr,"${PREFIX},g ; }'
1.1       schnoebe  146:
                    147: SUBST_CLASSES+=                        fix-paths-6
                    148: SUBST_STAGE.fix-paths-6=       post-configure
                    149: SUBST_MESSAGE.fix-paths-6=     Fixing paths in fax/filters/pstotiff.
                    150: SUBST_FILES.fix-paths-6=       fax/filters/pstotiff
1.84      rillig    151: SUBST_SED.fix-paths-6=         -e 's,"-I/usr/share/cups/fonts","-I${PREFIX}/share/cups/fonts",g'
                    152: SUBST_SED.fix-paths-6+=                -e 's,"/usr/bin/gs","${PREFIX}/bin/gs",g'
1.1       schnoebe  153:
                    154: # NetBSD has strnlen(3) since 5.99.12
                    155: .if ${OPSYS} == "NetBSD" && empty(OS_VERSION:M5.99.*) && empty(OS_VERSION:M[6-9].*)
                    156: SUBST_CLASSES+=                        fix-strnlen
                    157: SUBST_STAGE.fix-strnlen=       post-configure
                    158: SUBST_MESSAGE.fix-strnlen=     Replacing strnlen() with strlen() in two C++ files.
                    159: SUBST_FILES.fix-strnlen=       prnt/hpijs/context2.cpp prnt/hpijs/ljzjscolor.cpp
1.84      rillig    160: SUBST_SED.fix-strnlen=         -e 's/\([ (]\)strnlen(\([^,]*\), DevIDBuffSize)/\1strlen(\2)/g'
1.1       schnoebe  161: .endif
                    162:
                    163: .include "../../mk/dlopen.buildlink3.mk"
                    164: BUILDLINK_TRANSFORM+=  opt:-ldl:${BUILDLINK_LDADD.dl:Q}
                    165:
                    166: pre-configure:
                    167:        cd ${WRKSRC} && aclocal && automake --add-missing --foreign && autoconf
                    168:
                    169: INSTALLATION_DIRS+=    share/cups/model
                    170:
                    171: post-install:
                    172:        ${CHMOD} a-x ${DESTDIR}${PREFIX}/share/hplip/__init__.py
                    173:        ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/share/hplip
                    174:        ${LN} -s ../../../share/hplip/ppd ${DESTDIR}${PREFIX}/share/cups/model/hplip-ppds
                    175:
                    176: .include "../../lang/python/application.mk"
                    177: .include "../../lang/python/extension.mk"
                    178: .include "../../mk/jpeg.buildlink3.mk"
                    179: .include "../../net/net-snmp/buildlink3.mk"
1.64      khorben   180: .include "../../print/cups-base/buildlink3.mk"
1.19      sbd       181: .include "../../print/ghostscript/buildlink3.mk"
1.4       schnoebe  182: .include "../../devel/libusb1/buildlink3.mk"
1.1       schnoebe  183: .include "../../security/openssl/buildlink3.mk"
                    184: .include "../../mk/pthread.buildlink3.mk"
                    185: .include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>