summaryrefslogtreecommitdiff
path: root/devel/pypersrc/Makefile
blob: f9e728fc06510ed842ad85a43c5d26d8d5363529 (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
# Created by: Joseph Koshy <jkoshy@FreeBSD.org>
# $FreeBSD$

PORTNAME=	pypersrc
PORTVERSION=	20120106
PORTREVISION=	2
CATEGORIES=	devel
MASTER_SITES=	http://www.jimbrooks.org/software/pypersrc/
DISTNAME=	${PORTNAME}_${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Python/Tkinter based source browser

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE_GPL2.txt

BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}Pmw>0:x11-toolkits/py-Pmw
RUN_DEPENDS:=	${BUILD_DEPENDS}

WRKSRC=		${WRKDIR}/${PORTNAME}

USES=		gmake python:2 tar:bzip2
HAS_CONFIGURE=	yes
CONFIGURE_SCRIPT=	configure.sh
MAKE_ENV=	CXX_FLAGS="${CXXFLAGS}"

PLIST_FILES=	bin/pypersrc.py bin/pypersrc2.py bin/pypersrc

post-patch:
	${REINPLACE_CMD} -e \
		'/INSTALL_DIR/s|=.*|=$$(PREFIX)/bin| ; \
		 /MAN_DIR/s|\/usr\/local|$$(PREFIX)| ; \
		 s|^PYTHON\(.*\)= python|PYTHON\1= ${PYTHON_CMD}| ; \
		 /-O2/s|^|#|' ${WRKSRC}/GNUmakefile
	${REINPLACE_CMD} -e 's|/bin/bash|${SH}|g ; \
		s|python |${PYTHON_CMD} |' ${WRKSRC}/configure.sh
	${REINPLACE_CMD} -e 's|g++|${CXX}|g' ${WRKSRC}/tests/GNUmakefile
	@${REINPLACE_CMD} -e 's|tolower|::tolower|' ${WRKSRC}/src/cc/utils_string.hh

post-configure:
	@(cd ${WRKSRC}/src/ctags-5.5.4 && ${SETENV} CC="${CC}" CPP="${CPP}" \
		CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
		${CONFIGURE_ENV} ./configure)

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/out/pypersrc ${STAGEDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/out/pypersrc.py ${STAGEDIR}${PREFIX}/bin
	${INSTALL_SCRIPT} ${WRKSRC}/out/pypersrc2.py ${STAGEDIR}${PREFIX}/bin

.include <bsd.port.mk>