SUMMARY="The Noto serif font for CJK languages"
DESCRIPTION="The Noto serif fonts have superseded the Droid fonts, which were \
originally designed for the use in Google's Android. Noto's aim is to be a \
free for everyone, with beautiful glyphs for all languages, looking good \
especially when multiple styles and weights and even languages are mixed on \
a page.

This package supports Japanese, Korean and simple/traditional Chinese.
Included are various weights and two 'monospaced' typefaces ('regular' and \
'bold')."
HOMEPAGE="https://www.google.com/get/noto/"
COPYRIGHT="2017 Google Inc."
LICENSE="SIL Open Font License v1.1"
REVISION="2"
baseURL="https://raw.githubusercontent.com/googlei18n/noto-cjk"
srcGitRev="be6c059ac1587e556e2412b27f5155c8eb3ddbe6"
# Japanese
SOURCE_URI="$baseURL/$srcGitRev/NotoSerifCJKjp-Black.otf#noarchive"
CHECKSUM_SHA256="0db4bdcfe6e0a7cf0fd4fa532d1dd7c33cb2de90197f5c1fcaa33d5ffa1bd1f7"
SOURCE_DIR=""
SOURCE_URI_2="$baseURL/$srcGitRev/NotoSerifCJKjp-Bold.otf#noarchive"
CHECKSUM_SHA256_2="58934baab3edc7196d7e2b79a07c8e0377699fa61708b87be8711315dbc2ccf3"
SOURCE_URI_3="$baseURL/$srcGitRev/NotoSerifCJKjp-ExtraLight.otf#noarchive"
CHECKSUM_SHA256_3="c1e56e2ad421217782e6cb18ef88533efb0d99523249b6ebd987c3f958bd8e92"
SOURCE_URI_4="$baseURL/$srcGitRev/NotoSerifCJKjp-Light.otf#noarchive"
CHECKSUM_SHA256_4="485ec27ad7c2ae6eb44af1a6b5f0a603577a886b04f8cc4c0e5db219e2978715"
SOURCE_URI_5="$baseURL/$srcGitRev/NotoSerifCJKjp-Medium.otf#noarchive"
CHECKSUM_SHA256_5="481cec1d1c2b12c8c2504134393e480b6c0a34af0120c130603c55dc0ba938f0"
SOURCE_URI_6="$baseURL/$srcGitRev/NotoSerifCJKjp-Regular.otf#noarchive"
CHECKSUM_SHA256_6="79c0247b9bd2bcb68d011b0b32d00f575743cb69b308c57625371c1b457cdf88"
SOURCE_URI_7="$baseURL/$srcGitRev/NotoSerifCJKjp-SemiBold.otf#noarchive"
CHECKSUM_SHA256_7="5a60025b47c0583ba4f0977c8c8da66a586b547365af6ef9776b720a027821da"
# Korean
SOURCE_URI_8="$baseURL/$srcGitRev/NotoSerifCJKkr-Black.otf#noarchive"
CHECKSUM_SHA256_8="f88873f4dc9b5b5a6322a80907631a89d3b27cbd8b629e9dd6fc4dcc704e91f8"
SOURCE_URI_9="$baseURL/$srcGitRev/NotoSerifCJKkr-Bold.otf#noarchive"
CHECKSUM_SHA256_9="814199fd4c0485718ba875127761e23b6354ea06eef64933653c17d183f89106"
SOURCE_URI_10="$baseURL/$srcGitRev/NotoSerifCJKkr-ExtraLight.otf#noarchive"
CHECKSUM_SHA256_10="9f289c30695cb954908196413945768398ea9b2695dd1dd0d444e4a59fa63bed"
SOURCE_URI_11="$baseURL/$srcGitRev/NotoSerifCJKkr-Light.otf#noarchive"
CHECKSUM_SHA256_11="145efe5cade8c89c414eb8132bee6630368bcedf651e638f1230d782e3bf78a9"
SOURCE_URI_12="$baseURL/$srcGitRev/NotoSerifCJKkr-Medium.otf#noarchive"
CHECKSUM_SHA256_12="1a74f3677937eb4849c4cff1cb350aaedda36cbf2f5567fea48ce3632910ff2d"
SOURCE_URI_13="$baseURL/$srcGitRev/NotoSerifCJKkr-Regular.otf#noarchive"
CHECKSUM_SHA256_13="ee9243aeddaf064265b106fe0e0da221ab76638daf73fe83ce7419d001739c3e"
SOURCE_URI_14="$baseURL/$srcGitRev/NotoSerifCJKkr-SemiBold.otf#noarchive"
CHECKSUM_SHA256_14="16111ec2c4b49dc4a8f1a944952e64be8cc9589b05fe123275961c70ca6fa466"
# Simple Chinese
SOURCE_URI_15="$baseURL/$srcGitRev/NotoSerifCJKsc-Black.otf#noarchive"
CHECKSUM_SHA256_15="94ef86d2807b81a0db8f596ff0e50130b9744da61b71000e77087aaf38418c02"
SOURCE_URI_16="$baseURL/$srcGitRev/NotoSerifCJKsc-Bold.otf#noarchive"
CHECKSUM_SHA256_16="2dcb7dd34444afc79fce6c2f67afe018b6bbe87af98bf0918d7316c58416157b"
SOURCE_URI_17="$baseURL/$srcGitRev/NotoSerifCJKsc-ExtraLight.otf#noarchive"
CHECKSUM_SHA256_17="2cc0582da264c9038c75a766a78bf645567c8c552f36b98901b3c43b11bd8fa5"
SOURCE_URI_18="$baseURL/$srcGitRev/NotoSerifCJKsc-Light.otf#noarchive"
CHECKSUM_SHA256_18="e5880b655a78ab15ef0ebd807b6d0f049d5668674c11f49ca3473aedb3e0cadc"
SOURCE_URI_19="$baseURL/$srcGitRev/NotoSerifCJKsc-Medium.otf#noarchive"
CHECKSUM_SHA256_19="3405a99c1fc545672b919d55acc61ff749dd54e577a893b43a4dc99d11b4c6cf"
SOURCE_URI_20="$baseURL/$srcGitRev/NotoSerifCJKsc-Regular.otf#noarchive"
CHECKSUM_SHA256_20="efa5e49879a789c1ecad8f07e1813c7f9aa6c4b951fdbb5791d85d67345632d7"
SOURCE_URI_21="$baseURL/$srcGitRev/NotoSerifCJKsc-SemiBold.otf#noarchive"
CHECKSUM_SHA256_21="e3e030ed7420c96c465a6afccfecfa83739797d7854f8e3c89f6ac4d73af0338"
# Traditional Chinese
SOURCE_URI_22="$baseURL/$srcGitRev/NotoSerifCJKtc-Black.otf#noarchive"
CHECKSUM_SHA256_22="6d2a669ae86781b3b0e166f47d13771d501c77529f1f6243e9db5cd95936078d"
SOURCE_URI_23="$baseURL/$srcGitRev/NotoSerifCJKtc-Bold.otf#noarchive"
CHECKSUM_SHA256_23="d6bc09d324004b38207898f86deb298cc4eb0527bc40916f25ba9d3ba07226f9"
SOURCE_URI_24="$baseURL/$srcGitRev/NotoSerifCJKtc-ExtraLight.otf#noarchive"
CHECKSUM_SHA256_24="4fce4e673651164c88ddb9c6954df943b4ce9965fdac38d84ac945aa8f74a363"
SOURCE_URI_25="$baseURL/$srcGitRev/NotoSerifCJKtc-Light.otf#noarchive"
CHECKSUM_SHA256_25="8ef5a29508a19f36abfdd0dd489f2185c1b7025dd511de496115df9397a4d514"
SOURCE_URI_26="$baseURL/$srcGitRev/NotoSerifCJKtc-Medium.otf#noarchive"
CHECKSUM_SHA256_26="774ffd487e9012b39a869ad4267b6a732c426ee1df4000418bb0ec57ff86d986"
SOURCE_URI_27="$baseURL/$srcGitRev/NotoSerifCJKtc-Regular.otf#noarchive"
CHECKSUM_SHA256_27="c93523479cdebe549052a36beafeeb004801796d72c958d5f8e3e61546220d1a"
SOURCE_URI_28="$baseURL/$srcGitRev/NotoSerifCJKtc-SemiBold.otf#noarchive"
CHECKSUM_SHA256_28="f401ae658b085d2ff6626a34a6fcfe649233527a8d3f255a34bac25253a9ffd2"

