svn commit: r514486 - in head/www/cliqz: . files

Mathieu Arnold mat at FreeBSD.org
Tue Oct 15 07:45:52 UTC 2019


On Tue, Oct 15, 2019 at 12:46:25AM +0000, Santhosh Raju wrote:
>  USE_GITHUB=	yes
>  GH_ACCOUNT=	cliqz-oss
>  GH_PROJECT=	browser-f
>  
> +.include "${.CURDIR}/Makefile.options"

If you want options in a separate file, it's ok, but please keep the
options at the correct place in the Makefile.
See https://www.freebsd.org/doc/en/books/porters-handbook/porting-order.html

>  USE_LDCONFIG=	yes
>  
>  bash_OLD_CMD=	"/bin/bash"
> Added: head/www/cliqz/Makefile.options
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/www/cliqz/Makefile.options	Tue Oct 15 00:46:25 2019	(r514486)
> @@ -0,0 +1,32 @@
> +# $FreeBSD$
> +
> +# Audio server options
> +OPTIONS_MULTI=		AUDIO
> +OPTIONS_MULTI_AUDIO=	JACK PULSEAUDIO SNDIO
> +OPTIONS_DEFAULT=	JACK PULSEAUDIO SNDIO
> +AUDIO_DESC=		Choose your audio options
> +
> +.include <bsd.port.options.mk>

You do not need to include bsd.port.options.mk, use options helpers as
shown below:

> +.if ${PORT_OPTIONS:MJACK}
> +BUILD_DEPENDS+=	${LOCALBASE}/include/jack/jack.h:audio/jack
> +MOZ_CONFIGURE_ARGS+=	"ac_add_options --enable-jack"

JACK_BUILD_DEPENDS=	${LOCALBASE}/include/jack/jack.h:audio/jack
JACK_VARS=	MOZ_CONFIGURE_ARGS+="ac_add_options --enable-jack"

