summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/astyle/Makefile8
-rw-r--r--devel/astyle/files/patch-build_gcc_Makefile11
-rw-r--r--devel/astyle/files/patch-src_astyle__main.cpp13
3 files changed, 28 insertions, 4 deletions
diff --git a/devel/astyle/Makefile b/devel/astyle/Makefile
index 1350400eca88..24c1bc0dd9c9 100644
--- a/devel/astyle/Makefile
+++ b/devel/astyle/Makefile
@@ -14,10 +14,6 @@ COMMENT= Source code indenter and formatter for C, C++, C\#, and Java
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
@@ -26,6 +22,10 @@ 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
${MKDIR} ${STAGEDIR}${DOCSDIR}
diff --git a/devel/astyle/files/patch-build_gcc_Makefile b/devel/astyle/files/patch-build_gcc_Makefile
new file mode 100644
index 000000000000..038d6e645f08
--- /dev/null
+++ b/devel/astyle/files/patch-build_gcc_Makefile
@@ -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
diff --git a/devel/astyle/files/patch-src_astyle__main.cpp b/devel/astyle/files/patch-src_astyle__main.cpp
new file mode 100644
index 000000000000..3ad3c79f366b
--- /dev/null
+++ b/devel/astyle/files/patch-src_astyle__main.cpp
@@ -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>