View | Details | Raw Unified | Return to bug 251117 | Differences between
and this patch

Collapse All | Expand All

(-)www/newmoon/Makefile (+205 lines)
Line 0 Link Here
1
# $FreeBSD$
2
# Created by Olivier Certner <olce.freebsd.ports@certner.fr>
3
4
PORTNAME=	newmoon
5
DISTVERSION=	28.15.0
6
# UXP_VERSION has to be updated according to DISTVERSION (see recorded commit
7
# of the 'platform' git sub-module and corresponding release in UXP/releases;
8
# see MASTER_SITES for base URLs).
9
UXP_VERSION=	20201024
10
CATEGORIES=	www
11
MASTER_SITES=	https://repo.palemoon.org/MoonchildProductions/Pale-Moon/archive/:palemoon \
12
		https://repo.palemoon.org/MoonchildProductions/UXP/archive/:uxp
13
DISTFILES=	${DISTVERSION}_Release.tar.gz:palemoon \
14
		RELBASE_${UXP_VERSION}.tar.gz:uxp
15
DIST_SUBDIR=	MoonchildProductions
16
WRKSRC=		${WRKDIR}/pale-moon
17
18
MAINTAINER=	olce.freebsd.ports@certner.fr
19
COMMENT=	Open-source web browser mostly using Pale Moon(TM) code
20
21
# Not sure about the real status of ARM, but only ARM packages of old versions of
22
# PM are available in some Linux distros.
23
ONLY_FOR_ARCHS=	amd64 i386
24
ONLY_FOR_ARCHS_REASON=Upstream only cares about i386/amd64
25
26
# Common deps & build options
27
BUILD_DEPENDS=	autoconf-2.13:devel/autoconf213 \
28
		yasm:devel/yasm \
29
		zip:archivers/zip \
30
31
LIB_DEPENDS=	libdbus-1.so:devel/dbus \
32
		libdbus-glib-1.so:devel/dbus-glib \
33
		libfontconfig.so:x11-fonts/fontconfig \
34
		libfreetype.so:print/freetype2
35
36
USES=		dos2unix perl5 gmake gnome xorg desktop-file-utils
37
# This is purely so that the patch applied to this file on NO_UAOVERRIDES can
38
# be checked in cleanly into SVN.
39
DOS2UNIX_FILES=	palemoon/branding/shared/pref/uaoverrides.inc
40
USE_PERL5=	build
41
USE_GNOME=	cairo gdkpixbuf2 glib20 pango
42
USE_XORG=	xt x11 xcb xext xrender
43
# 9 is the last version endorsed upstream (and was the default in ports when
44
# this was written). Should ideally be bumped with GCC's default version, but
45
# *only if* validated by upstream (or thoroughly tested by us). Hence
46
# hardcoded. (For the record, building with clang produces malfunctioning
47
# executables.)
48
# NOTE: We make sure that there are no runtime dependencies to GCC. See
49
# [GCC-no-rdep-*] tags below. This should rather be solved in the ports
50
# infrastructure proper (see PR 211154; also, allowing to choose among C++
51
# standard libraries, besides providing a common default, would be great).
52
USE_GCC=	9
53
54
# Put this here pending creation of USES=gtar
55
BUILD_DEPENDS+=	gtar:archivers/gtar
56
BINARY_ALIAS+=	tar=${LOCALBASE}/bin/gtar
57
58
BUILD_DEPENDS+=	tauthon:lang/tauthon
59
BINARY_ALIAS+=	python=${LOCALBASE}/bin/tauthon \
60
		python2=${LOCALBASE}/bin/tauthon \
61
		python2.7=${LOCALBASE}/bin/tauthon
