Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2018 16:20:31 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r463650 - in head/editors/mp: . files
Message-ID:  <201803051620.w25GKV1c054230@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Mon Mar  5 16:20:31 2018
New Revision: 463650
URL: https://svnweb.freebsd.org/changeset/ports/463650

Log:
  Update to 5.2.13
  
  Take maintainership
  
  ANSI and QT5 interfaces added
  
  Use OPTIONS_SINGLE to make it more clear that only one interface can be
  selected at a time.
  
  Port uses three configure scripts, but only the main one was receiving
  CONFIGURE_ENV, so home-brew a do-configure target.
  
  Use CONFIGURE_ENV to pass variables instead of substitutions.

Added:
  head/editors/mp/files/patch-makefile.in   (contents, props changed)
  head/editors/mp/files/patch-mpdm_config.sh
     - copied, changed from r463649, head/editors/mp/files/patch-mpdn__config.sh
Deleted:
  head/editors/mp/files/patch-mpdn__config.sh
Modified:
  head/editors/mp/Makefile
  head/editors/mp/distinfo
  head/editors/mp/files/patch-config.sh
  head/editors/mp/files/patch-mpdm_mpdm__s.c

Modified: head/editors/mp/Makefile
==============================================================================
--- head/editors/mp/Makefile	Mon Mar  5 15:10:16 2018	(r463649)
+++ head/editors/mp/Makefile	Mon Mar  5 16:20:31 2018	(r463650)
@@ -2,88 +2,102 @@
 # $FreeBSD$
 
 PORTNAME=	mp
-DISTVERSION=	5.2.11
+DISTVERSION=	5.2.13
 CATEGORIES=	editors
 MASTER_SITES=	http://triptico.com/download/mp/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	jhale@FreeBSD.org
 COMMENT=	Programming text editor
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		gmake iconv ncurses
+USES=		gmake iconv
+
 HAS_CONFIGURE=	yes
 CONFIGURE_SCRIPT=	config.sh
-CONFIGURE_ARGS=	--prefix=${PREFIX} --without-win32 --without-kde4
+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
 
 DATADIR=	${PREFIX}/share/mp-5
 
 OPTIONS_DEFINE=		DOCS NLS PCRE
-OPTIONS_RADIO=		GUI
-OPTIONS_RADIO_GUI=	GTK2 GTK3 QT4
-OPTIONS_DEFAULT=	PCRE
+OPTIONS_SINGLE=		GUI
+OPTIONS_SINGLE_GUI=	ANSI GTK2 GTK3 NCURSES QT4 QT5
+OPTIONS_DEFAULT=	NCURSES PCRE
 OPTIONS_SUB=		yes
 
 NLS_USES=		gettext
 NLS_CONFIGURE_WITH=	gettext
-GTK2_USE=		gnome=cairo,gdkpixbuf2,gtk20
-GTK2_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
-			libfreetype.so:print/freetype2
-GTK3_USE=		gnome=cairo,gdkpixbuf2,gtk30
+
 PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
 PCRE_CONFIGURE_WITH=	pcre
+
+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
+
 QT4_USE=		qt4=corelib,gui,moc_build \
 			xorg=x11
-QT4_CONFIGURE_ENV=	CPP="${CXX}" CCLINK="${CXX}" MOC="${MOC}"
 QT4_CONFIGURE_WITH=	qt4
 
+QT5_USES=		compiler:c++11-lang
+QT5_USE=		cxxstd=-std=c++11 \
+			gl=gl \
+			qt5=buildtools_build,core,gui,widgets
+QT5_CONFIGURE_WITH=	qt5
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3} || ${PORT_OPTIONS:MQT4}
+.if ${PORT_OPTIONS:MGTK*} || ${PORT_OPTIONS:MQT*}
 USES+=		pkgconfig
 PLIST_SUB+=	GUI=""
 .else
 PLIST_SUB+=	GUI="@comment "
 .endif
 
-.if ${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3}
-DESKTOP_ENTRIES="Minimum Profit" "" "mp-5" "mp" "Develpment;TextEditor;GTK;" ""
+.if ${PORT_OPTIONS:MGTK*}
+DESKTOP_ENTRIES="Minimum Profit" "" "mp" "mp-5" "Utility;TextEditor;GTK;" ""
 .else
 CONFIGURE_ARGS+=	--without-gtk
