2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:22 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# 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/.
|
|
|
|
|
2017-03-07 18:06:45 +00:00
|
|
|
with Files("**"):
|
2022-07-11 22:38:30 +00:00
|
|
|
BUG_COMPONENT = ("Core", "Graphics: ImageLib")
|
2017-03-07 18:06:45 +00:00
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS += [
|
|
|
|
'png.h',
|
2014-08-22 11:11:00 +00:00
|
|
|
'pngconf.h',
|
|
|
|
'pnglibconf.h'
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
|
|
|
|
2013-11-11 16:56:58 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-06-04 15:08:44 +00:00
|
|
|
'png.c',
|
|
|
|
'pngerror.c',
|
|
|
|
'pngget.c',
|
|
|
|
'pngmem.c',
|
|
|
|
'pngpread.c',
|
|
|
|
'pngread.c',
|
|
|
|
'pngrio.c',
|
|
|
|
'pngrtran.c',
|
|
|
|
'pngrutil.c',
|
2013-07-18 14:27:21 +00:00
|
|
|
'pngset.c',
|
|
|
|
'pngtrans.c',
|
2013-06-04 15:08:44 +00:00
|
|
|
'pngwio.c',
|
|
|
|
'pngwrite.c',
|
2013-12-20 16:37:47 +00:00
|
|
|
'pngwutil.c'
|
2013-06-04 15:08:44 +00:00
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2019-04-23 22:04:35 +00:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm' or CONFIG['CPU_ARCH'] == 'aarch64':
|
2016-09-07 17:30:00 +00:00
|
|
|
DEFINES['MOZ_PNG_USE_ARM_NEON'] = True
|
2013-12-04 13:01:34 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2013-12-20 16:37:47 +00:00
|
|
|
'arm/arm_init.c',
|
2019-04-23 22:04:35 +00:00
|
|
|
'arm/filter_neon_intrinsics.c',
|
|
|
|
'arm/palette_neon_intrinsics.c'
|
2013-07-18 14:27:21 +00:00
|
|
|
]
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2019-04-23 22:04:35 +00:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm':
|
|
|
|
SOURCES += [
|
|
|
|
'arm/filter_neon.S'
|
|
|
|
]
|
2019-01-02 14:11:31 +00:00
|
|
|
|
2016-08-11 13:50:00 +00:00
|
|
|
if CONFIG['INTEL_ARCHITECTURE']:
|
2016-09-07 17:30:00 +00:00
|
|
|
DEFINES['MOZ_PNG_USE_INTEL_SSE'] = True
|
2016-08-11 13:50:00 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2017-03-18 14:33:00 +00:00
|
|
|
'intel/filter_sse2_intrinsics.c',
|
|
|
|
'intel/intel_init.c'
|
|
|
|
]
|
|
|
|
|
Bug 1840537 - Enable value checking in moz.build for CONFIG variables derived from target.*. r=firefox-build-system-reviewers,andi,sergesanspaille
This makes the types from mozbuild.configure.constants repr()-able, and
repr()-ed in config.status, which, when processing moz.build, translates
into value checking for comparison tests involving the variables.
To make them pickable, though, we replace the use of EnumString.subclass
with actual subclassing, which is a little less convenient, but avoids
having to figure out how to make the classes EnumString.subclass creates
pickable.
This caught some mismatches in media/libpng and third_party/libsrtp.
This also means we don't need to normalize the config before dumping it
in config.status, because the only types that this was actually useful
for are these (historically, we'd also turn byte strings into unicode
strings but that hasn't been a thing for 4 years ; the special treatment
of dicts and iterables was there to apply the normalization recursively,
not to normalize dicts and iterables themselves). We still normalization
before passing values to gyp, though.
Differential Revision: https://phabricator.services.mozilla.com/D182141
2023-07-06 21:33:41 +00:00
|
|
|
if CONFIG['CPU_ARCH'] in ('mips32', 'mips64'):
|
2019-04-23 22:04:35 +00:00
|
|
|
DEFINES['MOZ_PNG_USE_MIPS_MSA'] = True
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'mips/filter_msa_intrinsics.c',
|
|
|
|
'mips/mips_init.c'
|
|
|
|
]
|
|
|
|
|
2017-03-18 14:33:00 +00:00
|
|
|
if CONFIG['HAVE_ALTIVEC']:
|
|
|
|
DEFINES['MOZ_PNG_USE_POWERPC'] = True
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
'powerpc/filter_vsx_intrinsics.c',
|
|
|
|
'powerpc/powerpc_init.c'
|
2016-08-11 13:50:00 +00:00
|
|
|
]
|
|
|
|
|
2017-05-22 04:00:33 +00:00
|
|
|
if CONFIG['MOZ_TREE_FREETYPE']:
|
|
|
|
DEFINES['FT_CONFIG_OPTION_USE_PNG'] = True
|
|
|
|
|
2014-09-03 05:10:54 +00:00
|
|
|
Library('mozpng')
|
2013-08-22 06:56:01 +00:00
|
|
|
|
2013-11-19 02:47:14 +00:00
|
|
|
FINAL_LIBRARY = 'gkmedias'
|
2015-12-17 06:57:51 +00:00
|
|
|
|
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2017-10-25 22:12:09 +00:00
|
|
|
AllowCompilerWarnings()
|
2017-06-08 13:29:03 +00:00
|
|
|
|
2017-12-07 21:09:15 +00:00
|
|
|
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
|
2018-06-26 23:07:27 +00:00
|
|
|
CFLAGS += ['-std=gnu89']
|