1 |
commit: bbdae01a651d93acdf3c276511e8bdd58fcd7fdc |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 07:52:15 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 08:03:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbdae01a |
7 |
|
8 |
media-libs/freetype: live ebuild fixes/improvements/adjustments |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
media-libs/freetype/freetype-9999.ebuild | 55 +++++++++++++++++--------------- |
13 |
1 file changed, 29 insertions(+), 26 deletions(-) |
14 |
|
15 |
diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-9999.ebuild |
16 |
index 91ed8bacd80..3cc2445891f 100644 |
17 |
--- a/media-libs/freetype/freetype-9999.ebuild |
18 |
+++ b/media-libs/freetype/freetype-9999.ebuild |
19 |
@@ -81,9 +81,9 @@ src_unpack() { |
20 |
_egit_repo_handler ${EBUILD_PHASE} |
21 |
|
22 |
if [[ "${PV}" == 9999 ]] ; then |
23 |
- # Need to copy stuff from dlg submodule (#758902) |
24 |
- local dlg_inc_dir="${S}/submodules/dlg/include/dlg" |
25 |
- local dlg_src_dir="${S}/submodules/dlg/src/dlg" |
26 |
+ # Need to copy stuff from dlg subproject (#758902) |
27 |
+ local dlg_inc_dir="${S}/subprojects/dlg/include/dlg" |
28 |
+ local dlg_src_dir="${S}/subprojects/dlg/src/dlg" |
29 |
local dlg_dest_dir="${S}/include" |
30 |
mkdir -p "${dlg_dest_dir}/dlg" || die |
31 |
cp "${dlg_inc_dir}"/{dlg,output}.h "${dlg_dest_dir}/dlg" || die |
32 |
@@ -93,14 +93,22 @@ src_unpack() { |
33 |
|
34 |
src_prepare() { |
35 |
if [[ "${PV}" == 9999 ]] ; then |
36 |
+ # Do NOT automagically mess with submodules!!! |
37 |
+ sed '/setup: copy_submodule/d' -i builds/toplevel.mk || die |
38 |
# inspired by shipped autogen.sh script |
39 |
- eval $(sed -nf version.sed include/freetype/freetype.h) |
40 |
+ eval $(sed -n \ |
41 |
+ -e 's/^#define *\(FREETYPE_MAJOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
42 |
+ -e 's/^#define *\(FREETYPE_MINOR\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
43 |
+ -e 's/^#define *\(FREETYPE_PATCH\) *\([0-9][0-9]*\).*/\1=\2/p' \ |
44 |
+ include/freetype/freetype.h || die) |
45 |
+ FREETYPE="${FREETYPE_MAJOR}.${FREETYPE_MINOR}" |
46 |
+ [[ "${FREETYPE_PATCH}" != 0 ]] && FREETYPE+=".${FREETYPE_PATCH}" |
47 |
pushd builds/unix &>/dev/null || die |
48 |
- sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \ |
49 |
+ sed -e "s;@VERSION@;${FREETYPE};" \ |
50 |
< configure.raw > configure.ac || die |
51 |
# eautoheader produces broken ftconfig.in |
52 |
AT_NOEAUTOHEADER="yes" AT_M4DIR="." eautoreconf |
53 |
- unset freetype_major freetype_minor freetype_patch |
54 |
+ unset FREETYPE_MAJOR FREETYPE_MINOR FREETYPE_PATCH FREETYPE |
55 |
popd &>/dev/null || die |
56 |
fi |
57 |
|
58 |
@@ -124,11 +132,11 @@ src_prepare() { |
59 |
# Will be the new default for >=freetype-2.7.0 |
60 |
disable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
61 |
|
62 |
- if use infinality && use cleartype-hinting; then |
63 |
+ if use infinality && use cleartype-hinting ; then |
64 |
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" |
65 |
- elif use infinality; then |
66 |
+ elif use infinality ; then |
67 |
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" |
68 |
- elif use cleartype-hinting; then |
69 |
+ elif use cleartype-hinting ; then |
70 |
enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" |
71 |
fi |
72 |
|
73 |
@@ -139,19 +147,19 @@ src_prepare() { |
74 |
# See https://freetype.org/patents.html (expired!) |
75 |
enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING |
76 |
|
77 |
- if ! use adobe-cff; then |
78 |
+ if ! use adobe-cff ; then |
79 |
enable_option CFF_CONFIG_OPTION_OLD_ENGINE |
80 |
fi |
81 |
|
82 |
- if use debug; then |
83 |
+ if use debug ; then |
84 |
enable_option FT_DEBUG_LEVEL_TRACE |
85 |
enable_option FT_DEBUG_MEMORY |
86 |
fi |
87 |
|
88 |
- if use utils; then |
89 |
+ if use utils ; then |
90 |
cd "${WORKDIR}/ft2demos-${PV}" || die |
91 |
# Disable tests needing X11 when USE="-X". (bug #177597) |
92 |
- if ! use X; then |
93 |
+ if ! use X ; then |
94 |
sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die |
95 |
fi |
96 |
cd "${S}" || die |
97 |
@@ -198,7 +206,7 @@ multilib_src_configure() { |
98 |
multilib_src_compile() { |
99 |
default |
100 |
|
101 |
- if multilib_is_native_abi && use utils; then |
102 |
+ if multilib_is_native_abi && use utils ; then |
103 |
einfo "Building utils" |
104 |
# fix for Prefix, bug #339334 |
105 |
emake \ |
106 |
@@ -210,25 +218,20 @@ multilib_src_compile() { |
107 |
multilib_src_install() { |
108 |
default |
109 |
|
110 |
- if multilib_is_native_abi && use utils; then |
111 |
+ if multilib_is_native_abi && use utils ; then |
112 |
einfo "Installing utils" |
113 |
- rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die |
114 |
- dodir /usr/bin #654780 |
115 |
- local ft2demo |
116 |
- for ft2demo in ../ft2demos-${PV}/bin/*; do |
117 |
- ./libtool --mode=install $(type -P install) -m 755 "${ft2demo}" \ |
118 |
- "${ED}"/usr/bin || die |
119 |
- done |
120 |
+ emake DESTDIR="${D}" FT2DEMOS=1 \ |
121 |
+ TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" install |
122 |
fi |
123 |
} |
124 |
|
125 |
multilib_src_install_all() { |
126 |
- if use fontforge; then |
127 |
+ if use fontforge ; then |
128 |
# Probably fontforge needs less but this way makes things simplier... |
129 |
einfo "Installing internal headers required for fontforge" |
130 |
local header |
131 |
find src/truetype include/freetype/internal -name '*.h' | \ |
132 |
- while read header; do |
133 |
+ while read header ; do |
134 |
mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die |
135 |
cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die |
136 |
done |
137 |
@@ -240,8 +243,8 @@ multilib_src_install_all() { |
138 |
dodoc -r docs/* |
139 |
fi |
140 |
|
141 |
- find "${ED}" -name '*.la' -delete || die |
142 |
+ find "${ED}" -type f -name '*.la' -delete || die |
143 |
if ! use static-libs ; then |
144 |
- find "${ED}" -name '*.a' -delete || die |
145 |
+ find "${ED}" -type f -name '*.a' -delete || die |
146 |
fi |
147 |
} |