Merge from vendor branch TNF:
[pkgsrcv2.git] / editors / TeXmacs-devel / Makefile
1 # $NetBSD: Makefile,v 1.9 2012/03/03 00:13:01 wiz Exp $
2
3 DISTNAME=               TeXmacs-1.0.7.14-src
4 PKGNAME=                ${DISTNAME:S/-src//}
5 PKGREVISION=            4
6 CATEGORIES=             editors
7 MASTER_SITES=           ftp://ftp.texmacs.org/TeXmacs/tmftp/source/
8
9 MAINTAINER=             pkgsrc-users@NetBSD.org
10 HOMEPAGE=               http://www.texmacs.org/
11 COMMENT=                GNU TeXmacs (free scientific text editor)
12
13 PKG_DESTDIR_SUPPORT=    user-destdir
14
15 BUILD_TARGET=           TEXMACS
16
17 USE_TOOLS+=             gmake
18 USE_LANGUAGES=          c c++
19 GNU_CONFIGURE=          yes
20 # XXX workaround for bug in configure
21 CONFIGURE_ARGS+=        --datadir=${PREFIX}/share
22 CONFIGURE_ARGS+=        --with-qt=${QTDIR}/bin
23 MAKE_ENV+=              QT_QTDIR=${QTDIR}
24 TEX_ACCEPTED=           teTeX3
25
26 PYTHON_PATCH_SCRIPTS=   plugins/python/bin/tm_python
27 PYTHON_PATCH_SCRIPTS+=  plugins/mathematica/bin/realpath.py
28 PYTHON_PATCH_SCRIPTS+=  plugins/sage/bin/tm_sage
29
30 SUBST_CLASSES+=         init
31 SUBST_STAGE.init=       post-patch
32 SUBST_FILES.init=       plugins/python/progs/init-python.scm
33 SUBST_SED.init=         -e 's,@PYTHONBIN@,${PYTHONBIN},g'
34
35 REPLACE_SH+=            plugins/asymptote/bin/tm_asy
36 REPLACE_SH+=            plugins/dratex/bin/tm_dratex
37 REPLACE_SH+=            plugins/eukleides/bin/tm_eukleides
38 REPLACE_SH+=            plugins/gnuplot/bin/tm_gnuplot
39 REPLACE_SH+=            plugins/lisp/bin/tm_lisp
40 REPLACE_SH+=            plugins/lush/bin/tm_lush
41 REPLACE_SH+=            plugins/matlab/bin/tm_matlab
42 REPLACE_SH+=            plugins/maxima/bin/maxima_detect
43 REPLACE_SH+=            plugins/maxima/bin/tm_maxima
44 REPLACE_SH+=            plugins/mupad/bin/tm_mupad_help
45 REPLACE_SH+=            plugins/octave/bin/tm_octave
46 REPLACE_SH+=            plugins/reduce/bin/tm_reduce
47 REPLACE_SH+=            plugins/texgraph/bin/tm_texgraph
48 REPLACE_SH+=            plugins/xypic/bin/tm_xypic
49
50 REPLACE_PERL+=          plugins/asymptote/bin/perl-tm_asy
51 REPLACE_PERL+=          plugins/asymptote/bin/tm_asy2
52
53 pre-install:
54         ${RM} -f ${WRKSRC}/TeXmacs/doc/devel/format/.log
55         ${FIND} ${WRKSRC}/plugins/ -name '*.orig' | ${XARGS} ${RM} -f
56
57 # just a helper script, not worth a full perl dependency
58 CHECK_INTERPRETER_SKIP= libexec/TeXmacs/bin/bbox_add.pl
59 # but be friendly and set the path to something reasonable
60 REPLACE_INTERPRETER+=           optionalperl
61 REPLACE.optionalperl.old=       .*perl[^[:space:]]*
62 REPLACE.optionalperl.new=       ${LOCALBASE}/bin/perl
63 REPLACE_FILES.optionalperl=     plugins/feynmf/bin/bbox_add.pl
64
65 BUILDLINK_DEPMETHOD.libXt?=     build
66
67 .include "../../converters/libiconv/buildlink3.mk"
68 .include "../../graphics/freetype2/buildlink3.mk"
69 .include "../../lang/guile/buildlink3.mk"
70 .include "../../lang/python/application.mk"
71 .include "../../mk/tex.buildlink3.mk"
72 .include "../../x11/qt4-libs/buildlink3.mk"
73 .include "../../x11/qt4-tools/buildlink3.mk"
74 .include "../../x11/libX11/buildlink3.mk"
75 .include "../../x11/libXext/buildlink3.mk"
76 .include "../../x11/libXt/buildlink3.mk"
77 .include "../../mk/bsd.pkg.mk"