Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2018 03:12: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: r463547 - in head/editors/mp: . files
Message-ID:  <201803040312.w243CVCp038062@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Sun Mar  4 03:12:31 2018
New Revision: 463547
URL: https://svnweb.freebsd.org/changeset/ports/463547

Log:
  - Fix build with aarch64, armv6, armv7
  - Fix QT4 option on all platforms (needs USES=gmake, and fix for moc location)
  - Remove some substitutions that didn't do anything
  - Don't try to create directories already in mtree

Added:
  head/editors/mp/files/patch-config.sh   (contents, props changed)
  head/editors/mp/files/patch-mpdm_mpdm__s.c   (contents, props changed)
Modified:
  head/editors/mp/Makefile

Modified: head/editors/mp/Makefile
==============================================================================
--- head/editors/mp/Makefile	Sun Mar  4 02:34:49 2018	(r463546)
+++ head/editors/mp/Makefile	Sun Mar  4 03:12:31 2018	(r463547)
@@ -12,11 +12,7 @@ COMMENT=	Programming text editor
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_aarch64=		fails to compile: conflicting types for __wcwidth
-BROKEN_armv6=		fails to compile: conflicting types for __wcwidth
-BROKEN_armv7=		fails to compile: conflicting types for __wcwidth
-
-USES=		iconv ncurses
+USES=		gmake iconv ncurses
 HAS_CONFIGURE=	yes
 CONFIGURE_SCRIPT=	config.sh
 CONFIGURE_ARGS=	--prefix=${PREFIX} --without-win32 --without-kde4
@@ -37,8 +33,9 @@ GTK2_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfi
 GTK3_USE=		gnome=cairo,gdkpixbuf2,gtk30
 PCRE_LIB_DEPENDS=	libpcre.so:devel/pcre
 PCRE_CONFIGURE_WITH=	pcre
-QT4_USE=		qt4=corelib,gui,moc_build
-QT4_CONFIGURE_ENV=	CPP="${CXX}" CCLINK="${CXX}"
+QT4_USE=		qt4=corelib,gui,moc_build \
+			xorg=x11
+QT4_CONFIGURE_ENV=	CPP="${CXX}" CCLINK="${CXX}" MOC="${MOC}"
 QT4_CONFIGURE_WITH=	qt4
 
 .include <bsd.port.options.mk>
@@ -72,20 +69,17 @@ QT_NONSTANDARD=	yes
 
 post-patch:
 	@${REINPLACE_CMD} -e \
-		's|<ncursesw/|<| ; \
-		 s|-I/usr/local/include|| ; \
+		'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|<ncursesw/|<|g' ${WRKSRC}/mpv_curses.c
-	@${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 mpdm/mpdm_s.c mpsl/mpsl_d.c
+.for i in mpdm/mpdm.h mpsl/mpsl_d.c
 	@${REINPLACE_CMD} -e \
 		's|<malloc\.h>|<stdlib.h>|g' ${WRKSRC}/${i}
 .endfor
@@ -104,7 +98,6 @@ do-install:
 
 do-install-NLS-on:
 .for lang in de es it nl ru sv
-	@${MKDIR} ${STAGEDIR}${PREFIX}/share/locale/${lang}/LC_MESSAGES
 	${INSTALL_DATA} ${WRKSRC}/po/${lang}.mo \
 		${STAGEDIR}${PREFIX}/share/locale/${lang}/LC_MESSAGES/minimum-profit.mo
 .endfor

Added: head/editors/mp/files/patch-config.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/mp/files/patch-config.sh	Sun Mar  4 03:12:31 2018	(r463547)
@@ -0,0 +1,22 @@
+--- config.sh.orig	2018-03-04 01:48:31 UTC
++++ config.sh
+@@ -101,7 +101,7 @@ if [ "$CPP" = "" ] ; then
+     which g++ > /dev/null 2>&1 && CPP=g++
+ fi
+ 
+-MOC="moc"
++MOC?="moc"
+ which moc-qt4 > /dev/null 2>&1 && MOC=moc-qt4
+ 
+ echo "CC=$CC" >> makefile.opts
+@@ -364,8 +364,8 @@ if [ "$WITHOUT_QT4" = "1" ] ; then
+ else
+     if which pkg-config > /dev/null 2>&1
+     then
+-        TMP_CFLAGS=$(pkg-config --cflags QtGui)
+-        TMP_LDFLAGS="$(pkg-config --libs QtGui) -lX11"
++        TMP_CFLAGS="$(pkg-config --cflags QtGui) $(pkg-config --cflags x11)"
++        TMP_LDFLAGS="$(pkg-config --libs QtGui) $(pkg-config --libs x11)"
+ 
+         echo "#include <QtGui>" > .tmp.cpp
+         echo "int main(int argc, char *argv[]) { new QApplication(argc, argv) ; return 0; } " >> .tmp.cpp

Added: head/editors/mp/files/patch-mpdm_mpdm__s.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/mp/files/patch-mpdm_mpdm__s.c	Sun Mar  4 03:12:31 2018	(r463547)
@@ -0,0 +1,26 @@
+Fix build with aarch64, armv6, and armv7
+
+--- mpdm_s.o ---
+mpdm_s.c:1070:5: error: conflicting types for '__wcwidth'
+int wcwidth(wchar_t);
+    ^
+/usr/include/wchar.h:211:21: note: expanded from macro 'wcwidth'
+#define wcwidth(_c)     __wcwidth(_c)
+                        ^
+/usr/include/_ctype.h:159:1: note: previous definition is here
+__wcwidth(__ct_rune_t _c)
+^
+1 error generated.
+*** [mpdm_s.o] Error code 1
+
+--- mpdm/mpdm_s.c.orig	2018-03-04 00:49:18 UTC
++++ mpdm/mpdm_s.c
+@@ -1067,8 +1067,6 @@ int mpdm_gettext_domain(const mpdm_t dom, const mpdm_t
+ 
+ #ifdef CONFOPT_WCWIDTH
+ 
+-int wcwidth(wchar_t);
+-
+ int mpdm_wcwidth(wchar_t c)
+ {
+     return wcwidth(c);



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