-CONFOPT_GTK=	0
 .endif
 
-.if ${PORT_OPTIONS:MGTK2}
-CONFOPT_GTK=	2
-.endif
-
-.if ${PORT_OPTIONS:MGTK3}
-CONFOPT_GTK=	3
-.endif
-
-.if ${PORT_OPTIONS:MQT4}
-DESKTOP_ENTRIES="Minimum Profit" "" "mp-5" "mp" "Development;TextEditor;Qt;" ""
+.if ${PORT_OPTIONS:MQT*}
+DESKTOP_ENTRIES="Minimum Profit" "" "mp" "mp-5" "Utility;TextEditor;Qt;" ""
+CONFIGURE_ARGS+=--with-moc=${MOC}
+CONFIGURE_ENV+=	CCLINK="${CXX}"
 QT_NONSTANDARD=	yes
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e \
-		's|-I/usr/local/include|| ; \
-		 s|-L/usr/local/lib|| ; \
-		 s|-lncursesw|${LDFLAGS} -lncursesw| ; \
-		 /gtk+/s|3.0|${CONFOPT_GTK}.0| ; \
-		 /OK/s|3.0|${CONFOPT_GTK}.0| ; \
-		 /CONFOPT_GTK/s|3|${CONFOPT_GTK}|' ${WRKSRC}/config.sh
-	@${REINPLACE_CMD} -e \
-		's|%%LOCALBASE%%|${LOCALBASE}| ; \
-		 s|%%ICONV_PREFIX%%|${ICONV_PREFIX}| ; \
-		 s|%%ICONV_LIB%%|${ICONV_LIB}|g' ${WRKSRC}/mpdm/config.sh
 .for i in mpdm/mpdm.h mpsl/mpsl_d.c
 	@${REINPLACE_CMD} -e \
 		's|<malloc\.h>|<stdlib.h>|g' ${WRKSRC}/${i}
 .endfor
 
