mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
lang/phantomjs: Allow building on armv6 and armv7 platforms
- Patches for armv6 and armv7 are obtained from www/webkit-gtk3 - Allow building with non-default LOCALBASE - Fix build with Clang 6.0.0 [0] PR: 225482 [0] Reviewed by: koobs, feld Approved by: koobs (mentor), feld (maintainner) Differential Revision: https://reviews.freebsd.org/D15850
This commit is contained in:
parent
fec20dfa28
commit
8e17f439cf
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=472754
@ -12,8 +12,6 @@ LICENSE= BSD3CLAUSE
|
||||
|
||||
BROKEN_powerpc64= fails to build: g++48: not found
|
||||
BROKEN_sparc64= does not link on sparc64
|
||||
NOT_FOR_ARCHS= armv6 armv7
|
||||
NOT_FOR_ARCHS_REASON= Platform.h: Not supported ARM architecture
|
||||
BROKEN_SSL= openssl-devel
|
||||
BROKEN_SSL_REASON_openssl-devel= error: member access into incomplete type 'X509' (aka 'x509_st')
|
||||
|
||||
@ -52,7 +50,7 @@ post-extract:
|
||||
${MKDIR} ${WRKSRC}/src/qt/qtwebkit/.git
|
||||
${RM} ${WRKSRC}/src/qt/qtwebkit/Source/WebCore/DerivedSources.cpp
|
||||
|
||||
_ENV= CC=${CC} CXX=${CXX} GMAKE=${GMAKE} OSTYPE=freebsd MAKEFLAGS=
|
||||
_ENV= CC=${CC} CXX=${CXX} GMAKE=${GMAKE} OSTYPE=freebsd MAKEFLAGS= LOCALBASE=${LOCALBASE}
|
||||
_BLD= ${PYTHON_CMD} build.py --jobs ${MAKE_JOBS_NUMBER} --confirm
|
||||
do-build:
|
||||
.if defined(_PHANTOMJS_USE_QT_SYSTEM)
|
||||
|
@ -0,0 +1,13 @@
|
||||
--- src/qt/qtbase/mkspecs/freebsd-clang/qmake.conf.orig 2017-03-26 06:45:23 UTC
|
||||
+++ src/qt/qtbase/mkspecs/freebsd-clang/qmake.conf
|
||||
@@ -10,8 +10,8 @@ QMAKE_CFLAGS_THREAD = -pthread -D_TH
|
||||
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
|
||||
|
||||
# Addon software goes into /usr/local on the BSDs, by default we will look there
|
||||
-QMAKE_INCDIR = /usr/local/include
|
||||
-QMAKE_LIBDIR = /usr/local/lib
|
||||
+QMAKE_INCDIR = $$(LOCALBASE)/include
|
||||
+QMAKE_LIBDIR = $$(LOCALBASE)/lib
|
||||
|
||||
QMAKE_LFLAGS_NOUNDEF = -Wl,--no-undefined
|
||||
QMAKE_LFLAGS_THREAD = -pthread
|
@ -0,0 +1,17 @@
|
||||
assembler/ARMAssembler.h:1073:2: error: "The cacheFlush support is missing on this platform."
|
||||
#error "The cacheFlush support is missing on this platform."
|
||||
^
|
||||
|
||||
Obtained from: www/webkit-gtk3/files/patch-Source__JavaScriptCore__assembler__ARMAssembler.h
|
||||
|
||||
--- src/qt/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h.orig 2016-01-08 10:07:46 UTC
|
||||
+++ src/qt/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h
|
||||
@@ -1069,6 +1069,8 @@ namespace JSC {
|
||||
UNUSED_PARAM(size);
|
||||
#elif OS(QNX)
|
||||
msync(code, size, MS_INVALIDATE_ICACHE);
|
||||
+#elif CPU(ARM_TRADITIONAL) && OS(FREEBSD) && COMPILER(CLANG)
|
||||
+ __clear_cache(code, reinterpret_cast<char*>(code) + size);
|
||||
#else
|
||||
#error "The cacheFlush support is missing on this platform."
|
||||
#endif
|
@ -0,0 +1,19 @@
|
||||
On armv6 platform:
|
||||
./wtf/Platform.h:323:6: error: "Not supported ARM architecture"
|
||||
# error "Not supported ARM architecture"
|
||||
^
|
||||
|
||||
Obtained from: www/webkit-gtk3/files/patch-Source_WTF_wtf_Platform.h
|
||||
|
||||
This patch reportedly fixes build for ARM. See PR 208569
|
||||
|
||||
--- src/qt/qtwebkit/Source/WTF/wtf/Platform.h.orig 2018-06-14 11:03:55 UTC
|
||||
+++ src/qt/qtwebkit/Source/WTF/wtf/Platform.h
|
||||
@@ -232,6 +232,7 @@
|
||||
#elif defined(__ARM_ARCH_6__) \
|
||||
|| defined(__ARM_ARCH_6J__) \
|
||||
|| defined(__ARM_ARCH_6K__) \
|
||||
+ || defined(__ARM_ARCH_6KZ__) \
|
||||
|| defined(__ARM_ARCH_6Z__) \
|
||||
|| defined(__ARM_ARCH_6ZK__) \
|
||||
|| defined(__ARM_ARCH_6T2__) \
|
@ -0,0 +1,18 @@
|
||||
.obj/platform/graphics/cpu/arm/filters/FELightingNEON.o ---
|
||||
<inline asm>:149:1: error: invalid instruction
|
||||
vmov.u32 r2, r3, s8, s9
|
||||
^
|
||||
|
||||
Obtained from: www/webkit-gtk3/files/patch-Source_WebCore_platform_graphics_cpu_arm_filters_FELightingNEON.cpp
|
||||
|
||||
--- src/qt/qtwebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp.orig 2018-06-12 14:38:27 UTC
|
||||
+++ src/qt/qtwebkit/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp
|
||||
@@ -404,7 +404,7 @@ TOSTRING(neonDrawLighting) ":" NL
|
||||
"vmin.f32 " TMP2_D0 ", " TMP2_D0 ", " CONST_ONE_HI_D NL
|
||||
"vmul.f32 " TMP3_Q ", " COLOR_Q ", " TMP2_D0 "[1]" NL
|
||||
"vcvt.u32.f32 " TMP3_Q ", " TMP3_Q NL
|
||||
- "vmov.u32 r2, r3, " TMP3_S0 ", " TMP3_S1 NL
|
||||
+ "vmov r2, r3, " TMP3_S0 ", " TMP3_S1 NL
|
||||
// The color values are stored in-place.
|
||||
"strb r2, [" PIXELS_R ", #-11]" NL
|
||||
"strb r3, [" PIXELS_R ", #-10]" NL
|
20
lang/phantomjs/files/patch-src_webpage.cpp
Normal file
20
lang/phantomjs/files/patch-src_webpage.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
webpage.cpp:80:89: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
|
||||
#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window."CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
|
||||
^
|
||||
webpage.cpp:81:57: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
|
||||
#define CALLBACKS_OBJECT_PRESENT "typeof(window."CALLBACKS_OBJECT_NAME") !== \"undefined\";"
|
||||
^
|
||||
|
||||
--- src/webpage.cpp.orig 2018-01-26 07:17:31 UTC
|
||||
+++ src/webpage.cpp
|
||||
@@ -77,8 +77,8 @@
|
||||
#define BLANK_HTML "<html><head></head><body></body></html>"
|
||||
#define CALLBACKS_OBJECT_NAME "_phantom"
|
||||
#define INPAGE_CALL_NAME "window.callPhantom"
|
||||
-#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window."CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
|
||||
-#define CALLBACKS_OBJECT_PRESENT "typeof(window."CALLBACKS_OBJECT_NAME") !== \"undefined\";"
|
||||
+#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window." CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
|
||||
+#define CALLBACKS_OBJECT_PRESENT "typeof(window." CALLBACKS_OBJECT_NAME") !== \"undefined\";"
|
||||
|
||||
#define STDOUT_FILENAME "/dev/stdout"
|
||||
#define STDERR_FILENAME "/dev/stderr"
|
Loading…
Reference in New Issue
Block a user