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

Collapse All | Expand All

(-)www/palemoon/Makefile (+69 lines)
Line 0 Link Here
1
# Created by: Zhihao Yuan <lichray@gmail.com>
2
# $FreeBSD$
3
4
PORTNAME=	palemoon
5
DISTVERSION=	27.6.1
6
DISTVERSIONSUFFIX=_Release
7
CATEGORIES=	www ipv6
8
9
MAINTAINER=	lichray@gmail.com
10
COMMENT=	Open Source Goanna-based web browser
11
12
BUILD_DEPENDS=	nspr>=4.13.1:devel/nspr \
13
		nss>=3.29.5:security/nss \
14
		libevent>=2.0.21_2:devel/libevent \
15
		harfbuzz>=1.4.1:print/harfbuzz \
16
		graphite2>=1.3.8:graphics/graphite2 \
17
		png>=1.6.28:graphics/png \
18
		libvorbis>=1.3.5,3:audio/libvorbis \
19
		libvpx>=1.5.0:multimedia/libvpx \
20
		sqlite3>=3.17.0:databases/sqlite3 \
21
		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \
22
		v4l_compat>0:multimedia/v4l_compat \
23
		autoconf-2.13:devel/autoconf213 \
24
		yasm:devel/yasm \
25
		zip:archivers/zip
26
#		soundtouch>=1.9.0:audio/soundtouch \
27
28
LIB_DEPENDS=	libv4l2.so:multimedia/libv4l
29
30
USE_GITHUB=	yes
31
GH_ACCOUNT=	MoonchildProductions
32
GH_PROJECT=	Pale-Moon
33
34
USE_GECKO=	gecko
35
MOZ_PKGCONFIG_FILES=	# empty
36
USE_MOZILLA=	-soundtouch
37
38
USE_GL=		gl
39
40
PM_ICON=	${PORTNAME}.png
41
PM_ICON_SRC=	${PREFIX}/lib/${PORTNAME}/browser/icons/mozicon128.png
42
PM_DESKTOP=	${WRKSRC}/browser/branding/official/${PORTNAME}.desktop
43
MOZ_OPTIONS=	--enable-application=browser \
44
		--enable-official-branding \
45
		--enable-devtools \
46
		--enable-jemalloc \
47
		--enable-jemalloc-lib
48
LDFLAGS+=	-Wl,-rpath,${PREFIX}/lib/${PORTNAME}
49
50
OPTIONS_DEFAULT=	BUNDLED_CAIRO GTK2
51
52
.include "${.CURDIR}/../../www/firefox/Makefile.options"
53
54
WRKSRC:=	${WRKDIR}/${GH_PROJECT}-${DISTVERSIONFULL}
55
56
post-patch:
57
	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
58
		${WRKSRC}/browser/app/nsBrowserApp.cpp
59
60
pre-configure:
61
	(cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13)
62
	(cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13)