> +.endif
> +
> +.if ${PORT_OPTIONS:MPULSEAUDIO}
> +BUILD_DEPENDS+=	${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
> +MOZ_CONFIGURE_ARGS+=	"ac_add_options	--enable-pulseaudio"
> +.else
> +MOZ_CONFIGURE_ARGS+=	"ac_add_options --disable-pulseaudio"
> +.endif

PULSEAUDIO_BUILD_DEPENDS=	${LOCALBASE}/include/pulse/pulseaudio.h:audio/pulseaudio
PULSEAUDIO_VARS=	MOZ_CONFIGURE_ARGS+="ac_add_options	--enable-pulseaudio"
PULSEAUDIO_VARS_OFF=	MOZ_CONFIGURE_ARGS+="ac_add_options --disable-pulseaudio"

> +.if ${PORT_OPTIONS:MSNDIO}
> +BUILD_DEPENDS+=	${LOCALBASE}/include/sndio.h:audio/sndio
> +LIB_DEPENDS+=	libsndio.so:audio/sndio

SNDIO_BUILD_DEPENDS=	${LOCALBASE}/include/sndio.h:audio/sndio
SNDIO_LIB_DEPENDS=	libsndio.so:audio/sndio

This target is already ok:

> +post-patch-SNDIO-on:
> +	@${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
> +		${WRKSRC}/mozilla-release/media/libcubeb/src/moz.build \
> +		${WRKSRC}/mozilla-release/toolkit/library/moz.build
> +	@${REINPLACE_CMD} -e 's|OpenBSD|${OPSYS}|g' \
> +		${WRKSRC}/mozilla-release/media/libcubeb/gtest/moz.build
> +.endif
> 
> Modified: head/www/cliqz/distinfo
> ==============================================================================
> --- head/www/cliqz/distinfo	Tue Oct 15 00:40:52 2019	(r514485)
> +++ head/www/cliqz/distinfo	Tue Oct 15 00:46:25 2019	(r514486)
> @@ -1,11 +1,11 @@
> -TIMESTAMP = 1569573921
> +TIMESTAMP = 1570787248
>  SHA256 (cliqz/adult-domains.bin) = 3d018d6ffa75107fdfbf39658e4adaa092d9b8a90c7865b21376855f7c382b65
>  SIZE (cliqz/adult-domains.bin) = 528392
> -SHA256 (cliqz/cliqz at cliqz.com.xpi) = 3617f21e0ba06df20022eb95aaa87fd55109d346939f7eaba66a67d821540c6a
> -SIZE (cliqz/cliqz at cliqz.com.xpi) = 5914074
> +SHA256 (cliqz/cliqz at cliqz.com.xpi) = c729bf22cd90c3312f0ea6f142eb6857f50cfe978dafc74710d9e1841cd602b8
> +SIZE (cliqz/cliqz at cliqz.com.xpi) = 5903170
>  SHA256 (cliqz/gdprtool at cliqz.com.xpi) = 95ce7bd4ba1ea301246ce45bc3cdcff550acf7d8f1af1b42fd22984614cd9018
>  SIZE (cliqz/gdprtool at cliqz.com.xpi) = 222247
>  SHA256 (cliqz/https-everywhere at cliqz.com.xpi) = 094516da166aa984c836130075184315c5636033899c49fe6bca5b7190f488fc
>  SIZE (cliqz/https-everywhere at cliqz.com.xpi) = 2147608
> -SHA256 (cliqz/cliqz-oss-browser-f-1.29.0_GH0.tar.gz) = 10850fa992b8d1cac92bb8f0c06148248a0fb1568d36a408768420b20248d0f6
> -SIZE (cliqz/cliqz-oss-browser-f-1.29.0_GH0.tar.gz) = 501511014
> +SHA256 (cliqz/cliqz-oss-browser-f-1.29.2_GH0.tar.gz) = dd63c2d435501614ad46df7d934362284f591144cacea6b06dd1b95be1203481
> +SIZE (cliqz/cliqz-oss-browser-f-1.29.2_GH0.tar.gz) = 501536649
> 
> Added: head/www/cliqz/files/patch-bug847568
> ==============================================================================
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/www/cliqz/files/patch-bug847568	Tue Oct 15 00:46:25 2019	(r514486)
> @@ -0,0 +1,235 @@
> +Force building against system-wide graphite2/harfbuzz.
> +
> +This was causing cliqz build failures in 13.0-CURRENT (1300050).
> +
> +--- mozilla-release/config/system-headers.mozbuild.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/config/system-headers.mozbuild
> +@@ -1304,6 +1304,19 @@ if CONFIG['MOZ_ENABLE_CONTENTMANAGER']:
> +         'SelectSingleContentItemPage.h',
> +     ]
> + 
> ++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
> ++    system_headers += [
> ++        'graphite2/Font.h',
> ++        'graphite2/Segment.h',
> ++    ]
> ++
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    system_headers += [
> ++        'harfbuzz/hb-glib.h',
> ++        'harfbuzz/hb-ot.h',
> ++        'harfbuzz/hb.h',
> ++    ]
> ++
> + if CONFIG['MOZ_SYSTEM_LIBVPX']:
> +     system_headers += [
> +         'vpx_mem/vpx_mem.h',
> +--- mozilla-release/dom/base/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/dom/base/moz.build
> +@@ -528,6 +528,9 @@ if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/andr
> + if CONFIG['MOZ_X11']:
> +     CXXFLAGS += CONFIG['TK_CFLAGS']
> + 
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> ++
> + GENERATED_FILES += [
> +     'PropertyUseCounterMap.inc',
> +     'UseCounterList.h',
> +--- mozilla-release/gfx/graphite2/moz-gr-update.sh.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/graphite2/moz-gr-update.sh
> +@@ -1,6 +1,7 @@
> + #!/bin/bash
> + 
> + # Script used to update the Graphite2 library in the mozilla source tree
> ++# and bump version for --with-system-graphite2
> + 
> + # This script lives in gfx/graphite2, along with the library source,
> + # but must be run from the top level of the mozilla-central tree.
> +@@ -37,12 +38,16 @@ echo "See" $0 "for update procedure." >> gfx/graphite2
> + #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
> + #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
> + 
> ++# chase version for --with-system-graphite2
> ++perl -p -i -e "s/[0-9]+\,[0-9]+\,[0-9]+/$RELEASE/ and tr/./,/ \
> ++  if /GR2_VERSION_REQUIRE/" old-configure.in
> ++
> + # summarize what's been touched
> + echo Updated to $RELEASE.
> + echo Here is what changed in the gfx/graphite2 directory:
> + echo
> + 
> +-hg stat gfx/graphite2
> ++hg stat old-configure.in gfx/graphite2
> + 
> + echo
> + echo If gfx/graphite2/src/files.mk has changed, please make corresponding
> +--- mozilla-release/gfx/harfbuzz/README-mozilla.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/harfbuzz/README-mozilla
> +@@ -15,3 +15,8 @@ from within the gfx/harfbuzz directory.
> + 
> + 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 toolkit/moz.configure in sync
> ++with checkout version or increment latest tag by one if it's not based
> ++on upstream release.
> +--- mozilla-release/gfx/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/moz.build
> +@@ -12,6 +12,12 @@ with Files('wr/**'):
> + if CONFIG['MOZ_TREE_CAIRO']:
> +     DIRS += ['cairo']
> + 
> ++if not CONFIG['MOZ_SYSTEM_GRAPHITE2']:
> ++    DIRS += ['graphite2/src' ]
> ++
> ++if not CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    DIRS += ['harfbuzz/src']
> ++
> + DIRS += [
> +     '2d',
> +     'ycbcr',
> +@@ -20,8 +26,6 @@ DIRS += [
> +     'qcms',
> +     'gl',
> +     'layers',
> +-    'graphite2/src',
> +-    'harfbuzz/src',
> +     'ots/src',
> +     'thebes',
> +     'ipc',
> +--- mozilla-release/gfx/skia/generate_mozbuild.py.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/skia/generate_mozbuild.py
> +@@ -117,6 +117,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
> +         '-Wno-unused-private-field',
> +     ]
> + 
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> ++
> + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
> +     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
> +     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
> +--- mozilla-release/gfx/skia/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/skia/moz.build
> +@@ -493,6 +493,9 @@ if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
> +         '-Wno-unused-private-field',
> +     ]
> + 
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> ++
> + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk3', 'android'):
> +     CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
> +     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
> +--- mozilla-release/gfx/thebes/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/gfx/thebes/moz.build
> +@@ -284,7 +284,13 @@ if CONFIG['MOZ_WAYLAND']:
> + 
> + LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
> + 
> +-DEFINES['GRAPHITE2_STATIC'] = True
> ++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
> ++    CXXFLAGS += CONFIG['MOZ_GRAPHITE2_CFLAGS']
> ++else:
> ++    DEFINES['GRAPHITE2_STATIC'] = True
> ++
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> + 
> + if CONFIG['CC_TYPE'] == 'clang':
> +     # Suppress warnings from Skia header files.
> +--- mozilla-release/intl/unicharutil/util/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/intl/unicharutil/util/moz.build
> +@@ -25,4 +25,7 @@ UNIFIED_SOURCES += [
> +     'nsUnicodeProperties.cpp',
> + ]
> + 
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> ++
> + FINAL_LIBRARY = 'xul'
> +--- mozilla-release/netwerk/dns/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/netwerk/dns/moz.build
> +@@ -83,3 +83,6 @@ USE_LIBS += ['icu']
> + 
> + if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
> +     CXXFLAGS += ['-Wno-error=shadow']
> ++
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    CXXFLAGS += CONFIG['MOZ_HARFBUZZ_CFLAGS']
> +--- mozilla-release/old-configure.in.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/old-configure.in
> +@@ -2715,6 +2715,27 @@ dnl ==================================================
> + AC_SUBST(MOZ_LINUX_32_SSE2_STARTUP_ERROR)
> + 
> + dnl ========================================================
> ++dnl Check for graphite2
> ++dnl ========================================================
> ++if test -n "$MOZ_SYSTEM_GRAPHITE2"; then
> ++    dnl graphite2.pc has bogus version, check manually
> ++    _SAVE_CFLAGS=$CFLAGS
> ++    CFLAGS="$CFLAGS $MOZ_GRAPHITE2_CFLAGS"
> ++    AC_TRY_COMPILE([ #include <graphite2/Font.h>
> ++                     #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,3,12)
> ++                     #error "Insufficient graphite2 version."
> ++                     #endif
> ++                   ], [],
> ++                   [AC_MSG_ERROR([--with-system-graphite2 requested but no working libgraphite2 found])])
> ++    CFLAGS=$_SAVE_CFLAGS
> ++fi
> ++
> ++dnl ========================================================
> + dnl Check for pixman and cairo
> + dnl ========================================================
> + 
> +--- mozilla-release/toolkit/library/moz.build.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/toolkit/library/moz.build
> +@@ -226,6 +226,12 @@ if CONFIG['MOZ_SYSTEM_PNG']:
> + if CONFIG['MOZ_SYSTEM_WEBP']:
> +     OS_LIBS += CONFIG['MOZ_WEBP_LIBS']
> + 
> ++if CONFIG['MOZ_SYSTEM_GRAPHITE2']:
> ++    OS_LIBS += CONFIG['MOZ_GRAPHITE2_LIBS']
> ++
> ++if CONFIG['MOZ_SYSTEM_HARFBUZZ']:
> ++    OS_LIBS += CONFIG['MOZ_HARFBUZZ_LIBS']
> ++
> + if CONFIG['MOZ_SYSTEM_LIBEVENT']:
> +     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
> + 
> +--- mozilla-release/toolkit/moz.configure.orig	2019-10-08 09:02:23 UTC
> ++++ mozilla-release/toolkit/moz.configure
> +@@ -932,6 +932,26 @@ set_config('ENABLE_REMOTE_AGENT', remote)
> + set_define('ENABLE_REMOTE_AGENT', remote)
> + 
> + 
> ++# Graphite2
> ++# ==============================================================
> ++option('--with-system-graphite2',
> ++       help="Use system graphite2 (located with pkgconfig)")
> ++
> ++system_graphite2 = pkg_check_modules('MOZ_GRAPHITE2', 'graphite2',
> ++                                     when='--with-system-graphite2')
> ++
> ++set_config('MOZ_SYSTEM_GRAPHITE2', depends_if(system_graphite2)(lambda _: True))
> ++
> ++# HarfBuzz
> ++# ==============================================================
> ++option('--with-system-harfbuzz',
> ++       help="Use system harfbuzz (located with pkgconfig)")
> ++
> ++system_harfbuzz = pkg_check_modules('MOZ_HARFBUZZ', 'harfbuzz >= 2.5.3',
> ++                                    when='--with-system-harfbuzz')
> ++
> ++set_config('MOZ_SYSTEM_HARFBUZZ', depends_if(system_harfbuzz)(lambda _: True))
> ++
> + # Marionette remote protocol
> + # ==============================================================
> + #
> 
> Modified: head/www/cliqz/files/patch-mozilla-release_config_rules.mk
> ==============================================================================
> --- head/www/cliqz/files/patch-mozilla-release_config_rules.mk	Tue Oct 15 00:40:52 2019	(r514485)
> +++ head/www/cliqz/files/patch-mozilla-release_config_rules.mk	Tue Oct 15 00:46:25 2019	(r514486)
> @@ -1,6 +1,6 @@
> ---- mozilla-release/config/rules.mk.orig	2019-05-29 12:52:42 UTC
> +--- mozilla-release/config/rules.mk.orig	2019-10-08 09:02:23 UTC
>  +++ mozilla-release/config/rules.mk
> -@@ -1003,20 +1003,20 @@ $(EXTENSIONS_PATH):
> +@@ -989,20 +989,20 @@ $(EXTENSIONS_PATH):
>   CLIQZ_XPI_PATH = $(EXTENSIONS_PATH)/cliqz at cliqz.com.xpi
>   $(CLIQZ_XPI_PATH): $(EXTENSIONS_PATH)
>   	echo CLIQZ_XPI_PATH in `pwd`
> @@ -23,4 +23,4 @@
>  +#	wget --output-document $(CONSENTRICK_XPI_PATH) $(CONSENTRICK_EXT_URL)
>   endif
>   
> - CLIQZ_ONIONMODE_XPI_PATH = $(EXTENSIONS_PATH)/onionmode at cliqz.com.xpi
> + DAT_XPI_PATH = $(EXTENSIONS_PATH)/dat at cliqz.com.xpi
> 

-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20191015/f8183195/attachment.sig>


More information about the svn-ports-head mailing list