62
63
BUNDLE_LIBS=	yes
64
65
# Options
66
67
OPTIONS_SINGLE+=	GUI
68
OPTIONS_SINGLE_GUI=	GTK2 GTK3
69
OPTIONS_DEFAULT+=	GTK3
70
71
OPTIONS_SINGLE+=	SOUND
72
OPTIONS_SINGLE_SOUND=	ALSA PULSEAUDIO
73
OPTIONS_DEFAULT+=	ALSA
74
75
OPTIONS_DEFINE+= 	SYNC NO_UAOVERRIDES
76
77
SYNC_DESC=		Pale Moon Sync service (see https://www.palemoon.org/sync/)
78
NO_UAOVERRIDES_DESC=	Deactivate default User Agent overrides (prefs renamed)
79
80
GTK2_USE=		gnome=gtk20,gconf2
81
# XXX
82
# GTK3 needs gtk20 and gconf2 to pass old-configure (and maybe more).
83
# See also: https://repo.palemoon.org/MoonchildProductions/UXP/issues/1638.
84
GTK3_USE=		gnome=gtk30,gtk20:build,gconf2:build
85
86
OPTIONS_SUB=		yes
87
88
ALSA_BUILD_DEPENDS=	${PREFIX}/include/alsa/asoundlib.h:audio/alsa-lib
89
ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
90
PULSEAUDIO_BUILD_DEPENDS=${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
91
PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
92
93
NO_UAOVERRIDES_EXTRA_PATCHES= \
94
${PATCHDIR}/no_uaoverrides_patch-palemoon_branding_shared_pref_uaoverrides.inc
95
96
.include <bsd.port.options.mk>
97
98
# Vars and targets
99
100
# Have GCC link with libc++. Needed because some library dependencies (e.g.,
101
# libgraphite2.so) are linked against libc++ already, and mixing both with this
102
# codebase results in instant executable crash.
103
# As advised here:
104
# https://libcxx.llvm.org/docs/UsingLibcxx.html#using-libc-with-gcc
105
# with the change of linking gcc statically, so that this port doesn't need
106
# to depend on GCC at all at runtime. [GCC-no-rdep-1]
107
# This is similar to what 'compiler.mk' does on using "gcc-c++11-lib".
108
CXXFLAGS+=	-nostdinc++ -I/usr/include/c++/v1 -nodefaultlibs \
109
		-lc++ -lcxxrt -lm -lc -lgcc \
110
		-pthread -lpthread
111
LDFLAGS+=	-lgcc
112
113
DOT_MOZCONFIG=	${WRKSRC}/.mozconfig
114
PM_BUILD_DIR=	${WRKSRC}/pmbuild
115
116
NEWMOON_DESKTOP=${WRKSRC}/palemoon/branding/unofficial/browser.desktop
117
118
.if ${PORT_OPTIONS:MGTK3}
119
PM_GTK_VERSION:=3
120
.else
121
PM_GTK_VERSION:=2
122
.endif
123
124
.if ${ARCH} == "amd64"
125
PM_BUILD_64=_BUILD_64=1
126
.else
127
PM_BUILD_64=
128
.endif
129
130
# Extract only -O options
131
PM_OPTIMIZE=${CFLAGS:M-O*}
132
133
.for VAR in PM_BUILD_64 PM_GTK_VERSION PM_BUILD_DIR PM_OPTIMIZE
134
PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!%%${VAR}%%!${${VAR}}!'
135
.endfor
136
137
138
# Taken from bsd.gecko.mk. See comment there.
139
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
140
MAKE_JOBS_NUMBER=	1
141
.endif
142
.if defined(MAKE_JOBS_NUMBER)
143
MOZ_MAKE_FLAGS+=	-j${MAKE_JOBS_NUMBER}
144
.endif
145
146
147
post-extract:
148
	${RMDIR} ${WRKSRC}/platform
149
	${RLN} ${WRKDIR}/uxp ${WRKSRC}/platform
150
151
# Prepare '.mozconfig' for 'configure'
152
pre-configure:
153
	${CP} ${FILESDIR}/dot.mozconfig ${DOT_MOZCONFIG}
154
	${REINPLACE_CMD} ${PM_MOZCONFIG_REINPLACE_ARGS} ${DOT_MOZCONFIG}
155
.if ${PORT_OPTIONS:MALSA}
156
	${ECHO_CMD} ac_add_options --enable-alsa >> ${DOT_MOZCONFIG}
157
	${ECHO_CMD} ac_add_options --disable-pulseaudio >> ${DOT_MOZCONFIG}
158
.endif
159
.if ! ${PORT_OPTIONS:MSYNC}
160
	${ECHO_CMD} ac_add_options --disable-sync >> ${DOT_MOZCONFIG}
161
.endif
162
# .if ${PORT_OPTIONS:MDEBUG}
163
# 	${ECHO_CMD} ac_add_options --disable-strip >> ${DOT_MOZCONFIG}
164
# 	${ECHO_CMD} ac_add_options --disable-install-strip >> ${DOT_MOZCONFIG}
165
# # Causes compile error
166
# #	${ECHO_CMD} ac_add_options --enable-debug >> ${DOT_MOZCONFIG}
167
# .endif
168
.if defined(MOZ_MAKE_FLAGS)
169
	${ECHO_CMD} mk_add_options MOZ_MAKE_FLAGS=${MOZ_MAKE_FLAGS:Q} \
170
		>> ${DOT_MOZCONFIG}
171
.endif
172
# Add build variables
173
.for VAR in CPP CXXCPP CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS \
174
	LD AS AR RANLIB OBJDUMP NM
175
.if defined(${VAR})
176
# Remove -rpath options to GCC's directory [GCC-no-rdep-2]
177
	${ECHO_CMD} export ${VAR}=\"${${VAR}:N*-rpath*lib/gcc*}\" >> ${DOT_MOZCONFIG}
178
.endif
179
.endfor
180
181
# Running 'mach configure' separately is "strongly discouraged" (see Mozilla's
182
# doc on build options configuration). Still, things seem to work correctly
183
# even with this separate step.
184
do-configure:
185
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach configure
186
187
do-build:
188
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach build
189
# Going through the package route (the only one documented upstream)
190
	cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach package
191
192
do-install:
193
	${TAR} -C ${STAGEDIR}${PREFIX}/lib \
194
		-xf ${PM_BUILD_DIR:Q}/dist/palemoon*.tar* \
195
		palemoon
196
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/palemoon \
197
		${STAGEDIR}${PREFIX}/bin/palemoon
198
	${INSTALL_DATA} ${NEWMOON_DESKTOP} \
199
		${STAGEDIR}${PREFIX}/share/applications/newmoon.desktop
200
	${RLN}  ${STAGEDIR}${PREFIX}/lib/palemoon/browser/icons/mozicon128.png \
201
		${STAGEDIR}${PREFIX}/share/pixmaps/palemoon.png
202
203
.include <bsd.port.mk>
204
# [GCC-no-rdep-3]
205
RUN_DEPENDS:=	${RUN_DEPENDS:Ngcc*}
(-)www/newmoon/distinfo (+5 lines)
Line 0 Link Here
1
TIMESTAMP = 1604571428
2
SHA256 (MoonchildProductions/28.15.0_Release.tar.gz) = 1475113c47c5a44539c402dba46e3ff15bc7cf6a6303cdb755408a01cdff9a65
3
SIZE (MoonchildProductions/28.15.0_Release.tar.gz) = 8535322
4
SHA256 (MoonchildProductions/RELBASE_20201024.tar.gz) = 4a4c7e1751527b5d0231590978f14e55d70d70a8c654c8766aeeaedca0af6b58
5
SIZE (MoonchildProductions/RELBASE_20201024.tar.gz) = 299700681
(-)www/newmoon/files/dot.mozconfig (+35 lines)
Line 0 Link Here
1
# Standard build options for Pale Moon
2
# See http://developer.palemoon.org/build/linux/
3
4
# The 'configure' ports step replaces %%VAR%% with content of Makefile's VAR
5
# and appends lines to this file.
6
7
%%PM_BUILD_64%%
8
_GTK_VERSION=%%PM_GTK_VERSION%%
9
mk_add_options MOZ_OBJDIR=%%PM_BUILD_DIR%%
10
11
ac_add_options --enable-application=palemoon
12
ac_add_options --enable-optimize="-w %%PM_OPTIMIZE%%"
13
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
14
# OlCe: Commented out. Old version of jemalloc calls pthread_mutex_init which
15
# now in FreeBSD calls back malloc...
16
#ac_add_options --enable-jemalloc
17
ac_add_options --enable-strip
18
ac_add_options --enable-devtools
19
ac_add_options --disable-eme
20
ac_add_options --disable-webrtc
21
ac_add_options --disable-gamepad
22
ac_add_options --disable-tests
23
ac_add_options --disable-debug
24
ac_add_options --disable-necko-wifi
25
ac_add_options --disable-updater
26
ac_add_options --with-pthreads
27
ac_add_options --enable-phoenix-extensions
28
29
export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
30
31
# Don't bother compressing, mach's package is just intermediate file
32
export MOZ_PKG_FORMAT=TAR
33
34
# Below this line, build options depending on port options, as well as make and
35
# build flags, will be appended.
(-)www/newmoon/files/patch-platform_gfx_harfbuzz_src_hb-blob.cc (+15 lines)
Line 0 Link Here
1
--- ./platform/gfx/harfbuzz/src/hb-blob.cc
2
+++ ./platform/gfx/harfbuzz/src/hb-blob.cc
3
@@ -25,6 +25,8 @@
4
  */
5
6
+#ifndef __FreeBSD__
7
 /* http://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html */
8
 #ifndef _POSIX_C_SOURCE
9
 #define _POSIX_C_SOURCE 199309L
10
 #endif
11
+#endif
12
13
 #include "hb-private.hh"
14
15
 #include "hb-object-private.hh"
(-)www/newmoon/files/patch-platform_ipc_chromium_src_third__party_libevent_evutil__rand.c (+11 lines)
Line 0 Link Here
1
--- ./platform/ipc/chromium/src/third_party/libevent/evutil_rand.c
2
+++ ./platform/ipc/chromium/src/third_party/libevent/evutil_rand.c
3
@@ -139,7 +139,7 @@ evutil_secure_rng_get_bytes(void *buf, size_t n)
4
 	ev_arc4random_buf(buf, n);
5
 }
6
7
-#if !defined(__OpenBSD__) && !defined(ANDROID) && !defined(__sun__)
8
+#if !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(ANDROID) && !defined(__sun__)
9
 void
10
 evutil_secure_rng_add_bytes(const char *buf, size_t n)
11
 {
(-)www/newmoon/files/patch-platform_memory_mozjemalloc_jemalloc.c (+12 lines)
Line 0 Link Here
1
--- ./platform/memory/mozjemalloc/jemalloc.c
2
+++ ./platform/memory/mozjemalloc/jemalloc.c
3
@@ -174,6 +174,9 @@
4
 #endif
5
6
 #include <sys/types.h>
7
+#ifdef MOZ_MEMORY_BSD
8
+#include <sys/sysctl.h>
9
+#endif
10
11
 #include <errno.h>
12
 #include <stdlib.h>
(-)www/newmoon/files/patch-platform_python_mozbuild_mozbuild_configure___init__.py (+14 lines)
Line 0 Link Here
1
--- ./platform/python/mozbuild/mozbuild/configure/__init__.py~	2020-10-24 10:42:23.000000000 +0000
2
+++ ./platform/python/mozbuild/mozbuild/configure/__init__.py	2020-11-09 12:31:00.109014000 +0000
3
@@ -192,8 +192,9 @@
4
         b: __builtins__[b]
5
         for b in ('None', 'False', 'True', 'int', 'bool', 'any', 'all', 'len',
6
                   'list', 'tuple', 'set', 'dict', 'isinstance', 'getattr',
7
-                  'hasattr', 'enumerate', 'range', 'zip')
8
-    }, __import__=forbidden_import, str=unicode)
9
+                  'hasattr', 'enumerate', 'range', 'zip', '__build_class__')
10
+        if b in __builtins__},
11
+    __import__=forbidden_import, str=unicode)
12
 
