aboutsummaryrefslogtreecommitdiffstats
path: root/print/py-cups/Makefile
blob: 9bc34e4975f6b31664d3a3e14df2eec61803e393 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Created by: Michael Johnson <ahze@FreeBSD.org>
# $FreeBSD$

PORTNAME=   cups
PORTVERSION=    1.9.63
CATEGORIES= print python
MASTER_SITES=   CHEESESHOP
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   py${PORTNAME}-${PORTVERSION}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT=    CUPS bindings for Python

LIB_DEPENDS=    cups:${PORTSDIR}/print/cups-client

CFLAGS+=    -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib
USE_BZIP2=  yes
USES=       iconv
USE_PYDISTUTILS=    yes
USE_PYTHON= -2.7

PLIST_FILES=    %%PYTHON_SITELIBDIR%%/cups.so
PYDISTUTILS_EGGINFO=    py${PORTNAME}-${PORTVERSION}-py${PYTHON_VER}.egg-info

post-patch:
    @${REINPLACE_CMD} -e 's|^\(VERSION=\).*$$|\1${PORTVERSION}|' ${WRKSRC}/Makefile

pre-configure:
    @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' ${WRKSRC}/cupsconnection.c
    @${REINPLACE_CMD} -e 's|#ifdef __SVR4|#ifdef __FreeBSD__|' ${WRKSRC}/cupsppd.c

.include <bsd.port.mk>