aboutsummaryrefslogtreecommitdiffstats
path: root/converters/py-iconv/Makefile
blob: 354ce37b243abe996d6e70519406106defa35749 (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: Hye-Shik Chang <perky@python.or.kr>
# $FreeBSD$

PORTNAME=   iconv
PORTVERSION=    1.0
PORTREVISION=   1
CATEGORIES= converters python
MASTER_SITES=   ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= perky
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
DIST_SUBDIR=    python

MAINTAINER= ports@FreeBSD.org
COMMENT=    Iconv wrapper with Unicode codec for Python

USES=       iconv
USE_PYTHON= yes
USE_PYDISTUTILS=    yes
PLIST_SUB=  PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S|^${LOCALBASE}/||g}

.if empty(ICONV_LIB)
SETUPINFO=  ,library_dirs=["${LOCALBASE}/lib"],\
        include_dirs=["${LOCALBASE}/include"]
.else
SETUPINFO=  ,libraries=["iconv"],library_dirs=["${LOCALBASE}/lib"],\
        include_dirs=["${LOCALBASE}/include"]
.endif

post-patch:
    cd ${WRKSRC} && ${SED} 's!^\(.*ext_mod.*\)\()]\)$$!\1${SETUPINFO}\2!g'\
        setup.py > setup.py.tmp && ${CAT} setup.py.tmp > setup.py

.include <bsd.port.mk>