63
64
post-install:
65
	${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
66
	${INSTALL_DATA} ${PM_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/
67
	${LN} -sf ${PM_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${PM_ICON}
68
69
.include <bsd.port.mk>
(-)www/palemoon/distinfo (+3 lines)
Line 0 Link Here
1
TIMESTAMP = 1510878123
2
SHA256 (MoonchildProductions-Pale-Moon-27.6.1_Release_GH0.tar.gz) = bf426f51274472178dec248b258bfc8f2f33fbecb1cb70c36ee36a46a4dd6926
3
SIZE (MoonchildProductions-Pale-Moon-27.6.1_Release_GH0.tar.gz) = 179623221
(-)www/palemoon/files/patch-browser-app-nsBrowserApp.cpp (+12 lines)
Line 0 Link Here
1
--- browser/app/nsBrowserApp.cpp.orig	2017-11-14 14:36:13 UTC
2
+++ browser/app/nsBrowserApp.cpp
3
@@ -409,6 +409,9 @@ int main(int argc, char* argv[])
4
 #endif
5
   uint64_t start = TimeStamp_Now();
6
 
7
+  setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
8
+  setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0);
9
+
10
 #ifdef XP_MACOSX
11
   TriggerQuirks();
12
 #endif
(-)www/palemoon/files/patch-browser_installer_Makefile.in (+13 lines)
Line 0 Link Here
1
--- browser/installer/Makefile.in.orig	2017-11-14 14:36:13 UTC
2
+++ browser/installer/Makefile.in
3
@@ -108,10 +108,6 @@ MOZ_PKG_MAC_ICON=branding/disk.icns
4
 MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ '
5
 endif
6
 
7
-ifndef LIBXUL_SDK
8
-INSTALL_SDK = 1
9
-endif
10
-
11
 include $(topsrcdir)/toolkit/mozapps/installer/signing.mk
12
 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
13
 
(-)www/palemoon/files/patch-bug847568 (+216 lines)
Line 0 Link Here
1
# Allow building against system-wide graphite2/harfbuzz.
2
3
--- config/Makefile.in.orig	2017-11-14 14:36:13 UTC
4
+++ config/Makefile.in
5
@@ -78,6 +78,8 @@ export:: $(export-preqs)
6
 		-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
7
 		-DMOZ_NATIVE_LIBWEBP=$(MOZ_NATIVE_LIBWEBP) \
8
 		-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
9
+		-DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \
10
+		-DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \
11
 		$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
12
 	$(INSTALL) system_wrappers $(DIST)
13
 
14
--- config/system-headers.orig	2017-11-14 14:36:13 UTC
15
+++ config/system-headers
16
@@ -1359,3 +1359,11 @@ unicode/utypes.h
17
 #endif
18
 libutil.h
19
 unwind.h
20
+#if MOZ_NATIVE_GRAPHITE2==1
21
+graphite2/Font.h
22
+graphite2/Segment.h
23
+#endif
24
+#if MOZ_NATIVE_HARFBUZZ==1
25
+harfbuzz/hb-ot.h
26
+harfbuzz/hb.h
27
+#endif
28
--- configure.in.orig	2017-11-14 14:36:13 UTC
29
+++ configure.in
30
@@ -7746,6 +7746,49 @@ if test "$USE_FC_FREETYPE"; then
31
 fi
32
 
33
 dnl ========================================================
34
+dnl Check for harfbuzz
35
+dnl ========================================================
36
+
37
+MOZ_ARG_WITH_BOOL(system-harfbuzz,
38
+[  --with-system-harfbuzz  Use system harfbuzz (located with pkgconfig)],
39
+MOZ_NATIVE_HARFBUZZ=1,
40
+MOZ_NATIVE_HARFBUZZ=)
41
+
42
+if test -n "$MOZ_NATIVE_HARFBUZZ"; then
43
+    PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34)
44
+fi
45
+
46
+AC_SUBST(MOZ_NATIVE_HARFBUZZ)
47
+
48
+dnl ========================================================
49
+dnl Check for graphite2
50
+dnl ========================================================
51
+
52
+MOZ_ARG_WITH_BOOL(system-graphite2,
53
+[  --with-system-graphite2 Use system graphite2 (located with pkgconfig)],
54
+MOZ_NATIVE_GRAPHITE2=1,
55
+MOZ_NATIVE_GRAPHITE2=)
56
+
57
+if test -n "$MOZ_NATIVE_GRAPHITE2"; then
58
+    PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2)
59
+
60
+    dnl graphite2.pc has bogus version, check manually
61
+    AC_TRY_COMPILE([ #include <graphite2/Font.h>
62
+                     #define GR2_VERSION_REQUIRE(major,minor,bugfix)  \
63
+                             ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \
64
+                               * 100 + GR2_VERSION_BUGFIX >= \
65
+                               (major) * 10000 + (minor) * 100 + (bugfix) )
66
+                   ], [
67
+                     #if !GR2_VERSION_REQUIRE(1,2,4)
68
+                     #error "Insufficient graphite2 version."
69
+                     #endif
70
+                   ], [],
71
+                   [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
72
+fi
73
+
74
+AC_SUBST(MOZ_NATIVE_GRAPHITE2)
75
+
76
+dnl ========================================================
77
 dnl Check for pixman and cairo
78
 dnl ========================================================
79
 
80
--- dom/base/moz.build.orig	2017-11-14 14:36:13 UTC
81
+++ dom/base/moz.build
82
@@ -366,6 +366,9 @@ if CONFIG['INTEL_ARCHITECTURE']:
83
     SOURCES += ['nsTextFragmentSSE2.cpp']
84
     SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
85
 
86
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
87
+    SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS']
88
+
89
 EXTRA_COMPONENTS += [
90
     'ConsoleAPI.manifest',
91
     'ConsoleAPIStorage.js',
92
--- gfx/graphite2/moz-gr-update.sh.orig	2017-11-14 14:36:13 UTC
93
+++ gfx/graphite2/moz-gr-update.sh
94
@@ -37,6 +37,9 @@ echo "See" $0 "for update procedure." >>
95
 #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
96
 #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
97
 
98
+perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
99
+  if /GR2_VERSION_REQUIRE/" configure.in
100
+
101
 # summarize what's been touched
102
 echo Updated to $RELEASE.
103
 echo Here is what changed in the gfx/graphite2 directory:
104
--- gfx/harfbuzz/README-mozilla.orig	2017-11-14 14:36:13 UTC
105
+++ gfx/harfbuzz/README-mozilla
106
@@ -19,3 +19,8 @@ the mozilla tree.
107
 
108
 If the collection of source files changes, manual updates to moz.build may be
109
 needed, as we don't use the upstream makefiles.
110
+
111
+The in-tree copy may be omitted during build by --with-system-harfbuzz.
112
+Make sure to keep pkg-config version check within configure.in in sync
113
+with checkout version or increment latest tag by one if it's not based
114
+on upstream release.
115
--- gfx/moz.build.orig	2017-11-14 14:36:13 UTC
116
+++ gfx/moz.build
117
@@ -7,6 +7,12 @@
118
 if CONFIG['MOZ_TREE_CAIRO']:
119
     DIRS += ['cairo']
120
 
121
+if not CONFIG['MOZ_NATIVE_GRAPHITE2']:
122
+    DIRS += ['graphite2/src' ]
123
+
124
+if not CONFIG['MOZ_NATIVE_HARFBUZZ']:
125
+    DIRS += ['harfbuzz/src']
126
+
127
 DIRS += [
128
     '2d',
129
     'ycbcr',
130
@@ -15,8 +21,6 @@ DIRS += [
131
     'qcms',
132
     'gl',
133
     'layers',
134
-    'graphite2/src',
135
-    'harfbuzz/src',
136
     'ots/src',
137
     'thebes',
138
     'ipc',
139
--- gfx/skia/generate_mozbuild.py.orig	2017-11-14 14:36:13 UTC
140
+++ gfx/skia/generate_mozbuild.py
141
@@ -157,6 +157,9 @@ if CONFIG['CLANG_CXX']:
142
             '-Wno-unused-private-field',
143
         ]
144
 
145
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
146
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
147
+
148
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
149
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
150
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
151
--- gfx/skia/moz.build.orig	2017-11-14 14:36:13 UTC
152
+++ gfx/skia/moz.build
153
@@ -987,6 +987,9 @@ if CONFIG['CLANG_CXX']:
154
         '-Wno-unused-private-field',
155
     ]
156
 
157
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
158
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
159
+
160
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'):
161
     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
162
     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
163
--- gfx/thebes/moz.build.orig	2017-11-14 14:36:13 UTC
164
+++ gfx/thebes/moz.build
165
@@ -298,7 +298,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
166
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
167
     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
168
 
169
-DEFINES['GRAPHITE2_STATIC'] = True
170
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
171
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
172
+
173
+if CONFIG['MOZ_NATIVE_GRAPHITE2']:
174
+    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
175
+else:
176
+    DEFINES['GRAPHITE2_STATIC'] = True
177
 
178
 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
179
     DEFINES['OTS_DLL'] = True
180
--- intl/unicharutil/util/moz.build.orig	2017-11-14 14:36:13 UTC
181
+++ intl/unicharutil/util/moz.build
182
@@ -38,5 +38,8 @@ if CONFIG['_MSC_VER']:
183
 if CONFIG['ENABLE_INTL_API']:
184
     CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS']
185
 
186
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
187
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
188
+
189
 if CONFIG['GNU_CXX']:
190
     FAIL_ON_WARNINGS = True
191
--- netwerk/dns/moz.build.orig	2017-11-14 14:36:13 UTC
192
+++ netwerk/dns/moz.build
193
@@ -68,5 +68,8 @@ LOCAL_INCLUDES += [
194
     '/netwerk/base',
195
 ]
196
 
197
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
198
+    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
199
+
200
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19':
201
     CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
202
--- toolkit/library/moz.build.orig	2017-11-14 14:36:13 UTC
203
+++ toolkit/library/moz.build
204
@@ -230,6 +230,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']:
205
 if not CONFIG['MOZ_TREE_PIXMAN']:
206
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
207
 
208
+if CONFIG['MOZ_NATIVE_GRAPHITE2']:
209
+    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
210
+
211
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
212
+    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
213
+
214
 if CONFIG['MOZ_ALSA']:
215
     OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
216
 
(-)www/palemoon/files/patch-bug991253 (+17 lines)
Line 0 Link Here
1
--- extensions/spellcheck/hunspell/glue/mozHunspell.cpp.orig	2017-11-14 14:36:13 UTC
2
+++ extensions/spellcheck/hunspell/glue/mozHunspell.cpp
3
@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
4
     }
5
   }
