aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/py-imaging/Makefile
blob: d4445215ee843dfb97143deddb4217cbaca27456 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# New ports collection makefile for:    PIL
# Date created:         02 November 1998
# Whom:                 Thomas Gellekum <tg@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   imaging
PORTVERSION=    1.1.3
CATEGORIES= graphics python
MASTER_SITES=   http://www.pythonware.com/downloads/ \
        ftp://www.python.org/pub/python/src/ \
        ftp://ftp.cwi.nl/pub/python/src/
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DISTNAME=   Imaging-${PORTVERSION}

MAINTAINER= tg@FreeBSD.org

BUILD_DEPENDS=  ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter
LIB_DEPENDS=    jpeg.9:${PORTSDIR}/graphics/jpeg
RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter

DIST_SUBDIR=    python
USE_PYTHON= yes
WRKSRC=     ${WRKDIR}/${DISTNAME}/libImaging
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-jpeg=${PREFIX}/lib
CONFIGURE_ENV=  PYTHON=${PYTHON_CMD}
MAKE_FLAGS= OPT="${CFLAGS}"

PILDIR=     ${PYTHON_SITELIBDIR}/PIL
PILDOCDIR=  ${PREFIX}/share/doc/PIL
PILEXDIR=   ${PREFIX}/share/examples/PIL
PILINCDIR=  ${PREFIX}/include/${PYTHON_VERSION}

post-extract:
    @${CP} ${FILESDIR}/Setup ${WRKSRC}/..

post-configure:
    @(cd ${WRKSRC}/..; ${SETENV} ${CONFIGURE_ENV} ${MAKE} -f Makefile.pre.in boot)

post-build:
    @(cd ${WRKSRC}/..; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} sharedmods)

do-install:
    @(cd ${WRKSRC}/..; ${SETENV} ${MAKE_ENV} ${MAKE} install)
    @${MKDIR} ${PILDIR}
    ${INSTALL_DATA} ${WRKSRC}/../PIL/* ${PILDIR}
    ${INSTALL_DATA} ${WRKSRC}/../PIL.pth ${PILDIR}/..
    @${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${PILDIR}
    @${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${PILDIR}
    @${MKDIR} ${PILDOCDIR}
    ${INSTALL_DATA} ${WRKSRC}/../README ${PILDOCDIR}
    @${MKDIR} ${PILEXDIR}
    ${INSTALL_DATA} ${WRKSRC}/../Scripts/* ${PILEXDIR}
.for file in ImConfig.h ImPlatform.h Imaging.h
    ${INSTALL_DATA} ${WRKSRC}/${file} ${PILINCDIR}
.endfor

.include <bsd.port.mk>