blob: b8208663a8ef67057d0fd0d264b9d5f20c45fa94 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Created by: John Marino <marino@FreeBSD.org>
# $FreeBSD$
PORTNAME= gps
PORTVERSION= 5.2.1
CATEGORIES= devel
MASTER_SITES= http://downloads.dragonlace.net/src/
DISTNAME= gps-5.2.1-1-src
PKGNAMESUFFIX= -ide
EXTRACT_SUFX= .tgz
MAINTAINER= marino@FreeBSD.org
COMMENT= GNAT Programming Studio - IDE for Ada and many other languages
BUILD_DEPENDS= gtkada>=2.24:${PORTSDIR}/x11-toolkits/gtkada \
xmlada>=3.2:${PORTSDIR}/textproc/xmlada \
gprbuild>=20120510:${PORTSDIR}/devel/gprbuild \
sphinx-build:${PORTSDIR}/textproc/py-sphinx
LIB_DEPENDS= gmp:${PORTSDIR}/math/gmp
GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_PERL5= build
ALL_TARGET= default
USES= ada gmake perl5 pkgconfig
WRKSRC= ${WRKDIR}/gps-release-ide-${PORTVERSION}-src
CONFIGURE_ENV+= AWK=/usr/bin/awk
DESTINY= ${WRKDIR}/destino
MAKE_ENV+= DESTDIR=${DESTINY} \
PROCESSORS=${MAKE_JOBS_NUMBER}
OPTIONS_DEFINE= SYSLOG SQLITE PGSQL PYTHON READLINE
OPTIONS_DEFAULT= SYSLOG SQLITE PYTHON READLINE
PYTHON_DESC= Enable Python console
.include <bsd.port.options.mk>
.if ${OPSYS} == FreeBSD
CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:L}${OSREL}
.endif
CONFIGURE_ARGS+= --disable-shared --with-gmp=${PREFIX}
################
## READLINE ##
################
.if ${PORT_OPTIONS:MREADLINE}
USES+= readline
CONFIGURE_ARGS+= --enable-gpl
.else
CONFIGURE_ARGS+= --disable-readline
.endif
##############
## SYSLOG ##
##############
.if !${PORT_OPTIONS:MSYSLOG}
CONFIGURE_ARGS+= --disable-syslog
.endif
##############
## SQLITE ##
##############
.if ${PORT_OPTIONS:MSQLITE}
CONFIGURE_ARGS+= --with-sqlite=embedded
.else
CONFIGURE_ARGS+= --without-sqlite
.endif
##################
## POSTGRESQL ##
##################
.if ${PORT_OPTIONS:MPGSQL}
CONFIGURE_ARGS+= --with-postgresql=${PREFIX}
USE_PGSQL= true
.endif
#####################
## PYTHON / PYGTK ##
#####################
.if ${PORT_OPTIONS:MPYTHON}
CONFIGURE_ARGS+= --with-python=${PREFIX}
USE_PYTHON= -2.7
USE_GNOME= pygtk2
PYCOMPILE= ${PREFIX}/lib/${PYTHON_VERSION}/compileall.py
.else
CONFIGURE_ARGS+= --without-python \
--disable-pygtk \
--disable-pygobject
.endif
post-patch:
@${REINPLACE_CMD} -e "s|@PREFIX@|${PREFIX}|g" \
${WRKSRC}/gnatlib/src/gnatcoll_readline.gpr.in
do-build:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} default
pre-install:
.if ${PORT_OPTIONS:MPYTHON}
${PYTHON_CMD} ${PYCOMPILE} ${WRKSRC}/share/plug-ins
${PYTHON_CMD} ${PYCOMPILE} ${WRKSRC}/share/library
.endif
post-install:
${RM} -rf ${DESTINY}${PREFIX}/share/doc/gps/html/users_guide/_sources
${RM} -rf ${DESTINY}${PREFIX}/share/doc/gps/html/tutorial/_sources
cd ${DESTINY}${PREFIX}; ${FIND} * -type d -empty -print | ${XARGS} ${RMDIR}
${CP} -pR ${DESTINY}${PREFIX}/ ${PREFIX}/
@cd ${DESTINY}${PREFIX}; ${FIND} * \( -type f -or -type l \) | \
${SORT} > ${WRKDIR}/PLIST.all
@cd ${DESTINY}${PREFIX}; ${FIND} * -type d | ${AWK} '/\//' | ${SORT} -r | \
${SED} -e '/share\/doc$$/d' -e '/share\/gps$$/d' \
-e '/share\/gps\/plug-ins$$/d' -e '/share\/examples$$/d' \
-e 's/^/@dirrm /g' >> ${WRKDIR}/PLIST.all
@echo "@unexec rmdir %D/share/gps/plug-ins 2>/dev/null || true" >> ${WRKDIR}/PLIST.all
@echo "@unexec rmdir %D/share/gps 2>/dev/null || true" >> ${WRKDIR}/PLIST.all
@echo "@unexec rmdir %D/share/examples 2>/dev/null || true" >> ${WRKDIR}/PLIST.all
@echo "@unexec rmdir %D/share/doc 2>/dev/null || true" >> ${WRKDIR}/PLIST.all
@${CAT} ${WRKDIR}/PLIST.all >> ${TMPPLIST}
.include <bsd.port.mk>
|