6
 
7
+  // load system hunspell dictionaries
8
+  nsCOMPtr<nsIFile> hunDir;
9
+  NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
10
+                        true, getter_AddRefs(hunDir));
11
+  if (hunDir) {
12
+      LoadDictionariesFromDir(hunDir);
13
+  }
14
+
15
   // find dictionaries from extensions requiring restart
16
   nsCOMPtr<nsISimpleEnumerator> dictDirs;
17
   rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST,
(-)www/palemoon/files/patch-config-baseconfig.mk (+17 lines)
Line 0 Link Here
1
--- config/baseconfig.mk.orig	2017-11-14 14:36:13 UTC
2
+++ config/baseconfig.mk
3
@@ -2,10 +2,10 @@
4
 # directly in python/mozbuild/mozbuild/base.py for gmake validation.
5
 # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending
6
 # whether a normal build is happening or whether the check is running.
7
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
8
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
9
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
10
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
11
+includedir := $(includedir)/%%MOZILLA%%
12
+idldir = $(datadir)/idl/%%MOZILLA%%
13
+installdir = $(libdir)/%%MOZILLA%%
14
+sdkdir = $(libdir)/%%MOZILLA%%
15
 ifndef TOP_DIST
16
 TOP_DIST = dist
17
 endif
(-)www/palemoon/files/patch-media_libnestegg_src_align.h (+21 lines)
Line 0 Link Here
1
--- media/libnestegg/src/align.h.orig	2017-11-14 14:36:13 UTC
2
+++ media/libnestegg/src/align.h
3
@@ -15,14 +15,16 @@
4
 #ifndef _LIBP_ALIGN_H_