ARCHITECTURES="any"
DISABLE_SOURCE_PACKAGE="yes"

# noto_serif_cjk-$portVersion-any.hpkg is intentionally empty and can be removed.
PROVIDES="
	noto_serif_cjk=$portVersion	# empty. ToDo: prevent creating empty hpkg
	"
REQUIRES=""

SUMMARY_jp="The Noto serif font for CJK languages (default Japanese)"
PROVIDES_jp="
	noto_serif_cjk_jp=$portVersion	# Japanese default
	"
REQUIRES_jp=""

SUMMARY_kr="The Noto serif font for CJK languages (default Korean)"
PROVIDES_kr="
	noto_serif_cjk_kr=$portVersion	# Korean default
	"
REQUIRES_kr=""

SUMMARY_sc="The Noto serif font for CJK languages (default Simple Chinese)"
PROVIDES_sc="
	noto_serif_cjk_sc=$portVersion	# Simple Chinese default
	"
REQUIRES_sc=""

SUMMARY_tc="The Noto serif font for CJK languages (default Traditional Chinese)"
PROVIDES_tc="
	noto_serif_cjk_tc=$portVersion	# Traditional Chinese default
	"
REQUIRES_tc=""

BUILD_REQUIRES=""
BUILD_PREREQUIRES=""

BUILD()
{
	true
}

INSTALL()
{
	FONTDIR=$fontsDir/otfonts
	mkdir -p ${FONTDIR}

	cp ../sources*/*.otf ${FONTDIR}

	packageEntries jp \
		${FONTDIR}/*CJKjp*.otf

	packageEntries kr \
		${FONTDIR}/*CJKkr*.otf

	packageEntries sc \
		${FONTDIR}/*CJKsc*.otf

	packageEntries tc \
		${FONTDIR}/*CJKtc*.otf
}
