diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/freetype |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/freetype')
-rw-r--r-- | media-libs/freetype/Manifest | 20 | ||||
-rw-r--r-- | media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch | 31 | ||||
-rw-r--r-- | media-libs/freetype/files/freetype-2.7-enable-valid.patch | 20 | ||||
-rw-r--r-- | media-libs/freetype/files/freetype-2.7.1-glyph_name.patch | 31 | ||||
-rw-r--r-- | media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch | 711 | ||||
-rw-r--r-- | media-libs/freetype/freetype-2.7.1-r2.ebuild | 179 | ||||
-rw-r--r-- | media-libs/freetype/freetype-2.8.1.ebuild | 181 | ||||
-rw-r--r-- | media-libs/freetype/freetype-2.8.ebuild | 181 | ||||
-rw-r--r-- | media-libs/freetype/freetype-9999.ebuild | 227 | ||||
-rw-r--r-- | media-libs/freetype/metadata.xml | 37 |
10 files changed, 1618 insertions, 0 deletions
diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest new file mode 100644 index 000000000000..f092ddefcf97 --- /dev/null +++ b/media-libs/freetype/Manifest @@ -0,0 +1,20 @@ +AUX freetype-2.4.11-sizeof-types.patch 1041 SHA256 b5ed7a7a8c10f3dcfd62a14998e640aeef185b45e291e5e1ce26b77b0509f77e SHA512 0774b7b769d332cbd0e674fad545d1c2b816947188725a7528d749c6311b84bbdc7f8c1a1f2cc947c405f16e8a92e394d77094aad98a6468f154fdedacec0ecc WHIRLPOOL 28db0f881d43c83cc1628f095c24a0c27e9bea322a5973de7640a35559ceed640433da8307d1692c808638b0bce34ebe3cacc46a42f8c6c66bbb6aa675dd06ee +AUX freetype-2.7-enable-valid.patch 533 SHA256 f8108ad208937973d2c5dd84f889edfae497ceda1c19b8e7c3ca11bd6e9d6c21 SHA512 bb8caa36cbd941a24347c761e0110f21aad3f783aab7507de831cdde1d2e83032cbca58ccedac94ce2f5233921a63436fc799f0dd615f21009f7f309d15c6863 WHIRLPOOL d16421d9ee93fb0de11c6974296f94d42237cd93aaf7e8a7ca588b7096f32d1ea028d5fcc0c81433c91f393d8b87937951c6d58254c0b2e8950a0c9e7ea030ca +AUX freetype-2.7.1-glyph_name.patch 749 SHA256 84f1a637c210c2738d6a4ad3997978ea30b7d81c25a050335df822b5f04a2ce9 SHA512 8593993242f02a1941933a54b00952222728b7e810e5e580eef255cea432e50ea45145b095925d788e39dd12910c3e4cf4e71c0ce936961131ab7616dae6b58f WHIRLPOOL 9bf1401f36d20ab91d9715510312c77870d946621f472d4cbe9a95a25bc7f00878f3a7b64c95d6a4b52e0e18bb4a3878845d0cead73fcff753a7d0f95a7736f6 +AUX freetype-2.7.1-pcf_fix.patch 26691 SHA256 109d28107d45c64b94e2e9af7ed2702ee9e6bdc09df6f5ada1737d6b593e1ae3 SHA512 517535998ffc5d6864dda036a9311a3cef7bf61f0b7ed12fc89326a460496dae5c7efad308631fbd92e0c3f2e0b3a65853c6819abd6a303907135ece62310fbe WHIRLPOOL 13771e78075577135747ee2440073c572a498d0bf3cba23e3f30e734e2bd56e2e18bbb88c2150342c048861d5914072458479419817ab0728546e3dbb49f8eea +DIST freetype-2.7.1.tar.bz2 1825107 SHA256 3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88 SHA512 df39e2ef55f9090a66fecb6b5e9a5d296a043ddfd919d0ce3d7ea5132aa388bfbbeeaa6d6df6513956134b987e1c3a5eac6975c0c9631213af77457a623b49da WHIRLPOOL f1d506dae87b718131299e24c959ad0636bca9739fdd3dce1ad1e8009e7e16a11faede66d234f7071f3de86c83b275f09323804be77a2a4b3a785adba4b74ed6 +DIST freetype-2.8.1.tar.bz2 1886443 SHA256 e5435f02e02d2b87bb8e4efdcaa14b1f78c9cf3ab1ed80f94b6382fb6acc7d78 SHA512 ca59e47f0fceeeb9b8032be2671072604d0c79094675df24187829c05e99757d0a48a0f8062d4d688e056f783aa8f6090d732ad116562e94784fccf1339eb823 WHIRLPOOL 4827e36cccf23323be8e5e55edd6692503747e90ff3764a497571c06338c711c0d2071ab06766ccb803152e4b00df4cefbee2768ad3660fbf6430f3622620893 +DIST freetype-2.8.tar.bz2 1873526 SHA256 a3c603ed84c3c2495f9c9331fe6bba3bb0ee65e06ec331e0a0fb52158291b40b SHA512 3842c34bf6100a8c9b78258146b2ff35e9bb4c993937d3ef09982c1e2552dfd15f8849ddd8a1e84edf08b5a5fb918b68cf7b1584545c5900e22a00bfa1c89ff5 WHIRLPOOL 2fb845ede217b228c39e1e767ea5b21868bd3b02521ca48fe614d78f790c9dab5145cc6feb147725e8e44cd3aa716a14742ef4893b2f54e5b167efe9f4905386 +DIST freetype-doc-2.7.1.tar.bz2 2127460 SHA256 8e09cf22d1c98006fe3af160b7c3b7c847e4a3743963d6d89314d350b859dfb0 SHA512 acccc0cdacf277abb967aee3a09850f10aafe7719d01fc179fc660e8f3d596203d9a0ae74785e5c7e7ad744032d2209a547607edc43c8fde9d136de00cd59ff6 WHIRLPOOL f5d079472e22ba7ae1aa9c74f13279960f9c773be97def5039d5ac5473e1f1e691e4d94cf0e9183708e066faf2537b72777940996b61854e815ebe3d32ca71fd +DIST freetype-doc-2.8.1.tar.bz2 2128376 SHA256 e6251ab44adcb075c7ca4205163c43b6539cbe5265b8a24ec0afa07f8b9213f3 SHA512 386f3e2f123e60e697eb446d667bdcdf184d354a7a9a7bcc42767ea7964cd5a89e5ef42a234838c03e7ce926d3e92d763acb84983afdaf9f6977c028d55f2806 WHIRLPOOL 3197ea90412e32b5086b1f1d1ba80a069e73e021a1289423509ea36e0b13431be28af12666c619b498f5e50e07854e97cdf15383433a7ea0a1211470bca7dd1c +DIST freetype-doc-2.8.tar.bz2 2127740 SHA256 427ba04d11f450df4bac4c95fec247be1b835ccdcf85d8b081f3f39d31811154 SHA512 3a970a7dd6f0ba580c9f8084b271c11e6e87111ab9a5b6a3148eb1087e45ee18e998aa7e36a4311067a3b674cb784b1e827cf8c3a853e380078219be3eccce06 WHIRLPOOL 21863e784f993e301dceffb5b5cd20c94abaeec3e936cdcb0c54fe4e65a7cdb4768d890d7b97891f75ec3f3db7d47d2db52eda68cf6f776028cffac7b2e30696 +DIST ft2demos-2.7.1.tar.bz2 222288 SHA256 d3f8a0d5a3f0d58701133458a8c1d3f97f658869f3c904b1fda447ed3b290ecd SHA512 d3c5d81f302629c50b82696db0a83f17e3940fe38ecfddf5c56f63ff3f136f248b0458fe75337823cc080852f48a7326f4e5599240042ba1cb8984e05edd9823 WHIRLPOOL b1f8a1171fafa3147a3cd4c6dcc3237fe5b03240923e99acbd0f38da4129be443eb81178bb4df907bdcf3acf37248e59e012291b6a2ba66dc1d8a9e77a038f96 +DIST ft2demos-2.8.1.tar.bz2 228934 SHA256 7e385c34fc91978e4db976cbb9e1cdc4d1ce611046f2a21ceb0737e9a60cefd9 SHA512 f3a3216448df7b9bebb875a69587f31d0548f4b7e1b1bd70b0f06b3c4a43b3f5ca99ac2fcfecb32909b16b32a466fff24d1a6407e5fd6c2145fd64d2a156429a WHIRLPOOL adc29f9e0dce4e897f450b06800dd6a36ba1a64a53972bb15d5bb10e4551334b0267006b257cbde909462c8c00444e8a8e7335e95092add1c90f786fd1b1baf7 +DIST ft2demos-2.8.tar.bz2 225274 SHA256 2b6ce0d36bcb43fcc8aac07a0287982d855571ee271c3803c768e501f9c1a233 SHA512 dffdf6a493e8145c6513be34b57734a9a99c61f758a0e1ea691ef4284cee4c274ad7c3a8120a8ec425d86e33a70cd879d9db258e9c67b6a4db79c3243d4c9fb3 WHIRLPOOL 90f7d197912e968fe0443f67ae208ed4705b217e8d952c5063f476a30c3b585c6e6b55d01b174545b6972236e8f774d5674e2cad5d89c6e88b1c492be43512a4 +EBUILD freetype-2.7.1-r2.ebuild 5314 SHA256 3f5e135b3c781b95d477bdaf0b27f1fd69390aa9bc61279ab08bca02098862a5 SHA512 b7da721732b8c16b2d09077b077fa472e649cb65947f1a0cddac3efafaa4a1a0f46867a1788bec329a1bcde28369b64c4bcd451391ce3f9b5e828420fe9e663c WHIRLPOOL 52fdf48866b115a2d6fe9725c37fc222f4f66e49fc878b59de44169c3d9529051cde049a2003e0563508a75038b2057e9028b2161d13e493d66185258889c0cf +EBUILD freetype-2.8.1.ebuild 5398 SHA256 c4287cad2011028b35ba6f4a9854f66ba2c6ad545cfee5790a898260a75339e1 SHA512 b16b15ab519acd02fe9b462ce29987cecb0d3fca081870070c122487c8eeaacb407d13eb345f023718489a04f86c88e7b9b419e6ee2ebcf019bbf21ab77427d7 WHIRLPOOL 9525463c6bbd3e6d2b9344f5943d1c9bb7352d1973e2574e2b8cb39b7688c4135a55864a7e03434922bd48481200fa11a965f62c87fd31f3fe85a78fdc1f3b27 +EBUILD freetype-2.8.ebuild 5388 SHA256 bce6ea80e5992453eecdc1bbbb7b8e664722def3019c93d64e4d97192b2a2cce SHA512 0196c0c055f3a2fd70355569fe2933bbcbcdc4d14656ae5b3a13a487e8048d5ef9ab1365068b2ebc3082c7af92fb3e2f1300f934a320a4c8b03b6156917f777c WHIRLPOOL 58968c0dbd6a679e9f65403582f764250d1dbf6c289be642849ebe1b549140b018ed0a450ca9420da7cd7a717627075206a4a45c0be240e532ad74641e5db185 +EBUILD freetype-9999.ebuild 6525 SHA256 0b2aafe0240728d077d670980e3df06876c54e66ecce51476951509891784f29 SHA512 cd7d5c6780544a3b060eef38f93724001ac4a3aa56ceac5bacd3f2f92f8ebcf0374a33e0f3d0759b63ea061110ac2d2cbdf714f83e9f1948b2413ceb3370a238 WHIRLPOOL d53cececf68532110c28ba848a78c27ecf0154be85c112a0e5af3a77ae421042912af18154f960e1a9f2ea5c640883b81aff38dcb6e596022f08d5cb0629c5ae +MISC ChangeLog 7593 SHA256 fe0e7777109615402938c43308b0b712a96c16a25b84146fb1ebc1b2b8b6336f SHA512 10de5467c98f544b54bf905105c9da49c9c856c905469185b70d3e1ecb721acd942600e1f9074c536ec8d0d67ff493cd302e060e33c4dc14370eefc0dd706610 WHIRLPOOL 57ea802e451385e70fb9584febd192eca08625aee593831d093c9b71920ac0a58ac19dc8ebf5495b6706a207f04f9ac8c2cc00f39a3190572069787d4541bdb7 +MISC ChangeLog-2015 64726 SHA256 3626423a2d3c902fdb137535afc79ce8919fcb7f6c200c6573f3eab5475e41f5 SHA512 02e93d03cea619afcb81b1e37f4e468a53a77b71a70e5defc8335629889b6ca82f80f4456aca92c18bdd2768960415f1310a96e2f9f1b970c69b22487e1085f7 WHIRLPOOL d8fd2317b0d3a3ce90b8ff9534c8faa5050b7764b6a0093936282b51b1fa9cfc632b97326e8745352a8bccdb710369fbf6fec06ad65448768e8aa8b670b2fefb +MISC metadata.xml 1595 SHA256 625d35318ace14e899cc1d0b456e86ccca6ba328c5f1910b233d5ab464805332 SHA512 245c4d591054ce711d74be3d2d7390f08ccc4275a05c034350b2aef5fc8718bbe96967b67c8abe71b34d794fe9e1ceac36a0313d4b270c81ebafd4baf2c6e3d0 WHIRLPOOL 15ac333acf200bb560e5fc43cc271a4ef065452a96ade8d82a98735c7966572e471b588813c108e4c5d6e694fd5860e8e02c29a26d4794019092702b47f79808 diff --git a/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch b/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch new file mode 100644 index 000000000000..5be0530ee007 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.4.11-sizeof-types.patch @@ -0,0 +1,31 @@ +From 8af7b9e403240c2c3ace1005f5a91fa2f1625ac9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Mon, 11 Mar 2013 22:13:34 +0100 +Subject: [PATCH] Prevent apps from using the autoconf sizeof branch. + +Use #error to make sure that any app trying to enable that branch fails +miserably. This guarantees the code to be multilib-friendly and also +removes the header differences triggering QA errors. +--- + builds/unix/ftconfig.in | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in +index 9531afd..457cbfc 100644 +--- a/builds/unix/ftconfig.in ++++ b/builds/unix/ftconfig.in +@@ -78,10 +78,7 @@ FT_BEGIN_HEADER + #undef FT_USE_AUTOCONF_SIZEOF_TYPES + #ifdef FT_USE_AUTOCONF_SIZEOF_TYPES + +-#undef SIZEOF_INT +-#undef SIZEOF_LONG +-#define FT_SIZEOF_INT SIZEOF_INT +-#define FT_SIZEOF_LONG SIZEOF_LONG ++#error "Unsupported code branch enabled. Please report a bug to bugs.gentoo.org." + + #else /* !FT_USE_AUTOCONF_SIZEOF_TYPES */ + +-- +1.8.1.5 + diff --git a/media-libs/freetype/files/freetype-2.7-enable-valid.patch b/media-libs/freetype/files/freetype-2.7-enable-valid.patch new file mode 100644 index 000000000000..76600aeb162b --- /dev/null +++ b/media-libs/freetype/files/freetype-2.7-enable-valid.patch @@ -0,0 +1,20 @@ +--- freetype-2.7/modules.cfg ++++ freetype-2.7/modules.cfg +@@ -120,7 +120,7 @@ + # TrueType GX/AAT table validation. Needs ftgxval.c below. + # + # No FT_CONFIG_OPTION_PIC support. +-# AUX_MODULES += gxvalid ++AUX_MODULES += gxvalid + + # Support for streams compressed with gzip (files with suffix .gz). + # +@@ -143,7 +143,7 @@ + # OpenType table validation. Needs ftotval.c below. + # + # No FT_CONFIG_OPTION_PIC support. +-# AUX_MODULES += otvalid ++AUX_MODULES += otvalid + + # Auxiliary PostScript driver component to share common code. + # diff --git a/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch b/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch new file mode 100644 index 000000000000..99c27a7a02fb --- /dev/null +++ b/media-libs/freetype/files/freetype-2.7.1-glyph_name.patch @@ -0,0 +1,31 @@ +From a660e3de422731b94d4a134d27555430cbb6fb39 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Fri, 26 Aug 2016 00:23:27 +0200 +Subject: [PATCH] [type1] Fix heap buffer overflow. + +Reported as + + https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36 + +* src/type1/t1load.c (parse_charstrings): Reject fonts that don't +contain glyph names. +--- +diff --git a/src/type1/t1load.c b/src/type1/t1load.c +index c981adcf..f8bf3132 100644 +--- a/src/type1/t1load.c ++++ b/src/type1/t1load.c +@@ -1776,6 +1776,12 @@ + } + } + ++ if ( !n ) ++ { ++ error = FT_THROW( Invalid_File_Format ); ++ goto Fail; ++ } ++ + loader->num_glyphs = n; + + /* if /.notdef is found but does not occupy index 0, do our magic. */ +-- +2.12.0 diff --git a/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch b/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch new file mode 100644 index 000000000000..5b8912181323 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.7.1-pcf_fix.patch @@ -0,0 +1,711 @@ +From f837a50ec3a4f240d73f018f237f9f58631e2ba5 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Mon, 9 Jan 2017 10:49:03 +0100 +Subject: [pcf] Introduce a driver structure. + +To be filled later on with something useful. + +* src/pcf/pcf.h (PCF_Driver): New structure. + +* src/pcf/pcfdrivr.c (pcf_driver_init, pcf_driver_done): New dummy +functions. +(pcf_driver_class): Updated. +--- + src/pcf/pcf.h | 7 +++++++ + src/pcf/pcfdrivr.c | 24 ++++++++++++++++++++---- + 3 files changed, 39 insertions(+), 4 deletions(-) + +diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h +index c726e5e..830cabe 100644 +--- a/src/pcf/pcf.h ++++ b/src/pcf/pcf.h +@@ -163,6 +163,13 @@ FT_BEGIN_HEADER + } PCF_FaceRec, *PCF_Face; + + ++ typedef struct PCF_DriverRec_ ++ { ++ FT_DriverRec root; ++ ++ } PCF_DriverRec, *PCF_Driver; ++ ++ + /* macros for pcf font format */ + + #define LSBFirst 0 +diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c +index 10d5c20..8f4a90d 100644 +--- a/src/pcf/pcfdrivr.c ++++ b/src/pcf/pcfdrivr.c +@@ -691,22 +691,38 @@ THE SOFTWARE. + } + + ++ FT_CALLBACK_DEF( FT_Error ) ++ pcf_driver_init( FT_Module module ) /* PCF_Driver */ ++ { ++ FT_UNUSED( module ); ++ ++ return FT_Err_Ok; ++ } ++ ++ ++ FT_CALLBACK_DEF( void ) ++ pcf_driver_done( FT_Module module ) /* PCF_Driver */ ++ { ++ FT_UNUSED( module ); ++ } ++ ++ + FT_CALLBACK_TABLE_DEF + const FT_Driver_ClassRec pcf_driver_class = + { + { + FT_MODULE_FONT_DRIVER | + FT_MODULE_DRIVER_NO_OUTLINES, +- sizeof ( FT_DriverRec ), + ++ sizeof ( PCF_DriverRec ), + "pcf", + 0x10000L, + 0x20000L, + +- NULL, /* module-specific interface */ ++ NULL, /* module-specific interface */ + +- NULL, /* FT_Module_Constructor module_init */ +- NULL, /* FT_Module_Destructor module_done */ ++ pcf_driver_init, /* FT_Module_Constructor module_init */ ++ pcf_driver_done, /* FT_Module_Destructor module_done */ + pcf_driver_requester /* FT_Module_Requester get_interface */ + }, + +-- +cgit v1.0 + +From 08fd250e1af0aa16d18012d39462e6ca9bbc6e90 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Mon, 9 Jan 2017 11:30:32 +0100 +Subject: [pcf] Make long family names configurable. + +The change from 2016-09-29 was too radical (except for people using +the openSuSE GNU/Linux distribution). To ameliorate the situation, +PCF_CONFIG_OPTION_LONG_FAMILY_NAMES gets introduced which controls +the feature; if set, a new PCF property option +`no-long-family-names' can be used to switch this feature off. + +* include/freetype/config/ftoption.h, devel/ftoption.h +(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): New option. + +* include/freetype/ftpcfdrv.h: New header file (only containing +comments currently, used for building the documentation). + +* include/freetype/config/ftheader.h (FT_PCF_DRIVER_H): New macro. + +* src/pcf/pcf.h (PCF_Driver): Add `no_long_family_names' field. + +* src/pcf/pcfdrivr.c: Include FT_SERVICE_PROPERTIES_H and +FT_PCF_DRIVER_H. +(pcf_property_set, pcf_property_get): New functions. +(pcf_service_properties): New service. +(pcf_servives): Updated. +(pcf_driver_init) [PCF_CONFIG_OPTION_LONG_FAMILY_NAMES]: Handle +`no_long_family_names'. + +* src/pcf/pcfread.c (pcf_load_font): Handle `no_long_family_names' +and PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. + +* docs/CHANGES: Updated. +--- + devel/ftoption.h | 31 +++++++++- + docs/CHANGES | 16 ++++++ + include/freetype/config/ftheader.h | 13 +++++ + include/freetype/config/ftoption.h | 31 +++++++++- + include/freetype/ftchapters.h | 1 + + include/freetype/ftpcfdrv.h | 105 ++++++++++++++++++++++++++++++++++ + src/pcf/pcf.h | 2 + + src/pcf/pcfdrivr.c | 114 +++++++++++++++++++++++++++++++++++++ + src/pcf/pcfread.c | 98 ++++++++++++++++++------------- + 10 files changed, 400 insertions(+), 44 deletions(-) + create mode 100644 include/freetype/ftpcfdrv.h + +diff --git a/devel/ftoption.h b/devel/ftoption.h +index 3b63931..b8b0a8d 100644 +--- a/devel/ftoption.h ++++ b/devel/ftoption.h +@@ -82,8 +82,8 @@ FT_BEGIN_HEADER + /* to control the various font drivers and modules. The controllable */ + /* properties are listed in the section `Controlling FreeType Modules' */ + /* in the reference's table of contents; currently there are properties */ +- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ +- /* TrueType (file `ftttdrv.h'). */ ++ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ ++ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ + /* multiple lines for better readability). */ +@@ -835,6 +835,33 @@ FT_BEGIN_HEADER + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ ++ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ ++ /**** ****/ ++ /*************************************************************************/ ++ /*************************************************************************/ ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* There are many PCF fonts just called `Fixed' which look completely */ ++ /* different, and which have nothing to do with each other. When */ ++ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ ++ /* random, the style changes often if one changes the size and one */ ++ /* cannot select some fonts at all. This option makes the PCF module */ ++ /* prepend the foundry name (plus a space) to the family name. */ ++ /* */ ++ /* We also check whether we have `wide' characters; all put together, we */ ++ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ ++ /* */ ++ /* If this option is activated, it can be controlled with the */ ++ /* `no-long-family-names' property of the pcf driver module. */ ++ /* */ ++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ ++ ++ /*************************************************************************/ ++ /*************************************************************************/ ++ /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ +diff --git a/docs/CHANGES b/docs/CHANGES +index cb3b327..3823395 100644 +--- a/docs/CHANGES ++++ b/docs/CHANGES +@@ -1,4 +1,20 @@ + ++CHANGES BETWEEN 2.7.1 and 2.7.2 ++ ++ I. IMPORTANT CHANGES ++ ++ - The PCF change to show more `colourful' family names (introduced ++ in version 2.7.1) was too radical; it can now be configured with ++ PCF_CONFIG_OPTION_LONG_FAMILY_NAMES at compile time. If ++ activated, it can be switched off at run time with the new pcf ++ property `no-long-family-names'. If the `FREETYPE_PROPERTIES' ++ environment variable is available, you can say ++ ++ FREETYPE_PROPERTIES=pcf:no-long-family-names=1 ++ ++ ++====================================================================== ++ + CHANGES BETWEEN 2.7 and 2.7.1 + + I. IMPORTANT CHANGES +diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h +index 950d36c..d491af5 100644 +--- a/include/freetype/config/ftheader.h ++++ b/include/freetype/config/ftheader.h +@@ -357,6 +357,19 @@ + /************************************************************************* + * + * @macro: ++ * FT_PCF_DRIVER_H ++ * ++ * @description: ++ * A macro used in #include statements to name the file containing ++ * structures and macros related to the PCF driver module. ++ * ++ */ ++#define FT_PCF_DRIVER_H <freetype/ftpcfdrv.h> ++ ++ ++ /************************************************************************* ++ * ++ * @macro: + * FT_TYPE1_TABLES_H + * + * @description: +diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h +index f5bc540..5676074 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -82,8 +82,8 @@ FT_BEGIN_HEADER + /* to control the various font drivers and modules. The controllable */ + /* properties are listed in the section `Controlling FreeType Modules' */ + /* in the reference's table of contents; currently there are properties */ +- /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), and */ +- /* TrueType (file `ftttdrv.h'). */ ++ /* for the auto-hinter (file `ftautoh.h'), CFF (file `ftcffdrv.h'), */ ++ /* TrueType (file `ftttdrv.h'), and PCF (file `ftpcfdrv.h'). */ + /* */ + /* `FREETYPE_PROPERTIES' has the following syntax form (broken here into */ + /* multiple lines for better readability). */ +@@ -835,6 +835,33 @@ FT_BEGIN_HEADER + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ ++ /**** P C F D R I V E R C O N F I G U R A T I O N ****/ ++ /**** ****/ ++ /*************************************************************************/ ++ /*************************************************************************/ ++ ++ ++ /*************************************************************************/ ++ /* */ ++ /* There are many PCF fonts just called `Fixed' which look completely */ ++ /* different, and which have nothing to do with each other. When */ ++ /* selecting `Fixed' in KDE or Gnome one gets results that appear rather */ ++ /* random, the style changes often if one changes the size and one */ ++ /* cannot select some fonts at all. This option makes the PCF module */ ++ /* prepend the foundry name (plus a space) to the family name. */ ++ /* */ ++ /* We also check whether we have `wide' characters; all put together, we */ ++ /* get family names like `Sony Fixed' or `Misc Fixed Wide'. */ ++ /* */ ++ /* If this option is activated, it can be controlled with the */ ++ /* `no-long-family-names' property of the pcf driver module. */ ++ /* */ ++#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ ++ ++ /*************************************************************************/ ++ /*************************************************************************/ ++ /**** ****/ + /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ +diff --git a/include/freetype/ftchapters.h b/include/freetype/ftchapters.h +index ab43895..a0a121b 100644 +--- a/include/freetype/ftchapters.h ++++ b/include/freetype/ftchapters.h +@@ -77,6 +77,7 @@ + /* auto_hinter */ + /* cff_driver */ + /* tt_driver */ ++/* pcf_driver */ + /* */ + /***************************************************************************/ + +diff --git a/include/freetype/ftpcfdrv.h b/include/freetype/ftpcfdrv.h +new file mode 100644 +index 0000000..6622c93 +--- /dev/null ++++ b/include/freetype/ftpcfdrv.h +@@ -0,0 +1,105 @@ ++/***************************************************************************/ ++/* */ ++/* ftpcfdrv.h */ ++/* */ ++/* FreeType API for controlling the PCF driver (specification only). */ ++/* */ ++/* Copyright 2017 by */ ++/* David Turner, Robert Wilhelm, and Werner Lemberg. */ ++/* */ ++/* This file is part of the FreeType project, and may only be used, */ ++/* modified, and distributed under the terms of the FreeType project */ ++/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ ++/* this file you indicate that you have read the license and */ ++/* understand and accept it fully. */ ++/* */ ++/***************************************************************************/ ++ ++ ++#ifndef FTPCFDRV_H_ ++#define FTPCFDRV_H_ ++ ++#include <ft2build.h> ++#include FT_FREETYPE_H ++ ++#ifdef FREETYPE_H ++#error "freetype.h of FreeType 1 has been loaded!" ++#error "Please fix the directory search order for header files" ++#error "so that freetype.h of FreeType 2 is found first." ++#endif ++ ++ ++FT_BEGIN_HEADER ++ ++ ++ /************************************************************************** ++ * ++ * @section: ++ * pcf_driver ++ * ++ * @title: ++ * The PCF driver ++ * ++ * @abstract: ++ * Controlling the PCF driver module. ++ * ++ * @description: ++ * While FreeType's PCF driver doesn't expose API functions by itself, ++ * it is possible to control its behaviour with @FT_Property_Set and ++ * @FT_Property_Get. Right now, there is a single property ++ * `no-long-family-names' available if FreeType is compiled with ++ * PCF_CONFIG_OPTION_LONG_FAMILY_NAMES. ++ * ++ * The PCF driver's module name is `pcf'. ++ * ++ */ ++ ++ ++ /************************************************************************** ++ * ++ * @property: ++ * no-long-family-names ++ * ++ * @description: ++ * If PCF_CONFIG_OPTION_LONG_FAMILY_NAMES is active while compiling ++ * FreeType, the PCF driver constructs long family names. ++ * ++ * There are many PCF fonts just called `Fixed' which look completely ++ * different, and which have nothing to do with each other. When ++ * selecting `Fixed' in KDE or Gnome one gets results that appear rather ++ * random, the style changes often if one changes the size and one ++ * cannot select some fonts at all. The improve this situation, the PCF ++ * module prepends the foundry name (plus a space) to the family name. ++ * It also checks whether there are `wide' characters; all put together, ++ * family names like `Sony Fixed' or `Misc Fixed Wide' are constructed. ++ * ++ * If `no-long-family-names' is set, this feature gets switched off. ++ * ++ * { ++ * FT_Library library; ++ * FT_Bool no_long_family_names = TRUE; ++ * ++ * ++ * FT_Init_FreeType( &library ); ++ * ++ * FT_Property_Set( library, "pcf", ++ * "no-long-family-names", ++ * &no_long_family_names ); ++ * } ++ * ++ * @note: ++ * This property can be used with @FT_Property_Get also. ++ * ++ * This property can be set via the `FREETYPE_PROPERTIES' environment ++ * variable (using values 1 and 0 for `on' and `off', respectively). ++ * ++ */ ++ ++ ++FT_END_HEADER ++ ++ ++#endif /* FTPCFDRV_H_ */ ++ ++ ++/* END */ +diff --git a/src/pcf/pcf.h b/src/pcf/pcf.h +index 830cabe..f0390cb 100644 +--- a/src/pcf/pcf.h ++++ b/src/pcf/pcf.h +@@ -167,6 +167,8 @@ FT_BEGIN_HEADER + { + FT_DriverRec root; + ++ FT_Bool no_long_family_names; ++ + } PCF_DriverRec, *PCF_Driver; + + +diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c +index 8f4a90d..bc65423 100644 +--- a/src/pcf/pcfdrivr.c ++++ b/src/pcf/pcfdrivr.c +@@ -49,6 +49,8 @@ THE SOFTWARE. + + #include FT_SERVICE_BDF_H + #include FT_SERVICE_FONT_FORMAT_H ++#include FT_SERVICE_PROPERTIES_H ++#include FT_PCF_DRIVER_H + + + /*************************************************************************/ +@@ -667,6 +669,110 @@ THE SOFTWARE. + }; + + ++ /* ++ * PROPERTY SERVICE ++ * ++ */ ++ static FT_Error ++ pcf_property_set( FT_Module module, /* PCF_Driver */ ++ const char* property_name, ++ const void* value, ++ FT_Bool value_is_string ) ++ { ++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ ++ FT_Error error = FT_Err_Ok; ++ PCF_Driver driver = (PCF_Driver)module; ++ ++#ifndef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES ++ FT_UNUSED( value_is_string ); ++#endif ++ ++ ++ if ( !ft_strcmp( property_name, "no-long-family-names" ) ) ++ { ++#ifdef FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES ++ if ( value_is_string ) ++ { ++ const char* s = (const char*)value; ++ long lfn = ft_strtol( s, NULL, 10 ); ++ ++ ++ if ( lfn == 0 ) ++ driver->no_long_family_names = 0; ++ else if ( lfn == 1 ) ++ driver->no_long_family_names = 1; ++ else ++ return FT_THROW( Invalid_Argument ); ++ } ++ else ++#endif ++ { ++ FT_Bool* no_long_family_names = (FT_Bool*)value; ++ ++ ++ driver->no_long_family_names = *no_long_family_names; ++ } ++ ++ return error; ++ } ++ ++#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++ ++ FT_UNUSED( module ); ++ FT_UNUSED( value ); ++ FT_UNUSED( value_is_string ); ++ ++#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++ ++ FT_TRACE0(( "pcf_property_set: missing property `%s'\n", ++ property_name )); ++ return FT_THROW( Missing_Property ); ++ } ++ ++ ++ static FT_Error ++ pcf_property_get( FT_Module module, /* PCF_Driver */ ++ const char* property_name, ++ const void* value ) ++ { ++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ ++ FT_Error error = FT_Err_Ok; ++ PCF_Driver driver = (PCF_Driver)module; ++ ++ ++ if ( !ft_strcmp( property_name, "no-long-family-names" ) ) ++ { ++ FT_Bool no_long_family_names = driver->no_long_family_names; ++ FT_Bool* val = (FT_Bool*)value; ++ ++ ++ *val = no_long_family_names; ++ ++ return error; ++ } ++ ++#else /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++ ++ FT_UNUSED( module ); ++ FT_UNUSED( value ); ++ ++#endif /* !PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++ ++ FT_TRACE0(( "pcf_property_get: missing property `%s'\n", ++ property_name )); ++ return FT_THROW( Missing_Property ); ++ } ++ ++ ++ FT_DEFINE_SERVICE_PROPERTIESREC( ++ pcf_service_properties, ++ ++ (FT_Properties_SetFunc)pcf_property_set, /* set_property */ ++ (FT_Properties_GetFunc)pcf_property_get ) /* get_property */ ++ ++ + /* + * + * SERVICE LIST +@@ -677,6 +783,7 @@ THE SOFTWARE. + { + { FT_SERVICE_ID_BDF, &pcf_service_bdf }, + { FT_SERVICE_ID_FONT_FORMAT, FT_FONT_FORMAT_PCF }, ++ { FT_SERVICE_ID_PROPERTIES, &pcf_service_properties }, + { NULL, NULL } + }; + +@@ -694,7 +801,14 @@ THE SOFTWARE. + FT_CALLBACK_DEF( FT_Error ) + pcf_driver_init( FT_Module module ) /* PCF_Driver */ + { ++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ PCF_Driver driver = (PCF_Driver)module; ++ ++ ++ driver->no_long_family_names = 0; ++#else + FT_UNUSED( module ); ++#endif + + return FT_Err_Ok; + } +diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c +index 38ba110..3eacf2b 100644 +--- a/src/pcf/pcfread.c ++++ b/src/pcf/pcfread.c +@@ -1393,57 +1393,75 @@ THE SOFTWARE. + prop = pcf_find_property( face, "FAMILY_NAME" ); + if ( prop && prop->isString ) + { +- /* Prepend the foundry name plus a space to the family name. */ +- /* There are many fonts just called `Fixed' which look completely */ +- /* different, and which have nothing to do with each other. When */ +- /* selecting `Fixed' in KDE or Gnome one gets results that appear */ +- /* rather random, the style changes often if one changes the size */ +- /* and one cannot select some fonts at all. */ +- /* */ +- /* We also check whether we have `wide' characters; all put */ +- /* together, we get family names like `Sony Fixed' or `Misc Fixed */ +- /* Wide'. */ +- PCF_Property foundry_prop, point_size_prop, average_width_prop; +- +- int l = ft_strlen( prop->value.atom ) + 1; +- int wide = 0; +- +- +- foundry_prop = pcf_find_property( face, "FOUNDRY" ); +- point_size_prop = pcf_find_property( face, "POINT_SIZE" ); +- average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); +- +- if ( point_size_prop && average_width_prop ) ++ ++#ifdef PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++ ++ PCF_Driver driver = (PCF_Driver)FT_FACE_DRIVER( face ); ++ ++ ++ if ( !driver->no_long_family_names ) + { +- if ( average_width_prop->value.l >= point_size_prop->value.l ) ++ /* Prepend the foundry name plus a space to the family name. */ ++ /* There are many fonts just called `Fixed' which look */ ++ /* completely different, and which have nothing to do with each */ ++ /* other. When selecting `Fixed' in KDE or Gnome one gets */ ++ /* results that appear rather random, the style changes often if */ ++ /* one changes the size and one cannot select some fonts at all. */ ++ /* */ ++ /* We also check whether we have `wide' characters; all put */ ++ /* together, we get family names like `Sony Fixed' or `Misc */ ++ /* Fixed Wide'. */ ++ ++ PCF_Property foundry_prop, point_size_prop, average_width_prop; ++ ++ int l = ft_strlen( prop->value.atom ) + 1; ++ int wide = 0; ++ ++ ++ foundry_prop = pcf_find_property( face, "FOUNDRY" ); ++ point_size_prop = pcf_find_property( face, "POINT_SIZE" ); ++ average_width_prop = pcf_find_property( face, "AVERAGE_WIDTH" ); ++ ++ if ( point_size_prop && average_width_prop ) + { +- /* This font is at least square shaped or even wider */ +- wide = 1; +- l += ft_strlen( " Wide" ); ++ if ( average_width_prop->value.l >= point_size_prop->value.l ) ++ { ++ /* This font is at least square shaped or even wider */ ++ wide = 1; ++ l += ft_strlen( " Wide" ); ++ } + } +- } + +- if ( foundry_prop && foundry_prop->isString ) +- { +- l += ft_strlen( foundry_prop->value.atom ) + 1; ++ if ( foundry_prop && foundry_prop->isString ) ++ { ++ l += ft_strlen( foundry_prop->value.atom ) + 1; + +- if ( FT_NEW_ARRAY( root->family_name, l ) ) +- goto Exit; ++ if ( FT_NEW_ARRAY( root->family_name, l ) ) ++ goto Exit; ++ ++ ft_strcpy( root->family_name, foundry_prop->value.atom ); ++ ft_strcat( root->family_name, " " ); ++ ft_strcat( root->family_name, prop->value.atom ); ++ } ++ else ++ { ++ if ( FT_NEW_ARRAY( root->family_name, l ) ) ++ goto Exit; + +- ft_strcpy( root->family_name, foundry_prop->value.atom ); +- ft_strcat( root->family_name, " " ); +- ft_strcat( root->family_name, prop->value.atom ); ++ ft_strcpy( root->family_name, prop->value.atom ); ++ } ++ ++ if ( wide ) ++ ft_strcat( root->family_name, " Wide" ); + } + else ++ ++#endif /* PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ ++ + { +- if ( FT_NEW_ARRAY( root->family_name, l ) ) ++ if ( FT_STRDUP( root->family_name, prop->value.atom ) ) + goto Exit; +- +- ft_strcpy( root->family_name, prop->value.atom ); + } +- +- if ( wide ) +- ft_strcat( root->family_name, " Wide" ); + } + else + root->family_name = NULL; +-- +cgit v1.0 + +From 7ccca6aec167c2c30c569765ece808f0eee023a6 Mon Sep 17 00:00:00 2001 +From: Werner Lemberg <wl@gnu.org> +Date: Mon, 9 Jan 2017 19:54:44 +0100 +Subject: [pcf] Disable long family names by default. + +* include/freetype/config/ftoption.h +(PCF_CONFIG_OPTION_LONG_FAMILY_NAMES): Comment out. +--- + include/freetype/config/ftoption.h | 2 +- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h +index 5676074..37a0d00 100644 +--- a/include/freetype/config/ftoption.h ++++ b/include/freetype/config/ftoption.h +@@ -856,7 +856,7 @@ FT_BEGIN_HEADER + /* If this option is activated, it can be controlled with the */ + /* `no-long-family-names' property of the pcf driver module. */ + /* */ +-#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES ++/* #define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES */ + + + /*************************************************************************/ +-- +cgit v1.0 + diff --git a/media-libs/freetype/freetype-2.7.1-r2.ebuild b/media-libs/freetype/freetype-2.7.1-r2.ebuild new file mode 100644 index 000000000000..5afefe4915d3 --- /dev/null +++ b/media-libs/freetype/freetype-2.7.1-r2.ebuild @@ -0,0 +1,179 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs + +INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch" + +DESCRIPTION="A high-quality and portable font engine" +HOMEPAGE="http://www.freetype.org/" +SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2 + mirror://nongnu/freetype/${P/_/}.tar.bz2 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2 + mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 ) + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2 + mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )" + +LICENSE="|| ( FTL GPL-2+ )" +SLOT="2" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz + infinality png static-libs utils" +RESTRICT="!bindist? ( bindist )" # bug 541408 + +CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) + harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] ) + utils? ( + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}] + >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}] + ) + )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )" +PDEPEND="infinality? ( media-libs/fontconfig-infinality )" + +PATCHES=( + # This is the same as the 01 patch from infinality + "${FILESDIR}"/${PN}-2.7-enable-valid.patch + + "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966 + + # patches from upstream (can be removed with the next version bump) + "${FILESDIR}"/${P}-pcf_fix.patch #606688 + "${FILESDIR}"/${P}-glyph_name.patch #612192 +) + +src_prepare() { + enable_option() { + sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to enable option $1" + } + + disable_option() { + sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to disable option $1" + } + + default + + # 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 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" + elif use infinality; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" + elif use cleartype_hinting; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" + fi + + if ! use bindist; then + # See http://freetype.org/patents.html + # ClearType is covered by several Microsoft patents in the US + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING + fi + + if ! use adobe-cff; then + enable_option CFF_CONFIG_OPTION_OLD_ENGINE + fi + + if use debug; then + enable_option FT_DEBUG_LEVEL_TRACE + enable_option FT_DEBUG_MEMORY + fi + + if use utils; then + cd "${WORKDIR}/ft2demos-${PV}" || die + # Disable tests needing X11 when USE="-X". (bug #177597) + if ! use X; then + sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die + fi + cd "${S}" || die + fi + + # we need non-/bin/sh to run configure + if [[ -n ${CONFIG_SHELL} ]] ; then + sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \ + "${S}"/builds/unix/configure || die + fi + + elibtoolize --patch-only +} + +multilib_src_configure() { + append-flags -fno-strict-aliasing + type -P gmake &> /dev/null && export GNUMAKE=gmake + + local myeconfargs=( + --enable-biarch-config + --enable-shared + $(use_with bzip2) + $(use_with harfbuzz) + $(use_with png) + $(use_enable static-libs static) + + # avoid using libpng-config + LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)" + LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)" + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use utils; then + einfo "Building utils" + # fix for Prefix, bug #339334 + emake \ + X11_PATH="${EPREFIX}/usr/$(get_libdir)" \ + FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use utils; then + einfo "Installing utils" + rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die + local ft2demo + for ft2demo in ../ft2demos-${PV}/bin/*; do + ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \ + "${ED}"/usr/bin || die + done + fi +} + +multilib_src_install_all() { + 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 + mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + done + fi + + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO} + if use doc ; then + docinto html + dodoc -r docs/* + fi + + prune_libtool_files --all +} diff --git a/media-libs/freetype/freetype-2.8.1.ebuild b/media-libs/freetype/freetype-2.8.1.ebuild new file mode 100644 index 000000000000..7592ac935258 --- /dev/null +++ b/media-libs/freetype/freetype-2.8.1.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs + +INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch" + +DESCRIPTION="A high-quality and portable font engine" +HOMEPAGE="http://www.freetype.org/" +SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2 + mirror://nongnu/freetype/${P/_/}.tar.bz2 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2 + mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 ) + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2 + mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )" + +LICENSE="|| ( FTL GPL-2+ )" +SLOT="2" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz + infinality png static-libs utils" +RESTRICT="!bindist? ( bindist )" # bug 541408 + +CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) + harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] ) + utils? ( + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}] + >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}] + ) + )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )" +PDEPEND="infinality? ( media-libs/fontconfig-infinality )" + +PATCHES=( + # This is the same as the 01 patch from infinality + "${FILESDIR}"/${PN}-2.7-enable-valid.patch + + "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966 + + # patches from upstream (can be removed with the next version bump) +) + +src_prepare() { + enable_option() { + sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to enable option $1" + } + + disable_option() { + sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to disable option $1" + } + + default + + # 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 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" + elif use infinality; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" + elif use cleartype_hinting; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" + fi + + # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1" + # via environment (new since v2.8) + enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + if ! use bindist; then + # See http://freetype.org/patents.html + # ClearType is covered by several Microsoft patents in the US + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING + fi + + if ! use adobe-cff; then + enable_option CFF_CONFIG_OPTION_OLD_ENGINE + fi + + if use debug; then + enable_option FT_DEBUG_LEVEL_TRACE + enable_option FT_DEBUG_MEMORY + fi + + if use utils; then + cd "${WORKDIR}/ft2demos-${PV}" || die + # Disable tests needing X11 when USE="-X". (bug #177597) + if ! use X; then + sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die + fi + cd "${S}" || die + fi + + # we need non-/bin/sh to run configure + if [[ -n ${CONFIG_SHELL} ]] ; then + sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \ + "${S}"/builds/unix/configure || die + fi + + elibtoolize --patch-only +} + +multilib_src_configure() { + append-flags -fno-strict-aliasing + type -P gmake &> /dev/null && export GNUMAKE=gmake + + local myeconfargs=( + --enable-biarch-config + --enable-shared + $(use_with bzip2) + $(use_with harfbuzz) + $(use_with png) + $(use_enable static-libs static) + + # avoid using libpng-config + LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)" + LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)" + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use utils; then + einfo "Building utils" + # fix for Prefix, bug #339334 + emake \ + X11_PATH="${EPREFIX}/usr/$(get_libdir)" \ + FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use utils; then + einfo "Installing utils" + rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die + local ft2demo + for ft2demo in ../ft2demos-${PV}/bin/*; do + ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \ + "${ED}"/usr/bin || die + done + fi +} + +multilib_src_install_all() { + 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 + mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + done + fi + + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO} + if use doc ; then + docinto html + dodoc -r docs/* + fi + + prune_libtool_files --all +} diff --git a/media-libs/freetype/freetype-2.8.ebuild b/media-libs/freetype/freetype-2.8.ebuild new file mode 100644 index 000000000000..f5f6757ec8f4 --- /dev/null +++ b/media-libs/freetype/freetype-2.8.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs + +INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch" + +DESCRIPTION="A high-quality and portable font engine" +HOMEPAGE="http://www.freetype.org/" +SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2 + mirror://nongnu/freetype/${P/_/}.tar.bz2 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2 + mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 ) + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2 + mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )" + +LICENSE="|| ( FTL GPL-2+ )" +SLOT="2" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="X +adobe-cff bindist bzip2 +cleartype_hinting debug doc fontforge harfbuzz + infinality png static-libs utils" +RESTRICT="!bindist? ( bindist )" # bug 541408 + +CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) + harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] ) + utils? ( + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}] + >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}] + ) + )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + abi_x86_32? ( utils? ( !app-emulation/emul-linux-x86-xlibs[-abi_x86_32(-)] ) )" +PDEPEND="infinality? ( media-libs/fontconfig-infinality )" + +PATCHES=( + # This is the same as the 01 patch from infinality + "${FILESDIR}"/${PN}-2.7-enable-valid.patch + + "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966 + + # patches from upstream (can be removed with the next version bump) +) + +src_prepare() { + enable_option() { + sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to enable option $1" + } + + disable_option() { + sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to disable option $1" + } + + default + + # 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 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" + elif use infinality; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" + elif use cleartype_hinting; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" + fi + + # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1" + # via environment (new since v2.8) + enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + if ! use bindist; then + # See http://freetype.org/patents.html + # ClearType is covered by several Microsoft patents in the US + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING + fi + + if ! use adobe-cff; then + enable_option CFF_CONFIG_OPTION_OLD_ENGINE + fi + + if use debug; then + enable_option FT_DEBUG_LEVEL_TRACE + enable_option FT_DEBUG_MEMORY + fi + + if use utils; then + cd "${WORKDIR}/ft2demos-${PV}" || die + # Disable tests needing X11 when USE="-X". (bug #177597) + if ! use X; then + sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die + fi + cd "${S}" || die + fi + + # we need non-/bin/sh to run configure + if [[ -n ${CONFIG_SHELL} ]] ; then + sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \ + "${S}"/builds/unix/configure || die + fi + + elibtoolize --patch-only +} + +multilib_src_configure() { + append-flags -fno-strict-aliasing + type -P gmake &> /dev/null && export GNUMAKE=gmake + + local myeconfargs=( + --enable-biarch-config + --enable-shared + $(use_with bzip2) + $(use_with harfbuzz) + $(use_with png) + $(use_enable static-libs static) + + # avoid using libpng-config + LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)" + LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)" + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use utils; then + einfo "Building utils" + # fix for Prefix, bug #339334 + emake \ + X11_PATH="${EPREFIX}/usr/$(get_libdir)" \ + FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use utils; then + einfo "Installing utils" + rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die + local ft2demo + for ft2demo in ../ft2demos-${PV}/bin/*; do + ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \ + "${ED}"/usr/bin || die + done + fi +} + +multilib_src_install_all() { + 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 + mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + done + fi + + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO} + if use doc ; then + docinto html + dodoc -r docs/* + fi + + prune_libtool_files --all +} diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-9999.ebuild new file mode 100644 index 000000000000..ab1fec804cfc --- /dev/null +++ b/media-libs/freetype/freetype-9999.ebuild @@ -0,0 +1,227 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +SCM= +[[ "${PV}" = 9999 ]] && SCM="autotools git-r3" +inherit flag-o-matic libtool multilib multilib-build multilib-minimal toolchain-funcs ${SCM} +unset SCM + +INFINALITY_PATCH="03-infinality-2.6.3-2016.03.26.patch" + +DESCRIPTION="A high-quality and portable font engine" +HOMEPAGE="http://www.freetype.org/" +IUSE="X +adobe-cff bindist bzip2 +cleartype_hinting debug fontforge harfbuzz + infinality png static-libs utils" + +if [[ "${PV}" != 9999 ]] ; then + SRC_URI="mirror://sourceforge/freetype/${P/_/}.tar.bz2 + mirror://nongnu/freetype/${P/_/}.tar.bz2 + utils? ( mirror://sourceforge/freetype/ft2demos-${PV}.tar.bz2 + mirror://nongnu/freetype/ft2demos-${PV}.tar.bz2 ) + doc? ( mirror://sourceforge/freetype/${PN}-doc-${PV}.tar.bz2 + mirror://nongnu/freetype/${PN}-doc-${PV}.tar.bz2 )" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" + IUSE+="doc" +fi + +LICENSE="|| ( FTL GPL-2+ )" +SLOT="2" +RESTRICT="!bindist? ( bindist )" # bug 541408 + +CDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) + harfbuzz? ( >=media-libs/harfbuzz-0.9.19[truetype,${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] ) + utils? ( + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXau-1.0.7-r1[${MULTILIB_USEDEP}] + >=x11-libs/libXdmcp-1.1.1-r1[${MULTILIB_USEDEP}] + ) + )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND}" +PDEPEND="infinality? ( media-libs/fontconfig-infinality )" + +PATCHES=( + # This is the same as the 01 patch from infinality + "${FILESDIR}"/${PN}-2.7-enable-valid.patch + + "${FILESDIR}"/${PN}-2.4.11-sizeof-types.patch # 459966 +) + +src_fetch() { + if [[ "${PV}" = 9999 ]] ; then + local EGIT_REPO_URI + EGIT_REPO_URI="https://git.savannah.gnu.org/r/freetype/freetype2.git" + git-r3_src_fetch + if use utils ; then + EGIT_REPO_URI="https://git.savannah.gnu.org/r/freetype/freetype2-demos.git" + git-r3_src_fetch + fi + else + default + fi +} + +src_unpack() { + if [[ "${PV}" = 9999 ]] ; then + local EGIT_REPO_URI + EGIT_REPO_URI="http://git.savannah.gnu.org/r/freetype/freetype2.git" + git-r3_src_unpack + if use utils ; then + EGIT_REPO_URI="http://git.savannah.gnu.org/r/freetype/freetype2-demos.git" + local EGIT_CHECKOUT_DIR="${WORKDIR}/ft2demos-${PV}" + git-r3_src_unpack + fi + else + default + fi +} + +src_prepare() { + if [[ "${PV}" = 9999 ]] ; then + # inspired by shipped autogen.sh script + eval $(sed -nf version.sed include/freetype/freetype.h) + pushd builds/unix &>/dev/null || die + sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \ + < configure.raw > configure.ac || die + # eautoheader produces broken ftconfig.in + eautoheader() { return 0 ; } + AT_M4DIR="." eautoreconf + unset freetype_major freetype_minor freetype_patch + popd &>/dev/null || die + fi + + default + + enable_option() { + sed -i -e "/#define $1/ { s:/\* ::; s: \*/:: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to enable option $1" + } + + disable_option() { + sed -i -e "/#define $1/ { s:^:/* :; s:$: */: }" \ + include/${PN}/config/ftoption.h \ + || die "unable to disable option $1" + } + + # 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 + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING ( 1 | 2 )" + elif use infinality; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 1" + elif use cleartype_hinting; then + enable_option "TT_CONFIG_OPTION_SUBPIXEL_HINTING 2" + fi + + # Can be disabled with FREETYPE_PROPERTIES="pcf:no-long-family-names=1" + # via environment (new since v2.8) + enable_option PCF_CONFIG_OPTION_LONG_FAMILY_NAMES + + if ! use bindist; then + # See http://freetype.org/patents.html + # ClearType is covered by several Microsoft patents in the US + enable_option FT_CONFIG_OPTION_SUBPIXEL_RENDERING + fi + + if ! use adobe-cff; then + enable_option CFF_CONFIG_OPTION_OLD_ENGINE + fi + + if use debug; then + enable_option FT_DEBUG_LEVEL_TRACE + enable_option FT_DEBUG_MEMORY + fi + + if use utils; then + cd "${WORKDIR}/ft2demos-${PV}" || die + # Disable tests needing X11 when USE="-X". (bug #177597) + if ! use X; then + sed -i -e "/EXES\ +=\ ftdiff/ s:^:#:" Makefile || die + fi + cd "${S}" || die + fi + + # we need non-/bin/sh to run configure + if [[ -n ${CONFIG_SHELL} ]] ; then + sed -i -e "1s:^#![[:space:]]*/bin/sh:#!$CONFIG_SHELL:" \ + "${S}"/builds/unix/configure || die + fi + + elibtoolize --patch-only +} + +multilib_src_configure() { + append-flags -fno-strict-aliasing + type -P gmake &> /dev/null && export GNUMAKE=gmake + + local myeconfargs=( + --enable-biarch-config + --enable-shared + $(use_with bzip2) + $(use_with harfbuzz) + $(use_with png) + $(use_enable static-libs static) + + # avoid using libpng-config + LIBPNG_CFLAGS="$($(tc-getPKG_CONFIG) --cflags libpng)" + LIBPNG_LDFLAGS="$($(tc-getPKG_CONFIG) --libs libpng)" + ) + + ECONF_SOURCE="${S}" \ + econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + default + + if multilib_is_native_abi && use utils; then + einfo "Building utils" + # fix for Prefix, bug #339334 + emake \ + X11_PATH="${EPREFIX}/usr/$(get_libdir)" \ + FT2DEMOS=1 TOP_DIR_2="${WORKDIR}/ft2demos-${PV}" + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi && use utils; then + einfo "Installing utils" + rm "${WORKDIR}"/ft2demos-${PV}/bin/README || die + local ft2demo + for ft2demo in ../ft2demos-${PV}/bin/*; do + ./libtool --mode=install $(type -P install) -m 755 "$ft2demo" \ + "${ED}"/usr/bin || die + done + fi +} + +multilib_src_install_all() { + 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 + mkdir -p "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + cp ${header} "${ED}/usr/include/freetype2/internal4fontforge/$(dirname ${header})" || die + done + fi + + dodoc docs/{CHANGES,CUSTOMIZE,DEBUG,INSTALL.UNIX,*.txt,PROBLEMS,TODO} + if [[ "${PV}" != 9999 ]] && use doc ; then + docinto html + dodoc -r docs/* + fi + + prune_libtool_files --all +} diff --git a/media-libs/freetype/metadata.xml b/media-libs/freetype/metadata.xml new file mode 100644 index 000000000000..a395a40be75d --- /dev/null +++ b/media-libs/freetype/metadata.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>polynomial-c@gentoo.org</email> + <name>Lars Wendler</name> + </maintainer> + <maintainer type="project"> + <email>multilib@gentoo.org</email> + <name>gx86-multilib project</name> + <description>Handling the bugs related to multilib support in the + package and related changes.</description> + </maintainer> + <maintainer type="project"> + <email>fonts@gentoo.org</email> + <name>Fonts</name> + </maintainer> + <use> + <flag name="adobe-cff">Use Adobe CFF as default font-renderer</flag> + <flag name="cleartype_hinting">New bytecode hinting mode for TrueType fonts that + activates subpixel hinting (a.k.a. ClearType hinting) by default</flag> + <flag name="bindist">Disable ClearType support (see http://freetype.org/patents.html)</flag> + <flag name="bzip2">Support bzip2 compressed PCF fonts.</flag> + <flag name="fontforge">Install internal headers required for TrueType + debugger in <pkg>media-gfx/fontforge</pkg> (built with + USE=truetype-debugger)</flag> + <flag name="harfbuzz">Use <pkg>media-libs/harfbuzz</pkg> for auto-hinting + OpenType fonts. WARNING: may trigger circular dependencies!</flag> + <flag name="infinality">Enable infinality options for improved LCD + filtering</flag> + <flag name="utils">Install utilities and examples from ft2demos</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:freetype:freetype</remote-id> + <remote-id type="sourceforge">freetype</remote-id> + </upstream> +</pkgmetadata> |