source: build-files/ports-overlay/editors/vim/Makefile @ 842ff9c

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 842ff9c was 842ff9c, checked in by Kris Moore <kris@…>, 11 months ago

Update editors/vim to 7.4, see if it fixes build on 10

  • Property mode set to 100644
File size: 9.4 KB
Line 
1# Created by: David O'Brien <obrien@cs.ucdavis.edu>
2# $FreeBSD: editors/vim/Makefile 328318 2013-09-25 21:16:43Z obrien $
3
4PORTNAME?=      vim
5#               ! _NEVER_ reduce or lower PATCHLEVEL, even if the PATCHLEVEL
6#               ! value # is added to BADPATCHES.  Doing otherwise will cause
7#               ! PORTEPOCH to be needed, which we do NOT want.
8#
9#               ! DO NOT increase PATCHLEVEL to a patch listed in BADPATCHES.
10#               ! Doing so is dis-genuine.  It implies we're at a level we are
11#               ! not.  The "PATCHLEVEL" patch needs to apply before bumping
12#               ! PATCHLEVEL to that level.
13PATCHLEVEL=     052
14PORTVERSION=    7.4.${PATCHLEVEL}
15RELEASE=        vim-${PORTVERSION:C/\.[0-9a-z]*$//}
16PORTREVISION?=  0
17CATEGORIES?=    editors
18MASTER_SITES=   ${MASTER_SITE_VIM}
19DISTFILES=      ${RELEASE}${EXTRACT_SUFX}
20
21PATCH_SITES=    ${MASTER_SITES:S|unix|patches/${PORTVERSION:C/\.[0-9a-z]*$//}|}\
22                ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/obrien/:local
23PATCHFILES!=    /usr/bin/jot -s " " -w ${PORTVERSION:C/\.[0-9]*$//}.%03d  \
24                        ${PATCHLEVEL} 1 ${PATCHLEVEL}
25#       bits to remove
26BADPATCHES=     
27.for p in ${BADPATCHES}
28PATCHFILES:=    ${PATCHFILES:N7.3.${p}}
29.endfor
30
31MAINTAINER?=    obrien@FreeBSD.org
32COMMENT?=       Vi "workalike", with many additional features
33
34SLAVEDIRS=      editors/vim-lite
35NO_STAGE=       yes
36
37.if !defined(LITE)
38.if defined(WITH_OPTIONS) || defined(WITH_VIM_OPTIONS)
39.include "${.CURDIR}/../vim/options"
40OPTIONS_DEFAULT+=       CSCOPE EXUBERANT_CTAGS PERL PYTHON RUBY \
41                        TCL LUA X11 GTK2
42.else
43VIM_PORT_SCRIPT_LANGS?= LUA PERL PYTHON RUBY TCL
44VIM_PORT_OPTIONS=       CSCOPE DOCS EXAMPLES EXUBERANT_CTAGS \
45                        ${VIM_PORT_SCRIPT_LANGS}
46PORT_OPTIONS?=  ${VIM_PORT_OPTIONS}
47.endif
48.endif
49
50.include <bsd.port.options.mk>
51
52CONFLICTS=      vim6* vim*-gnome
53.if defined(LITE)
54CONFLICTS+=     vim*
55.else
56CONFLICTS+=     vim*-lite
57.endif
58
59MAKE_JOBS_UNSAFE=       yes
60USE_BZIP2=      yes
61DIST_SUBDIR=    vim
62WRKSRC=         ${WRKDIR}/vim${PORTVERSION:C/\.[0-9]*$//:S/.//g}/src
63PATCH_DIST_ARGS= -d ${WRKSRC:S/src$//} --batch --forward --quiet -E ${PATCH_DIST_STRIP}
64# consider
65#PATCH_DIST_ARGS=       -t
66REINPLACE_ARGS=         -i ""
67MAKE_ARGS+=     CONF_ARGS="--prefix=${PREFIX} --with-tlib=termlib ${CSCOPE_ARG}"
68ALL_TARGET=     #
69_DATADIR=       ${RELEASE:S/-//g:S/.//g}
70DATADIR=        ${PREFIX}/share/vim/${_DATADIR}
71PLIST_SUB=      VIM_VER=${_DATADIR}
72MAN1=           evim.1 vim.1 vimdiff.1 vimtutor.1 xxd.1
73MLINKS=         vim.1 rvim.1    vim.1 rview.1
74.if !defined(LITE)
75MLINKS+=        vim.1 gvim.1    vim.1 gview.1   vimdiff.1 gvimdiff.1 \
76                vim.1 rgvim.1   vim.1 rgview.1  evim.1 eview.1
77.endif
78
79.if ${PORT_OPTIONS:MNLS}
80MANLANG=        "" ru.KOI8-R ru.UTF-8 pl.ISO8859-2 pl.UTF-8 pl fr.ISO8859-1 \
81                fr.UTF-8 fr it.ISO8859-1 it.UTF-8 it
82USES+=          gettext
83PLIST_SUB+=     NLS=""
84.else
85MAKE_ARGS+=     CONF_OPT_NLS="--disable-nls"
86PLIST_SUB+=     NLS="@comment "
87.endif
88
89.if ${PORT_OPTIONS:MPYTHON}
90USE_PYTHON=     yes
91MAKE_ARGS+=     CONF_OPT_PYTHON="--enable-pythoninterp"
92.endif
93
94.if ${PORT_OPTIONS:MRUBY}
95USE_RUBY=       yes
96MAKE_ARGS+=     CONF_OPT_RUBY="--enable-rubyinterp"
97.endif
98
99.if ${PORT_OPTIONS:MTCL}
100USE_TCL=        85+
101MAKE_ARGS+=     CONF_OPT_TCL="--enable-tclinterp --with-tclsh="${TCLSH:S/${LOCALBASE}\/bin\///g}""
102.endif
103
104.if ${PORT_OPTIONS:MLUA}
105USE_LUA=        yes
106MAKE_ARGS+=     CONF_OPT_LUA="--enable-luainterp=dynamic"
107MAKE_ARGS+=     CONF_OPT_LUA_PREFIX="--with-lua-prefix=${LOCALBASE}"
108.endif
109
110.if ${PORT_OPTIONS:MPERL}
111USES=   perl5
112MAKE_ARGS+=     CONF_OPT_PERL="--enable-perlinterp"
113.endif
114
115WANT_GNOME=     yes
116
117.if defined(LITE)
118PKGNAMESUFFIX=  -lite
119CONF_OPT_GUI="--enable-gui=no --without-x --enable-multibyte"
120MAKE_ARGS+=     CONF_OPT_PERL="--disable-perlinterp --disable-pythoninterp --disable-tclinterp --disable-rubyinterp --disable-luainterp"
121.else   # !LITE
122MAKE_ARGS+=     CONF_OPT_FEAT="--with-features=big"
123I18N=           CONF_OPT_MULTIBYTE="--enable-multibyte --enable-fontset --enable-xim"
124CONF_OPT_GUI="--enable-gui=no --without-x"
125.endif
126
127.if ${PORT_OPTIONS:MCSCOPE}
128RUN_DEPENDS+=   cscope:${PORTSDIR}/devel/cscope
129MAKE_ARGS+=     CONF_OPT_CSCOPE="--enable-cscope"
130.endif
131
132.if ${PORT_OPTIONS:MEXUBERANT_CTAGS}
133RUN_DEPENDS+=   exctags:${PORTSDIR}/devel/ctags
134CTAGS_CMD=      exctags -R .
135.else
136CTAGS_CMD=      ${FIND} . -type f \\|${XARGS} ctags
137.endif
138
139.if ${PORT_OPTIONS:MX11}
140CONF_OPT_GUI="--enable-gui=no --with-x"
141
142. if ${PORT_OPTIONS:MATHENA}
143CONF_OPT_GUI="--enable-gui=athena"
144USE_XORG+=      xaw
145. endif
146
147. if ${PORT_OPTIONS:MGTK2}
148USE_GNOME=      gtk20
149CONF_OPT_GUI="--enable-gui=gtk2 --with-gtk-prefix=${LOCALBASE}"
150MAKE_ARGS+=     X_LIBS="$(X_LIBS) -lXt"
151USE_XORG+=      xt
152. endif
153
154. if ${PORT_OPTIONS:MGNOME}
155USE_GNOME=      libgnomeui
156PKGNAMESUFFIX=  -gnome2
157CONF_OPT_GUI="--enable-gui=gnome2"
158MAKE_ARGS+=     X_LIBS="$(X_LIBS) -lXt"
159USE_XORG+=      xt glproto
160. endif
161
162. if ${PORT_OPTIONS:MMOTIF}
163USES+=          motif
164CONF_OPT_GUI="--enable-gui=motif --with-motif-lib=\"${MOTIFLIB}\""
165MAKE_ARGS+=     MOTIFHOME=${LOCALBASE}
166. endif
167
168.endif
169MAKE_ARGS+=     CONF_OPT_GUI=${CONF_OPT_GUI} ${I18N}
170
171
172.if exists(${LOCALBASE}/lib/libiconv.so)
173USES+=  iconv
174.endif
175
176
177post-patch:
178        @(${FIND} ${WRKSRC}/../runtime/ -name menu\*.vim -print0 | ${XARGS} -0 \
179                ${REINPLACE_CMD} -e 's,ctags -R \.,${CTAGS_CMD},g')
180.if !defined(STRIP) || ${STRIP} == ""
181        ${REINPLACE_CMD} '/$$(STRIP)/d' ${WRKSRC}/Makefile
182.endif
183
184pre-configure:
185        @${CP} -pv ${WRKSRC}/config.mk.dist ${WRKSRC}/auto/config.mk
186        @(cd ${WRKSRC} ; ${MAKE} distclean)
187        @${REINPLACE_CMD} -e ' \
188                s|\$$gtk_config_prefix/bin/gtk-config|\$${GTK_CONFIG}|g; \
189                s|\$$gtk_config_exec_prefix/bin/gtk-config|\$${GTK_CONFIG}|g; \
190                s|/usr/local|${LOCALBASE}|g; \
191                s|set dummy lua;|set dummy lua-${LUA_VER};|g' \
192                ${WRKSRC}/auto/configure
193.if ${PORT_OPTIONS:MXTERM_SAVE}
194        @${REINPLACE_CMD} -e ' \
195                s|/\* #define FEAT_XTERM_SAVE \*/|#define FEAT_XTERM_SAVE|g' \
196                ${WRKSRC}/feature.h
197.endif
198
199post-configure:
200        @(cd ${WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} scratch config)
201        ${REINPLACE_CMD} -e 's@#define HAVE_SYSINFO 1@/* #undef HAVE_SYSINFO */@' ${WRKSRC}/auto/config.h
202
203#       Clean up junk files to keep them from being installed.
204pre-install:
205        @${FIND} ${WRKSRC:H} -type f -name '*.orig' -delete
206
207post-install:
208        [ -e ${PREFIX}/bin/gvim ] || (cd ${PREFIX}/bin ; ${LN} -sf vim gvim)
209        #       below needed for `vim-lite' port
210        ${TEST} -e ${PREFIX}/bin/rgvim  || (cd ${PREFIX}/bin ; ${LN} -sf vim rgvim)
211        ${TEST} -e ${PREFIX}/bin/gview  || (cd ${PREFIX}/bin ; ${LN} -sf vim gview)
212        ${TEST} -e ${PREFIX}/bin/rgview || (cd ${PREFIX}/bin ; ${LN} -sf vim rgview)
213        ${TEST} -e ${PREFIX}/bin/evim   || (cd ${PREFIX}/bin ; ${LN} -sf vim evim)
214        ${TEST} -e ${PREFIX}/bin/eview  || (cd ${PREFIX}/bin ; ${LN} -sf vim eview)
215        ${TEST} -e ${PREFIX}/bin/gvimdiff  \
216                || (cd ${PREFIX}/bin ; ${LN} -sf vim gvimdiff)
217        ${TEST} -e ${PREFIX}/bin/gvimtutor  \
218                || (cd ${PREFIX}/bin ; ${LN} -sf vimtutor gvimtutor)
219        ${INSTALL_DATA} ${FILESDIR}/vietnamese_viscii.vim ${DATADIR}/keymap
220        cd ${PREFIX} ;                                          \
221            ${FIND} share/vim/${_DATADIR} -type f -o -type l    \
222                | ${SORT}                                       \
223                >${WRKDIR}/PLIST.share-vim
224        cd ${PREFIX} ;                                          \
225            ${FIND} share/vim/${_DATADIR} -type d               \
226                | ${SORT} -r | ${SED} -e 's/^/@dirrm /g'        \
227                >>${WRKDIR}/PLIST.share-vim
228        ${ECHO_CMD} "r ${TMPPLIST}"                     > ${WRKDIR}/ex.script
229        ${ECHO_CMD} "/Insert PLIST.share-vim"           >> ${WRKDIR}/ex.script
230        ${ECHO_CMD} "d"                                 >> ${WRKDIR}/ex.script
231        ${ECHO_CMD} "r ${WRKDIR}/PLIST.share-vim"       >> ${WRKDIR}/ex.script
232        ${ECHO_CMD} "x!"                                >> ${WRKDIR}/ex.script
233        ${CP} -p ${TMPPLIST} ${TMPPLIST}.pre-share-vim
234        cd ${WRKDIR} ; ex < ex.script
235
236show-options:
237        @${MAKE} -DWITH_OPTIONS showconfig
238        @${ECHO_CMD} ""
239        @${ECHO_CMD} "Put \"WITH_OPTIONS=yes\" -or- \"WITH_VIM_OPTIONS=yes\""
240        @${ECHO_CMD} "in your /etc/make.conf or /etc/ports.conf file to enable OPTIONS processing.
241
242.if defined(ONT_CHECKSUM)
243checksum:
244.endif
245
246cklatest: .PHONY
247        @${ECHO} -n "Currently at: "
248        @${MAKE} -V PATCHLEVEL
249        -(${SED} -i '' "s/^PATCHLEVEL=.*$$/PATCHLEVEL=  `ncftpls \
250            ftp://ftp.vim.org/pub/vim/patches/${PORTVERSION:C/\.[0-9a-z]*$//}/ \
251                | grep "^${PORTVERSION:C/\.[0-9a-z]*$//}" \
252                | ${SED} -n -E -e 's/${PORTVERSION:C/[0-9]*$//}([0-9]+)$$/\1/p' \
253                | sort -n | ${TAIL} -1`/" Makefile)
254        @${ECHO} -n "Now at: "
255        @${MAKE} -V PATCHLEVEL
256
257find-bad-patches:
258        @cd ${DISTDIR} ; egrep -l \
259                '(src/if_(ole|mzsch)|src/gui_(w32|w48|mac)|src/os_(riscos|cyg|os2|vms|amiga|win32|mswin))|src(/testdir)?/Make_(dos|cyg|vms|mvc|ming|os2|amiga|mms)'\
260                vim/${PORTVERSION:C/\.[0-9a-z]*$//}*
261
262ckp:
263        /usr/bin/time -h ${MAKE} -DPATCH_DEBUG -DONT_CHECKSUM clean patch
264
265ckmtree:
266        ${MTREE_CMD} -f ${MTREE_FILE} -p ${PREFIX}
267
268do-patch:
269        @${ECHO_MSG} "===>  Applying distribution patches for ${PKGNAME} from `pwd`"
270        @set -e ; \
271        (cd ${_DISTDIR} ; \
272        for i  in ${_PATCHFILES}; do \
273                if [ ${PATCH_DEBUG_TMP} = yes ]; then \
274                        ${ECHO_MSG} "===>   Applying distribution patch $$i" ; \
275                fi ; \
276                ${PATCH} ${PATCH_DIST_ARGS} -i ${_DISTDIR}/$$i; \
277        done )
278        @set -e ;\
279        if [ -d ${PATCHDIR} ]; then \
280                if [ "`${ECHO_CMD} ${PATCHDIR}/patch-*`" != "${PATCHDIR}/patch-*" ]; then \
281                        ${ECHO_MSG} "===>  Applying ${OPSYS} patches for ${PKGNAME}" ; \
282                        PATCHES_APPLIED="" ; \
283                        for i in ${PATCHDIR}/patch-*; do \
284                                case $$i in \
285                                        *.orig|*.rej|*~|*,v) \
286                                                ${ECHO_MSG} "===>   Ignoring patchfile $$i" ; \
287                                                ;; \
288                                        *) \
289                                                if [ ${PATCH_DEBUG_TMP} = yes ]; then \
290                                                        ${ECHO_MSG} "===>   Applying ${OPSYS} patch $$i" ; \
291                                                fi; \
292                                                if ${PATCH} ${PATCH_ARGS} < $$i ; then \
293                                                        PATCHES_APPLIED="$$PATCHES_APPLIED $$i" ; \
294                                                else \
295                                                        ${ECHO_MSG} `${ECHO_CMD} "=> Patch $$i failed to apply cleanly." | ${SED} "s|${PATCHDIR}/||"` ; \
296                                                        if [ x"$$PATCHES_APPLIED" != x"" ]; then \
297                                                                ${ECHO_MSG} `${ECHO_CMD} "=> Patch(es) $$PATCHES_APPLIED applied cleanly." | ${SED} "s|${PATCHDIR}/||g"` ; \
298                                                        fi; \
299                                                        ${FALSE} ; \
300                                                fi; \
301                                                ;; \
302                                esac; \
303                        done; \
304                fi; \
305        fi
306
307.include <bsd.port.mk>
Note: See TracBrowser for help on using the repository browser.