Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2019 09:09:51 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r489067 - in head/devel/astyle: . files
Message-ID:  <201901020909.x0299puJ052842@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Wed Jan  2 09:09:50 2019
New Revision: 489067
URL: https://svnweb.freebsd.org/changeset/ports/489067

Log:
  Fix CXX assignment and add new includes to fix build on GCC-based
  architectures.
  
  PR:		232734
  Submitted by:	Piotr Kubaj
  Approved by:	portmgr (tier-2 blanket)

Added:
  head/devel/astyle/files/
  head/devel/astyle/files/patch-build_gcc_Makefile   (contents, props changed)
  head/devel/astyle/files/patch-src_astyle__main.cpp   (contents, props changed)
Modified:
  head/devel/astyle/Makefile

Modified: head/devel/astyle/Makefile
==============================================================================
--- head/devel/astyle/Makefile	Wed Jan  2 09:03:39 2019	(r489066)
+++ head/devel/astyle/Makefile	Wed Jan  2 09:09:50 2019	(r489067)
@@ -14,10 +14,6 @@ COMMENT=	Source code indenter and formatter for C, C++
 LICENSE=	MIT
 LICENSE_FILE=	${WRKDIR}/astyle/LICENSE.md
 
-BROKEN_mips=		fails to build: unrecognized command line option "-std=c++11"
-BROKEN_mips64=		fails to build: unrecognized command line option "-std=c++11"
-BROKEN_powerpc64=	fails to build: unrecognized command line option "-std=c++11"
-
 USES=		compiler:c++11-lang dos2unix gmake
 
 ALL_TARGET=	astyle
@@ -25,6 +21,10 @@ DOS2UNIX_GLOB=	*.ini
 WRKSRC=		${WRKDIR}/astyle/build/${CHOSEN_COMPILER_TYPE}
 
 OPTIONS_DEFINE=	DOCS EXAMPLES
+
+do-configure:
+	@${REINPLACE_CMD} -e "s:%%CXX%%:${CXX}:" \
+		${WRKSRC}/${MAKEFILE}
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/bin/astyle ${STAGEDIR}${PREFIX}/bin

Added: head/devel/astyle/files/patch-build_gcc_Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/astyle/files/patch-build_gcc_Makefile	Wed Jan  2 09:09:50 2019	(r489067)
@@ -0,0 +1,11 @@
+--- ../../build/gcc/Makefile.orig	2018-01-11 17:18:18 UTC
++++ ../../build/gcc/Makefile
+@@ -37,7 +37,7 @@ objdir = obj
+ ipath=$(prefix)/bin
+ CBASEFLAGS = -Wall -Wextra -fno-rtti -fno-exceptions -std=c++11
+ JAVAINCS   = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux
+-CXX = g++
++CXX = %%CXX%%
+ INSTALL=install -o $(USER) -g $(USER)
+ 
+ # Library's major version number -- Increment in case of incompatible API

Added: head/devel/astyle/files/patch-src_astyle__main.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/astyle/files/patch-src_astyle__main.cpp	Wed Jan  2 09:09:50 2019	(r489067)
@@ -0,0 +1,13 @@
+--- ../../src/astyle_main.cpp.orig	2018-11-28 00:32:16.924868000 +0100
++++ ../../src/astyle_main.cpp	2018-11-28 00:33:36.071105000 +0100
+@@ -46,6 +46,10 @@
+ #ifdef _WIN32
+ 	#undef UNICODE		// use ASCII windows functions
+ 	#include <windows.h>
++#elif defined(__FreeBSD__)
++	#include <dirent.h>
++	#include <sys/syslimits.h>
++	#include <unistd.h>
+ #else
+ 	#include <dirent.h>
+ 	#include <unistd.h>



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