pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Added pulseaudio support. Re-organized the code.
Module Name: pkgsrc-wip
Committed By: Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By: fox
Date: Fri Dec 14 18:18:55 2018 +0530
Changeset: f1c76adc003c7949216947e62f8e3d25e42b8068
Modified Files:
cliqz/Makefile
cliqz/TODO
cliqz/distinfo
cliqz/patches/patch-mozilla-release_browser_config_cliqz.mozconfig
Added Files:
cliqz/mozilla-common.mk
cliqz/options.mk
Removed Files:
cliqz/patches/patch-magic__build__and__package.sh
Log Message:
Added pulseaudio support. Re-organized the code.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f1c76adc003c7949216947e62f8e3d25e42b8068
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
cliqz/Makefile | 62 +++------------
cliqz/TODO | 11 +--
cliqz/distinfo | 2 +-
cliqz/mozilla-common.mk | 91 ++++++++++++++++++++++
cliqz/options.mk | 40 ++++++++++
cliqz/patches/patch-magic__build__and__package.sh | 10 ---
...-mozilla-release_browser_config_cliqz.mozconfig | 36 +--------
7 files changed, 147 insertions(+), 105 deletions(-)
diffs:
diff --git a/cliqz/Makefile b/cliqz/Makefile
index 045102de16..6596ccc86f 100644
--- a/cliqz/Makefile
+++ b/cliqz/Makefile
@@ -13,7 +13,6 @@ DISTFILES= adult-domains.bin \
${DISTNAME}${EXTRACT_SUFX}
EXTRACT_USING= bsdtar
-#EXTRACT_SUFX= .tar.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= fox%NetBSD.org@localhost
@@ -21,15 +20,13 @@ HOMEPAGE= https://cliqz.com/en/desktop
COMMENT= Secure browser (Mozilla based) with built-in quick search
LICENSE= mpl-2.0
+USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip bash pax
+USE_LANGUAGES+= c99 gnu++14
+
TOOL_DEPENDS+= python37-[0-9]*:../../lang/python37
TOOL_DEPENDS+= cbindgen-[0-9]*:../../devel/cbindgen
TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
-BUILD_DEPENDS+= yasm>=1.1:../../devel/yasm
-
-USE_TOOLS+= pkg-config perl gmake autoconf213 unzip zip bash pax
-USE_LANGUAGES+= c99 gnu++14
-
WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${DISTVERSION}
CLIQZ_CHANNEL= release
@@ -54,31 +51,14 @@ SITES.gdprtool${CLIQZ_PLUGIN_SUFX}= \
MAKE_ENV+= CQZ_RELEASE_CHANNEL=${CLIQZ_CHANNEL}
MAKE_ENV+= CQZ_BUILD_ID=${CLIQZ_LAST_BUILD_ID}
-.include "../../mk/bsd.prefs.mk"
-
-CONFIGURE_ARGS+= --target=${MACHINE_GNU_PLATFORM}
-CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
-
-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
+.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
-# for lang/gcc6
-GCC_REQD+= 6.1
-
-.if !empty(MACHINE_PLATFORM:MNetBSD-[0-7]**-*) || \
- !empty(MACHINE_PLATFORM:MNetBSD-8.[0-8]*-*)
-USE_PKGSRC_GCC_RUNTIME= yes
-.endif
-
-CFLAGS+= -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS -D__HAVE_INLINE___ISINF
-CXXFLAGS+= -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS -D__HAVE_INLINE___ISINF
+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
@@ -100,10 +80,10 @@ post-patch:
-e '/StartupWMClass/d' \
< ${MOZ_DESKTOP} \
> ${CLIQZ_DESKTOP}
- ${ECHO} 'ac_add_options --target=${MACHINE_GNU_PLATFORM}' >> \
- ${WRKSRC}/mozilla-release/browser/config/cliqz.mozconfig
- ${ECHO} 'ac_add_options --host=${MACHINE_GNU_PLATFORM}' >> \
- ${WRKSRC}/mozilla-release/browser/config/cliqz.mozconfig
+ 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
@@ -153,33 +133,11 @@ post-install:
${INSTALL_DATA} ${CLIQZ_DESKTOP} ${DESTDIR}${PREFIX}/share/applications/
${INSTALL_DATA} ${CLIQZ_ICON_SRC} ${DESTDIR}${PREFIX}/share/pixmaps/${CLIQZ_ICON}
-.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_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"
-BUILDLINK_API_DEPENDS.libvpx+= libvpx>=1.3.0
-.include "../../sysutils/dbus-glib/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
-.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"
.include "../../mk/bsd.pkg.mk"
diff --git a/cliqz/TODO b/cliqz/TODO
index 2c318bdd1c..eb05863a58 100644
--- a/cliqz/TODO
+++ b/cliqz/TODO
@@ -2,13 +2,6 @@ Build was fixed with a change from c++14 to gnu++14 in the USE_LANGUAGES.
Build not yet tested on i386.
-Fix the linker warnings
-*** This can be due to fox's NetBSD installation ***
-
-/usr/bin/ld: warning: libstdc++.so.8, needed by /usr/pkgsrc-current/wip/cliqz/work/.buildlink/lib/libicui18n.so, may conflict with libstdc++.so.7
-/usr/bin/ld: warning: libstdc++.so.8, needed by /usr/pkgsrc-current/wip/cliqz/work/.buildlink/lib/libicui18n.so, may conflict with libstdc++.so.7
-/usr/bin/ld: warning: libfontconfig.so.1, needed by /usr/pkgsrc-current/wip/cliqz/work/.buildlink/lib/libpangocairo-1.0.so, may conflict with libfontconfig.so.2
-/usr/bin/ld: warning: libfreetype.so.6, needed by /usr/pkgsrc-current/wip/cliqz/work/.buildlink/lib/libpangocairo-1.0.so, may conflict with libfreetype.so.18
-
-NOTE: Binaries have not been tested in a GUI environment.
+NOTE: Got a successful run on NetBSD/amd64
+NOTE: Audio has not been tested
diff --git a/cliqz/distinfo b/cliqz/distinfo
index 54daced811..a245c9f574 100644
--- a/cliqz/distinfo
+++ b/cliqz/distinfo
@@ -22,7 +22,7 @@ SHA512 (https-everywhere%cliqz.com.xpi@localhost) = f9c2f1d92c6a63c04d3bcd051099ee32c988c3
Size (https-everywhere%cliqz.com.xpi@localhost) = 2042146 bytes
SHA1 (patch-cliqz__env.sh) = 6f7aba36875e86960a8fd674fdff2f576d9b479d
SHA1 (patch-mozilla-release_browser_app_profile_firefox.js) = ad2d0da13b601f5026f474e084123cef6a2dac83
-SHA1 (patch-mozilla-release_browser_config_cliqz.mozconfig) = 69d020ec10566679ebfb001fbeeba926caa59086
+SHA1 (patch-mozilla-release_browser_config_cliqz.mozconfig) = dee8d9b10babd2f8a47d7ad506e269cba4f9acf9
SHA1 (patch-mozilla-release_config_rules.mk) = f78ba7e312616c3b347d584d9e37ac380621248b
SHA1 (patch-mozilla-release_dom_base_nsAttrName.h) = 0c666ba718c61931a2c0e59119942a91aaa13a3e
SHA1 (patch-mozilla-release_gfx_angle_checkout_src_common_third__party_smhasher_src_PMurHash.cpp) = 264e6b47b14e231016c5ee4a53b4ae5cb2bf285f
diff --git a/cliqz/mozilla-common.mk b/cliqz/mozilla-common.mk
new file mode 100644
index 0000000000..72a6571c76
--- /dev/null
+++ b/cliqz/mozilla-common.mk
@@ -0,0 +1,91 @@
+# $NetBSD$
+#
+# 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.1
+
+.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-pie"
+MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-chrome-format=flat"
+MOZ_CONFIGURE_ARGS+= "ac_add_options --enable-gconf"
+
+.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"
diff --git a/cliqz/options.mk b/cliqz/options.mk
new file mode 100644
index 0000000000..b8e74dc96d
--- /dev/null
+++ b/cliqz/options.mk
@@ -0,0 +1,40 @@
+# $NetBSD$
+
+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
+
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mgcc)
+. if ${CC_VERSION:S/gcc-//:S/.//g} >= 480
+# Modern gcc does not run any "tracking" passes when compiling with -O0,
+# which makes the generated debug info mostly useless. So explicitly
+# request them.
+O0TRACKING=-fvar-tracking-assignments -fvar-tracking
+. endif
+.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
diff --git a/cliqz/patches/patch-magic__build__and__package.sh b/cliqz/patches/patch-magic__build__and__package.sh
deleted file mode 100644
index a99f651a3a..0000000000
--- a/cliqz/patches/patch-magic__build__and__package.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD$
-
---- magic_build_and_package.sh.orig 2018-11-16 08:40:07.000000000 +0000
-+++ magic_build_and_package.sh
-@@ -1,4 +1,4 @@
--#! /bin/bash
-+#! /usr/pkg/bin/bash
-
- # Optional ENVs:
- # CQZ_BUILD_ID - specify special build timestamp or use latest one (depend on channel)
diff --git a/cliqz/patches/patch-mozilla-release_browser_config_cliqz.mozconfig b/cliqz/patches/patch-mozilla-release_browser_config_cliqz.mozconfig
index fda42b031b..6a63812fe0 100644
--- a/cliqz/patches/patch-mozilla-release_browser_config_cliqz.mozconfig
+++ b/cliqz/patches/patch-mozilla-release_browser_config_cliqz.mozconfig
@@ -1,47 +1,17 @@
$NetBSD$
-Add NetBSD specific options for cliqz build.
+Remove the crash reporter option, this is not 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,39 @@ ac_add_options --enable-signmar
+@@ -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
-+# NetBSD Options
-+ac_add_options --disable-crashreporter
-+ac_add_options --disable-updater
-+ac_add_options --disable-debug
-+ac_add_options --disable-debug-symbols
-+ac_add_options --disable-tests
-+ac_add_options --with-system-icu
-+ac_add_options --disable-webrtc
-+ac_add_options --enable-default-toolkit=cairo-gtk3
-+ac_add_options --enable-system-pixman
-+ac_add_options --disable-pulseaudio
-+ac_add_options --enable-dbus
-+ac_add_options --enable-pie
-+ac_add_options --enable-rust-simd
-+ac_add_options --with-system-libvpx
-+ac_add_options --enable-system-ffi
-+ac_add_options --with-system-nss
-+ac_add_options --with-system-nspr
-+ac_add_options --with-system-zlib
-+ac_add_options --with-system-bz2
-+ac_add_options --disable-necko-wifi
-+ac_add_options --enable-chrome-format=flat
-+ac_add_options --disable-libjpeg-turbo
-+ac_add_options --disable-icf
-+ac_add_options --disable-jemalloc
-+
-+
-+
-+#ac_add_options --target=x86_64--netbsd
-+#ac_add_options --host=x86_64--netbsd
-+
export MOZ_APP_PROFILE=CLIQZ
export MOZ_AUTOMATION_UPLOAD=1
Home |
Main Index |
Thread Index |
Old Index