--- www/palemoon/Makefile (nonexistent) +++ www/palemoon/Makefile (working copy) @@ -0,0 +1,69 @@ +# Created by: Zhihao Yuan +# $FreeBSD$ + +PORTNAME= palemoon +DISTVERSION= 27.6.1 +DISTVERSIONSUFFIX=_Release +CATEGORIES= www ipv6 + +MAINTAINER= gecko@FreeBSD.org +COMMENT= Open Source Goanna-based web browser + +BUILD_DEPENDS= nspr>=4.13.1:devel/nspr \ + nss>=3.29.5:security/nss \ + libevent>=2.0.21_2:devel/libevent \ + harfbuzz>=1.4.1:print/harfbuzz \ + graphite2>=1.3.8:graphics/graphite2 \ + png>=1.6.28:graphics/png \ + libvorbis>=1.3.5,3:audio/libvorbis \ + libvpx>=1.5.0:multimedia/libvpx \ + sqlite3>=3.17.0:databases/sqlite3 \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 \ + v4l_compat>0:multimedia/v4l_compat \ + autoconf-2.13:devel/autoconf213 \ + yasm:devel/yasm \ + zip:archivers/zip +# soundtouch>=1.9.0:audio/soundtouch \ + +LIB_DEPENDS= libv4l2.so:multimedia/libv4l + +USE_GITHUB= yes +GH_ACCOUNT= MoonchildProductions +GH_PROJECT= Pale-Moon + +USE_GECKO= gecko +MOZ_PKGCONFIG_FILES= # empty +USE_MOZILLA= -soundtouch + +USE_GL= gl + +PM_ICON= ${PORTNAME}.png +PM_ICON_SRC= ${PREFIX}/lib/${PORTNAME}/browser/icons/mozicon128.png +PM_DESKTOP= ${WRKSRC}/browser/branding/official/${PORTNAME}.desktop +MOZ_OPTIONS= --enable-application=browser \ + --enable-official-branding \ + --enable-devtools \ + --enable-jemalloc \ + --enable-jemalloc-lib +LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${PORTNAME} + +OPTIONS_DEFAULT= BUNDLED_CAIRO GTK2 + +.include "${.CURDIR}/../../www/firefox/Makefile.options" + +WRKSRC:= ${WRKDIR}/${GH_PROJECT}-${DISTVERSIONFULL} + +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/browser/app/nsBrowserApp.cpp + +pre-configure: + (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) + (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) + +post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps + ${INSTALL_DATA} ${PM_DESKTOP} ${STAGEDIR}${PREFIX}/share/applications/ + ${LN} -sf ${PM_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${PM_ICON} + +.include --- www/palemoon/distinfo (nonexistent) +++ www/palemoon/distinfo (working copy) @@ -0,0 +1,3 @@ +TIMESTAMP = 1510878123 +SHA256 (MoonchildProductions-Pale-Moon-27.6.1_Release_GH0.tar.gz) = bf426f51274472178dec248b258bfc8f2f33fbecb1cb70c36ee36a46a4dd6926 +SIZE (MoonchildProductions-Pale-Moon-27.6.1_Release_GH0.tar.gz) = 179623221 --- www/palemoon/files/patch-browser-app-nsBrowserApp.cpp (nonexistent) +++ www/palemoon/files/patch-browser-app-nsBrowserApp.cpp (working copy) @@ -0,0 +1,12 @@ +--- browser/app/nsBrowserApp.cpp.orig 2017-11-14 14:36:13 UTC ++++ browser/app/nsBrowserApp.cpp +@@ -409,6 +409,9 @@ int main(int argc, char* argv[]) + #endif + uint64_t start = TimeStamp_Now(); + ++ setenv("MOZ_GMP_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); ++ setenv("MOZ_PLUGIN_PATH", "%%LOCALBASE%%/lib/browser_plugins/symlinks/gecko", 0); ++ + #ifdef XP_MACOSX + TriggerQuirks(); + #endif --- www/palemoon/files/patch-browser_installer_Makefile.in (nonexistent) +++ www/palemoon/files/patch-browser_installer_Makefile.in (working copy) @@ -0,0 +1,13 @@ +--- browser/installer/Makefile.in.orig 2017-11-14 14:36:13 UTC ++++ browser/installer/Makefile.in +@@ -108,10 +108,6 @@ MOZ_PKG_MAC_ICON=branding/disk.icns + MOZ_PKG_MAC_EXTRA=--symlink '/Applications:/ ' + endif + +-ifndef LIBXUL_SDK +-INSTALL_SDK = 1 +-endif +- + include $(topsrcdir)/toolkit/mozapps/installer/signing.mk + include $(topsrcdir)/toolkit/mozapps/installer/packager.mk + --- www/palemoon/files/patch-bug847568 (nonexistent) +++ www/palemoon/files/patch-bug847568 (working copy) @@ -0,0 +1,216 @@ +# Allow building against system-wide graphite2/harfbuzz. + +--- config/Makefile.in.orig 2017-11-14 14:36:13 UTC ++++ config/Makefile.in +@@ -78,6 +78,8 @@ export:: $(export-preqs) + -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \ + -DMOZ_NATIVE_LIBWEBP=$(MOZ_NATIVE_LIBWEBP) \ + -DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \ ++ -DMOZ_NATIVE_GRAPHITE2=$(MOZ_NATIVE_GRAPHITE2) \ ++ -DMOZ_NATIVE_HARFBUZZ=$(MOZ_NATIVE_HARFBUZZ) \ + $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers + $(INSTALL) system_wrappers $(DIST) + +--- config/system-headers.orig 2017-11-14 14:36:13 UTC ++++ config/system-headers +@@ -1359,3 +1359,11 @@ unicode/utypes.h + #endif + libutil.h + unwind.h ++#if MOZ_NATIVE_GRAPHITE2==1 ++graphite2/Font.h ++graphite2/Segment.h ++#endif ++#if MOZ_NATIVE_HARFBUZZ==1 ++harfbuzz/hb-ot.h ++harfbuzz/hb.h ++#endif +--- configure.in.orig 2017-11-14 14:36:13 UTC ++++ configure.in +@@ -7746,6 +7746,49 @@ if test "$USE_FC_FREETYPE"; then + fi + + dnl ======================================================== ++dnl Check for harfbuzz ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-harfbuzz, ++[ --with-system-harfbuzz Use system harfbuzz (located with pkgconfig)], ++MOZ_NATIVE_HARFBUZZ=1, ++MOZ_NATIVE_HARFBUZZ=) ++ ++if test -n "$MOZ_NATIVE_HARFBUZZ"; then ++ PKG_CHECK_MODULES(MOZ_HARFBUZZ, harfbuzz >= 0.9.34) ++fi ++ ++AC_SUBST(MOZ_NATIVE_HARFBUZZ) ++ ++dnl ======================================================== ++dnl Check for graphite2 ++dnl ======================================================== ++ ++MOZ_ARG_WITH_BOOL(system-graphite2, ++[ --with-system-graphite2 Use system graphite2 (located with pkgconfig)], ++MOZ_NATIVE_GRAPHITE2=1, ++MOZ_NATIVE_GRAPHITE2=) ++ ++if test -n "$MOZ_NATIVE_GRAPHITE2"; then ++ PKG_CHECK_MODULES(MOZ_GRAPHITE2, graphite2) ++ ++ dnl graphite2.pc has bogus version, check manually ++ AC_TRY_COMPILE([ #include ++ #define GR2_VERSION_REQUIRE(major,minor,bugfix) \ ++ ( GR2_VERSION_MAJOR * 10000 + GR2_VERSION_MINOR \ ++ * 100 + GR2_VERSION_BUGFIX >= \ ++ (major) * 10000 + (minor) * 100 + (bugfix) ) ++ ], [ ++ #if !GR2_VERSION_REQUIRE(1,2,4) ++ #error "Insufficient graphite2 version." ++ #endif ++ ], [], ++ [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])]) ++fi ++ ++AC_SUBST(MOZ_NATIVE_GRAPHITE2) ++ ++dnl ======================================================== + dnl Check for pixman and cairo + dnl ======================================================== + +--- dom/base/moz.build.orig 2017-11-14 14:36:13 UTC ++++ dom/base/moz.build +@@ -366,6 +366,9 @@ if CONFIG['INTEL_ARCHITECTURE']: + SOURCES += ['nsTextFragmentSSE2.cpp'] + SOURCES['nsTextFragmentSSE2.cpp'].flags += CONFIG['SSE2_FLAGS'] + ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ SOURCES['nsContentUtils.cpp'].flags += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + EXTRA_COMPONENTS += [ + 'ConsoleAPI.manifest', + 'ConsoleAPIStorage.js', +--- gfx/graphite2/moz-gr-update.sh.orig 2017-11-14 14:36:13 UTC ++++ gfx/graphite2/moz-gr-update.sh +@@ -37,6 +37,9 @@ echo "See" $0 "for update procedure." >> + #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; + #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s///;s/Windows.h/windows.h/;" {} \; + ++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \ ++ if /GR2_VERSION_REQUIRE/" configure.in ++ + # summarize what's been touched + echo Updated to $RELEASE. + echo Here is what changed in the gfx/graphite2 directory: +--- gfx/harfbuzz/README-mozilla.orig 2017-11-14 14:36:13 UTC ++++ gfx/harfbuzz/README-mozilla +@@ -19,3 +19,8 @@ the mozilla tree. + + If the collection of source files changes, manual updates to moz.build may be + needed, as we don't use the upstream makefiles. ++ ++The in-tree copy may be omitted during build by --with-system-harfbuzz. ++Make sure to keep pkg-config version check within configure.in in sync ++with checkout version or increment latest tag by one if it's not based ++on upstream release. +--- gfx/moz.build.orig 2017-11-14 14:36:13 UTC ++++ gfx/moz.build +@@ -7,6 +7,12 @@ + if CONFIG['MOZ_TREE_CAIRO']: + DIRS += ['cairo'] + ++if not CONFIG['MOZ_NATIVE_GRAPHITE2']: ++ DIRS += ['graphite2/src' ] ++ ++if not CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ DIRS += ['harfbuzz/src'] ++ + DIRS += [ + '2d', + 'ycbcr', +@@ -15,8 +21,6 @@ DIRS += [ + 'qcms', + 'gl', + 'layers', +- 'graphite2/src', +- 'harfbuzz/src', + 'ots/src', + 'thebes', + 'ipc', +--- gfx/skia/generate_mozbuild.py.orig 2017-11-14 14:36:13 UTC ++++ gfx/skia/generate_mozbuild.py +@@ -157,6 +157,9 @@ if CONFIG['CLANG_CXX']: + '-Wno-unused-private-field', + ] + ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +--- gfx/skia/moz.build.orig 2017-11-14 14:36:13 UTC ++++ gfx/skia/moz.build +@@ -987,6 +987,9 @@ if CONFIG['CLANG_CXX']: + '-Wno-unused-private-field', + ] + ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'android', 'gonk', 'qt'): + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] + CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS'] +--- gfx/thebes/moz.build.orig 2017-11-14 14:36:13 UTC ++++ gfx/thebes/moz.build +@@ -298,7 +298,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'): + CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS'] + +-DEFINES['GRAPHITE2_STATIC'] = True ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ ++if CONFIG['MOZ_NATIVE_GRAPHITE2']: ++ CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS'] ++else: ++ DEFINES['GRAPHITE2_STATIC'] = True + + if CONFIG['GKMEDIAS_SHARED_LIBRARY']: + DEFINES['OTS_DLL'] = True +--- intl/unicharutil/util/moz.build.orig 2017-11-14 14:36:13 UTC ++++ intl/unicharutil/util/moz.build +@@ -38,5 +38,8 @@ if CONFIG['_MSC_VER']: + if CONFIG['ENABLE_INTL_API']: + CXXFLAGS += CONFIG['MOZ_ICU_CFLAGS'] + ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['GNU_CXX']: + FAIL_ON_WARNINGS = True +--- netwerk/dns/moz.build.orig 2017-11-14 14:36:13 UTC ++++ netwerk/dns/moz.build +@@ -68,5 +68,8 @@ LOCAL_INCLUDES += [ + '/netwerk/base', + ] + ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS'] ++ + if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19': + CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']] +--- toolkit/library/moz.build.orig 2017-11-14 14:36:13 UTC ++++ toolkit/library/moz.build +@@ -230,6 +230,12 @@ if CONFIG['MOZ_NATIVE_LIBVPX']: + if not CONFIG['MOZ_TREE_PIXMAN']: + OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS'] + ++if CONFIG['MOZ_NATIVE_GRAPHITE2']: ++ OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS'] ++ ++if CONFIG['MOZ_NATIVE_HARFBUZZ']: ++ OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS'] ++ + if CONFIG['MOZ_ALSA']: + OS_LIBS += CONFIG['MOZ_ALSA_LIBS'] + --- www/palemoon/files/patch-bug991253 (nonexistent) +++ www/palemoon/files/patch-bug991253 (working copy) @@ -0,0 +1,17 @@ +--- extensions/spellcheck/hunspell/glue/mozHunspell.cpp.orig 2017-11-14 14:36:13 UTC ++++ extensions/spellcheck/hunspell/glue/mozHunspell.cpp +@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo + } + } + ++ // load system hunspell dictionaries ++ nsCOMPtr hunDir; ++ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"), ++ true, getter_AddRefs(hunDir)); ++ if (hunDir) { ++ LoadDictionariesFromDir(hunDir); ++ } ++ + // find dictionaries from extensions requiring restart + nsCOMPtr dictDirs; + rv = dirSvc->Get(DICTIONARY_SEARCH_DIRECTORY_LIST, --- www/palemoon/files/patch-config-baseconfig.mk (nonexistent) +++ www/palemoon/files/patch-config-baseconfig.mk (working copy) @@ -0,0 +1,17 @@ +--- config/baseconfig.mk.orig 2017-11-14 14:36:13 UTC ++++ config/baseconfig.mk +@@ -2,10 +2,10 @@ + # directly in python/mozbuild/mozbuild/base.py for gmake validation. + # We thus use INCLUDED_AUTOCONF_MK to enable/disable some parts depending + # whether a normal build is happening or whether the check is running. +-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) ++includedir := $(includedir)/%%MOZILLA%% ++idldir = $(datadir)/idl/%%MOZILLA%% ++installdir = $(libdir)/%%MOZILLA%% ++sdkdir = $(libdir)/%%MOZILLA%% + ifndef TOP_DIST + TOP_DIST = dist + endif --- www/palemoon/files/patch-media_libnestegg_src_align.h (nonexistent) +++ www/palemoon/files/patch-media_libnestegg_src_align.h (working copy) @@ -0,0 +1,21 @@ +--- media/libnestegg/src/align.h.orig 2017-11-14 14:36:13 UTC ++++ media/libnestegg/src/align.h +@@ -15,14 +15,16 @@ + #ifndef _LIBP_ALIGN_H_ + #define _LIBP_ALIGN_H_ + +-#ifdef _MSC_VER ++#include ++ ++#if defined(_MSC_VER) + + /* + * MSVC defines max_align_t as a double. + */ + typedef double max_align_t; + +-#else ++#elif !defined(_GCC_MAX_ALIGN_T) + + /* + * a type with the most strict alignment requirements --- www/palemoon/files/patch-python_psutil_psutil___psutil__bsd.c (nonexistent) +++ www/palemoon/files/patch-python_psutil_psutil___psutil__bsd.c (working copy) @@ -0,0 +1,50 @@ +--- python/psutil/psutil/_psutil_bsd.c.orig 2017-11-14 14:36:13 UTC ++++ python/psutil/psutil/_psutil_bsd.c +@@ -957,11 +957,19 @@ psutil_sockaddr_matches(int family, int + psutil_sockaddr_addrlen(family)) == 0); + } + ++#if __FreeBSD_version >= 1200026 ++static struct xtcpcb * ++psutil_search_tcplist(char *buf, struct kinfo_file *kif) ++{ ++ struct xtcpcb *tp; ++ struct xinpcb *inp; ++#else + static struct tcpcb * + psutil_search_tcplist(char *buf, struct kinfo_file *kif) + { + struct tcpcb *tp; + struct inpcb *inp; ++#endif + struct xinpgen *xig, *oxig; + struct xsocket *so; + +@@ -969,9 +977,15 @@ psutil_search_tcplist(char *buf, struct + for (xig = (struct xinpgen *)((char *)xig + xig->xig_len); + xig->xig_len > sizeof(struct xinpgen); + xig = (struct xinpgen *)((char *)xig + xig->xig_len)) { ++#if __FreeBSD_version >= 1200026 ++ tp = (struct xtcpcb *)xig; ++ inp = &tp->xt_inp; ++ so = &inp->xi_socket; ++#else + tp = &((struct xtcpcb *)xig)->xt_tp; + inp = &((struct xtcpcb *)xig)->xt_inp; + so = &((struct xtcpcb *)xig)->xt_socket; ++#endif + + if (so->so_type != kif->kf_sock_type || + so->xso_family != kif->kf_sock_domain || +@@ -1019,7 +1033,11 @@ psutil_proc_connections(PyObject *self, + struct kinfo_file *freep = NULL; + struct kinfo_file *kif; + char *tcplist = NULL; ++#if __FreeBSD_version >= 1200026 ++ struct xtcpcb *tcp; ++#else + struct tcpcb *tcp; ++#endif + + PyObject *retList = PyList_New(0); + PyObject *tuple = NULL; --- www/palemoon/files/patch-xpcom_io_nsLocalFileUnix.cpp (nonexistent) +++ www/palemoon/files/patch-xpcom_io_nsLocalFileUnix.cpp (working copy) @@ -0,0 +1,23 @@ +--- xpcom/io/nsLocalFileUnix.cpp.orig 2017-11-14 14:36:13 UTC ++++ xpcom/io/nsLocalFileUnix.cpp +@@ -13,9 +13,6 @@ + + #include + #include +-#if !defined(XP_MACOSX) +-#include // No longer implicitly included in later glibc +-#endif + #include + #include + #include +@@ -31,6 +28,10 @@ + #define USE_LINUX_QUOTACTL + #include + #include ++#include ++#ifndef BLOCK_SIZE ++#define BLOCK_SIZE 1024 /* kernel block size */ ++#endif + #endif + + #include "xpcom-private.h" --- www/palemoon/pkg-descr (nonexistent) +++ www/palemoon/pkg-descr (working copy) @@ -0,0 +1,15 @@ +Pale Moon offers you a browsing experience in a browser completely built +from its own, independently developed source that has been forked off +from Firefox/Mozilla code a number of years ago, with carefully selected +features and optimizations to improve the browser's stability and user +experience, while offering full customization and a growing collection +of extensions and themes to make the browser truly your own. + +Main features: + + o Support for many Firefox extensions + o Support for a growing number of Pale Moon exclusive extensions + o Secure: Additional security features and security-aware development + o Extensive and growing support for HTML5 and CSS3 + +WWW: https://www.palemoon.org/ --- www/palemoon/pkg-message (nonexistent) +++ www/palemoon/pkg-message (working copy) @@ -0,0 +1,18 @@ +====================================================================== + +Any bug reports should be addressed to the maintainers at: + gecko@FreeBSD.org +You may also Cc: freebsd-ports@FreeBSD.org. Please do not send +bug reports to any other addresses. + +Please include the following information with any bug report: +* Output from 'uname -a'. +* Output from 'ident /usr/ports/www/palemoon/Makefile' +* Where/when did the problem occur: configuring, building, or + running palemoon +* How can you reproduce the problem? + +Thank you for your help in testing and reporting bugs, and we hope you +enjoy using Firefox. +The Maintainers (gecko@) +======================================================================