2012-12-10 03:37:20 +01:00
|
|
|
# Created by: Mark Pulford <mark@kyne.com.au>
|
2001-04-17 19:50:24 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= mp
|
2018-03-05 17:20:31 +01:00
|
|
|
DISTVERSION= 5.2.13
|
2001-04-17 19:50:24 +02:00
|
|
|
CATEGORIES= editors
|
2012-12-10 03:37:20 +01:00
|
|
|
MASTER_SITES= http://triptico.com/download/mp/
|
2001-04-17 19:50:24 +02:00
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
MAINTAINER= jhale@FreeBSD.org
|
2012-12-10 03:37:20 +01:00
|
|
|
COMMENT= Programming text editor
|
2001-04-17 19:50:24 +02:00
|
|
|
|
2016-01-12 17:20:31 +01:00
|
|
|
LICENSE= GPLv2+
|
2015-10-16 18:51:12 +02:00
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
2011-11-25 17:26:05 +01:00
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
USES= gmake iconv
|
|
|
|
|
2005-11-17 09:05:28 +01:00
|
|
|
HAS_CONFIGURE= yes
|
|
|
|
CONFIGURE_SCRIPT= config.sh
|
2018-03-05 17:20:31 +01:00
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX} --docdir=${DOCSDIR} \
|
|
|
|
--without-win32 --without-kde4
|
|
|
|
CONFIGURE_ENV= LOCALBASE="${LOCALBASE}" \
|
|
|
|
ICONV_LIB="${ICONV_LIB}" \
|
|
|
|
ICONV_PREFIX="${ICONV_PREFIX}" \
|
|
|
|
NCURSESINC="${NCURSESINC}" \
|
|
|
|
NCURSESLIB="${NCURSESLIB}"
|
|
|
|
LDFLAGS+= -Wl,--as-needed
|
2005-11-17 09:05:28 +01:00
|
|
|
|
2011-03-23 18:54:43 +01:00
|
|
|
DATADIR= ${PREFIX}/share/mp-5
|
2005-11-17 09:05:28 +01:00
|
|
|
|
2015-10-16 18:51:12 +02:00
|
|
|
OPTIONS_DEFINE= DOCS NLS PCRE
|
2018-03-05 17:20:31 +01:00
|
|
|
OPTIONS_SINGLE= GUI
|
|
|
|
OPTIONS_SINGLE_GUI= ANSI GTK2 GTK3 NCURSES QT4 QT5
|
|
|
|
OPTIONS_DEFAULT= NCURSES PCRE
|
2015-10-16 18:51:12 +02:00
|
|
|
OPTIONS_SUB= yes
|
2015-09-07 09:00:08 +02:00
|
|
|
|
2015-10-16 18:51:12 +02:00
|
|
|
NLS_USES= gettext
|
2014-01-04 00:42:10 +01:00
|
|
|
NLS_CONFIGURE_WITH= gettext
|
2018-03-05 17:20:31 +01:00
|
|
|
|
2016-04-01 16:00:51 +02:00
|
|
|
PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
|
2014-01-04 00:42:10 +01:00
|
|
|
PCRE_CONFIGURE_WITH= pcre
|
2018-03-05 17:20:31 +01:00
|
|
|
|
|
|
|
ANSI_DESC= ANSI terminal support
|
|
|
|
ANSI_CONFIGURE_WITH= ansi
|
|
|
|
|
|
|
|
GTK2_USE= gnome=cairo,gdkpixbuf2,gtk20
|
|
|
|
GTK2_CONFIGURE_ON= --with-gtk=2
|
|
|
|
|
|
|
|
GTK3_USE= gnome=cairo,gdkpixbuf2,gtk30
|
|
|
|
GTK3_CONFIGURE_ON= --with-gtk=3
|
|
|
|
|
|
|
|
NCURSES_USES= ncurses
|
|
|
|
NCURSES_CONFIGURE_WITH= curses
|
2018-03-14 11:01:31 +01:00
|
|
|
NCURSES_CFLAGS= -I${NCURSESBASE}/include
|
2018-03-05 17:20:31 +01:00
|
|
|
|
2018-03-04 04:12:31 +01:00
|
|
|
QT4_USE= qt4=corelib,gui,moc_build \
|
|
|
|
xorg=x11
|
2014-01-04 00:42:10 +01:00
|
|
|
QT4_CONFIGURE_WITH= qt4
|
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
QT5_USES= compiler:c++11-lang
|
|
|
|
QT5_USE= cxxstd=-std=c++11 \
|
|
|
|
gl=gl \
|
|
|
|
qt5=buildtools_build,core,gui,widgets
|
|
|
|
QT5_CONFIGURE_WITH= qt5
|
|
|
|
|
2014-01-04 00:42:10 +01:00
|
|
|
.include <bsd.port.options.mk>
|
2005-11-17 09:05:28 +01:00
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
.if ${PORT_OPTIONS:MGTK*} || ${PORT_OPTIONS:MQT*}
|
2015-10-16 18:51:12 +02:00
|
|
|
USES+= pkgconfig
|
|
|
|
PLIST_SUB+= GUI=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= GUI="@comment "
|
|
|
|
.endif
|
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
.if ${PORT_OPTIONS:MGTK*}
|
|
|
|
DESKTOP_ENTRIES="Minimum Profit" "" "mp" "mp-5" "Utility;TextEditor;GTK;" ""
|
2015-10-16 18:51:12 +02:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --without-gtk
|
2013-03-25 07:06:56 +01:00
|
|
|
.endif
|
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
.if ${PORT_OPTIONS:MQT*}
|
|
|
|
DESKTOP_ENTRIES="Minimum Profit" "" "mp" "mp-5" "Utility;TextEditor;Qt;" ""
|
|
|
|
CONFIGURE_ARGS+=--with-moc=${MOC}
|
|
|
|
CONFIGURE_ENV+= CCLINK="${CXX}"
|
2011-03-23 18:54:43 +01:00
|
|
|
QT_NONSTANDARD= yes
|
2005-11-17 09:05:28 +01:00
|
|
|
.endif
|
|
|
|
|
2011-03-23 18:54:43 +01:00
|
|
|
post-patch:
|
2018-03-04 04:12:31 +01:00
|
|
|
.for i in mpdm/mpdm.h mpsl/mpsl_d.c
|
2014-01-04 00:42:10 +01:00
|
|
|
@${REINPLACE_CMD} -e \
|
|
|
|
's|<malloc\.h>|<stdlib.h>|g' ${WRKSRC}/${i}
|
2011-11-25 17:26:05 +01:00
|
|
|
.endfor
|
2011-03-23 18:54:43 +01:00
|
|
|
|
2018-03-05 17:20:31 +01:00
|
|
|
do-configure:
|
|
|
|
@(for CONFIGURE_WRKSRC in ${WRKSRC}/mpdm ${WRKSRC}/mpsl ${WRKSRC}; \
|
|
|
|
do \
|
|
|
|
cd $${CONFIGURE_WRKSRC} && \
|
|
|
|
${SETENV} CC="${CC}" CPP="${CXX}" \
|
|
|
|
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
|
|
|
LDFLAGS="${LDFLAGS}" LIBS="${LIBS}" \
|
|
|
|
${CONFIGURE_ENV} ${CONFIGURE_CMD} ${CONFIGURE_ARGS}; \
|
|
|
|
done;)
|
2011-03-23 18:54:43 +01:00
|
|
|
do-install:
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mp-5 ${STAGEDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mpsl/mpsl ${STAGEDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/mp-5.1 ${STAGEDIR}${MANPREFIX}/man/man1
|
2014-01-04 00:42:10 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/mp_*.mpsl ${STAGEDIR}${DATADIR}
|
2014-01-04 00:42:10 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DATADIR}/lang
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/lang/*.mpsl ${STAGEDIR}${DATADIR}/lang
|
2018-03-05 17:20:31 +01:00
|
|
|
.if ${PORT_OPTIONS:MGTK*} || ${PORT_OPTIONS:MQT*}
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/mp.png ${STAGEDIR}${PREFIX}/share/pixmaps
|
2015-10-16 18:51:12 +02:00
|
|
|
.endif
|
2017-03-12 10:01:53 +01:00
|
|
|
|
|
|
|
do-install-NLS-on:
|
2011-03-23 18:54:43 +01:00
|
|
|
.for lang in de es it nl ru sv
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/po/${lang}.mo \
|
|
|
|
${STAGEDIR}${PREFIX}/share/locale/${lang}/LC_MESSAGES/minimum-profit.mo
|
2011-03-23 18:54:43 +01:00
|
|
|
.endfor
|
2017-03-12 10:01:53 +01:00
|
|
|
|
|
|
|
do-install-DOCS-on:
|
2014-01-04 00:42:10 +01:00
|
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
2013-03-25 07:06:56 +01:00
|
|
|
.for doc in AUTHORS README RELEASE_NOTES mp_templates.sample doc/*.*
|
2017-03-12 10:01:53 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR}
|
2011-03-23 18:54:43 +01:00
|
|
|
.endfor
|
2001-04-17 19:50:24 +02:00
|
|
|
|
2015-09-07 09:00:08 +02:00
|
|
|
.include <bsd.port.mk>
|