13
     # Expose a limited set of functions from os.path
14
     OS = ReadOnlyNamespace(path=ReadOnlyNamespace(**{
(-)www/newmoon/files/patch-platform_python_mozbuild_mozbuild_frontend_sandbox.py (+14 lines)
Line 0 Link Here
1
--- ./platform/python/mozbuild/mozbuild/frontend/sandbox.py~	2020-10-24 10:42:23.000000000 +0000
2
+++ ./platform/python/mozbuild/mozbuild/frontend/sandbox.py	2020-11-09 12:38:55.634959000 +0000
3
@@ -115,7 +115,10 @@
4
     def __init__(self, context, builtins=None, finder=default_finder):
5
         """Initialize a Sandbox ready for execution.
6
         """
7
-        self._builtins = builtins or self.BUILTINS
8
+        self._builtins = ReadOnlyDict(
9
+            (builtins or self.BUILTINS).viewitems() |
10
+            {b: __builtins__[b] for b in ('__build_class__',)
11
+             if b in __builtins__}.viewitems())
12
         dict.__setitem__(self, '__builtins__', self._builtins)
13
 
14
         assert isinstance(self._builtins, ReadOnlyDict)
(-)www/newmoon/files/patch-platform_python_psutil_psutil___psutil__bsd.c (+245 lines)
Line 0 Link Here
1
--- ./platform/python/psutil/psutil/_psutil_bsd.c
2
+++ ./platform/python/psutil/psutil/_psutil_bsd.c
3
@@ -12,6 +12,7 @@
4
 #include <errno.h>
5
 #include <stdlib.h>
6
 #include <stdio.h>
7
+#include <err.h>
8
 #include <signal.h>
9
 #include <fcntl.h>
10
 #include <paths.h>
11
@@ -38,7 +39,7 @@
12
 #include <netinet/tcp_fsm.h>   // for TCP connection states
13
 #include <arpa/inet.h>         // for inet_ntop()
14
15
-#if __FreeBSD_version < 900000
16
+#if !defined(__FreeBSD_version)
17
 #include <utmp.h>         // system users
18
 #else
19
 #include <utmpx.h>
20
@@ -601,11 +602,7 @@ psutil_virtual_mem(PyObject *self, PyObject *args)
21
     struct vmtotal vm;
22
     int            mib[] = {CTL_VM, VM_METER};
23
     long           pagesize = getpagesize();
24
-#if __FreeBSD_version > 702101
25
     long buffers;
26
-#else
27
-    int buffers;
28
-#endif
29
     size_t buffers_size = sizeof(buffers);
30
31
     if (sysctlbyname("vm.stats.vm.v_page_count", &total, &size, NULL, 0))
32
@@ -724,13 +721,13 @@ psutil_cpu_times(PyObject *self, PyObject *args)
33
34
 /*
35
  * XXX
36
- * These functions are available on FreeBSD 8 only.
37
+ * These functions were seen available on FreeBSD only.
38
  * In the upper python layer we do various tricks to avoid crashing
39
  * and/or to provide alternatives where possible.
40
  */
41
42
43
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000
44
+#if defined(__FreeBSD_version)
45
 /*
46
  * Return files opened by process as a list of (path, fd) tuples.
47
  * TODO: this is broken as it may report empty paths. 'procstat'
48
@@ -943,11 +940,19 @@ psutil_sockaddr_matches(int family, int port, void *pcb_addr,
49
                    psutil_sockaddr_addrlen(family)) == 0);
50
 }
51
52
+#if __FreeBSD_version >= 1200026
53
+static struct xtcpcb *
54
+psutil_search_tcplist(char *buf, struct kinfo_file *kif)
55
+{
56
+    struct xtcpcb *tp;
57
+    struct xinpcb *inp;
58
+#else
59
 static struct tcpcb *
60
 psutil_search_tcplist(char *buf, struct kinfo_file *kif)
61
 {
62
     struct tcpcb *tp;
63
     struct inpcb *inp;
64
+#endif
65
     struct xinpgen *xig, *oxig;
66
     struct xsocket *so;
67
68
@@ -955,9 +960,15 @@ psutil_search_tcplist(char *buf, struct kinfo_file *kif)
69
     for (xig = (struct xinpgen *)((char *)xig + xig->xig_len);
70
             xig->xig_len > sizeof(struct xinpgen);
71
             xig = (struct xinpgen *)((char *)xig + xig->xig_len)) {
72
+#if __FreeBSD_version >= 1200026
73
+        tp = (struct xtcpcb *)xig;
74
+        inp = &tp->xt_inp;
75
+        so = &inp->xi_socket;
76
+#else
77
         tp = &((struct xtcpcb *)xig)->xt_tp;
78
         inp = &((struct xtcpcb *)xig)->xt_inp;
79
         so = &((struct xtcpcb *)xig)->xt_socket;
80
+#endif
81
82
         if (so->so_type != kif->kf_sock_type ||
83
                 so->xso_family != kif->kf_sock_domain ||
84
@@ -967,20 +978,36 @@ psutil_search_tcplist(char *buf, struct kinfo_file *kif)
85
         if (kif->kf_sock_domain == AF_INET) {
86
             if (!psutil_sockaddr_matches(
87
                     AF_INET, inp->inp_lport, &inp->inp_laddr,
88
+#if __FreeBSD_version < 1200031
89
                     &kif->kf_sa_local))
90
+#else
91
+                    &kif->kf_un.kf_sock.kf_sa_local))
92
+#endif
93
                 continue;
94
             if (!psutil_sockaddr_matches(
95
                     AF_INET, inp->inp_fport, &inp->inp_faddr,
96
+#if __FreeBSD_version < 1200031
97
                     &kif->kf_sa_peer))
98
+#else
99
+                    &kif->kf_un.kf_sock.kf_sa_peer))
100
+#endif
101
                 continue;
102
         } else {
103
             if (!psutil_sockaddr_matches(
104
                     AF_INET6, inp->inp_lport, &inp->in6p_laddr,
105
+#if __FreeBSD_version < 1200031
106
                     &kif->kf_sa_local))
107
+#else
108
+                    &kif->kf_un.kf_sock.kf_sa_local))
109
+#endif
110
                 continue;
111
             if (!psutil_sockaddr_matches(
112
                     AF_INET6, inp->inp_fport, &inp->in6p_faddr,
113
+#if __FreeBSD_version < 1200031
114
                     &kif->kf_sa_peer))
115
+#else
116
+                    &kif->kf_un.kf_sock.kf_sa_peer))
117
+#endif
118
                 continue;
119
         }
120
121
@@ -1005,7 +1032,11 @@ psutil_proc_connections(PyObject *self, PyObject *args)
122
     struct kinfo_file *freep = NULL;
123
     struct kinfo_file *kif;
124
     char *tcplist = NULL;
125
+#if __FreeBSD_version >= 1200026
126
+    struct xtcpcb *tcp;
127
+#else
128
     struct tcpcb *tcp;
129
+#endif
130
131
     PyObject *retList = PyList_New(0);
132
     PyObject *tuple = NULL;
133
@@ -1074,19 +1105,35 @@ psutil_proc_connections(PyObject *self, PyObject *args)
134
                 inet_ntop(
135
                     kif->kf_sock_domain,
136
                     psutil_sockaddr_addr(kif->kf_sock_domain,
137
+#if __FreeBSD_version < 1200031
138
                                          &kif->kf_sa_local),
139
+#else
140
+                                         &kif->kf_un.kf_sock.kf_sa_local),
141
+#endif
142
                     lip,
143
                     sizeof(lip));
144
                 inet_ntop(
145
                     kif->kf_sock_domain,
146
                     psutil_sockaddr_addr(kif->kf_sock_domain,
147
+#if __FreeBSD_version < 1200031
148
                                          &kif->kf_sa_peer),
149
+#else
150
+                                         &kif->kf_un.kf_sock.kf_sa_peer),
151
+#endif
152
                     rip,
153
                     sizeof(rip));
154
                 lport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
155
+#if __FreeBSD_version < 1200031
156
                                                    &kif->kf_sa_local));
157
+#else
158
+                                                   &kif->kf_un.kf_sock.kf_sa_local));
159
+#endif
160
                 rport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
161
+#if __FreeBSD_version < 1200031
162
                                                    &kif->kf_sa_peer));
163
+#else
164
+                                                   &kif->kf_un.kf_sock.kf_sa_peer));
165
+#endif
166
167
                 // construct python tuple/list
168
                 laddr = Py_BuildValue("(si)", lip, lport);
169
@@ -1115,7 +1162,11 @@ psutil_proc_connections(PyObject *self, PyObject *args)
170
             else if (kif->kf_sock_domain == AF_UNIX) {
171
                 struct sockaddr_un *sun;
172
173
+#if __FreeBSD_version < 1200031
174
                 sun = (struct sockaddr_un *)&kif->kf_sa_local;
175
+#else
176
+                sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local;
177
+#endif
178
                 snprintf(
179
                     path, sizeof(path), "%.*s",
180
                     (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
181
@@ -1626,7 +1677,7 @@ psutil_users(PyObject *self, PyObject *args)
182
     if (ret_list == NULL)
183
         return NULL;
184
185
-#if __FreeBSD_version < 900000
186
+#if !defined(__FreeBSD_version)
187
     struct utmp ut;
188
     FILE *fp;
189
190
@@ -1754,7 +1805,11 @@ int psutil_gather_inet(int proto, PyObject *py_retlist)
191
     struct xinpgen *xig, *exig;
192
     struct xinpcb *xip;
193
     struct xtcpcb *xtp;
194
+#if __FreeBSD_version >= 1200026
195
+    struct xinpcb *inp;
196
+#else
197
     struct inpcb *inp;
198
+#endif
199
     struct xsocket *so;
200
     const char *varname = NULL;
201
     size_t len, bufsize;
202
@@ -1820,8 +1875,13 @@ int psutil_gather_inet(int proto, PyObject *py_retlist)
203
                     goto error;
204
                 }
205
                 inp = &xtp->xt_inp;
206
+#if __FreeBSD_version >= 1200026
207
+                so = &inp->xi_socket;
208
+                status = xtp->t_state;
209
+#else
210
                 so = &xtp->xt_socket;
211
                 status = xtp->xt_tp.t_state;
212
+#endif
213
                 break;
214
             case IPPROTO_UDP:
215
                 xip = (struct xinpcb *)xig;
216
@@ -1830,7 +1890,11 @@ int psutil_gather_inet(int proto, PyObject *py_retlist)
217
                                  "struct xinpcb size mismatch");
218
                     goto error;
219
                 }
220
+#if __FreeBSD_version >= 1200026
221
+                inp = xip;
222
+#else
223
                 inp = &xip->xi_inp;
224
+#endif
225
                 so = &xip->xi_socket;
226
                 status = PSUTIL_CONN_NONE;
227
                 break;
228
@@ -2166,7 +2230,7 @@ PsutilMethods[] =
229
      "Return process CPU affinity."},
230
     {"proc_cpu_affinity_set", psutil_proc_cpu_affinity_set, METH_VARARGS,
231
      "Set process CPU affinity."},
232
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000
233
+#if defined(__FreeBSD_version)
234
     {"proc_open_files", psutil_proc_open_files, METH_VARARGS,
235
      "Return files opened by process as a list of (path, fd) tuples"},
236
     {"proc_cwd", psutil_proc_cwd, METH_VARARGS,
237
@@ -2191,7 +2255,7 @@ PsutilMethods[] =
238
      "Return swap mem stats"},
239
     {"cpu_times", psutil_cpu_times, METH_VARARGS,
240
      "Return system cpu times as a tuple (user, system, nice, idle, irc)"},
241
-#if defined(__FreeBSD_version) && __FreeBSD_version >= 800000
242
+#if defined(__FreeBSD_version)
243
     {"per_cpu_times", psutil_per_cpu_times, METH_VARARGS,
244
      "Return system per-cpu times as a list of tuples"},
245
 #endif
(-)www/newmoon/files/patch-platform_python_virtualenv_site.py (+33 lines)
Line 0 Link Here
1
--- ./platform/python/virtualenv/site.py	2020-10-24 10:42:23.000000000 +0000
2
+++ ./platform/python/virtualenv/site.py	2020-11-09 17:42:48.105834000 +0000
3
@@ -233,10 +233,10 @@
4
             elif os.sep == '/':
5
                 sitedirs = [os.path.join(prefix,
6
                                          "lib",
7
-                                         "python" + sys.version[:3],
8
+                                         "tauthon" + sys.version[:3],
9
                                          "site-packages"),
10
                             os.path.join(prefix, "lib", "site-python"),
11
-                            os.path.join(prefix, "python" + sys.version[:3], "lib-dynload")]
12
+                            os.path.join(prefix, "tauthon" + sys.version[:3], "lib-dynload")]
13
                 lib64_dir = os.path.join(prefix, "lib64", "python" + sys.version[:3], "site-packages")
14
                 if (os.path.exists(lib64_dir) and
15
                     os.path.realpath(lib64_dir) not in [os.path.realpath(p) for p in sitedirs]):
16
@@ -583,7 +583,7 @@
17
     elif sys.platform == 'win32' and os.sep == '\\':
18
         paths = [os.path.join(sys.real_prefix, 'Lib'), os.path.join(sys.real_prefix, 'DLLs')]
19
     else:
20
-        paths = [os.path.join(sys.real_prefix, 'lib', 'python'+sys.version[:3])]
21
+        paths = [os.path.join(sys.real_prefix, 'lib', 'tauthon'+sys.version[:3])]
22
         hardcoded_relative_dirs = paths[:] # for the special 'darwin' case below
23
         lib64_path = os.path.join(sys.real_prefix, 'lib64', 'python'+sys.version[:3])
24
         if os.path.exists(lib64_path):
25
@@ -602,7 +602,7 @@
26
             # This is a non-multiarch aware Python.  Fallback to the old way.
27
             arch = sys.platform
28
         plat_path = os.path.join(sys.real_prefix, 'lib',
29
-                                 'python'+sys.version[:3],
30
+                                 'tauthon'+sys.version[:3],
31
                                  'plat-%s' % arch)
32
         if os.path.exists(plat_path):
33
             paths.append(plat_path)
(-)www/newmoon/files/patch-platform_python_virtualenv_virtualenv.py (+20 lines)
Line 0 Link Here
1
--- ./platform/python/virtualenv/virtualenv.py	2020-10-24 10:42:23.000000000 +0000
2
+++ ./platform/python/virtualenv/virtualenv.py	2020-11-09 14:29:09.153232000 +0000
3
@@ -49,7 +49,7 @@
4
 except NameError:
5
     basestring = str
6
 
7
-py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
8
+py_version = 'tauthon%s.%s' % (sys.version_info[0], sys.version_info[1])
9
 
10
 is_jython = sys.platform.startswith('java')
11
 is_pypy = hasattr(sys, 'pypy_version_info')
12
@@ -131,6 +131,8 @@
13
         REQUIRED_MODULES.extend(['warnings', 'linecache', '_abcoll', 'abc'])
14
     if minver >= 7:
15
         REQUIRED_MODULES.extend(['_weakrefset'])
16
+    if minver >= 8:
17
+        REQUIRED_MODULES.extend(['_oserror'])
18
     if is_msys2:
19
         REQUIRED_MODULES.extend(['functools'])
20
 elif majver == 3:
(-)www/newmoon/pkg-descr (+23 lines)
Line 0 Link Here
1
New Moon is a browser built with most of the code of Pale Moon(TM), but is not
2
affiliated at all with Pale Moon nor Moonchild Productions, in the sense that
3
it is a third-party build which is not endorsed by them. Nonetheless, we try to
4
stick with their official Linux build instructions, as much as practically
5
feasible on FreeBSD.
6
7
Pale Moon offers you a browsing experience in a browser completely built from
8
its own, independently developed source that has been forked off from
9
Firefox/Mozilla code a number of years ago, with carefully selected features
10
and optimizations to improve the browser's stability and user experience, while
11
offering full customization and a growing collection of extensions and themes
12
to make the browser truly your own.
13
14
Some of the main features:
15
- Based on the Unified XUL Platform (UXP) containing our own optimized layout
16
  and rendering engine (Goanna).
17
- Safe: Forked from mature Mozilla code and regularly updated with the latest
18
  security patches.
19
- Secure: Additional security features and security-aware development
20
- Zero ads; no telemetry, spyware or data gathering
21
- Familiar, efficient, fully customizable interface
22
23
WWW: https://www.palemoon.org/
(-)www/newmoon/pkg-plist (+59 lines)
Line 0 Link Here
1
bin/palemoon
2
lib/palemoon/application.ini
3
lib/palemoon/browser/blocklist.xml
4
lib/palemoon/browser/chrome.manifest
5
lib/palemoon/browser/chrome/icons/default/default16.png
6
lib/palemoon/browser/chrome/icons/default/default32.png
7
lib/palemoon/browser/chrome/icons/default/default48.png
8
lib/palemoon/browser/components/components.manifest
9
lib/palemoon/browser/components/libbrowsercomps.so
10
lib/palemoon/browser/defaults/profile/chrome/userChrome-example.css
11
lib/palemoon/browser/defaults/profile/chrome/userContent-example.css
12
lib/palemoon/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
13
lib/palemoon/browser/icons/mozicon128.png
14
lib/palemoon/browser/omni.ja
15
lib/palemoon/browser/searchplugins/bing.xml
16
lib/palemoon/browser/searchplugins/duckduckgo-palemoon.xml
17
lib/palemoon/browser/searchplugins/ecosia.xml
18
lib/palemoon/browser/searchplugins/ekoru.xml
19
lib/palemoon/browser/searchplugins/twitter.xml
20
lib/palemoon/browser/searchplugins/wikipedia.xml
21
lib/palemoon/browser/searchplugins/yahoo.xml
22
lib/palemoon/browser/ua-update.json
23
lib/palemoon/chrome.manifest
24
lib/palemoon/defaults/pref/channel-prefs.js
25
lib/palemoon/dependentlibs.list
26
lib/palemoon/dictionaries/en-US.aff
27
lib/palemoon/dictionaries/en-US.dic
28
%%GTK3%%lib/palemoon/gtk2/libmozgtk.so
29
lib/palemoon/icudt58l.dat
30
lib/palemoon/libfreebl3.chk
31
lib/palemoon/libfreebl3.so
32
lib/palemoon/liblgpllibs.so
33
lib/palemoon/libmozavcodec.so
34
lib/palemoon/libmozavutil.so
35
%%GTK3%%lib/palemoon/libmozgtk.so
36
lib/palemoon/libmozsqlite3.so
37
lib/palemoon/libnspr4.so
38
lib/palemoon/libnss3.so
39
lib/palemoon/libnssckbi.so
40
lib/palemoon/libnssdbm3.chk
41
lib/palemoon/libnssdbm3.so
42
lib/palemoon/libnssutil3.so
43
lib/palemoon/libplc4.so
44
lib/palemoon/libplds4.so
45
lib/palemoon/libsmime3.so
46
lib/palemoon/libsoftokn3.chk
47
lib/palemoon/libsoftokn3.so
48
lib/palemoon/libssl3.so
49
lib/palemoon/libxul.so
50
lib/palemoon/omni.ja
51
lib/palemoon/palemoon
52
lib/palemoon/palemoon-bin
53
lib/palemoon/platform.ini
54
lib/palemoon/plugin-container
55
lib/palemoon/precomplete
56
lib/palemoon/removed-files
57
lib/palemoon/run-mozilla.sh
58
share/applications/newmoon.desktop
59
share/pixmaps/palemoon.png

Return to bug 251117