5
 #define _LIBP_ALIGN_H_
6
 
7
-#ifdef _MSC_VER
8
+#include <stddef.h>
9
+
10
+#if defined(_MSC_VER)
11
 
12
 /*
13
  * MSVC defines max_align_t as a double.
14
  */
15
 typedef double max_align_t;
16
 
17
-#else
18
+#elif !defined(_GCC_MAX_ALIGN_T)
19
 
20
 /*
21
  *	a type with the most strict alignment requirements
(-)www/palemoon/files/patch-python_psutil_psutil___psutil__bsd.c (+212 lines)
Line 0 Link Here
1
--- python/psutil/psutil/_psutil_bsd.c.orig	2017-11-14 14:36:13 UTC
2
+++ 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
@@ -957,11 +958,19 @@ psutil_sockaddr_matches(int family, int 
12
                    psutil_sockaddr_addrlen(family)) == 0);
13
 }
14
 
15
+#if __FreeBSD_version >= 1200026
16
+static struct xtcpcb *
17
+psutil_search_tcplist(char *buf, struct kinfo_file *kif)
18
+{
19
+    struct xtcpcb *tp;
20
+    struct xinpcb *inp;
21
+#else
22
 static struct tcpcb *
23
 psutil_search_tcplist(char *buf, struct kinfo_file *kif)
24
 {
25
     struct tcpcb *tp;
26
     struct inpcb *inp;
27
+#endif
28
     struct xinpgen *xig, *oxig;
29
     struct xsocket *so;
30
 
31
@@ -969,9 +978,15 @@ psutil_search_tcplist(char *buf, struct 
32
     for (xig = (struct xinpgen *)((char *)xig + xig->xig_len);
33
             xig->xig_len > sizeof(struct xinpgen);
34
             xig = (struct xinpgen *)((char *)xig + xig->xig_len)) {
35
+#if __FreeBSD_version >= 1200026
36
+	tp = (struct xtcpcb *)xig;
37
+	inp = &tp->xt_inp;
38
+	so = &inp->xi_socket;
39
+#else
40
         tp = &((struct xtcpcb *)xig)->xt_tp;
41
         inp = &((struct xtcpcb *)xig)->xt_inp;
42
         so = &((struct xtcpcb *)xig)->xt_socket;
43
+#endif
44
 
45
         if (so->so_type != kif->kf_sock_type ||
46
                 so->xso_family != kif->kf_sock_domain ||
47
@@ -981,20 +996,36 @@ psutil_search_tcplist(char *buf, struct 
48
         if (kif->kf_sock_domain == AF_INET) {
49
             if (!psutil_sockaddr_matches(
50
                     AF_INET, inp->inp_lport, &inp->inp_laddr,
51
+#if __FreeBSD_version < 1200031
52
                     &kif->kf_sa_local))
53
+#else
54
+                    &kif->kf_un.kf_sock.kf_sa_local))
55
+#endif
56
                 continue;
57
             if (!psutil_sockaddr_matches(
58
                     AF_INET, inp->inp_fport, &inp->inp_faddr,
59
+#if __FreeBSD_version < 1200031
60
                     &kif->kf_sa_peer))
61
+#else
62
+                    &kif->kf_un.kf_sock.kf_sa_peer))
63
+#endif
64
                 continue;
65
         } else {
66
             if (!psutil_sockaddr_matches(
67
                     AF_INET6, inp->inp_lport, &inp->in6p_laddr,
68
+#if __FreeBSD_version < 1200031
69
                     &kif->kf_sa_local))
70
+#else
71
+                    &kif->kf_un.kf_sock.kf_sa_local))
72
+#endif
73
                 continue;
74
             if (!psutil_sockaddr_matches(
75
                     AF_INET6, inp->inp_fport, &inp->in6p_faddr,
76
+#if __FreeBSD_version < 1200031
77
                     &kif->kf_sa_peer))
78
+#else
79
+                    &kif->kf_un.kf_sock.kf_sa_peer))
80
+#endif
81
                 continue;
82
         }
83
 
84
@@ -1019,7 +1050,11 @@ psutil_proc_connections(PyObject *self, 
85
     struct kinfo_file *freep = NULL;
86
     struct kinfo_file *kif;
87
     char *tcplist = NULL;
88
+#if __FreeBSD_version >= 1200026
89
+    struct xtcpcb *tcp;
90
+#else
91
     struct tcpcb *tcp;
92
+#endif
93
 
94
     PyObject *retList = PyList_New(0);
95
     PyObject *tuple = NULL;
96
@@ -1094,19 +1129,35 @@ psutil_proc_connections(PyObject *self, 
97
                 inet_ntop(
98
                     kif->kf_sock_domain,
99
                     psutil_sockaddr_addr(kif->kf_sock_domain,
100
+#if __FreeBSD_version < 1200031
101
                                          &kif->kf_sa_local),
102
+#else
103
+                                         &kif->kf_un.kf_sock.kf_sa_local),
104
+#endif
105
                     lip,
106
                     sizeof(lip));
107
                 inet_ntop(
108
                     kif->kf_sock_domain,
109
                     psutil_sockaddr_addr(kif->kf_sock_domain,
110
+#if __FreeBSD_version < 1200031
111
                                          &kif->kf_sa_peer),
112
+#else
113
+                                         &kif->kf_un.kf_sock.kf_sa_peer),
114
+#endif
115
                     rip,
116
                     sizeof(rip));
117
                 lport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
118
+#if __FreeBSD_version < 1200031
119
                                                    &kif->kf_sa_local));
120
+#else
121
+                                                   &kif->kf_un.kf_sock.kf_sa_local));
122
+#endif
123
                 rport = htons(psutil_sockaddr_port(kif->kf_sock_domain,
124
+#if __FreeBSD_version < 1200031
125
                                                    &kif->kf_sa_peer));
126
+#else
127
+                                                   &kif->kf_un.kf_sock.kf_sa_peer));
128
+#endif
129
 
130
                 // construct python tuple/list
131
                 laddr = Py_BuildValue("(si)", lip, lport);
132
@@ -1137,10 +1188,14 @@ psutil_proc_connections(PyObject *self, 
133
             else if (kif->kf_sock_domain == AF_UNIX) {
134
                 struct sockaddr_un *sun;
135
 
136
+#if __FreeBSD_version < 1200031
137
                 sun = (struct sockaddr_un *)&kif->kf_sa_local;
138
+#else
139
+                sun = (struct sockaddr_un *)&kif->kf_un.kf_sock.kf_sa_local;
140
+#endif
141
                 snprintf(
142
                     path, sizeof(path), "%.*s",
143
-                    (sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
144
+                    (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
145
                     sun->sun_path);
146
 
147
                 tuple = Py_BuildValue("(iiisOi)",
148
@@ -1250,7 +1305,7 @@ void remove_spaces(char *str) {
149
     do
150
         while (*p2 == ' ')
151
             p2++;
152
-    while (*p1++ = *p2++);
153
+    while ((*p1++ = *p2++));
154
 }
155
 
156
 
157
@@ -1779,7 +1834,11 @@ int psutil_gather_inet(int proto, PyObje
158
     struct xinpgen *xig, *exig;
159
     struct xinpcb *xip;
160
     struct xtcpcb *xtp;
161
+#if __FreeBSD_version >= 1200026
162
+    struct xinpcb *inp;
163
+#else
164
     struct inpcb *inp;
165
+#endif
166
     struct xsocket *so;
167
     struct sock *sock;
168
     const char *varname;
169
@@ -1849,13 +1908,22 @@ int psutil_gather_inet(int proto, PyObje
170
                 PyErr_Format(PyExc_RuntimeError, "struct xinpcb size mismatch");
171
                 goto error;
172
             }
173
+#if __FreeBSD_version >= 1200026
174
+            inp = xip;
175
+#else
176
             inp = &xip->xi_inp;
177
+#endif
178
             so = &xip->xi_socket;
179
             break;
180
         }
181
 
182
+#if __FreeBSD_version >= 1200026
183
+        inp = xip;
184
+	so = xtp->t_state;
185
+#else
186
         inp = &xtp->xt_inp;
187
         so = &xtp->xt_socket;
188
+#endif
189
         char lip[200], rip[200];
190
         int family, lport, rport, pid, status;
191
 
192
@@ -1865,7 +1933,11 @@ int psutil_gather_inet(int proto, PyObje
193
             continue;
194
         lport = ntohs(inp->inp_lport);
195
         rport = ntohs(inp->inp_fport);
196
+#if __FreeBSD_version >= 1200026
197
+        status = xtp->t_state;
198
+#else
199
         status = xtp->xt_tp.t_state;
200
+#endif
201
 
202
         if (inp->inp_vflag & INP_IPV4) {
203
             family = AF_INET;
204
@@ -1985,7 +2057,7 @@ int psutil_gather_unix(int proto, PyObje
205
 
206
         sun = (struct sockaddr_un *)&xup->xu_addr;
207
         snprintf(path, sizeof(path), "%.*s",
208
-                 (sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
209
+                 (int)(sun->sun_len - (sizeof(*sun) - sizeof(sun->sun_path))),
210
                  sun->sun_path);
211
 
212
         tuple = Py_BuildValue("(iiisOii)", -1, AF_UNIX, proto, path, Py_None,
(-)www/palemoon/files/patch-xpcom_io_nsLocalFileUnix.cpp (+23 lines)
Line 0 Link Here
1
--- xpcom/io/nsLocalFileUnix.cpp.orig	2017-11-14 14:36:13 UTC
2
+++ xpcom/io/nsLocalFileUnix.cpp
3
@@ -13,9 +13,6 @@
4
 
5
 #include <sys/types.h>
6
 #include <sys/stat.h>
7
-#if !defined(XP_MACOSX)
8
-#include <sys/sysmacros.h> // No longer implicitly included in later glibc
9
-#endif
10
 #include <unistd.h>
11
 #include <fcntl.h>
12
 #include <errno.h>
13
@@ -31,6 +28,10 @@
14
 #define USE_LINUX_QUOTACTL
15
 #include <sys/mount.h>
16
 #include <sys/quota.h>
17
+#include <sys/sysmacros.h>
18
+#ifndef BLOCK_SIZE
19
+#define BLOCK_SIZE 1024 /* kernel block size */
20
+#endif
21
 #endif