+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;)
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/mp-5 ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/mpsl/mpsl ${STAGEDIR}${PREFIX}/bin
@@ -92,7 +106,7 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/mp_*.mpsl ${STAGEDIR}${DATADIR}
 	@${MKDIR} ${STAGEDIR}${DATADIR}/lang
 	${INSTALL_DATA} ${WRKSRC}/lang/*.mpsl ${STAGEDIR}${DATADIR}/lang
-.if ${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3} || ${PORT_OPTIONS:MQT4}
+.if ${PORT_OPTIONS:MGTK*} || ${PORT_OPTIONS:MQT*}
 	${INSTALL_DATA} ${WRKSRC}/mp.png ${STAGEDIR}${PREFIX}/share/pixmaps
 .endif
 

Modified: head/editors/mp/distinfo
==============================================================================
--- head/editors/mp/distinfo	Mon Mar  5 15:10:16 2018	(r463649)
+++ head/editors/mp/distinfo	Mon Mar  5 16:20:31 2018	(r463650)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1518412913
-SHA256 (mp-5.2.11.tar.gz) = 7108ac2cc8b475a53246c12f4c2ec170e8af49a9358128a6be6015f44e979f79
-SIZE (mp-5.2.11.tar.gz) = 509994
+TIMESTAMP = 1520166330
+SHA256 (mp-5.2.13.tar.gz) = be1c486657105a6cdb0b2fc4c1efdee93f1f63aeec42ab6b1c0d97ba7a891c58
+SIZE (mp-5.2.13.tar.gz) = 512269

Modified: head/editors/mp/files/patch-config.sh
==============================================================================
--- head/editors/mp/files/patch-config.sh	Mon Mar  5 15:10:16 2018	(r463649)
+++ head/editors/mp/files/patch-config.sh	Mon Mar  5 16:20:31 2018	(r463650)
@@ -1,18 +1,113 @@
---- config.sh.orig	2018-03-04 01:48:31 UTC
+--- config.sh.orig	2018-02-19 15:16:29 UTC
 +++ config.sh
-@@ -101,7 +101,7 @@ if [ "$CPP" = "" ] ; then
-     which g++ > /dev/null 2>&1 && CPP=g++
- fi
+@@ -28,9 +28,11 @@ while [ $# -gt 0 ] ; do
+     case $1 in
+     --without-curses)   WITHOUT_CURSES=1 ;;
+     --without-gtk)      WITHOUT_GTK=1 ;;
++    --with-gtk=*)       GTKVER=`echo $1 | sed -e 's/--with-gtk=//'` ;;
+     --without-win32)    WITHOUT_WIN32=1 ;;
+     --with-kde4)        WITHOUT_KDE4=0 ;;
+     --without-qt4)      WITHOUT_QT4=1 ;;
++    --without-qt5)      WITHOUT_QT5=1 ;;
+     --without-ansi)     WITHOUT_ANSI=1 ;;
+     --help)             CONFIG_HELP=1 ;;
  
--MOC="moc"
-+MOC?="moc"
- which moc-qt4 > /dev/null 2>&1 && MOC=moc-qt4
+@@ -59,9 +61,11 @@ if [ "$CONFIG_HELP" = "1" ] ; then
+     echo "--prefix=PREFIX       Installation prefix ($PREFIX)."
+     echo "--without-curses      Disable curses (text) interface detection."
+     echo "--without-gtk         Disable GTK interface detection."
++    echo "--with-gtk=GTKVER     Enable GTK where GTKVER=(2|3)."
+     echo "--without-win32       Disable win32 interface detection."
+     echo "--with-kde4           Enable KDE4 interface detection."
+     echo "--without-qt4         Disable Qt4 interface detection."
++    echo "--without-qt5         Disable Qt5 interface detection."
+     echo "--with-moc            Path to your QT4 moc. Ie: --with-moc=/usr/lib64/qt4/bin/moc"
+     echo "--without-ansi        Disable ANSI terminal interface detection."
+     echo "--without-unix-glob   Disable glob.h usage (use workaround)."
+@@ -223,36 +227,11 @@ echo -n "Testing for ncursesw... "
+ if [ "$WITHOUT_CURSES" = "1" ] ; then
+     echo "Disabled"
+ else
+-    echo "#include <ncursesw/ncurses.h>" > .tmp.c
+-    echo "int main(void) { initscr(); endwin(); return 0; }" >> .tmp.c
+-
+-    TMP_CFLAGS="-I/usr/local/include -I/usr/include/ncurses -I/usr/include/ncursesw"
+-    TMP_LDFLAGS="-L/usr/local/lib -lncursesw"
+-
+-    $CC $TMP_CFLAGS .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
+-    if [ $? = 0 ] ; then
+-        echo "#define CONFOPT_CURSES 1" >> config.h
+-        echo $TMP_CFLAGS >> config.cflags
+-        echo $TMP_LDFLAGS >> config.ldflags
+-        echo "OK (ncursesw)"
+-        DRIVERS="ncursesw $DRIVERS"
+-        DRV_OBJS="mpv_curses.o $DRV_OBJS"
+-        WITHOUT_ANSI=1
+-    else
+-        echo "No"
+-        WITHOUT_CURSES=1
+-    fi
+-fi
+-
+-if [ "$WITHOUT_CURSES" = "1" ] ; then
+-    # test for curses / ncurses library
+-    echo -n "Testing for recent ncurses... "
+-
+     echo "#include <ncurses.h>" > .tmp.c
+     echo "int main(void) { initscr(); endwin(); return 0; }" >> .tmp.c
  
- echo "CC=$CC" >> makefile.opts
-@@ -364,8 +364,8 @@ if [ "$WITHOUT_QT4" = "1" ] ; then
+-    TMP_CFLAGS="-I/usr/local/include"
+-    TMP_LDFLAGS="-L/usr/local/lib -lncursesw"
++    TMP_CFLAGS="-I${NCURSESINC}"
++    TMP_LDFLAGS="${LDFLAGS} -L${NCURSESLIB} -lncursesw"
+ 
+     $CC $TMP_CFLAGS .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
+     if [ $? = 0 ] ; then
+@@ -384,19 +363,22 @@ if [ "$WITHOUT_QT5" = "1" ] ; then
  else
      if which pkg-config > /dev/null 2>&1
      then
+-        if which moc-qt5 > /dev/null 2>&1
+-        then
+-            MOC=moc-qt5
+-            echo "MOC=$MOC" >> makefile.opts
++	if [ ! $QT4MOC ]; then
++		MOC="moc"
++	else
++        	MOC="$QT4MOC"
++	fi
++        which moc-qt5 > /dev/null 2>&1 && MOC=moc-qt5
++        echo "MOC=$MOC" >> makefile.opts
+ 
+-            TMP_CFLAGS="$(pkg-config --cflags Qt5Widgets) -fPIC"
+-            TMP_LDFLAGS=$(pkg-config --libs Qt5Widgets)
++            TMP_CFLAGS="$(pkg-config --cflags Qt5Widgets) $(pkg-config --cflags gl) -fPIC"
++            TMP_LDFLAGS="$(pkg-config --libs Qt5Widgets) $(pkg-config --libs gl)"
+ 
+             echo "#include <QtWidgets>" > .tmp.cpp
+             echo "int main(int argc, char *argv[]) { new QApplication(argc, argv) ; return 0; } " >> .tmp.cpp
+  
+-            echo "$CPP $TMP_CFLAGS .tmp.cpp $TMP_LDFLAGS -o .tmp.o" >> .config.log
+-            $CPP $TMP_CFLAGS .tmp.cpp $TMP_LDFLAGS -o .tmp.o 2>> .config.log
++            echo "$CPP $CXXFLAGS $TMP_CFLAGS .tmp.cpp $TMP_LDFLAGS -o .tmp.o" >> .config.log
++            $CPP $CXXFLAGS $TMP_CFLAGS .tmp.cpp $TMP_LDFLAGS -o .tmp.o 2>> .config.log
+ 
+             if [ $? = 0 ] ; then
+                 echo $TMP_CFLAGS >> config.cflags
+@@ -416,9 +398,6 @@ else
+             else
+                 echo "No"
+             fi
+-        else
+-            echo "No"
+-        fi
+     else
+         echo "No"
+     fi
+@@ -441,8 +420,8 @@ else
+         which moc-qt4 > /dev/null 2>&1 && MOC=moc-qt4
+         echo "MOC=$MOC" >> makefile.opts
+ 
 -        TMP_CFLAGS=$(pkg-config --cflags QtGui)
 -        TMP_LDFLAGS="$(pkg-config --libs QtGui) -lX11"
 +        TMP_CFLAGS="$(pkg-config --cflags QtGui) $(pkg-config --cflags x11)"
@@ -20,3 +115,23 @@
  
          echo "#include <QtGui>" > .tmp.cpp
          echo "int main(int argc, char *argv[]) { new QApplication(argc, argv) ; return 0; } " >> .tmp.cpp
+@@ -483,15 +462,15 @@ else
+     echo "int main(void) { gtk_main(); return 0; } " >> .tmp.c
+ 
+     # Try first GTK 3.0
+-    TMP_CFLAGS=`sh -c 'pkg-config --cflags gtk+-3.0' 2>/dev/null`
+-    TMP_LDFLAGS=`sh -c 'pkg-config --libs gtk+-3.0' 2>/dev/null`
++    TMP_CFLAGS=`sh -c "pkg-config --cflags gtk+-$GTKVER.0" 2>/dev/null`
++    TMP_LDFLAGS=`sh -c "pkg-config --libs gtk+-$GTKVER.0" 2>/dev/null`
+ 
+     $CC $TMP_CFLAGS .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
+     if [ $? = 0 ] ; then
+-        echo "#define CONFOPT_GTK 3" >> config.h
++        echo "#define CONFOPT_GTK $GTKVER" >> config.h
+         echo "$TMP_CFLAGS " >> config.cflags
+         echo "$TMP_LDFLAGS " >> config.ldflags
+-        echo "OK (3.0)"
++        echo "OK ($GTKVER.0)"
+         DRIVERS="gtk $DRIVERS"
+         DRV_OBJS="mpv_gtk.o $DRV_OBJS"
+     else

Added: head/editors/mp/files/patch-makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/mp/files/patch-makefile.in	Mon Mar  5 16:20:31 2018	(r463650)
@@ -0,0 +1,19 @@
+--- makefile.in.orig	2018-02-19 12:22:50 UTC
++++ makefile.in
+@@ -36,13 +36,13 @@ dep:
+ 	gcc -MM *.c `cat config.cflags` > makefile.depend
+ 
+ $(APPNAME): $(OBJS) $(MPDM)/libmpdm.a $(MPSL)/libmpsl.a
+-	$(CCLINK) $(CFLAGS) $(OBJS) `cat config.ldflags` -o $@
++	$(CCLINK) $(LDFLAGS) $(OBJS) `cat config.ldflags` -o $@
+ 
+ mpv_kde4.o: mpv_kde4.cpp mpv_qk_common.moc
+-	$(CPP) $(CFLAGS) -I. `cat config.cflags` -c $<
++	$(CPP) $(CXXFLAGS) -I. `cat config.cflags` -c $<
+ 
+ mpv_qt4.o: mpv_qt4.cpp mpv_qk_common.moc
+-	$(CPP) $(CFLAGS) -I. `cat config.cflags` -c $<
++	$(CPP) $(CXXFLAGS) -I. `cat config.cflags` -c $<
+ 
+ mpv_qk_common.moc: mpv_qk_common.cpp
+ 	$(MOC) -o $@ $<

Copied and modified: head/editors/mp/files/patch-mpdm_config.sh (from r463649, head/editors/mp/files/patch-mpdn__config.sh)
==============================================================================
--- head/editors/mp/files/patch-mpdn__config.sh	Mon Mar  5 15:10:16 2018	(r463649, copy source)
+++ head/editors/mp/files/patch-mpdm_config.sh	Mon Mar  5 16:20:31 2018	(r463650)
@@ -1,12 +1,23 @@
 --- mpdm/config.sh.orig	2015-05-05 07:29:54 UTC
 +++ mpdm/config.sh
+@@ -191,8 +191,8 @@ echo -n "Testing for regular expressions... "
+ 
+ if [ "$WITH_PCRE" = 1 ] ; then
+ 	# try first the pcre library
+-	TMP_CFLAGS="-I/usr/local/include"
+-	TMP_LDFLAGS="-L/usr/local/lib -lpcre -lpcreposix"
++	TMP_CFLAGS="-I$LOCALBASE/include"
++	TMP_LDFLAGS="-L$LOCALBASE/lib -lpcre -lpcreposix"
+ 	echo "#include <pcreposix.h>" > .tmp.c
+ 	echo "int main(void) { regex_t r; regmatch_t m; regcomp(&r,\".*\",REG_EXTENDED|REG_ICASE); return 0; }" >> .tmp.c
+ 
 @@ -370,13 +370,15 @@ else
  		echo "#define CONFOPT_GETTEXT 1" >> config.h
  	else
  		# try now with -lintl
 -		TMP_LDFLAGS="-lintl"
-+		TMP_CFLAGS="-I%%LOCALBASE%%/include"
-+		TMP_LDFLAGS="-L%%LOCALBASE%%/lib -lintl"
++		TMP_CFLAGS="-I$LOCALBASE/include"
++		TMP_LDFLAGS="-L$LOCALBASE/lib -lintl"
  
 -		$CC .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
 +		$CC $TMP_CFLAGS .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
@@ -23,8 +34,8 @@
  	else
  		# try now with -liconv
 -		TMP_LDFLAGS="-liconv"
-+		TMP_CFLAGS="-I%%ICONV_PREFIX%%/include"
-+		TMP_LDFLAGS="-L%%ICONV_PREFIX%%/lib %%ICONV_LIB%%"
++		TMP_CFLAGS="-I$ICONV_PREFIX/include"
++		TMP_LDFLAGS="-L$ICONV_PREFIX/lib $ICONV_LIB"
  
 -		$CC .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log
 +		$CC $TMP_CFLAGS .tmp.c $TMP_LDFLAGS -o .tmp.o 2>> .config.log

Modified: head/editors/mp/files/patch-mpdm_mpdm__s.c
==============================================================================
--- head/editors/mp/files/patch-mpdm_mpdm__s.c	Mon Mar  5 15:10:16 2018	(r463649)
+++ head/editors/mp/files/patch-mpdm_mpdm__s.c	Mon Mar  5 16:20:31 2018	(r463650)
@@ -1,6 +1,6 @@
 Fix build with aarch64, armv6, and armv7
 
---- mpdm_s.o ---
+#--- mpdm_s.o ---
 mpdm_s.c:1070:5: error: conflicting types for '__wcwidth'
 int wcwidth(wchar_t);
     ^



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803051620.w25GKV1c054230>