diff --git a/www/palemoon/Makefile b/www/palemoon/Makefile new file mode 100644 index 000000000000..1c60a0b6f3fc --- /dev/null +++ b/www/palemoon/Makefile @@ -0,0 +1,187 @@ +# $FreeBSD$ + +PORTNAME= palemoon +# UXP_VERSION below *MUST BE UPDATED* according to DISTVERSION (see recorded +# commit of the 'platform' git sub-module and corresponding release in +# UXP/releases; see MASTER_SITES for base URLs). +DISTVERSION= 29.2.1 +CATEGORIES= www +MASTER_SITES= https://repo.palemoon.org/MoonchildProductions/Pale-Moon/archive/:palemoon \ + https://repo.palemoon.org/MoonchildProductions/UXP/archive/:uxp +DISTFILES= ${DISTVERSION}_Release.tar.gz:palemoon \ + RELBASE_${UXP_VERSION}.tar.gz:uxp +DIST_SUBDIR= MoonchildProductions + +MAINTAINER= olce.freebsd.ports@certner.fr +COMMENT= Open-source web browser + +LICENSE= MPL20 MISC +LICENSE_COMB= multi +LICENSE_NAME_MISC= Miscellaneous free and open-source licenses +LICENSE_FILE= ${WRKSRC}/LICENSE +LICENSE_FILE_MISC= ${WRKSRC}/platform/toolkit/content/license.html +LICENSE_PERMS_MISC= dist-mirror pkg-mirror auto-accept + +# Not sure about the real status of ARM, but only ARM packages of old versions of +# PM are available in some Linux distros. +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON=Upstream only cares about i386/amd64 + +# Common deps & build options +BUILD_DEPENDS= autoconf-2.13:devel/autoconf213 \ + yasm:devel/yasm \ + zip:archivers/zip \ + +LIB_DEPENDS= libdbus-1.so:devel/dbus \ + libdbus-glib-1.so:devel/dbus-glib \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreetype.so:print/freetype2 + +USES= pkgconfig perl5 gmake gnome xorg desktop-file-utils +USE_PERL5= build +# XXX +# GTK3 support currently needs gtk20 and gconf2 to pass old-configure (and +# maybe more). +# See also: https://repo.palemoon.org/MoonchildProductions/UXP/issues/1638. +USE_GNOME= cairo gdkpixbuf2 glib20 pango \ + gtk30 gtk20:build gconf2:build +USE_XORG= xt x11 xcb xext xrender + +# We require GCC (see also GCC_DEFAULT below), but we need to make sure that +# there are no runtime dependencies to libstdc++, i.e., that libc++'s headers +# and libraries are used during compilation and link. +USES+= compiler:gcc-c++11-lib + +# Put this here pending creation of USES=gtar +BUILD_DEPENDS+= gtar:archivers/gtar +BINARY_ALIAS+= tar=${LOCALBASE}/bin/gtar + +BUILD_DEPENDS+= tauthon:lang/tauthon +BINARY_ALIAS+= python=${LOCALBASE}/bin/tauthon \ + python2=${LOCALBASE}/bin/tauthon \ + python2.7=${LOCALBASE}/bin/tauthon + +BUNDLE_LIBS= yes + +## Options + +# Official branding is enabled in compliance with Pale Moon's redistribution +# license (see https://www.palemoon.org/redist.shtml), point 8b, as explicitly +# confirmed by the owner (Moonchild; see +# https://forum.palemoon.org/viewtopic.php?f=5&t=25625), provided options are +# not modified beyond what is necessary to get a stable build on FreeBSD. So DO +# NOT CHANGE default options without the maintainer's approval. + +OPTIONS_SINGLE+= SOUND +OPTIONS_SINGLE_SOUND= ALSA PULSEAUDIO +OPTIONS_DEFAULT+= ALSA + +OPTIONS_DEFINE+= SYNC +OPTIONS_DEFAULT+= SYNC + +OPTIONS_DEFINE+= SYSTEM_MALLOC + +ALSA_BUILD_DEPENDS= ${PREFIX}/include/alsa/asoundlib.h:audio/alsa-lib +ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib +PULSEAUDIO_BUILD_DEPENDS=${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio +PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio + +SYNC_DESC= Pale Moon Sync service (see https://www.palemoon.org/sync/) + +SYSTEM_MALLOC_DESC= Use system's jemalloc instead of bundled one + +.include + +# We require GCC, and even a specific version of it. 10 is the last version I +# tested and validated, and the last version endorsed upstream. It is also the +# current default in ports, a nice conjunction that cannot always be +# maintained. Version bumps *MUST* be validated by the maintainer (after +# thorough testing, and following upstream's recommendations). +GCC_DEFAULT= 10 + +## Vars and targets + +UXP_VERSION= 20210608 + +WRKSRC= ${WRKDIR}/pale-moon + +DOT_MOZCONFIG= ${WRKSRC}/.mozconfig +PM_BUILD_DIR= ${WRKSRC}/pmbuild + +PALEMOON_DESKTOP=${WRKSRC}/palemoon/branding/official/palemoon.desktop + +# Extract only -O options +PM_OPTIMIZE=${CFLAGS:M-O*} + +.for VAR in PM_BUILD_DIR PM_OPTIMIZE +PM_MOZCONFIG_REINPLACE_ARGS+=-e 's!%%${VAR}%%!${${VAR}}!' +.endfor + +# Taken from bsd.gecko.mk. See comment there. +.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) +MAKE_JOBS_NUMBER= 1 +.endif +.if defined(MAKE_JOBS_NUMBER) +MOZ_MAKE_FLAGS+= -j${MAKE_JOBS_NUMBER} +.endif + +post-extract: + ${RMDIR} ${WRKSRC}/platform + ${RLN} ${WRKDIR}/uxp ${WRKSRC}/platform + +# Prepare '.mozconfig' for 'configure' +pre-configure: + ${CP} ${FILESDIR}/dot.mozconfig ${DOT_MOZCONFIG} + ${REINPLACE_CMD} ${PM_MOZCONFIG_REINPLACE_ARGS} ${DOT_MOZCONFIG} +.if ${PORT_OPTIONS:MALSA} + ${ECHO_CMD} ac_add_options --enable-alsa >> ${DOT_MOZCONFIG} + ${ECHO_CMD} ac_add_options --disable-pulseaudio >> ${DOT_MOZCONFIG} +.endif +.if ! ${PORT_OPTIONS:MSYNC} + ${ECHO_CMD} ac_add_options --disable-sync >> ${DOT_MOZCONFIG} +.endif +.if ${PORT_OPTIONS:MSYSTEM_MALLOC} + ${ECHO_CMD} ac_add_options --disable-jemalloc >> ${DOT_MOZCONFIG} +.else + ${ECHO_CMD} ac_add_options --enable-jemalloc >> ${DOT_MOZCONFIG} +.endif +.if defined(MOZ_MAKE_FLAGS) + ${ECHO_CMD} mk_add_options MOZ_MAKE_FLAGS=${MOZ_MAKE_FLAGS:Q} \ + >> ${DOT_MOZCONFIG} +.endif +# Add build variables +.for VAR in CPP CXXCPP CC CXX CPPFLAGS CFLAGS CXXFLAGS LDFLAGS \ + LD AS AR RANLIB OBJDUMP NM +.if defined(${VAR}) +# Remove -rpath options to GCC's directory, we don't need them (no dependencies +# on libs compiled with gfortran, see +# https://wiki.freebsd.org/libgcc%20problem) and we don't want them (triggering +# a link to a different libgcc_s depending on whether GCC is installed at +# runtime). + ${ECHO_CMD} export ${VAR}=\"${${VAR}:N*-rpath*lib/gcc*}\" >> ${DOT_MOZCONFIG} +.endif +.endfor + +# Running 'mach configure' separately is "strongly discouraged" (see Mozilla's +# doc on build options configuration). But this does not seem relevant to Pale +# Moon. +do-configure: + cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach configure + +do-build: + cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach build +# Going through the package route (the only one documented upstream) + cd ${WRKSRC} && ${SETENV} PATH=${PATH} ./mach package + +do-install: + ${TAR} -C ${STAGEDIR}${PREFIX}/lib \ + -xf ${PM_BUILD_DIR:Q}/dist/palemoon*.tar* \ + palemoon + ${RLN} ${STAGEDIR}${PREFIX}/lib/palemoon/palemoon \ + ${STAGEDIR}${PREFIX}/bin/palemoon + ${INSTALL_DATA} ${PALEMOON_DESKTOP} \ + ${STAGEDIR}${PREFIX}/share/applications/palemoon.desktop + ${RLN} ${STAGEDIR}${PREFIX}/lib/palemoon/browser/icons/mozicon128.png \ + ${STAGEDIR}${PREFIX}/share/pixmaps/palemoon.png + +.include diff --git a/www/palemoon/distinfo b/www/palemoon/distinfo new file mode 100644 index 000000000000..e0859823b1df --- /dev/null +++ b/www/palemoon/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1623225466 +SHA256 (MoonchildProductions/29.2.1_Release.tar.gz) = 8fbb36e032a6fbb9eb813c9baef3262ca80f8bbd4ae75bac607e70e549a31f2f +SIZE (MoonchildProductions/29.2.1_Release.tar.gz) = 8527118 +SHA256 (MoonchildProductions/RELBASE_20210608.tar.gz) = 4bf732b952a121baedc79b07eb54ba6f37a146e8c497be73fb71ca34aeb90860 +SIZE (MoonchildProductions/RELBASE_20210608.tar.gz) = 276248112 diff --git a/www/palemoon/files/dot.mozconfig b/www/palemoon/files/dot.mozconfig new file mode 100644 index 000000000000..dde1b2fe893b --- /dev/null +++ b/www/palemoon/files/dot.mozconfig @@ -0,0 +1,30 @@ +# Standard build options for Pale Moon +# See http://developer.palemoon.org/build/linux/ + +# The 'configure' ports step replaces %%VAR%% with content of Makefile's VAR +# and appends lines to this file. + +mk_add_options MOZ_OBJDIR=%%PM_BUILD_DIR%% + +ac_add_options --enable-application=palemoon +ac_add_options --enable-optimize="-w %%PM_OPTIMIZE%%" +ac_add_options --enable-default-toolkit=cairo-gtk3 +ac_add_options --enable-strip +ac_add_options --enable-devtools +ac_add_options --disable-eme +ac_add_options --disable-webrtc +ac_add_options --disable-gamepad +ac_add_options --disable-tests +ac_add_options --disable-debug +ac_add_options --disable-necko-wifi +ac_add_options --disable-updater +ac_add_options --with-pthreads + +ac_add_options --enable-official-branding +export MOZILLA_OFFICIAL=1 + +# Don't bother compressing, mach's package is just intermediate file +export MOZ_PKG_FORMAT=TAR + +# Below this line, build options depending on port options, as well as make and +# build flags, will be appended. diff --git a/www/palemoon/files/patch-platform_old-configure.in b/www/palemoon/files/patch-platform_old-configure.in new file mode 100644 index 000000000000..2e9573febffd --- /dev/null +++ b/www/palemoon/files/patch-platform_old-configure.in @@ -0,0 +1,11 @@ +--- platform/old-configure.in.orig 2021-02-05 18:43:01 UTC ++++ platform/old-configure.in +@@ -5554,7 +5554,7 @@ ac_configure_args="$_SUBDIR_CONFIG_ARGS" + + # --with-system-nspr will have been converted into the relevant $NSPR_CFLAGS + # and $NSPR_LIBS. +-ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr\S* *//'`" ++ac_configure_args="`echo $ac_configure_args | sed -e 's/--with-system-nspr[^[:space:]]* *//'`" + + if test "$_INTL_API" = no; then + ac_configure_args="$ac_configure_args --without-intl-api" diff --git a/www/palemoon/pkg-descr b/www/palemoon/pkg-descr new file mode 100644 index 000000000000..0ba49faf015d --- /dev/null +++ b/www/palemoon/pkg-descr @@ -0,0 +1,17 @@ +Pale Moon(TM) 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. + +Some of the main features: +- Based on the Unified XUL Platform (UXP) containing our own optimized layout + and rendering engine (Goanna). +- Safe: Forked from mature Mozilla code and regularly updated with the latest + security patches. +- Secure: Additional security features and security-aware development +- Zero ads; no telemetry, spyware or data gathering +- Familiar, efficient, fully customizable interface + +WWW: https://www.palemoon.org/ diff --git a/www/palemoon/pkg-plist b/www/palemoon/pkg-plist new file mode 100644 index 000000000000..877558baf31a --- /dev/null +++ b/www/palemoon/pkg-plist @@ -0,0 +1,57 @@ +bin/palemoon +lib/palemoon/application.ini +lib/palemoon/browser/blocklist.xml +lib/palemoon/browser/chrome.manifest +lib/palemoon/browser/chrome/icons/default/default16.png +lib/palemoon/browser/chrome/icons/default/default32.png +lib/palemoon/browser/chrome/icons/default/default48.png +lib/palemoon/browser/components/components.manifest +lib/palemoon/browser/components/libbrowsercomps.so +lib/palemoon/browser/defaults/profile/chrome/userChrome-example.css +lib/palemoon/browser/defaults/profile/chrome/userContent-example.css +lib/palemoon/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi +lib/palemoon/browser/icons/mozicon128.png +lib/palemoon/browser/palemoon.res +lib/palemoon/browser/searchplugins/bing.xml +lib/palemoon/browser/searchplugins/duckduckgo-palemoon.xml +lib/palemoon/browser/searchplugins/ecosia.xml +lib/palemoon/browser/searchplugins/ekoru.xml +lib/palemoon/browser/searchplugins/twitter.xml +lib/palemoon/browser/searchplugins/wikipedia.xml +lib/palemoon/browser/searchplugins/yahoo.xml +lib/palemoon/browser/ua-update.json +lib/palemoon/chrome.manifest +lib/palemoon/defaults/pref/channel-prefs.js +lib/palemoon/dependentlibs.list +lib/palemoon/dictionaries/en-US.aff +lib/palemoon/dictionaries/en-US.dic +lib/palemoon/gtk2/libmozgtk.so +lib/palemoon/icudt58l.dat +lib/palemoon/libfreebl3.chk +lib/palemoon/libfreebl3.so +lib/palemoon/liblgpllibs.so +lib/palemoon/libmozavcodec.so +lib/palemoon/libmozavutil.so +lib/palemoon/libmozgtk.so +lib/palemoon/libmozsqlite3.so +lib/palemoon/libnspr4.so +lib/palemoon/libnss3.so +lib/palemoon/libnssckbi.so +lib/palemoon/libnssutil3.so +lib/palemoon/libplc4.so +lib/palemoon/libplds4.so +lib/palemoon/libsmime3.so +lib/palemoon/libsoftokn3.chk +lib/palemoon/libsoftokn3.so +lib/palemoon/libssl3.so +lib/palemoon/libxul.so +lib/palemoon/palemoon +lib/palemoon/palemoon-bin +lib/palemoon/palemoon.res +lib/palemoon/platform.ini +lib/palemoon/plugin-container +lib/palemoon/precomplete +lib/palemoon/removed-files +lib/palemoon/run-mozilla.sh +share/applications/palemoon.desktop +share/pixmaps/palemoon.png