Import of cliqz-1.26.3 as www/cliqz
Cliqz develops novel Internet browsers that incorporate features such as search and anti-tracking. Cliqz desktop browser is based on Mozilla Firefox. Cliqz pre-installs the Cliqz add-on, which causes search terms to be sent to Cliqz as the default search engine. In addition the HTTPS Everywhere addon is installed, and an addon to manage consent.
This commit is contained in:
parent
3cc379c582
commit
83c50b692d
26 changed files with 5433 additions and 0 deletions
8
www/cliqz/DESCR
Normal file
8
www/cliqz/DESCR
Normal file
|
@ -0,0 +1,8 @@
|
|||
Cliqz develops novel Internet browsers that incorporate features
|
||||
such as search and anti-tracking. Cliqz desktop browser is based
|
||||
on Mozilla Firefox.
|
||||
|
||||
Cliqz pre-installs the Cliqz add-on, which causes search terms to
|
||||
be sent to Cliqz as the default search engine. In addition the
|
||||
HTTPS Everywhere addon is installed, and an addon to manage consent
|
||||
to data processing.
|
122
www/cliqz/Makefile
Normal file
122
www/cliqz/Makefile
Normal file
|
@ -0,0 +1,122 @@
|
|||
# $NetBSD: Makefile,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
DISTNAME= cliqz-1.26.3
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=cliqz-oss/}
|
||||
GITHUB_PROJECT= browser-f
|
||||
GITHUB_TAG= ${PKGVERSION_NOREV}
|
||||
DISTFILES= adult-domains.bin \
|
||||
cliqz@cliqz.com.xpi \
|
||||
https-everywhere@cliqz.com.xpi \
|
||||
gdprtool@cliqz.com.xpi \
|
||||
${DISTNAME}${EXTRACT_SUFX}
|
||||
DIST_SUBDIR= ${PKGNAME_NOREV}
|
||||
|
||||
CLIQZ_CHANNEL= release
|
||||
# If the PKGVERSION_NOREV is updated, make sure to update the last build id from
|
||||
# ftp -Vo - https://repository.cliqz.com/dist/${CLIQZ_CHANNEL}/${PKGVERSION_NOREV}/lastbuildid
|
||||
CLIQZ_LAST_BUILD_ID= 20190411104542
|
||||
CLIQZ_PLUGIN_SUFX= @cliqz.com.xpi
|
||||
|
||||
SITES.adult-domains.bin= \
|
||||
https://s3.amazonaws.com/cdn.cliqz.com/browser-f/APT/
|
||||
SITES.cliqz${CLIQZ_PLUGIN_SUFX}= \
|
||||
https://repository.cliqz.com/dist/${CLIQZ_CHANNEL}/${PKGVERSION_NOREV}/${CLIQZ_LAST_BUILD_ID}/
|
||||
SITES.https-everywhere${CLIQZ_PLUGIN_SUFX}= \
|
||||
https://repository.cliqz.com/dist/${CLIQZ_CHANNEL}/${PKGVERSION_NOREV}/${CLIQZ_LAST_BUILD_ID}/
|
||||
SITES.gdprtool${CLIQZ_PLUGIN_SUFX}= \
|
||||
https://repository.cliqz.com/dist/${CLIQZ_CHANNEL}/${PKGVERSION_NOREV}/${CLIQZ_LAST_BUILD_ID}/
|
||||
|
||||
EXTRACT_USING= bsdtar
|
||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= fox@NetBSD.org
|
||||
HOMEPAGE= https://cliqz.com/en/desktop
|
||||
COMMENT= Secure browser (Mozilla based) with built-in quick search
|
||||
LICENSE= mpl-2.0 AND gnu-gpl-v2
|
||||
|
||||
USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip bash pax
|
||||
USE_LANGUAGES+= c99 gnu++14
|
||||
|
||||
PYTHON_FOR_BUILD_ONLY= tool
|
||||
TOOL_DEPENDS+= cbindgen-[0-9]*:../../devel/cbindgen
|
||||
TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
|
||||
|
||||
WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${PKGVERSION_NOREV}
|
||||
|
||||
CLIQZ_ICON= cliqz.png
|
||||
CLIQZ_ICON_SRC= ${WRKSRC}/mozilla-release/browser/branding/cliqz/default48.png
|
||||
MOZ_DESKTOP= ${WRKSRC}/mozilla-release/toolkit/mozapps/installer/linux/rpm/mozilla.desktop
|
||||
CLIQZ_DESKTOP= ${WRKSRC}/mozilla-release/toolkit/mozapps/installer/linux/rpm/cliqz.desktop
|
||||
|
||||
MAKE_ENV+= CQZ_RELEASE_CHANNEL=${CLIQZ_CHANNEL}
|
||||
MAKE_ENV+= CQZ_BUILD_ID=${CLIQZ_LAST_BUILD_ID}
|
||||
MAKE_ENV+= MOZBUILD_STATE_PATH=${WRKDIR}/.home/.mozbuild
|
||||
|
||||
.include "mozilla-common.mk"
|
||||
.include "options.mk"
|
||||
|
||||
CHECK_WRKREF_SKIP+= lib/cliqz/chrome/toolkit/content/global/buildconfig.html
|
||||
|
||||
REPLACE_BASH+= magic_build_and_package.sh
|
||||
|
||||
CFLAGS+= -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS
|
||||
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/cliqz ${COMPILER_RPATH_FLAG}${PREFIX}/lib
|
||||
|
||||
NOT_PAX_MPROTECT_SAFE+= lib/cliqz/cliqz
|
||||
NOT_PAX_MPROTECT_SAFE+= lib/cliqz/cliqz-bin
|
||||
NOT_PAX_MPROTECT_SAFE+= lib/cliqz/plugin-container
|
||||
|
||||
post-extract:
|
||||
${CP} ${DISTDIR}/${DIST_SUBDIR}/adult-domains.bin ${WRKSRC}
|
||||
${MKDIR} ${WRKSRC}/obj/dist/bin/browser/features
|
||||
${CP} ${DISTDIR}/${DIST_SUBDIR}/cliqz${CLIQZ_PLUGIN_SUFX} \
|
||||
${DISTDIR}/${DIST_SUBDIR}/https-everywhere${CLIQZ_PLUGIN_SUFX} \
|
||||
${DISTDIR}/${DIST_SUBDIR}/gdprtool${CLIQZ_PLUGIN_SUFX} \
|
||||
${WRKSRC}/obj/dist/bin/browser/features
|
||||
|
||||
post-patch:
|
||||
${SED} -e 's/@MOZ_APP_DISPLAYNAME@/Cliqz Internet/g' \
|
||||
-e 's/@MOZ_APP_NAME@/cliqz/g' \
|
||||
-e '/Icon=cliqz/ s/cliqz/${CLIQZ_ICON}/' \
|
||||
-e '/StartupWMClass/d' \
|
||||
< ${MOZ_DESKTOP} \
|
||||
> ${CLIQZ_DESKTOP}
|
||||
for MOZ_CONFIGURE_ARG in ${MOZ_CONFIGURE_ARGS}; do \
|
||||
${ECHO} $$MOZ_CONFIGURE_ARG >> \
|
||||
${WRKSRC}/mozilla-release/browser/config/cliqz.mozconfig; \
|
||||
done;
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./magic_build_and_package.sh
|
||||
|
||||
INSTALLATION_DIRS+= share/applications share/pixmaps bin lib/cliqz
|
||||
do-install:
|
||||
cd ${WRKSRC}/obj/dist/cliqz && \
|
||||
${PAX} -wr * ${DESTDIR}${PREFIX}/lib/cliqz && \
|
||||
${CHOWN} -R ${ROOT_USER}:${ROOT_GROUP} ${DESTDIR}${PREFIX}/lib/*
|
||||
cd ${DESTDIR}${PREFIX}/lib && \
|
||||
${FIND} . \( -name \*.js -or \
|
||||
-name \*.html -or \
|
||||
-name \*.xml -or \
|
||||
-name \*.svg \
|
||||
\) \
|
||||
-type f \
|
||||
-exec ${CHMOD} 0644 '{}' \;
|
||||
|
||||
post-install:
|
||||
${ECHO} '#! /bin/sh' > ${DESTDIR}${PREFIX}/bin/cliqz
|
||||
${ECHO} 'exec ${PREFIX}/lib/cliqz/cliqz "$$@"' >> ${DESTDIR}${PREFIX}/bin/cliqz
|
||||
${CHMOD} 755 ${DESTDIR}${PREFIX}/bin/cliqz
|
||||
${INSTALL_DATA} ${CLIQZ_DESKTOP} ${DESTDIR}${PREFIX}/share/applications/
|
||||
${INSTALL_DATA} ${CLIQZ_ICON_SRC} ${DESTDIR}${PREFIX}/share/pixmaps/${CLIQZ_ICON}
|
||||
|
||||
.include "../../lang/python/pyversion.mk"
|
||||
BUILDLINK_DEPMETHOD.clang= build
|
||||
BUILDLINK_API_DEPENDS.clang+= clang>=6.0.1nb1
|
||||
.include "../../lang/clang/buildlink3.mk"
|
||||
BUILDLINK_DEPMETHOD.rust= build
|
||||
BUILDLINK_API_DEPENDS.rust+= rust>=1.24.0
|
||||
.include "../../lang/rust/buildlink3.mk"
|
||||
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
4528
www/cliqz/PLIST
Normal file
4528
www/cliqz/PLIST
Normal file
File diff suppressed because it is too large
Load diff
41
www/cliqz/distinfo
Normal file
41
www/cliqz/distinfo
Normal file
|
@ -0,0 +1,41 @@
|
|||
$NetBSD: distinfo,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
SHA1 (cliqz-1.26.3/adult-domains.bin) = 9dd0756b67aa17357ef61f3bea8303dad63540a1
|
||||
RMD160 (cliqz-1.26.3/adult-domains.bin) = 78f46f31b27b4172a6aa6125619f92f751172a75
|
||||
SHA512 (cliqz-1.26.3/adult-domains.bin) = d0229800e0e1bf6d60e5510d2995a8ba800ab933adc0de44791c2b4a9ca39de7ad6cfe9b9563bdac67ecbc96c48d1277866da94d6ea635e1435a9e95a63dff08
|
||||
Size (cliqz-1.26.3/adult-domains.bin) = 528392 bytes
|
||||
SHA1 (cliqz-1.26.3/cliqz-1.26.3.tar.gz) = bd8a9fc5e0a25e379c831ed62ee2877613222f75
|
||||
RMD160 (cliqz-1.26.3/cliqz-1.26.3.tar.gz) = 72799bf5bce2bfa26437183a92f97dd4066fdbca
|
||||
SHA512 (cliqz-1.26.3/cliqz-1.26.3.tar.gz) = 85268cfb78b55e388bf912bbe57dd2f88d1e612bc9b35f8ddf32fcd29bd23ea835abf1674b7f9e63cfd0abc21a580bb13891031e8c60314f22f8f8ecbd164357
|
||||
Size (cliqz-1.26.3/cliqz-1.26.3.tar.gz) = 424868507 bytes
|
||||
SHA1 (cliqz-1.26.3/cliqz@cliqz.com.xpi) = 46595914cf4d1aa8f352d543282fa193ea0259c9
|
||||
RMD160 (cliqz-1.26.3/cliqz@cliqz.com.xpi) = 9b9cea7dec4196eafa6b7ae84c5d53c696632cb1
|
||||
SHA512 (cliqz-1.26.3/cliqz@cliqz.com.xpi) = 687f18545861f68313f5cafc2d13eb611f71e875f41c493c648f95279055bc00cd4219ff6789e334561f517ebb72731994b2ce36dc55d1f05cfe16325757c01e
|
||||
Size (cliqz-1.26.3/cliqz@cliqz.com.xpi) = 5945491 bytes
|
||||
SHA1 (cliqz-1.26.3/gdprtool@cliqz.com.xpi) = 1de84f05f921f67f40135db9f8de86a22bfc4fca
|
||||
RMD160 (cliqz-1.26.3/gdprtool@cliqz.com.xpi) = 1e8142ec919b07492357b60f8630602b3273f71f
|
||||
SHA512 (cliqz-1.26.3/gdprtool@cliqz.com.xpi) = dfebd9ba96a7edf71c4b29f189548f17f5ec1f05cb747f38c44c0e5369836e1ce35445698f6b64555d15c1708fdd62069716b4969b36f91be7bd9d3d98a44857
|
||||
Size (cliqz-1.26.3/gdprtool@cliqz.com.xpi) = 222207 bytes
|
||||
SHA1 (cliqz-1.26.3/https-everywhere@cliqz.com.xpi) = ffe130eddf382de8cab73bd589d102dcc0c06ff2
|
||||
RMD160 (cliqz-1.26.3/https-everywhere@cliqz.com.xpi) = d88065397c7a44ca94274403039ddd17390380e4
|
||||
SHA512 (cliqz-1.26.3/https-everywhere@cliqz.com.xpi) = 7b66200d441d53bd888c4e378e2ff7757cc75cd94278cfc4da2e6e28ba9b4cb22c3bcf6325c1289f504e151e0f95f2446688e822998d559f8c918bb8a3c1b38c
|
||||
Size (cliqz-1.26.3/https-everywhere@cliqz.com.xpi) = 2056899 bytes
|
||||
SHA1 (patch-cliqz__env.sh) = 6f7aba36875e86960a8fd674fdff2f576d9b479d
|
||||
SHA1 (patch-magic__build__and__package.sh) = f70d552dde0f7c1d023921cf900ef91c7639256c
|
||||
SHA1 (patch-mozilla-release_browser_app_profile_firefox.js) = 920346c7e982d8313151fa11b516e78a18a9e5dd
|
||||
SHA1 (patch-mozilla-release_browser_config_cliqz.mozconfig) = c0d050914951f7aa179336fa547b981b0561da59
|
||||
SHA1 (patch-mozilla-release_config_rules.mk) = f78ba7e312616c3b347d584d9e37ac380621248b
|
||||
SHA1 (patch-mozilla-release_dom_base_nsAttrName.h) = 5583d7f6aafb29f4b8e8be794902adf2850e1b5f
|
||||
SHA1 (patch-mozilla-release_gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = 264e6b47b14e231016c5ee4a53b4ae5cb2bf285f
|
||||
SHA1 (patch-mozilla-release_gfx_angle_checkout_src_compiler_translator_InfoSink.h) = e5f9cb8fac413267546a268ca0e50611b9965542
|
||||
SHA1 (patch-mozilla-release_ipc_chromium_src_base_lock__impl__posix.cc) = 11283db62c0a392dc592b1a82c2d9c0788ee11bb
|
||||
SHA1 (patch-mozilla-release_ipc_chromium_src_base_message__pump__libevent.cc) = 49051c927711fd5558f90aa651dccd99a887e95f
|
||||
SHA1 (patch-mozilla-release_ipc_chromium_src_base_platform__thread__posix.cc) = 4ea5441d5dbcfbe71444e2f7eaa412c262c9804a
|
||||
SHA1 (patch-mozilla-release_ipc_glue_CrossProcessSemaphore.h) = 741a8fc9eb83bd58415d70a3be1718ccd8b8c888
|
||||
SHA1 (patch-mozilla-release_ipc_glue_CrossProcessSemaphore__posix.cpp) = be74788a5bafcf306438cd18afc3e40586038997
|
||||
SHA1 (patch-mozilla-release_ipc_glue_GeckoChildProcessHost.cpp) = 2667be0de782205e62a7b0a5359de83223bd4fc3
|
||||
SHA1 (patch-mozilla-release_servo_components_style_build__gecko.rs) = a98bf759022badb63e9343733d65dd2851be998d
|
||||
SHA1 (patch-mozilla-release_toolkit_components_terminator_nsTerminator.cpp) = c439a1612f8d8ce4ceae5bbbff164cfc6e90e525
|
||||
SHA1 (patch-mozilla-release_toolkit_xre_glxtest.cpp) = b999e79dbda56914d25341e5dd09c4b5bed8d87c
|
||||
SHA1 (patch-mozilla-release_xpcom_base_nscore.h) = c1a72f0ea63aacde6dbe321031e82aec99d4350f
|
||||
SHA1 (patch-mozilla-release_xpcom_build_BinaryPath.h) = a351eed0681872d50193a0232e61752c223026d1
|
13
www/cliqz/hacks.mk
Normal file
13
www/cliqz/hacks.mk
Normal file
|
@ -0,0 +1,13 @@
|
|||
# $NetBSD: hacks.mk,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
.if !defined(CLIQZ_HACKS_MK)
|
||||
CLIQZ_HACKS_MK= defined
|
||||
|
||||
.include "../../mk/bsd.fast.prefs.mk"
|
||||
.include "../../mk/compiler.mk"
|
||||
|
||||
.if !empty(PKGSRC_COMPILER:Mclang)
|
||||
CXXFLAGS+= -Wno-return-type-c-linkage
|
||||
.endif
|
||||
|
||||
.endif # CLIQZ_HACKS_MK
|
99
www/cliqz/mozilla-common.mk
Normal file
99
www/cliqz/mozilla-common.mk
Normal file
|
@ -0,0 +1,99 @@
|
|||
# $NetBSD: mozilla-common.mk,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
#
|
||||
# Common Makefile fragment for mozilla packages based on gecko 2.0.
|
||||
# derived from www/firefox
|
||||
#
|
||||
# Customized for Cliqz
|
||||
|
||||
UNLIMIT_RESOURCES+= datasize
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
# for lang/gcc6
|
||||
GCC_REQD+= 6
|
||||
|
||||
# XXX: USE_PKGSRC_GCC_RUNTIME should not be used there and USE_GCC_RUNTIME
|
||||
# should be used instead to pick up gcc*-libs package if needed
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-[0-7].*-*) || \
|
||||
!empty(MACHINE_PLATFORM:MNetBSD-8.[0-8].*-*)
|
||||
USE_PKGSRC_GCC_RUNTIME= yes
|
||||
.endif
|
||||
|
||||
# For rustc/cargo detection
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --target=${MACHINE_GNU_PLATFORM}"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --host=${MACHINE_GNU_PLATFORM}"
|
||||
|
||||
CONFIGURE_ENV+= BINDGEN_CFLAGS="-isystem${PREFIX}/include/nspr \
|
||||
-isystem${X11BASE}/include/pixman-1"
|
||||
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
# Fix for PR pkg/48152.
|
||||
CXXFLAGS+= -march=i586
|
||||
# This is required for SSE2 code under i386.
|
||||
CXXFLAGS+= -mstackrealign
|
||||
.endif
|
||||
|
||||
CXXFLAGS+= -D__HAVE_INLINE___ISINF
|
||||
|
||||
CHECK_PORTABILITY_SKIP+= build-tools/scripts/l10n/release_repacks.sh
|
||||
CHECK_PORTABILITY_SKIP+= mozilla-release/intl/icu/source/configure
|
||||
CHECK_PORTABILITY_SKIP+= mozilla-release/modules/pdfium/update.sh
|
||||
CHECK_PORTABILITY_SKIP+= mozilla-release/security/nss/tests/libpkix/libpkix.sh
|
||||
CHECK_PORTABILITY_SKIP+= mozilla-release/security/nss/tests/multinit/multinit.sh
|
||||
|
||||
# Configure arguments
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-crashreporter"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-updater"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-debug"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-debug-symbols"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-tests"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-necko-wifi"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-libjpeg-turbo"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-icf"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-jemalloc"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-webrtc"
|
||||
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-icu"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-nss"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-nspr"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-zlib"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-bz2"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-libvpx"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --with-system-libevent=${BUILDLINK_PREFIX.libevent}"
|
||||
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-default-toolkit=cairo-gtk3"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-system-pixman"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-webrender=build"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-rust-simd"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-system-ffi"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-chrome-format=flat"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-gconf"
|
||||
|
||||
# Fix binary path
|
||||
SUBST_CLASSES+= prefix
|
||||
SUBST_STAGE.prefix= pre-configure
|
||||
SUBST_MESSAGE.prefix= Setting PREFIX
|
||||
SUBST_FILES.prefix+= ${WRKSRC}/mozilla-release/xpcom/build/BinaryPath.h
|
||||
SUBST_VARS.prefix+= PREFIX
|
||||
|
||||
.include "../../archivers/bzip2/buildlink3.mk"
|
||||
.include "../../devel/GConf/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.libevent+= libevent>=1.1
|
||||
.include "../../devel/libevent/buildlink3.mk"
|
||||
.include "../../devel/libffi/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.nspr+= nspr>=4.19
|
||||
.include "../../devel/nspr/buildlink3.mk"
|
||||
.include "../../textproc/icu/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.nss+= nss>=3.38
|
||||
.include "../../devel/nss/buildlink3.mk"
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../graphics/MesaLib/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
|
||||
.include "../../multimedia/libvpx/buildlink3.mk"
|
||||
.include "../../net/libIDL/buildlink3.mk"
|
||||
.include "../../multimedia/ffmpeg4/buildlink3.mk"
|
||||
.include "../../x11/libXt/buildlink3.mk"
|
||||
BUILDLINK_API_DEPENDS.pixman+= pixman>=0.25.2
|
||||
.include "../../x11/pixman/buildlink3.mk"
|
||||
.include "../../x11/gtk2/buildlink3.mk"
|
||||
.include "../../x11/gtk3/buildlink3.mk"
|
30
www/cliqz/options.mk
Normal file
30
www/cliqz/options.mk
Normal file
|
@ -0,0 +1,30 @@
|
|||
# $NetBSD: options.mk,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.cliqz
|
||||
|
||||
PKG_SUPPORTED_OPTIONS= alsa pulseaudio dbus
|
||||
|
||||
PKG_SUGGESTED_OPTIONS+= pulseaudio dbus
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Malsa)
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-alsa"
|
||||
.include "../../audio/alsa-lib/buildlink3.mk"
|
||||
.else
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-alsa"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mpulseaudio)
|
||||
.include "../../audio/pulseaudio/buildlink3.mk"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-pulseaudio"
|
||||
.else
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-pulseaudio"
|
||||
.endif
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mdbus)
|
||||
.include "../../sysutils/dbus-glib/buildlink3.mk"
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-dbus"
|
||||
.else
|
||||
MOZ_CONFIGURE_ARGS+= "ac_add_options --disable-dbus"
|
||||
.endif
|
29
www/cliqz/patches/patch-cliqz__env.sh
Normal file
29
www/cliqz/patches/patch-cliqz__env.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
$NetBSD: patch-cliqz__env.sh,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Commented out the various wget(1) to prevent http traffic during build
|
||||
phase.
|
||||
|
||||
--- cliqz_env.sh.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ cliqz_env.sh
|
||||
@@ -78,9 +78,9 @@ export S3_BUCKET=repository.cliqz.com
|
||||
export S3_BUCKET_SERVICE=cliqz-browser-data
|
||||
|
||||
# check CQZ_BUILD_ID and try to obtain, if not specified
|
||||
-if [ -z $CQZ_BUILD_ID ]; then
|
||||
- export CQZ_BUILD_ID="`wget -qO- https://$S3_BUCKET/dist/$CQZ_RELEASE_CHANNEL/$CQZ_VERSION/lastbuildid`"
|
||||
-fi
|
||||
+#if [ -z $CQZ_BUILD_ID ]; then
|
||||
+# export CQZ_BUILD_ID="`wget -qO- https://$S3_BUCKET/dist/$CQZ_RELEASE_CHANNEL/$CQZ_VERSION/lastbuildid`"
|
||||
+#fi
|
||||
|
||||
if [ -z $CQZ_BUILD_ID ]; then
|
||||
echo "CQZ_BUILD_ID not specified and can not be obtain from "$S3_BUCKET
|
||||
@@ -103,7 +103,7 @@ OBJ_DIR=$MOZ_OBJDIR
|
||||
SRC_BASE=mozilla-release
|
||||
|
||||
# automatic forget tab - start
|
||||
-wget -O adult-domains.bin https://s3.amazonaws.com/cdn.cliqz.com/browser-f/APT/adult-domains.bin
|
||||
+#wget -O adult-domains.bin https://s3.amazonaws.com/cdn.cliqz.com/browser-f/APT/adult-domains.bin
|
||||
export CQZ_AUTO_PRIVATE_TAB=1
|
||||
export CQZ_ADULT_DOMAINS_BF=../adult-domains.bin
|
||||
# automatic forget tab - end
|
17
www/cliqz/patches/patch-magic__build__and__package.sh
Normal file
17
www/cliqz/patches/patch-magic__build__and__package.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-magic__build__and__package.sh,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Disable build and packaging of tests.
|
||||
|
||||
--- magic_build_and_package.sh.orig 2019-04-10 11:18:54.578708528 +0000
|
||||
+++ magic_build_and_package.sh
|
||||
@@ -43,8 +43,8 @@ fi
|
||||
echo '***** Building *****'
|
||||
./mach build
|
||||
|
||||
-echo '***** Building tests *****'
|
||||
-./mach build package-tests
|
||||
+#echo '***** Building tests *****'
|
||||
+#./mach build package-tests
|
||||
|
||||
echo '***** Packaging *****'
|
||||
./mach package
|
|
@ -0,0 +1,25 @@
|
|||
$NetBSD: patch-mozilla-release_browser_app_profile_firefox.js,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
1. Pickup LANG/LC_MESSAGE from environment.
|
||||
2. Disable multiprocess window support. Refer PR 53273
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/browser/app/profile/firefox.js.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/browser/app/profile/firefox.js
|
||||
@@ -1770,6 +1770,15 @@ pref("toolkit.coverage.endpoint.base", "
|
||||
pref("prio.enabled", true);
|
||||
#endif
|
||||
|
||||
+// Select UI locale from LANG/LC_MESSAGE environmental variables
|
||||
+pref("intl.locale.requested", "");
|
||||
+
|
||||
+// Enable system addons, for example langpacks from www/firefox-l10n
|
||||
+pref("extensions.autoDisableScopes", 11);
|
||||
+
|
||||
+// Disable multiprocess window support. Workaround for PR 53273.
|
||||
+pref("browser.tabs.remote.autostart", false);
|
||||
+
|
||||
// Discovery prefs
|
||||
pref("browser.discovery.enabled", true);
|
||||
pref("browser.discovery.containers.enabled", true);
|
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-mozilla-release_browser_config_cliqz.mozconfig,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Remove the crash reporter option, this is now handled from within
|
||||
mozilla-common.mk
|
||||
|
||||
--- mozilla-release/browser/config/cliqz.mozconfig.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/browser/config/cliqz.mozconfig
|
||||
@@ -8,9 +8,8 @@ ac_add_options --enable-signmar
|
||||
ac_add_options --with-branding=browser/branding/cliqz
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --with-app-name=cliqz # name for binaries
|
||||
-ac_add_options --enable-crashreporter
|
||||
ac_add_options --enable-js-shell
|
||||
|
||||
export MOZ_APP_PROFILE=CLIQZ
|
||||
export MOZ_AUTOMATION_UPLOAD=1
|
||||
|
31
www/cliqz/patches/patch-mozilla-release_config_rules.mk
Normal file
31
www/cliqz/patches/patch-mozilla-release_config_rules.mk
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-mozilla-release_config_rules.mk,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Commented out the various wget(1) to prevent http traffic during build
|
||||
phase.
|
||||
|
||||
--- mozilla-release/config/rules.mk.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/config/rules.mk
|
||||
@@ -1302,20 +1302,20 @@ $(EXTENSIONS_PATH):
|
||||
CLIQZ_XPI_PATH = $(EXTENSIONS_PATH)/cliqz@cliqz.com.xpi
|
||||
$(CLIQZ_XPI_PATH): $(EXTENSIONS_PATH)
|
||||
echo CLIQZ_XPI_PATH in `pwd`
|
||||
- wget --output-document $(CLIQZ_XPI_PATH) $(CLIQZ_EXT_URL)
|
||||
+# wget --output-document $(CLIQZ_XPI_PATH) $(CLIQZ_EXT_URL)
|
||||
|
||||
HTTPSE_XPI_PATH = $(EXTENSIONS_PATH)/https-everywhere@cliqz.com.xpi
|
||||
$(HTTPSE_XPI_PATH): $(EXTENSIONS_PATH)
|
||||
ifdef HTTPSE_EXT_URL
|
||||
echo HTTPSE_XPI_PATH in `pwd`
|
||||
- wget --output-document $(HTTPSE_XPI_PATH) $(HTTPSE_EXT_URL)
|
||||
+# wget --output-document $(HTTPSE_XPI_PATH) $(HTTPSE_EXT_URL)
|
||||
endif
|
||||
|
||||
CONSENTRICK_XPI_PATH = $(EXTENSIONS_PATH)/gdprtool@cliqz.com.xpi
|
||||
$(CONSENTRICK_XPI_PATH): $(EXTENSIONS_PATH)
|
||||
ifdef CONSENTRICK_EXT_URL
|
||||
echo CONSENTRICK_XPI_PATH in `pwd`
|
||||
- wget --output-document $(CONSENTRICK_XPI_PATH) $(CONSENTRICK_EXT_URL)
|
||||
+# wget --output-document $(CONSENTRICK_XPI_PATH) $(CONSENTRICK_EXT_URL)
|
||||
endif
|
||||
|
||||
CLIQZ_ONIONMODE_XPI_PATH = $(EXTENSIONS_PATH)/onionmode@cliqz.com.xpi
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-mozilla-release_dom_base_nsAttrName.h,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
cbindgen gets confused by NetBSD's types being macros too
|
||||
https://mail-index.netbsd.org/tech-pkg/2018/10/25/msg020395.html
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/dom/base/nsAttrName.h.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/dom/base/nsAttrName.h
|
||||
@@ -16,6 +16,10 @@
|
||||
#include "mozilla/dom/NodeInfo.h"
|
||||
#include "nsAtom.h"
|
||||
#include "nsDOMString.h"
|
||||
+#ifdef __NetBSD__
|
||||
+/* This is also a macro which causes problems with cbindgen */
|
||||
+#undef uintptr_t
|
||||
+#endif
|
||||
|
||||
#define NS_ATTRNAME_NODEINFO_BIT 1
|
||||
class nsAttrName {
|
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-mozilla-release_gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Fix build where _LITTLE_ENDIAN is not an integer.
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/gfx/angle/checkout/src/common/third_party/smhasher/src/PMurHash.cpp
|
||||
@@ -92,7 +92,7 @@ on big endian machines, or a byte-by-byt
|
||||
/* gcc 'may' define __LITTLE_ENDIAN__ or __BIG_ENDIAN__ to 1 (Note the trailing __),
|
||||
* or even _LITTLE_ENDIAN or _BIG_ENDIAN (Note the single _ prefix) */
|
||||
#if !defined(__BYTE_ORDER)
|
||||
- #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN==1
|
||||
+ #if defined(__LITTLE_ENDIAN__) && __LITTLE_ENDIAN__-0==1 || defined(_LITTLE_ENDIAN) && _LITTLE_ENDIAN-0==1
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#elif defined(__BIG_ENDIAN__) && __BIG_ENDIAN__==1 || defined(_BIG_ENDIAN) && _BIG_ENDIAN==1
|
||||
#define __BYTE_ORDER __BIG_ENDIAN
|
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-mozilla-release_gfx_angle_checkout_src_compiler_translator_InfoSink.h,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* isinf/isnan in make.h is defined as macro. Use non-macro version
|
||||
to fix build.
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/gfx/angle/checkout/src/compiler/translator/InfoSink.h.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/gfx/angle/checkout/src/compiler/translator/InfoSink.h
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef COMPILER_TRANSLATOR_INFOSINK_H_
|
||||
#define COMPILER_TRANSLATOR_INFOSINK_H_
|
||||
|
||||
-#include <math.h>
|
||||
+#include <cmath>
|
||||
#include <stdlib.h>
|
||||
#include "compiler/translator/Common.h"
|
||||
#include "compiler/translator/Severity.h"
|
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_chromium_src_base_lock__impl__posix.cc,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
- Fix build on NetBSD 7.1 (which doesn't have PTHREAD_PRIO_INHERIT)
|
||||
|
||||
Original patch from tsutsui, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/chromium/src/base/lock_impl_posix.cc.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/chromium/src/base/lock_impl_posix.cc
|
||||
@@ -22,7 +22,7 @@ namespace internal {
|
||||
// Lock::PriorityInheritanceAvailable still must be checked as the code may
|
||||
// compile but the underlying platform still may not correctly support priority
|
||||
// inheritance locks.
|
||||
-#if defined(OS_NACL) || defined(OS_ANDROID)
|
||||
+#if defined(OS_NACL) || defined(OS_ANDROID) || (defined(__NetBSD__) && !defined(PTHREAD_PRIO_INHERIT))
|
||||
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 0
|
||||
#else
|
||||
# define PRIORITY_INHERITANCE_LOCKS_POSSIBLE() 1
|
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_chromium_src_base_message__pump__libevent.cc,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Allow older libevent
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/chromium/src/base/message_pump_libevent.cc.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/chromium/src/base/message_pump_libevent.cc
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
// This macro checks that the _EVENT_SIZEOF_* constants defined in
|
||||
// ipc/chromiume/src/third_party/<platform>/event2/event-config.h are correct.
|
||||
+#if 0
|
||||
#if defined(_EVENT_SIZEOF_SHORT)
|
||||
# define CHECK_EVENT_SIZEOF(TYPE, type) \
|
||||
static_assert(_EVENT_SIZEOF_##TYPE == sizeof(type), \
|
||||
@@ -41,6 +42,7 @@ CHECK_EVENT_SIZEOF(PTHREAD_T, pthread_t)
|
||||
CHECK_EVENT_SIZEOF(SHORT, short);
|
||||
CHECK_EVENT_SIZEOF(SIZE_T, size_t);
|
||||
CHECK_EVENT_SIZEOF(VOID_P, void*);
|
||||
+#endif
|
||||
|
||||
// Lifecycle of struct event
|
||||
// Libevent uses two main data structures:
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_chromium_src_base_platform__thread__posix.cc,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Support NetBSD
|
||||
* Support Solaris (we can't rely on pthread_setname_np so ignore it).
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/chromium/src/base/platform_thread_posix.cc.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/chromium/src/base/platform_thread_posix.cc
|
||||
@@ -12,7 +12,9 @@
|
||||
#if defined(OS_MACOSX)
|
||||
# include <mach/mach.h>
|
||||
#elif defined(OS_NETBSD)
|
||||
-# include <lwp.h>
|
||||
+_Pragma("GCC visibility push(default)")
|
||||
+#include <lwp.h>
|
||||
+_Pragma("GCC visibility pop")
|
||||
#elif defined(OS_LINUX)
|
||||
# include <sys/syscall.h>
|
||||
# include <sys/prctl.h>
|
|
@ -0,0 +1,20 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_glue_CrossProcessSemaphore.h,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/glue/CrossProcessSemaphore.h.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/glue/CrossProcessSemaphore.h
|
||||
@@ -93,7 +93,13 @@ private:
|
||||
HANDLE mSemaphore;
|
||||
#elif !defined(OS_MACOSX)
|
||||
RefPtr<mozilla::ipc::SharedMemoryBasic> mSharedBuffer;
|
||||
+#if defined(__NetBSD__)
|
||||
+ pthread_mutex_t* mMutex;
|
||||
+ pthread_cond_t* mNotZero;
|
||||
+ uint32_t* mValue;
|
||||
+#else
|
||||
sem_t* mSemaphore;
|
||||
+#endif
|
||||
mozilla::Atomic<int32_t>* mRefCount;
|
||||
#endif
|
||||
};
|
|
@ -0,0 +1,189 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_glue_CrossProcessSemaphore__posix.cpp,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/glue/CrossProcessSemaphore_posix.cpp.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/glue/CrossProcessSemaphore_posix.cpp
|
||||
@@ -9,6 +9,11 @@
|
||||
#include "nsDebug.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include <errno.h>
|
||||
+#if defined(__NetBSD__)
|
||||
+#include <iostream>
|
||||
+#include <unistd.h>
|
||||
+#include <limits>
|
||||
+#endif
|
||||
|
||||
static const uint64_t kNsPerMs = 1000000;
|
||||
static const uint64_t kNsPerSec = 1000000000;
|
||||
@@ -16,7 +21,13 @@ static const uint64_t kNsPerSec = 100000
|
||||
namespace {
|
||||
|
||||
struct SemaphoreData {
|
||||
+#if defined(__NetBSD__)
|
||||
+ pthread_mutex_t mMutex;
|
||||
+ pthread_cond_t mNotZero;
|
||||
+ uint32_t mValue;
|
||||
+#else
|
||||
sem_t mSemaphore;
|
||||
+#endif
|
||||
mozilla::Atomic<int32_t> mRefCount;
|
||||
uint32_t mInitialValue;
|
||||
};
|
||||
@@ -42,13 +53,27 @@ namespace mozilla {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
+#if defined(__NetBSD__)
|
||||
+ data->mValue = aInitialValue;
|
||||
+ if (pthread_mutex_init(&data->mMutex, NULL) ||
|
||||
+ pthread_cond_init(&data->mNotZero, NULL) ) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+#else
|
||||
if (sem_init(&data->mSemaphore, 1, aInitialValue)) {
|
||||
return nullptr;
|
||||
}
|
||||
+#endif
|
||||
|
||||
CrossProcessSemaphore* sem = new CrossProcessSemaphore;
|
||||
sem->mSharedBuffer = sharedBuffer;
|
||||
+#if defined(__NetBSD__)
|
||||
+ sem->mMutex = &data->mMutex;
|
||||
+ sem->mNotZero = &data->mNotZero;
|
||||
+ sem->mValue = &data->mValue;
|
||||
+#else
|
||||
sem->mSemaphore = &data->mSemaphore;
|
||||
+#endif
|
||||
sem->mRefCount = &data->mRefCount;
|
||||
*sem->mRefCount = 1;
|
||||
|
||||
@@ -83,23 +108,44 @@ namespace mozilla {
|
||||
|
||||
int32_t oldCount = data->mRefCount++;
|
||||
if (oldCount == 0) {
|
||||
+#if defined(__NetBSD__)
|
||||
+ if (pthread_mutex_init(&data->mMutex, NULL) ||
|
||||
+ pthread_cond_init(&data->mNotZero, NULL) ) {
|
||||
+ data->mRefCount--;
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+#else
|
||||
// The other side has already let go of their CrossProcessSemaphore, so now
|
||||
// mSemaphore is garbage. We need to re-initialize it.
|
||||
if (sem_init(&data->mSemaphore, 1, data->mInitialValue)) {
|
||||
data->mRefCount--;
|
||||
return nullptr;
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
CrossProcessSemaphore* sem = new CrossProcessSemaphore;
|
||||
sem->mSharedBuffer = sharedBuffer;
|
||||
+#if defined(__NetBSD__)
|
||||
+ sem->mMutex = &data->mMutex;
|
||||
+ sem->mNotZero = &data->mNotZero;
|
||||
+ sem->mValue = &data->mValue;
|
||||
+#else
|
||||
sem->mSemaphore = &data->mSemaphore;
|
||||
+#endif
|
||||
sem->mRefCount = &data->mRefCount;
|
||||
return sem;
|
||||
}
|
||||
|
||||
CrossProcessSemaphore::CrossProcessSemaphore()
|
||||
- : mSemaphore(nullptr), mRefCount(nullptr) {
|
||||
+#if defined(__NetBSD__)
|
||||
+ : mMutex (nullptr)
|
||||
+ , mNotZero (nullptr)
|
||||
+ , mValue (nullptr)
|
||||
+#else
|
||||
+ : mSemaphore(nullptr)
|
||||
+#endif
|
||||
+ , mRefCount(nullptr) {
|
||||
MOZ_COUNT_CTOR(CrossProcessSemaphore);
|
||||
}
|
||||
|
||||
@@ -108,16 +154,57 @@ CrossProcessSemaphore::~CrossProcessSema
|
||||
|
||||
if (oldCount == 0) {
|
||||
// Nothing can be done if the destroy fails so ignore return code.
|
||||
+#if defined(__NetBSD__)
|
||||
+ (void)pthread_cond_destroy(mNotZero);
|
||||
+ (void)pthread_mutex_destroy(mMutex);
|
||||
+#else
|
||||
Unused << sem_destroy(mSemaphore);
|
||||
+#endif
|
||||
}
|
||||
|
||||
MOZ_COUNT_DTOR(CrossProcessSemaphore);
|
||||
}
|
||||
|
||||
+#if defined(__NetBSD__)
|
||||
+static struct timespec
|
||||
+makeAbsTime(const Maybe<TimeDuration>& aWaitTime) {
|
||||
+ struct timespec ts;
|
||||
+ if (aWaitTime.isSome()) {
|
||||
+ clock_gettime(CLOCK_REALTIME, &ts);
|
||||
+ ts.tv_nsec += (kNsPerMs * aWaitTime->ToMilliseconds());
|
||||
+ ts.tv_sec += ts.tv_nsec / kNsPerSec;
|
||||
+ ts.tv_nsec %= kNsPerSec;
|
||||
+ }
|
||||
+ else {
|
||||
+ ts.tv_sec = std::numeric_limits<time_t>::max();
|
||||
+ ts.tv_nsec = 0;
|
||||
+ }
|
||||
+ return ts;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
bool CrossProcessSemaphore::Wait(const Maybe<TimeDuration>& aWaitTime) {
|
||||
MOZ_ASSERT(*mRefCount > 0,
|
||||
"Attempting to wait on a semaphore with zero ref count");
|
||||
int ret;
|
||||
+#if defined(__NetBSD__)
|
||||
+ struct timespec ts = makeAbsTime(aWaitTime);
|
||||
+
|
||||
+ ret = pthread_mutex_lock(mMutex);
|
||||
+
|
||||
+ if (ret == 0) {
|
||||
+ while (ret == 0 && mValue == 0) {
|
||||
+ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts);
|
||||
+ while (ret == -1 && errno == EINTR) {
|
||||
+ ret = pthread_cond_timedwait(mNotZero, mMutex, &ts);
|
||||
+ }
|
||||
+ }
|
||||
+ if (ret == 0) {
|
||||
+ --(*mValue);
|
||||
+ }
|
||||
+ pthread_mutex_unlock(mMutex);
|
||||
+ }
|
||||
+#else
|
||||
if (aWaitTime.isSome()) {
|
||||
struct timespec ts;
|
||||
if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
|
||||
@@ -134,13 +221,24 @@ bool CrossProcessSemaphore::Wait(const M
|
||||
while ((ret = sem_wait(mSemaphore)) == -1 && errno == EINTR) {
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
return ret == 0;
|
||||
}
|
||||
|
||||
void CrossProcessSemaphore::Signal() {
|
||||
MOZ_ASSERT(*mRefCount > 0,
|
||||
"Attempting to signal a semaphore with zero ref count");
|
||||
+#if defined(__NetBSD__)
|
||||
+ int ret;
|
||||
+ ret = pthread_mutex_lock(mMutex);
|
||||
+ if (ret == 0) {
|
||||
+ ++(*mValue);
|
||||
+ pthread_cond_signal(mNotZero);
|
||||
+ pthread_mutex_unlock(mMutex);
|
||||
+ }
|
||||
+#else
|
||||
sem_post(mSemaphore);
|
||||
+#endif
|
||||
}
|
||||
|
||||
CrossProcessSemaphoreHandle CrossProcessSemaphore::ShareToProcess(
|
|
@ -0,0 +1,23 @@
|
|||
$NetBSD: patch-mozilla-release_ipc_glue_GeckoChildProcessHost.cpp,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Support Solaris
|
||||
* Fix NetBSD linking
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/ipc/glue/GeckoChildProcessHost.cpp.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/ipc/glue/GeckoChildProcessHost.cpp
|
||||
@@ -4,7 +4,13 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
+#if defined(__NetBSD__)
|
||||
+_Pragma("GCC visibility push(default)")
|
||||
+#endif
|
||||
#include "GeckoChildProcessHost.h"
|
||||
+#if defined(__NetBSD__)
|
||||
+_Pragma("GCC visibility pop")
|
||||
+#endif
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/string_util.h"
|
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-mozilla-release_servo_components_style_build__gecko.rs,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Fix build with __uint32_t etc. not found errors on NetBSD/amd64 8.99.2
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/servo/components/style/build_gecko.rs.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/servo/components/style/build_gecko.rs
|
||||
@@ -559,6 +559,8 @@ mod bindings {
|
||||
.mutable_borrowed_type(ty)
|
||||
.zero_size_type(ty, &structs_types);
|
||||
}
|
||||
+ builder = builder
|
||||
+ .raw_line(format!("pub use gecko_bindings::structs::root::*;"));
|
||||
write_binding_file(builder, BINDINGS_FILE, &fixups);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
$NetBSD: patch-mozilla-release_toolkit_components_terminator_nsTerminator.cpp,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Fix segfault on exit under NetBSD
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/toolkit/components/terminator/nsTerminator.cpp.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/toolkit/components/terminator/nsTerminator.cpp
|
||||
@@ -36,7 +36,7 @@
|
||||
#if defined(XP_WIN)
|
||||
# include <windows.h>
|
||||
#else
|
||||
-# include <unistd.h>
|
||||
+# include <time.h>
|
||||
#endif
|
||||
|
||||
#include "mozilla/ArrayUtils.h"
|
||||
@@ -170,7 +170,10 @@ void RunWatchdog(void* arg) {
|
||||
#if defined(XP_WIN)
|
||||
Sleep(1000 /* ms */);
|
||||
#else
|
||||
- usleep(1000000 /* usec */);
|
||||
+ struct timespec tickd;
|
||||
+ tickd.tv_sec = 1;
|
||||
+ tickd.tv_nsec = 0;
|
||||
+ nanosleep(&tickd, NULL);
|
||||
#endif
|
||||
|
||||
if (gHeartbeat++ < timeToLive) {
|
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-mozilla-release_toolkit_xre_glxtest.cpp,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
Fix libGL filename on NetBSD,
|
||||
see https://bugzilla.mozilla.org/show_bug.cgi?id=1180498
|
||||
|
||||
Original patch from matrin, imported from www/firefox
|
||||
|
||||
--- mozilla-release/toolkit/xre/glxtest.cpp.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/toolkit/xre/glxtest.cpp
|
||||
@@ -116,7 +116,7 @@ void glxtest() {
|
||||
"The MOZ_AVOID_OPENGL_ALTOGETHER environment variable is defined");
|
||||
|
||||
///// Open libGL and load needed symbols /////
|
||||
-#ifdef __OpenBSD__
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
# define LIBGL_FILENAME "libGL.so"
|
||||
#else
|
||||
# define LIBGL_FILENAME "libGL.so.1"
|
17
www/cliqz/patches/patch-mozilla-release_xpcom_base_nscore.h
Normal file
17
www/cliqz/patches/patch-mozilla-release_xpcom_base_nscore.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-mozilla-release_xpcom_base_nscore.h,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Support llvm/clang
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
--- mozilla-release/xpcom/base/nscore.h.orig 2018-11-16 08:40:07.000000000 +0000
|
||||
+++ mozilla-release/xpcom/base/nscore.h
|
||||
@@ -76,7 +76,7 @@
|
||||
* NS_HIDDEN_(int) NS_FASTCALL func2(char *foo);
|
||||
*/
|
||||
|
||||
-#if defined(__i386__) && defined(__GNUC__)
|
||||
+#if defined(__i386__) && defined(__GNUC__) && !(defined(__clang__) && __clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ == 0)
|
||||
# define NS_FASTCALL __attribute__((regparm(3), stdcall))
|
||||
# define NS_CONSTRUCTOR_FASTCALL __attribute__((regparm(3), stdcall))
|
||||
#elif defined(XP_WIN) && !defined(_WIN64)
|
|
@ -0,0 +1,44 @@
|
|||
$NetBSD: patch-mozilla-release_xpcom_build_BinaryPath.h,v 1.1 2019/04/19 14:02:03 fox Exp $
|
||||
|
||||
* Fix build under netbsd-7, PR pkg/52956
|
||||
|
||||
Original patch from ryoon, imported from www/firefox
|
||||
|
||||
* Renamed firefox to cliqz to match the binary name
|
||||
|
||||
--- mozilla-release/xpcom/build/BinaryPath.h.orig 2019-04-03 08:46:52.000000000 +0000
|
||||
+++ mozilla-release/xpcom/build/BinaryPath.h
|
||||
@@ -21,7 +21,8 @@
|
||||
defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
# include <sys/sysctl.h>
|
||||
#endif
|
||||
-#if defined(__OpenBSD__)
|
||||
+#if defined(__OpenBSD__) || \
|
||||
+ (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME))
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#include "mozilla/UniquePtr.h"
|
||||
@@ -164,7 +165,8 @@ class BinaryPath {
|
||||
}
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__DragonFly__) || \
|
||||
- defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
+ defined(__FreeBSD_kernel__) || \
|
||||
+ (defined(__NetBSD__) && defined(KERN_PROC_PATHNAME))
|
||||
static nsresult Get(char aResult[MAXPATHLEN]) {
|
||||
int mib[4];
|
||||
mib[0] = CTL_KERN;
|
||||
@@ -246,6 +248,13 @@ class BinaryPath {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
+#elif (defined(__NetBSD__) && !defined(KERN_PROC_PATHNAME))
|
||||
+ static nsresult Get(char aResult[MAXPATHLEN])
|
||||
+ {
|
||||
+ char path[] = "@PREFIX@/lib/cliqz/cliqz";
|
||||
+ sprintf(aResult, "%s", path);
|
||||
+ return NS_OK;
|
||||
+ }
|
||||
#else
|
||||
# error Oops, you need platform-specific code here
|
||||
#endif
|
Loading…
Reference in a new issue