From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C497C13835C for ; Wed, 31 Mar 2021 08:03:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D7E29E0843; Wed, 31 Mar 2021 08:03:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AB87BE0843 for ; Wed, 31 Mar 2021 08:03:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8A005335D4B for ; Wed, 31 Mar 2021 08:03:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CFB0D47 for ; Wed, 31 Mar 2021 08:03:20 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1617177789.bbdae01a651d93acdf3c276511e8bdd58fcd7fdc.polynomial-c@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/freetype/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/freetype/freetype-9999.ebuild X-VCS-Directories: media-libs/freetype/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: bbdae01a651d93acdf3c276511e8bdd58fcd7fdc X-VCS-Branch: master Date: Wed, 31 Mar 2021 08:03:20 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d0d46d6a-53d4-47d4-bdca-3368fb795159 X-Archives-Hash: 01094f041173688309e0270595175edd commit: bbdae01a651d93acdf3c276511e8bdd58fcd7fdc Author: Lars Wendler gentoo org> AuthorDate: Wed Mar 31 07:52:15 2021 +0000 Commit: Lars Wendler gentoo org> CommitDate: Wed Mar 31 08:03:09 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbdae01a media-libs/freetype: live ebuild fixes/improvements/adjustments Signed-off-by: Lars Wendler gentoo.org> media-libs/freetype/freetype-9999.ebuild | 55 +++++++++++++++++--------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-9999.ebuild index 91ed8bacd80..3cc2445891f 100644 --- a/media-libs/freetype/freetype-9999.ebuild +++ b/media-libs/freetype/freetype-9999.ebuild @@ -81,9 +81,9 @@ src_unpack() { _egit_repo_handler ${EBUILD_PHASE} if [[ "${PV}" == 9999 ]] ; then - # Need to copy stuff from dlg submodule (#758902) - local dlg_inc_dir="${S}/submodules/dlg/include/dlg" - local dlg_src_dir="${S}/submodules/dlg/src/dlg" + # Need to copy stuff from dlg subproject (#758902) + local dlg_inc_dir="${S}/subprojects/dlg/include/dlg" + local dlg_src_dir="${S}/subprojects/dlg/src/dlg" local dlg_dest_dir="${S}/include" mkdir -p "${dlg_dest_dir}/dlg" || die cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die @@ -93,14 +93,22 @@ src_unpack() { src_prepare() { if [[ "${PV}" == 9999 ]] ; then + # Do NOT automagically mess with submodules!!! + sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die # inspired by shipped autogen.sh script - eval $(sed -nf version.sed include/freetype/freetype.h) + eval $(sed -n \ + -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ + -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ + -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \ + include/freetype/freetype.h || die) + FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}" + [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}" pushd builds/unix &>/dev/null || die - sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \ + sed -e "s;@VERSION@;${FREETYPE};" \ < configure.raw > configure.ac || die # eautoheader produces broken ftconfig.in AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf - unset freetype_major freetype_minor freetype_patch + unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE popd &>/dev/null || die fi @@ -124,11 +132,11 @@ src_prepare() { # Will be the new default for >=freetype-2.7.0 disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" - if use infinality && use cleartype-hinting; then + if use infinality && use cleartype-hinting ; then enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" - elif use infinality; then + elif use infinality ; then enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" - elif use cleartype-hinting; then + elif use cleartype-hinting ; then enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" fi @@ -139,19 +147,19 @@ src_prepare() { # See https://freetype.org/patents.html (expired!) enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING - if ! use adobe-cff; then + if ! use adobe-cff ; then enable_option CFF_CONFIG_OPTION_OLD_ENGINE fi - if use debug; then + if use debug ; then enable_option FT_DEBUG_LEVEL_TRACE enable_option FT_DEBUG_MEMORY fi - if use utils; then + if use utils ; then cd "${WORKDIR}/ft2demos-${PV}" || die # Disable tests needing X11 when USE="-X". (bug #177597) - if ! use X; then + if ! use X ; then sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die fi cd "${S}" || die @@ -198,7 +206,7 @@ multilib_src_configure() { multilib_src_compile() { default - if multilib_is_native_abi && use utils; then + if multilib_is_native_abi && use utils ; then einfo "Building utils" # fix for Prefix, bug #339334 emake \ @@ -210,25 +218,20 @@ multilib_src_compile() { multilib_src_install() { default - if multilib_is_native_abi && use utils; then + if multilib_is_native_abi && use utils ; then einfo "Installing utils" - rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die - dodir /usr/bin #654780 - local ft2demo - for ft2demo in ../ft2demos-${PV}/bin/*; do - ./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \ - "${ED}"/usr/bin || die - done + emake DESTDIR="${D}" FT2DEMOS=1 \ + TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install fi } multilib_src_install_all() { - if use fontforge; then + if use fontforge ; then # Probably fontforge needs less but this way makes things simplier... einfo "Installing internal headers required for fontforge" local header find src/truetype include/freetype/internal -name '*.h' | \ - while read header; do + while read header ; do mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die done @@ -240,8 +243,8 @@ multilib_src_install_all() { dodoc -r docs/* fi - find "${ED}" -name '*.la' -delete || die + find "${ED}" -type f -name '*.la' -delete || die if ! use static-libs ; then - find "${ED}" -name '*.a' -delete || die + find "${ED}" -type f -name '*.a' -delete || die fi }