22
 
23
 #include "xpcom-private.h"
(-)www/palemoon/pkg-descr (+15 lines)
Line 0 Link Here
1
Pale Moon offers you a browsing experience in a browser completely built
2
from its own, independently developed source that has been forked off
3
from Firefox/Mozilla code a number of years ago, with carefully selected
4
features and optimizations to improve the browser's stability and user
5
experience, while offering full customization and a growing collection
6
of extensions and themes to make the browser truly your own.
7
8
Main features:
9
10
 o Support for many Firefox extensions
11
 o Support for a growing number of Pale Moon exclusive extensions
12
 o Secure: Additional security features and security-aware development
13
 o Extensive and growing support for HTML5 and CSS3
14
15
WWW: https://www.palemoon.org/
(-)www/palemoon/pkg-message (+18 lines)
Line 0 Link Here
1
======================================================================
2
3
Any bug reports should be addressed to the maintainers at:
4
	gecko@FreeBSD.org
5
You may also Cc: freebsd-ports@FreeBSD.org. Please do not send
6
bug reports to any other addresses.
7
8
Please include the following information with any bug report:
9
* Output from 'uname -a'.
10
* Output from 'ident /usr/ports/www/palemoon/Makefile'
11
* Where/when did the problem occur: configuring, building, or
12
  running palemoon
13
* How can you reproduce the problem?
14
15
Thank you for your help in testing and reporting bugs, and we hope you
16
enjoy using Firefox.
17
The Maintainers (gecko@)
18
======================================================================

Return to bug 223597