Skip to content

Commit bea1d62

Browse files
committed
White-Star*: wip ports
1 parent 075ac72 commit bea1d62

File tree

44 files changed

+3040
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3040
-0
lines changed

www/white-star-gtk/Portfile

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2+
3+
PortSystem 1.0
4+
PortGroup github 1.0
5+
6+
github.setup dbsoft White-Star 0932391e034a027304d8551f81c65f70b17bf7f6
7+
name white-star-gtk
8+
version 2024.06.15
9+
categories www
10+
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
11+
license GPL-2
12+
description White Star web browser based on PaleMoon
13+
long_description ${description}
14+
homepage https://dbsoft.org/whitestar.php
15+
16+
supported_archs ppc
17+
universal_variant no
18+
installs_libs no
19+
20+
fetch.type git
21+
22+
post-fetch {
23+
system -W ${worksrcpath} "git submodule update --init"
24+
}
25+
26+
# https://github.com/dbsoft/White-Star/issues/2
27+
# https://dbsoft.org/whitestar-build-mac.php
28+
depends_build-append port:autoconf213 \
29+
port:cctools \
30+
port:freetype \
31+
port:gmake \
32+
port:ld64 \
33+
port:libidl \
34+
path:bin/pkg-config:pkgconfig \
35+
port:python27 \
36+
port:strip7
37+
38+
depends_lib-append port:bzip2 \
39+
path:lib/pkgconfig/gtk+-3.0.pc:gtk3 \
40+
path:lib/pkgconfig/icu-uc.pc:icu \
41+
path:include/turbojpeg.h:libjpeg-turbo \
42+
port:libpng \
43+
path:lib/pkgconfig/vpx.pc:libvpx \
44+
port:nspr \
45+
port:nss \
46+
port:openjpeg \
47+
port:webp \
48+
port:zlib
49+
50+
compiler.cxx_standard 2011
51+
52+
post-extract {
53+
xinstall -d ${worksrcpath}/platform/whitestar/branding
54+
move ${worksrcpath}/whitestar/branding/unofficial ${worksrcpath}/platform/whitestar/branding/whitestar
55+
}
56+
57+
patchfiles-append 0001-gfx-qcms-transform-altivec.c-fix-load_aligned_float-.patch \
58+
0002-js-src-jsscript.h-restrict-padding-hack-to-older-gcc.patch \
59+
0003-Info.plist.in-add-ppc-to-LSMinimumSystemVersionByArc.patch \
60+
0004-fix-broken-configure.patch \
61+
0005-do-not-hardcode-toolkit.patch
62+
63+
post-patch {
64+
copy ${filespath}/mozcfg-ppc32mac ${worksrcpath}/.mozconfig
65+
}
66+
67+
use_configure no
68+
69+
build.cmd ./mach
70+
build.target build
71+
72+
build.env-append PYTHON=${prefix}/bin/python2.7
73+
74+
# destroot {
75+
# move ${worksrcpath}/obj-powerpc-apple-darwin/dist/Browser.app ${destroot}${applications_dir}/WhiteStar.app
76+
# }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 48bb6f2edbfdca5ff17db522d7cfa71de321560c Mon Sep 17 00:00:00 2001
2+
From: Sergey Fedorov <[email protected]>
3+
Date: Sun, 21 Jan 2024 05:05:05 +0800
4+
Subject: [PATCH] gfx/qcms/transform-altivec.c: fix load_aligned_float
5+
declaration
6+
7+
---
8+
gfx/qcms/transform-altivec.c | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
diff --git gfx/qcms/transform-altivec.c gfx/qcms/transform-altivec.c
12+
index 9dc17bc13f..f8b60c7901 100644
13+
--- platform/gfx/qcms/transform-altivec.c
14+
+++ platform/gfx/qcms/transform-altivec.c
15+
@@ -29,7 +29,7 @@
16+
static const ALIGN float floatScaleX4 = FLOATSCALE;
17+
static const ALIGN float clampMaxValueX4 = CLAMPMAXVAL;
18+
19+
-inline vector float load_aligned_float(float *dataPtr)
20+
+static inline vector float load_aligned_float(float *dataPtr)
21+
{
22+
vector float data = vec_lde(0, dataPtr);
23+
vector unsigned char moveToStart = vec_lvsl(0, dataPtr);
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
From 66986fbeaa7d9da813b2617259fb17c487444015 Mon Sep 17 00:00:00 2001
2+
From: barracuda156 <[email protected]>
3+
Date: Sun, 14 Jan 2024 01:49:55 +0800
4+
Subject: [PATCH 01/10] mozcfg-ppc32mac for Darwin PowerPC
5+
6+
---
7+
mozcfg-ppc32mac | 81 +++++++++++++++++++++++++++++++++++++++++++++++++
8+
1 file changed, 81 insertions(+)
9+
create mode 100644 mozcfg-ppc32mac
10+
11+
diff --git mozcfg-ppc32mac mozcfg-ppc32mac
12+
new file mode 100644
13+
index 0000000000..6a3f7ac2c4
14+
--- /dev/null
15+
+++ mozcfg-ppc32mac
16+
@@ -0,0 +1,81 @@
17+
+# This Source Code Form is subject to the terms of the Mozilla Public
18+
+# License, v. 2.0. If a copy of the MPL was not distributed with this
19+
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
20+
+
21+
+export CC="@CC@ -flax-vector-conversions -O2 -mcpu=G5 -mtune=G5 -falign-loops=16 -falign-functions=16 -falign-labels=16 -falign-jumps=16 -read_only_relocs suppress -force_cpusubtype_ALL -mdynamic-no-pic"
22+
+export CXX="@CXX@ -flax-vector-conversions -fpermissive -O2 -mcpu=G5 -mtune=G5 -falign-loops=16 -falign-functions=16 -falign-labels=16 -falign-jumps=16 -read_only_relocs suppress -force_cpusubtype_ALL -mdynamic-no-pic"
23+
+
24+
+export LDFLAGS="-latomic"
25+
+
26+
+mk_add_options MOZ_UNIFY_BDATE=1
27+
+
28+
+mk_add_options MOZ_MAKE_FLAGS="-s -j@BUILD_JOBS@"
29+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg
30+
+
31+
+ac_add_options --enable-altivec
32+
+ac_add_options --enable-application=browser
33+
+ac_add_options --enable-macos-target=10.6
34+
+ac_add_options --enable-optimize
35+
+ac_add_options --enable-prebinding
36+
+ac_add_options --enable-webrtc
37+
+
38+
+#ac_add_options --enable-chrome-format=jar
39+
+#ac_add_options --enable-install-strip
40+
+#ac_add_options --enable-printing
41+
+#ac_add_options --enable-strip
42+
+
43+
+ac_add_options --with-system-bz2
44+
+ac_add_options --with-system-icu
45+
+ac_add_options --with-system-jpeg
46+
+ac_add_options --with-system-libvpx
47+
+ac_add_options --with-system-nspr
48+
+ac_add_options --with-system-nss
49+
+ac_add_options --with-system-png
50+
+ac_add_options --with-system-zlib
51+
+
52+
+ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.6.sdk
53+
+
54+
+# Temporary: there is some issue with system Kerberos/kim.h not being found.
55+
+# Perhaps, rather use Macports one.
56+
+ac_add_options --disable-negotiateauth
57+
+
58+
+ac_add_options --disable-alsa
59+
+ac_add_options --disable-applemedia
60+
+ac_add_options --disable-cpp-exceptions
61+
+ac_add_options --disable-crashreporter
62+
+ac_add_options --disable-dbus
63+
+ac_add_options --disable-debug
64+
+ac_add_options --disable-eme
65+
+ac_add_options --disable-gamepad
66+
+ac_add_options --disable-gio
67+
+ac_add_options --disable-gstreamer
68+
+ac_add_options --disable-mozril-geoloc
69+
+ac_add_options --disable-necko-wifi
70+
+ac_add_options --disable-parental-controls
71+
+ac_add_options --disable-pulseaudio
72+
+ac_add_options --disable-tests
73+
+ac_add_options --disable-safe-browsing
74+
+ac_add_options --disable-static
75+
+ac_add_options --disable-updater
76+
+ac_add_options --disable-webspeech
77+
+ac_add_options --disable-webspeechtestbackend
78+
+
79+
+ac_add_options --with-branding=browser/branding/arcticfox
80+
+
81+
+
82+
+# Options below are borrowed from mozcfg-ppc32linux for convenience and should not be used without reviewing.
83+
+
84+
+# only for gcc >= 6 and only if binaries are unstable, should be inserted automatically by configure if gcc >= 6
85+
+#ac_add_options --enable-optimize="-g0 -O2 -fno-delete-null-pointer-checks -fno-lifetime-dse -fno-schedule-insns2"
86+
+
87+
+# gtk3 now supported and default, but gtk2 just looks better
88+
+#ac_add_options --enable-default-toolkit=cairo-gtk2
89+
+
90+
+# Issue 162
91+
+#ac_add_options --disable-precompiled-startupcache
92+
+
93+
+# For convenience, if needed
94+
+#ac_add_options --enable-system-hunspell
95+
+#ac_add_options --enable-system-sqlite
96+
+#ac_add_options --enable-system-ffi
97+
+#ac_add_options --enable-system-pixman
98+
--
99+
2.43.0
100+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 8f381309f13760cd2fb31e339818507fdf6d651f Mon Sep 17 00:00:00 2001
2+
From: Sergey Fedorov <[email protected]>
3+
Date: Sun, 14 Jan 2024 02:53:44 +0800
4+
Subject: [PATCH 02/10] compiler-opts.m4: drop forcing of broken clang
5+
6+
---
7+
build/autoconf/compiler-opts.m4 | 17 -----------------
8+
1 file changed, 17 deletions(-)
9+
10+
diff --git build/autoconf/compiler-opts.m4 build/autoconf/compiler-opts.m4
11+
index 29fde4f832..295b4c7b8c 100644
12+
--- build/autoconf/compiler-opts.m4
13+
+++ build/autoconf/compiler-opts.m4
14+
@@ -45,23 +45,6 @@ case "$target" in
15+
HOST_LDFLAGS=" "
16+
fi
17+
;;
18+
-*-darwin*)
19+
- # GCC on darwin is based on gcc 4.2 and we don't support it anymore.
20+
- if test -z "$CC"; then
21+
- MOZ_PATH_PROGS(CC, clang)
22+
- fi
23+
- if test -z "$CXX"; then
24+
- MOZ_PATH_PROGS(CXX, clang++)
25+
- fi
26+
- IS_GCC=$($CC -v 2>&1 | grep gcc)
27+
- if test -n "$IS_GCC"
28+
- then
29+
- echo gcc is known to be broken on OS X, please use clang.
30+
- echo see http://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions/Mac_OS_X_Prerequisites
31+
- echo for more information.
32+
- exit 1
33+
- fi
34+
- ;;
35+
esac
36+
fi
37+
])
38+
--
39+
2.43.0
40+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 4abdfcd90daa681dc48d672e7ea4f1e874d4bf72 Mon Sep 17 00:00:00 2001
2+
From: Sergey Fedorov <[email protected]>
3+
Date: Sun, 21 Jan 2024 05:21:49 +0800
4+
Subject: [PATCH 2/7] js/src/jsscript.h: restrict padding hack to older gcc
5+
6+
---
7+
js/src/jsscript.h | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git js/src/jsscript.h js/src/jsscript.h
11+
index d801661a86..3885ec3707 100644
12+
--- platform/js/src/jsscript.h
13+
+++ platform/js/src/jsscript.h
14+
@@ -2068,7 +2068,7 @@ class LazyScript : public gc::TenuredCell
15+
// Add padding so LazyScript is gc::Cell aligned. Make padding protected
16+
// instead of private to suppress -Wunused-private-field compiler warnings.
17+
protected:
18+
-#if JS_BITS_PER_WORD == 32 && !(defined(XP_DARWIN) && defined(__ppc__))
19+
+#if JS_BITS_PER_WORD == 32 && !(defined(XP_DARWIN) && defined(__ppc__) && (__GNUC__ < 13))
20+
uint32_t padding;
21+
#endif
22+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
From 2be51ec4a9e3fb67e030a2d1b29cabc0152e5291 Mon Sep 17 00:00:00 2001
2+
From: Sergey Fedorov <[email protected]>
3+
Date: Sun, 21 Jan 2024 05:26:07 +0800
4+
Subject: [PATCH 3/7] Info.plist.in: add ppc to
5+
LSMinimumSystemVersionByArchitecture
6+
7+
---
8+
ipc/app/macbuild/Contents/Info.plist.in | 4 ++++
9+
.../mozapps/update/updater/macbuild/Contents/Info.plist.in | 4 ++++
10+
xulrunner/app/macbuild/Info.plist.in | 4 ++++
11+
3 files changed, 12 insertions(+)
12+
13+
diff --git ipc/app/macbuild/Contents/Info.plist.in ipc/app/macbuild/Contents/Info.plist.in
14+
index c5291160ef..7d228f04e0 100644
15+
--- platform/ipc/app/macbuild/Contents/Info.plist.in
16+
+++ platform/ipc/app/macbuild/Contents/Info.plist.in
17+
@@ -22,6 +22,10 @@
18+
<dict>
19+
<key>i386</key>
20+
<string>10.5.0</string>
21+
+ <key>ppc</key>
22+
+ <string>10.5.0</string>
23+
+ <key>ppc64</key>
24+
+ <string>10.5.0</string>
25+
<key>x86_64</key>
26+
<string>10.6.0</string>
27+
</dict>
28+
diff --git toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
29+
index a9b9fcba9d..b05f8d2fed 100644
30+
--- platform/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
31+
+++ platform/toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
32+
@@ -28,6 +28,10 @@
33+
<dict>
34+
<key>i386</key>
35+
<string>10.5.0</string>
36+
+ <key>ppc</key>
37+
+ <string>10.5.0</string>
38+
+ <key>ppc64</key>
39+
+ <string>10.5.0</string>
40+
<key>x86_64</key>
41+
<string>10.6.0</string>
42+
</dict>
43+
diff --git xulrunner/app/macbuild/Info.plist.in xulrunner/app/macbuild/Info.plist.in
44+
index 69676b80c5..ab12cb1969 100644
45+
--- platform/xulrunner/app/macbuild/Info.plist.in
46+
+++ platform/xulrunner/app/macbuild/Info.plist.in
47+
@@ -24,6 +24,10 @@
48+
<dict>
49+
<key>i386</key>
50+
<string>10.5.0</string>
51+
+ <key>ppc</key>
52+
+ <string>10.5.0</string>
53+
+ <key>ppc64</key>
54+
+ <string>10.5.0</string>
55+
<key>x86_64</key>
56+
<string>10.6.0</string>
57+
</dict>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
From 3e49ac98630e8f819f661b4db67951b8c3480ebf Mon Sep 17 00:00:00 2001
2+
From: barracuda156 <[email protected]>
3+
Date: Sun, 14 Jan 2024 05:58:21 +0800
4+
Subject: [PATCH 03/10] dom/bindings/BindingUtils.h: fix for gcc
5+
6+
---
7+
dom/bindings/BindingUtils.h | 15 ++++++++-------
8+
1 file changed, 8 insertions(+), 7 deletions(-)
9+
10+
diff --git dom/bindings/BindingUtils.h dom/bindings/BindingUtils.h
11+
index 2d8c27f910..ed1d399363 100644
12+
--- dom/bindings/BindingUtils.h
13+
+++ dom/bindings/BindingUtils.h
14+
@@ -1779,11 +1779,12 @@ GetCallbackFromCallbackObject(T& aObj)
15+
return GetCallbackFromCallbackObjectHelper<T>::Get(aObj);
16+
}
17+
18+
+// id is a reserved word for gcc.
19+
static inline bool
20+
-AtomizeAndPinJSString(JSContext* cx, jsid& id, const char* chars)
21+
+AtomizeAndPinJSString(JSContext* cx, jsid& jid, const char* chars)
22+
{
23+
if (JSString *str = ::JS_AtomizeAndPinString(cx, chars)) {
24+
- id = INTERNED_STRING_TO_JSID(cx, str);
25+
+ jid = INTERNED_STRING_TO_JSID(cx, str);
26+
return true;
27+
}
28+
return false;
29+
@@ -3105,26 +3106,26 @@ CreateGlobal(JSContext* aCx, T* aNative, nsWrapperCache* aCache,
30+
*/
31+
class PinnedStringId
32+
{
33+
- jsid id;
34+
+ jsid jid;
35+
36+
public:
37+
- PinnedStringId() : id(JSID_VOID) {}
38+
+ PinnedStringId() : jid(JSID_VOID) {}
39+
40+
bool init(JSContext *cx, const char *string) {
41+
JSString* str = JS_AtomizeAndPinString(cx, string);
42+
if (!str)
43+
return false;
44+
- id = INTERNED_STRING_TO_JSID(cx, str);
45+
+ jid = INTERNED_STRING_TO_JSID(cx, str);
46+
return true;
47+
}
48+
49+
operator const jsid& () {
50+
- return id;
51+
+ return jid;
52+
}
53+
54+
operator JS::Handle<jsid> () {
55+
/* This is safe because we have pinned the string. */
56+
- return JS::Handle<jsid>::fromMarkedLocation(&id);
57+
+ return JS::Handle<jsid>::fromMarkedLocation(&jid);
58+
}
59+
};
60+
61+
--
62+
2.43.0
63+

0 commit comments

Comments
 (0)